query_id
string
corpus_id
string
query
string
code
string
label
int64
31f9239cd42ea7c799dabd508d2ad5aa
50c2badb0bade31b42983ca1346ef2ef
Returns the NPCTown ID
long NpcType::getIdNpcType() { return this->mIdNpcType; }
0
a5680f922d1fd96d55e916bdfdbac31a
840f988b29191c13a50d3eb3b1c73157
Load all particles/cells of one type for a specific subhalo (optionally restricted to a subset fields).
void load_halos(void) { read_halo_particles(); read_halo_substruct(); read_virial_mass(); }
0
c84a99733691c854cc16777c6419faf5
9f8f09221a77adc333b7dfff18791aef
Trains Word2Vec Model for all documents
class Word2VecClass(object): def trainModelWord2Vec(self, model, epochsCount=100): model.train(self.sentences, total_examples=len(self.sentences), epochs=epochsCount) return model
1
2ceb5adc7138bbf643c290bb07fddc44
4c64a25e86af52ec73066c9c2c4ff4e9
Called when the mocked method is called. This implementation runs the action with the mock instance and given parameters.
class CallableMock public function __invoke() { return call_user_func_array($this->mock, func_get_args()); }
1
9805cfe96a17d8730312badf1391abaa
dcc74601de629bedf16d576e19d02a1f
@brief Helper function to update spectrogram bitmap
gboolean refresh_graph(int* start_sample_ptr) { int start_sample = *start_sample_ptr; g_mutex_lock (&data_mutex); gfloat start = (gfloat)start_sample; gfloat end = (gfloat)(start_sample + iFftSize); gtk_databox_set_total_limits(GTK_DATABOX (dataBox), start, end, 6.0, -6.0); gtk_widget_queue_draw...
0
9d55413c188ce284c44e739abba0dc16
b2f469da84314b4200bd0d66cd45ceb4
同步地从云端获得指定宝宝的身高体重等信息
List<Map<String,String>> heightList = new ArrayList(); Date startDate=null; Date endDate=null; List<BodyIndex> list=null; try{ startDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(sDate+" 00:00:00"); endDate = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(eDate+" 23:59:59"); }catch(Exce...
0
79914744e07fe8b3337c8bed3320f558
57eb11c66ad1761cd4270b5997d151a8
Downloads all the test objects to a given directory in a given pod.
def download(ctx, config): assert isinstance(config, dict) log.info('Downloading s3-tests...') testdir = teuthology.get_testdir(ctx) for (client, client_config) in config.items(): s3tests_branch = client_config.get('force-branch', None) if not s3tests_branch: raise ValueError...
1
7aafa9cd25871129648b822a475b6f50
819ad18c625b0e6a42b7def22378ea36
Retrieves the first applicable policy that grant the requested access. For example, used for applying effects (constraints) where we need the {@link ACAbstractEffect} associated with a certain policy. information of the requesting user required to evaluate the policies. {@link Optional}; an empty {@link Optional} other...
Update withAccessPolicy(AccessPolicy accessPolicy);
0
440fd4bccd3bce726331407e476f6d01
2b20ab80fd64fe1a6bb5bee78e02b3c1
Pushes the function into the Lua stack
namespace Eluant public class LuaRuntime : IDisposable internal void PushCFunction(LuaApi.lua_CFunction fn) { PushSelf(); PushOpaqueClrObject(new LuaOpaqueClrObject(fn)); LuaApi.lua_pushcclosure(LuaState, cFunctionCallback, 2); }
1
ff84f1b5d72a88e100df7d0d86110373
344c158f8383ca3df273232f3f6fd8d9
记录总共发放实物奖品的数量
let objText = this.activeView.getChild("scroll").asCom.getChild("obj_item"+row).asCom.getChild("txt_num") objText.text = "x" + awardCount }
0
8ec71d8aab67b11f986d9a62133a2d36
fc7f2e0a06ae0c7ba06247a7598a9762
用于屏蔽webbrowser脚本错误
namespace Imi.SupplyChain.UX.Modules.OrderManagement.Views public partial class WebView : UserControl, IWebView, IBuilderAware, IActionProvider, ISmartPartInfoProvider private void HideScriptErrors(WebBrowser browser) { FieldInfo fiComWebBrowser = typeof(WebBrowser).GetField("_axIWebBrowser2", B...
1
8d5edf2c4a59091284d21bf103475f51
ab1e7a0e9cae2125941d892c8026e3f6
@brief Power on WLAN
{ olpc_ec_cmd(EC_SET_SCI_INHIBIT_RELEASE, NULL, 0, NULL, 0); olpc_ec_cmd(EC_WAKE_UP_WLAN, NULL, 0, NULL, 0); olpc_ec_cmd(EC_WAKE_UP_WLAN, NULL, 0, NULL, 0); return 0; }
1
bf0c8ff75bd404976b7ca39b4f02d74f
8087cef6a919fd05f9448c55822e8bab
查询店铺会员推荐资讯列表
function getMemberShopsFavoritesList($page_index=1, $page_size=0, $condition = '', $order = '');
0
df51c1538913a8c2f16bc5500ee86c6c
ef61168d247030230ecb75aa0e79f93d
Представляет простой текст
namespace MOD.Web.Element public partial class Element public static Text Text(string text) { return new Text(text, false); }
1
19bfc7ad7ed72728b9ba75b9d58012ed
b8c3913d4608ba69feeac46ffff8d4a9
Returns the 95th percentile latency for single operations since service startup.
public int get95thLatencyMs();
1
4eef1ccf627f108ef4f30d0c16ff4db6
bf110eee4ba068427096328ffba43829
For object
indent(nSpaces); cout << obj.getConcreteClassName() << " Object " << (obj.getName().empty()?"NONAME":obj.getName()) << endl; for (int p=0; p < obj.getNumProperties(); ++p) { const AbstractProperty& ap = obj.getPropertyByIndex(p); indent(nSpaces+2); cout << ap.getN...
1
e9d90d7ce4ba5084d9a8c8dda626ec7b
f4d9cae24599fb6ba3504bf19f61ad80
切换服务器创建房间
let gameServ = GSMgr.choiceMinServer(data.gameType); if (!gameServ) { wsConn.sendMsg({cod: ProtoID.CLIENT_MIDDLE_REQ_ADD_MATCH, args: {result: ProtoState.STATE_GAME_NOT_SUPPORT}}); return; } allocRoomId(data.gameType,data.mode,function (err, roomId) { if (err) { wsCon...
1
8dddfa40cd260a1b585bdfb79b5fab84
83bdff5fc0d10bb38408ad11cc1001b8
设置 编辑权限:1表示能,0表示不能 sys_role_permission.EDIT_RIGHTS
public void setRightsType(Integer value);
1
f17fc98cd76d8bc93a9ac85fe1c0e2db
649f79f0ce07335c3b48adcb0da9457e
将pt值转换为px值,保证文字大小不变
public class UiUtils public static int px2Pt(float pxValue) { DisplayMetrics metrics = BaseQiShuiApplication.getContext().getResources().getDisplayMetrics(); return (int) (pxValue * 72 / metrics.xdpi + 0.5); }
0
a3f54c2ef10e5b4bde0ad8d3728fdd62
f5959aeb3c84dc36fdfffa91cdbab339
both template type arguments are explicitly specified
{ MyTemplateClass<std_ext::string_template_arg<1u> > myObj; myObj.print(); MyTemplateClass<std_ext::string_template_arg<2u> > mySecondObj; mySecondObj.print(); }
1
507c643c60c28cbac9b633989d60aca0
ecbeac6f3eefaba5c1a74ccb49406b45
Divides the first given mathematical entity by the second given mathematical entity
class Param(object): def __div__(self, other): try: new = Param(formula=[[operator.div, self, other]], strform=Param._build_str_formula(self,'/',other)) except: raise return new
1
6ed1a8aa123e2db9fa92183ce6ea2b02
11984474f8209f8dc2d1e8d4d9c8825b
获取拼多多商品列表
{ $header_data = [ 'verify' => false ]; $response = $this->client->request('POST', $this->getUrl('hdgoodslist', $data), $header_data); return json_decode((string)$response->getBody(), true); }
1
a464427c34fef54261cfd65bba1fb529
d72362bd656501bd1f5cd8c8c40f6c74
记忆化搜索,每当搜索到当前位置对应剩余位置的可能组合,就记录下来,避免大量重复计算。
class Solution: # 返回二维列表,内部每个列表表示找到的路径 def __init__(self): tmp, all_ret = [], []
0
ae685b0a40ee8448c4abac26fc09182e
ae5da30f58046229ea9bc8b12dc95ee0
Проверка, что это гласная на латинице
namespace Counter abstract public class Ngram protected bool IsLetter(char sym) { sym = char.ToLower(sym); return IsRussian(sym) || IsEnglish(sym); }
0
3b2d13dc2ba1ba8bd17ab02ce39f603d
8cd654d0dcd399af68aafa532093a86c
*Чтение файла построчно с конца
{ ifstream fin(filename); if (fin.is_open()) { const size_t size = 255; char buf[size]; while (!fin.eof()) { fin.getline(buf, size); cout << buf << endl; } fin.close(); } else { cout << "Error. Can not open fil...
0
fbf8e0ca5bdb7a3bbdbb68d03bbbb215
912c7d40536242bac2d489faf9b2211a
Retrieves the integration version
class SharpspringIntegrationPlugin extends BasePlugin public function getVersion() { return '0.1'; }
1
ef7f8dc4c5330bddb2830d8989f79d33
23b537b7a8a1874dd6c09f95367f10f4
@brief Configure the exit routine from power mode.
void HAL_PWR_DisableSleepOnExit(void) { CLEAR_BIT(SCB->SCR, SCB_SCR_SLEEPONEXIT_Msk); }
1
175d1e136fedc570c31a05d9af5652b7
2f223c7f4550730bedbce6085ee84265
兼容ie下载功能
function ieCompatible(){ if( !('placeholder' in document.createElement('input')) ){ $('input[placeholder],textarea[placeholder]').each(function(){ var that = $(this), text= that.attr('placeholder'); if(that.val()===""){ that.val(text).addClass('placeholder'); ...
0
a5a5fcac332d41112eee79391abaf6b4
4d966dd4bb0f6133c427548d89babdc6
Fills dropdown list with column names
class App(): def populate_fieldbox(self, input_path): headers = self.get_csv_headers(input_path) for fld in headers: self.field_listbox.insert(END, fld)
1
8849e53f61a22502f7214324cf3a50a0
3a7350a963efd9cae71e6d88d570e389
Reveal the hidden message by going over every pixel and retrieving information we stored on the least significant bit
class RGBEncoder(Encoder): def decode(self, image_path): image = Image.open(image_path) image_rgb = image.convert("RGB") bit_string = "" width, height = image.size for j in range(height): for i in range(width): (red, green, blue) = image_rgb.getpixel...
1
97d3847cebed20a2abf8728f819f1871
eb809034d91613170f68eb0fbd69a6bc
set the test examples with a new collection of test examples
super().setUp() self._examples = [ { "hashed_id": "a0", "domain": "home", "intent": "IN:CREATE_ALARM" }, { "hashed_id": "a1", "domain": "office", "intent": "IN:CREATE_ALARM" }, { "hashed_i...
1
8b1ffacfded62297f722bdd75f36afc3
4b4343e90f7a4fb11d474c595ec545bf
Open file stream to read from database
{ if (_engine == null) throw LiteException.NoDatabase(); return new LiteFileStream(_engine, this); }
1
2e450fa093d9db2b27378ae9787d33b4
94d9224992a4648cf95f0d3e6d963e9d
داده های اولیه فرم
{ btxtSoyad.Clear(); btxtAd.Clear(); btxtAtaAd.Clear(); btxtDOB.Clear(); btxtPOB.Clear(); btxtMilliyet.Clear(); bcmbCins.SelectedIndex = -1; bcmbAileVeziyyet.SelectedIndex = -1; btxtSexsSeriya.Clear(); ...
1
f5d9ca4fb1266d3b57d75a43fc1de635
a6faefa2a1517442ca06324465237a6c
set the granularity of the pipeline
class ODM public function setGranularity($granularity) { $this->granularity = $granularity; return $this; }
1
5ac37b053092380fc6923da77934e406
b1c1734983fac4c90e197a445126ecec
<p> This demo will demonstrate typical usage of JavaScript calls. </p>
public class Test1 public static void main( String[] args ) { Document doc = test(); BrowserUtil.render( doc.generateHTML() ); }
0
6053000fbe5b99c00e1c3d67dcf081f5
56e6bf5c34ef36c8b5e2e3ba1905444e
Delete an aggregation account holding
namespace Nucleus.Api public partial class AggregationAccountApi : IAggregationAccountApi public void DeleteAggregationAccountUsingDelete (Guid? aggregationAccountId) { DeleteAggregationAccountUsingDeleteWithHttpInfo(aggregationAccountId); }
1
0157fd9da9536c32e1774e4f65370f39
28cdeb33cfb404bcbe450b04294bde02
根据主键全部更新字段数据
boolean updateByPKSelective(Entity entity);
0
e252387589d2049e415705e70e3c486a
f47167c35d1fca840174b6d660791c4d
! \brief Sets rotate flags when touchpad pad is pressed
{ mActiveButtonMask = ( bLeft ? MOUSE_LEFT_BUTTON : 0 ) | ( bMiddle ? MOUSE_MIDDLE_BUTTON : 0 ) | ( bRight ? MOUSE_RIGHT_BUTTON : 0 ); mRotateWithoutButtonDown = bRotateWithoutButtonDown; }
0
adca0f1ad36c62a26dcb30d8f1758949
b2cf21038099a645775b5e13664e7fa6
Remove the given file from the archive
class PyCdlibISO9660(object): def rm_file(self, iso_path): self.pycdlib_obj.rm_file(iso_path=iso_path)
1
715491f881640d7f83af26e13d0942e7
a496e421cc8b246e0990dceeaf0dd568
Get bundle group price select conditions
class Innoexts_Core_Helper_Catalog_Product_Price_Indexer extends Innoexts_Core_Helper_Abstract protected function getBundleGroupPriceSelectConditions() { return array_merge(array( '(cw.website_id != 0)', ), $this->getBundleGroupPriceSelectAdditionalConditions()); }
1
e0128b8ba6e08b1313d532715fcfdf3b
9039989087108608efaf5f4379903f4e
Test empty generator.
class TokenizerTest(unittest.TestCase): def testEmptyString(self): generator = parseTokens('') with self.assertRaises(StopIteration): generator.next()
1
da7c75267557f2fed5d49863dcd7b96c
8e63674bd1cdfdd3fb481a224e2db152
Permet de récupérer le nombre total de biens loués par le locataire
public int getRentInBeansNum(int rentInUserId);
1
7c76a26757b9f810074d7d5dd2c5854a
f49bb6a0cd52e4ec65e7c55717d05b91
Will redirect to the product details page of the product that matches the query string as SKU
class SideBar extends Component{ onClickProducts(event) { const { redirectProducts } = this.props; redirectProducts(1) }
0
690f6caf142faf97cce175b4c894e97d
de10d3f547ce6402e03035c32251707b
RotateRight will rotate the active piece to tne right by one
class Game movePieceRight() { this.activePiece.x += 1; if (this.hasCollision()) { this.activePiece.x -= 1; } }
0
645d275d6aeae780bf90e6c367c67d33
d70ca2f43cf3f33c658df246e0dcb3a4
Test case for api_v1_policies_secrets_put
class TestCoreV1Api(unittest.TestCase): def test_patch_namespaced_secret(self): pass
0
6de53f65928143c6ebeeb0d4a4795379
813ff3b2b392c83b9bbb1e4387fcf737
Gets all BusinessUnits
namespace IO.Swagger.Management.Api List<BusinessUnitBaseDTO> BusinessUnitsManagementGet ();
1
1b22af5ebd7bed32ac6ca9b2253d57d7
a3a03a80d1dfe42ddede0c49a4b094f0
予約除外状態を解除
class ProgramInfoViewModel extends ViewModel public async deleteSkip(): Promise<void> { if (this.program === null) { return; } try { await this.reserves.deleteSkip(this.program.id); this.snackbar.open(`除外解除: ${ this.program.name }`); } catch (err) { console.er...
1
fce9711df1b12a4b5b4d284a3773302b
ee6eb93c5fcb8f4b566dac573004cd22
valida si la entidad ya fue registrada en la grilla
$sql = 'SELECT * FROM registros WHERE proyecto = '.$proyecto.' AND categoria = '.$categoria.' AND norma = '.$norma.' AND generalidad = '.$generalidad; $result = mysql_query($sql); if($row = mysql_fetch_array($result)){ return true; }else{ return false; } }
1
e64aa2ed0d19f579fa1001da83e40016
cd45b60537ef965df0f03d714cdb7692
cette fonction traduit une sequence de bits en un message. Cette fonction est maintenant simple, mais elle est insuffisante (elle ne permet pas de trouver le debut du message par exemple) le but de ce TP est de la completer.
message = "" elmtRecu = "z" compteur = -1 while ord(elmtRecu) != MARQUE_DEBUT: elmtRecu = ser.read() while ord(elmtRecu) != MARQUE_FIN: if ord(elmtRecu) != MARQUE_DEBUT: message = message + elmtRecu compteur += 1 elmtRecu = ser.read() return(message)
1
765dcbf1ffc5b287cb4a7913b4b1cd69
e59c15a2579ea9fed457ad6b80c781be
Order by incident message (needs to be followed by {@link #asc()} or {@link #desc()}).
ComparableExpressionBase order(String property);
1
c37e11b8d956693d4c1f60a52efa53e3
1ca1967464f0dd5b76cda86f9cd5fdc5
隐藏日历
local owner = self:GetOwnerControl() local calendarPreView = owner:GetControlObject("DiDa.CalendarPreView") calendarPreView:SetVisible(false) calendarPreView:SetChildrenVisible(false) local calendarView = owner:GetControlObject("DiDa.CalendarView") calendarView:SetVisible(false) calendarView:SetChildrenVisible(f...
1
9ce11cdffbbf7e5b74d2b17d79a8f7c1
45d7c87b5609abf782975f02fcb3a535
这个函数,在世界空间指定的位置播放 AutioClip,参数 音频信息,位置,注意这里的位置写的是物体的位置,因为是 2D游戏
function PlayAudioAtPosition(name) owner_audioEmitter:SetAndPlayAudioClip(name) end
0
eefa40a3724ab5e7cae8c9163b505a07
8d1d932ced1c7c138f45d8e8b40749b9
Builds a csv table with top 20 most frequent words for each target. To be used in visualization to demonstrate NLP functionality Input - X message feature associated with the model y label features associated with the model Output - keywords.csv stored in 'data' directory
relevantSentences = {} for index,row in self.data.iterrows(): if(row['topic']==top): c = 0.0 document = self.docsStringForEntities[index] for word in document: if word in dicOfWords10: c += dicOfWords...
0
e1ef9e3e35682b7ff3e16ec687d02d3e
d70384aeb97dd83ec07816aafa367726
拒绝邀请 拒绝邀请请求。受邀帐号拒绝邀请,此时当前邀请状态将设置为拒绝,邀请停止。此接口只能由受邀帐号调用。邀请发起者无法再次激活被拒绝的邀请,但可以重新发送新的邀请。 Please refer to HUAWEI cloud API Explorer for details.
export class Client extends AbstractClient async DenyOrganizationInvitation( req: DenyOrganizationInvitationRequest, cb?: (error: string, rep: DenyOrganizationInvitationResponse) => void ): Promise<DenyOrganizationInvitationResponse> { return this.request("DenyOrganizationInvitation", req, cb) }
1
9f0f7db30ef517b6a82adfd6f86b10f6
baeac53f807dc6671571d36c59636984
从 ziplist 编码的哈希结构中找到 field 指向的值 如果值是字符串, 将内容和长度写入 vstr, vlen 如果值是数值, 写入 vll 查找成功, 返回 0. 否则返回 -1
int update = 0; if (o->encoding == REDIS_ENCODING_ZIPLIST) { unsigned char* zl; unsigned char* fptr; unsigned char* vptr; field = getDecodedObject(field); value = getDecodedObject(value); zl = o->ptr; fptr = ziplistIndex(zl, ZIPLIST_HEAD); if (fptr...
0
134eaa9a8c7850aa38d4f4cce95d3480
d512c37f4f26296310ffb99efa19bdda
create the docblox classes table
{ Schema::create('doc_category', function (Blueprint $table) { $table->bigIncrements('id'); $table->string('name')->unique(); $table->string('title')->unique(); $table->longText('desc')->nullable(); $table->string('created_by')->nullable(); $table->s...
0
62c008c4747c0257764636941bbcf2b3
8359e20cfd004e1c8a3e0fedaa8140ae
Returns a copy of this instant with the specified duration in seconds subtracted. This instance is immutable and unaffected by this method call.
impl Instant pub fn checked_sub(&self, duration: Duration) -> Option<Instant> { self.0.checked_sub_duration(&duration).map(Instant) }
1
b40f4d51c3a77b4e4d39cc712b20360d
018dbf2e2011ede772641d68b1ead68d
Updating the position of the particle based on Verlet integration.
public class Particles public void UpdateParticle(float dt) { if(float.IsNaN(position.x)) Debug.Log("nan"); float deltaTimeMass = (dt * dt) / mass; var lastPosition = position; position = position * 2f - prev + deltaTimeMass * force; prev = lastPosition; velocity = (...
1
3197d9b60adc29b85f581ba1fc1387dc
7fa21ee472b08115ff785eb7a6693ae4
Sets some meta-information about the application. See also L{libvlc_set_user_agent}().
class Instance(object): def set_user_agent(self, name, http): return libvlc_set_user_agent(self, name, http)
1
3522093e27db465e9accb1096fa1fb9e
aadc1404d46c80d82a2d962b3b21c6d4
Load and display Encounter (visit) information
namespace BillingSystem.Controllers public class EncounterDetailController : BaseController public ActionResult Index(string encId) { if (!string.IsNullOrEmpty(encId)) { var encounterCustomModel = _eService.GetEncounterDetailByEncounterID(Convert.ToInt32(encId)); ...
1
5e4ed22075411b2447b7a74a66c51a79
17afbe51cc58ed695edf3382386703bb
Locks the sender/receiver accounts to avoid invalid balance reads by this or other transactions
impl Bank fn lock_accounts(&self, txs: &[Transaction]) -> Vec<Result<()>> { let mut account_locks = self.account_locks.lock().unwrap(); let mut error_counters = ErrorCounters::default(); let rv = txs .iter() .map(|tx| Self::lock_account(&mut account_locks, &tx.account_key...
1
a183cd51726bb7718239019f2eee1439
8d6a713a8d4b7789e62a4de0acbbe8ec
开启强力查询,将无视逻辑删除字段
{ $this->onlyTrashed = false; $this->withTrashed = true; return $this; }
1
e58db083d44a9264a3115227e700bd5b
c6b4676d7970df7cc004984b0fa33cfb
페이지 경로를 사이트이름과 마지막슬래쉬 제거하고 반환하는 함수
function getPageFullName() { var array=window.location.pathname.split("/"); return array[array.length-1]; }
0
ba0c2acc94d17f5fefb2a3a9fa0f8e2f
c6c411b2c609884120840ba656e5218d
callback for Robot Body by defining which axis of motion goes with what body part
class Switchingbehaviour(): def callback_miroBOT(self, gb): self.q_miroBOT = gb
0
6a1b54ebecb2c72e8f241777b4314fe0
69ca031055cef1b67c9bbf8620eb544d
Save course menu ID to table. Needed for queries.
abstract class Controller public function SetMenuId($sMenuId) { $this->m_sMenuId = $sMenuId; }
0
55827fb763196338d61c183c059fbbfc
609e2674c637a221dcc928186ac6f889
Syncs all videos to current time
class UniboxSync(): def sync_all(self): self.sync_inventory() self.sync_movie() self.sync_title() self.sync_kiosk() self.sync_ad() self.sync_slot()
0
0e833212ae1de61aed61e96344f98b75
ab64c683e0886f12f36e831b8b4a1f7d
Función para logear empleados
String userName = InputAsker.askString("Username: "); String pass = InputAsker.askString("Password: "); logueado = daoNeo.loginEmpleado(userName, pass); }
1
e8ce7aabdf654f391920cd06da43c20f
36240986d18504883205f5397f0d4f3e
释放语音合成
function release() { RNXfSpeech.release() }
1
1ff80c567de3d6086db207e40fb1be3a
ee5572d66580eb410b814336ba1ea29a
Generates a random simple bipartite graph on (V1+V2) vertices with E edges.
public class DigraphGenerator public static Digraph simple(int V, int E) { if (E > V * (V - 1)) throw new IllegalArgumentException("too many edges"); if (E < 0) throw new IllegalArgumentException("too less edges"); Digraph g = new Digraph(V); Edge[] edges = new E...
0
4ba35354c5b34bf1ec8cbc93f023cfef
7aa05244edea92ea6335ff503d4fed66
绑定单价最低或者总价最低
var flag = false ; var settlePrice = $("#settlePrice_b2_id").html() ; var topYouPrice = 30 ; var youPrice = $("#youPrice_b3_id").html() ; var shopIdOne = $(ob).attr("name") ; if(ob.checked) { $("input[name="+shopIdOne+"]:checkbox").each(function() { var checked = $(this).attr("checked"); if(checked !...
0
c88d3f6941d2819a33ce6bf336c3dc1d
b7748d5428922304b9f3dc99b02b12bb
Perform chrome window painting in the non-client areas.
namespace Krypton.Toolkit [ToolboxItem(false)] public abstract class VisualForm : Form, IKryptonDebug protected virtual void OnNonClientPaint(IntPtr hWnd) { Rectangle windowBounds = RealWindowRectangle; if ((windowBounds.Width > 0) && (windo...
1
9ea2a81b9d8377b17be745871f6a3594
94434c825df3d1f21fdef0c4864ccb84
Set entity position (entityIdint, x,y,z)
void UpdateEntityPos(int entityId, Vector3 pos);
1
db5227f343fb6d42a6d0022bed96bd36
760bbccff327aa4b2a5c11a2a33f3f0a
Euler-Maruyama scheme to get ensemble truth solution
t_tot, xs_m, sigma_m, n, particles_at=None): L = int(ts/dt) n_iter = len(xs_m) assert n_iter == int(t_tot/ts) + 1 x = np.zeros((n_iter, n)) y = np.zeros((n_iter, n)) z = np.zeros((n_iter, n)) x_tilde = np.zeros((n_iter, n)) y_tilde = np.zeros((n_iter, n)) z_tilde = ...
0
7639bd405613710afd3c66078f020bdc
0988ef0a883793c25d23dacf75297b56
解压tgz压缩包
class UpdateSelf(object): def un_tar(tar_path, target_path=None): if os.path.isfile(tar_path): if not target_path: target_path = os.path.dirname(tar_path) try: tar_obj = tarfile.open(tar_path, "r:gz") tar_obj.extractall(path=target_path) ...
1
f6d59fe20f533631f54a2a9a70026ce0
a9f5f519c78a8ae2da87507a8de0ec68
Encrypt the provided plain text password. Returns string in format: <iterations>$<base64_salt>$<base64_hash>
namespace Cryptography.EncryptContext public class Encryptor : IEncryptor public string Encrypt(string password, string _salt) { byte[] salt = new byte[8]; int i = 0; var saltStringArray = _salt.Split(','); foreach (var stringSalt in saltStringArray) ...
0
3983a57bd9181bf382fa0edf65a741c3
c161cfc72cd8820e5e5aa6a6e90f5baf
Vráti, či je spojenie na databázu otvorené.
public class LocationTrackingDB public boolean isOpen() { return isOpen; }
1
3f63a81d3c122bcba3f3552dbb621d91
350ddd292f70107c0a7277af3648e6c6
Retrieve team members list from API and assign to state.
return new Promise((resolve, reject) => { getTeamList().then(response => { if (response.data !== 'ERROR') { commit('SET_TEAMLIST', JSON.parse(response.data)) } resolve() }).catch(error => { reject(error) }) }) }
1
fc9124be8e10774adcda2729c5356cf9
c9926f60b859e0a93d41cac1f69d4341
This method is responsible for validating the value passed to the setStatusEvent method This method is willingly generated in order to preserve the one-line inline validation within the setStatusEvent method This has to validate that the property which is being set is the only one among the given choices
{ $message = ''; if (is_null($value)) { return $message; } $properties = [ ]; try { foreach ($properties as $property) { if (isset($this->{$property})) { throw new InvalidArgumentException(sprintf('The proper...
1
3b314dab1c64b59e18ea8174015cd139
acab8a771738ebdf66e7fea056c136ed
Convert" a CSV into a new CSV by normalizing types and correcting for other anomalies.
dfs: Iterator[pd.DataFrame], parse_dates: List[str], binaries: List[str] ) -> Iterator[pd.DataFrame]: for df in dfs: yield _fix_csv_types(df=df, parse_dates=parse_dates, binaries=binaries)
1
7d7e3133b22ae60933968c9d7df593f5
32df22699c25d7a52ca4b1b4b2639a14
Returns a default logger which emits on standard output.
local options = options or {} return make_logger(io.stdout, options) end
1
f858b6562c3924ca0401b8e6665d1cbf
051a32eb9d2e94fe3ee2803f3df5d287
Add properties to this object validator
this.get('internalValidatorsProps').addObject(propertyName); const internalValidatorsProps = this.get('internalValidatorsProps'); defineProperty(this, 'internalValidators', computed( ...internalValidatorsProps, function internalValidators() { return internalValidatorsProps .map...
1
ed6722fa91891f712780051699de1d30
fdb5e73501d8c40d531d9560aa2efddf
1. Check CPU architecture: arm or x86
if (neuron::config::system_processor == "arm64") { #if __arm64__ const char* we_are{"arm64"}; #elif __x86_64__ const char* we_are{"x86_64"}; #endif auto const cmd_size = strlen(libname) + 100; auto* cmd = new char[cmd_size]; std::snprintf(cmd, cmd_size, "lipo -archs %s 2> /...
1
5d140e66cb4637e6169b6a9f8131e4d2
09d14bfda540cc9c371c7d4397ccbd7f
<string.h> Compare two strings using the locale
{ ASSERT(p_a); ASSERT(p_b); return strcmp((const char *)p_a, (const char *)p_b); }
0
4f874b070234d9f2081fcf46dc6d235d
c13dc40091e737893a579daade3946ca
Exit a parse tree produced by DecafParser#eq_op.
public class DecafBaseListener implements DecafListener @Override public void enterEq_op(@NotNull Decaf.Eq_opContext ctx) { }
0
47e7c7a1b58a2efa7ca8596a40422a6d
eb7cf1cd445b85290262ec2bfb681209
播放res内raw的视频文件
public class MainActivity extends AppCompatActivity private void initVideoPath() { Uri uri = Uri.parse("android.resource://com.example.playvideotest/"+R.raw.video); videoView.setVideoURI(uri); }
1
0abe5df7e2cfc464bb04cfaeb0c9dacb
000c08cfc04f79ce23ba0a542e3eefb8
Gets collection of source URI's.
public class SourceCollection_c extends Node_c implements SourceCollection public List<SourceFile> sources() { return this.sources; }
0
1a57baaec02328d953cf1cdeee8781a2
6c053251844e46b53da4fd6066964c3c
http://stackoverflow.com/a/6547474
function array_merge_recursive_new() { $arrays = func_get_args(); $base = array_shift($arrays); foreach($arrays as $array) { reset($base); while(list($key, $value) = @each($array)) { if(is_array($value) && @is_array($base[$key])) { $base[$key] = array_merge_recursive_new($base[$key], $value)...
1
1d4ab5cbf74678e2bcf4b6eb38616892
837043827882521ac78124438e5e3e81
设置TextView左边和右边的图片
fun TextView.setDrawable(leftImg: Drawable? = null, topImg: Drawable? = null, rightImg: Drawable? = null, bottomImg: Drawable? = null) { setCompoundDrawablesWithIntrinsicBounds(leftImg, topImg, rightImg, bottomImg) }
1
e9339666477585214617842b7ccdf5ce
d28a82f04ce64f5c58f7f823e3871546
Shades a rectangle of tiles in room with given color.
int wCol, int wRow, int wWidth, int wHeight) { BoundsCheckRect(wCol,wRow,wWidth,wHeight); const UINT wRowOffset = this->pRoom->wRoomCols - wWidth; const UINT wStartPos = wRow * this->pRoom->wRoomCols + wCol; const UINT wXEnd = wCol + wWidth; const UINT wYEnd = wRow + wHeight; SDL_Surface *pDestSurface = this-...
0
f677ff0774a6708f531c3df38012e37d
b4be0d90923dabf69b3952dc73880aa8
retorna true si el usuario esta autenticado
global $_SESSION; if (isset($_SESSION['usu'])) { return true; } else { return false; } }
1
6970152b1ffc4bdc2b5d4956c64a7ad2
184837c086710cc4e790a527e5dc5374
Implement how the inputs should be casted before calling forward
cast_inputs = inputs mixed_type = self.get_mixed_precision_type() if mixed_type == MixedPrecisionType.FP16: cast_inputs = self._cast_mixed_precision_inputs(inputs, mstype.float16) if mixed_type == MixedPrecisionType.FP32: cast_inputs = self._cast_mixed_precision_i...
1
e0fb1b5d4f182121fecb525fef0a69fd
089b307622f61de673635c7f4e980600
获取接口分析分时数据(1天)
class WeiXinDatacube extends WeiXin public function getInterfaceSummaryHour($beginDate, $endDate) { $options = array(); $options['me_url'] = sprintf($this->datacubeUrl, 'getinterfacesummaryhour', self::getAccessToken()); $this->resourceOwner->setOption($options); $data = array(); ...
1
8ba583033be024c8a14cf76ab82822b4
961ea07a5038a21cbad692544b6c7cfe
Reset the turn costs in the cost module to 0.
{ for (auto it = m_Cell.begin(); it != m_Cell.end(); it++) { (*it)->SetMoveCost(0); (*it)->SetEstMoveCost(0); (*it)->SetTotalMoveCost(0); } }
1
959cb624657ab77e75e765de8c41a18e
18761578dbad66f40107d14736bee6ea
根据节点对象来使其子节点及连线的显示方式发生变化
function toggleShowChildIns(tree) { if (tree.children.length > 0) { tree.children.forEach(child => { scene.getObjectByName(child.id).visible = tree.expand const linkObj = scene.getObjectByName(`${tree.id}-${child.id}`) linkObj.visible = tree.expand updateChildVisibility(child, tree.expand)...
1
7e6a589806e65a3a16ae844612e5969e
f46dd84a5fbb3cb8b53db49166890e19
Gets the test classes directory.
public abstract class AbstractTestTask extends ConventionTask implements PatternFilterable @InputDirectory @SkipWhenEmpty public File getTestClassesDir() { return testClassesDir; }
1
993aceed525d9c55a956dd09e03dc3a5
46a0b4a519b984bd2c82e0298c2563d9
Set the maximum length of the standard log line strings when printed. This doesn't include header descriptions, tracebacks, or logs not classified.
@ClassImport("log") public class Logs public void setMaxLength(int max_length) { this.MAX_LENGTH = max_length; }
1
fa9c5ab8cc9f7fa0b067701568ea2e4a
17803c3ec1fed4c97b8848eb6bf4912b
Calculate the radius of the base using the angle between the generatrix and the base in degrees and the height
public class Sierpinski public static double height(double length) { double h = (length * Math.sqrt(3)) / 2.0; return h; }
0
9a2b60cb481142566230f250aaad914b
8a6c5d66e6f5a35f839babf6e074f0a9
审核不通过,根据角色,更新审核状态
@Controller @RequestMapping("/tranAudit") public class PersonTranferAuditController @ResponseBody @RequestMapping("/unPass") public Object updNo(@RequestBody Map map){ return personTranferAuditService.updNo(map); }
1
0a9c09775c1e667a51676d67e630d70f
345055c77f156d2be3fbb00fc74d0135
如果之前有缓存数据,则根据之前缓存的数据渲染界面
function render() { cateData = JSON.parse(localStorage.getItem('pyg_cateData')) if (cateData && Date.now() - cateData.time< 24*60*60*1000){ leftCateList() rightCateList(0) }else{ getCatedata() } }
1
ae67e337cd691dd023e669d858ff4b78
32c53cf3597148f57c81ff89164d8f44
Given input: a filename mod: the case transformation to perform on the filename Return The transformed version of `input`
def truecase(input_string: str, case_func: Callable[[str], str] = str.lower) -> str: return case_func(input_string)
1