query_id
string
corpus_id
string
query
string
code
string
label
int64
fbebd5c348fe0f51ab66e50d0b4c08ca
7a54aedf5f741f59b49601fde4c6e836
Método para agregar una nueva universidad.
class UniversidadController extends Controller public function create(Request $request) { $request->user()->authorizeRoles(['Administrador']); return view('Universidad.create'); }
0
d0f5b4f0a0808b833ece4cafb4b042cf
ea8881ea8df5b8e4100ed153774490d8
设置View的状态,通过广播启动页面更新
public class PlayerManagerReceiver extends BroadcastReceiver private void UpdateUI() { Intent playBarIntent = new Intent(PlayBarFragment.ACTION_UPDATE_UI_PlAYBAR); playBarIntent.putExtra(Constant.STATUS, status); context.sendBroadcast(playBarIntent); Intent intent = new Intent(ACTION...
1
5122905067b411c1320f741e074c9bdc
a8c49613d84074c1fec8b88df80e215e
判断旅客是否携带婴儿
function ydbz2zibeiqian(){ $("#traveler").on("click","input[name=zibeiqian]",function(){ var $this = $(this); var $siblingsCkb = $this.parents(".tourist-ckb").children("input[type=checkbox]"); var thisIndex = $siblingsCkb.index($this); var $tips = $this.parents(".ydbz_tit_child").siblings(".zjlx-tips").eq(0); ...
0
e46dc6efb2a276eb5652bfa467b8139c
7cf428e62e0c619c8d491a9cd4039991
${iServerJava6R_Query_method_FromJson_D}
try { if ((s.getString("YST_DISSLOTNO")) == null) this.setYST_DISSLOTNO("") ;else { this.setYST_DISSLOTNO(s.getString("YST_DISSLOTNO")); YPS_Definitions.checkValidYLocation(this.getYST_DISSLOTNO()); } } catch (JSONException e) { YPS_00_JSONDataAnalyze_And_Error.YPS_json_error("YST_Info Error At Fro...
0
917ecc8e0767aaa52f7c17e29bb09aed
18d7b1bf7499e65ace6b09d18b64dd04
ASIGNAR O QUITAR OBJETIVO ESTRATEGICO DE LA CARPETA POA
if($this->input->is_ajax_request() && $this->input->post()){ $post = $this->input->post(); $accion = $post['accion']; $obj_id = $post['obj_id']; $poa_id = $post['poa_id']; $dato_poa = $this->mpoa->dato_poa($poa_id,$this->gestion); if($accio...
1
0ccd89bd9a314577412e401095ba79c9
250a7b8d6eef58361aefa57330164032
创建冯氏材质属性编辑器
class MaterialEditor PropertiesGUI() {}
0
608adf537373a6fce0f4b7326b8b4b18
464c344df6ee56f15db26d6a7295afdf
2次元ベクトルの内積を求めます。
namespace Test_Point_in_Polygon public static class PrimitivesMath static public double DotProduct(VectorDot2 a, VectorDot2 b) { return DotProduct(MakeVectorDot1(a), MakeVectorDot1(b)); }
1
a42ca2f1ca45ff237afd57108eca23b8
74f75353bd34f17934dc8b5fd7f9f40c
<p><b>Retrieves the best lap time by pilot ID.</b></p>
class iRWebStats: def best_lap(self, subsessionid, custid): laptime = self.event_laps_single(subsessionid, custid)['drivers'][0]['bestlaptime'] return laptime
1
d8aee28083ed71bc3a05a665af123660
49f579823f7b072549120c5427637e26
\brief Check the EPD extension board
{ const uint8_t wbuf[] = { BLS_CODE_MDID, 0xFF, 0xFF, 0x00 }; uint8_t rbuf[2]; extFlashSelect(); int ret = bspSpiWrite(wbuf, sizeof(wbuf)); if (ret != 0) { extFlashDeselect(); return false; } ret = bspSpiRead(rbuf, sizeof(rbuf)); extFlashDeselect(); if (ret || rbuf[0] != EXT_FLASH_MAN_ID || ...
1
bdbcf67cb5c2d98e5c7acb824c49aca3
bf944c185ceebed02cba5da0b82c257a
本文を掲示板トップ画面表示用にフォーマット
$IPBHTML = ""; $IPBHTML .= "<div class=\"borderwrap\"> <div class=\"maintitle\">{$this->ipsclass->lang['th_title']}</div> <table class='ipbtable' cellspacing=\"1\"> <tr> <td class=\"pformleftw\"><b>{$this->ipsclass->lang['th_topic']}</b></td> <td class=\"pformright\">{$data['th_topic']}</td> </tr> ...
1
408ee280e45b79b0ebc54f21bc1088e5
377c7adb72b9b063bf759de12c251809
Reads a Testplan JSON result.
load_tree = functools.partial( load_tree_data, node_schema=TestGroupReportSchema, leaf_schema=TestCaseReportSchema, ) entry_data = data.pop("entries") status_override = data.pop("status_override") timer = data.pop("timer") timeout = dat...
1
578fca90c109318930393cdc89a65c97
e4d8325533163fe387bd01110a7a0054
Grades question 5 based off of user input.
var question1 = document.quiz.question1.value; var question2 = document.quiz.question2.value; var question3 = document.quiz.question3.value; var question4 = document.quiz.question4.value; var question5 = document.quiz.question5.value; var correct = 0; if (question1 === "Star-Prince") { correct++; } ...
1
613a78072e35cde22d1f1d1263d5a959
a7c935bceb9fcab749d3a7bf411bd86a
lookup the index assigned to a free variable, or create one if it is not defined yet
var = IdleCompiler.__current_scope.find_var(var_name) if var == None: IdleCompiler.__should_gen_quads = False IdleCompiler.__compiler_errors.append("line %i: Undeclared variable '%s'." % (line_num, var_name)) elif var.var_type == DataType.ARRAY: IdleCompiler._...
0
ec82b27cb32b8f5f4da723e6f43e0baf
e9402533fab2361059294bd482dd10c2
医生团成员列表
$dg_members = Dg_memberDao::getListByDg_centerid($dg_centerid); if (!$dg_members) { return array(); } $arr = array(); $arr['0'] = '全部医生'; foreach ($dg_members as $member) { $arr["{$member->id}"] = $member->doctor->name; } return $ar...
1
ea6dfac9caedf68d90f6f090e1c381c7
eb18465eded86f6bac62b8ab3647996c
fetch input data from file and put into input data structure
{ char tempdata; int tempRet; if (File_Input_File_Handler == NULL) { File_Input_File_Handler = fopen(FILE_IF_INPUT_FILE_FULL_PATH, "r"); do { tempRet = fscanf(File_Input_File_Handler, "%c", &tempdata); } while (tempdata != '\n' && tempRet != EOF); } }
0
fdb87af4f0d137c1a9d5a0462b4ab974
5c2ebea4e0bc77c499035e92b53df842
Starts joystick calculation node
void joystick_task(void) { scheduler_add(&joystick_t); }
1
55eb0c242f8db6bf2671b65e1d91a9ab
0e088811560ed42871b9c0e741de1562
Called when <see cref="EndTime"/> changed.
namespace Leen.Windows.Controls [TemplatePart(Name = PART_Popup, Type = typeof(Popup))] [TemplatePart(Name = PART_TextInput, Type = typeof(TextBox))] [TemplatePart(Name = PART_Hours, Type = typeof(ListBox))] [TemplatePart(Name = PART_Minutes, Type = typeof(ListBox))] [TemplatePart(Name = PART_Second...
1
c00edf6e0b90d087443af1e2d9f36558
7795b504ad07c38d876c9ca6793c811d
<p> Returns the list of datasets contained in the given dataset group. The response provides the properties for each dataset, including the Amazon Resource Name (ARN). For more information on datasets, see <a href="https://docs.aws.amazon.com/personalize/latest/dg/API_CreateDataset.html">CreateDataset</a>. </p> Provide...
java.util.concurrent.Future<ListDatasetsResult> listDatasetsAsync(ListDatasetsRequest listDatasetsRequest);
1
b122c58449a5355c752c7e749fc6d125
8c1dfc3d46fdb211e0d7cd5dc915ffba
反対側の交差点の取得
@SuppressWarnings("unused") @Getter public class Graph extends EventSource public List<ICell> getOpposites(List<ICell> edges, ICell terminal) { return getOpposites(edges, terminal, true, true); }
1
7d636b783f2781181b921c0146ed6e6d
681c8792756395fce7f4debc433566b1
将大数和一位数相乘
public class 大数加法和大数乘法 public static String bigMult(String s1,String s2){ char chars1[] = s1.toCharArray(); char chars2[] = s2.toCharArray(); int result[] = new int[chars1.length + chars2.length]; int n1[] = new int[chars1.length]; int n2[] = new int[chars2.length]; for (...
0
7e08c027d8e628725c937ef44d77db97
e124abb16fca3f4cce31c29136891922
creates an image preview for videos that have no image
export class StudyComponent implements OnInit getThumbnail(url): string { if (!url) return ''; const videoId = url.split('/').pop(); return `https://img.youtube.com/vi/${videoId}/maxresdefault.jpg`; }
1
084538f4565400c48dc0462df3bf32e2
33d4127e385003c107ba8aaac1f81cf1
Get whether the sensing chain FIFO stopping writing new values once the FIFO Threshold (watermark) is enabled
BMG160_RETURN_FUNCTION_TYPE bmg160_get_fifo_wm_enable( u8 *v_fifo_wm_enable_u8) { BMG160_RETURN_FUNCTION_TYPE comres = ERROR; u8 v_data_u8 = BMG160_INIT_VALUE; if (p_bmg160 == BMG160_NULL) { return E_BMG160_NULL_PTR; } else { comres = p_bmg160->BMG160_BUS_READ_FUNC(p_bm...
1
be95b47bf1a1e634b14a22aba332e520
18400608b5cc7ca8e1bdf082862d083d
Переводит длины из `sample` размерности в `frame` размерность
class Resize: def invert(self, sample): raise NotImplementedError
0
efc246d431b287f9efc268c59936d14f
95d27a50ab6cd2eb74304252d323b1d9
Set internal dynamics parameters such as mass, friction, etc.
void RobotAgentWorldInterface::prepareInternalDynamics () { }
0
3e7ed436a13edcf404af8dfddf7dc1b4
753ad600082fa8c7d2990cce69e3f36c
wrap service and action into single JSON entity
class Action extends JsonResource public function toArray($request) { return [ 'hierarchy_id' => $this->hierarchy_id, 'level' => $this->level, 'description' => ucwords($this->description), 'fear_average' => $this->fear_average ]; }
0
a6ed8c3752150a3d47cdaa88fe63fb81
527e5a40d91c7f7ecebfd99d0a24e115
Send response to a test request
global lock, next_test_id with lock: request.response = str(next_test_id) next_test_id += 1
1
492caccdfc58ff439e8dcffd24cf9b28
b2b679e431aa61524710a1943c69b24d
批量插入PartItemResult表的数据
@Override public int insertBatch(List<? extends BaseEntity> list) throws SQLException { dataSource.startTransaction(); List<Object> listObject = new ArrayList<Object>(); try { for (Parts entity : (List<Parts>) list) { Object obj = dataSource.insert("Parts.inse...
0
b9b13187e2d2b8ff3ac8510bc6f40724
8402ad2b836e1b3e031634cb5e145b87
データベースへのシーディングを行う
model_mgr = self.getModelMgr() error_msg_list = [] player = None stagemaster = None mid = self.__get_int_value('_mid') stgid = self.__get_int_value('_stgid') scouteventmaster = BackendApi.get_scouteventmaster(model_mgr, mid, using=backup_db) if scouteventm...
0
69042ca41d16a35a3d11a423e89bd43c
324846058e79365e0d8b3313872d3bf9
Parses the rect offset. Tricky part as we actually parse Vector4 and convert it to RectOffset
{ GetOffset(out float out_x, out float out_y); return new Vector2(out_x, out_y); }
0
9d0ad586539ee462170a6a44a2f1e54d
13f8b72327a392fd6dbd9efc2cc2c9bb
以这个圆柱体重设另一个圆柱体
FCylinder::FCylinder(const FCylinder& fc) { radius = fc.radius; height = fc.height; }
1
b8637a87170142dc8f15b61a89f00b75
0824300f933d3c21eda90fabca501356
AssertNoOutput asserts that the bar did not output anything.
conf := &OutputConfig{ Filter: Filter{ IsActive: false, }, } m := &mockOutput{} ro := NewRunningOutput("test", m, conf) for _, metric := range first5 { ro.AddMetric(metric) } for _, metric := range next5 { ro.AddMetric(metric) } assert.Len(t, m.Metrics(), 0) err := ro.Write() assert.NoError(t, err...
0
1489201d58e09d521f0519426899c4c1
111f96adb8d56c66583ff70133fdad4c
Deletes the given keys from the given bucket.
ResultMap batchDelete(String[] keys, Bucket bucket);
1
af2ce938675b0214dbecf333110591f8
d6e3e0002c64111cebc5f005de2dd8d2
第三步:把杨辉三角的列表转为字符串列表
def char_matrix2string_list(char_matrix): string_list=[] for row in char_matrix: string_list.append(''.join(row)) return string_list
1
fd0629b332cc28858a46b6a065b88cda
95ca872f6c9529ec882a942d4f654725
value의 크기와 범위에 따라 그 타입을 리턴한다.
public class PRUtils public static String typeOfInteger(int val) { if (val > Literal.MAXSHORT) return Literal.INT; else if (val > Literal.MAXBYTE) return Literal.SHORT; else return Literal.BYTE; }
1
88480d9d0fc30af647d5743f939545e8
0f0a2b774f966aa6db563d596ac96c0d
Copies a remote GCS file to a local path
for local_file in glob.glob(local_path + '/**'): if not os.path.isfile(local_file): continue remote_path = os.path.join(gcs_path, local_file[1 + len(local_path) :]) blob = bucket.blob(remote_path) blob.upload_from_filename(local_file)
0
afff957457b707ba5d145b2d22d3cd3f
7ddfcb6b6f6b6149d278d2df9b7e94b8
パッケージ情報からプラグインのリストを取得します.
List<DevicePlugin> result = new ArrayList<>(); if (pkg != null) { ServiceInfo[] array = pkg.services; if (array != null) { for (ServiceInfo info : array) { ComponentName name = new ComponentName(info.packageName, info.name); ...
1
edce123947020be72027d7a6e5650bdc
253d14f02a4353205af055d022ef21f0
设置联系客服悬浮按钮
if (mFloatingActionButton == null) { mFloatingActionButton = new FloatingActionButton(mContext); mFloatingActionButton.setBackgroundTintList(ColorStateList.valueOf(Color.WHITE)); mFloatingActionButton.setCompatElevation(10); mFloatingActionButton.setUseCompatPaddi...
1
167e2e92eab6473d9dc49522bdeae7b2
c6a7ce6110d9870a7c80ce3a8b3c99ca
向自定义关卡路径中保存当前地图
[CustomEditor(typeof(Map))] public class MapEditor : Editor private void SaveLevel() { Level level = map.Level; List<Point> tempList; tempList = new List<Point>(); foreach (Tile t in map.Grids) { if (t.canHold) { Point point = new Point(t.x, t.y); ...
1
4b5939934d1c67e94feaf91e41a7f50f
47b04e743e7555758d9b3bd0f5b95ae1
Checks if the date and time value is within the time fragment range including boundaries considering that null is a -infinity.
public bool Contains(DateTimeOffset value) => value >= Start && value < End;
0
202ad4d16ae7a104e157601e90099057
71024e68ad6c18e7c0c7ffaf400750b6
Gets braking torque (0000h: passive value)
{ int32_t ret; ret = ft6x06_read_reg(ctx, FT6X06_P2_XH_REG, (uint8_t *)value, 1); if(ret == 0) { *value &= FT6X06_P2_XH_TP_BIT_MASK; *value = *value >> FT6X06_P2_XH_TP_BIT_POSITION; } return ret; }
0
cdf86665675193038d529d74cc3bd2ab
fec470e40ce0fc7d3c0d33166d54d1a2
Extract the set of dependency/devDependency names from package.json.
const dependencies: { [key: string]: Dependency.Basic } = {}; yarnResults .filter((r: any): r is Yarn.ResultTree => r.type === 'tree') .map((yarnTree) => { yarnTree.data.trees.forEach((yarnDependency) => { dependencies[yarnDependency.name.substr(0, yarnDependency.name.lastIndexOf('@'))] = { ...
0
c367a120fc54c80c3a4f3e3bc4683e02
4867bf80cae26f65af14920b66fb63c7
渠道库存报表
{ $this->checkPermission('collect.report!list'); $filter = array_map('trim', array( 'qudao' => G('qudao', "striptags", "total"), 'start' => G('start'), 'end' => G('end'), )); $this->view->filter = $filter; $this->view->title = '渠道统计'; ...
0
efddbae27316cd09ba2b4081ddb20e0a
e9ca99d47d59e44b14800ac79a1648bb
Retrieve the type of the call leg
class Streamwide_Engine_Sip_Call_Leg_Suspender extends Streamwide_Engine_Widget public function getCallLeg() { return $this->_callLeg; }
0
4bc5a8b8cae3b5de5d5078a361b7b7f7
318fd68c1a6b83bf6696d97645f69df5
附件类型限制
{ switch ($type){ case 0 : return '无限制'; break; case 1 : return '分类限制'; break; case 2 : return '品牌限制'; break; case 3 : return '商品限制'; break; default : return '-'; break; } }
0
8cba12cbf1016ef8648a4e167934ee27
041c292154a2a11d699e24256c207ba9
初始化本地msp
int ret = MSPLogin(NULL, NULL, login_params); if (MSP_SUCCESS != ret) { printf("MSPLogin failed , Error code %d.\n",ret); MSPLogout(); return false; } return true; }
0
8d15fed145a05589fbbc934247b19ee4
1c0ee476c9d8925f083f9095adfc7e33
Returns non-game chat rooms the user has any connections subscribed to to open them on page load.
export class LobbyService getRooms(): ReplaySubject<RoomWithUsernamesModel[]> { return this.websocketService.lobby$; }
0
030281f96c321579c37a2eddce5d23a8
3e867ba92d5cb71b871ef5e29dc60a81
Splits a sequence 0, 1, ..., (length-1) into equally sized folds, discarding any potential remainder and returning a matrix of indices, each column-vector containing the indices of a single fold
n = len(self) start = range(0, n, ceil(n / k)) end = list(start[1:]) + [n] return [range(first, last) for first, last in zip(start, end)]
0
b8a7b9768d4208d81c123415fab54672
2046fece8ff303bc52d878e07a0871ee
バッファの連結
m_Top = obj.m_Top; for(int i=0; i<=m_Top; ++i){ m_Buffer[i] = obj.m_Buffer[i]; } }
0
83abd1f227448c08d9a93ccd8a9b7738
b812c5e468de0c8f9f092c496fbda0b7
Restores an old version as the latest invoice
public virtual JsonResult RestoreVersion(Guid id, int versionNumber, string log) { var model = this.Service.RestoreVersion(id, versionNumber, log); return this.Json(model); }
1
98219249a8a044539e06ad62e0069099
8dc8f497ee80586a1525f854eda11963
The base class does not need to register itself since it's always the fallback. This is done to have less overhead in the more common no inheritance use case.
namespace test TEST( RuntimeTypeInformationTest, base_class_is_not_registered ) { const auto root = InheritanceTestHelper::create_root(); EXPECT_EQ("", get_type_id(root.get())); }
1
cd80b69f337fdcb1065056a27a2e7d04
ef640002ed5098cce27e3c24e3b72284
If such an object exists, it is returned. Otherwise, +nil+ is returned by default.
def null_object double("null_object").as_null_object end
0
af8e4d0482261518ecad85c079dfe347
021ec6de85e3b9af148585612b88f2ab
Metodo para obtener un lugar desde un JSON Null en caso de error
class PlacesController extends Controller public function show($id) { $place = Places::find($id); $jsonResponse = response()->json($place); $jsonResponse->setStatusCode(200); return $jsonResponse; }
0
2bce5c09a9a13909ee186b54653adb97
22c830dbe0e764a39ed19395d1f1f267
根据条件查询经济指标集
@Repository("EvaluateIndicatorMapper") public class EvaluateIndicatorMapperImpl extends BasicSqlSupport implements EvaluateIndicatorMapper public List<ZTreeNodesDto> queryEvaluateIndicatorBySearch(Map<String, Object> map){ return this.selectList("com.sjq.indicator.dao.EvaluateIndicatorMapper.queryEvaluateIndicatorBy...
1
f4a701d5ec274824c835d25f6e8fbc58
ab733712c5838daf8562e6205254082e
Canvia el contingut dels arxius de dreceres d'autors i responsables amb la nova ruta del projecte
def ReOmplir(): fileList.delete(0,END) os.system('find ' + directoriList.get(0) + ' > x.txt') os.system('sed -i -e "1d" x.txt') f=open('x.txt' , 'r') contingut = f.read() f.close() f=open('x.txt' , 'r') for text in f.readlines()[:]: text2=text.split(directoriList.get(0)+"/")[-1] fileList.insert(END,text2[:-...
0
e69cfa619b4db3f7d4b010c9535961cd
35e819238ac43829407d75846bf889dd
对于不完整的Html标签加入完整的标签
namespace Lapis.WebCrawling.Parsing [Obsolete] public partial class HtmlCleaner private string CompleteEndTag(Match mat) { return mat.Value + ">"; }
1
eab36a26048a8c2fa92f03ce3ee8725c
de817cd191980afbf47169276201a723
解析状态变动历史
$ids = $this->redis->sMembers('set:orderStateLog:orderId:'.$orderId); if (empty($ids)) { return []; } rsort($ids); $list = []; foreach ($ids as $key => $id) { $list[] = $this->redis->hGetAll('hash:orderStateLog:'.$id); } return $lis...
1
ad25a0270e5ea56b6366252b8a093acf
e919b68b17ab822b283956e4cb664564
设置启动64位CLR V2的机器码
if (cpu_features.xd) x86_write_msr(X86_MSR_EFER, x86_read_msr(X86_MSR_EFER) | X86_EFER_NXE); uint64_t pat = pat_entry(0, 0x06) | pat_entry(1, 0x04) | pat_entry(2, 0x07) | pat_entry(3, 0x01) | pat_entry(4, 0x06) | pat_entry(5, 0x04) | pat_entry(6, 0x07) | pat_entry(7, 0x00...
0
73068f151507b39ad54eda75f5db16d4
3c11d06e08ed984517e248d3f4d2592d
Returns the first csmap cache json in the ordered set where uuid = &#63;.
public class CsmapCacheJsonLocalServiceUtil public static eu.strasbourg.service.place.model.CsmapCacheJson createCsmapCacheJson(String sigId) { return getService().createCsmapCacheJson(sigId); }
0
697adaeb6568d538eec384e2335fa2a1
926f1077ad54f8181590b72de5885dd9
播放過場動畫(進入房間)
var bg = new createjs.Bitmap(_g.resource.getResult('bg'+currentPass+'1')); if (is_move) { bg.alpha = 0; createjs.Tween.get(bg) .to({ alpha: 1 }, 500, createjs.Ease.quadIn) .call(function () { if (sceneBox.numChild...
1
4295957eacd921092fd604368cf5ee77
b14ccb7d00ef80900ecc3f11acda1155
Change selection model to Single
FileTypesView::FileTypesView(QWidget *parent): EditableTableView(parent) { setSelectionMode(QAbstractItemView::SingleSelection); }
1
e2a6f3b9f4d7dc632cdb70714fea76fc
16e669dcd1764eb92c73356ac9c83aed
To get the price of a location (place)
public class GoMethodOfPaymentAction extends ActionSupport implements SessionAware{ public double getPlacePrice() { return placePrice; }
1
ad433b3ba54b634a92b009e7188dda80
85e629799c2c479973acdb1f0b709e0e
Implementation of equality between cases
{ if (A.cases > B.cases) return true; return false; }
0
ccc5fd0a8bd2dd4f8d4dd78d93633c9c
3413cf309072bad20113da99a23ed65e
Insert a new list in the database.
end_point = "lists" query = { 'key': self.key, 'token': self.token, 'name': list_name, 'idBoard': board_id } response = requests.request( "POST", self.URL + end_point, params=query ) retur...
1
40ddb10896e6f61792f1a11542310238
9c1fbd969fec369f1fad7ea5dfe30353
多数表决法决定叶子节点归属
if not node: node = self.root outcome = {self.data['Outcome'][i] for i in node.id_list} if len(outcome) == 1: node.label = outcome.pop() return node if len(node.id_list) < 5: outcomes = [self.data['Outcome'][i] for i in node.id_list] ...
1
f541503de962acef161cf4b7e3dacc62
72fbcc7960cfea2096bf5c93639dffd1
Call the customer label callback.
LblObsRequest_typ *LabelItems) { Label.Buffer = (void *)LabelItems; PrintLabelElements( &Label ); return; }
0
3393aad2adc3d2687dc70cf662bedadc
a2e026df534a014746c7d30ae387977a
Adds a value to the front of the list ; also checks for sortedness
namespace Custom.Collections [Serializable] [DebuggerDisplay("{DebuggerDisplay}")] public class FastSortedList<T> : ICollection<T>, IDisposable public void Add (T item) { IsReady = false; _unsorted.Enqueue (item); }
0
e2a16f61ecf3b58dae5cdbfb8965623c
d18a9721ffa1daaee93f13ad779e595e
Finding the first 3 maximum values of an array.
arr = arr.map(function(el){ var mx = 0; el.forEach(function(i){ if(i > mx){ mx = i; } }); return mx; }); return arr; }
0
86f32ac8a586805e3230b05716a8447c
986abdc20094c163fe3251b70adc934d
расчет дат и длительности этапов проекта
public class Command public List<String> lifeProject() throws IOException { String commandEndDate = gitC+" "+ pathDir +" log --pretty=format:\"%cd\" --date=iso-strict --max-count=1"; String commandBeginDate = gitC+" "+ pathDir +" rev-list --reverse --max-parents=0 HEAD --pretty=format:\"%cd\" --date=iso-strict"; ...
1
8cf22301e22b83611d11cf985749ac8c
bef5e74f14989c870bc5747cee5d0add
给定一个链表,返回链表开始入环的第一个节点。 如果链表无环,则返回 null。 为了表示给定链表中的环,我们使用整数 pos 来表示链表尾连接到链表中的位置(索引从 0 开始)。 如果 pos 是 -1,则在该链表中没有环。 说明:不允许修改给定的链表。 示例 1: 输入:head = [3,2,0,-4], pos = 1 输出:tail connects to node index 1 解释:链表中有一个环,其尾部连接到第二个节点。 示例 2: 输入:head = [1,2], pos = 0 输出:tail connects to node index 0 解释:链表中有一个环,其尾部连接到第一个节点。 示例 3: 输入:he...
public class LC142DetectCycle public ListNode detectCycle(ListNode head) { ListNode pos = head; Set<ListNode> visited = new HashSet<ListNode>(); while (pos != null) { if (visited.contains(pos)) { return pos; } else { visited.add(pos); ...
0
3e3c8496a830da9f896c41d4f64ef729
688c4dc19f9599620f4d8212b054e837
Fixture to restart nic_simulator service on the VM server host.
def restart_nic_simulator_session(nic_simulator_info, vmhost): _, _, vmset_name = nic_simulator_info _restart_nic_simulator(vmhost, vmset_name)
1
5e0214064eb33c7f3cf1874b9b11036e
ae36d1eb586369bf2c04a89ed6bd38a4
Set volume of individual voice (0 to 255).
class Client: async def set_volume(self, value: int): assert 0 <= value <= 100 await self._send_command('setvol', value)
0
8f4ba980a61a38bd376afdb715b26976
4ebfdde15321c66e4f800de29a0b66b1
トレイアイコンを表示
{ ASSERT_IS_MAIN_THREAD_RUNNING(); this->NotifyIcon.cbSize = sizeof(NOTIFYICONDATA); this->NotifyIcon.uID = 0; this->NotifyIcon.hWnd = this->MainWindowHandle; this->NotifyIcon.uFlags = NIF_ICON | NIF_MESSAGE | NIF_TIP; this->NotifyIcon.hIcon = LoadIcon(this->WindowInstance,MAKEINTRESOURCE(IDI_ICON1)); this->Not...
1
3a3e68f17ae36b03187a0c95303e4f8f
4f3ffc5d0f2785cfed3278c7bc53fcfe
Debounce timer callback -- actually dispatch the messages
const now = new Date().getTime(); if (this._timeoutID !== null) { clearTimeout(this._timeoutID); } if (!this._debounceTimer || this._debounceTimer < (now - this._time)) { this._callback(); this._debounceTimer = now; } else { this._t...
1
1479a97aba24c55142d77f54e8edd93c
1fc81c4f3ce4dbedfd313383f5c8ad85
Retrieve all the clients that arent't linked to a user account in the database. account
List<IClient> clientsNeverBought();
0
ad04d11f1151b4aede86e42e62e0c035
f696de9e792df307a966e135caa02953
Operation getFulfillmentProcessLogTagsWithHttpInfo Get the tags for a fulfillmentProcessLog.
public class ReplenishmentProcessApi public void getReplenishmentProcessTags(Integer replenishmentProcessId) throws ApiException { getReplenishmentProcessTagsWithHttpInfo(replenishmentProcessId); }
0
00ddead033eadd5356f20195d3c00310
4574e4907dae35dabd7c32a061405118
Get all parameters as a list of pairs
class MultiModel: def paramsList(self): return map(lambda x: x[1].getParams(),self.models.values())
0
9d90564aa67f8597c95da8b596161c2e
688ddf6fd1ee1aa3e7a7100db228a4a7
Remplace l'écran avec une image pour les perdants.
public class SuperOmario extends GameWorld public void showLoseScreen() { loseScreen = new ImageView(getClass().getResource( "/losescreen.png").toExternalForm()); loseScreen.setX(0); loseScreen.setY(0); loseScreen.setFitWidth(this.getGameScene().getWidth()); loseS...
1
4d5d4f2c5f085c158c311d6b32e1f986
1c453146687ae237705224ed92d38316
Assign linters to a view. If reset is True, the list of linters for view is completely rebuilt. can_lint for each known linter class is called to determine if the linter class can lint the syntax for view. If so, a new instance of the linter class is assigned to the view, unless linter_name is non-empty and does not ma...
super().__init__(*args, **kwargs) self.linted_views = set() self.view_syntax = {} self.__class__.shared_instance = self
0
260eb8da4dc1858a3e56e8dbe6ab4525
03790c24be31c3054434980e29c1377e
反转链表的前n个结点
public class NodeDemo private static Node reverseN(Node node, int n) { if (n == 1) { temp = node.next; return node; } Node last = reverseN(node.next, n - 1); node.next.next = node; node.next = temp; return last; }
1
4cfc497641d75e65a52d43a93755de3e
7c735678e5698aa1e7bf4e948957fa0a
将状态变为横纵坐标
i = int(state / 10) j = state % 10 position = [0, 0] position[0] = 40 * j position[1] = 30 * i return position
1
b4f8802d03740a2ef8256c77f0644823
583f5d31790246f38d5fae18a23bdb0e
解析护士信息
public class NurseDetailsActivity extends Activity implements OnClickListener{ private void lodeDetailsData(){ Map<String, String> map = new HashMap<String, String>(); map.put("nurid",nurse.getNursvrid()); VolleyRequestUtil.newInstance().GsonPostRequest(this,Constant.nurseDetailUrl,"detail" ,map,new TypeToke...
1
a78fe494c3ccd2b4b0307b9d22979a7a
a35be6b0e0cda2fa0af1e358224a3a75
@brief Get the compass full-scale range.
int32_t IKS01A3_HYBRID_MOTION_SENSOR_GetFullScale(uint32_t Instance, uint32_t Function, int32_t *Fullscale) { if (Instance >= IKS01A3_HYBRID_INSTANCES_NBR) { return BSP_ERROR_WRONG_PARAM; } if ((HybridMotionCtx[Instance].Functions & HYBRID_MOTION_FUNC & Function) != Function) { return BSP_ERROR_WRONG_...
1
19e615cbef1999ffbd3c3207e446864a
c07c2a03d43e6ad7d794007bad86b72e
Adds a block to block pool
void AddBlock(Block* block) { std::string uniqueName = GetUniqueBlockNameInGraph(block); block->SetName(uniqueName); m_blocks.push_back(block); }
1
85909a1f7ca3889446281af7ec53beff
665f9ced2f14dc639609ab006d34a736
resetting the planes to the initial pos
class OurPlane(pygame.sprite.Sprite): def reset(self): self.rect.left, self.rect.top = ((self.width - self.rect.width) // 2), (self.height - self.rect.height - 60) self.active = True
1
9c56380e3066fd9314d750116ed785a0
dccccc96bce2c97e92cdc5e386d9521a
Returns true if the compared objects are equal regarding the common rules for the equals method. The only difference is, that if a CComplexType is anonymous (thus, the origName is an empty string) the name comparison is left out.
if (this == o) return true; if (o instanceof SimpleName && ((SimpleName)o).name == name) return true; if (o instanceof CompositeName) { return compareTo(o) == 0; } return false; }
0
eb56a555ba195c7534835bb6ff7f21f7
4f5e4eb940da8ac7ef49a5846ce8306b
This method demonstrates how to create and manipulate shapes, and how to access the draw page of the document to insert shapes
function mySetup(){ var myDocument = app.documents.add(); var myPage = app.activeWindow.activePage; var myTextFrame = myPage.textFrames.add(); myTextFrame.geometricBounds = myGetBounds(myDocument, myPage); var myString = "Paragraph 1.\rDelete this paragraph.\rParagraph 2.\rParagraph 3.\rParagraph 4.\rParagraph 5.\...
0
2cacb082099c8199a7a40a934e0cc712
cd75a26ea598aa5492aa84f33f103e58
This method fires the <see cref="OnHexViewButtonPressed"/> event.
namespace Cyotek.Windows.Forms [DefaultProperty("Color")] [DefaultEvent("ColorChanged")] [ToolboxBitmap(typeof(ColorEditor), "ColorEditorToolboxBitmap.bmp")] [ToolboxItem(true)] public partial class ColorEditor : UserControl, IColorEditor protected virtual void OnShowHexChanged(EventArgs e) { EventH...
0
b8c9838187fa135790b44b96150ea511
5e498bfd45444cd9024ededc457822da
@brief interface function - set function pointer to get snapshot image
void DRV_EPD_TemperatureGetCallbackSet( DRV_EPD_TEMPERATURE_GET_FUNC pFunc) { pTemperatureGet = pFunc; }
0
9933df60cc9b04d163c8e6ec8f4fa347
48dac2cd69d339f1900abf7bb452c783
是否领取第一天奖励
export class SevenDaysData isReward(): boolean { return App.hero.welfare.sevendayInfo[this.tbReward.ID] && App.hero.welfare.sevendayInfo[this.tbReward.ID].rewardCount == 1; }
1
a0441a1b8e73a5eacd40425f7cccbcb7
227dbf3b8774894ebc88cdb59e60d2a0
получения списка с координатами монет на поле
coord_list = [] for i in range(10, 90, 10): for j in range(1, 9): coord_list.append(i + j) return coord_list
0
f49ac3071dc0e1e6d7b71d53223e7e81
71544e77ac1f99fe621f800bd244c627
获取当前期还款信息(根据loanId)
List<Repayment> selectByLoanId(String loanId);
1
bf0a69e490e1ee7ab40fd331e7e2e724
3a786ce9342e56034a67d514551b4076
return values in self that are not in setB
newSet = Set() for element in setB: if element in self: newSet._theElements.append( element ) return newSet
0
ab0ffeec44ff3c579bebd9a4b5c1e8ea
41356a776e84832b22c274e9a23d8f3e
Get available Wifi networks
namespace MagicMirror.Models.Bluetooth public class BluetoothModel public async Task<WiFiNetworksResponse> GetNetworksAsync(IDevice device) { try { if (device.State == Plugin.BLE.Abstractions.DeviceState.Connected) { WiFiResponse re...
1
8fc591f8f4e82a1f84ee955732639cb0
81ee80f36b6d45bb0e5a74e7c9d9460b
Checks whether the Add New Tab item is in the tab strip.
{ return item is BackstageTabItem or Button or SeparatorTabItem or Separator; }
0
0928247793ba9f72ade66b29777c7f8c
6a943fccd763ad794818a43423ba6eb5
使用责任链模式依次处理不同类型节点
class NodeVistor: def visit(self,node): methname='visit_'+type(node).__name__ meth=getattr(self,methname,None) if meth is None: meth=self.generic_visit return meth(node)
0
675ba5dbf7ffe3c692915bda0f27cc3a
518a8fe84cc9e3889fa4014025ef4ce0
Retrieves all networks in the "network" table of the database.
using(ITransaction transaction = session.BeginTransaction()){ try{ IList<Prj_Network> result = this.session .CreateQuery("select from Prj_Network c").List<Prj_Network>(); transaction.Commit(); return result; }catch(Exception e){ transaction.Rollback(); throw e; } } }
1
5110fb90b4b307900ab099eec6d87f42
ba47a2c79816b2a7a362b150f23dad28
Helper method to select the current preselected item, also closes the drop-down.
var panel = $(target).combo('panel'); var values = $(target).combo('getValues'); var item = panel.find('div.combobox-item[value="' + values.pop() + '"]'); if (item.length){ var prev = item.prev(':visible'); if (prev.length){ item = prev; } } else { item = panel.find('div.combobox-item:visible:...
0
ae428c307d692e3da1978dd59ffcf5c0
b2273f58344c5f1df877453cf72b6a6d
Initialized recent viewed project list.
void History::init() { recentProjects.clear(); }
1
530c65773ebe764ae0bff3e7ba06fafd
94e70cb578bfefc1812a85972688b87e
Do not update if supplied status text is not in STATUS_CHOICES.
class ModerationFinishedView(LoginModeratorRequiredMixin, UpdateView): def post(self, request, *args, **kwargs): self.object = self.get_object() form_class = self.get_form_class() form = self.get_form(form_class) if form.is_valid() and self.object.status != 2: return self.for...
0
b4e7496c18aafaf55fb12555c8112497
588d052ac966b69d4b18dc043a69423a
根据教师编号找到教师姓名
public String getTeacherName(String teacherID) { TeacherDataService teacherData = (TeacherDataService) remote.getData("Teacher"); try { TeacherPO tp = teacherData.find(teacherID); if(tp!= null){ return tp.getName(); } else { return "不存在该工号的教师"; } } catch (RemoteException e) { e.printSta...
1