query_id
string
corpus_id
string
query
string
code
string
label
int64
39ff44ece7d7fdbaeeb9508438edb223
7f6c4eadc8d9daa57fa93362a29cdfd1
LV.6 特征参数进化 - window
def proExpansion(questKeyWord,properties): prolist=list(properties) prolist2=list(properties.values()) prolist.extend(prolist2) proWindowWords={} for x in range(len(questKeyWord)): for t in range(len(prolist)): if prolist[t]==questKeyWord[x]: if len(prolist)<3: ...
1
c19ee9e82b6a61d3a550cebf5617e876
3fef61fb5e23d1d8252e37d5c19f10a5
Client provides a requests session that is configured with automatic retries, caching, and more.
func Client(trans io.ReadWriteCloser, config *Config) Session { return newSession(trans, config, true) }
0
311e47c1a1074b3a24e6b92d6d23fc84
dcceb53e22472af1f8449f1c70c7d223
兼容V3,本项目采用V4,不需要检测清单。
checkVersion(){ if (!cc.sys.isNative) return; if (this._needUpdate) return; this.storagePath = ((jsb.fileUtils ? jsb.fileUtils.getWritablePath() : '/') + 'game-remote-asset'); cc.log('【更热】模块{0}远程资源存储路径 : {1}'.format(this.manager_data.name, this.storagePath)); cc....
0
4de0c8094e36ec6e9eae509ab537d2e0
8d8c95da51b02197ea476618735a31b4
# Variance function
co.var <- function(x, na.rm = TRUE) ( sd(x,na.rm = TRUE) / mean(x,na.rm = TRUE) )
0
da4bf2ab5e6874979111f41461dfdc97
45f7caf0c2239ec71a54f56bef9a07c9
Saves an instance of MPSToolbox\Legacy\Modules\Admin\Models\DealerRmsProviderModel to the database.
public function saveDoprovod(Doprovod $doprovod);
0
9ed3081d0d5f8309f42ca41b41050ef2
74722570de3d7e52d91d17a917e03034
Send the complete api to stdout. This can be a lengthy output that may be redirected to a file.
class UuidDump def run(api_method = :api) orig_command = "%s %s" % [api_method, raw] Log.debug "saying #{orig_command}" @fs_socket.say(orig_command) end
0
5ed0465ac9780bb8c3f80cf2f08ce502
8f82642c65f77316f748d9c6e1ca364a
Arguments passed: channel number Return value: none reset (cold initialization) as a part of 'DCH_Cold_Initialization' function. This function initializes all the control variables and flags to their respective default values related to all the supported transmission modes.
{ ScalerSetBit(PB0_01_PHY_DIG_RESET_CTRL, ~_BIT0, _BIT0); ScalerSetBit(PB0_01_PHY_DIG_RESET_CTRL, ~_BIT0, 0x00); ScalerDpRx1SetDpcdValue(0x06, 0x80, 0x29, 0x00); ScalerDpRx1SetDpcdValue(0x06, 0x80, 0x2A, 0x00); ScalerDpRx1SetDpcdValue(0x06, 0x80, 0x2B, 0x00); for(pData[0] = 0; pData[0] < 20; pDa...
0
ebced9fa79dd805425e5488fb54d1fe7
fb6a3f146698bd76c9c3ab4fba84de66
Clones this volume to a new volume in the same region with the given label API Documentation: https://www.linode.com/docs/api/volumes/#volume-clone
class Provisioning: def clone_volume_group(self, volume_group_id, name, description=None, protection_policy_id=None): LOG.info("Cloning volumegroup: '%s'" % volume_group_id) payload = self._prepare_clone_vg_payload(name, description, protection_policy_id) return self.client.request( ...
1
aabd97cb4d924b76ac97f0ceaefdb8fc
ccf9010f0ff4322659ca68d27951ccff
@brief GPIO set output function enable
void rvlib_gpio_set_output(uint32_t base_addr, uint32_t mask) { rvlib_hw_write_reg(base_addr + RVLIB_GPIO_REG_OUTPUT, mask); }
1
ad0774f916899550f5232dd1a75c498c
488c15dea61faa06ca28b23c7e393542
Initialize the Gens window.
{ Q_D(GensWindow); d->vBackend->setEmuContext(gqt4_emuContext); if (d->emuManager->isRomOpen()) { d->vBackend->setPaused(d->emuManager->paused()); } else { paused_t unPause; unPause.data = 0; d->vBackend->osd_show_preview(0, QImage()); d->vBackend->setPaused(unPause); d->vBackend->fpsReset(); } d->che...
0
300072b2158d5cf6ca20435a2800181d
a675fbca93a598fb113cce3f4e84dd40
Check if an attachment point is needed, if so then setup and make current.
class ViewExecutable public function attachDisplays() { if (!empty($this->is_attachment)) { return; } if (!$this->display_handler->acceptAttachments()) { return; } $this->is_attachment = TRUE; foreach ($this->display_handler->getAttachedDisplays() as $id) { $display_handler = $...
1
99879504544ef4eb04ac8ffd1c9a7d1b
8d567f09190c3280b60294b4dfe98d34
Obtener todo los documentos de identidad
this._system.DocumentosPersona().subscribe( (docs: PartialObserver<any> | any): void => { this.documentos = docs.listado; } ); }
1
a131a4809c363edd1f22aaa5efc0ffad
17910d38eede7927c93912aeeb95ef01
decodes messages expressed as groups of three numbers
def decodeMessage(digitString): if len(digitString) % 3 != 0: print("Cannot decode message that lacks three symbols per character.") return "" uncodedString = "" for i in range(0, len(digitString), 3): trio = digitString[i:i+3] if trio in base4Table: ch = base4...
1
7162974f7769d77653ebe9a7a158087e
8414ae0316471de83a18cc8e1fbf4770
Returns specifed element of 3D array
float MainCanvas::getElement(int i,int j,int k, std::vector<float>* vect) { float columns = DatasetManager::getInstance()->getColumns(); float rows = DatasetManager::getInstance()->getRows(); return (*vect)[ i + ( j * columns ) + ( k * rows * columns ) ]; }
1
8439da5275c4f6e87202209110c0b0ee
5299d8db5ed42e8ff0608a07e256d5a9
Given a string, find the most commonly occurring letter.
if (str.length === 1) { return str; } var letterObj = {}; for (var i = 0; i < str.length; i++) { if (!letterObj[str[i]]) { letterObj[str[i]] = 1; } letterObj[str[i]] += 1; } var maxValue = 1; var maxKey = ''; for (var key in letterObj) { ...
1
bd2ea5d5495e4b7cd7b9370ba4c16162
e7cfa560a00efe75094f13d2eac42361
Create an 8-puzzle state.
p = Puzzle8() for i in range(3): p.matrix[i] = self.matrix[i][:] return p
1
22403323f4224786dcc8fbc941ce0150
8de869a538be8418e78caab08627d9b4
Changes the joint to be measured
public void onClick(View v) { switch (v.getId()) { case R.id.current_position_joint_1_button: mActiveJoint = 1; break; case R.id.current_position_joint_2_button: mActiveJoint = 2; break; case R.id.current_position_joint_3_button: mA...
1
994c22e76bc256bb02f8ada0036053af
edc625e5f90a033593b20b4a32c8884d
批量删除用户行程
$id = array_unique ( ( array ) I ( 'id', 0 ) ); if (empty ( $id )) { $this->error ( '请选择要操作的数据!' ); } $map = array ( 'id' => array ( 'in', $id ) ); if (M ( 'TravelRouteList' )->where ($map)->delete()) { $this->success ( '删除成功' ); } else { $this->error ( '删除失败!' ); } }
1
03d31baaf251c19de13476c564538538
f0c2de4ae67a0b7bbcb0f7c2bad4d0f8
Set up Inversse Kinematics services
def IK_server(): rospy.init_node('IK_server') s = rospy.Service('calculate_ik', CalculateIK, handle_calculate_IK) print "Ready to receive an IK request" rospy.spin()
1
a90fc8a1e2a2938e1f48d2103cf5ae01
1ecbee42c020ca657ef9b7882f3ed1d8
Format a row with `values` of a table.
def format_rows(data: List[dict]) -> str: lens = defaultdict(int) for row in data: for k, v in row.items(): lens[k] = max(len(str(v)), lens[k]) lens = {k: max(len(k), v) for k, v in lens.items()} res = [ ' '.join('{:<{}}'.format(k, v) for k, v in lens.items()), ' '....
1
2b1a17b93d0d11d917e31dd2a8cc9dfb
5aef280fc0739d6c2778623e17adeb6d
=========================================================================== DESCRIPTION This function compares the MCC value in IMSI against set of reserved MCC values DEPENDENCIES None RETURN VALUE void SIDE EFFECTS None ===========================================================================
void emm_attach_collision_rrc_service_ind ( lte_rrc_service_ind_s *rrc_service_ind, emm_ctrl_data_type *emm_ctrl_data_ptr ) { sys_plmn_id_s_type rrc_reported_plmn ; ASSERT(rrc_service_ind != (lte_rrc_service_ind_s *)NULL) ; ASSERT(emm_ctrl_data_ptr != (emm_ctrl_data_type *)NULL) ; rrc_reported_plmn = e...
0
d87d4c284592e36cb3995bc2e1d1ab1f
2bd4826127db1c357e330966bdd15daa
The internal variable name for this property. This is like a variable name identifer, this should be unique value across all properties. Allowed chars are `a-zA-Z0-9-_`. The defined variable named will be use when retrieving data from a property in the frontend. For example `Yii::$app->menu->current->getProperty('varNa...
class WsdlElement_Property extends WsdlElement_Named public function getVarName() { return sprintf("$%s", $this->getName()); }
1
fc504fd45ef52b6b504ed564791880cf
7fc5922219ec6486ea60f36c2d6fec43
Reparameterization trick to samples from `Normal(mu, var)` from `Normal(0, 1)`.
class LogNormal(Distribution): def sample(self): eps = Variable(torch.randn(1), requires_grad=False).type_as(self.mu) z = self.mu + self.sigma * eps return torch.exp(z)
0
47e9ee0adbd9db20ea316f5e62018b12
cd9c54978b3458f6f830a4eede95e03c
Prints the commandline and then runs it.
def main(cmd=None): print(get_commandline_args(), file=sys.stderr) parser = get_parser() args = parser.parse_args(cmd) kwargs = vars(args) kwargs.pop("config", None) utterance_scoring(**kwargs)
1
7060e026e0cb7494f5ffddbc2b6a4e29
e2906235851d40da22b6894fa06ebf03
根据图片原来的宽和高的比例,自适应性处理缩略图的宽度和高度
image: BufferedImage, newSize: Int ): BufferedImage { var width = image.width var height = image.height val isWidthGreater = width > height if (isWidthGreater) { require(newSize < width) { ("newSize must be lower than" + " the image width") } } els...
1
5d2bad307905fd3d14b1b697b6c86007
7d89427a7519630437fea67963f65b32
Set oneshotness.
public class EventListenerData public boolean isOneShot() { return oneShot; }
0
195d3e1eca8becca91b1ea57e4ea0afc
2a27ee697f4a64ef85d43faa301a3b8c
移除图片下载状态
boolean removeDownload(String uri);
1
60431da2912534e24af47bc44846f652
23fecb17d3d5aeb6d5a5c7de7ba88d86
Checks that the <paramref name="queueName"/> is in fact valie, throwing an exception if it is not
{ if (ReferenceEquals(null, queueName)) return false; return string.Equals(_value, queueName._value, StringComparison.OrdinalIgnoreCase); }
0
ce59c37e0574d80af17af05aba81d9ae
cd6f6530ca59bdc6df6f574f4dc8509f
Returns a new PropertySheet instance containing the same properties and parent as the current instance. All contained complex objects are deep-copied and contained property sheets are recursively cloned. Changes made to the new instance will not be reflected in the current instance and vice-versa. Using this method on ...
public DOM4JDocumentCSSStyleSheet clone() { DOM4JDocumentCSSStyleSheet myClone = getStyleSheetFactory().createDocumentStyleSheet(getTargetMedium(), getOrigin()); myClone.setOwnerDocument(ownerElement); copyAllTo(myClone); return myClone; }
0
d8baebc197d3030321b9185e8fe5a0af
c1caf7108520cfa8d20666789be5c616
Updates one or more fields of a course work. See google.classroom.v1.CourseWork for details of which fields may be updated and who may change them. This request must be made by the Developer Console project of the [OAuth client ID](https://support.google.com/cloud/answer/6158849) used to create the corresponding course...
class DataflowV1b3(base_api.BaseApiClient): class ProjectsLocationsJobsService(base_api.BaseApiService): def Update(self, request, global_params=None): config = self.GetMethodConfig('Update') return self._RunMethod( config, request, global_params=global_params)
0
05e75becd4d9f081680915ae385704e9
b7d9f1eb6cb651424b0c1d4a83fb6796
compute the min price in participants packages, for an event
{ $registrationDate = $participant->getRegistrationDateUtc(); if ($registrationDate <= $this->pretEventParams->getRegularStart()) { return $this->pretEventParams->getEarlyFee(); } else { return $this->pretEventParams->getRegularFee(); } }
0
865f5d80bc34f2e59891d42b4db75eac
7f2ab70cbd23dccd2a48a05ccb2559f6
创建ecs实例
def __get_ecs(client: AcsClient, kwargs) -> list: instances_request = CommonRequest(domain=settings.DEPLOY_CONF.get('aliyun_api_address', 'ecs'), version='2014-05-26', action_name='DescribeInstances') instances_request.add_query_param('...
0
8da2c409d3ac5b18b21de8f417dcc02b
b6a6ef60fa76930d0828d4b1c19ee116
根据影院id查询影院价格类型
String sql="SELECT cinemaId FROM t_price_bindingcinema WHERE TYPE=? AND mzCinemaId=? "; Object[] obj=new Object[]{type,mzCinemaId}; return jdbcTemplateRead.queryForList(sql,obj); }
1
1dec92db8769422afba8f2ae1fbd9142
24fda1fca39e1f77445be6e740fe98be
Deze methode krijgt een matrix mee (in img) en een label dat correspondeert met het plaatje dat in de matrix is weergegeven. Zorg ervoor dat dit grafisch wordt weergegeven. Maak gebruik van plt.cm.binary voor de cmap-parameter van plt.imgshow.
shaped_matrix = np.reshape(pixels, shape, order='F') image = plt.imshow(shaped_matrix, cmap=gray) return image
0
75e6de094d63e73a6e0187f3dbc9863a
7bf45fe0ee324429e3f5ac77727eca8c
Gets manhattan distance between the two cells
class Coords int manhattanDist(Coords cell) { return Math.abs(row - cell.row) + Math.abs(column - cell.column); }
1
52e43247343a0a69fbc0e67a8a3d5b33
d9ca436d91a91216ca059e1ed3329292
Remove builds that don't have any IDs.
def CmdListBuilds(ab_client, opts): branch, target, build_id, filepath = androidbuild.SplitAbUrl(opts.url) if build_id or filepath: raise ValueError('Invalid URL [%s] must only have branch and target.' % opts.url) for build_id in androidbuild.FindRecentBuilds(ab_client, branch, target): ...
0
0fde8790bccc65404b03903ae60df8f5
e73e841e6c008b39dd32e9bbf3b78bdf
getter-Methode fuer den Index des Servers, der als letztes eine Berechnung durchgefuert hat
public class BruteManager public BigInteger getLastIndex() { return lastIndex; }
1
8fada982328cc5985a9e7e310379b2f0
dd8a5157837764d13fd767d34f57888b
Gets the label Value used when configuring the name of the DNS record at the DNS host.
class Ld_Preference public function getLabel() { return $this->_label; }
1
7dcc671bfeea8e2b5caaa3c1c820d05c
a14e5404397311a0389e731c002b0b84
indicate whether a features is speaking
public class FreeTTSSpeakerEngine extends SpeakerEngine public boolean isSpeaking() { return speaking; }
1
fdfea9451b2fb0afb3eb9653c29048e0
9baf27256d8ccda10921265e66df92b7
Create a new unit based on a reference unit
this.id = unit.id; this.name = unit.name; this.slug = unit.slug; if (unit.engagement === null) { this.engagement = new engagement.Engagement(); } else { this.engagement = unit.engagement; } this.descripti...
1
ddd05076a73fa22b8c3f5b36912893b8
1728b2a870e163904e16b30a3fa1c1a6
Enable foreign key checks
class Mysql extends Module protected function setForeignKeys(bool $enabled = false): void { $this->getPhalconDb() ->execute('SET FOREIGN_KEY_CHECKS=' . intval($enabled)) ; }
1
e1d198f9ce54ec552b8d6b8fcc9c83d4
b7f7bb10bdf45b839e14a3ae1270dcf5
Write bytes to an OBJS (object static data) block
CVmImageWriter *image_writer, int meta_idx, int large_objs) { ulong start_ofs; for (start_ofs = 0 ; start_ofs < os->get_ofs() ; ) { ulong ofs; uint siz; uint cnt; uint block_size; ...
1
ce4db3fb00bb6e43b7fe1a55ceb02869
7e372f8adf765165165ed6f1a5c8306f
● 获取限制状态 从当前附加的状态中获取限制最大的状态
class EvaBaseTask function getRightLimit() { return $this->rightLimit; }
0
39ba80f1163edf4d7c2e0d2482cf10b2
a546e90fecf49387b2ac72cd3ca8a4e3
定义函数calulate(),求表达式树的值
def calculate(kv, root): if kv[root][0]=="" and kv[root][1]=="": return eval(root[0]) else: left = calculate(kv, kv[root][0]) right = calculate(kv, kv[root][1]) return calSum(left, right, root[0])
1
747749e21f6aab6a0ba3e21463157a05
6463f55c223ec5049558d450571d6b2d
Pointer version of {@link #alAuxiliaryEffectSloti AuxiliaryEffectSloti}.
public final class EXTEfx public static void alAuxiliaryEffectSlotiv(int effectSlot, int param, ByteBuffer values) { nalAuxiliaryEffectSlotiv(effectSlot, param, memAddress(values)); }
1
0dc358f8e20b01fd1233168b9c539361
04a43d07215f40aac02d2ef01f6adee3
Register string view bindings.
class CoreServiceProvider extends ServiceProvider protected function registerBindings() { $this->app->singleton(PageHeaderDirective::class, PageHeaderDirective::class); $this->app->singleton(TooltipDirective::class, TooltipDirective::class); }
0
8c60a299421232eea8afb5230d369711
96ea62b37adba8aa0972bd57975ac3dc
Check to see if Exportable property is set
@Fluent public class KeyProperties public Boolean isExportable() { return this.exportable; }
1
0c0d89ebce93809b83fa82d09246f24c
de528d8f348f02d81aa0e72b0829d355
Get database description
{ $arr['dialect'] = $this->dialect; switch($arr['dialect']) { case '': case '1': $s = 'Firebird Dialect 1'; break; case '2': $s = 'Firebird Dialect 2'; break; default: case '3': $s = 'Firebird Dialect 3'; break; } $arr['version'] = ADOConnection::_findvers($s); $arr['de...
1
2a4edcaa87c281baf5421905fcdeeb54
3ffdcfecae209d6bcadc9391e67bef2e
Visit a parse tree produced by ECMAScriptParser#arrowFunctionParameters.
public class JavaScriptParserVisitorImpl extends JavaScriptParserBaseVisitor implements JavaScriptParserVisitorForValue{ @Override public Object visitArrowFunctionParameters(JavaScriptParser.ArrowFunctionParametersContext ctx) { if(ctx.formalParameterList()!= null){ return this.visit(ctx.formalP...
1
bebe2df3878c5c58c76908eeceda8d50
ecb360ccea34bb67d7a17da2fc79ed04
生成RSA密钥对(带有头尾的Pem密钥格式)
{ KeyPairGenerator rsaKeyGen = null; KeyPair rsaKeyPair = null; rsaKeyGen = KeyPairGenerator.getInstance("RSA"); SecureRandom random = new SecureRandom(); String valueOf = String.valueOf(System.currentTimeMillis()); List<String> list = new ArrayList<String>(); for (int i = 0; i < valueOf.length(); i++) ...
0
bb2ee8ed46a7764251f21cd7f731e0fa
5815837efb2b7220f96f20d9db452a38
删除除最新记录之外的所有抓取记录
class FeedService cleanFeed(feed) { const recordMap = new Map(); const cleanFeed = feed.filter((value) => { if (value.message.includes("pages")) { return true; } if (recordMap.has(value.data.id)) { return false; } else { recordMap.set(value.data.id, value); ...
0
6838de712b0dc365630f8d858404ee2c
9a999359ce5b11dd77634e0fa3dc7c08
The logic for starting your application.
namespace TheBuildersMiddleAges.Game.Host public class Startup public static void Main(string[] args) => WebApplication.Run<Startup>(args);
1
b0e79ab1a94df320780c1270379e41a3
3819b75df050fe109ab04bc6e2cd7d12
Read data from gzip file.
if not cls.check_format(data): raise ValueError('File is not gzip format.') return gzip.GzipFile(fileobj=StringIO.StringIO(data), mode='rb').read()
1
514a38c54dedaf16d9dc5c005e6c37cd
0cafcc0411363a9b7c22f67748e27f5a
绑定手机账号
model.getPhone().then(res => { if (!res.data) { wx.navigateTo({ url: '/pages/phone/phone' }) } else { this.setData({ account_phone: res.data, isBind: true, isLoading: false }) } }) }
0
6e755e03d4d7da6269d7ebd78cd3f445
4fcf60e325a55cd875fdf2a478465e0a
Will save the model, so you can reload it using :obj:`from_pretrained()`. Will only save from the world_master process (unless in TPUs).
class TFTrainer: def save_model(self, output_dir: Optional[str] = None): output_dir = output_dir if output_dir is not None else self.args.output_dir logger.info(f"Saving model in {output_dir}") if not isinstance(self.model, TFPreTrainedModel): raise ValueError("Trainer.model appears ...
0
bdb989c696fe8ff1f427977aea7f7376
0aee5a3d0ab6915398fe0a93ee0fba5e
Test allowed methods on runs.
class RunTestCase(ApiTestBase): def test_user_authorization(self): self.client.login(username='admin', password='admin') response = self.client.get( '/api/v1/run/', ACCEPT='application/json') self.assertEqual(200, response.status_code) json_data = json.loads(response.content)...
0
ed5f8a5092987cf90b529bffad6c4492
7cfae04ddbf894de74926a576e0c7544
Getter du contexte graphique
export default class Stage extends DisplayObject getContext(){ return this._context }
1
669a1226ec6067b9080d7f3f3405a6a6
acd53cf940e787da6b3508823786f937
Uploads a binary of a package.
public void uploadPackage(MultipartFile file, EcGcePackage gcePackage);
1
6f4dddc2563cbc9c02d598b8babea3ac
4cd0c8e17c937d54b6f8646542ccbef5
配置迁移任务特殊设置,例如配置指定同步的文件或路径 Please refer to HUAWEI cloud API Explorer for details.
public class MigrateSqlServerSqlDbSyncDatabaseInput public MigrateSqlServerSqlDbSyncDatabaseInput withMigrationSetting(Map<String, String> migrationSetting) { this.migrationSetting = migrationSetting; return this; }
1
7e4df7ae4278e6f3628881ab661af007
8210489a1c3442eab94b3424052195c6
シーンの状態ごとの描画処理:バトル
{ XEBaseScene::Draw(); XEBaseScene::DrawTransition(); #ifdef _CHEAT if( XAPP->m_bDebugMode ) { auto pb = XBattleField::sGet(); if( pb->GetLegionObj(0) && pb->GetLegionObj(1) ) { PUT_STRINGF( 201, 25, XCOLOR_WHITE, "%d/%d", (int)pb->GetLegionObj( 0 )->GetSumHpAllSquad(), (int)m_hpMaxLegion[0] ); PUT_STRINGF...
1
2ed237077af4c2dd59736040fe8c2ff0
e9e9a63d75328f09fcebd21c485c68fd
初始化全连接层权重
class MultiLayerNetExtend: def __init_weight(self, weight_init_std): all_size_list = [self.input_size] + self.hidden_size_list + [self.output_size] for idx in range(1, len(all_size_list)): scale = weight_init_std if str(weight_init_std).lower() in ('relu', 'he'): ...
1
4905049117cab7e96918511860e66449
dc16169bc763203ab3042f51d4a269df
Create and configure the session manager for this web application according to the persistence type specified. Also configure the other aspects of session management for this web application according to the values specified in the session-config element of sun-web.xml (and whether app is distributable)
class WebContainerDeployment extends AbstractDeployment protected function getSessionManager() { $systemConfiguration = $this->getInitialContext()->getSystemConfiguration(); $sessions = new StackableStorage(); $checksums = new StackableStorage(); $sessionPool = new StackableStorage()...
1
3c3e204ebc02eddacacd685d49ddf0bf
3023ad05f080b0b4c3235316109e5193
event listener for window.resize. This is debounced by 300ms to prevent event-spam
class Runner debounceResize() { if (!this.resizeTimerId_) { this.resizeTimerId_ = setInterval(this.adjustDimensions.bind(this), 250) } }
0
8dfef283590db678a2103370dce428f4
df917499b6ae9f0c08d4c1aa264acb28
Does this user have a correct password for a given $url?
{ return (strlen($hash) == 40) ? $this->helper->string_compare($hash, $this->hash($password, $user_row)) : false; }
0
c31cf3156f686b98a8ca0c905a915fcf
c576afee554f59d57015f74524c7ff6c
show/hide main window
class FloaterApplet: def toggleWindow(self, *args): if self.floaterWindow.main_window.is_visible(): self._hideWindow() else: self._showWindow()
1
e91bc010161a60fe060574afb1e71c27
a832951374e5aeca0c3ed9a2a40fd999
查询当前出手的玩家的uid
class gamePay{ function getUID(){ return $GLOBALS['db']->result_first("select `id` from `account` where `name`='".$this->PayToUser."' limit 1 "); }
1
6a5bc69565feb20ed352370060af8319
83b006633930ccb4b823c3dcf64b7882
ロボットのエピソード集合に新しいイベントを追加する 追加した結果、エピソード数の上限に達した場合は最も古いイベントを削除する
const newLength = state._epList.push(ep); state._epDict[ep.addr] = newLength - 1; }
0
2c7b52c59a629da9eec67aaba165ad7b
ae0baf22d4f5717370f0a7b5b4ea825b
Atualiza o token de redefinição da senha do fornecedor
class LoginApiController extends Controller public function ResetarSenha(Request $request) { return ResetarSenha::ResetarSenha($request->all()); }
0
129742ad7e38639c45b4868461cebad1
24b9320637fe1ead52262a9e7fd75655
Start tests to get a rating for the Amount of Content available on found pages
{ const string route = "/ratetest"; await TryGetRoute(route); return await TryGetRoute(route); }
0
c480dc65a209598afef7f41f14658f5f
edc67933f44a1f2e4e98cf6646e6c877
Display the brief information for the operation described by the supplied bag. IN - A bag describing a single operation.
{ seq.ListOf( 0, "action" ); while (seq.HasListElement()) { show_bac_action_command( seq ); } }
0
2eed8421315bcf12ae4942bbd7aff1b5
2f81ccb12dcc42166564c0b30d767cf3
saves a message response to the cache
public abstract class AbstractRequestMessageHandleServlet extends HttpServlet protected void putResponseMessageInCache(String requestMessageKey, String responseMessage) { try { Cache cache = getResponseMessageCache(); if (cache != null) cache.put(requestMessageKey, StringUtils.isBlank(responseMessage)...
1
87cca8eb5135aef84a157f8d0545a862
0eb919c05fb1489573855d57edd42f9f
Реальні поточні розміри обєкта
namespace MyXObject public class XObject : ItemsControl,INotifyPropertyChanged public Size GetSize() { return new Size(this.RenderSize.Width,this.RenderSize.Height); }
1
e15ee716be96b02fe65248f943c3a9d5
2818ddc196b97ce1fc74e95fcf350716
The order of the loops is such that in case of collision, words with shorter length are preferred, and in case of same length, words with smaller index. There is only a single word per bucket.
public class WordOrdering private static boolean lessThan(String word1, String word2, Map<Character, Integer> alphabet) { int size = Math.min(word1.length(), word2.length()); for(int i = 0; i < size; i++) { char c1 = word1.charAt(i), c2 = word2.charAt(i); if(alphabet.get(c1) > alphabet.get(c2)) ...
0
65bc29fa2eb655c6702a633c15234116
e244b9926a2a0823712ccfef2f7e7266
红包销毁
class Market extends BaseHome public function red() { $uid=Request::instance()->header("uid"); $re=db("red")->where("id",1)->find(); $number=$re['number']; $re_number=db("red_log")->where(["uid"=>$uid,"type"=>1])->whereTime("time","d")->count(); if($re_number >= $number){ ...
0
d8ec588f1e4ba7fa8ebed0a8110f8899
a007815a2ef11a6dc6c9df518e31b8d0
Called when the view bridge wants to signal the list of items should be refined. It would be normal here to simply call setSelectionItems() with a new configuration of items.
@SuppressWarnings("serial") public class GeneralItemList<ItemType extends IConfigListItem> extends BasicItemList<ItemType> implements Serializable protected void informAboutSelection(int selectedIndex, ItemType itemType) { }
0
06355becfceed9ad5d1628581d5d8e12
a9eb27d42a46547fd9bb3fdd4a51747c
Удаляет ненужные календари при удалении элемента
( $cal_id ) { if($cal = Database::selectOne("SELECT start, duration FROM event_calendar WHERE cal_id=? LIMIT 1", array($cal_id))) { if($cal['start'] + ($cal['duration'] + 30) * 86400 <= time()) { Database::startTransaction(); $pass1 = Database::query("DELETE FROM event_calendar WHERE cal_id...
1
5aade7af61eee99df93b16f8b8cf6fd4
01afb4b1b412bb9a6c476b0f611dfeb9
The __hash__ value for two identical reads (with no quality strings) must be identical.
class TestRead(TestCase): def testHashDiffersIfSequenceDiffers(self): self.assertNotEqual(hash(Read('id', 'AAT')), hash(Read('id', 'AAG')))
0
514b1bceb66d0d94d4fd31de744197f9
3e89a9165c2feec90b49a9ff799aaea7
忽略不在本周内的数据
class JwController extends BaseController private function filterScheduleByWeek($scheduleList,$week) { $ret = $scheduleList; foreach ($ret as $key => &$schedule){ if(!$this->isCurrentWeek($schedule['period'],$week)){ unset($ret[$key]); } } retu...
1
0760360058c54bfd991e4dda7322bd14
47eff3b457df5b49dca0f7480d6e8b7b
Sets the highPrice.
@Table(name = "tbl_pro_product_market") public class ProductMarket public void setHigh(BigDecimal high) { this.high = high; }
1
af2b59fda73ee8d67c7151a96643695b
f5e272585ae9b97a9fb10652bfbbf18f
refrigerator_idが保存されていなかったら、mail_addressと対応するrefrigerator_idを発行し、登録するAPIにリクエストを送る
getSharedPreferences("now_refrigerator_id", Context.MODE_PRIVATE).edit().apply { putString("mail_address", mail_address) putString("refrigerator_id", refrigerator_id) commit() } }
0
3bdbe64ea530d450cb695c085015e0a6
12a046a168d965724798215fb5ab5b11
验证文件夹名或文件名是否有效(不包括扩展名)
function checkFolderNameValid(folderName) { var reg = /^.*[\\\/:\*\?\<\>\|]+.*$/; if (reg.test(folderName)) { return false; } else { return true; } }
1
18afbe60ab7c145b286dc081ae4927a0
abfdc207fdca51c08a9816921e1b9cd8
reset the FLINK1 RX fifos in the FPGA to clear old data
void resetFifos() { spiWrite(RF22_REG_08_OPERATING_MODE2, RF22_FFCLRRX | RF22_FFCLRTX); spiWrite(RF22_REG_08_OPERATING_MODE2, 0); }
1
aa28a086fae61cebe1e914bfddabf527
ef50c000e336ea7a67f6a9c143a80d12
执行复制文件的主函数
public void execute() throws FileSystemCommandException { OutDataBuffer.outData.append("execute cp in FS"); copyFilesRec(pathFrom); }
1
09f2b165b95e0af9256274095156fdb6
71eaa9e89dd7bea6689672b72d525d20
获取查询结果集里面最近的一条数据返回
public abstract class CommonDAOImpl<E> implements CommonDAO<E> protected E getFirstResult() { List<E> results = getResults(1); if(CollectionUtils.isNotEmpty(results)) { return results.get(0); } return null; }
0
6610be129d4dad08db8c3badb9485cdc
c2bb07888fb9524eaa1b804c4a49d042
Returns the index (ID) of a Virtqueue.
impl SriovVF pub fn get_index(&self) -> u32 { unsafe { nm_sys::nm_sriov_vf_get_index(self.to_glib_none().0) } }
0
4b7e8ec6fb9c3455099008d78df55ca1
75e7e982a2d40c75504a8a97b89bb93f
The method that is used to construct a Bonobo ETL pipeline DAG that schedules the following ETL methods: - Extraction: extract_all_filings - Transformation: transform_add_filing_content - Loading: transform_add_filing_content Returns: bonobo.Graph: The Bonobo Graph that is declared as an instance
self.update_namespaces( building_prefix, building_namespace, site_prefix, site_namespace ) self.ingest_data() self.translate() self.infer() self.clean_up() return self.graph
0
b84e594a176a8f03cb231eab1e5d1b91
404c402965c01811ba59b76311e3e698
whichGo locates the go command
func GetHome() string { return lessgo.home }
0
c6b44e8e0712431c9952cc7745a85f1a
bc4a0a1e6342b18850d770d45c092826
Recupera uma lista com todos os usuários que não estão sincronizados com o SMC
namespace Neomot_Access_Control.Controladores class Controlador public string LeUsuariosSemProcessamento() { try { return WebJson.Send(urlDevice + "load_objects", "{\"object\":\"users\"}", sess...
0
46727b9106fea40db34f8e969f487a0d
63c7f15cecf7d5306b5b34c04421e98b
插件已安装检查 1表示安装成功 2表示无须安装
{ global $_CFG; if( empty($plugin['install']) ) return 2; foreach( $plugin['install'] AS $i=>$install ){ $match = sprintf(trim($_CFG['TMP_PLUGIN_ID_HEADER'],"\r\n "),$_CFG['URL_PLUGIN'].$plugin['folder'],$i); $content = file_get_contents($install['fpath']); if( strpos($content,$match...
1
7f6d25f3f41565b1599bb0b70326ada4
8bece9c713ccc70608048fd95d6a6be1
必须为正整数
if( !is_numeric($int) || !is_int($int + 0 ) || ($int+0) <= 0){ $this->getFail([],$msg); } return true; }
1
e4eee00c0d5180eeb2d8d3bb3475f96f
fef0ec7e3854f37a589a742fdf96289f
Creates a connector for communicating with the Sip Domains endpoint
async function createConnector() { return new PollingConnector(); }
0
fb885bf5c99aff47669b9c7e6ca95e2a
0728c7da9c3b94db5fea8c791f487210
Returns a list type containing update operator types
class MetadataUpdate: def ops(self) -> List[dict]: return self._ops
1
841b8928ae1bc8bbdc82a72817414108
27aa1174cf6f76e97885e18b12850ee6
スタート位置まで移動させるコルーチン
public class TitleManager : MonoBehaviour private IEnumerator MoveAnim_start () { float time = 0; float time2 = 0.5f; while(true) { time += Time.deltaTime; time2 += Time.deltaTime * 100; startText.GetComponent<RectTransform>().localPosition += Vector3.right * ...
1
604ecf3b18059c2ef2f24361e4747279
72a6ad4b286e383fb064b5cae4d2d573
Clears an NbnxnPairlistGpu data structure
gxArray* list) { int ret = 0; #ifndef DLMS_IGNORE_MALLOC int pos; gxMacAvailableSwitch* it; for (pos = 0; pos != list->size; ++pos) { ret = arr_getByIndex(list, pos, (void**)&it); if (ret != 0) { return ret; } bb_clear(&it->sna); } #endif ...
0
4d52ba11972d8a975385ce7babda01b0
0fe9ffac37e24bf52ae35437dc5927e8
Delete all styles including table styles and feature row styles
export class FeatureStyleExtension extends BaseExtension deleteStyleForFeatureRow(featureRow: FeatureRow): number { return this.deleteStyleForFeatureRowAndGeometryType(featureRow, featureRow.getGeometryType()); }
0
d1dbd2ef987ba844a9e4e1d750189727
9d09309b3eb50bdcaf3f4fce8050fdf6
Find any of the values in array of strings, case insensitive.
namespace Kelp.Extensions public static class StringExtensions public static bool ContainsAnyOf(this string subject, params string[] values) { return subject.ContainsAnyOf(false, values); }
0
7c9162c65a436b26c390605739ad7410
1a35984dd4041fa6b10d3e6cdb014970
Scroll page on the y axis.
def vertical(y = 0): _write(_constants.CSI + str(y) + 'd')
1
7e097c54a603ca2f3b1bcfd9ccfb4d16
92ab96eec77e2280e1172be0d44bc125
抓取天猫商品详情图片
@Service public class CatManager public List<String> getGoodDescImg(String realGoodId) { return webCrawlApi.getGoodDescImgs(realGoodId); }
1
f7db9644fef99e6b392b7fc3a7304d0b
878f845d01f39123392a782d8f0a9a91
Tests the setAz4236() method.
class DecTvaTest extends AbstractTestCase public function testSetAzEyCode() { $obj = new DecTva(); $obj->setAzEyCode("azEyCode"); $this->assertEquals("azEyCode", $obj->getAzEyCode()); }
0
c724500a62a6b45aab8a2a703b40907a
868c59e9849ac415d9379980845df184
使用清屏道具
Global.SoundModel.playEffect('exchange'); if (cc.sys.platform === cc.sys.WECHAT_GAME) { wx.aldSendEvent('点击转换道具'); let num = Global.GameModel.mLevel + 1; wx.aldStage.onRunning({ stageId: num, stageName: '第' + num + '关', ...
1