query_id
string
corpus_id
string
query
string
code
string
label
int64
04db1c2bd1d70c98047cd746b24947cf
e96673c5b83a9ea536e8779162717183
Making inordered view of tree
for(int i=0; i<TREE_SIZE; i++) { nodes[i].self = i; int child = i*2+1; if(child<TREE_SIZE) nodes[i].left = &nodes[child]; else nodes[i].left = NULL; child++; if(child<TREE_SIZE) nodes[i].right = &nodes[child]; else ...
0
c53d25ff412af0f1c113037a49f4955e
2bb4fc3cb08770e7445aed69ec57617c
Logs a successful proxy protocol header that indicates a "local" connection from the proxy itself, to perform a health check.
self, context: QuicReceiveContext, frame_type: int, buf: Buffer ) -> None: if self._quic_logger is not None: context.quic_logger_frames.append(self._quic_logger.encode_ping_frame())
0
762ea9a49fa63f4966bff593afb48fb4
434e15b3bf50d8bf9c432003ade41c6f
From http://my.opera.com/GreyWyvern/blog/show.dml/1725165.
function getScrollbarWidth() { var outer = document.createElement("div"); outer.style.visibility = "hidden"; outer.style.width = "100px"; document.body.appendChild(outer); var widthNoScroll = outer.offsetWidth; outer.style.overflow = "scroll"; var inner = document.createElement("div"); inner.style.width...
1
bffa321272f6e75c3db0c8c9bf97c0f9
6177d21bffcae1aca172c7eee8b3bd58
Filter the query by a related Proveedorescfdi object
{ string sConsulta = ""; switch (iFiltro) { case 1: IQueryable<ProveedoresView> oQuery = sCadena != "" ? from q in oMedicuriEntities.proveedores where q.tipos.Nombre.C...
0
b673bfc307644ad23792f8e3e1887b2e
a89a3ab81b1e73aa457fd659440c42bc
Returns the string index for a CONSTANT_String type entry. The value is unspecified otherwise.
public int getStr();
0
f06f77ed0f65aa485baf2ecf2ae5669a
469f63b3065d1d6963983835d99f2162
入力された学籍番号とパスワードが正しいかどうか判定
StudentBeans login_info = null; PreparedStatement stmt = null; ResultSet rs = null; try { this.dbConnect(); stmt = con.prepareStatement("SELECT * FROM student WHERE student_id = ? AND student_password = ?"); stmt.setString(1, student_id); s...
1
b3f72aecdbff12f813997ac6b193f020
bdba4f8c1cc5e96a8e89deb07fd34cdf
Sets Copy Content Preference
{ logger.LogMethodEntry("CustomContentPreferencesPage", "CustomContentPreferencesOptions", base.IsTakeScreenShotDuringEntryExit); base.WaitForElement(By.Id(CustomContentPreferencesPageResource. CustomCopyPreferencesPage_Link_CustomizePublisherContent_Id_Lo...
1
12408359be8da4d771708546872e1ada
92dd8bce5135339a9222483b42e93e44
Gets all connectors.
final class Manager public function getConnectors() { return array_merge($this->getDefaultConnectors(), $this->getAdditionalConnectors()); }
1
0ec418c45889b0b293989ab6a59799f4
d00ef86a33bfc3cf58cdb0da2643cbca
Определяет, является ли текущий набор должным (строгим) подмножеством заданной коллекции
if(items == null) return true; if(Count > items.Length) return IsProperSuperset(new Set<T>(items)); return false; }
0
9f4c7f926b58e7a132d80dadbf971caa
1f9e79e3fa0dc3fe707c16703a306879
Sets the Order handler.
class Calculator public function setOrder(Order $order) { $this->order = $order; }
1
1fa859d1ea789c53ee45775af2861070
50ab39ebfafb233a1049c6e44fd07e5f
Produce a future for computing a response from a request.
class Client(object): def __fulfill_request(self, request_method, request_args): return build_response( request_args.ReqID, request_method( request_args, timeout=self.timeout, metadata=self.__gen_metadata() ), )
0
520442c525ed7537d469a02a07fbf220
f79d7e76945bccfb07be6e02776ecfcd
SCRIPT SYMBOL: [GUIControl] GUIControl::set_Y
{ GTCX char *l_feature_name = "set_y_position"; RTEX; #define arg1 arg1x.it_i4 EIF_TYPED_VALUE ui4_1x = {{0}, SK_INT32}; #define ui4_1 ui4_1x.it_i4 EIF_TYPED_VALUE ui4_2x = {{0}, SK_INT32}; #define ui4_2 ui4_2x.it_i4 EIF_INTEGER_32 ti4_1; RTCDT; RTSN; RTDA; RTLD; if ((arg1x.type & SK_HEAD) == SK_REF) arg1x.i...
1
fa0d8c13561f05efdcfbf33b6d04afa0
5226089f36f9e73fe49a274db73ef002
创建二叉树,返回跟结点的地址
Status CreateBiTree(BiTree *T) { TElemType e; scanf("%c", &e); if (e == '#') *T = NULL; else { *T = (BiTNode *)malloc(sizeof(BiTNode)); if (!(*T)) return ERROR; (*T)->data = e; CreateBiTree(&((*T)->lchild)); CreateBiTree(&((*T)->rchild)); } return OK; }
1
0e00f589a86229ebd8acb92646284e92
1e3d69f60a56ecaaf162e62b2e4d9322
从本机装载表单模版
class Mform extends M_Controller public function import() { if (IS_POST) { $file = FCPATH.$this->dir.'/config/form.php'; if (!is_file($file)) $this->admin_msg(dr_lang('335', $this->dir.'/config/form.php')); $this->load->model('module_model'); if ($this->module_model->import_form($this->dir)) { $this->...
1
95e1191b854730bb92f505c1d966a3b4
49b2cfd155cb6d23f1d7df0679b49502
Determine the distance from the start after following the instructions.
face = "E" coordinate = [0, 0] for line in lines: action = line[0] value = int(line[1:]) if action in face_direction_map: direction = face_direction_map[action] for index in range(2): coordinate[index] += direction[index] * value co...
1
02d2d9962f28db723ae7b077c7b95367
7d7c4b047af1ae55674da5c22b8db32c
Determines if the instance is configured as interstitial. inline. Interstitial instances should not be added to view layouts.
{ if (Application.platform == RuntimePlatform.Android) { if (jc != null) { bool value = jc.CallStatic<bool>("interstitialIsReady"); return value; } } return false; }
0
914cbbb3d270e8e9ae2184bc6b56fd18
b2f2db0a1ee6e9dc8aaecf0a2c797d7c
メディアプラン用国别データを取得する
{ try { $country = $this->protocol->findCountryDataByName($request->getCountry()); $languageCode = $this->getLanguageCode($country); $countries = $this->protocol->findCountryDataByLanguageCode($languageCode); } catch (ProtocolException $e) { throw new ...
1
71248bb8808f4de3a5b832f9faea9252
ea9a3ef9e3b87808a1733e2eb9d997ae
Returns the action that was performed in order to evaluate if the expected condition was met. This action gets repeated until either the condition is met or the timeout occurs
val start = System.currentTimeMillis() while(System.currentTimeMillis() < start + timeout) { action().takeUnless { predicate(it) }?.let { return it } } return null }
1
5d7ff1945a6d5c0869985f111ff9f919
d01f4b3e81cd704b30385947760557fc
Generate a parser from endpoint metadata - no params
public class CodeParser extends TreeVisitor private void parseEndpoint(Endpoint endpoint, List<JavadocBlockTag> tags, MethodCallExpr call) { endpoint.setType(Endpoint.Type.valueOf(call.getNameAsString().toUpperCase())); ParserHelpers.getCommentTag(tags, "type"); if (call.getArgument(0) instanceo...
0
09f920e1468661b065a06e46bc407c50
70ad26f4580ada7e538ac7b3481d96e6
Get the corresponding cartulary's Biblio title - used for Solr Indexing
public String getBiblioLevel();
0
2ec1dc9cd0ba97fe52076107d833cae1
6b3f26f7a2341ea5bf8e30306e634d43
Moves all the source project\&#39;s contents to the destination project and remove the source project
processIO(new IOCallback<Object>() { public Object doInProcessIO() throws IOException, NullPointerException { FileUtils.copyDirectory(new File(srcDir), new File(destDir)); return null; } }); }
0
5f5f0db814ed77ce03f9562148353a99
f10eb2a60c475a4a72fc5023a15fbd5a
邀请好友入群 || 新建群
function invite() { var groupName = document.getElementById("inviteGroupName").value; var friendName = document.getElementById("inviteFriendName").value; if (groupName == "") { alert("群名不能为空"); return; } if (friendName == "") { alert("好友名不能为空"); return; } var xmlHttp; if (window.XMLHttpRequest) { xmlH...
1
b3a1eb25c00d2dee0fae5a567dd0684d
0480fe7a8d99a90f42f2068cf704aa59
! Increases the serial by one.
class RedisExtend extends Redis public function serialInc(string $serial) { return $this->evalSha($this->lua_sha1['serial_inc'], ["__serial_number:{$serial}"], 1); }
1
c9e4ddfc92ed1ab4a959a7464e82e888
d73e5aa815c0b2657b75c0f6f0301802
获得分页时结束索引
namespace QXQPS.Vo public class BsgridPage public int GetEndIndex() { return curPage * pageSize - 1; }
1
9aa6dd994c9ff84e6dde91dffbe69c34
ff6ee4edf75223f3af6b79d2c39fdd81
产地 原产国(地区)/启运国(地区)表分页查询
public String doQueryNation1(){ HttpServletRequest request = ServletActionContext.getRequest(); String page = request.getParameter("page"); String limit = request.getParameter("limit"); int pageIndex = ParamsUtils.toInteger(page, 1); int pageSize = ParamsUtils.toInteger(limit, 20); DBHelper dbHelper = DB...
1
4add7d666bda33a7526f892b0e5b0335
8d0c340d62bb46ac8866ce24435f821d
更新点赞数和收藏数
"update article", "set agree_number = #{agreeNumber,jdbcType=INTEGER}", "where id = #{id,jdbcType=INTEGER}" }) int updateByPrimaryKeyFabulous(FabulousDto record);
0
64fe21643a4e26b3f82e96da0d425508
54614519d777f913d5f56ba05cddf7ae
returns index of corresponding teamName in array
char *team_name = (char *) malloc(4 * sizeof(char)); switch (team){ case FCM: team_name = "FCM"; break; case EFB: team_name = "EFB"; break; case SDR: team_name = "SDR"; break; case RFC: team_name = "RFC"; break; case ACH: team_name = "ACH"; break; case FCN: team_n...
0
5ea1ab1bbe9aa578204f3dfad1d4e4a9
e4fcba49ceb3b70d14937db11dafdaf1
统计费用全部清零
Alert alert = new Alert(AlertType.CONFIRMATION); alert.setTitle("提示"); alert.setHeaderText(null); alert.setContentText("\r\n你确定要清空所有统计信息操作吗?"); Optional<ButtonType> result = alert.showAndWait(); if (result.get() == ButtonType.OK){ DBUtil.del_all_record(); currentRecordList = new ArrayList<>(); each...
1
73687e038beb1c3eae1ed65546be4e7c
dfff37d5adf1f1c78bbd98805202fa7b
显示无法转接客服
{ string to = info.ToUserName; string fr = info.FromUserName; info.ToUserName = fr; info.FromUserName = to; info.MsgType = "transfer_customer_service"; return info.ToXml(); }
0
ebd02e512d58d9bd38aeeabb6aabedcb
af5e2806125de7dcb73627dd88465d2a
モデルの向きを左右反転させる
{ direction *= -1; Vector3 scale = transform.localScale; scale.x *= -1; transform.localScale = scale; }
1
9baa2a3891ba49cc8eeaf17b18f1219d
d8ef0c4ae0e89dea16edf83be75b06d4
Send a notification to a specific user if they have notifications turned on. If the user is not currently connected, will store the notification until they next connect.
global $wpdb; $url = ''; if ( !$this->user_enabled( $type, $user_id ) ) return; $content = $this->get_notify_content( $type, $vars ); if ( $vars ) { foreach( $vars as $key => $var ) { $content = str_replace('{'.$key.'}', $var, $content); } } $content = implode(' ',array_unique(explode(' ', $cont...
1
135e4f320411cef2655e63f2c62e144c
6fc113e27b188facebced7e73375154e
This adds a property descriptor for the Processingpoint feature. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Report_processInstance_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Report_processInstance_feature", "_UI_Report...
0
e505b78bb928f1c8fa6042c86f3e9d31
70bf72321a0b90a1e08d80b1667640c2
choose a random index and flip it
void flipBit(uint8_t *byte) { int random = rand() % 6; printf("Shifted by: %d\n", random); uint8_t mask = 1 << random; *byte ^= mask; }
1
f5b48b958fd6a67dba5bd2d3f2c415e8
32f99dd255cf625ef69d85dd157446c7
Detect available interfaces and add each with a dynamic IP
DC_BEGIN_DREEMCHEST namespace Network bool Network::requestInterfaces( NetworkAddressArray& broadcast, NetworkAddressArray& host, NetworkAddressArray& mask ) const { #if defined( DC_PLATFORM_ANDROID ) LogError( "requestInterfaces", "%s", "not available on Android devices\n" ); return false; #elif !defined( DC_...
1
74002a99609efbde90f1b1ee3a00568d
dacf28ba7bc134810bf3ee6cba992668
Return an HTTPReq if request was valid, otherwise return None if request was invalid
class HTTPConnectionManager(ConnectionManager): def get_request(self, url, **kwargs): return HTTPRequest(url, **kwargs)
0
49615e3272ccd0e0b475809163a5cd94
7c54f2a17e822cdbf3e3051ef5eea338
Attempt to move piece at origin to destination <para/> Returns true if successful
namespace Chessnet.Models public class ChessPathEngine public bool TryMove(Move move, (int,int) position) { return false; }
1
ab2f7ea7716ae74d880d87f74cbc61df
609d4c427f0391f0787ce8059a889498
Returns Status Code Response.
return $this->respond([ 'success' => [ 'message' => $message, 'status_code' => $this->getStatusCode() ] ]); }
1
b7101de983373d72b6d2551a6d1f7f84
92192a7b5a46b513e19c05edfede5147
Test generation of a test referencing an action group with no arguments
{ $actionGroupUnderTest = (new ActionGroupObjectBuilder()) ->withArguments([new ArgumentObject('arg1', null, 'entity')]) ->build(); $this->expectException(TestReferenceException::class); $this->expectExceptionMessageRegExp('/Arguments missed .* for actionGroup/'); ...
1
47c90fdb15e66407f0c10c864695819f
fdb5a97f66ee4c592085084c21546267
Set the default window title, the window title when none is specified
namespace TUMSS20 public class ElementalCave : Game protected override void Initialize() { Window.Title = "ElementalCave - TUM SemesterGameJamSS20"; base.Initialize(); }
1
77fc4a9eeaa34a6c7f39ba4ca714640f
48fdd3553be189857849ded6e7c1428f
mistakes-based fitness function
fit = 0 somelists = [[True,False] for i in range(NUMVARS)] for element in itertools.product(*somelists): if individual(*element) != targetfunct(*element): fit = fit + 1 return fit
1
55130e530a7752538fe1ddbcffe91bed
8d9c8144a9e58d5ced5d5a4fc9ec209f
@brief 获取视频状态
int get_video(void *para, int count, char **value, char **name) { int vcount = 0; printf("count = %d\n",vcount); int i = 0; reply_list video; printf("存入\n"); return 0; }
0
03bccdca912c53723dfcf17490457d2c
df50c88f10c8f1916e15f7b5215d441e
UseExample kernel module's initial function.
list_init(&kernel_module.header); refcount_set(&kernel_module.count, 1); kernel_module.name = "kernel"; kernel_module.description = "Kiwi kernel"; kernel_module.state = MODULE_READY; elf_init(&kernel_module.image); list_append(&module_list, &kernel_module.header); kdb_register_command("modules", "Display inform...
1
e5236e42f57cca91d5f7f46203361d59
baef3853c57ea1573b2b49071f4dfdf0
Forming document tree by depth-first search. Recursive function.
for n in dir(parent): if n.startswith('__') or n == 'cimpl': continue o = parent.__dict__.get(n) full = prefix + n tree[full].append(o) if hasattr(o, '__dict__'): is_module = isinstance(o, ModuleType) is_ck_package = o.__dict__.get('__modul...
1
cb46905273229de1ee79370922a2eb88
83b2584b22a8f8e838abf9b3131094f0
The eccp maintenance plan lookup table modal.
AppPermissions.Pages_EccpElevator_EccpBaseElevators_Create, AppPermissions.Pages_EccpElevator_EccpBaseElevators_Edit)] public PartialViewResult EccpBaseProductionCompanyLookupTableModal(long? id, string displayName) { var viewModel = new ECCPBaseProductionCompanyLooku...
0
5e21c00f337768e223d743152b445189
02af020f34bc48a4d5f4bf35ccb0ac06
外场向特车发送车辆确认成功消息
Integer orderId=(Integer) params.get("orderId"); String carNoNew=(String) params.get("carNoNew"); String carNoOld=(String) params.get("carNoOld"); IOrderService orderService = Environ.getBean(IOrderService.class); Map<String, Object> order = orderService.getOrderByOrderId(orderId); if (order == null || orde...
1
4025f13c8be93e2616f0805181c08c3e
68d098e629b05fa78ca70f2f71405c3d
Get the bid that the objective agent is currently submitting to the cluster.
class Agent(object): def bid(self):
0
4f9f1e6b1643aa65531f9f0b7288d43e
2c09a9f1325a273d6842c20e591673bb
Leave the Roomba in passive mode; this allows it to keep running Roomba behaviors while we wait for more commands.
class Roomba(object): def clean(self): self.cmd(135)
0
63f0e550d37f14a59bdce3d9dec08690
d59033929ef28cfd9ea347307cbc609b
Return the size (in bytes) of this readable (if known).
long getSize() throws IOException;
1
68ec3a91adb7437bd00029838ce8071e
c85cd03a2066e891bb33234e85bb099e
Remove trailing text from a string
def strip_suffix(text, suffix): if not text.endswith(suffix): return text return text[:len(text)-len(suffix)]
1
c239299003d7cfb4e19de495347ce430
3fe8e56f050d4ca396c745840e455ffd
Returns the Field names and datatypes as an array (Field => Datatype) of $table
{ $DB = $this->getDatabaseConnection(); $dbtype = $DB->phptype; $def = $this->_definitions[$table] ; $ret = array(); foreach($def as $t) { switch (strtoupper($t->type)) { case 'INT': case 'INT2': case 'INT4': ...
1
1dfec12ad353afec3d182e794f68793f
6abeabe4d20c970ea1d4943435972287
构造联系人XML信息
{ XElement root = XElement.Parse(ContactInfoXML); var xRow = root.Element("row"); if (xRow != null) { model.ContactMobile = xRow.Attribute("ContactMobile").Value.ToString(); model.ContactName = xRow.Attribute("ContactName").Value.To...
0
dcda23fc254b378c171d07139d833002
b3c06013120cf7e15c1a1423e8f6e175
Grabs datacubes and combines them by pixel using addition, finding the mean and the median.
all_data = [] all_var = [] all_lamdas = [] for file in glob.glob(filepath): fits_stuff = read_in_data_fits(file) if len(fits_stuff) > 3: lamdas, data, var, header = fits_stuff all_var.append(var) else: lamdas, data, header = fits_stuff ...
1
96beb1dac7029c34981286d7ed7cf986
9ad04354e5f256fbf9269324f77349f9
avant d'enlever une rangée on s'assure qu'elle est vide
if (!this.cocotiers.isEmpty()) { Iterator<Ramassable> i = cocotiers.iterator(); i.next(); i.remove(); } }
0
f8b174b206c71ce5a706f3512f2d3116
0787150f193438789c311cf3245b8b3d
Creates a new [ListType] instance.
String name, Set<Finality> finality, T listType ) throws ParserException { if (listType.isFinal(Finality.LIST)) { throw new ParserException("Type " + listType + " is final"); } return new ListType<T>(name, finality, listType); }
1
d2415a19f24f9b746db1c9d43d582626
ba210a06d53bfe71ad912fdc0981277c
Compute a Markov chain stationary distribution from a transition matrix.
def compute_stationary_distribution( P: np.ndarray, pi: np.ndarray) -> (np.ndarray, np.ndarray): P, _ = sanity_check_probabilities(P, P) na, ns = P.shape[0], P.shape[1] P_pi = build_markov_transition_density(P, pi) _, u = np.linalg.eig(P_pi) mu = np.abs(u[:, 0]) / np.sum(np.abs(u[:, 0])) ...
1
73d596c8dbd172471f5052deabd88828
3e3d9ccd28da35e9ed677ba425a9457c
Funzione che controlla se ci sono deviazioni o meno dei fantasmi
int deathFunction(int population) { int rNum, dead = 0; vector <bool> animats(population); for (int a = 0; a < population; a++) { rNum = rand() % population; for (int b = 0; b < a; b++) { if (rNum == b) { animats[a] = 0; dead++; } } } return dead; }
0
3e9a40494863919302199725849e39e3
8b72adeca7dc48d4e50891938118252d
adds a random, valid outbound connection from a Room to another Room
struct room *r1 = &rooms_list[room1]; struct room *r2 = &rooms_list[room2]; if (r1->num_conns == MAX_CONN) { return true; } if (already_connected(room1, room2)) { return false; } if (r1->num_conns >= MAX_CONN || r2->num_conns >= MAX_CONN) { return false; } ass...
0
37f0300d903743223949fc9385195176
cf4a8875e0a55fad7277f86ecbaaf19d
updates the scene, if it returns false then the scene is not finished updating and should be called again
void update_scene() { iter_scene(&__do_update_scene); }
0
1ba57d072de3337ea84b98c5aa9cfe68
e1a6e65cda64bee4454a3a4553a3b72f
当 Angular 设置了一个被绑定的输入属性后触发。该回调方法会收到一个包含当前值和
export class ComponentDateComponent implements OnInit ngOnChanges() { console.log("1"); this.outPut("ngOnChanges"); }
1
506f8b0ff7bcd69f40b88f23693e2fb9
cf72292f2e11ab6c0b5e8caf00a19c7d
测试子网修改
net1 = self.dbtest.create_network(self.tenant_id, "plugin_test1") self.assertTrue(net1["net-name"] == "plugin_test1") net = self.dbtest.update_network(self.tenant_id, net1["net-id"], name="plugin_test1_renamed") self.assertTrue(net["net-name"] == ...
0
d9eea9571c1d2c3771a6521ceeb077c6
29a0a02f1396280086803dc281cb937f
Another writer acquired the write region.
auto state = _state.load(std::memory_order_relaxed); while ((state & ~QUEUED_WRITER_MASK) == 0) { if (_state.compare_exchange_weak(state, state | WRITE_LOCK, std::memory_order_acquire)) { return true; } } return false; }
1
2b229785f526a257a69797ee8da3a4f8
5f17d3e4c942faa800da2cc50772cb6d
Set the height of the output segmentation masks.
if seg.shape[-1] != 1: seg = numpy.reshape(seg, seg.shape + (1,)) self.seg_data = seg
0
cf5b0e198b9c9caa040e0c580e09608e
15e6f995e49cfbd60ecd78b812b740bf
generate the collider after drawing is done
public class DrawCollider : MonoBehaviour void Start() { }
0
efe851b34fe7632c6984fff694a9a580
73a7dc438e00490d11744dec6aece762
ファクトリ:プログラムオブジェクトを生成
eve::ocl::Program * eve::ocl::Context::createProgram(const std::wstring & p_path) { return eve::ocl::Program::create_ptr(m_context, m_device, p_path); }
1
fc6428b1926789555a88cf5c240e67c6
8e6214ce57be597c53b7ef4cd18db421
Master node has received a response from one of its workers.
if node_info != self.own_information: self.message_dict.add_node(node_info) self.__remove_node_from_dispatch_if_same_name(node_info) self.connected.add(node_info) if node_info in self.dispatched: self.dispatched.remove(node_info) if node_info in se...
1
e8a318ed010bdf19e942d2b65f47c7d4
61c1c50d82fa55438c811dcc8a7f5c51
Calculates the value of the CDF (cumulative distribution function) for a given x-value
class Chi2_LeftTruncated(object): def cdf(self, x): return self._f.cdf(x)
1
391620de37a0baf47339d890e71f1f87
c37c1d7618127ab7561114dc50d68023
解析未注册的服务
REGISTERED_PATH_SET.stream().parallel().forEach(p -> { try { if (p.endsWith(socketAddress.toString())) { zkClient.delete().forPath(p); } } catch (Exception e) { log.error("注销服务失败: {}", p); } }); ...
0
c3fe89ace20a0d42478cba9f7d12c102
32a7b1d78b147a70ec5936492d20684e
Construct the prediction sequence for the `index` of nodes. Note:
class SemiSupervisedModel(BaseModel): def predict_sequence(self, index): return self.test_sequence(index)
1
59f9df463ffb540546814019bdf39751
32f8c9d55ed2f76f0929644b34ff1e83
移除指定类型的Fragment
public class FragmentFactory public static void removeFragment(int category) { if (mFragments != null && mFragments.get(category) != null) mFragments.remove(category); }
1
c6192a5c6f69db08545c066199c5c25f
d3153c0ae082888c9d120a8c964e5cc8
渲染imgui demo
def main(): window = init_glfw() if glfw.vulkan_supported(): print("Vulkan support available.") imgui.create_context() render_engine = GlfwRenderer(window) value = 10 while not glfw.window_should_close(window): glfw.poll_events() glfw.set_window_title(window, "Pyimgui-exa...
1
2ea1193f4841114f66398a467bb9d306
8e1da4734f2b502bab521a0da3a12ec0
Split a short Plus Code into a Plus Code and reference using regex. For example, "QXGV+XH Denver, CO, USA" will return ("QXGV+XH", "Denver, CO, USA").
if 'q=' not in url: return None line = self._GetBetweenQEqualsAndAmpersand(url) if not line: return None return line.replace('+', ' ')
0
037d7e9cb03f30aecc48e07354f4ce5a
2900719e9c72cd4b9d383393718355f9
Gets a menu by menuIdentity.
namespace Framework.Interfaces public abstract class IMenu: IBase public abstract ES_Menu Get(Guid MenuId);
1
c8fec7fba0b0fdf4d6b00abe253f54c1
3f5230d189f1823581270983e98550ef
used /
let f1 = 3 / 2; println!("{:?}", f1); let f2 = 3.0 / 2.0; println!("{:?}", f2); }
1
f0735512c1c3fccd7fd0ac3e40a92a17
804bb90465f2859818d5769296060d0d
Слот, осуществляющий сохранение результатов о кратчайшем пути в графе
del(self.results[:]) table_columns = {'start': 0, 'end': 1, 'details': 2, 'workers': 3} dt = self.edit_dialog.ui.dataTable works = [] for i in range(0, dt.rowCount()): work = {} for key in table_columns.keys(): item = dt.item(i, table_colum...
0
483cbc0c5ab48ab17fc9230f10af5fe3
0ea84ed61f74146ae6d8907810b4a669
得到行李转盘占用时间
@Table(name = "mina_card_display") public class MinaCardDisplay public String getCardUseLun() { return cardUseLun; }
0
cca2798c66e46719d9e29791fc4ff10a
b58e7c23c08a33480810721fab717236
Update a user in Google Apps
try: r = json.loads(self.call_google_api(service=self.service, api_resource="users", api_method="update", response_field="primaryEmail", userKey=user_key, body={"orgUnitPath": "/"})) if r == user_key: return True else: return False except...
1
c9fd4ec37ab770b21da12810c4db2182
d5936227f5f391da2bc3a4350085c4af
添加一条浏览记录 返回插入条数(应当为1)
boolean addBrowseRecord(Integer userId,String tag);
0
acf3b155349a3078895c9b71a6635adf
1abd3d12d36ea79d16a5b01197c5de3a
Checks whether this pattern is customized or the default value.
boolean isCustom();
1
e1bd34ce552592f53da2b5d853865419
09afa5a7fc61806da65378968ee3969f
当NM停止Container过程中抛出异常时被调用
class ContainerServer(ServerBase): async def on_stop(self) -> None: await self.container_client.stop() await self._on_query(dict()) gen_log.info("Stop container {0} ({1})".format(self.container_id, self.request.request.remote_ip))
0
db98605a8a2fb2258f19a5e3cf53f756
7c30fc23c0e8a6d3f97001035caec22d
创建验证码 根据不同的验证码类型调用不同的{@link validateCodeProcessors}实现
@Component public class ValidateCodeProcessorHolder public ValidateCodeProcessor findValidateCodeProcessor(ValidateCodeTypeEnum type) { return findValidateCodeProcessor(type.toString().toLowerCase()); }
1
c6204be6fccdbe8506380e6f28555e14
afb461f285cdb951f7f6aaced5771d51
从某个节点开始展示链表
class Node function showNode($head) { $cur = $head; while (!is_null($cur->next)) { $cur = $cur->next; echo $cur->data, '<br>'; } }
1
5fb877dc7fd1f721c5fd49f2e9e4926b
46b1171a316f74f6486d9628cb515782
Returns vendor activity flag
public function isVendor();
0
9e61bf92f0a2140f114dfdd444d2a2d2
53df93d15cc1ddc6fd4552c3b2710e5e
对搜索词排序 + 只允许在7日内
class SearchView(APIView): def post( self, request): mes = dict() import time try: text = request.POST.get ( 'text' ).strip () except: text = None if text !=None: try: search = TopSearch.objects.filter(search_name=text).order_by...
0
7a6a2927e69298d7edece9428d181ed2
169ade519571fe8e3852b59f3edf331a
Set the other multi-image sources in the editing context. Used to ensure the user doesn't rename the current multi-image source in a conflicting way.
public void SetSource(JArray sources) { if (sources != _imageSources) { _imageSources = sources; MarkUpdated(); } }
1
7098f48f6d03a4063e24644bd50def1f
4efac5bdc7209cac49c86607e20149aa
Close the Sqlite storage.
def close(self): storage.close()
1
733d7b9004aaf558b486c8942ebfac82
604814b2ef7fdc8588a9eb3e6d41dcba
Column-wise Khartri-Rao product
def colProd(cls,prior): res = prior for i in range(len(cls)): res *= cls[i] return res
0
795cfc81d2d92b7ccfc8456aa4783c67
6261a212537edbc8f98adadf1efc81a4
Compute the energy of the model. Energy is defined as the square of the Frobenius norm, which is also the square sum of singular values.
g = np.log(self._gv()) f = np.log(self._fv()) return 0.5 * np.linalg.norm(g - f)
0
5e33dcfc8231714907b2c814a0a6a3f1
fae7cce0f253f32215dc3c9aaa7002ee
源映射中的 sourceRoot 内容。
get sourcePath(): string { return this.#script.sourceDirectory; }
0
0810166f5ba7530c080e1d618b44db0b
38f8279927428e31e0536c6a0978a7ef
Returns a form that has a captcha challenge and response
public function retrieveCaptcha($formId = 'default');
0
e536182c30fb291a4cc35a37b275e4e8
5779d556dfb7751f52ff7821f083a44b
Compute mean activation of v given (h,s).
class RBM_Module(nn.Module): def sample_v_given_h(self, h): p = self.prob_v_given_h(h) v = p.bernoulli() return p, v
0
867a46e6e54c356f58b24411ca289a88
441749f30a2587c39e52aad136d0e9c0
Bubble chart visualization builder
approach_list = ApproachAct.objects.all().values_list('id', flat=True) speciality_list = SpecialtyAct.objects.all().values_list('id', flat=True) speciality_list = speciality_list.order_by('id') bubbles = BubbleAct.objects.all() approach_dict = {int(i.id): i.name for i in ApproachAct.objects.all()} ...
1
3228d37b145f4a1df589e6be54626e01
f3ab2f506816b2cd984354b50e0a9588
Get RetainedStatus
public class K2UserFeedback public String getRetain3() { return retain3; }
0
47652365b81562a0661b25ed5a8ff4ed
478893677d99ec7237517226fa6f8a6d
set ptp message type for snapshots
class Kappa(): def SetPTPV1Mode(self): self.config['Streaming']['PTPMode'] = KappaConfigs.KappaConfigs.C_PTPv1_SLAVE
0
b531928f0f71d85ac330650a96f16f78
351452224f451604b78589f4fad7c384
Indicates whether the current version number has a minor segment.
public class HadoopVersionInfo public Optional<Integer> getSubminorVersion() { return Optional.fromNullable(subminorVersion); }
0
b9aab9958cc26752b50eb5968857eb45
10a09e0e5de9c39a830daf59346b4e1c
A series of numbers representing regular samples of a variable.
def create_samples(n_samples, start_val=0): return np.arange(start_val, n_samples, 1)
1
c1e023ef04bdd40a6860266246c87a26
bcaf738cc62df76a434ea158d02e18d0
Check whether an id would identify an entity in a dropbox. Does not determine existence of the entity, just whether its id indicates it is a dropbox or contained within a dropbox.
class BoxApi(object): def _is_id(cls, remotename): return cls.NODE_ID_PATTERN.match(remotename)
1
d2560524973755e006afb863263a2616
f7781be7f0e54ede3286b6c5a45cea95
下载解析直播数据
let dir = "data"; if(!fs.existsSync(dir)){ alert("请先导出数据"); return; } closeMenu(); co(function*(){ let files = fs.readdirSync(dir); for(let j = 0; j < files.length ; j++){ if(files[j].indexOf("json") == -1){ continue; } var contents = fs.readFileSync(dir+ "/" + files[j...
1
389dd70d705d03c7cae61dbedd486678
b6007c0344c18af8835a458cce41ba5a
Visit a parse tree produced by LayoutEBNFParser#document.
class AutoQcmParserVisitor(ParseTreeVisitor): # Visit a parse tree produced by AutoQcmParser#document. def visitParagraph(self, ctx:AutoQcmParser.ParagraphContext): return self.visitChildren(ctx)
0
d610a2f8c16544fc77bd13108c93d467
a420ae9149a7847dba67f49085c2d66b
获取选项满分值
{ $max = 0; $options = $this->get_options(); foreach ($options as $option) { $max = max($option->get_score(), $max); } return $max; }
1
def1a711da0c8d9cd6969ce6d23579b1
40a9148dbcac14d6154bba314ca59d8d
Create header with icon, title and description.
local function create(options, parent) options.size = options.size or "full" local container = lib:create_container(options, parent) container:SetHeight(lib.dimensions.header) container:SetBackdropColor(.8, .8, .8, 0) local heading = container:CreateFontString(nil, "OVERLAY", "bdConfig_font") heading:SetText(stri...
0