query_id
string
corpus_id
string
query
string
code
string
label
int64
0d125995ef47a2e7f436fe57f4cafbc5
93384c0f1b45ed060ea7e2214f2586fb
Hàm tạo mới bóng về vị trí giữa
namespace ManhattanMorning.Controller public class GameLogic: IController, IObserver public void createBall(Vector2 position, int afterTime) { GraphicsTask g = new GraphicsTask(afterTime, GraphicTask.CreateBall, 4); g.Position = position; TaskManager.Instance.addTask(g); ...
0
813fd7e4589162dd9db00140b08c9aa9
6fd5a9da7d62375445f680a0dbbccc9d
创建试卷题目关联表信息
if(user.getUserid()==null) { user.setId(2); user.setUserid("55170700"); } int userid=user.getId(); int courseid=ctb.getSelectid(); float timepaper=pb.getPaperTime(); String name=pb.getPaperName(); String intro=pb.getPaperIntro(); Testpaper tpn=new Testpaper(); tpn.setBycourseid(courseid); tpn....
1
9736302f0f58e0b03920632995c4bbfd
5a82f0e170e80cce476297dd95a421d4
重新初始化HttpClient和Handler实例
{ this.CookieContainer = new CookieContainer(); return new HttpClient(new HttpClientHandler { CookieContainer = this.CookieContainer }); }
1
7676d0855ee1ca37a1345a94af47561b
598d8556e6d6075096041c5f35b3f068
Get the metrics of the dev environment.
file, err := os.Open("./config/config.metrics.json") if err != nil { log.Println(err.Error()) os.Exit(1) } defer file.Close() decoder := json.NewDecoder(file) var devM []model.DeviceMetrics if err = decoder.Decode(&devM); err != nil { log.Println(err.Error()) os.Exit(1) } return devM }
1
ec781053477bdc0b98939c55be8e4e13
facd5a2ff95c6045530b74b81ae9bdd4
デバイス群から最大ホップ数(最大割り当て距離)を計算するメソッド
c=0 input_array.each do |platform| begin conditional= true aaa= overlap_calculate_per_platform(platform[1]) max_c= aaa.last if (max_c[:c]>0) aaa.pop() platform[1]= aaa.clone else conditional= false end end while conditional c+= platform[1].len...
0
91cff4c8700ddc956f58d4e562681c92
5436d2fe2f361cb8b9d84bd7bbd2bdca
The delete publicIpAddress operation deletes the specified publicIpAddress.
namespace OneAndOne.Client.Endpoints.PublicIPs public class PublicIPs : ResourceBase public PublicIPsResponse Delete(string ip_id) { try { var request = new RestRequest("/public_ips/{ip_id}", Method.DELETE) { RequestFormat = DataFor...
1
78dcd89b7713d2511fb6c5f39c59b956
3aaa57c91c5fa37d0e1a2b807b93fff3
根据开课院系和课程类别查询
String enrollyear, int schoolingLen, String artScienceType) { return BasicClass.dt(classRemoteService.findClassesByKinClass(schoolId,section,enrollyear,schoolingLen,artScienceType)); }
0
387301140673052f040ffad79a1f94b5
59eca57bbcbe460639cab55b4e5b23c7
인물설교 데이터 삭제
@Controller @RequestMapping("/sermon") public class SermonController @RequestMapping("/Person/PersonSermonDelete.sermon") public Map<String, Object> PersonSermonDelete(SermonVO svo) { Map<String, Object> delMap = new HashMap<String, Object>(); int persondel = sermonservice.personSermonDelete(svo); delMap.put("...
1
e3260e62a908cf80ed65871f050b08b4
e88ecbecde6256d4a46c226c90566c2d
Archive items using the swipe away animation before shrinking them away.
class SwipeSelector extends React.Component restoreItems(cb, duration = 500) { Animated.parallel(this.state.children.map( child => child.restore(duration) ) ).start( ({finished: finished}) => { if (!finished) return; if (cb) cb(this.state.children); }); }
0
9b3598c621d3d0c5344e319d1a6a7983
7e37e875d05b171ecc4de0ff59dad1e2
returns a header manipulator for a FITS file. (it's supposed to look like a class, hence the uppercase name) It should automatically handle gzipped files.
if tarred: tar = tarfile.open(fileobj=s, mode='r|*') return TarMerge(tar) return io.TextIOWrapper(gzip.GzipFile(fileobj=s)) if gzipped else s
0
7ba50914d2004ec4d21b7973b36c401c
3c1402445fd8fd9f605f886360ac21f4
The "clean" URL path, before modification to account for alt and page_num and without any leading '/
head, sep, tail = string.rpartition('/') return_url = head + '/plain/' + tail + '.txt' return return_url
0
740d7238bbc1ad55132608d6528519ba
0fa6043e7e2b098bdb98221c39fce653
description: makes the snake move left with the left arrow key
function moveUp() { document.addEventListener("keydown", keyDownHandler); snakePath.push(new Path(snakeHeadFromLeft, snakeHeadFromTop)); snakeHeadFromTop -= distance; applyPathToTail(); if (snakePath.length > snakeTail.length) { snakePath.shift(); } }
0
b17625f30e8101aff669c9a0fdf7e146
12d2e4fdecd458b704c9ebad0cd0b9d1
Strips scripts and stylesheets from output
$text = preg_replace( array( '@<head[^>]*?>.*?</head>@siu', '@<style[^>]*?>.*?</style>@siu', '@<script[^>]*?.*?</script>@siu', '@<object[^>]*?.*?</object>@siu', '@<embed[^>]*?.*?</embed>@siu', '@<applet[^>]*?.*?</applet>@siu', ...
1
f7c9ef62cbcd102d61706a294686a8d5
e00bbd039578e9da887a4c8f15058d74
Configures and creates a Notion API instance.
webhook_conf = nobj['conf_dict']['webhook'] notion_conf = nobj['conf_dict']['notion'] notion_token = notion_conf['token'] notion_page_type = notion_conf['page_type'] notion_url = notion_conf['page_url'] webhook_url = webhook_conf['incoming_url'] if notion_page_typ...
1
b36b8e5b2503e3ce5b19ade532afe989
c7a1f924cd7345e74c91c9b35c018408
Pushes the robot down one coorindate, provided it will not be pushed through a wall or into the charging station
class Robot: def down(self): self._head_bounder = self._body._bottom_bounder self.y_position += 1
0
d6d0771fd6ea0c60893eadf3a98f5834
e37f30f8f96839a5117c90196d64e033
Réinitialise tous les composants du panel
this.removeAll(); this.revalidate(); this.repaint(); repaint(); PanelPrincipal.jta_message.setEditable(false); PanelPrincipal.jta_message.setLineWrap(true); PanelPrincipal.jta_message.setWrapStyleWord(true); PanelPrincipal.jta_message.append("Reprise de la partie..."); scroller = new JScrollPane(jta_m...
1
168a2bae4e562939fc64a12f560a665a
1699a9436e532d012f4edace4cb30baa
Parses the xml-file in filename and returns a person object.
public class PersonParser private void parseFile() throws IOException { parsedList = parserUtil.parse(); }
0
bab539e98bc5c6262271ecd81d6bb5d0
8a424e0cfc6311afa577aeaf13522fed
退订行情,策略退订某一合约行情的时候需考虑是否有其他账户策略正在订阅此合约的行情
list_instrument_id_to_un_sub = [] for instrument_id in list_instrument_id: for instrument_id_subscribed in self.__list_instrument_subscribed_detail: if not isinstance(instrument_id, bytes): instrument_id = instrument_id.encode() if inst...
1
f82fa2bb5a4ab32a51384a0210c3bece
46d22962ac3efcc0385ae3f929cfb3eb
交叉合并左右声道的数据
onAudioProcess(event) { let audioBuffer = event.inputBuffer; let leftChannelData = audioBuffer.getChannelData(0); let rightChannelData = audioBuffer.getChannelData(1); this._leftDataList.push(leftChannelData.slice(0)); this._rightDataList.push(rightChannelData.slice(0)); }
0
3038ecebbe46a6a8c949f244b484af11
6f1208f106cb927fc6a6cefb1c0bc369
Handles requests for getting the My Videos page
current_user = User.objects.get(pk=request.user.id) videos = current_user.video_set.all() return render(request, 'app/videos.html', { 'videos': videos, })
1
dc2a3612598cdbf5b3ce0f27243d4e91
453563b9d7b0536aa9eb06458bf8f015
Converts data to unsigned 8 bit integer.
namespace FlitBit.Emit public static class ILGeneratorExtensions public static void ConvertToUInt8(this ILGenerator il) { Contract.Requires<ArgumentNullException>(il != null); il.Emit(OpCodes.Conv_U1); }
1
d833644d31e4997efa3c11086db9e932
942e25c9dc77f1aec7af75fc93fc6f8d
Set up the patch level of the file system.
self.f = f self.master_offset = master_offset self.starting_offset = None self.magic_ignore = magic_ignore self.block_size = None self.block_group_count = None self.uuid_str = None self.journal_uuid_str = None self.STATE_CLEANLY_UNMOUNTED = False ...
0
8bb3ef41d534be382ee0b5c4c9983183
1968f664321c4fd9ce348588dd2d699b
Debugf logs a message at level Debug on the standard logger.
function dlogf(...) dlog(sprintf(...)) end
0
cb9ca07ee8370039854a298e4885e64c
92535b3a289a8bc09fc359e296fe6020
Trasferisce dalla tabella lotti temporanei alla tabella lotti
{ int i, *table_pntr, *hold_pntr; table_pntr = tblinfo->table_pointer; hold_pntr = tblinfo->hold_pointer; for (i = 0; i < tblinfo->table_size; i++) *table_pntr++ = *hold_pntr++; return; }
1
4f1085d3ba28388055b93ebec1eababc
9387283737957f687a97cc83e7253f24
Adds an AudioSource to a queue to play for the accessible menu
{ cacheObj = new GameObject(); cacheObj.transform.parent = transform; cacheSource = cacheObj.AddComponent<AudioSource>(); cacheSource.playOnAwake = false; cacheObj.SetActive(false); audioSources.Enqueue(cacheSource); }
1
38951e8139048f665288e5aba7439bc1
97e376e803b817ee6251e16305129c74
保存图文素材
{ $material = array(); for($n=0;$n<sizeof($data);$n++){ $res = $this->getImage($data[$n]['file_name']); if($res){ $data[$n]['url']= $res['url']; $data[$n]['media_id']= $res['media_id']; }else{ write_log($res,__DIR__); $result = $this->upWechat($data[$n]['file_name']); if(!isset($re...
1
c1b0cbab425235669fc23053a5b02b35
8d4db1dd56b5fcc19668ad64a4c00724
根据日期筛选并邮件邮件通知检测结果
result_date_day_norm, result_data_day_norm, result_date_week_norm, result_data_week_norm = generate_statistics() statistics_html = generate_statistics_html(result_date_day_norm, result_data_day_norm, result_date_week_norm, result_data_week_norm) excel_file_path...
1
0df225e2ff6a2524467e41b431f23ab9
0666525d99f5ee3e58851afc48fad508
Transform hours like "1:45" into the total number of minutes, "105".
def string_to_minutes(raw_str): print(raw_str) str_arr = raw_str.split(":") print(str_arr) if len(str_arr) == 2: minute1 = int(str_arr[0]) minute2 = int(str_arr[1]) / 60 print(minute1, " + ", minute2) total_minutes = minute1 + minute2 else: minute1 = int(str_a...
1
44fc247f108555e2ae2613ec52a754a4
16499cfce58b4e39d528a8632cf74463
Get something from the vending machine!
Item item = null; if (slot == 1) { item = Can.getFromJson(); } else if (slot == 2) { item = Bottle.getFromJson(); } else if (slot == 3) { item = Crate.getFromJson(); } else if (slot == 4) { item = Carton.getFromJson(); } ...
1
f0b306b3f1993545bef51f0d3d09f99d
3cf13fa8b1d8534f8675e704b7ec6c8e
Méthode permettant de récupérer le nombre de partie en corus dans le serveur
public class Serveur private int getNbManches(String mess) { return Integer.parseInt((mess.split(":"))[4]); }
1
89764d89b006de6d8ad78e27a245fdb4
8c9d0b6f715d2a27622a664080618582
Проверяет лежит ли значение параметра в допустимых пределах
{ int i; if (Int32.TryParse(value, out i)) { if (i >= KeyTool.P) { MessageBox.Show(@"Значение должно быть < " + KeyTool.P); return false; } return true; } ...
1
30d306dda6c224d198984d376c907fcd
7deca42bb655b82e9bfdd235781ec93c
Hent bookingerne fra den bruger der er logget ind, eller alt fra admin.
class BookController extends BaseController //Controller public function index() { $id=Auth::user()->id; switch (parent::roleHome()) { case 'user': $books = Book::where('user_id', $id)->get(); break; case 'clients': $books = Boo...
1
a2ed546ce250f4bcdd89901d04b6cab5
fcac40bf586075d765c182d07c36c346
@brief Gets the end clock.
U32 CLK_end_timer( void ) { U32 u_time; U32 d_time; u_time = (U32)clock(); d_time = u_time - ref_time; return( d_time ); }
1
34cf78c29f00cee0882da8e34f0b1b31
0309c785cbf03ac8ff799df64bdb5cda
Getter for <code>SYS_OPERATIONS.MOMENT</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class UserVoteCampainRecord extends UpdatableRecordImpl<UserVoteCampainRecord> implements Record6<Integer, Integer, Integer, Double, Tim...
0
15b5fa3d18da4223d65891a3939e30ed
2ca5a11c7021f8d1598f77e5289fb843
Update a pool on one or more rentals
class MiningRigRentals async replacePoolOnRigs(rigIDs, options) { try { return await this.addPoolToRigs(rigIDs, options) } catch (err) { throw new Error(err) } }
1
81d8cff3d9a901e414fede1f96e463b4
9d5cecbb89243a21490fb45a450a4f9b
Тест на отправку города со значением NULL
$query = new QueryToApi(); $query->streetId = ''; $query->contentType = QueryToApi::StreetType; $res = $query->send(); $res = $res->result[0]; $this->assertEquals(count($res), 0); }
0
14bf4cb41379d6854e00164482275551
ab79b9ce76b3e4ff02cd99efa27e2968
案件検索
$m =& $this->_model; $baitaiReportList = array(); if (isset($this->_request['search']) || $this->_isDownload == true) { $likeIsNull =& $m->checkLikeIsNull($this->_like); if ($likeIsNull == 1) { $this->_dataFrom['message'] = "案件が指定されていません。"; } else { $ankenId = $this->_like['anken_id']; if (em...
1
37653bf1f22870b2e77abda2c737fec8
3b6ea5ecfa498815ac23f877dd257df5
What is the average time per call to allocate a certain amount of memory? Try timing several hundred/thousand calls to make the estimate, and try the experiment with at least three different memory sizes (small, medium, large)
data = list(range(size)) repetitions = 1 elapsed = 0 while elapsed < DURATION: repetitions *= 2 start = time.time() for _ in range(repetitions): for item in data: binary_search(data, item) stop = time.time() elapsed = m_secs(stop - star...
0
d5f1b102e742b28d184453efbd8dc43c
a97666e57d710bc9f8439b6b7a26c3ea
Checks Ticketing Error
{ $request = $this->post("/administrations/types/tickets", [ "_token" => csrf_token(), ]); $request->assertStatus(302); $request->assertSessionHasErrors(); }
1
873a9c07bf05ea038eb9880b2774f2f8
9cdd6065df61a4cc00f6cff2740fe9f3
Hides the warning symbol after the error has been fixed and a valid algorithm was loaded.
class NewProjectDynamicDialog(QDialog, Ui_NewProjectDynamicDialog): def _hide_error(self): self.lbl_error.setVisible(False)
1
df794beeeb2d1a647cf149907e91d99c
bc2d1a4b4bdddbaf6eea40cda2a534b8
Clears shadow layer.
this.ctx.shadowOffsetX = 0; this.ctx.shadowOffsetY = 0; this.ctx.shadowBlur = 0; }
1
ef156a22b1874b8be8dbb06165b1c83a
bd01fa99f158506c93f5df269a480712
設定単位キー(<code>SETTING_UNIT_KEY</code>)の検索値をセットします。 (ANDまたはOR, OR以外の文字列の場合はANDとみなします)
public class HostSendSearchKey extends DefaultSQLSearchKey public void setSettingUnitKeyCollect(String sqlfunc) { setCollect(HostSend.SETTING_UNIT_KEY, sqlfunc, null) ; }
1
383affac135d6a9587b64cab9c928328
1842bad5615df6c07d1fc95a4483a51d
Hash code function for an integer is just the integer.
int hash1 (int key) { return key; }
1
9889c4beea04c0d55469301004273f50
c183dbd425dc86866b3fed282cd21aef
Add search labels for records.
$label = $item->getOriginalObject(TRUE)->getEntity()->label(); if ($label) { $fields = $item->getFields(FALSE); $fields = $this->getFieldsHelper() ->filterForPropertyPath($fields, NULL, 'search_api_label'); foreach ($fields as $field) { $field->addValue($label); } } ...
1
4141e104452d6bb84feab32334c99103
78b10be59e3583a5b03f0fd93b514419
Gets all ISPs a permissionset has access to in a given organization
{ $ISPsArray = []; $ISPsInformation = $this->orgPermissionsetMetadataRepository->getIspsByPermissionSet($permissionsetId, $organizationId); foreach ($ISPsInformation as $ISPInformation) { $IspBlockDto = new IspBlockDto(); $IspBlockDto->fromArray($ISPInformation); ...
1
2e754d5144c457cb60144694a9d299ea
86a5f5893b9f81e57230e3a3658c8588
Populates the workload tag on the request body passed in if applicable. Defaults to the workload tag set by ee.data.setWorkloadTag() or related methods. A workload tag already set on the body takes precedence. The workload tag will not be set if it's an empty string.
def _maybe_populate_workload_tag(body: Dict[str, Any]) -> None: if 'workloadTag' not in body: workload_tag = getWorkloadTag() if workload_tag: body['workloadTag'] = workload_tag elif not body['workloadTag']: del body['workloadTag']
1
b97b122002dfb98810307f5300affd25
3d7a43d7d99dff85051e48407817b941
This method is used to determine whether the bundle adjustment will solve for target body pole declination velocity.
delta_diff = abs((coords.get_current_bearing() - calc_bearings.b[0]) - dof_bearings.delta_bearing()) return delta_diff > threshold
0
1abd8cbb9c8e236a7cfcf2df0acb3bec
fa80748107351386039c48eb376246b9
Tries to move a piece that is in jail. Get three tries to roll doubles, then pay and move on the fourth. NOTE: This assumes a player will always try three times to roll doubles before paying to get out of jail. That is not necessarily the case. A player can pay and leave right away. However, this is the most conservati...
public class GameControl public void roll() throws GameException { int firstDice = Dice.roll(); int secondDice = Dice.roll(); if (!currentPlayer.isJailed() && businessManager.isActiveJail()) { movePlay(firstDice + secondDice); } else { movePlay(firstDice + secondD...
0
0ef4e7fd7bf6aabfad1e995b5530f303
0539d0c05ca74187a43bdf75cb75483e
dump all the atom sequences and footer back to a PDB file.
data = self.get('*',**kwargs) f = open(fname,'w') for d in data: line = 'ATOM ' line += '{:>5}'.format(d[0]) line += ' ' line += '{:^4}'.format(d[1]) line += '{:>1}'.format(d[2]) line += '{:>3}'.format(d[3]) ...
1
b03ca2cc5dbc594869ad51e126ff1a9d
264662759341364d83305c7bd594e4b0
NewVDRControllerSteps creates steps for vdr with controller.
controller := &Controller{ istioClientset: istioClientset, configStore: store, routeCache: cachev3.NewSnapshotCache(false, cachev3.IDHash{}, logger{}), pushChannel: make(chan istiomodel.Event, 100), } return controller }
0
09499030ad2e4f8fc18b04049dce0546
76848950f13f3258238f724e86027ecf
for descending order
function sortNumbers(a,b) { return b-a; }
1
e9c09ab07f207df1936a5dd8ebfd4de0
5760c3c555ddb1470f939d9138f41d07
Returns a new object of class '<em>Type Planification</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
TypePlan createTypePlan();
1
e6eebc2b6dbefa7393ccd17d69224ccc
f5f236944cedc3aa8de1e4c5bb6dab0f
Método que retorna o total de horas por período e por curso de um determinado tipo de atividade e aluno.
class Aluno extends Model public function horasCumprindo() { return Disciplina::whereIn('id', $this->disciplinasMatriculadas()->pluck('disciplina_id'))->sum('carga_horaria'); }
0
7a97d55ab21d757ec0b9a477bcfd3f54
a14dc365078db1ae3f311636bd33cd20
Hledá vhodné instruktory pro novou lekci. Vyfiltruje jen ty, kteří mají čas v danou dobu. Filtruje podle vstupních parametrů.
instructor_query = Instructor.select() available_instructors = [] for instructor in instructor_query: available = True for lesson in instructor.lessons: l_day = lesson.day l_s = lesson.expected_start l_f = lesson.expected_finish if (l_day == da...
1
a0b60f351392b9becd71ec01d0cdd8dc
d46e28dd0fe642e9a6ec8b483d2ab27a
FFmpeg に渡すオプションを組み立てる
{ $options = array(); if (!is_null($this->getQuality())) { $options['-V'] = $this->getQuality(); } if (!is_null($this->getMinBitrate())) { $options['-b'] = $this->getMinBitrate(); } if (!is_null($this->getMaxBitrate())) { $options['...
1
cea29c3c416a758827897ce2b3f9384a
1d18952ee40cf19ac53c3b588b33c1ba
ID/パスワード確認メール送信。(英語メール)
{ if(empty($third_type)) return false; email_test_change_config(); $user = M('Member')->where(['id'=>$uid])->find(); if(!$user) return "user not exist!(uid={$uid})"; $url = xgethomeurl()."/member/Login/ThirdSecondVerify?uid={$uid}&third_type={$third_type}"; $url = email_make_redirect_url($url); $sender['...
0
87b845995c272f873a6c9ab36303608a
96cfa1587e9447dc36e0b6e7b262a900
if list is empty or size 1, nothing to do
{ int nCount = m_listContacts.count(); if( nCount <= 1 ) { return; } ::qSort( m_listContacts ); ui->listWidget->clear(); for(int i=0; i<nCount; i++) { ui->listWidget->addItem( m_listContacts[i].toString() ); } }
1
9cb8212826fe2d3e4652c0d6acab35a7
7f61448ad6da3ef0f9cb03f40c5be655
http://stackoverflow.com/a/8095276/314015
cases like (1)
0
46c5db3d15429bc9032125432e7bf176
1405009e0874d20ce1132cb8139c4131
Description: Returns the line number where the data begins in the given filename. Date: 2013-07-01
def line_number(): pass
0
c8f6393062ffd104a333b8ac2f231c1f
d6e0a86a20bd48b907e42dc6bc0e37f8
Returns the value smoothed by a cosinus interpolation function
{ return First + Smoothing * (Last - First); }
0
f5a5635721477cb59946c02cfa01d826
8c157873cb08453ffd1d235cd542bd40
测试基于sklearn的KNN算法(K近邻算法)
def KNN_sklearn(X, y): x_train, x_test, y_train, y_test = train_test_split(X, y, test_size = 0.2) x_min, x_max = x_train[:,0].min() - 1, x_train[:,0].max() + 1 y_min, y_max = x_train[:,1].min() - 1, x_train[:,1].max() + 1 h = .1 xx, yy = np.meshgrid(np.arange(x_min, x_max, h), np.arange(y_min, y_ma...
1
b69db3dcd744c59580f68cb0c82ee4af
745a447f3c4b6fbcb856e04b7649e1e8
壁を置く操作
public class EditManager : MonoBehaviour void SetWall( GridPanel_Control _rPanel ) { if( _rPanel.m_GridType == GridPanel_Control.GridType.Wall ) return; GameObject rObj = Instantiate( m_rUseBlock ); Transform rTrans = rObj.transform; rTrans.parent = ( m_rUseBloc...
1
0140cf0b1f05435cdca9f97a4220420d
973451618e7e5171a925193e12bdd77a
Shows the external window.
namespace Magnum.Core.Windows void Show();
1
a5e98787a6d4feb56fb5de8a2cae9489
fd7fa9b249b2f0ff9e68e7452114b036
Getter for the defend button.
public int getDefence();
0
82fd69dcad6077e0bf2d056c80a18356
1806db388e9d92de95c57f14a20d0c69
获取策略路由的网关
public class DeviceUuidFactory public static String getGateWay() { String [] arr; try { Process process = Runtime.getRuntime().exec("ip route list table 0"); String data = null; BufferedReader ie = new BufferedReader(new InputStreamReader(process.getErrorStream())); ...
1
c231a49c035ae23ea9be22bfca5a3efe
9314d247f4a5ef9a747025d018a9c5c1
Adds the given `Category` to the channel and returns the channel itself to allow method chaining.
class Handler implements AuthorityServiceIf public function addCategory(Category $category) { return CategoryHandler::add($category); }
0
66939cf034fdd3c472167429b65bf814
09978c2ffed40dbace00a72a0f3925b5
方向是否一致
var limitationAxis = direction.limitation; var currentLimitationValue = parseInt(head.attr(limitationAxis), 10); return currentLimitationValue === direction.limitationValue; }
0
2638ebad0f16129ea325085de3700d93
01160f6d19af56336e98ef24c10296ab
返回顶点的连通分量ID
namespace EIva.Algorithms int ComponentId(TV v);
1
2228a0b2bf3606122694cc71262d5ff5
a7ee55adda2fbe8ec4569851aae33185
Called when the user chooses a suggestion or if not suggestions are given when the user presses enter.
void onSuggestionClicked( @NonNull AutocompleteMatch suggestion, int position, @NonNull GURL url);
1
4bab7cc5460a97ab3233ccc5ab16cc0e
4f7757b4f9286b2079520018e8a0f0cf
블로거 홈페이지가 떠 있는 웹드라이버를 받아 블로그의 게시글 수 를 가져온다
function GoogleBL($domain){ $url="http://ajax.googleapis.com/ajax/services/search/web?v=1.0&q=link:%20".$domain."&filter=0"; $ch=curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_USERAGENT,$_SERVER['HTTP_USER_AGENT']); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURL...
0
eb1c18d351a56c085904c9733f4a5f0f
a8795215b59bac60547727e6145a65db
Test case for get_reports
for _, tc := range testCasesGetReport { tc := tc t.Run(tc.name, func(t *testing.T) { l := logrus.New().WithFields(logrus.Fields{"test": tc.name}) s := &S3Storage{Conf: tc.config, logger: l, svc: tc.s3Mock} report, err := s.GetReport(tc.date, tc.scanID, tc.checkID) if tc.expectedErr && err == nil { ...
1
2b92e68f175d5d74c62a7ed97b04e7b0
34a89c6faa886f1bf072ddf37a4fd402
绝学顿悟的逻辑
DelaySleep() print u"战斗双方各有三张五灵符,每张符有各自的五灵属性和五灵值。" DelaySleep() print u"五灵符根据五灵属性相生相克。" DelaySleep() print u"若双方五灵符属性一样,则比较五灵值;若五灵值也一样,则平局。" DelaySleep() print u"战斗双方每次各出一张符。三局两胜。" DelaySleep() print u"若战斗获胜,则对方的五灵值归你所有;否则,你的生命值减一。" DelaySleep()
0
4df643bda587ba0725d6f85949ad3939
1d39045c22d97c4c84b06788019bb967
Function that looks through the passed in DataFrame by location.
def dropMissingLocations(input_dataframe): return input_dataframe[(input_dataframe['LATITUDE'].notnull() & input_dataframe['LONGITUDE'].notnull())]
1
ce1440b4149ddaeafe2e83e0e12b93bc
f328ca193db50e2218766723855affca
Helper function for converting from a dense storage type to sparse storage type.
def _dense_to_sparse(data): return utils_test._dense_to_sparse(data)
1
7be7178a423d8b255ace489bef18f7ab
c4a48652d99183062c351ac368446219
Function to retrieve list of individuals from a file
{ List<Person> objList = new List<Person>(); try { StreamReader sr = new StreamReader(filePath, Encoding.Default); string Line = sr.ReadLine(); while (Line != null) { string[] personArray = Li...
1
adfe9d377084bb9d1c14eda67d43cbce
06fb0b48ff6d1a85528b6b3484d9f99f
重定向iframe url(页面被iframe包裹)
function refreshIframe(url){ $("#configFrame").attr("src",encodeURI(encodeURI(url))); }
1
80fd7ed6489b8bc3c55fde6527d90a20
4d1346629ced693de308ecc72b48bd2b
判断点是否在多段线围城的内部 通过射线法判断
def quchong(lst): t=[] for i in lst: if i not in t: t.append(i) return t assert isinstance(pt,Vector3D) assert self.start_point==self.end_point,'必须要求闭合多段线' if pt in self: return PointRegionRelation.on_bor...
1
b112380ab3a56c17c35b055a0e7cb575
3cede6077e7d4585e01fd96e02f3129e
Set the RenderDataProvider which will provide text, icons and tooltips for items in the tree column. The default is null. If null, the data displayed will be generated in the standard JTable/JTree way - calling <code>toString()</code> on objects in the tree model and using the look and feel's default tree folder and ...
public class TreeView <T> extends ParentView implements Selectable<T> public void setResolver(TreeResolver<T> aResolver) { _resolver = aResolver; }
0
4ebe42bccf84fe521649c29c1bc0b116
631bb944a6e4ca68b5ea88926da9fbce
Gibt die gewählte Sprache oder die primäre Browser-Sprache zurück
class translation function get_browserlang() { if (!isset($_SERVER["HTTP_ACCEPT_LANGUAGE"])) return ""; $langs = explode(",",$_SERVER["HTTP_ACCEPT_LANGUAGE"]); $lc = count($langs); for ($i=0;$i<$lc;++$i) { $want = substr($langs[$i],0,2); if (in_array($want,$this->avail)) { ...
1
d69bfd33d353b118abbd7e512cfb9fb6
2c3c1c080516cb444defb14ef47c8827
Tell CEGUI where the mouse is now
gui_mch_setmouse(int x, int y) { QPoint pos = vimshell->mapToGlobal(QPoint(x, y)); QCursor::setPos(pos.x(), pos.y()); }
0
c28d9af765a05b1ebbccd616bdbe5257
5992cf22c96acf798c72302bf3d50d1e
Set to true if the sale is to be set on hold
public class Invoice public void setHeld(boolean held) { this.held = held; }
1
5b6a18517673f14d91453ffc5a484555
0a35203c3e49414d9be316022434dddf
Hàm lấy mã năm học tiếp theo từ mã năm học cũ
{ int index = 0; var count = db.Database.SqlQuery<string>("Select " + tenTruong + " from " + tenBang).FirstOrDefault(); if(count != null) { index = Int32.Parse(db.Database.SqlQuery<string>("Select " + tenTruong + " from " + tenBang) .La...
0
b295b535a5814b52ad08e3b6e6b72219
9908bbe06c2ffacbcbf8e42339739f26
Converts the specified point from control to screen (abstract scene) coordinates.
namespace DotSpatial.Controls Point PointToClient(Point position);
0
3773b6c059039bf0354e445f8f988809
87604f7ac61eb2fe0655202c10ef0d90
Make energetic or tired based on the amount of HP
public class PetDog public void reviseHP() { if((this.hungerValue>80 || this.thirstValue>80)) { if (Math.min((this.hungerValue), this.thirstValue)>=80) { this.HP+=Math.max(200-this.hungerValue-thirstValue,25); } else if(this.hungerValue...
0
f831697b689fa3595b89f4acbd233bd1
aba56bb5a909b5121a1a864bc9aeb608
Verify the integration between a typed search and the display of the products searched
self.browser.get(self.live_server_url) self.wait.until(lambda driver: self.get_element("header form").is_displayed()) search_field = self.get_element("header form #id_product") submit_button = self.get_element("header form button") search_field.send_keys("coca") submit_bu...
1
08bbdada49a1bc7f57a5033dacc68bba
bea595428e7621b19ef14b52b3e46154
This function checks for four in a row of all varieties
public class ConnectFourGrid public void fourInARow(int row, int col) { winner = 0; highlight = new boolean[height][width]; highlight[row][col] = true; int ogRow = row, ogCol = col, inRow = 1; if (inRow < 4) { col--; while (col >= 0 && grid[row][col] == grid[ogRow][ogCol]) { inRow++; highlight[...
1
b59ddbef01df6db7d05f574b5e7c1772
c4af21c3da54caba30665287e6c0dcec
Return a dictionary of list of s3 keys from SQS messages Format: dict(s3_bucket) = [key1 .. keyN]
s3_records = event.get('Records')[0].get('s3') bucket = s3_records.get('bucket').get('name') key = s3_records.get('object').get('key') data = {"Bucket": bucket, "Key": key} return data
0
d9cc8a1bd65499d0c588eb587457a22f
caa962c101f4626fa001c86ee0b1fee8
시계가 모두 12시로 정렬되었는지 확인하는 함수
dif_2_1 = int(cur_time[2]) - int(cur_time[1]) dif_1_0 = int(cur_time[1]) - int(cur_time[0]) if hr >= 1 and hr <= 9: if (dif_2_1 == dif_1_0): return True else: return False else: dif_3_2 = int(cur_time[3]) - int(cur_time[2]) if (dif_3_2 == dif_2_1 =...
0
ac1fc3cb32e9c463b4a3f88cc2a77f39
be79eff0ce92f08134619d96876e6bed
記事とコメントを全検索するメソッドです.
String sql = "SELECT a.id, a.name, a.content, c.id c_id, c.name c_name, c.content c_content, c.article_id " + "FROM articles a LEFT JOIN comments c ON a.id = c.article_id ORDER BY a.id DESC;"; List<Article> articleList = jdbcTemplate.query(sql, RESULT_SET_EXTRATOR); return articleList; }
1
f7b9b7184abe6f80452b2e87fbd05f31
a91ca47e8426cd3dc2c1da1c4a40b389
setup the stage's orthographic camera
{ float r = glm::length(_scene->bbox.maxPoint - _scene->bbox.minPoint) / 2; float fovyDeg = 90; float fovyRad = glm::radians(fovyDeg); float aspectRatio = float(SCREEN_WIDTH) / float(SCREEN_HEIGHT); float nearZ = 0.1f; float fovXrad = 2 * glm::asin(aspectRatio * glm::sin(fovyRad / 2.0f)); float d = r / glm::max(...
0
78c4e0c4c7202e1fcc8a4aa0bc9ece55
abb69868a5c21479f97a38e2c932346f
Returns the key-value pairs that are attached to this change
namespace CoreDX.Domain.Core.Entity IDictionary<string, object> GetChanges();
1
1ce5af92200424d1423f779388adff80
9376b89be2ea7436ba02b2770599142e
改变导航栏
changeEChart(nav){ this.showChart = nav }
0
8381bd4e0e58453751f5e67921397c90
c2148d1d8e73999e78b87864b733b2c4
Gets the game that this board belongs to
public class BoardGame extends LoggableEntity public BoardGame getMainGame() { return mainGame; }
1
1eaaeca7d8c91628f3debd09fa41f1be
285dac98ca9875e8a24e311ad6227114
Finds the document type by the file extension. Can be used as parameter of FileCrawler.scanDocumentTree()
namespace Gecko [MethodImpl(MethodImplOptions.InternalCall, MethodCodeType=MethodCodeType.Runtime)] void GetTypeFromExtension([MarshalAs(UnmanagedType.LPStruct)] nsACStringBase aFileExtension, [MarshalAs(UnmanagedType.LPStruct)] nsACStringBase retval);
1
4c77fc185c8f30e5ddbe77d396f14e19
1ff10598a039c789735ec584c61b5880
Returns true if the working specification exists.
{ return this._workerTypeSpecifications != null && this._workerTypeSpecifications.Count > 0; }
1
a1826d9616a6999c1d3278789f73b1aa
a65edef6d0dd6dbcfe0882c6a94bd671
注册自己的NSD服务,让其他设备可以发现
host := util.GetLocalIP() property := p.(cellnet.PeerProperty) sd := &discovery.ServiceDesc{ ID: MakeLocalSvcID(property.Name()), Name: property.Name(), Host: host, Port: p.(peerListener).Port(), } sd.SetMeta("SvcGroup", GetSvcGroup()) sd.SetMeta("SvcIndex", strconv.Itoa(GetSvcIndex())) for _, opt := r...
1
8401d9713289fe0bde9c0e97883452bc
f7d12c2ba30b1cd8e87c847023c8042c
关闭已群发文章评论(新增接口)
[Authorize] public async Task<WebApiCallBack> CloseTip() { var jm = await _userWeChatMsgSubscriptionSwitchServices.CloseTip(_user.ID); return jm; }
0
35fcbac768ddd9a7a429e68e14e7ad38
5e9fd098a7a0eeaa9f5c650914213bd3
Get sizeModifier.
public double getModifier();
0
d44da131bcd112a59fee469487e3c3d5
fbe793d59d5343931cef70fbf6230944
Set the TPR owners (original creator) name
class TprController extends AbstractPlugin implements ServiceLocatorAwareInterface public function setTprId($tprId) { $this->tprId = $tprId; return $this; }
0
f3c8b41ebbdab62391f58288e824701e
49df1e55303196e758d28f01ecde68b9
shows histogram of student understanding for a given slide
class IMAGE extends JPanel public void showHistogram(Graphics g, long w, long h, int[] R, int[] G, int[] B ){ Graphics g1 = (Graphics) g; Graphics2D g2 = (Graphics2D) g; int size = (int)Math.pow((double)2,(double)r_byte); int grayHist [] = new int [size]; for(int i =0; i < size; i++) grayHist[i] = 0; int...
0