query_id
string
corpus_id
string
query
string
code
string
label
int64
4c4e0e4e7fda0c23267ebdc75940477d
191be35f67ee0ee8ec5c2bb338c34bb6
höchsten Punkt eines Koordinatensets herausfinden
int min_z = dots[0].z; std::vector<Point> min_z_points; for (int i = 0; i < dots_size; i++) { if (dots[i].z <= min_z) { min_z = dots[i].z; } } for (int i = 0; i < dots_size; i++) { if (dots[i].z == min_z) { min_z_points.push_back(dots[i]); } ...
0
51e625b4adf31297027c2372a3870151
c4f13dd35c4e09baf486c164327a3e66
加班列表跳转到详情页面
String pageFlag) { sIntent = new Intent(context, clazz); sIntent.putExtra("title", title); sIntent.putExtra("recordId", recordId); sIntent.putExtra("menu", Constants.PERSONAL_OVER_TIME_DETAIL_MENU); sIntent.putExtra("pageFlag", pageFlag)...
1
d2b8bd1ad76bcecbfd3bccb8b802c6ec
7edaffd8858f58a199b98df5a9b1edd7
Refreshes the list of loaded patients. This method will use the specified filter to only load specific patients.
@Nullable String filterLocation, @Nullable String filterQueryTerm, Response.Listener<List<Patient>> patientListener, Response.ErrorListener errorListener);
1
86216196ada78d4a789b9008ec2b4704
b44f429d9f1b5b4f67ee1df72b569b4b
通过每个文件的魔数来进行文件类型判断
f = open(file_path, 'rb') f_bytes = f.read(20) f.close() num = len(f_bytes) hex_str = u'' for i in range(num): t = u'%x' % f_bytes[i] if len(t) % 2: hex_str += u'0' hex_str += t hex_str = hex_str.lower() print(f'hex_str: {hex_str}') f_type = 'unkno...
1
d65d4bc2fed0ad76a7335897dc215c28
39ae91c3646f7fa447313e227199e086
Create an instance of {@link AttributionType }
AttributionType createAttributionType();
1
d59fc738b0d9cc8ce9766d18615ef3dd
0a2d8cbd1628c11530c7550e47cfe539
按指定格式返回当前播放器sdk的版本号
public class SettingActivity extends AppCompatActivity public String getSdkVersion() { return getString(R.string.sdk_version) + ZegoExpressEngine.getVersion(); }
1
6328318d9c3c428e1926589b26e6c0fa
b7bb4cb021696c3c9847fa137d5b8142
获取和对象等值的long数值。
if (obj instanceof Byte) { return ((Byte) obj).longValue(); } if (obj instanceof Integer) { return ((Integer) obj).longValue(); } if (obj instanceof Short) { return ((Short) obj).longValue(); } if (obj instanceof Long) { ...
1
c9c4a31dbd7961a08ec50f9763e3e4e4
566b182abd69ba52695c3ed77b3e4ec5
Retourne le code d'opération
bool OPERATION() { int thisToken = current_symbol[cpt].code; switch (thisToken) { case PLUS_TOKEN: return true; case MOINS_TOKEN: return true; case MULTIPLE_TOKEN: return true; case DIVISION_TOKEN: return true; default: return false; break;...
0
24ff1b14296cb5e7e25a4d98b730d291
291395ec5a2f17ca51315e5c390585ab
树型展示所有已配置参数
class Setting extends ApiCommon public function config() { $configModel = model('Config'); $data = $configModel->getDataList('tree'); return resultArray(['data' => $data]); }
1
9684883846b4ff9a539db36c0d58ceec
627df704114e998f2c3f19dfef13cecd
Return true if device is not offline.
public class DeviceManager public static boolean isDeviceOffline(Context context) { ConnectivityManager cm = (ConnectivityManager) context.getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo activeNetworkInfo = cm.getActiveNetworkInfo(); return (activeNetworkInfo == null || !activeNetworkInfo .isConne...
0
b464558fe2f025c7cc998adfb5e0f683
4806feb9306f0d48893c2a6d4e8bba10
Writes a numpy array on the disk as a tiff file .
class Writer: def write_data(d: np.ndarray, name): d.tofile(name)
0
51edfbb73b9100edef5785953c389873
2f7f93fdfe36d679c0b8742d39524885
Checks whether a string is multi-byte
class ValidateHelper public static function isMultibyte(string $str): bool { return $str != '' && preg_match(RegularHelper::$patternMultibyte, $str); }
1
9f0c14578d9c21203a3b0f8c79b68d58
9fa37a88c28132d16b3427228d3fcc6e
用于推送视频流服务
public class LiveHelper extends AbstractLiveHelper public void pushAction(){ TIMAvManager.StreamParam streamParam = TIMAvManager.getInstance().new StreamParam(); streamParam.setChannelName("ldkxingzhe-test"); streamParam.setEncode(TIMAvManager.StreamEncode.HLS); pushAction(streamParam); ...
1
d96a9e290b44827086579aedcec2751a
cd1cce0ef4409feb470fdd6eac70aba3
Destruye la persistencia de un Dato en el controller
class MTDatosController extends Controller public function destroy(MTDatos $dato) { }
1
54d4e1214154c3938533c34a00b3e32b
1aafb20480f097c38745f0bd088f0e8f
Information about the job, including starting time and ending time of the job.
class GetJobResult: def execution_info(self) -> Optional['outputs.JobPropertiesResponseExecutionInfo']: return pulumi.get(self, "execution_info")
1
9d633a8208e79d7203441cea07aaee0c
d459e03b84efd236868df1d98ac3ea3b
轉移trans_pay_set到level_currency
class Cart{ function setTransMoney($man_trans_type,$key,$man_nomal_type = 0,$trans_money = 0,$trans_permoney=0,$ifabroad=0){ $this->transmoney = 0; $this->transname =""; }
0
86e584072d189ae14cea3fd57885d201
c43a9b4b56cabf41e6c99271535ecc20
Highpass (or lowpass) filter data. HP to remove gravity (offset - limb orientation) from accelerometer data from each visit (trial) Input: Activity dictionary, cutoff freq [Hz], task, sensor location and type of filter (highpass or lowpass).
nyquist = self.sample_freq / 2.0 cutoff = cutoff_high / nyquist x, y = signal.butter(order, cutoff, btype = "highpass", analog = False) self.audio_data = signal.filtfilt(x, y, self.audio_data, axis = 0)
1
5ee8fcd52fd243ce279aaaaf3d4fa3fd
5a835077b9fed18653427beb0bd87122
Gets the value of an attribute at this index from an XML Node as an integer.
namespace MUGENCharsSet public class XmlConfig public int GetAttributeValue(XElement element, string attributeName, int defaultValue) { try { return Convert.ToInt32(GetAttributeValue(element, attributeName, defaultValue.ToString())); } catch (E...
1
063af8af937a4750e95021daf73eef8a
dab01f6f1d9f765ebc3554caa8b35769
add new complaint
class ComplaintController extends Controller public function create() { $data["users"] = User::find(Auth::user()->id); return view('admincoordinator/complaint.create',$data); }
0
cfe3a0542b1757fc3add4b7f680ebf46
344537c8598db68479e00c75bbb52549
Set the columns width for the users table according to the container size.
function setColumns() { iColumns = Math.floor($(window).innerWidth() / iOuterWidth); if (iColumns < 3) { iColumns = 3; } else if (iColumns > 6) { iColumns = 6; } var oContWidth = iColumns * iOuterWidth - iGap; oConta...
1
c5f47601d995435e05d1f36ce3839ccc
68e4b94b18ec88e130b68b30a5b39956
Возвращает подзаголовок (простой), в котором экранированы специальные символы HTML атрибутов.
public function escapeHtmlAttr($attr);
1
511171ecf996f7c1266af1944a7454b5
6ee89726489dcc3eac2cc9cdb1334865
Return a signed JWT with ICAT session information inside
const encode = AES.encrypt( `${password}@${ip}`, getAuthCryptoKey() ).toString(); return jwt.sign( { casID, data: encode, }, getTokenSignKey(), { expiresIn: '2 days', } ); }
1
9c4ba7e0acf0dd7927c9132a950290e1
2ba9c58b7bb2670305e475a8ac25e05b
Verifies the Container with the specified <paramref name="options"/>.
{ using( NoSynchronizationContext ) { await eventListener.AssertNotNull(nameof(subscriptionId),subscriptionId); await eventListener.AssertNotNull(nameof(resourceGroupName),resourceGroupName); await eventListener.AssertNotNull(nameof(contain...
0
2ad4996fe888efc22bd477ce591cfe3a
9561d8acaa576c2c8c41a0eb04492926
@brief Set tunnel start entry extension value.
static CMD_STATUS wrCpssDxChTunnelStartMplsPwLabelTtlSet ( IN GT_UINTPTR inArgs[CMD_MAX_ARGS], IN GT_UINTPTR inFields[CMD_MAX_FIELDS], IN GT_32 numFields, OUT GT_8 outArgs[CMD_MAX_BUFFER] ) { GT_STATUS result; GT_U8 devNum; GT_PORT_NU...
1
83dd940e36a09d9cbc32e455163ee9ca
407172bdea3b706dc25b28c5fe6fcf42
Generate averages across a cursor
class ScoutServer(object): def calcavg(self, n): conn = sql.connect(self.datapath()) cursor = conn.cursor() entries = cursor.execute('SELECT * FROM scout WHERE d0=? AND flag=0 ORDER BY d1 DESC', (n,)).fetchall() s = {'auto': 0, 'def': 0, 'shoot': 0, 'end': 0, 'goals':0} accur = [0,0] apr = 0 if entries: ...
1
bdaa6ab88075f36e06f9edfeb14e0fd6
e3130a9fdf183a6ced019a493686bac6
Returns viewModel instance with users inside
class UserViewModel:ViewModel() fun getListUsers() = userList.value
0
742bd4a294df4316e26d2da4d35fab46
b013986add7447d31883ee78a7e7574c
推运盘排盘
class PlayerActManager(object): def act_dian_gang(self, act_params={}): from service.mahjong.models.playeract.diangang import DianGang if not self.acts.get("dian_gang", None): self.acts['dian_gang'] = DianGang(game_data=self.game_data) return self.acts["dian_gang"].execute(act_params...
0
529d4cccec8417fd54f34326da5916fe
afe3a95002fba7a4ba2a3cb4784cebd9
Messages table response reader
const recipientRepository = getRepository(MessageRecipient); const messages = await recipientRepository .createQueryBuilder("mr") .innerJoin("messages", "m") .innerJoin("users", "u") .where("mr.message_id == m.id and m.user_id == u.id") .select( ` u.name as 'to', ...
1
680fb9565db415fb41631faf4522010a
64ed01239f674a671fc1210efe3bfcac
2013-10-22 問題毎に履歴を書き込むための関数
{ for($count = 0; $count < count($array); $count++) { $temp_qid = $array[$count]['ID']; $temp_ansid = $array[$count]['ID_answer']; $date = $array[$count]['time']; $sql = "INSERT INTO stat.ALLHISTORY (SOTRUD_ID, ALLQUESTIONSID, DATEBEGIN, DATEEND, ATTEM...
1
be67158820c3b624f9797b4f2d704b65
f706704c44bfe4b9b98142ec99bd7aa3
ユーザー検索の条件文の作成
log_message('DEBUG', __METHOD__.' start'); $this->load->library('pixim_lib'); $event_info = $this->pixim_lib->search_event_info($p_tennat_id, $p_event_data_id); if(!$event_info) { $line = $this->pixim_lib->get_line($this->_function_id, __LINE__); $log_msg = $this-...
1
aba74c9c738665c362396024e4f29b72
edf68995cb4a79425673de5985d022c4
method that checks if player 2 wins, based on whether player 2 guesses correct code
boolean answer = false; if(getNumMatches(true)==1 && getNumMatches(false)==3) { answer = true; } return answer; }
0
c5b1797adf19966fedd5ab15241e0bfc
656f596fe58be6399a347ab8c2edfcf7
Sets the parameters, and resets the operating gradient.
namespace Org void Fopr_CloverTerm_eo::set_parameters(const Parameters& params) { const string str_vlevel = params.get_string("verbose_level"); m_vl = vout.set_verbose_level(str_vlevel); double kappa, cSW; std::vector<int> bc; int err = 0; err += params.fetch_double("hopping_paramete...
0
65cf9cb814b77104745fb6742d31f394
05202aeaf117c2aa15ce26fffa2b0471
# mean and variance of A conditional on G
L0 <- observed_data$L0; A0 <- observed_data$A0; L1 <- observed_data$L1 n <- length(L0) initial_model_for_A0 <- glm(A0 ~ 1 + L0, family=binomial) initial_model_for_A0$coefficients[is.na(initial_model_for_A0$coefficients)] <- 0 gn0 <- as.vector(predict(initial_model_for_A0, type="response")) coeffs_Q1d_bar_0n...
0
336094f276c25f29d58afbf0a6334a31
17e44ef2c3c093e69c5f2e5abf8972e0
Returns just the selection part of the weather query from a normalized today value. This is used to get a weather forecast from today's date. To make this easy to use in compound selection, we embed today's date as an argument in the query.
if not self._selection: return else: year, month = self._date.year, self._date.month return self.datetime(year, month, int(self._selection[0]))
0
76f346c0b3069ec2a38408a2376b57f1
9caf69eb8d13ada19a5010d0b1d2fe69
Move the player to a new relative position
void UGK::CCharacter::MoveRelTo (Vector &Move) { Position += Move; #ifdef CHAR_USE_AABB UpdateAABB (); #elif defined CHAR_USE_OBB UpdateAABB(); #endif }
1
7c8480da4560ed79ff68eff8cfe122b3
739e7ca54ca63c9685d274bebab40b08
Returns average absolute deviation from mean or median
n_samples = len(samples) result = [0]*n_samples for t in range(n_samples): try: result[t] = stats.median_absolute_deviation( __get_window(window_size, samples, t)) except: result[t] = 100 return result
0
8129861490dbd4eca7bf5817088be768
ae1b886e4cc9e421ae8e9a696fefb96d
收到行情后处理本地停止单(检查是否要立即发出)
void TrendTrader::CheckLocalOrderList(const char* tablename) { std::string tradingdate; Config config(this->GetStrategyName().c_str()); MysqlOrder mysqlopenorder(config.GetTable_Open().c_str(),this->GetPointUserLoginField()->UserID); vector<OrderData> orderlist; vector<OrderData> sendlists; mysqlopenorder.Find_...
0
cbf74c16e3c46f795577d2ec1a9e5506
daacbdfc239b6c77dbef73c1db533633
Tests the no argument constructor.
public class InformixRoleCategoryPersistenceTests extends TestCase public void test_ctor1() throws Exception { new InformixRoleCategoryPersistence(InformixRoleCategoryPersistence.DEFAULT_NAMESPACE); }
0
ca44a6a880567489afab9dfcbe90f090
c7d5e6964948af568002437ea712947f
<p>Adds a signer information for Equifax Canada to the signer.</p>
Object incorporationNumber) { message.append("<incorporatedCountry>"); message.append(incorporatedCountry); message.append("</incorporatedCountry>"); message.append("<incorporationNumber>"); message.append(incorporationNumber); message.append("</incorporationNumbe...
0
9e4ced55d171b2449530d5931a476b81
6309dcedbc527e4094bf14763b2143fd
Adds processes when arguments are provided Detects ranges in the arguments and spawns adequate number of processes
void SpawnProcess(Command& cmd) { int numProcesses = cmd.GetNextInt(); if(numProcesses > 10) numProcesses = 10; for (int processIndex = 0; processIndex < numProcesses; ++processIndex) { STARTUPINFO startupInfo; PROCESS_INFORMATION processInformation; ZeroMemory( &startupInfo, sizeof(startupInfo) ); startu...
0
71739aa0cdf143057008c39804eb6598
ee6dba6205785292b2e3e6f2defbfe0a
Funció per comprobar si el ususari segueix o no la serie
foreach($this->follows()->get() as $follow){ if($follow->patient->id == $idPatient) return true; } return false; }
0
85db740b1b690b475aac4c994f7cb8e6
38c231984b25e22793392edb5110ebe1
将指定用户id下的is_valid字段全设置为0
{ if(is_numeric($cid)) { return $this->db->set("isvalid",0)->where("id",$cid)->update($this->_tablename); } else { if( ! is_array($cid) ) { $cid = explode(",",$cid); } return $this->db->set("isvalid",0)->where_in("id",$cid)->update($this->_tablename); } }
1
0ad5b730763b0e30c80979fd0d029393
c0f479a2d456a17185c0634a930c1f01
WindowProc callback interceptor. Handles Windows messages intended for the source hWnd, and passes them to the contained browser as needed.
namespace fyiReporting.RdlReader public partial class RdlReader : IMessageFilter public bool PreFilterMessage(ref Message m) { #if MONO return false; #else if (m.Msg == 0x20a) { Point pos = new Point(m.LParam.ToInt32() & 0xffff, m.LParam.ToInt32() >> 16); ...
1
3e6b2b6f312ffc56faef275574f20d43
2fc063640584ac88c90a038d1e1c8c28
根据供应商编码、公司编码、采购组编码、采购方式,关联扩展公司及采购组表关联获取供应商信息
{ _dbContext.Configuration.LazyLoadingEnabled = false; _dbContext.Configuration.ProxyCreationEnabled = false; var supplierPredicateBuilder = PredicateBuilder.New<Supplier>(true); var purchasingOrgSourceData = _dbContext.SupplierPurchasingOrg.Where(p=>p.Supplier.SA...
0
1e76a9610b7e3d43f2b03ea07ab84d14
401a6f97eeac1e4783c600020d4cea9b
Iterates <see cref="byte"/>-<see cref="ushort"/> key-value tuples from the stream.
namespace System.IO public static partial class StreamEx public static IEnumerator<(bool, sbyte)> IterBooleanSByteTuples(this Stream stream) { var key = stream.ReadBoolean(); var value = stream.ReadSByte(); yield return (key, value); }
0
ba422e2148a7250e3b422153621854b1
efc9a292147a8b3ed8a467f8c6751121
根据fastAvg与slowAvg来进行交易变动仓位,同时记录信息
class Position(object): def trade(self, price: float, amount: int, side: str, dt: str): if side == 'B': amount = 1 * amount elif side == 'S': if self.amount < amount: raise ParamError("持仓不足") amount = -1 * amount else: raise ParamEr...
0
89031d72fe96a71f176a64aee4739755
280803b21bcb38fd32ce6f4ac154f5c3
Dodaje monety o nominale 20zł do sumy, przyjmuje ilosc monet
{ ostatok = summa; while (ostatok > 0) { if (ostatok > 3800) { fiveThousand++; ostatok = ostatok - 5000; cash += 5000; } else if (ostatok > 850) { oneThousand++; ...
0
280ab4c8867d91f49bd2e5761e5005c5
8fd99a0775ccad26f8baab9e00b09ffe
计算各类别的精度,返回一个字典
self.precision, self.recall = self.__precision_recall() print('准确率 = ' + str(self.precision * 100) + "% 召回率 = " + str(self.recall * 100) + '%') self.coverage = self.__coverage() print('覆盖率 = ' + str(self.coverage * 100) + '%') self.popularity = self.__popularity() print(...
0
3a59ff96646e4fe4b75fea3448d100b9
46df4798e7816da26789183db36e82c4
如果只有一第图时不显示圆点容器
if (mAdapter.getAdapterData().size()<=1) return; if (mLinearLayout == null){ mLinearLayout = new LinearLayout(parentView.getContext()); mLinearLayout.setTag("indicators"); mLinearLayout.setOrientation(LinearLayout.HORIZONTAL); mLinearLayout.setGravity(Gravity.RIGHT); LayoutParams linearLayoutParam...
1
4cf310ad93dd1d278c2ad156e9419399
85e29f961526c28d05388cf5c7a178de
Clears icon, name, and description, and sets inactive
{ HideNextIcon(); nameLabel.text = ""; dialogLabel.text = ""; avatarSprite.sprite2D = null; }
1
a23e8785d32bf86384e734b26d284898
5164a8b8667247130913bfa2f07b77e1
Sets the row separator to be used. Actually you should never change this character as it will break the definition of a CSV stream. Default is newline character.
{ if (newline == null) { throw new IllegalArgumentException("newline==null"); } this.newline = newline; }
1
83afc5ee9c98572ec50920f58ad138fe
44055cb37958c6a0f623df78c18098fe
打开上传文件对话框,上传证件附件
class ApostilleHistoryCtrl uploadNty() { document.getElementById("uploadNty").click(); }
1
1b18384293c339d054c8c583d51cbae3
c1097c562385d421690751ba06da63ff
设置输入框 True:允许写入/False:无法写入
class Window(QWidget): def 只读设置(self): print(self.te.isReadOnly()) self.te.setReadOnly(True) self.te.insertPlainText("itlike") print(self.te.isReadOnly()) pass
0
36531645a2435351e6f35f4c5a232fda
7b893d0ae1be82e25be5598f7ed0bb75
Sincroniza a estrutura do banco 'src_database_file' de acordo com a estrutura de 'dst_database_file'.
class Sync(object): def csync(self): with self.lock: with self.controller.nxConnB.modules.io.open( self.fremote, 'rb') as src: with open(self.flocal, 'wb') as dst: self.logger.info('Syncing db %s'%self.fremote) try: ...
0
4696c4c4276c1e0ccdec95458e23689d
b36a3bb727bb2e90b8556cce6aa7b4eb
Compute covariance and mean of the current sample outputs.
mu = np.mean(samples, axis=0) cov = np.cov(samples - mu, bias=True, rowvar=False) * samples.shape[0] return cov, mu
1
54d1724b8e31c17fd84b8a0a15ac8541
c43dd493abfbd095c079f1043d7e96fa
computes the loss for the whole dataset
class Trainer(object): def eval_loss(self, input_dataset, target_dataset): prediction = self.network.forward(input_dataset) loss = self._loss_layer.forward(prediction, target_dataset) return loss
1
6fd4bce521e4104ba272349babe67dc2
1ddeaf62ce146c479f75ff51b56c0652
Get the word that this verb represents
public class Verb @Override public String toString() { return this.get(); }
1
be9ee5ba4c61b10d9a30e8cb6421b07c
b190305cad5973a784c3f07058383a71
create a utility function that assembles the necessary options
function generateOptions(host, port, path, username, password, method, connection, contentLength, contentType) { return { host: host, port: port, path: path + (username ? ("?username=" + username + "&password=" + password) : ""), method: method, headers : { ...
1
739e8d6c9a666b17406ec050fd6763b0
da6bac7d9562539ac7ecfcce36d907e2
Enable delete folder button
class MainActivity : AppCompatActivity() fun enableDelete(boolean: Boolean) { menu.findItem(R.id.actionDeleteBtn)?.isVisible = boolean }
1
1ab4e864e2ed49182b201622789c8ecf
dc4ca7ce2305e5fa45cf83fe5c1e7bf8
递归更新父节点状态
const parentKey = flatState[nodeKey].parent; if (typeof parentKey == "undefined" || this.checkStrictly) return; const node = flatState[nodeKey].node; const parent = flatState[parentKey].node; if ( node.checked == parent.checked && node.indeterminate == parent.indeterminate ) return; if (node...
1
277a36f0b2c7f6602f3486f3d6c41053
38c0599eb5de77931c4bd39dc9184361
Get activated sub modules by main modules.
@Service("securityService") public class SecurityService public List<String> getActivatedModules() { List<String> activatedModules = new ArrayList<>(); for (BasicDynaBean module : securityRepository.getActivatedModules()) { activatedModules.add((String) module.get("module_id")); } return activated...
0
a599f4bc7784f0c86cc049239aa7f63a
487e2466a507108b384dc5adbbccbdb2
Run several jobs with limit on maximum concurrent jobs
{ var exceptions = new ConcurrentQueue<Exception>(); var options = new ParallelOptions() { MaxDegreeOfParallelism = maxThreads }; Parallel.ForEach(jobs, options, job => { try { job.Invoke(); } ...
1
9b90d7f7c26f9a3448329da1e773526f
8436152b0bde1d93e91c961964f26cce
перевірка на спільність однакових комірок між таблицями перебирає кожне значення(масив) з групованого масиву і порівнює їх між собою
public class MagicSquare private boolean comparing_strings() { for(int[] temp : mas) { int value = sum(temp); if(f_sum != value) { return true; } } return false; }
0
c430fb6b44800839de0275b37c30480e
4a237751fdea746b9b1518e0520d5a2d
次の問題へ進むボタンがクリックされた時の関数 画面を初期化して、再度コンテンツを開始する
countTextView.setText((questionNumber + 1) + "問目"); Quiz quiz = quizList.get(questionNumber); optionButtons[0].setText(quiz.option1); optionButtons[1].setText(quiz.option2); optionButtons[2].setText(quiz.option3); startProgress(); }
0
2fb232cd84c43525d8b34cb4d0be0432
c460c8b5f2dfb302aaf91bf0bbe9e903
Update the port name of the switch
{ if ( port == NULL ) return; if ( strlen(port) == 0 ) return; if ( portnum != NULL ) free(portnum); portnum = (char *) calloc(strlen(port) + 1, sizeof(char)); strcpy(portnum, port); }
0
84ed477916c9d736e6d1b9efd4431f75
d639b7bfc696506bc2738d0ff018c0f8
获取好友群信息
$account_code = $this->account_code; $model = new Model\FriendsGroupModel($account_code); $data1 = $model->getGroup(); $model = new Model\UserFriendsModel($account_code); $data2 = $model->getFriendsNum(); if($data1){ foreach ($data1 as $k=>$v){ ...
1
cec0e1bbafc585811090b344fc1c5b3a
628d5e9c2cc8c56ed3aea30a6ff0c455
@brief - This function enables or disables peripheral clock for the given SPI peripheral
void SPI_PerClockControl ( SPI_RegDef_t *pSPIx , uint8_t EnorDi ) { if (EnorDi == ENABLE) { if (pSPIx == SPI1) { SPI1_PCLK_EN(); } else if (pSPIx == SPI2_I2S2) { SPI2_I2S2_PCLK_EN(); } else if (pSPIx == SPI3_I2S3) { SPI2_I2S2_PCLK_EN(); } else if (pSPIx == SPI4) { SPI4_...
1
2672e745ba2edf82e1fbe1e08449108c
f8602e2b7e6a904dbab282bfce7e5938
Atvaizduoja konkrecia kategorija su Postais
{ $model = ActiveModel::where('slug', $category)->first(); $view = view('categories.index'); $view->model = $model; $view->data = ('App\\' . $model->name)::all(); return $view; }
1
8f2533ff56b2673b49ae479b673d4994
ebe9b428e011788f9ade22903496db82
Deletes the security identity from the database. ACL entries have the CASCADE option on their foreign key so they will also get deleted
with db.connect() as session: identity = find_identity(session, identity_id) if not identity: raise NotFoundError(entity=identity_id) delete_identity_db(session, identity)
1
0c50cbe01e216fc5075d9bf69f1f0c42
2d511092dacd30b6369d478a04ad4d58
读conf.ini配置文件获取host
global HOST,user,pwd,active,server,INTERVAL,PER_COUNT,test_time,ac_root_pwd,data_path,run_mode,active try: with open('test.conf','r',encoding = 'utf-8') as conf: for line in conf: line = line.strip() if line: if line.startswith('#'): pass else: key =line.split('=')[0].strip() ...
1
03941e4a483efec9fa8c456561dd438a
5b737e332b4692e80320ad129e123a60
pybricks.iodevices.UARTDevice.clear
STATIC mp_obj_t iodevices_UARTDevice_clear(mp_obj_t self_in) { iodevices_UARTDevice_obj_t *self = MP_OBJ_TO_PTR(self_in); pb_assert(pb_serial_clear(self->serial)); return mp_const_none; }
1
ec6aca7d7c8c752762435082aec76b68
795f16310b29d065dd4d79daa2268e59
Ожидание появления определенного текста на элементе на странице
from selenium.webdriver.common.by import By from selenium.webdriver.support import expected_conditions as ec self.wait_until( ec.text_to_be_present_in_element_value( (By.CSS_SELECTOR, css_selector), text), timeout )
1
b5c408c786be123e2c152f45e6c9cfcb
de257184cede6c8011ee2194beb742fa
GET: PainelGestor
{ ViewBag.m = PainelGestorListaMaquinasE(); ViewBag.t = PainelGestorListaTurnoE(); ViewBag.r = PainelGestorRanking(); ViewBag.oee = PainelGestorOEEChart(); ViewBag.tm = PainelGestorListaTurnoMaquinas(); return View(); }
1
8ea2840facc5df509602c2a17ed3db61
29af778898dc9fc7ce5cf08a97b77ebb
Checks if word is singular.
{ if (Inflector::singularize($string) === $string) { return true; } return false; }
1
5f822096c078929ae377c4e4d3367e70
8d9af68cb64b874e0d16934105535d43
Check access to the new free fiber request dialog
$admin_permission = $this->entityType->getAdminPermission(); if (\Drupal::currentUser()->hasPermission($admin_permission)) { return AccessResult::allowed(); } return AccessResult::allowedIfHasPermission($account, 'add request entity'); }
1
c12c13229182ee847867bb87a7eae1de
edeba823b660ba54132e47de48bde62d
получение страницы через POST
function api_send_post($url, $params) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_HEADER, false); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_POST, true); curl_setopt($ch, CURLOPT_POSTFIELDS, encode_url_params($params)); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $answer ...
1
9d1328d672cdce694039a620f258673c
374f90415cba3bd341e0ff57fca486ed
TestAdjustmentCurrencyCodeValid validates Adjustment CurrencyCode
namespace Iata.IS.Business.Pax bool ValidateCurrencyAdjustmentIndicator(string currencyAdjustmentIndicator);
0
934b875f4801abf135c2e8aa32576265
53e7b0b87fda1d6ae3329fe12e1b6056
Pick up an object. (Doesn't check if it can be picked up)
{ Collider2D pickupObjectCollider = m_PickedUpObject.GetComponent<Collider2D>(); if (pickupObjectCollider != null) { pickupObjectCollider.enabled = true; Physics2D.IgnoreCollision(m_Collider, pickupObjectCollider); } m_PickedUpObject.Throw(m_Character)...
0
e73b432f37c2ae245a44f90ca4254dd2
c01ea1a15e0d576ba5bbe0ec2ac0e9fa
Realiza consulta sobre serviço infoconv
class Service extends \SoapClient public function FECAEAConsultar(FECAEAConsultar $parameters) { return $this->__soapCall('FECAEAConsultar', array($parameters)); }
0
2787118b1c7bab425041f0d9a6522d92
50267780534784f0a084f989262d3e8c
通过appKey和httpUrl精确匹配转化接口
ConfigMdo findByAppKeyAndUrl(String appKey, String url);
1
f3db321bc17d340cc046851321fc1196
8b9bfb6701317d7bb6623de5a6cd08f4
Shows the user's ten most recent activities
class ActivitiesView(generic.ListView): def get_queryset(self): return Activity.objects.order_by('-startTime')[:1000]
0
8868895bab57b4a7ec5e2d484f23a102
e17ec5e8074442c0477d9a659aa4f3ba
Deletes the given sale product from the current sale The sale product to delete
public void delete(Sale sale) throws EntityValidationException { try { validator.validate(sale); entityManager.remove(sale); entityManager.flush(); } catch (javax.persistence.PersistenceException ex) { throw new EntityValidationException("Failed to del...
0
e0a4de3328736bd5e70bd76f1bd97245
a9a7d919d2264e63abdc39eb66ef1e73
generate 8-bit random number
uint8_t pseudo_rand_8() { static uint16_t seed = 0; return (uint8_t)(seed = (12657 * seed + 12345) & 256); }
1
d9eb0918064221996f2d735d8907fc60
33f17483078b28182a767b28990dc6a6
Wrapper function for the helper function that factors the input integer into unique prime factors.
prime = 2 map_of_factors[num] = 1 while (prime * prime < num): exponent = 0 while not num % prime: num = num / prime exponent = exponent + 1 map_of_factors[prime] = exponent prime = prime + 1 return map_of_factors.values()
0
88775da89acbb2bb502231f20d9966d4
27d6a12064a3c650b3a17fa9356e38e0
Show friends that the player can challenge.
class TicTacToeHandler(DefaultScript): def _init_invitation(self, participant): participant.ndb.game_handler = self participant.cmdset.add(self.InvitationCmdSet) participant.msg(list(self.db.participants)[0].key + " challenges you to Tic Tac Toe. Accecpt? (Y/N)")
0
0d960a9804601e91e772066bb47e375e
5378497ae7ba60294c151be9101d5895
Sorts the array in reverse by key, equivalent to krsort() function
function natksort($array) { $keys = array_keys($array); natsort($keys); foreach ( $keys as $k ) $new_array[$k] = $array[$k]; return $new_array; }
0
ee87b6144d33dc92525a25d8ba17d1f7
5552367e84db4db04c76340f8cc4184f
Extract 'keywords' from excel file and return it as a list.
def read_keywords(fpath): excel = xlrd.open_workbook(fpath) sheet = excel.sheets()[0] keywords_list = list(sheet.col_values(2))[1:] words_list=[] for keywords in keywords_list: keyword_list = keywords.split("/") words_list.append(keyword_list) return words_list
1
1a9fc66e76696dcc5a1104a6cb6336a6
e35f90fe150cf5af1c34ec61a03194c0
Calls the model function to add the provided data as a new metar cache record Except when the metar record is an "METAR Unavailable" record, in which case execution skips the model call
new_entry = Weather(time=weather_data['time'], longitude=weather_data['longitude'], latitude=weather_data['latitude'], description=weather_data['description'], temp_min=weather_data['temp_min'], temp_max=weather_data['temp_max'], pressure=weather_data['pressure'], ...
0
7e5ed133dc6f973d5f2804212755ecd0
a807348a355e8aede7d8caae792f9e70
Фиксированная клавиатура
class ErrorView(PhotoView): def build_keyboard(self) -> Keyboard: return Keyboard(Button("Главное меню", {"type": "main"}))
1
e08fe015cb6085a930dcaefae1a56a63
2ff0452b78dfe0561ff9f61a4fc9f546
Тестирует работу стратегии на определенном количестве элементов.
public function testDefaultStrategy() { $result = $this->query( Query::createMatchAll() ->setScoreStrategies( ScoreStrategies::createEmpty() ->addScoreStrategy(ScoreStrategy::createDefault()) ) ); $this->...
1
0d29dddf7dbc87c03dc6d015ccc70f7a
73ef16c2ad2c3db8663cf27f97d3d7f0
Compute portfolio's total value.
class PortfolioController extends Controller public function getPortfolioValue($data, $tickers) { $prices = $this->getAllPrices($data, $tickers); return $this->sumAll($prices); }
1
2bd9800f162926b43640163d34870bee
146c91cf78bc82c30abaa01d87aead05
Prints shortest paths from start to all other nodes
namespace DijkstraExtraCredit public class ExtraCreditGraph public void ShortestPath(int sourceVertex) { var shortestDistances = new int[NumberOfVertices]; var vertexExtracted = new bool[NumberOfVertices]; for (var i = 0; i < NumberOfVertices; i++) { ...
1
32a2802587eb515d1cd5bd98aa874b04
2c3aa056dadca2526fd0b34f9a44592b
Removes the goal food.
var tf = fFood.transform; for (var i = tf.childCount - 1; i > 4; i--) { Destroy(tf.GetChild(i).gameObject); } }
0
ce887b90716e0c2f65b53761b4c69cbf
93d02bc2dffdc1d67a2c29d014f2b710
Parses content using <see cref="IParserService"/> and creates AST.
namespace NFX.CodeAnalysis void Parse();
0
7a94de773467225311c5b0ebbf99201a
e936a0d25add5708a27a43895db0958c
Make a veth pair connecting intf1 and intf2. intf1: string, interface intf2: string, interface returns: success boolean
def AddVcanInterface(): ret = os.system("sudo ip link add dev vcan0 type vcan") return ret
0
5d3f262f59f033f1a2d449157e4caaa3
7fc496aeb1b6b3cf7397d656fe0a536e
is the parameter less than the base value?
class WorkflowForm{ protected function lt($value, $rule) { return $value < $rule; }
1
295a7cc65a0b853969fe92981866cf28
4cb2375067037c1114829a7b0b6b6f79
修改指定字符的大小
function string.chsize(char) if not char then return 0 elseif char > 240 then return 4 elseif char > 225 then return 3 elseif char > 192 then return 2 else return 1 end end
0
7b3e247b039fef91cdabdaf4a12ab9ae
fab33fd308bdaa92e5157867eacb7d51
Provede přípravu obsahu StatusBaru. Pozor: Bázová třída <see cref="DxRibbonForm"/> nastaví <see cref="DxRibbonBaseForm.DxStatusBar"/>.Visible = false; nic jiného neprovádí !!! To proto, když by potomek nijak se StatusBarem nepracoval, pak nebude StatusBar zobrazen. U této metody tedy není vhodné volat base metodu, aneb...
namespace Noris.Clients.Win.Components.AsolDX public class DxRibbonForm : DxRibbonBaseForm protected override void DxMainContentPrepare() { this._DxMainPanel.Visible = true; }
0
cfbf99e8851f64e245cc87f474f4f4d2
eadf7279ee745c5595284c52b69adfcd
获取一行数据, 如果文件获取完,返回空
while 1: self.line_num = self.line_num + 1 record = self.file.readline() if not record: if self.debug: print "Line %3d: EOF"%(self.line_num) raise dfd_eof,self.line_num line = Line(self.line_num,record) if line.empty(): continue return line
0
3ced1fa501174dbf7768be1f7679dc26
def0b297d13e6ba2ef3e014846b400f7
Verify the cost function for BBox parameters.
placer_costs_t* placer_costs_ptr) { double bb_cost_check = compute_bb_cost(CHECK, placer_opts_ptr->place_cost_type, placer_opts_ptr->num_regions); printf("bb_cost recomputed from scratch is %g.\n", ...
1