query_id
string
corpus_id
string
query
string
code
string
label
int64
e20a645ebcc44db11a21c0498a9b8d81
65a66c9cbd06959b0101c9b2045125bc
Lock file checker.
if( empty(self::$_resource[self::$_id]['config']['lock_time']) ){ self::$_resource[self::$_id]['config']['lock_time'] = 0; } $lock_contents = array(); $lock_contents = self::_file_unserialize($path_file); if( (isset($lock_contents['key']) && !isset(self::$_resource[self::$_id]['lock']) ) || (isset($loc...
1
ad8b07be008fe3288d961b5471d5613d
664b0277fe4ecc1a089fc2505202cffa
Trains various parameters associated with this neuron and associated source synapses.
namespace Meridian.Neuro void Propagate();
0
463850ef2c15a328b0561c92a6a4faee
62b0d546eb0fe106e77b76adc1a19fce
Envoi une notification d'attente de questionnaire
class Notifications extends \mainClass{ static function wait_survey($id_student){ if(!($id_user = PDOQueries::get_TE_ID_of_student($id_student)) > 0) throw new \PersonalizeException(2001); $marker = '{wait_survey}'; $link = 'index.php?'.Navigation::$navigation_marker.'='.Answer::$sur...
1
d33da461e2fa39477c74379f1ccb57c7
0f39837b98fe18301f8157ff22543325
Selects a venue according to the id, which the user inputs, and checks whether it is a valid id
class Frontend extends Model protected function getVenueByID($id){ if(isset($id)){ $sql="SELECT * FROM ".$this->table_venues." WHERE venue_id = '".$id."' LIMIT 1"; $result= DB::select($sql); if(!empty($result)){ return $result[0]; }else{ ...
1
cc1f38ffd3bad7f15e84c56c641bfd7f
3938e8ca262b0662b751440a498ec52e
Approximation of DTCM usage.
class AbstractSynapseType(object): def get_dtcm_usage_per_neuron_in_bytes(self): return self.get_n_synapse_type_parameters() * 4
1
70993d1dac5161a77ad3de9b5fe98b8a
be23d82a1bc5bb768feae76a4c0a2481
获取当前摄像机在Config表中的值
public class FragmentTradition extends Fragment implements AdapterView.OnItemSelectedListener private String getcamID(){ String str = "1"; switch (sp_cam_choose.getSelectedItemPosition()){ case 0: str = "1"; break; case 1: str = "2"...
0
5632e45134da2df0771ad6ae33471a99
d1e0fdea45fe22d3203f830536d20dba
Processes the Clash detection form. PARAMETERS INPUT : none. OUTPUT : none. RETURNS : none SIDE EFFECTS : none WARNINGS : none
{ int i; int j; int detect; cave_type *c_ptr; treasure_type *t_ptr; detect = FALSE; for(i = panel_row_min; i <= panel_row_max; ++i) { for(j = panel_col_min; j <= panel_col_max; ++j) { c_ptr = &cave[i][j]; if(c_ptr->tptr != 0) { if(t_list[c_ptr->tptr].tval == 101) { change_...
0
af1f85eb45504da44fc6e4558f636b56
5e6047417e5a7cb701e6979a4a6ec578
设置资源顺序
$menuids = explode(",", $_REQUEST['menuid']); $sorts = explode(",",$_REQUEST['sort']); $count = count($menuids); $sql = "UPDATE zxt_hotel_chg_resource SET sort = CASE id"; for ($i=0; $i < $count ; $i++) { $sql .= sprintf(" WHEN %d THEN '%s'",$menuids[$i],$sorts[$i]);...
1
16b57759123b9707138e3ac5e2cf56d4
f493ba5efd89fa05b63ecd8140494a53
Sets the backdrop offset to the current screen.
namespace Vortex.Gui void PushOffset();
0
e27c05aae5678d3aadf2585669bcdb7a
0cddd2b06fcaf63a58550b91c38a4c4f
Returns the last customer billing in the ordered set where CustomerID = &#63;.
public com.gallery.corporate.records.model.BillingInformation findBybillingInformationByCustomerId_Last( int customerId, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.gallery.corporate.records.NoSuchBillingInformationException, com.liferay.portal.kernel.exception.SystemExceptio...
1
6c7917ccf7ab0b907a787a1d3b244958
668eb70b46e653a21e7bdf7ba17f3ff6
Force réaffichage après distribution
function rotate(){ $('#maitre1').css({'transform':'rotateY(180deg)','transition-delay':'1s'}); $('#maitre2').css({'transform':'rotateY(180deg)','transition-delay':'1.1s'}); $('#maitre3').css({'transform':'rotateY(180deg)','transition-delay':'1.2s'}); $('#maitre4').css({'transform':'rotat...
0
f14f64c919434d2aefed15dd3d4d5e88
1bde31fea9191d7173982ef051119195
Kill local adb server
{ int status = -1; try { String command = "kill-server"; ProcessStartInfo psi = new ProcessStartInfo(AdbOsLocation, command); psi.CreateNoWindow = true; psi.WindowStyle = ProcessWindowStyle.Hidden; ...
1
41203d3ee0e2092d68881709b43ca8a0
0cef8b227f4511f2d447736aed10fa99
Basic reverse
def rev(s): return s[::-1]
1
19a64ee581dd9a5c662e2d1b14fedbc0
52b33b08defffed7ae07f96fd3e51a7d
Clear defualt text when the text box is clicked
{ if (_tweetTxt.Text.Equals(DEFAULT_TWEET)) { _tweetTxt.Text = ""; } ResetTimer(); }
1
cd3aea573aa85598b04a5dbd25b41b41
7a66312802921cda38298b6bb9223aad
Fetches binary data over a stream.
class MultipartBody implements HttpBody public function stream(Context $context): Promise { return $this->message->stream($context); }
0
84d27ba0aab1fb6d6c02ed0f95b65478
81b224ac8fc457c75b3eec43ae72583e
Method for upgrading fire rate from upgrade shop. fire rate value is DECREASED, increasing the overall speed of the bullets being fired, each time method is called.
class Ship(Sprite): def upgrade_bullet(self): self.settings.bullet_damage *= 1.1
0
48a02a683aea373b69f5d7025346d864
1cb41bb2ffe29f2c471116a1e950e090
Finds the last race entry and the results with finishing position as method parameter.
def p_final(row): race = race_results[race_results.race_id == row.race_id] last_place = race.p_prelim.max() avg_retire = np.round(race[race.position.isin(["ab", "nc"])].p_prelim.mean()) if (row.position == "dsq") or (row.position == "f") or (row.position == "np"): return last_place else: ...
0
d97188353daa4375e695795591607399
7afdb5c5f525535dcb1339d3d082e9a8
Provides a sinusoidal easing out function. Value starts rapidly at t=0 and decelerates to a minimum value at t=1.
export class Ease static sineOut(t, b, c, d) { return c * Math.sin(t / d * Ease.HALF_PI) + b; }
1
05090271b9c357f7d9ceaeaf32024352
b2604e47679143f4915530d7c8cbf60a
Add a dependency to this node. Also get the properties from the dependency.
public class DependencyTree public DependencyTree addDependency(String type, String node) { return addDependency(type, DependencyNode.create(node)); }
0
797b8fd9885a5413c1336fbd95a1c405
4783a9f4bd978734740c73316fadd598
Verifies that all required properties are set before calling the build_url method
class Connection: def _check_required_url_properties(self): if not self.host: raise MissingProperty('host') if not self.command_path: raise MissingProperty('command_path')
1
4f445278fa302e7a8ac0d795505efc99
1c936a3a35f20272b0d7cc809790f3c9
滚动缩放
if(krl.Mousemove==0)and(krl.Mousescale==0)and(krl.Mousescroll==0) then if(krl:SystemClickDown("R",0,0,_WIDTH(),_HEIGHT())==1) then krl:Interchange() for i=krl.List,1,-1 do if(krl.layer[i]==1)and(krl.call[i]==1)and(krl.hidden[i]==1) then local bx,by = krl.base[i],krl.base[-i] local rx,ry = ...
1
1bbe488ec169fb729d30b81b32b0bbef
817318096bbe991bec25ff24fb0e4d4a
Returns the value of the '<em><b>Datetime Performed</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Datetime Performed</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
EAttribute getPartyNeed_DatetimeRecorded();
0
3057199f98ba6aaec7cc86632f32af3e
7f61448ad6da3ef0f9cb03f40c5be655
a=-a
cases like (1)
0
af362a488f347b3e684b517da887ff47
cb4376b7d57db9a0904d3dc8ecaa22be
Clears the default header token.
namespace SigningToday.Api public partial class TokensApi : ITokensApi [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] public IDictionary<String, String> DefaultHeader() { return new ReadOnlyDictionary<string, string>(this.Configuration.DefaultH...
0
5d130929a9bfdbef586489c335dce786
68727460d6a33e3b531066e8b1100dfc
自动添加售后
private RequestResult addAftersale(@PathVariable String orderId, @RequestBody AftersaleApply aftersaleApply) { aftersaleApply.setCustomOrderId(orderId); aftersaleApply.setCreated(DateUtil.getSystemDate()); aftersaleApply.setCreator(WebUtils.getCurrUserI...
1
bb677bcf83918fc0763bf9d42ff1340d
30fbf372e3bc2b39d6c2196eb79f043b
Updates the changeable properties of a hedera network account.
public Mono<Response<Flux<ByteBuffer>>> updateWithResponseAsync( String resourceGroupName, String accountName, DatabaseAccountUpdateParameters updateParameters) { if (this.client.getEndpoint() == null) { return Mono .error( new IllegalArgumentException...
0
599bc63cee8cdd6697539ba0ba329b64
bda88596f6180ee8eca0066378a6ce50
this function is used to change the value of the tip per person and the total per person as the value is entered in the Bill textBox
double tipAmount = Double.parseDouble(tipAmountET.getText().toString()); double finalBill = billBeforeTip + (billBeforeTip * tipAmount); billAfterTipET.setText(String.format("%.02f", finalBill)); tipTotalET.setText(String.format("%.02f", (billBeforeTip * tipAmount))); }
0
2d2afe22f6b9a1f9b782c7fe11dd959d
40286f0cfdaa4ccd4b6c9f35b9e3a1cc
Validates the Referral address entered into the dialog and prompts the user if the address is invalid. If the address is valid, _referralUri is updated.
{ try { if (AnchorSupport.IsNativeEnabled) { await Task.Delay(TimeSpan.FromSeconds(10)); await TrySetDefaultAddress(allowPrompt: false); } taskSource.TrySetResult(true); } ...
0
8344a7a35be5237bbc7f5113922114a9
6542ced4b9aa8630c97fbba20bd6fc2a
选择行返回id,可以为0
return $.map($("#table").bootstrapTable('getSelections'), function (row) { if (type == 0) { return row.ID; } else if (type == 1) { return row.SUB_ID; } }); }
1
8013ceee4503b962f23769375b320964
72f264f1826052ae9da723a1dbbe5cb4
Sort Function Sorts Clients Alphabetically
function sortClientsByFullname(clients, ascending) { if (ascending) { return clients.sort(function (a, b) { return a.surname.trim().toLowerCase() + a.name.trim().toLowerCase() + a.lastName.trim().toLowerCase() < b.surname.trim().toLowerCase() + b.name.trim().toLowerCase() + b.lastName.trim().toLowerCa...
1
2613491e6f2857b853f94056619b2dd3
6c078ac71389da6ff2cdb944525e3101
# Categorical variable generation (e.g. infection status)
create_groupVariable <- function(dat, APC_var, groups_list) { group_var <- NULL dat <- dat %>% dplyr::rename(var = APC_var) if (is.null(names(groups_list))) { names(groups_list) <- sapply(groups_list, function(x) { paste(x, collapse = " - ") }) } dat$group_var <- "not categorized" for (i in 1:length(gro...
1
9ddb08ad041d305bcd0962368b0d2d56
8831366fc228deaaaa7df0ceadc0645b
Extracts a tar.xz archive to a temp dir
def extract_temp_to_bin(source, item, mode='x', sz_args=[]): source = r'{}\{}'.format(global_vars['TmpDir'], source) dest = r'{}\{}'.format(global_vars['BinDir'], item) extract_generic(source, dest, mode, sz_args)
0
294821e32d0be8803a53e711428df64f
646ca4cab5c2746a7b3334c397cae1a4
退出登录是否成功 根据登录页面的logo标识判断
class PageLogin(Base): # 点击登录链接 def page_if_quit_success(self): return self.base_element_is_exit(page.login_links)
0
fc613593e2f4397f388ecef7035bcb90
093afa11c66565acfb5687ec2a3e434a
设置session,cookies,更新登录IP,登录时间
{ $this->token = $token ? cookie('token') : $this->buildToken($array); cookie('uid',$array['id'],$this->keeptime); cookie('token',$this->token,$this->keeptime); cookie('nickname',$array['nickname'] ?? $array['name'],$this->keeptime); $this->setactiveState(is_object($array) ? ...
0
a293c9304e4433f675c43c465fefde93
298d3edf317268d4e10397d99837b5a9
Stops tracking statistics between layers without changing the current norm
class CustomModel(nn.Module): def freeze_running_stats(self): if None in [self.batchnorms, self.momentums]: self.batchnorms, self.momentums = self.extract_norm_n_momentum() for module in self.batchnorms: module.momentum = 0
1
9f08e6f65684d6cb01e4186a43ed6753
6796a6eba8adf8a2d5da25e3ae743166
Funcion encargada de limpiar los controles de la vista y obtener un nuevo folio.
{ Folio_Credencial.Text = string.Empty; Folio_Credencial.IsEnabled = true; Nombre_Usuario.Text = string.Empty; Nombre_Usuario.IsReadOnly = true; Clave_Libro.Text = string.Empty; Clave_Libro.IsReadOnly = true; RefrescarPrestamos(...
1
de0ea848b175898c83c276b8c21e09dd
1153e8fc27605dcdaa14f7781a2b8f70
Defragments the item section of the lookup table, which gets fragmented after removing keys or updating values.
std::unique_lock<fastlock> ul(g_expireLock); sds keysds = (sds)dictGetKey(de); robj *newob, *ob; unsigned char *newzl; long defragged = 0; sds newsds; ob = (robj*)dictGetVal(de); newsds = activeDefragSds(keysds); if (newsds) { defragged++, de->key = newsds; if (!d...
1
664aa50092dae71f2c0cd26ed63b3e28
cff4ae44896e545c96e53c2be08a0319
Attempt a move, and return the energy change in doing so.
unsigned char originalCheckers[8]; unsigned char originalColors[8]; unsigned char originalKings[8]; int i; if (attemptOnly) { for (i = 0; i < 8; i++) { originalCheckers[i] = checkers[i]; originalColors[i] = colors[i]; originalKings[i] = kings[i]; } } if (!squareIsValid(move.row, move.col)) { #ifndef...
1
8cefbb45653dbffd4619a1aca0f17b15
cfbba22c9e2fb1fe73135eaf27172ddb
The credential param, if one exists
class Auth extends AuthManager implements AuthInterface public function getCredential() { return !empty($this->credential) ? $this->credential : null; }
1
21c731be0438b3ace2febb3fea57fab8
647be3897bf5008754c5d18b261811b3
DeviceInfoインスタンスの設定に従ってレイアウトを更新するメソッド
@EFragment(R.layout.fragment_devicedetail) public class DeviceDetailFragment extends CustomBaseFragment void updateDeviceInfo(String deviceNum, String style, String status, String group) { deviceInfoTV.setSingleLine(false); deviceInfoTV.setText(String.format(getString(R.string.device_intro_info), device...
0
4f64bde205f67cfc48e0fe4920d72e6f
9c02e4c62c5a08e99b06a28c0b4202f0
Datos del cuadro de Honor por grado
data = { 'primaria': {}, 'secundaria': {}, 'preparatoria': {}, 'profesional': {}, 'otro_grado': {}, 'otro_idioma': {} } try: data['primaria']['institucion'] = self.get_cell_value(rowx=45,colx=5) data['primaria']['ciudad'] = self.get_cell_value(rowx=45,colx=19) data['primaria']['a...
1
f792a8b7cd6c3c9fd4a31ffa172ea3d5
ab5e6bb6e40f536d47df65423eadf980
Returns product ID for a given link.
class oscToWordpress: def getId(self,link): item = re.split('/',link) return item[-1]
1
acb13bb099db820b72477f4ae8bad220
cc0955940fb8c3fdcf262b94f52de8aa
Converte uma linha em um dicionário.
producao=[] i = linha.find('#') if i != (-1): linha=linha[0:i] i=linha.find('[') j=linha.find(']') producao.append(linha[i+2:j-1]) i = linha.find('>') dir=linha[i+1:len(linha)] i=1 while i != (-1): i = dir.find('[') j = dir.find(']') if i != (-1) and j != (-1): producao.append(dir[i+2:j-1]) ...
0
754428582fc91ca6cb7b98be94b4ca31
0975a94159d29492e802d64d1bf26e5f
returns the function y/(e^x - 1)
def dy_dx(y, x): return y / (np.exp(x) - 1)
1
f5522da94156d0bc12070637ab17215a
632218e7af6bbfa25b80740798c3e93a
Get the interruption status for the channel 2
{ HI_U32 *pu32RegAddr = NULL; U_AUDPATH_INTR_STATE o_audpath_intr_state; pu32RegAddr = (HI_U32*)&(goptx_ctrl_regAllReg->AUDPATH_INTR_STATE.u32); o_audpath_intr_state.u32 = HDMITXRegRead(pu32RegAddr); return o_audpath_intr_state.bits.audpath_intr_state2; }
1
4494fceddcbb1cb2495cb2c6341c7f9b
1bc7906c0de2852633251457e8edfb3c
Change the map for different series ==========
function changeMaps() { debugger; }
0
2881c43b62393f62d694da7c34946ec5
5e7e0a78643af9fddcbca489b98f80dc
Parses a LocalDate object from the provided string and date format
@Necessity(true) public void localDateParse() { LocalDate localDate = LocalDate.parse("2015-06-18"); assertThat(localDate.toString(), is("2015-06-18")); }
1
5a07e6b3315574c10a7997014f2a9913
ec83c21da808edbe5462f49d5aefacda
从队列的头部删除一个节点,如果他是最后一个节点,将rear设置为NULL
struct QNode* temp = q->front; q->front = temp->prev; process returnProcess = temp->pro; free(temp); if (q->front == NULL) q->rear = NULL; else { q->front->next = NULL; } return returnProcess; }
1
098e76bcf1eff2f3fbf612c45aec6ca9
33f68515b72325ee6a1254afde23f9d8
runs prediction on the image while returning the class name and index number
probs = model.predict(np.expand_dims(img, axis=0)) prediction = np.argmax(probs) return prediction, probs[0]
0
792b8c32ca87860c92e2df973ff7bfc4
8d2c8dbfa96f6570e7e0612d21907c75
Explicitly included in base class to force it to be abstract.
class Propagator(object): def __init__(self): raise NotImplementedError("'Propagator' is an abstract base class.")
1
e7e3ae30adf3cf821d45994e9a526c02
4bf414f4c1ff2b7eecc7d0b60eeebec6
Moves figure of current player for given figure-id.
public class MoveHandler private void moveFigure(int x, int y) { figure.setBounds((x * 100), (y * 100), figure.getWidth(), figure.getHeight()); ChessBoardLogic.figuresArray[figure.getPositionInArrayY()][figure.getPositionInArrayX()] = null; ChessBoardLogic.figuresArray[y][x] = null; Ches...
0
592dfefcd4bc874d0536dc2d0515efc7
9219fd3bbe6458b07c8a2efed69ee888
Remove a module from the program. Its dependents will also be removed.
class Engine(object): def removeModule(self, _name): del self._modules[_name]
0
db6e52ee61b77387465084ff582c0cdf
285cd9052811df9eb9a83a263f0de109
排序置底
namespace Jwell.Modules.Elasticsearch.SearchCondition public class ExactValueSearchCondition<T> : IExactValueSearchCondition<T> where T : SearchEntityBase public IExactValueSearchCondition<T> OrderByDescending(string field) { if (this.Sort == default(List<FieldSort>)) this.Sort = new Li...
0
12f85d7f6bab33ec35ffd31753a23b66
c74f96270ca640c48cdd0b6ab613da88
更新tad_web_mems某一筆資料
namespace Web.DAL.Mobile public class MessageSetup public int Update(Model.Mobile.MessageSetup msModel) { Base.Conn.Database db = new Base.Conn.Database(); DbParameter[] ps = { db.CreateParameter("@title",msModel.title,DbType.String), ...
0
6cd8361ba7d8b48a7cae0c00953939a6
f6aa99b2d42fd55e8a352b51262fc7df
从txt文件中导入试题
questions_list = list() self.questions_answer_map = [] with open('questions.txt', 'r') as f: questions_text = f.read() for each_question in questions_text.split('\n'): answer_map_index = int(each_question.split(' ')[0]) question = each_question.split('...
1
5de089393ff527eaee10f6401d39c770
31f0bddd2ea07f78f54197429e67b435
Merge two sorted spans of an Array of int's, placing the result into a destination Array, starting at an index.
{ Array.Sort(arr1, comp); Array.Sort(arr2, comp); Merge_NoSort(arr1, arr2, destOnly1, destBoth1, destBoth2, destOnly2, comp); }
0
0b5293a1c6d573292b46ef71b7111bd8
700536343fc49238cb9973b43061c438
Tính khoảng cách từ 1 điểm đến đích</br> Đầu vào là số thứ tự của điểm đó (từ trái sang phải từ trên xuống dưới)</br> Số thứ tự này được tính bằng cách : ô [i][j] có số thứ tự bằng (31*i +j)</br>
n--; int p = n / dimension(); int q = n % dimension(); return Math.abs(i - p) + Math.abs(j - q); }
1
50e85925bed31c1712c2bf31202eca7a
961305c20b7458ed3732b781a8479880
Create new MongoId object .
class Component_Mongodb public function MID($str = null) { return new MongoId($str); }
1
4086732d998179698dd52f5b31ec0224
0d24480e9c55116f2c44175b19a51d7d
Sets flag to indicate whether or not we are finished reading from STDIN.
class AbstractReader(object): def done(self): return self._finished
0
334367357fce0e64eacaee372a8b6fe6
3ac16f28811e8fb95f8443e9e80df479
删除带压缩图片的文件
public class ImageHelper public static void DeleteZhuanTiImage(string image) { string path = GetZhuanTiImagePath(image); File.Delete(path); }
0
722581c952177db20016a14ed71d8152
c61423aa14235df559fe2a1e7127b83f
Elimina las stopswords de la linea pasada como argumento
def drop_stopwords(contents, stopwords): global contents_clean global all_words for line in contents: line_clean = [] for word in line: if word in stopwords: continue line_clean.append(word) all_words.append(word) contents_clean.app...
1
65388a346293d44ec5bcf6258660dc72
5264abc95e51ba82a71003a0bef4eb10
Test the calculation of g_θ, regarding the shapes of the returned tensor.
tensor_vertex_size = np.random.randint(1, 3) tensor_out_shape = np.random.randint(1, 5, size=tensor_vertex_size) tensor_out_shape = tensor_out_shape.tolist() tensor_vertex_shape = list(tensor_out_shape) tensor_vertex_shape[-1] *= 3 tensor_index_shape = tensor_out_shape[-1] for i in range(3):...
0
12ca88c47372bae26e90a6e8a7a51105
3b0d008c34f4eb2e5fa63886dc98ca38
Checa os tipos envolvidos com operadores lógicos.
fprintf(stderr, "[ERROR] ENTREI NA CHECKPOINTER\n"); if(!node) return; if (node->type == AST_ADD || node->type == AST_SUB || node->type == AST_MUL ) { int leftOperandType = node->son[0]->type; int rightOperandType = node->son[1]->type; if (leftOperandType == AST_POINTER && rightOperandType == AST_PO...
0
6f8fc2ecea7c5a03d33c4eeb027b24c4
cfa76dde8d521ea09e7fd51e7d2f36f2
Pass in file_path (normalized here using normpath) to get stored hash for that path KeyError -> None
class Hash(object): def compute(self, filepath): return self.hash_type.compute(filepath)
0
f2b86df87c4a8228bee0517f987ac6aa
aabbc4dc07b7a4d820aabc85bb98786c
Literal Definition ->
def p_define_expression_literal(t): t[0]=t[1]
1
b0a46106a030b10824c4caa9adf57b08
8a101d260cbd16b00b107cec4833d305
True if command execution failed
fn execution_has_failed(&self) -> bool { self.failed_steps() > 0 || self.parsing_errors() > 0 }
1
2775e6af1e8b791dedbe69d947606e84
258fc01509ef94999c21bb6fda857e9a
Remove all buttons from the menu
public class XUIMenuButtonGroup extends LinearLayout public void removeAllMenuButtons() { int count = ((LinearLayout)layoutView.findViewById(R.id.items)).getChildCount(); ((LinearLayout)layoutView.findViewById(R.id.items)).removeAllViews(); updateLayout(); for (int index = 0; index < count; index++) { ...
1
736dd98ab9d963dfc30b10d9e5a8d987
21e1562b851eac014206f80721426fe8
Creates an instruction which computes the absolute value of its operand
class Builder def not(arg, name = "") Instruction.from_ptr(C.LLVMBuildNot(self, arg, name)) end
0
4a084caf873150defbfdf8be7c69e1be
0d12863f8f1f685202a3be32ae1c6a39
Finalize current registration process.
print('FINALIZE') data = { 'command': 'FINALIZE', 'media_id': self.media_id } req = requests.post(url = MEDIA_ENDPOINT, data = data, auth = self.oauth) self.processing_info = req.json().get('processing_info', None) self.check_status()
1
c14a26bcb231f259cea80b841bf9cfe7
c5f1be8ddc454feb1cd22554e6b3592c
하나의 문자를 입력받아 숫자인지 여부를 판단하는 프로그램을 삼항연산자를 이용하여 구현하시오. (System.in.read()를 사용하세요)
public class HomeWork03 public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.println("Please enter a character"); char ch =sc.nextLine().charAt(0); if(ch <= 'a' && ch >= 'z' || ch <= 'A' && ch >= 'B'){ System.out.println("This is an Alphabet."); } else { System.out.pr...
0
7629e9a778a15c26404813cfb4b3657d
04ced02a7b54c73888ca8c45df371d73
Insert an interest to the database
async function insertInterest(interestData: Interest) : Promise<Interest> { return createInterestScheme().then(() => Interest.query().insert(interestData)); }
1
2a60a9c489e366179cdf1159b97fe633
389e079302994538f94e5a0c68e99afb
Attempts to add a readv, preadv or preadv2 to the Submission Queue without it being submitted. The actual submission can be deferred to avoid unnecessary memory barriers.
namespace IoUring public unsafe partial class Ring public void PrepareReadV( int fd, iovec* iov, int count, off_t offset = default, int flags = 0, ulong userData = 0, SubmissionOption options = SubmissionOption.None) { if (!TryPrepareReadV(fd, iov, count, offset, flags, u...
1
293ee5799abdad0844ff892b85478db5
303bc5f47803ca0d80f789b778a3384a
sets the current car and saves the player preference, which is used later in the game
public class AddCar : MonoBehaviour void Start(){ var pos = new Vector3(10, 0, 0); Instantiate(drivableCars[PlayerPrefs.GetInt("selectedCar")], pos, transform.rotation); }
0
b909370ebc9d5e1cb919b3eb3e9e3f1c
2c12b2f19f0ef77e375be2141218777b
给日期设置一个新的月中的第几天。
public final class DateTime extends Date implements TemporalAccessor, TemporalAdjuster, Temporal, Cloneable, Serializable public DateTime withDayOfMonth(int value) { return withField(DAY_OF_MONTH, value); }
1
a2d6ad27c4f81ea97da660238158335e
84ac7e9a44606fc7332da4b981198681
获取 零售价
@Table(name = "tbx_bargain_price_detail") public class BargainPriceDetail public BigDecimal getRetailPrice() { return retailPrice; }
1
d40b51d7b0413d1675479955c6bb45d2
961d4900a81116210bc02d2f53958416
get a lw_visitor by condtion
class SnsVisitor extends \Phalcon\Mvc\Model public static function find($parameters = null) { return parent::find($parameters); }
0
3177a5b354d25ebd795295705fee81cd
6cc1fef7ab6cfbc4041d1abe6b00f2fc
Logic which fires immediately prior to an item being added to cart.
function hook_commerce_cart_line_item_refresh($line_item, $order_wrapper) { }
0
df112664c846d6aad65cefa2e34da48b
1be419a541148288726782687653950b
programmatically loop though employees and display each name as <li> element.
let DOM = document.createElement('ul'); for(let el in friends) { DOM.innerHTML += `<li>${friends[el].firstName + ' ' + friends[el].lastName}</li>`; } return DOM; }
1
764cb186a593dfa61835828ee0225dc2
3c3a25abc99bff546714fc7943e0ff88
Test the ion density inside the pedestal.
class TestPlasmaSource: def test_ion_density_magnetic_origin(self, plasma_source): ion_density = plasma_source.ion_density(0.0) assert pytest.approx(ion_density, 1.09e20)
1
34b1b6917cbad5a963950ed9af8a4850
7cbd65b9b4d729826919bbda812618ff
use hidden checkbox to fire the modified event;
var event = new MouseEvent('click', { 'bubbles': true, 'cancelable': true }); var cb = document.getElementById('checkbox'); cb.dispatchEvent(event); }
1
438ffb1b41a98a17bf7cd8c3817e3a39
041f31951e4d9e2de21dce63432634d5
處理所有SVN 與 Excel比對作業 : 1. 找出 SVN 與 Excel mapping data 2. 分別處理 Bug , Spec , Other 分類
public class VTSClassPanel extends VTSBasePanelImpl private void processQuerySVN() { final VTSConditionDialog dialog = new VTSConditionDialog(); String author = svnRule.getUser(); dialog.getUserTxt().setText(author); dialog.getQcTxt().requestFocus(); dialog.getConfirmBtn().addAct...
0
69cd4ba2babdcc52451007654653cb61
e51982d10f683710c2cae4b408b886ef
Parse the arguments from the http request.
class Fakeserver public function parseArgv () { if (isset($_SERVER['argv']) && count($_SERVER['argv']) > 1) { $args = array_slice($_SERVER['argv'], 1); $query = []; while (count($args) > 0) { $arg = array_shift($args); if ($arg == '-p' || $arg == '-P') { ...
1
e93365cca96793771ae34eace10e59f7
732a93c85da0a855bdf655705d82173e
Get le nombre d'étudiants du parcourt type
return $this->_select($this->tableName." as gps, users as usr, register as regis", "COUNT(id_reg) as nbre", "usr.id = regis.id_userStudent AND gps.id = regis.id_group AND regis.id_group = '".$id_group."' "); }
1
74be5c5e1e4d442c25de076d5012c74f
f16d898f84d3e46201ea8ac1fc758e6f
Ensure the size suffix converts to kilobytes with decimal string label as expected.
func TestSize_UnmarshalText_MB(t *testing.T) { var s itoml.Size if err := s.UnmarshalText([]byte("200m")); err != nil { t.Fatalf("unexpected error: %s", err) } else if s != 200*(1<<20) { t.Fatalf("unexpected size: %d", s) } }
0
903b23246b4ba946356daff00783e07e
e0b9bae0b4806ee435fabf469937d2fc
根据流程实例id和状态名称查询活动的执行实例
public class TopicInformationManagementDaoImpl implements TopicInformationManagementDao @Override public bysjglxt_process_instance getProcessInstanceByManStateAndName(String topic_select_student) { bysjglxt_process_instance bysjglxt_process_instance = new bysjglxt_process_instance(); Session session = getSession()...
0
3582be53038fd16e9acfc322ed4244e3
e2e636299e587afa76c72da9c371529a
Tests the binding of a Form with a single file attached.
new Settings(['file_private_path' => NULL] + Settings::getAll()); $this->rebuildContainer(); $test_file = $this->getTestFile('image'); $edit = array('files[upload]' => drupal_realpath($test_file->uri)); $this->drupalPostForm('file/add', $edit, t('Next')); $data = array( 'field_image_title_...
1
c7f2156eb6ac4c3252deb7553599f849
db1d9c3671241b5f92912f06795580c1
测试go中的字典map,以及其迭代方式
m := make(map[string]string,0) m["test"] = "" if v,ok := m["test"];!ok { fmt.Println("err") }else{ i,e :=strconv.Atoi(m["test"]) if e != nil { fmt.Println("con:",e.Error()) } else{ fmt.Printf("the v is %+v",i) } fmt.Println(v) } return str:= "a" strslice:=strings.Split(str,";") fmt.Println...
0
e1af3d7369f80fa8c08059d18adb0dd6
411a78820d95b6e3d7b5f8347f4be18c
Calculate subscription count based on subscription plan
{ $amount = 0; foreach ($this->braintree_subscription->discounts as $discount) { if ($discount->id == 'plan-credit') { $amount += (float) $discount->amount * $discount->numberOfBillingCycles; } } return (object) [ 'amount' => $amoun...
0
0a72a795991aa78e545b9cb8b1284946
1c1147cae2d33bc1c56f1cd40ebe7a7f
Helper functions to add and remove entries to the table that maintains a list of all endpoints (vnd's) available on this device.
{ uint16_t ofdsc; ofdsc = p_table[0]; while (ofdsc < length ) { if (USB_DT_ENDPOINT == p_table[ofdsc + 1]) { usb_cstd_pipe_table_set (USB_HVND, &p_table[ofdsc]); } ofdsc += p_table[ofdsc]; } return USB_OK; }
0
2f50ffdf3335d96addb3aa346a84be6f
33ba3f7acba7585901949b681f77c543
经验瓶是否满了
PrizeSample sample = null; if (psList != null) sample = psList[index]; int num = 0; if (sample != null) { num = StringKit.toInt(sample.num); } if (sample.type == PrizeType.PRIZE_CARD && StorageManagerment.Instance.isRoleStorageFull(num)) { ...
0
17139dd9e81c7b160adf9801559dfd65
c49cbb791d307d46d3420a608146a220
Calcula la suma del total de aristas que cruzan por el corte
def totalConnections(analyzer): return gr.numEdges(analyzer['conecciones'])
0
5f0814b59c13f9b36d32115f6787b833
72bf8819a1bf3c71c4445d140692bc9c
This function calculates the full generic CMAC on the input buffer with the provided key.
atcac_aes_cmac_ctx* ctx, const uint8_t* key, const uint8_t key_len ) { return (!wc_InitCmac(ctx, key, key_len, WC_CMAC_AES, NULL)) ? ATCA_SUCCESS : ATCA_FUNC_FAIL; }
0
c59ca5b21e286fff1bef17858889d98e
49101cf096b280a6f40d497f3463de07
Evict tasks exceeding limits.
key_to_del = [] for k in self.ttl: v = self.ttl[k] if type(v) is datetime: if v < datetime.utcnow(): key_to_del.append(k) for k in key_to_del: del self.ttl[k] del self.data[k] if len(self.data) > len(self...
0
20e84e7ceaecf23fd4ebff963611a1d1
1dcc7ef8c12b7c7a71fb2018293be696
启动CommonWebViewActivity
fun jumpToCommonWebViewActivity(context: Context, url: String) { val intent = Intent(context, CommonWebViewActivity::class.java) intent.putExtra(DATA, url) context.startActivity(intent) }
1
1c295c273cc46439dbeae844cbe0b922
7c58dea829535ed71efb9b4c8004efdd
Configura o painel principal.
this.layoutPrincipalOptions = new LayoutOptions(); LayoutOptions panes1 = new LayoutOptions(); panes1.addOption("slidable", false); panes1.addOption("spacing", 6); panes1.addOption("resizeWhileDragging", false); this.layoutPrincipalOptions.setPanesOptions(panes1...
1
6384087f5624a5fa98a8ca894f637e3e
55553a223367194462ece738348a4428
@brief Read from the DMP memory. This function prevents I2C reads past the bank boundaries. The DMP memory is only accessible when the chip is awake.
bool Simple_MPU6050::view_DMP_firmware_Instance(uint16_t length) { uint16_t ii; uint16_t this_read; uint16_t bankNum = 0; #define LOAD_CHUNK (16) uint8_t cur[LOAD_CHUNK]; Serial.print(F("const unsigned char dmp_memory[DMP_CODE_SIZE] PROGMEM = {\n")); for (ii = 0; ii < length; ii += this_read) { this_read...
1
113254340b4df6163c3118124fdf7532
33ed4acb05abdd3ed95aaad76042b486
Gets publish topic name.
func getPublishTopic() string { return config.GetString("mqtt_pub_topic") }
1
2839ecb2af9f62fb47a170ac9238f744
a188a1db3a96b1e2c92f6b136a4353c0
Speichert die Angaben des Arbeitsgebers zu einem Kunden
void aktualisiereKunden(IKunde kunde);
0
8b80db9579211f39926f41641d8a2ec8
680b78fbfe0eb6b1fad93075e72d94ff
判断是否停牌 注意:早上开盘前和下午收盘后会有不同
try: security_data = attribute_history(security, 40, unit='1d', fields=('close', 'volume', 'open', 'high', 'low'), skip_paused=True, df=False) open = security_data['open'] high = security_data['high'] low = security_data['low'] close = security_data['close'] CDLEVENI...
0
ec42a3d14adc17aab41c28d1e864c4e9
e0c7d7f851b4ba53effc19b451795522
显示所有判断错误的方块
{ GraphicsLayer graphicsLayer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer; graphicsLayer.Graphics.Clear(); if (chkErr.IsChecked == true ) { if (Tml.Visible == true) { foreach (Graphic g in Tml.Graphics) ...
1