query_id
string
corpus_id
string
query
string
code
string
label
int64
dd6eb1f9625f29e6f4715e914b20c808
56de31642b75732d58d22ca3c8a25544
Called when a port is flushed (Empty fonction)
{ unsigned int i; for(i = 0; i < m_PortCount; i++) { if (m_pPorts[i].isFlushing() == true) { return true; } } return false; }
0
6ce4b2553e364952aaaf1e1583df10f4
910d7e78652c4a0d13f4d3417bb46a92
Registers the given method with the off action.
public abstract class GestureListener public void registerOnAction(String name, Object o) { onAction = new RegisteredAction(name, o); }
0
c2ce441721c5ed5d308c1efacef8dfb3
28337d3ca4ba0f592539ff1fb5934c9c
Gets the chunk identifier.
namespace Chunky.Resources uint GetChunkId();
1
bc31b0db17393199e0206a81cf4d46d6
d3dfbd101eb297642fb208767d5d0e98
调用父类方法获取所有数据,然后在父类的基础上进行过滤
class OperateManager(OperateManagerBase): def all(self, *args, **kwargs): return super(OperateManager, self).filter(is_deleted=False)
1
1d9e4fc55e5673c0adee740362f34d18
69ff1aac0bb82f349efc59eb8f64008f
Multiplexer Self-Test
static int AmpUT_Mp4MuxDual_test(void) { return 0; }
1
61b23e85c09e8d967df53d6d7ecc99b1
75e9ad1d472c71012276e4d9a294977c
removes brackets; to be used after manipulation expressions inside bracket
temp = re.compile(r'\([^()]+\)') flag = temp.search(expression) if not flag: r1 = mul_divide(expression) r2 = add_subtract(r1) return r2 sub = flag.group().strip('[()]') temp_result1 = mul_divide(sub) temp_result2 = add_subtract(temp_result1) s1, s2 = temp.split(expre...
1
ce8ad3111d221c0d20799e3a5d775f1d
bcbef807249f5329e8f6eb19df73564f
Set the sort type of this list
if (sort == null) throw new IllegalArgumentException("Sort cannot be null"); this.sort = sort; }
1
1f3c50a4552d4a60f6591e0896a41bd6
141c5b6b386434dc844cc722893048e8
Called when mouse is moved while button pressed.
fn mouse_move(&mut self, _pt: Vector2F, _gui: &Gui) {}
0
49d4caae65223cb6f89fa13f64024de1
f3e0c0dcac1edffe1a9d2641d16323fa
Nos da el patrón para obetener los ficheros de los diccionarios instalados localmente.
class configuracion(object): def ruta_server(self): cadena ="/home/soporte/Documentos/DCM-Cooperativas/cooperativas20170709/Descargas" return cadena
0
9e99fe1c60904643c1aed14c512cf2f9
b402a91efc1a7290d4a484cf1a98015c
Подтверждение, что договор по заявке подписан заемщиком
envelope_uri = request.GET.get('envelopeId') if not envelope_uri: raise Exception('Invalid envelope URI') if not request.GET.get('event') == 'signing_complete': return redirect("rest_framework:index") deal = get_object_or_404(Deal, pk=deal_id) DocuSignHelper().download_envelope(deal,...
1
e62bb5729aaa6f105be66eecf6632d1e
4f96ee8872fed25def362725902c01ad
Toggle show email content while click email item.
if(getInput() == ""){ email_list.style.display = "none"; } else { email_list.style.display = "block"; } }
0
2f214b109a1851ccd36f12cd1c1fdaa3
ce1cf5c8af4b73988c92fc1d5299f0ff
@brief init speed 2 slice convertion table storage pool
void lc_api_init(void) { #if( LC_POOL_NUM_APIBUF_2K != 0 ) lc_pool_init(&LcApiBuf2kPool, LC_POOL_ID_APIBUF_2K, LC_POOL_SIZE_APIBUF_2K, LC_POOL_NUM_APIBUF_2K); #endif LC_DEBUGLOG("lc_api_init() end.\n"); return; }
0
e9c5ae696e6dc6e709df12fce454b540
e20c3c4d1d07079f56d0c112249ece7e
通过用户Id和课程Id 来查询订单表,返回用户是否购买了该课程
@GetMapping("/eduorder/order/isBuyCourse/{courseId}/{memberId}") public boolean isBuyCourse(@PathVariable("courseId") String courseId, @PathVariable(required = false, name = "memberId") String memberId);
1
b6cc54bde6fff2591f2ec78d15d464ba
a0c3cfbbcce2df4e18559db456f7d41f
Returns true/false whether the Robot has been placed on the table
public class RobotPlatform public boolean checkForTablePlatformPosition(int x_pos, int y_pos) { boolean result = false; if (x_pos >= this.x_pos_min && x_pos < this.x_pos_max && y_pos >= this.y_pos_min && y_pos < this.y_pos_max) result = true; return result; }
1
37a0985b7b49c41bc3d646fd397b7100
35852336210825fe9019155c1aa6b888
Launch an app based on bundle ID.
public class FlingClientImpl extends FlingClient<IFlingDeviceController> public void launchApplication(String applicationId, boolean relaunchFlag, ResultCallback_c<Fling.ApplicationConnectionResult> callback) throws IllegalStateException, RemoteException { setApplicationConnectionResultCallback(callback); g...
1
0f1e5665cab74f7a8c5a02daa8bb1971
d2bbdb5dcc29d8a445998c2917c0ec3a
this is the core ability exposed by this Struct. most other functions rely on it. given a number n, it calls the closure f with p, exp, where p.pow(exp) is a divisor of n (and maximal in terms of exp)
unsigned long long findDivisorsFunction(unsigned long long n, int n_div) { unsigned long long div = 0; for(unsigned long long i = 1; i <= n; i++) { if(n % i == 0) { div++; if(div > 8 || n % 256 == 0 || n % 6561 == 0 || n % 390625 == 0 || n % 576481 == 0 || n % 214...
0
574f276dac89ded0657104cabbd51390
12a4281ccc75048ae44e1982f7342e21
Getter for whether or not datalogging is enabled for this device.
class dataset(): def set_logger(self, datalogger_obj = ''): self.is_datalog_enabled = False if not datalogger_obj == '': self.is_datalog_enabled = True self.datalogger_obj = datalogger_obj
0
7764cf25634b4c5b3c883eec21df22d4
6db561d4b6684d592c939a6149559144
Removes horizontal spacing between the selected objects.
{ foreach (Shape shape in project.shapes) { foreach (Segment segment in shape.segments) { if (segment.type == SegmentType.Linear) continue; if (IsObjectSelected(segment) || IsObjectSelected(segment.bezierPivot1) || I...
0
595670da921c6f64afd9f4af13c96ae4
27ecc1f754fccd9c42dfc4f17ba51b5e
设置 未回収元本残高(税抜) 未回収元本残高(税抜)
public class Apl0013s01Dto extends BaseDto public void setUpdatedUnwithdrawPrincipalRemainder( BigDecimal updatedUnwithdrawPrincipalRemainder) { this.updatedUnwithdrawPrincipalRemainder = updatedUnwithdrawPrincipalRemainder; }
1
76b3bacec3041eb58f516a05c46b33e0
4669b5ed27af4b1a39ad2e44dc7ffc96
Processes R key stroke.
void rPressed(AppData_t* const psAppData) { runAlgorithm(psAppData); }
1
9d27ef16fb13d3e3101d765727df4505
2a6fa35a4f1815983a6e15b34da79711
normalize replaces underscores with hyphens
function hyphen(target) { return target.replace(rhyphen, '$1-$2').toLowerCase(); }
0
914a9fc5b25fe8ed1307c89aff760de1
3422813435d9c82cb850cf3f10a7bfd5
車をt_delta秒後の位置に移動
{ int deltaLeft = leftEncoderCounts; int deltaRight = rightEncoderCounts; double deltaLeftdis = (double)deltaLeft / EncoderTicks * WheelDiameter * O_PI; double deltaRightdis = (double)deltaRight / EncoderTicks * WheelDiameter * O_PI; double deltaDis = 0.5f * (deltaLeftdis + deltaRightdis); double d...
0
c454f4b6034ff995cd834f5cf12ee346
2ed0185935fde9e700e82ebcd2cff0fd
A dummy predictor emulating the following: - Expecting an incorrect input type This is used below to test custom exception functionality.
def test_waiter_supports_expected_exceptions(): def predicate(): raise TypeError('error')
1
e6c07889b1f8b2b907fb0f3c25bf3560
37da27acb8a047749cc6253144b759a3
enable or disable slider up and down arrows
if ( _isDisabled ) { _$increase.attr( 'disabled', true ).addClass( 'disabled' ); _$decrease.attr( 'disabled', true ).addClass( 'disabled' ); return; } if ( _max <= val ) { _$increase.attr( 'disabled', true ).addClass( 'd...
1
99bc7ef1b6d1c34a07fa287699dc6433
7baa2980fca1bf6ac30e255b27388ca9
make it always return posix path, easier for validating error messages
function toPosixFileName(fileName: string): string { return fileName.replace(/\\/g, '/'); }
1
3c6cbcba03370c893234070f5a6ae57a
6324443098141ee54552a1db02e5bbb1
Adds a reply to the content.
if not self.testing: reply_msg = KQMLPerformative('reply') reply_msg.set('content', reply_content) self.reply(msg, reply_msg) return (msg, reply_content)
1
2c465b9280c4b74daa9d0032b53b6118
ce51489a348b143823e7c9fa61247f0c
check that all rows in a sheet have the same set of keys
class Array2Xlsx private function checkConsistentHeaders() { foreach ($this->tensor as $k1 => $sheet) { $keys1=null; $nIncons=0; foreach ($sheet as $k2 => $row) { $keys2 = implode(",", array_keys($row)); if (is_null($keys1)) { ...
1
eaaea95eaf44acf7bc6c3a3251f8ba6f
8755227479885731579548145e6487be
creating dummy object to test the recycler view.
mProducts = new ArrayList<Product>(); for (int i = 0; i < 10; i++) { Product inf = new Product(i, "timeline:" + i, i, 1000 * i, new Date(), "/sdcard", 2 * i, false, "title: " + i, "product:" + i, "path:" + i); mProducts.add(inf); } mStudioAdapter.setDataSource(mPr...
1
f497452929c9380e7c162cf6483371b3
da45a783d62dd633910b527c8f3b1dde
将次数转化为频率
def __to_relative_frequency(data_set): total = float(sum(data_set.values())) out = {k : v / total for k, v in data_set.items()} return out
1
bc0ea384014dd10f1fdf24a3b9e50013
cfab17bb0d98afa124a3fc47c041e6e4
Weighs every document in the corpus and stores it in a bin file
try: self.query_dict[self.query_filename] = self.corpus_dict.doc2bow(self.query_list[self.query_filename]) except AttributeError: print('No corpus dict loaded!')
0
7c22b2ebca72c388afbf3f6719c1643f
5257db22ea71b8238975637dd1f53e93
给requests打编码补丁
class Department(BaseApi): def __init__(self, secret, is_debug=False, is_proxy=False): def encoding_change(response: requests.Response, *args, **kwargs): response.encoding = 'utf-8' return response
1
a8cdd261cd65096341ecdb8560f2e42f
c2084024e53be983914623729b035cc1
Remove Forgot Password Key
$update_data = array( 'status' => 0 ); $this->db->where('beta_key', (string) $key); $this->db->update('beta_keys', $update_data); return; }
0
79746afb4a1cd7b8189aa7a2d82cbd4b
92ddc543982a3d87587d85c85b92eacf
Returns color value specified by hue, saturation and lightness and alpha. HSL values are all in range [0..1], alpha in range [0..255]
{ if (h < 0 || h > 1) throw new IllegalArgumentException("Saturation, s, cannot be less than zero or greater than 1"); if (s < 0 || s > 1) throw new IllegalArgumentException("Saturation, s, cannot be less than zero or greater than 1"); if (l < 0 || l > 1) ...
0
cac56e6bbcf40f6332950ec029b8b33b
807d2f45302fca318090e0b1d3bdb1d6
Get the start address of one DPU Task's output Tensor, multiple IO supported.
int index, const nvinfer1::DimsExprs* inputs, int nbInputs, nvinfer1::IExprBuilder& exprBuilder) noexcept { assert(nbInputs == 3); assert(index == 0); nvinfer1::DimsExprs output(inputs[0]); return output; }
0
173f1fccf51e30b14d8e19ed0530d105
4c7d404920803f97785d9c0a20861c1f
连接基类
class UI(QtGui.QWidget): def __init__(self): QtGui.QWidget.__init__(self) self.init() self.bulidConnection() self.setLayout(self.mainLayout) self.setWindowIcon(QtGui.QIcon(urlTool.cur_file_dir()+"//main.ico"))
1
bae84e3f68e44413c43ff6c01c9044fe
d4d1e961e504c1e8baf970d1159eb899
input should be in the format: x1,y1,x2,y2,x3,y3
def collect_inputs(): input_x1 = float(raw_input("Enter x1: ")) input_y1 = float(raw_input("Enter y1: ")) input_x2 = float(raw_input("Enter x2: ")) input_y2 = float(raw_input("Enter y2: ")) x_and_y_input = [input_x1,input_y1,input_x2,input_y2] return x_and_y_input
0
0ea4a9c25282242d706369f77ebda422
a2755cfc52ba8b6835e2540e4e08ebc7
Handle faves click
var favUrl = favRecipe.val().url; var favTitle = favRecipe.val().title; var favKey = favRecipe.key; $("#favs").append(`<div class="chip"><a href="${favUrl}" target="new">${favTitle}</a><i class="close material-icons" data-key='${favKey}'>close</i></div>`); }
0
c6310b058cf3bf61788df4cfdf38d25d
16df292129f27c5454bf23215b644ee3
# Получить список вип карт
{ $filter_data = $request->all(); $cards = $this->cardService->getCardsList($filter_data); return response()->json( ['cards' => $cards], 200, $this->header, JSON_UNESCAPED_UNICODE); }
0
08c102ff2c9ac45fb96883bcab163f1d
ff65f17f854bdc192835777690dbefb0
When logging, inserts missing details into User object from database, because user submits only email and password in form. Creates new session aswell.
class UserRegistration(CreateView): def form_valid(self, form): response = super(UserRegistration, self).form_valid(form) username = form.cleaned_data['username'] password = form.cleaned_data['password1'] self.auth_login(self.request, username, password) return response
0
e7f9b0f69fb47a6500a6a7487a4fabf4
86ff55843f45c9f1fcea89119e6ec881
compute LJ potential in order to monitor total energy potential
def lj_energy(r): return 4 * ((1 / r)**12 - (1 / r)**6)
1
dd912409fae10a94a8c33219000effb1
fc9749d32e68388a46835f3504da54dc
initialize the score board with certain length
Scores::Scores() { numOfScores = 0; for(size_t i = 0; i < scores.size(); i++) { scores[i] = 0; } }
0
400f8c55873977f438be524308a6bd9d
47034ecba8479969bd237bca5a473656
Create Cart Product From slug.
{ $row = Product::where('slug', $slug)->where('owner', 'for_seller')->where('user_id', auth()->user()->id)->first(); if ($row) { \Storage::delete($row->logo); \DB::table('cart_items')->where('buyable_id', $row->id)->delete(); $row->delete(); \Alert::su...
0
bc762c350132e074bf8ff7893d8fa4fe
b4665a22c8de09a2568c88e812736002
EmpresasController constructor.
class EmpresasController extends Controller public function __construct() { $this->middleware('auth'); }
1
a51d1255968c74224276a4d9cc22d6d6
5e764ae487e588f53cb9adb5dc6e78c8
Get SOAP request from file handle
class AmazonAPI private function sxmlRequest($request) { return @simplexml_load_file($request); }
0
49bf04fcc972c2eb7ede766301b7d6b8
f056bb4a82b2eb726b623d63a27d71fc
Calculate the Turner Angle and the Stability Ratio.
tss = 12 + (12 / math.pi) * math.acos(-self.__a / self.__b) tsr = 24 - tss return tsr, tss
1
43f79f85b936a4913ba87a4f556aa549
a11919b81500ab580c5bba77fa911f16
OnSubscribe subscribes the user to an artist.
self, broadcaster_id: str, user_id: str ) -> UserSubscriptionMock: raise TwitchAPIException()
0
944dcdc2eacfb9e0fa5aba88bca179a1
61dcca533420d034182405c75756e94d
Método para obter os produtos da NFe
class NotaFiscalBuilder public function nfe() { $this->nfeType = 'produto'; return $this; }
0
49cf3b2fb0c95ccdfddf836f8004ff51
f2c7942a9019b1040d63b5a6d270594f
Applies regret matching to get a policy.
mu = policy.get_parameters() s = self.__sampler.normal(0, 1, (self.__population_size, len(mu))) z = mu + self.__sigma * s fitness, steps = estimate_fitness(policy, env, z, n_roll_outs) s_sorted = s[np.argsort(fitness, kind="mergesort")[::-1]] mu += self.__sigma * (self.__...
0
0b944807fc1771fd9f9d86fbb830e3c4
feae66ecc60d1d0ff222e81bfbce3f42
normal behaviour if no SelectCommand
namespace EclipsePOS.WPF.SystemManager.ReportsAndEnquiries.Views.ItemLabels public class ItemLabelsPresenter public bool OnSelectCommandCanExecute(object obj) { return true; }
0
6582989a857e1c5e2363ef60dd2dcb91
a93f9dffa7bc106adfefd166d1f90dcf
pybricks.iodevices.PUPDevice.read
self.assert_tinker_signature() value = self.call( 'digitalread', pin_name ) if( value[0] == False ): raise TinkerError( 'Core is not connected!' ) return value[1]
0
f9f9df4449590a2069b227656635cfb6
635ceaa5968834ba314407111dfc6b71
현재 휴지통에 있는 파일 및 폴더들에 대한 정보를 가진 목록을 반환한다. :URL: https://api.server.com/api/1/trash/ :Version: 1 :Method: GET
YfyItemType::validate($type); $request = YfyRequestBuilder::factory() ->withEndpoint(YfyAppInfo::$apiHost . self::TRASH_LIST_URI) ->withMethod('GET') ->addQueryParam('page_id', $pageId) ->addQueryParam('page_capacity', $pageCapacity) ->addQuery...
1
2db32301b7af87aa9ac34bfb10325b35
bf8b34076bbd5472f1c8ea38a407733e
Count the number of non-zero values.
public class Vec extends Keyed<Vec> public long nzCnt() { return rollupStats()._nzCnt; }
1
a89407500411421abffac2678832419d
a230d1b63595eb07c96d8f8a27077535
Create a gridplot with all the batteries and houses that are connected
def create_grid(): return transformer.create_grid()
0
c8aa0e002f4e04742fcda24eebce9f14
86f2d2f2bf8f21f1c99db28797409b54
NAME avcrpMsgHandleLibMessage DESCRIPTION Handles initial AVRCP library messages before an instance of the remote device has been created at the application level. Once a device instance has been created the AVRCP library messages are handled by the avrcpMsgHandleInstanceMessage handler.
void handle_rc_metamsg_cmd (tBTA_AV_META_MSG *pmeta_msg) { UINT8 scratch_buf[512] = {0}; tAVRC_COMMAND avrc_command = {0}; tAVRC_STS status; BTIF_TRACE_EVENT("+ %s", __FUNCTION__); if (pmeta_msg->p_msg->hdr.opcode != AVRC_OP_VENDOR) { BTIF_TRACE_WARNING("Invalid opcode: %x...
0
76213d04a844ed58a8d6a417163b6a4d
2860623bf266068d8f1c7c68f96646ea
Elementwise multiply operation.
def mul(x, y): return _elwise(x, y, mode=Elemwise.Mode.MUL)
1
003a79ea9ea31e507d240abffd79aae5
9a1e8228598d5a13827c9adc92189eeb
Returns a unit normal to this vector (rotated +90deg)
impl Vector2 pub fn normal_vector(&self) -> Vector2 { let vec = self.normalize(); Vector2 { x: -vec.y, y: vec.x, } }
1
6b3779f1e1ad63ed8a8e5ea2fbfc291b
7ebb021b53e072a8dd15b5f232762ee7
@brief Returns the number of errors that have occurred in the ongoing transaction.
int tfe_GetNumberOfErrors() { EngineDebugOutput("tfe_GetNumberOfErrors", INTERFACE, 0); return g_pNavigation->GetNumberOfErrors(); }
1
d21412adb199227e0405c374157474d6
8cfea4cbdf1a023a82617956556df89b
tests to see if the correct output is given with the cell names being added and one of them is a string
namespace SpreadsheetTests [TestClass] public class SpreadsheetTests [TestMethod] public void validCellNames() { AbstractSpreadsheet sheet = new Spreadsheet(); sheet.SetContentsOfCell("A1", "33.0"); sheet.SetContentsOfCell("b1", "Hello World!"); s...
1
6c7f0f3414d1530524f8de2b08e765ee
2ec1625a8b9ec61222569ef63b1e9456
取得 资产二级分类
function getSecondClass(data) { return request({ url: '/v1/api/goods/secondClass', method: 'post', data }) }
1
57951be33013fd205d2e7f07bc9eec27
19e9c0e64e3491b3d08e99f17218beea
Writes an new empty file to the "files" folder
def createFile():
0
6220b5a180192aea3458a4dfc347ec8a
b28ad42df47c7f2459cde70cab977a26
Pinta en pantalla todos los elementos del vector de tortugas
for enemigo in listaEnemigos: ventana.blit(enemigo.image, enemigo.rect) for balas in listaBalas: ventana.blit(balas.image, balas.rect) for tesoro in listaTesoros: ventana.blit(tesoro.image, tesoro.rect) for vida in listaVidas: ventana.blit(imgCorazon,(10 + 50*vida,10))
0
1ad09b4313b1e12e0dd93a6481e62020
cf854c1583d70b84479af8b524611745
Remove all spaces and hyphens from the string.
class PerchTemplateFilter_space extends PerchTemplateFilter public function filterAfterProcessing($value, $valueIsMarkup = false) { if ($this->Tag->type == 'text') { $string = str_replace(' ', '-', $value); return preg_replace('/[^A-Za-z0-9\-]/', '', $string); } }
0
d75daf20de17f16de5c1fd05d84a573b
cf6e26482d0c5aa6441cd20943a8e411
@brief Enable template feature
{ u32 ReadVal; Xil_AssertVoid(InstancePtr != NULL); Xil_AssertVoid(InstancePtr->IsReady == XIL_COMPONENT_IS_READY); Xil_AssertVoid(XDp_GetCoreType(InstancePtr) == XDP_RX); ReadVal = XDp_ReadReg(InstancePtr->Config.BaseAddr, XDP_RX_DTG_ENABLE); XDp_WriteReg(InstancePtr->Config.BaseAddr, XDP_RX_DTG_ENABLE, R...
1
15dfc6c26c6c5363d6e8b3981d968040
39d3200fce36f7591fed613e2b8dd005
Функция для вывода даты и времени
{ setoutcolor(3); setpos(pos_X, pos_Y); system("time /t"); setpos(pos_X, pos_Y+2); system("date /t"); }
1
5ce86a9fb2326f31d9154a01dafd7b85
3fc815c1f8e97dbc7a0de90ac921f882
=========================================================================== FUNCTION DESCRIPTION Stores a specified BT event on the BT SIO BT event queue. ===========================================================================
{ OEMBTSPP* pMe = OEMBTSPP_FindMe( line_error_ptr->stream_id ); if ( pMe != NULL ) { bt_ev_msg_type bt_ev; bt_ev.ev_hdr.ev_type = BT_EV_SPP_LINE_ERROR; bt_ev.ev_hdr.bt_app_id = pMe->appId; bt_ev.ev_msg.ev_spp_line_error.line_error = *line_error_ptr; OEMBTSPP_store_bt_event( &bt_ev...
1
96fb6a19bc3a5d9d70c46e1686719682
b31661dedbb91b4dbc4dc3b8e079c3ed
得到不含前面系统地址的文本
public class HtmlParserTest public void getPureTextOfSite(String src) { StringBean textBean = new StringBean(); textBean.setURL(src); String pureText = textBean.getStrings(); System.out.println(pureText); }
0
7b7715388599179e0c6d97a22e0914e6
bed622fdf996d1652eef32a741240855
Gets the ID key pointing to the process_data which will be read
class process_transform_base: def read_data(self): self.idata = self.idata_file
0
acc92d69ce68eec09d579d8ed80bab29
be4139e5cc32fda2518bc9033d80234e
Write a 32-bit unsigned hex number to PmodOLEDrgb in Hex Writes 32-bit unsigned number to the pmodOLEDrgb display starting at the current cursor position. No size checking is done to make sure the string will fit into a single line, or the entire display, for that matter. Watch your string sizes.
u32 right_dp; right_dp = userio_read_hexdisp_right( USERIO_BASEADDR ) & W3_USERIO_HEXDISP_DP; if ( val < 10 ) { userio_write_control( USERIO_BASEADDR, ( userio_read_control( USERIO_BASEADDR ) & ( ~( W3_USERIO_HEXDISP_L_MAPMODE ) ) ) ); userio_write_hexdisp_left(USERIO_BASEADDR, 0x00); userio_write_control(U...
0
d54e34db251c1c6353be4ad59a5e1451
9c510bf2764a068055d82d52a3e3945a
Check to see if Ps property is set
public class UnknownFunc extends FuncStmt implements Cloneable public boolean hasP() { return getPList().getNumChild() != 0; }
1
66d844f9ae5304c2d006dff1ba15056c
27c0707f1e7044cbead96817dc328297
Calculates a point in 2D space that resembles a point on a linear 2D Bezier curve.
namespace CoinDozer public abstract class BezierBase<VectorType> public static Vector2 Curve(Vector2 startPos, Vector2 controlPos, Vector2 endPos, float t) { return new Vector2( Curve(startPos.x, controlPos.x, endPos.x, t), Curve(startPos.y, contro...
1
387370a560aaf5bef2b1419f093e2ca3
b848292642abb599ea706348c7b936d6
Macht die Linienvorschau nicht sichtbar und zeichnet LEDs in regelmäßigen Abständen entlang der Linie
{ int last = numberOfLeds - 1; bool forward = true; int index = 0; for (int loop = 0; loop < numberOfTraverses * apa102.NumberOfLeds * 2; loop++) { if (last != 9999) { apa102.SetLed(last, Color.Black); } apa102.SetLed(in...
0
eb2f7f9d3ac56cdc7a3badaf0616723c
dfadab6d7e9ed31000af610af959bf2d
returns the missiles that are in play
{ $missilesAyantTouche = []; $missilesCibles = MissileCible::all(); foreach ($missilesCibles as $missileCible) { if ($missileCible->missile()->get()->first()->resultat_id > 0) { $missilesAyantTouche[] = $missileCible->missile()->get()->first(); } ...
0
203cb77f7844aa3b9f5729f7dd845c5f
a87372540cd44e3866654077f98c9afa
This must be called at the end of any test where [.registerConsoleForTest] is called.
logging.logger:register_stream(logging.console_log_stream) logging.logger:register_stream(logging.file_log_stream) logging.file_log_stream.file_prefix = "picoboots_demo" logging.file_log_stream:clear() app.initial_gamestate = ':main_menu' init_game_and_start_next_itest() end
0
88239055daf57456cb2954edbcf0c492
78d1ce63590b371f0177939471292ca9
Insert 1 on the diagonal for each dof
class Poisson1DPeriodic(ProblemBase): def __get_system_matrix(ndofs): data = np.array([[2] * ndofs, [-1] * ndofs, [-1] * ndofs]) diags = np.array([0, -1, 1]) return sp.spdiags(data, diags, ndofs, ndofs, format='csc')
0
416a8f4f27bb8b266b7ac5296f029b3b
4fd7d3363c29ce0406e0bb7c54b228e0
Takes in the multiclass shap values calculated for the corresponding X training data of a classifier and the target label of interest.
import pandas as pd import shap import matplotlib.pyplot as plt fig_filepath = 'Figures/' shap.initjs() label_dict = {0: 'Early', 1: 'Election Day', 2: 'No Vote'} print('\n') print('******************** {} Class ********************'.format( la...
1
11fc9e8a058101b74266c866ce477650
a00b9b4438b12b97863665e001c8cafc
Set the given importer as standard importer.
{ $this->importerName = $importerName; $this->addButtonFromView( 'top', 'import', 'import', 'end' ); }
0
17a8ad043d4fa3a9deebfcbfa273b891
2ab70a653d1696403017a1be5924ccb5
获取指定日期时间对应的日期值
namespace System public static class SrkDateTimeExtensions public static DateTime GetDate(this DateTime value) { return new DateTime(value.Year, value.Month, value.Day, 0, 0, 0, 0, value.Kind); }
1
95e9e3e52a8af2c70a1a0f0aa28c3612
0260e19c2f500845615897a8790ce6c4
Outputs DD-MMM-YYYY
public class WWWDATE extends mClass public Object IntToDMY(Object ... _p) { mVar pdteValue = m$.newVarRef("pdteValue",(((_p!=null)&&(_p.length>=1))?_p[0]:null)); mVar strDMYDate = m$.var("strDMYDate"); m$.newVar(strDMYDate); if (mOp.Not(m$.Fnc.$get(pdteValue))) { pdteValue.set(mOp.Positive(m$.Fnc....
0
2e333488d1e42b8af300b4b4cdc3de0b
fa2483ae4b281da9675f60c5ba5949f0
Adds the comment to adhoc task.
public void completeAdhocTask(String taskId);
0
152f7df9114c711316c4352c48d154ff
1da3c5a2c10af29ea627a73c51214dac
Renvoit la liste des filtres par populations avec le nombre d'utilisateurs associés
$dql = 'SELECT f, COUNT(loc) AS nbLoc FROM Entities\Film f JOIN f.listeMedia m JOIN m.listeLocation loc GROUP BY f ORDER BY nbLoc DESC, f.nom ASC' ; return $this->_em->createQuery($dql) ->setMaxResu...
0
d7a68c5cacace4adee26b98351dc763c
efb47d4ff6635c0315f5bc3fa3290108
Retrievies a list of Individual Context Entities that are members of the specified community Entity.
class Google_Service_Orkut_CommunityMembers_Resource extends Google_Service_Resource public function listCommunityMembers($communityId, $optParams = array()) { $params = array('communityId' => $communityId); $params = array_merge($params, $optParams); return $this->call('list', array($params), "Google_Ser...
1
a85fa11fb51f993a6a5246639ced3422
ce7e1c6734c7b7bc650309cb8db335ff
функция для инициализации объектов графического интерфейса в дочернем окне
class CSVreader(): def init_gui(self): file_choose = Frame(self.root, relief = 'raised', bd=2) file_choose.pack(fill = X) self.statuslabel = Label(file_choose, text="Выберите файл со списком товаров") self.loadbutton = Button(file_choose, ...
1
d70358ccdae38f49b4fafec2c4376b8f
4a4278b391bf9a85b966435b374746ed
Rebuilds a request URL (from PEP 333). You may want to chose to use the environment variables server_name and server_port instead of http_host in some case. The parameter use_server_name allows you to chose.
url = environ.get('PATH_INFO', '') if not url.startswith(('http://', 'https://')): url = '%s://%s%s' % ( environ['wsgi.url_scheme'], environ['HTTP_HOST'], url ) if '%3B' in url: url, arg = url.split('%3B', 1) url = ';'.join([url, arg.replac...
1
c9de0f58659279f0b0572771bffd6cd4
ee11d4f0f8537539e40dd84dcc6440cf
设置群组在线成员数
params: GetOnlineMemberCountParams ): Promise<commonResponse> { const { groupId, data } = params; const userData = this.stringFormator(data); return new Promise((resolve, reject) => { const now = `${Date.now()}${randomString()}`; const successCallback: CommonC...
0
a082b2840446418b16744b2166c92080
6bed37a6e5336a77d163b48a02942196
Lazy function to read a file piece by piece. Default chunk size: 4kB.
def read_in_chunks(file_object, chunk_size=1024 * 1024 * 10): while True: data = file_object.read(chunk_size) if not data: break yield data
0
f391a7064e64b210d112f9c344156e68
7e5dec8e127b6440fc960cdd616974a6
on recupere l'url d'une marque
if (intval($marque_id) > 0) { $query = $this->db->get_where('marques', ['marque_id' => $marque_id]); $data = $query->result_array(); if (count($data) > 0) { return new EMarque($data[0]); } } return NULL; }
0
ddc23538aebaeb73a8179395cee0ad75
b50208c3c900d142767480ca5ba046e6
Restarts all faulted TCP connections
void tcpCleanup() { while(tcp_tw_pcbs!=NULL) tcp_abort(tcp_tw_pcbs); }
0
5bd7ba2d8c7c10cae0692662b0182344
20f2eae4a8df9d440bad4a8b999c7273
根据mac获取轨迹
Map<String, String> map = new HashMap<String, String>(); map.put("start", String.valueOf(start)); map.put("limit", String.valueOf(limit)); String formatQueryMac = MacUtils.formatQueryMac(cmMac); map.put("cmMac", formatQueryMac); List<Location> locations = mSearchService.q...
1
58f7426276cd20f1b5ac253f9188aff6
efaa39cc1a6d286f7df8dfecb5576295
设置提示完成后的跳转链接
public class MainHintDialog extends Dialog public void setJumpUrl(String mJumpUrl) { this.mJumpUrl = mJumpUrl; }
1
c0242a716bd1f5627a525045c2511cbf
18c050c5e9aece86ec5e6283fc5e729e
添加所有端口规则
{ ArrayList items = Main.mainData; for (int i = 0, len = items.Count; i < len; i++) { addHostRule(items[i] as HostModel); } }
0
aea8aadafec98007079b42b15be28eaa
9c250ecca96d91e83a529c699a0c564b
获取指定用户的指定文章的文本
List<TextBody> getTextBodyByUser(Long userId);
0
7b9b97e830c5d027cde21fdcdff0dd1f
b1ccdd39304b6911ff973c8342f12b8a
write a function that takes a 2-D array and returns a string that lists all the numbers out in left-to-right, top-to-bottom order
string_arr = [] src.length.times do |x| src[x].length.times do |y| if src[x][y].class == String string_arr.push(src[x][y]) end end end string_arr.join(" ") end
0
74c726172e2e990099590166c206f70f
044acc1509dd9f0d550cc8d69ac53500
convert a hex string such as "A489B1" into an array like [0xA4, 0x89, 0xB1].
var result = []; for (var i = 0; i < hexString.length; i += 2) { result.push(parseInt(hexString.substr(i, 2), 16)); } return result; }
1
5b7286630c2523d0bc57847c70b7cb25
c21768d1f127a0755cf676fbc76030e0
Construct keypoint mask from stem positions. Will put a disk with the keypoint_radius at each stem position.
class Organ(): def get_mask_re(self,ksize=None): if ksize==None: ksize=self.ksize landmark_re=self.landmark.copy() landmark_re[:,1]-=np.max([self.top-self.move,0]) landmark_re[:,0]-=np.max([self.left-self.move,0]) mask = np.zeros(self.patch_bgr.shape[:2], dtype=np.flo...
0
d3d200337b7c6ecb0367b78f5e2489d8
7aaf111ec452c42e9d7a0f37f2aff934
返回BankMst更新日付
public class ShopListingDeleteCommitInServiceBean public String getShopKanriUpdDt() { return shopKanriUpdDt; }
0
adc1bbb53262663433578a96bbb3cc8a
774fcf3fd08e54370d4360ed58ef0450
Returns a list of all events in the specified channel.
return listByPartnerNamespaceSinglePageAsync(resourceGroupName, partnerNamespaceName) .concatMap(new Func1<ServiceResponse<Page<EventChannelInner>>, Observable<ServiceResponse<Page<EventChannelInner>>>>() { @Override public Observable<ServiceResponse<Page<EventChannel...
0
c309715fa436e480bd8d535bc5d3b929
2fd46d812c069d322dcd628f0ff02528
bean声明周期管理
@Table(name = "apartment_mark_template") public class ApartmentMarkTemplate extends BaseEntity<ApartmentMarkTemplate> public void setCycle(Byte cycle) { this.cycle = cycle; }
0
c0f3322f756cc1250fce063e553be38e
3a906cbcd115648f3fb4829eb5f23d1c
Gets the raw identity instance contained within the current entity, favour the extension method 'GetIdentity' instead.
where TSubclass : Entity { return GetRawInstance() as TSubclass; }
0
8bcf13f7ef7faddcd3b12ae4877184de
20a2b4ab69680072cc96202b3ddc47f7
The maximum count of multi-sorted columns to indicate.
class Window_DominationSkills def col_max 1 end
0
3dfc70444ad92b9163fdb618a1a56122
f448eb03b34fadc2257aa0fa8dbcc6d8
calculates the "canonical" (/minimal) tuple of features required to unambiguosly identify a gardenlinux flavour. The result is returned as a (ASCII-upper-case-sorted) tuple of `FeatureDescriptor`, including the platform (which is always the first element). The minimal featureset is determined by removing all transitive...
def canonicalised_features(platform: Platform, modifiers) -> typing.Tuple[FeatureDescriptor]: platform = feature_by_name(platform) minimal_modifiers = set((feature_by_name(m) for m in modifiers)) minimal_modifiers -= set((platform.included_features(), *modifiers)) for modifier in (feature_by_name(m) for...
1