query_id
string
corpus_id
string
query
string
code
string
label
int64
77ec3e2aba7e27ae0caa3d0885dccff2
d18a9d2011e79f2763e95d3318668554
Asserts the exchange state after a call to `matchOrders()`.
this.state.exchange.LogOrderSubmitted({}, {fromBlock: 0, toBlock: 'latest'}) .get((err, orders) => { for (let i = 0; i < orders.length; i++) { this.state.exchange.orderBook_(orders[i].args.id, (err, order) => { if (order[4].toNumber() !== 0) this.addOrder(orders[i].args) ...
0
926df1b9e8716d09dfc8cf239bff3cd5
81d1574516c9d00b304ba9c3c95b6956
Decrement the wiper setting. For more information see the docstring of inc_wiper function.
if self._cx + self._cw >= 0: self.erase() self._cx -= self._cw self.flush()
0
d01a3c1c973abb911b4cf825a99b3782
c635ca1c20500be9e9abb19c0aecb750
获取已选择的歌曲实体集合
List<RemoteFile> selectedList = new ArrayList<>(); SparseBooleanArray selectedItemPositions = mListView.getCheckedItemPositions(); for (int i=0; i<mListView.getCount(); i++) { boolean selected = selectedItemPositions.get(i); if (selected) { selectedList.ad...
1
bbae1175f8ce2a285b838e8cc5ae4fb8
e25a7b84872b8e8b0a526f127a7c4830
拼接 git 命令
{ $parts = ['git']; if ($username = array_get($this->config, 'git_username')) { $parts[] = '-c'; $parts[] = escapeshellarg('user.name=' . $username); } if ($email = array_get($this->config, 'git_email')) { $parts[] = '-c'; $parts[] = es...
1
810cd40408ded237d67ad9c7faa5d474
cd2967ccc46a023f187346efb9ab971e
Test simple image list actually returns images
mock_imread.side_effect = [[[[0, 0, 1]]], [[[0, 0, 2]]], None] mock_listdir.return_value = ['file1', 'file2', 'file3'] result = core.collect_images('sample/') expected_result = {'file1': [[[0, 0, 1]]], 'file2': [[[0, 0, 2]]]} self.assertDictEqual(result...
1
4540f57dbe7b538db85b1ba1ee162ed3
2eceaf2543038ec37d5e73cf19f3bae4
Extract all parameters which are not required directly by the method signature and could be used in building a query
{ var paramFinder = new ParameterFinder<User>( lambdaExpression.Body, new List<string> { "Type", "ID", "UserID", "ScreenName", "Pag...
1
bb957a8b766f9e5f299485e3af5b6b9c
acb1abcf478613a9fb40a66b250b0bf6
This method is called, when the hosting application sends new data to DirectOutput.<br /> The IPlugin interface requires the implementation of this method.<br/>
namespace Baize.IPlugin string ControlDriver(byte[] data);
1
b33417c20b9b42044cec7516f8b6e6af
f8b9c13ddcf36cea106528cedbc469a4
返回链表⻓度,时间 O(1)
if self.is_empty(): return 0 count = 1 cur=self._head while cur.next != self._head: count+=1 cur=cur.next return count
0
4bc4fdcd91005b779a902384cc4d246a
ff3ab3220232a2c5261a24dd7ceb31de
Click handler for help
function onHelpClick() { window.open("help/tutorial.html", "help"); }
1
700e5ee3fca5bf8426246b4ac0ad6f88
eb24c44916331882585b91ba3978b62f
转换牌面数字,在上述函数中使用;
transForNumber(number) { switch (number) { case 1: return 'A' case 11: return 'J' case 12: return 'Q' case 13: return 'K' default: return number } }
1
b7fea289e7661b7ef09e579c7f9e3bfc
d4db18f3b45d3adef7cb95ee0250a9be
Ініціалізація клієнта. Запуск очікування повідомлень від клієнта в окремому потоці.
class Client: async def start(self): await self.client.start( phone=self._get_phone, code_callback=self._enter_code, password=self._enter_password, ) logger.info(f'Авторизация в аккаунт прошла успешно') self.client.add_event_handler(self._new_message_h...
1
b17f04372b364931677723726d13a9e6
045c9e29d30c6d5b9d091ea71e90f134
输出1联调响应
func firstResponse() string { ch := make(chan string, 10) for i := 0; i < 10; i++ { go func(i int) { ret := runTask(i) ch <- ret }(i) } return <-ch }
0
1c97ed2b0962da4a75be0cea8694d495
51f6362b7b1682454ccab484285772b0
Change side of track and sectors.
WRITE8_HANDLER( cgenie_track_w ) { if( (readinputport(0) & 0x80) == 0 ) return; wd179x_track_w(offset, data); }
0
74514e55a0975e50118fad1ace64070a
12ed32bd4b05a8ff9bb10397ce9ee40c
#Shrink seasonal indexes according to the James-Stein approach
sureshrink.cass<- function(d,covar,vard,tau,mu){ ntau<- length(tau) if (ntau>1){ mse.cass<- matrix(0,ntau,1) temp<- matrix(0,ntau,2) mse.or<- matrix(0,ntau,1) for (i in 1:ntau){ tt<- tau[i] z1<- d[covar<=tt] z2<- d[covar>tt] p1<- length(z1) p2<- length(z2) temp[i,...
0
3d1c4556fd9d5fd43984ddcf925f6d8e
1246be7e437ee630b4449c555aab05ca
Setter for <code>NBC_PATIENTS_NBC_PROC_LST.NBC_PATIENTS_N</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class NbcTargetHisRecord extends TableRecordImpl<NbcTargetHisRecord> implements Record10<Long, Long, Long, Long, St...
1
fd9963e6b53a637558848646592994e1
388346b4bfe7d272cb9fe303cbf179b6
Returns a NotConstraint applied to its argument.
namespace Css.Domain.Query public class QueryFactory public IConstraint Not(IConstraint constraint) { if (constraint == null) throw new ArgumentNullException("constraint"); if (constraint is NotConstraint) { return (constraint as NotConstraint).Constraint ...
1
366fbfcd9fb523b8c115ef610ebc3442
b84cf87109fae94d8b658ad5091eaf5a
Smarty outputフィルタ( UTF8 -> SJIS )
if( self::$charset === self::CHARSET_SJIS ){ return mb_convert_encoding($value, self::CHARSET_SJIS, self::CHARSET_UTF8); }else{ return $value; } }
1
4da5934fb838ceea74440ed0f99b6d58
0cf1d086dd4db07e9226c1bc511fb3bc
点击确定时的回调,此方法能在初始化对话框定义事件时直接使用选择的日期字符串
public class MingXiEditorActivity extends BaseActivity<BaseActivityPresenter> implements View.OnClickListener @Override public void onClick(View view) @Override protected void onBtnOkClick(String year, String month, String day) { String days = DateUtils.getDays(System...
1
19dc48c9b9270ce69d4a30fafe99e8b7
8ee5e38055cb5789c898754e36602017
Bloquea el picker para que no responda a las acciónes del usuario.
namespace WPF_Memory public partial class MainWindow : Window private void bloquearBotones() { bloqueoBotones = true; }
0
a1dba615bc49ce72db3aa5fe39323856
cacd26716b257f53fab15839990f52ad
Send app group definitions to Marathon.
class MarathonSubcommand(object): def group_show(self, group_id, version=None): client = self._create_marathon_client() app = client.get_group(group_id, version=version) emitter.publish(app) return 0
0
4f264a4a93c4f8af05a1c3b2fea8762b
873966ca4562cb940aa93d946e786e4c
Pause the <code>{@link org.quartz.JobDetail}</code> with the given key - by pausing all of its current <code>Trigger</code>s.
public void pauseTriggers(GroupMatcher<TriggerKey> matcher) throws SchedulerException { validateState(); if (matcher == null) { matcher = GroupMatcher.groupEquals( Scheduler.DEFAULT_GROUP ); } Collection<String> pausedGroups = resources.getJobStore().pauseTriggers( matcher ); notifySchedulerThread( 0L ...
0
542728342ad7eb4389f5718c51fd66f3
1e3aa0c2097f82c17bd28b08404178d7
将一个或多个填充器添加到委托列表中.
{ if (appenders == null) { throw new ArgumentNullException("appenders"); } _appenders = appenders; }
0
a369b1a953a7d61c20172caa832e4148
4fa72d6951de2c065a9cdeab2fc13fa2
Find texture coordinates for an object-space point.
{ Vector2 TextureCoordinate = new Vector2(0); if (m_pWorld.m_pPlanet.m_eShape == WorldShape.Planet) { float fLongitude = (float)Math.Atan2(pVertex.m_fX, pVertex.m_fZ); float fLat = 0; if (fLongitude > -Math.PI / 4 && fLongitude ...
1
2723d4d0235375c787fed91a1f27b8be
d9e98d17d0951d73d2ba47a5e8fb2c15
ssn1의 정보를 변경하는 setter
void Employee::setSocialSecurityNumber(const string &ssn) { socialSecurityNumber=ssn; }
1
0fff43da21fda2b1f53f65fc92253897
65799c01329243b85c9f1f63687105cf
Returns top ten deputies by topics (and/or subtopics).
conn = self.pool.getconn() with conn.cursor() as cursor: cursor.execute( """ select person, json_agg(json_build_object(section, count) order by count desc) from (select gp.raw as person, ...
1
5e1f69c7c11d4abd5957e86d8a8c1c9e
c2a27d59e9dc7adc8f6fa3c200800ab1
הפעולה מקבלת תעודת זהות וסיסמא ומחזירה אמת אם המורה קיים במאגר
$data=$this->connection->selectValues("SELECT LNr FROM ".$this->tables["user"]." WHERE email=\"$mail\" "); if(count($data)>0){ $teacher=new Teacher($this,$data[0][0]); return $teacher; } else{return null;} }
0
47cc27c3dae08ec33e5c0713bdb0f5b3
04f1dede32c15a27641a56609ca01841
Update settings to ensure no error on load
if (this.importOrdersSince) { try { let m = moment(this.importOrdersSince); if (! m.isValid()) { this.importOrdersSince = null; } } catch (err) { this.importOrdersSince = null; } } if (!this.stockBuffer || isNaN(this.stockBuffer) || this.st...
1
ed35d671b4544f2ee592d4b585084566
9164fcf7e873f7d6121a920d376542b3
Generate methods for {@code reactor}.
ReactorInstance mainInstance = new ReactorInstance(federation, messageReporter); new ReactionInstanceGraph(mainInstance); insertIndexers(mainInstance, resource); for (ReactorInstance child : mainInstance.children) { for (PortInstance output : child.outputs) { replaceConnectionFromOutputPo...
0
da96c77f0504f0a09630210663e815a5
384d80315e52ae4bc47ae3befc7c2a35
读取技能表格
export class ConfigReadData protected readSkillGroup(stream:BytesReadStream):void { var config:SkillGroupConfig; var len:number=stream.readLen(); this.skillGroupDic=new SMap<number,SkillGroupConfig>(len); for(var i:number=0;i<len;++i) { config=new SkillGroupConfig(); config.readBytesSimple(stre...
1
16ce5f4eb8fc6f9f81d3f663ec91a17b
4f4817b541294e197406ffb66c1f4f97
Calcul du nouveau θ à partir de θ_prec, lors d'une itération de la descente de gradient stochastique
def descente_de_gradient_batch(): iteration = 1 tau = 10e-8 theta_prec = np.array([0, 0]) theta = next_theta_batch(iteration, theta_prec) error_prec = mean_squared_error(theta_prec) error = mean_squared_error(theta) while abs(error_prec - error) > tau: iteration += 1 theta_prec = theta error_prec = mean_sq...
0
8110665f12df15f39052f4d432f13e3e
c462ccb84ae1ac8fa07472381a770eb7
返回采集到的书名集合
class QidianSourceSpider(RedisSpider): def get_books(self): books = set(i['book_id'] for i in mongo_db['material_index'].find({'source_id': 1}, {'book_id': 1})) self.books = books
0
21b8e7dff10866e497d63650ff5ec262
39d72e0de3afac069d690a13edbb9c31
ident_expression : ident
class NstlParser(object): def p_id_expression(self, p): p[0] = p[1]
1
5a03d024320123b25b3bc6211776a3ae
e51f8c921b3284dab94aa6c0c920407f
Gets the alerts_trendline of this DashboardStatistics. # noqa: E501
class GetCredentialIssueTrendResponse(AbstractModel): def __init__(self): self._Trend = None self._RequestId = None
0
ea1675f58f6e743b7e1ee00b0273deb0
8ce1fc5b539da3c14cce674f740152c2
To standard unit of measure
class GoogleFitHeightSensor(GoogleFitSensor): def unit_of_measurement(self): return const.LENGTH_CENTIMETERS
1
dbaa024bd489df15e882e3e282d06be6
313d9c56b1c4937024218394640f8877
搜索指定扩展名的文件A (递归使用)
{ try { List<FileInfo> lst = new List<FileInfo>(); string[] dir = Directory.GetDirectories(path); DirectoryInfo fdir = new DirectoryInfo(path); FileInfo[] file = fdir.GetFiles(); if (file.Length != 0 || d...
1
335b48b1cb8167c6911dbd5ee79c3bc9
a525b1e4973a34211c1ff52573b7fda8
Stores all column aliases in the query.
where I: IntoIterator<Item = S>, S: Into<Cow<'a, str>>, { self.command_alias = command_alias.map(|v| v.into_iter().map(|s| s.into()).collect()); self }
0
2cb969e18212b25ff457f08fb67d9a22
c7c911d79c830dc6670334a83278703b
判定技能按钮是否显示
local tSkillInfo = CfgData["cfg_skill"][nSkillID]; if tSkillInfo ~= nil then if tSkillInfo["show_hit"] == 0 then return false; end end return true; end
1
e7b14f67dc2fc2bada4a315311a7145c
abf9da7a64f8dc2f04957a347fd29329
Declare specific metaconstraints to use
return (object: object) => { defaultMetadataStorage.addConstraintMetadata({ object, }); }; }
0
6e370ac1b0036fdc609dff683390dc25
0582af1cbfcee01418038c0436632bb1
Initialise les parametres et début de la capture de l'accelerometre
{ uint16_t ctrl = 0x0000; HAL_Delay(1000); if(Accel_ReadID()==0x68) LD2_ON; else Error(); LD2_OFF; GyroInit(ctrl); LD2_ON; }
1
5f3d521e594fc53a14822c0f3c2d3ad3
1a39b557bb007f0303e5a9981c9cebf0
Vrátí název property pro vlastnost typu Money z daného sloupce. Pokud daný sloupec nemůže být
{ Column column = table.Columns[moneyPropertyName + "Amount"]; if ((column != null) && ColumnHelper.IsIgnored(column)) { column = null; } return column; }
0
892b0aa958772e92eefa511c99703c89
fd41c2ff0ffa2f45ff5ab5e75527f5f3
根据单据类型取单号
public String getBillNumber(String billTypeName) { WareBillTypeExample example = new WareBillTypeExample(); WareBillTypeExample.Criteria criteria = example.createCriteria(); criteria.andIsDelEqualTo(PlatformConstants.ISDEL_NO); criteria.andBillTypeNameEqualTo(billTypeName); List<WareBillType> billTypes = bil...
1
77d68603e36197ed2c344dc11945a1c7
e0f8c0300d54ea58cff5b5fe903b892f
Method to call GetLIBOR Meta informations :
[OperationContract(ProtectionLevel = ProtectionLevel.EncryptAndSign)] MemoryStream GET_LIBELLE(MemoryStream xml);
0
c871aac91e65a61d6abd7471a5e1920d
db044385bef1b99dbd40eb0de452df45
Gets OAS 3.0 schema mapped to current class.
class InlineResponse200 implements ModelInterface public static function getOpenApiSchema($assoc = false) { return json_decode(static::MODEL_SCHEMA, $assoc); }
1
025d4946cc9af5417e8061797999d524
ebfbdc0b7d40c05d21ef272ea9e78f00
处理资料任务开始上传
String startKeyUpload(UserInfo userInfo, String content) throws DlabException;
1
cdb6dfc98697af53b57bfd5e5155e93e
d5cc52a420db3965b8ca3e7f7b77a0a3
\brief Called before main ()
void k_startup () { extern void *k_stdout; kdevice_set_initial_stdout (); k_memory_init (); arch_init_interrupts (); arch_register_interrupt_handler ( SOFTWARE_INTERRUPT, k_syscall, NULL ); arch_register_interrupt_handler ( INT_STF, k_memory_fault, NULL ); arch_register_interrupt_handler ( INT_GPF, k_memory_fau...
1
ae12e60b2423121d10982536bd791681
ccaaf0d01a013e71b78fa27b346937ce
回傳購物清單是否含帶規格產品
class OrderProduct extends BaseOrderProduct public function getHasOptions() { if($this->countOrderProduct2OptionProducts()) return true; return false; }
1
7181d5742166670160bb71ca97405b02
ef1c8ad17b143e5091a9b6e2e8fab55b
静态类初始化
{ $fqcn = __NAMESPACE__ . "\\{$class}Staticall"; $def = static::createStaticallClass($class); if (function_exists('eval')) { eval($def); } else { $cachepath = self::$cachepath; if ($cachepath === null || !file_exists($cachepath) || !is_dir($cachep...
1
edea024da04ac7951df5fef35ff2d4c1
b34036efafe49820d6a6f66e8d8e49ef
Gives a user a 'nope' gif.
class Memes(commands.Cog): async def he(self, ctx: commands.Context) -> None: await ctx.send("he eatin") await self.bot.wait_for("message", check=lambda msg: msg.channel == ctx.channel) await ctx.send( "https://cdn.discordapp.com/attachments/637464445588602931/" + "637464...
0
1931a4e353c793c18d3b15e116ad2508
33f48a6d91f01c1356461112b0dcb402
シーケンスの最初の要素を返す。シーケンスに要素が含まれていない場合は null を返す
this: AsyncSequence<T>, predicate?: (value: T) => boolean ): Promise<T | null> { if (predicate != null) { return this.filter(predicate).singleOrNull(); } const first = await this.iterator.next(); if (first.done) { return null; } if (!(await this.iterator.next()).done) { ...
1
333783c61d7ae80f625d0b3e95dfbdc2
810929786b2ac2acd9e8b0e53f6bea81
加载省市列表
function listProvice(){ var obj = new Object(); obj.ckuid=sessionStorage.getItem('ckuid'); obj.cksid=sessionStorage.getItem('cksid'); parent.loadShow() $.ajax({ url: http+"listProvice", type: "post", contentType: "application/json", ...
1
c95579a8c85267b4ba4ed9d06f45a39f
9e8bdb183ae368e7a53d5f16e5b89c3a
Teleporte sur deadLocation de la tombe / Grave
{ if (estTombante) { if (compteur < 3) { transform.localRotation = Quaternion.Euler(rotationIni.x,rotationIni.eulerAngles.y, Random.Range(-5f, 5f)); } if (compteur >= 4) { if (compteur <= 13) ...
0
c85dfc1eb06ac4c2ebf983c292d546b8
a11da3650bb0181ec5b2721a7df1f5df
catch and remove constant bounded blocks
func removeBoundsChecks(f *Func, m map[*Value]indVar) { for _, b := range f.Blocks { if b.Kind != BlockIf { continue } v := b.Control if v.Op == OpIsInBounds || v.Op == OpIsSliceInBounds { ind, add := dropAdd64(v.Args[0]) if ind.Op != OpPhi { goto skip1 } if v.Op == OpIsInBounds && add != 0 ...
1
756c125af5a4e035affeebc4d0da7d43
48da9afcc0f93007805ba37a9470ce79
Generate a set of gaussian ring centers.
circPos = [] anglesegment = 2 * np.pi / setsize jitter = 0 if shuffle: jitter = np.random.random_sample() * (2 * np.pi) for i in range(0, setsize): x = r * np.cos(jitter + i * anglesegment) + cx y = r * np.sin(jitter + i * anglesegment) + cy circPos.append((x, y)) return ...
0
cad611e7e3d167a9765c885b2745a692
b8c535efc367d10a4e119743bec803e8
Displays gender views and sets up gender picker dialog
function didSelectGender(element) { selectedGender = element.value; $("#age-group-selector").css({"display":"block"}); getAgeGroups(); }
0
bb7ead9826f11446f87a7184af86109f
b4673eea7a972437a4bfb30d05329bf4
Returns true if the passed node is selected, else false. ...
class ViewNode(private val node: AccessibilityNodeInfo, path: Int = 0) : ViewNodeInterface fun isSelected() = node.isSelected
1
36806f9f4834b5e482ee525c3483ce3c
a7cfd3fcc2ce2903dd9afafee75e9c77
Verify only admins can access pairings.
if not (request.user.is_staff or request.user.is_superuser): return HttpResponseForbidden() year, semester = self.latest_os.current_year, self.latest_os.current_semester active_users = ActiveUser.objects \ .select_related('user') \ .filter(active_year=year, ac...
1
11a6be359943686cd3356bd398bd433a
9422e5e9c07292ae3708b09795cd6363
Informs the partner that an exception has occured at runtime (thus the event should be backed out).
{ StringBuilder message = new StringBuilder(string.Empty); message.Append(description); message.Append(" Partner ID : "); message.Append(partnerId); message.Append(" client-ip : "); message.Append(Page.Request.UserHostAddress.ToString(CultureInfo.InvariantCulture)); message.Append(" url-referrer ...
0
99c8186fcbbd95b8121a640edb25701f
d945ac507bad55f8d7ef29ac81ba1680
线程中运行的程序,这个程序每隔 1s 判断是否需要停止并打印自己的 ID
void * thread_main(void * para) { int i = 0; while (1) { i = (i + 1) % 1000; } }
0
7513e130957cc17d24084a55304f8042
3081800ba81890861e25fc0baf168e13
The method checks if an override could be 'applied' to the specified node/attribute
{ $parsed_spec_name = $this->parse_tag_and_attributes_from_spec_name($parent_spec_name); if (!$node->parentNode || $node->parentNode->nodeName !== $parsed_spec_name['tag_name']) { return \false; } foreach ($parsed_spec_name['attributes'] as $attr_name => $attr_value) { ...
1
ca61c4640b3e15f4c44ead3e06f1d0a5
f7bef76bfd4d479df2e9a706dc08de39
Test Size model default value and string method
{ $type = new Type('writers'); $this->assertEquals(FieldInterface::SIZE_NORMAL, $type->getIdField()->getSize()); $type->expectedDatasetSize(FieldInterface::SIZE_BIG); $this->assertEquals(FieldInterface::SIZE_BIG, $type->getIdField()->getSize()); }
0
cc96ae6d6f89e7c25f16522e8fbb5a84
af0ae9bc834e672677ab8c901b849c20
retorno el primer o ultimo lane si las posiciones exceden el min/max
if(t1==max(t1,t2,Tpila)){ QUAD *newQuad = init_quad(); return newQuad; } else{ return dir; } }
0
53eac0cc5e11cc1683bcb325acbb491c
8588c3cfdec1cb865230170bbf398027
apk 下载成功回调
DownloadManager.Query query = new DownloadManager.Query(); query.setFilterById(mTaskId); Cursor c = downloadManager.query(query); if (c.moveToFirst()) { int status = c.getInt(c.getColumnIndex(DownloadManager.COLUMN_STATUS)); switch (status) { case ...
1
b52ffeb5e59f42c1d7f4dcb9a3dec361
c9047d433867f910eaff2772e18c29b6
Returns the number of coins in money pouch.
namespace PillarKata_VendingMachine public class CoinChanger UInt32 MoneyInVault() { return ((m_coinVault[m_Dollar] * 100) + (m_coinVault[m_HalfDollar] * 50) + (m_coinVault[m_Quarter] * 25) + (m_coinVault[m_Dime] * 10) + (m_coinVa...
0
6d9b227f1f926d9a46b54845dc7c5441
d4e4be9f9e96938375abcc36defb6193
Function to read the Command complete event This will read the response for the command send to BT chip and validate response against response opcode
gatt_rtu_handler_t *rtu_handler) { if (read_resp->status != AT_BLE_SUCCESS) return read_resp->status; else if (read_resp->char_handle == rtu_handler->tp_state_char_handle) { DBG_LOG("Source = %02d",read_resp->char_value[0]); DBG_LOG("Result = %02d",read_resp->char_value[1]); } return 0; }
0
986108563da4ce1473aeac7bf5371876
416e6c48e87d4db03a3727e025f3adfc
Fonction listant les lettres déjà essayées par le joueur
int len = strlen(letters_used); for (int i = 0; i < len; i++) cout << letters_used[i] << ", "; }
1
8651ad9ffae1e8f5205351cbe2d8e4f0
d6744a1a9bd86eabbf04ea387971c54e
Add listener to Update/Delete Employee Dialog components.
AddEditUserDialog.OKClicked += delegate(UserRowData user) { if (AddEditUserDialog.EditMode) { ...
1
370fa092f701d1999ad3058d234b6577
22fa0efe3bbaf158d050168e644acec8
. Add the given army count to the country specified
void ReinforcePhase::placeArmies(int numOfArmies, int countryChoice) { thePlayer->getCountriesOwned()[countryChoice]->addArmies(numOfArmies); thePlayer->addArmiesToPlaceOnBoard(-numOfArmies); }
1
f3767d34f199efa2b129368f4293a6d6
8dc988a02677400c8a6bf870cdb1075d
O(n) Finding the Max element in an Array
{ int max=arr[0]; for(int i=1;i<n;i++) { if(arr[i]>max) max=arr[i]; } return max; }
1
4bbd7dae075f3f4367a24adf4ca1767f
50a24787f8d9c21d2f1e8dbae314c331
表格分页切换
class AttributeTable extends PureComponent pageChange(val) { let params = this.props.params; params.pn = val; this.props.fetchList && this.props.fetchList(params); }
1
033db984278bfad3820650a9531e4fa7
7a277f746694b7d2fc99d28275e65143
add cards to bag
{ if (bag.size() <= 5) { bag.push(item); std::cout << "You have added " << item.getItemType() << " to your bag." << std::endl; } else { std::cout << "You have reached the maximum capacity of the bag." << std::endl; } }
1
ee03e722aa54478004ca5a9ac53bddad
3a38ba3efe43b1fdf1cef1f594818e60
Send ESC key to stop the motors on exit
void ofApp::exit(){ ard.sendDigital(2, 0, true); ard.sendDigital(3, 0, true); ard.sendDigital(4, 0, true); ard.sendDigital(5, 0, true); ard.sendDigital(6, 0, true); }
0
4601302ae8dcbf1c38edf6fa8fb7e6e5
76d9d6365e73be4074bccd8a533f1c7d
如果a和b中有负数,抛出异常
if(typeof a !== 'number' || typeof b !== 'number') { throw 'Expect Number'; } return a + b; }
0
df65f58b3aaa076eddf454469ce1c60e
2f5131499e10179a808146891730a9e3
Returns string representation of CSV filtered to row with given filterFieldValue in selected column
{ var output = new StringBuilder(); bool firstColumn = true; foreach (DataColumn col in table.Columns) { if (!excludeNames.ContainsKey(col.ColumnName.ToUpper())) { if (firstColumn) { ...
0
b48101d04a668eb43c650911e7b074b5
bda23257563406c5792ffec81023a282
Makes the simulator write instantaneous forces of atoms during simulation. - **Note** call this method before running the simulation with :meth:`tools.FrictionSimulation.run_simulation` The format is:: (atom 0 f_x) (atom 0 f_y) (atom 0 f_z) (atom 1 f_x) (atom 1 f_y) (atom 1 f_z) (atom 2 f_x) (atom 2 f_y) (atom 2 f_z) ....
class OutCar(VasPy): # 抽取原子受力信息的正则表达式 # Regular expression for forces information. def last_forces(self): _, forces = self.forces(-1) return forces
0
01d68cb241c83c26c055275538d2b3bc
7acfcd06c5d66a75b4293aae1e2c74f9
Gets the service level objectives for an Azure SQL Database server. server_name: Name of the server.
public final class ServersInner public Observable<ServiceObjectiveInner> getServiceObjectiveAsync(String resourceGroupName, String serverName, String serviceObjectiveName) { return getServiceObjectiveWithServiceResponseAsync(resourceGroupName, serverName, serviceObjectiveName).map(new Func1<ServiceResponse<Serv...
1
3589657f49a847a09772e12e062b552b
b50c48f5eff24a586eb87f19f3b8d99c
Returns :obj:`True` if and only if the model type is *not timed*. Untimed model types are :code:`LTS`, :code:`DTMC`, and :code:`MDP`.
class PBSMMSpecial(PBSMMGenericSpecial): def __object_model_type(self): return 'special'
0
77602a1f7e6be676641c0fd366d1cad7
ab0d93e9954c0660b864f0978e73dd7b
Get the AS2 one-way receive agreement.
public class AS2AgreementContent public AS2OneWayAgreement receiveAgreement() { return this.receiveAgreement; }
1
eab854b343680ef72ba133f82e9a08b2
e7838d22caa7c93f039227f5d219736b
获取外部sdcard上私有存储图片路径(Android文件夹是隐藏文件夹,用户无法操作),path:/sdcard/Android/date/package_name/files/Pictures 应用卸载的时候会被删除 注意:要访问必须有文件读取权限
fun getSDCardPrivateFilesDir(context: Context, type: String): String { return context.getExternalFilesDir(type)!!.absolutePath }
1
025df5c18e0706da32e8cbd047848d24
5564bebe539e6a52508450d3c3764d9a
Register the JPG decoder functions in LVGL
func init() { RegisterDecoder(".jpeg", jpeg.Decode) RegisterDecoder(".jpg", jpeg.Decode) RegisterDecoder(".gif", gif.Decode) RegisterDecoder(".png", png.Decode) RegisterDecoder(".bmp", bmp.Decode) RegisterCfgDecoder(".jpeg", jpeg.DecodeConfig) RegisterCfgDecoder(".jpg", jpeg.DecodeConfig) RegisterCfgDecoder(".g...
1
ebfd9b83d877fbeb0110a68fdf8710f3
78fc5a83f2928502566da759fe5dddd2
Create Presentation Data from Room Entity
{ var prot = new RoomProt { RoomType = model.Type }; prot = await _protDataAccess.Get(prot); var result = new RoomGenModel { Enchanting = prot.Enchanting == 1, Enemy = prot.Enemy == 1, Items = prot.Items, ...
1
116f5c0b2e0812f971aa116e10b3dd86
4597f49ab915e64c78621dffd6537d8a
更新动态分表
class itemController extends Controller async updatePartition() { const result = await this.ctx.service.item.updatePartition(); this.ctx.body = result; }
1
7f0be84900fecc743d4da9b065b214d8
614b9619780b357650a13cd4c61a3935
列取当前军团任务贡献列表
function listenPacket.request_query_contribute(opid, head, body) local sql = "" if body.RoleId and body.RoleId ~= "0" then sql = string.format([[select factioncontrird.*, faction.name, faction.money from player, factioncontrird, faction where factioncontrird.RoleID = '%s' and factioncontrird.FactionID = player.F...
1
cd28fd465483e81a03bd9cd427e0f349
00f2bea8e1d271aee1b27ad47ce91b27
Returns a dictionary encoding an execution of tskit conforming to the provenance schema.
return { 'count': 1, 'firstOccurrence': str(instance.date), 'lastOccurrence': str(instance.date), 'lastMessage': instance.message[:300], 'backtrace': backtraceText, 'environments': (instance.environment,), 'servers': (instance.server,), }
1
755f15bfcffbf930d254e08777c93807
44116ce32554033a07e55124c32c75ca
Decides whether to draw or to fill an area.
class Glitch_Image_Action_DrawArc extends Glitch_Image_Action_ActionAbstract public function setFilled($fill = false) { $this->_filled = (bool)$fill; return $this; }
1
76e4b1b2e1956df935a7a5b0acb47db6
aed326e7fa95829ba18a35b0fc5530be
Draws one eye and eyebrow
ctx.strokeStyle = eyeColor; ctx.beginPath(); ctx.moveTo(startX, startY); ctx.quadraticCurveTo(startX+50, startY+50, startX+100, startY); ctx.quadraticCurveTo(startX+50, startY-50, startX, startY); ctx.stroke(); ctx.fillStyle = eyeColor; ctx.fill(); ctx.beginPath(); ctx.strokeSty...
0
6d3edcae0154445b40869f637f2d2a10
7adaefb1db884219554ff0ffbcb76832
LZW expansion algorithm
def LZWCompression(uncompressed): dict_size = 256 dictionary = dict((chr(i), chr(i)) for i in range(dict_size)) w = "" result = [] for c in uncompressed: wc = w + c if wc in dictionary: w = wc else: result.append(dictionary[w]) dictionary[w...
0
0e5d9c767a1b99c8cf24c7d8160b3e17
6c4821ecefccf3db0f06b9315ce46be4
Ejecuta las validaciones del directorio
public class Logic private boolean checkValidation(Directory directory, List<BigInteger> idList) { boolean res = true; for (Service service : directory.getService()) { res = checkValidation(service, idList); } for (Directory sub : directory.getDirectory()) { res = checkValidation(sub, idList); } retur...
1
9eb853cb68e44e8eee06a8a2f99c3109
e0a7aada4bcac81b1532de574ff7f864
! \details This command sets the parameters needed to the HTTP connection.
void KeTCP_Client::setConnectionParams(QString sHost, quint16 uiPort , QString pass) { par.remotehost = sHost; par.remoteport = uiPort; par.pass=pass; }
0
f66609a0c505ce1441bfeb33f153a77e
ebd88bf378f8accaf9402cd5cf7ee3cd
Obtenemos el objeto Informe Venta a partir del id de la venta
namespace Controladores public class CT_Tbl_venta public EN_Tbl_venta Select(int venta_id) { return oAD_Tbl_venta.Select(venta_id); }
1
6905683f9b9d1ca6915acec176d09355
c45b1f78f2c02a20604b1991ca4a109b
Convert strings of fields and values to associative array.
class FW_Util static function qs2a($str){ $str = urldecode(str_replace('&amp;', "\n", ltrim($str, '?'))); $a = self::str2assoc($str, '&', '='); $a = array_map(function($val){return str_replace("\n", '&', $val);}, $a); return $a; }
1
e75b2587c82371cf5f99f69e04218d5a
adb6818a55ac1856f266304dd589d117
Import the given file into the given railway.
namespace BinkyRailways.Core.Model.Impl [XmlRoot] [XmlInclude(typeof(DccOverRs232CommandStation))] [XmlInclude(typeof(EcosCommandStation))] [XmlInclude(typeof(LocoBufferCommandStation))] [XmlInclude(typeof(BinkyNetCommandStation))] [XmlInclude(typeof(P50xCommandStation))] public abstract cla...
1
7c6c358adffb13d8790215ae6205fce9
9a61887bd79f4447f7352e1e5363c874
RFC1522に従ったエンコードを行う。
{ $len = strlen($buffer); if ($len <= 125) { return "\x81" . chr($len) . $buffer; } else if ($len <= 65535) { return "\x81" . chr(126) . pack("n", $len) . $buffer; } else { return "\x81" . char(127) . pack("xxxxN", $len) . $buffer; } }
0
1a46a3b1329d2d9e6b974dcbe414f6c2
f30dae9b02bc7c6f36f91609075a91f3
Initialize UCE Handler library
{ ucs_log_early_init(); ucs_global_opts_init(); ucs_log_init(); #if ENABLE_STATS ucs_stats_init(); #endif ucs_memtrack_init(); ucs_debug_init(); ucs_instrument_init(); ucs_async_global_init(); }
0
4697f41ff25868214c778192dee0844d
417a98e29eba2eb735a70c93f28b2b43
Returns a pointer to the current item in pList.
LinkedItem* LinkedList::GetNextItem(const LinkedItem* pItem) { return (IsValidListItem(pItem)) ? pItem->pNext : NULL; }
0
f8a7bf8d7ea65fe123636f73fcf44e48
08db4eb77a96b77cd25f4dd90e6ddbe0
deep clone of this Cell
public class Cell public Cell clone() throws CloneNotSupportedException { return new Cell((Point)this.pos.clone(), this.color, this.figureId); }
1
fe8e6574c0843ac552a630bf0ab45fcd
ec719ca032d93c1e1b9989dc580c068d
检查telnet通不通
flag = False server = telnetlib.Telnet() try: server.open(ip, port=port, timeout=2) print('ip:{0}, port:{1} is open'.format(ip, port)) flag = True except Exception as err: print('ip:{0}, port:{1} is not open'.format(ip, port)) f...
1
1a5e24ca0420ac91f4388766f0fe4c76
021dce7cb4ee15a3951ee52e6351bdd9
Check if given cursor is inside action’s allowed context
export default class HoverFreeze private _isCursorInsideOfMouseMoveArea(x: number, y: number): boolean { if (!this._itemAreaRect) { return false; } if (x < this._itemAreaRect.right && x > this._itemAreaRect.left && y < this._itemAreaRect.bottom && y > this._itemAreaRect.t...
1
7e005d6f10fb5a8de2953a1f3ed48ffa
538b1560817eec4866db550f04ab44b0
Methode dient zum Deaktivieren der Scatterplot Ansicht.
if self.scatter_selected is not None: self.scatter_selected.remove() self.scatter_selected = None n_var, var_name = self.problem_cfg['n_var'], self.problem_cfg['var_name'] if n_var > 2: self.view.ax2.set_varlabels(var_name) if self.line_x is not No...
1
8e81daa7de72c8f1493f9e87c3ea1f15
619834acc91394b07fca20ded87d7ae4
单据处理费率(元/张发票)を設定する
public class Frpt0001s01Entity extends PageBaseEntity public void setDocumentsHandlingFee(BigDecimal documentsHandlingFee) { this.documentsHandlingFee = documentsHandlingFee; }
1
53ddc2eac9b3703739ba228874271791
e55c6c273056161f79cdec87b13d9053
設定標頭名稱
class Log public function header($header) { $this->header = $this->toString($header); return $this; }
1