query_id
string
corpus_id
string
query
string
code
string
label
int64
2eb9f952fff23d9aa079388a3adf4f13
f7efa1f629a6d64f7719d4d9d59bf218
设置开始的数字和结束的数字
local function SetRange(self, min, max) self.minNumeric = min self.maxNumeric = max self.editBox:SetNumeric(true) _CheckRange(self) end
1
c7d1d6a77f63c3dc82294fbe6c159069
4448b799d5433dc718ac885a5cc086ca
Bouton Modifier. Ouvre une instance de AjoutModifConfig pour modifier une ligne de configuration
namespace PlantaPiloto public partial class MainForm : Form private void toolStripMenuItemModifyConfig_Click(object sender, EventArgs e) { try { if (_proyect != null) { CloseSP_services(); CreateConfigForm(1); ...
1
6f19d479f90a79856d68451dad468e63
e2d10274b1121eda59ee32eefa9c131f
초기화, 더보기 버튼 터치 이벤트 및 클릭 이벤트 설정, 달력 날짜 클릭 이벤트 설정
function init() { initClocks(); addTimeClick(); addDateClick(); addClick(); disabledWallerClick(); addBtnClick(); }
1
f00b26b7f50d81f4a88b20df98e4d483
405b7ccfe86d621875393bf7ed1b2b36
判断自己是不是主播
function AnchorTableModel:isAnchorUser(nUserID) local myUserID = nUserID local anchorPlayNum = cc.exports.getAnchorPlayerNum() local anchorPlayUseID = cc.exports.getAnchorPlayerUseID() for i=1, anchorPlayNum do for j=1, #anchorPlayUseID["Anchor_"..i] do if anchorPlayUseID["Anchor_".....
1
d70452b259d1b4820a1cde651c83dc9f
5dbe2418babc4584cc7f522b4b5af918
compare pointers
{ if (o_ptr == j_ptr) return (FALSE); if (o_ptr->k_idx != j_ptr->k_idx) return (FALSE); if ((o_ptr->pval != j_ptr->pval) && (o_ptr->tval != TV_WAND) && (o_ptr->tval != TV_ROD)) return (FALSE); if (o_ptr->to_h != j_ptr->to_h) return (FALSE); if (o_ptr->to_d != j_ptr->to_d) return (FALSE); if (o_ptr->to_a != ...
1
e21ab10fdac04456da34b1a7d9cec7db
ec3d581fe7185004e8e6cce3d8a83b06
Search for element using accessibility id or xpath and click it.
class FunctionalTestCase(object): def clickOn(self, id=None, xpath=None, click_element=""): if id is not None: self.Browser.find_element_by_id(self.obj_id[click_element]).click() elif xpath is not None: self.Browser.find_element_by_xpath(self.obj_id[click_element]).click() else: raise KeyE...
1
28d1565c0c7bddc1a6dcca5141da3b98
f147e45750883ec5d0a67d0304645f6e
多商品生成订单
{ $productId = []; foreach ($products as $p_key => $p_value) { array_push($productId, $p_value['product']); } $allProducts = Product::all($productId)->toArray(); $generateOrder = $this->generateOrder($products, $allProducts); return $generateOrder; }
1
d683586f0bd26d911b4ec5d3f6e1c722
25deb5f07e8d2d1bccb243bbf24dc8ba
Set the value related to the column: fldCompanyName
public class Sale extends CheckBoxImplementation implements Serializable{ public void setCompanyName(String companyName) { this.companyName = companyName; }
1
268f0a24777510f53998dba0cf749bbf
e15de7929823e70eb3cb2cb50a1e32c7
Get client repository.
public RepositoryClient getRepositoryClient(ServiceContext<IT, OT> ctx);
1
c21f8d75ec481cdc0074cba8bc802f15
edad499d533fcae39a14dcbda1ea7904
When the CustomCellRenderer is loaded into our JList, the list will call this method automatically to get the Components which are used for selection on the list.
return new DefaultListCellRenderer() { @Override public Component getListCellRendererComponent(JList<?> list, Object value, int index, boolean isSelected, boolean cellHasFocus) { byte playerItemIndex = ((JoinedPlayer) value).getCurr...
1
978a1674597d54c159e2fe8b9511382e
85be268d73f257d522be6fec7f9ac8ec
Permet l'obtention de la liste des POST-ITs d'un utilisateur
{ $qb = $this->createQueryBuilder('pp') ->where('pp.user = :user') ->setParameter('user', $u); return $qb->getQuery()->getResult(); }
1
2000cddefe66c1a3c14b446e20e26c1e
f27f0d47160c6e9fbc67a7424fb4ea10
Returns all bans stored in the userban table
class DbUser public function SelectAllBan() { return $this->database->ExecutePreparedStatement("selectAllBan", array()); }
1
530891d061141bc61390984e11124bbb
c5dbf5791a6e62b01569752649c7cb93
Возвращает количество рёбер
public class Graph public int E() { return E; }
1
a3c7e89bed848e524328ddf085051905
cd7b50ff85b8eacea8237c50b0f94631
Teste da funcionalidade adicionar item, numa situação válida
include_once $_SERVER['DOCUMENT_ROOT'].'templates/funcoesphp.php'; $host = "localhost"; $user = "root"; $pass = ""; $banco = "cadastro"; $conexao = new MySQLi($host, $user, $pass, $banco); $array['nome'] = "camiseta homem de ferro"; $array['tipo'] = "Obje...
1
91202519acd57e0bde7acfd84a2c083a
0cd2832a9b33ad0ca98208e585a9aaa2
根据指定的层数,算出总的方块数
if (level < 1) { throw new IllegalArgumentException("The specified level is less than 1!"); } long count = 0; for (int i = 0; i < level; i++) { count += power(MerkleSequenceTree.TREE_DEGREE, i); } return count; }
1
5cb21f7c94235e860596a2dfd90ccf82
2f6fe43a50de9772aa4c1099a6e1442e
visualization
def visulization(): os.system('cd flowstar-2.1.0/outputs;'+'gnuplot "RC_kinematic_purepursuit.plt"') im = Image.open('flowstar-2.1.0/images/RC_kinematic_purepursuit.eps') im_rotate = im.rotate(-90) im_rotate.show()
1
30ab162bcfd92dcec0e32712d6dcbbd4
81b74088c77356de7608f1d74e7a2a75
Strip null data padded during encryption
pad = decrypted[-1] if pad < 1 or pad > 32: pad = 0 return decrypted[:-pad]
1
2d017735bd8117423dbdbf6f3810e736
6a95f5d35f61f8e0eb98b4fdfc9c1c80
清空分割后的训练数据
with open("../result/v3/trainY.txt", encoding="utf8", mode="w") as fw: with open("../data/corpus/clear_partice.txt",encoding="utf8") as fr: for line in tqdm(fr.readlines()): sen_label = sentence_to_label(line.strip()) line = "" for row in sen_label...
0
41e8ab4ff82b1e00c1b6d08568e44a8d
f65a07f91e1bac5ee352c2882127fd82
根据位置索引得到size
public class AutoParamDataSource extends com.earthview.world.core.AllocatedObject public com.earthview.world.spatial.math.Vector4 getPackedTextureSize(long index) { long indexParamValue = index; long returnValue = getPackedTextureSize_ev_size_t(this.nativeObject.pointer, indexParamValue); com.earthview.world.spa...
1
59609287fd459da94a93dee5548059ea
83e538db0c277119538566724c417ce5
Extracts the parent DDL items.
StringBuilder sb = new StringBuilder(); BufferedReader br; try { br = new BufferedReader(new FileReader("Output/ProjectDDL.txt")); String line = br.readLine(); while (line != null) { sb.append(line); line = br.readLine(); } br.close(); } catch(IOException ioe) { Logger.logError(ioe.get...
0
89b3c587c6dc790eb8d503c17a7daedc
0ceabf33bb93dfe119394e0c11f1810b
Generates the positional properties for a given control.
function generatePositionalControlProperties(ctrl) { let text = ''; text += generatePropertyValue(ctrl, cred.spec.propertyLabel.ctrlType) + ','; text += generatePropertyValue(ctrl, cred.spec.propertyLabel.resourceClass) + ','; text += ctrl.resourceId + ','; text += generateControlCaption(ctrl) + ','...
1
986113e605e23ed36a1bc91f08be9a51
c42770855f4200693d69f6954ec5eebe
Merge data from the reported quarters and the estimated quarters to get a consolidated pic of the earning status of the current fiscal year
if _check_input(year,quarter) is True: data = _get_report_data(year,quarter,1,[]) df = pd.DataFrame(data,columns=ct.REPORT_COLS) df = df.drop_duplicates('code') return df
0
9de6eecfa12ac664c83f089d60ded6df
381943a16f525fb5045d88335cbc5572
interpolate the pose given haptic tip over the given time period. interpolation is done at each physics tick
{ time = glm::clamp(time, 0.0f, duration_); const auto& channel = channels_.at(id); const auto& positionFrames = channel.positionFrames_; const auto& rotationFrames = channel.rotationFrames_; const auto& scalingFrames = channel.scalingFrames_; glm::quat rotation = { 0...
1
d71c54077c84b4f9803e75d29d3176ea
9b30677e111f08f8c71ead2d9a7d519f
根据策略的名称或序号返回子策略
public List<TaskStrategyEntity> getTaskStrategyInfoByName(String taskStrategyName,String taskStrategyId) { return (List<TaskStrategyEntity>)this.query(TaskConst.SQL_GET_TASK_STRATEGY_INFO_BY_ID, new Object[]{taskStrategyName,taskStrategyId}, TaskStrategyEntity.class); }
1
444bddd913e39b92ead5b7e3e6d2f34a
56ac3d41258d6197fb5b1fca67d57dde
Aqui ele faz a limpeza de linhas que não queremos enviar para o contato
def clean(lines): pattern11 = re.compile(r'msg\s=\s"signo:\S+\s(sender|receiver)?\s:\S+\s(?P<sig>RIC[IM]_([A-Z0-9]+_)+[A-Z0-9]+)[,:]?(\swith)?(\s\S+[:=]\s?\S+\s?\S*,?)+"\s\}') pattern12 = re.compile(r'msg\s=\s"\S+\s\S+\s(?P<sig>RIC[IM]_([A-Z0-9]+_)+[A-Z0-9]+)[,:]?(\swith)?(\s\S+[:=]\s?\S+\s?\S*,?)+"\s\}') p...
1
910007c1fed2b6e3042ba373ce0b543b
91c8400cbb72629011133e26aef47cf8
Teken verbindingen
namespace Sudoku public class Window : FormMethodes public void TekenPanel(object sender, PaintEventArgs pea) { this.tekenGrid(pea.Graphics); this.tekenDikkeGrid(pea.Graphics); }
0
16fba1d436a6dedd2ca4ec0a65818162
ac7c0fcd55261a8fbdecd0b20278e8a5
ユーザが好むタイムゾーンの時間に直す
global $server_timezone; if ($server_timezone=="") { $server_timezone = getServerTimeZone(getGMTtimestamp()); } $saveTimeZone = date_default_timezone_get(); $timezone = tzOffsetToName($user_timezone); date_default_timezone_set($timezone); $localtime = localtime($server_tim...
1
7d2e5b278593409f7368737355279cec
2bbad3c61918781bf10d0fedec7d006a
将好友与天气和机器人组成字典
def dealFriendsData(friends): fs = {} for i in friends: fs[i['NickName']] = {'UserName':i['UserName'],'Remark':i['RemarkName'],'Sex':i['Sex'],'qianming':i['Signature'],'city':i['City']} dfs = pd.DataFrame(fs).T return dfs
0
32adc7d4f22c819e97b00f61b0dce28c
13df7f7fba2acd6e4b578355c73e27b6
! @brief Performs temperature compensation. Adjusts AGC linearizer tables based on temperature. Must be called at 10 second intervals to perform temperature compensation. rfm_init() must have already been called.
{ static int32_t temp; #ifdef SINGLE_CHIP uint32_t t = pwr_read_adc(TEMPERATURE_MEASUREMENT); temp = (int32_t)(((float)1.13*(float)t - 272.8) * 1000); #else static struct _ttable { int32_t temp; int32_t millivolts; } ttable[] = { { -40000 , 86 } , { -35000 , 120 } , { -30000 , 16...
0
1b421c1fe6b1ce099f609a62f30e9849
6d82e39a189227171eb52d34bfb535f1
set a sector modified by name to our list
FUNC(LS_Sector_SetDamage) { FSectorTagIterator itr(arg0); int secnum; while ((secnum = itr.Next()) >= 0) { if (arg3 <= 0) { if (arg1 < 20) { arg4 = 0; arg3 = 32; } else if (arg1 < 50) { arg4 = 5; arg3 = 32; } else { arg4 = 256; arg3 = 1; } } sectors[secnum...
0
a23a4e284c1850dee450ebb036f2427d
eb0d381690c2c804edbd252e6a0b9ee3
Move the cursor of the vt100 terminal n columns to the right or to the left.
{ zend_long y,x; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll", &y, &x) == FAILURE) { return; } IS_NCURSES_INITIALIZED(); RETURN_LONG(mvinch(y,x)); }
0
dc08a2e72cce4da56729034a7abdf1aa
1fcbe1f4ac1d4aa00c8a96a19a731639
Extract & Calculate Relative Humidity HDC2010 Sensor
float humidity = ((125.0 * data) / 65536) - 6; return humidity; }
1
04c04b80006099839310184bbea1351b
9cc9651f529616a6739126f865c83232
Get minimum mask number
nmin = 0; nmax = maskr_.cnt(); nmax *= masks_.cnt(); }
0
9006c476d1fa13698d670a309e8d1691
9da3e4bf0d5642cffae657916990271d
通过id获取某个主用户的所有用户成员
{ $uids = self::where('auth_id', $id)->column('uid') ?: [0]; $map = [ 'id' => ['notin', $uids], 'status' => ['egt', 0], ]; return Member::where($map)->select(); }
0
6d2280b395a93edbb8d36733554e7f8a
9834b7722a6b1088301879a4e5c6a187
Setup the aliases for each of the cmds this should be called as part of setupcommands
def setup(bot: Bot) -> None: bot.add_cog(Alias(bot))
1
36a32a7eaf2137f924dbc2f7d0f691d5
04298fc8d5ff40c1d6d3ab2ae5779369
Get the cum tr a caisse2.
class Tabledeserreurs public function getCumBaseTrCCaisse2() { return $this->cumBaseTrCCaisse2; }
1
5dcb0c3134c152af8b365a8786bd02b0
47ed36bf346002da4ca83292155453d2
Prints the entire changed text.
namespace FixProjects.Abstract void Verbose() { Changes.ForEach(x => Console.WriteLine(x)); }
1
2c93e2046255af8166a33a18b4438678
01fb52a41bd0dd599a3d3d95a62e4ee6
IsError 是否是error
func isError(typ reflect.Type) bool { return typ.Implements(errTyp) }
1
8a702366e08064786e10d39a1432693e
4d19bd644050c2561cd0d5676e31441c
Calculates the small-world-ness according to Humphries & Gurney, 2008.
t_dic = {} for i in range(0, len(g.vs['class'])): label = g.vs['class'][i] if label in t_dic.keys(): t_dic[label].append(i) else: t_dic[label] = [i] n = len(t_dic) neb = g.neighborhood() s = 0 for k, v in t_dic.items(): if len(v) > 2: ...
0
b294f955fdd5dd64b3f067a62113f0c3
97716358a84eb841d5c91fd47cd4a1e1
Tests whether we can successfully open an existing db
class ConnectionTests(TestCase): def test_openDB_exists(self) -> None: self.patchConnectionCallable("connect") path = Path(__file__) openDB(path) self.assertEqual(self.connections, [path])
1
e7cc3e9090a271c16c895b4a2b98e580
868c2e6f06b90791c2c1d7a1e06af7e5
Start an app and position it
def startAPP(device, packageName, startActivityName): startAPP = 'adb -s %s shell am start -n %s/%s' % (device, packageName, startActivityName) os.system(startAPP)
0
7c497e34d02144943ab910181df201db
b20cc1a1c83c0df7dcda1b00117ef50a
优化计算图
def GraphDef_Opt(graph_def): from dragon.config import option OX = option['graph_optimization_level'] if not option['share_grads'] and OX >= 3: OX = 2 graph_def.arg.add().CopyFrom(MakeArgument('optimization_level', OX)) graph_def.graph_type = option['graph_type']
1
903247caf8d3fde75a878d5a3a701024
1b2f46d8f0ed89eb94347a537df3b6ae
Returns true if symlinks resolves to a target inside the known cell roots, and false if it points outside of all known cell root.
@NotNull ListenableFuture<Boolean> isSymbolicLinkToDirectory();
0
e605b0993a63386d75f362cb0ccf7fb9
634fa35c9aecb76e6952d03980fa7497
bitmapを、imageviewにぴったりあわせて描画する
matrix.reset(); matrix.postScale(totalRatio, totalRatio); float scaledWidth = sourceBitmap.getWidth() * totalRatio; float scaledHeight = sourceBitmap.getHeight() * totalRatio; float translateX = 0f; float translateY = 0f; if (currentBitmapWidth < width) { ...
1
c5a4b68dd6e274dd795d385d0a1ec6f5
6e6a61be32923f2a3c200e03d1547fdf
Retrieve the basePv name for a Medipix detector :
def get_base_pv(reason: str) -> str: return reason[:-3]
0
b989592fe0c77619bc4c5c537b9affc0
bb5a64de72324d40731d483bc7f8d27c
ページごとにエフェクトを読み込めているかテスト
$pd = $this->getPageData(); $content = $pd["content"]; $this->test->onSinglePageLoaded($pd); $this->assertEquals($content, $pd["content"]); }
0
5da1a69055e35a53d153de4c40609a1a
7cf5d19125b5d54985c5eb5c51dee5c8
Return the appropriate label for a particular distribution type
full_label = lbl.split(',')[0] if full_label in ['dELS', 'pELS']: return 'ELS' elif full_label == 'PLS': return 'PLS' elif full_label == 'CTCF-only': return 'CTCF' elif full_label == 'DNase-H3K4me3': return 'H3K4me3' else: print 'ERROR: label {} is not rec...
1
02fce6b208842c23e734aa8da87f8fb7
df9d2ccfedb0ba268e969a36f72abf4e
Main loop for water bot
class WaterSoftenerMinder(threading.Thread): def run(self): last_msg_day_hour = None last_measure_day_hour = None time.sleep(5) while True: curr_time = datetime.datetime.now() curr_day_hour = {'day': curr_time.day, 'hour':curr_time.hour} self.cre...
1
bfe7a9d64367488dadd77081ac3ca725
8a45961463e8528c28a44ece28c41402
求因子的和
res := 0 for i := 1; i < n; i++ { if n%i == 0 { res += i } } return res }
1
7de5ef6ffb3af3c570369b7208795c1c
82be8d89f7d1cf78b60f1e2e2d1e612f
根据盘主键来获取破发点数量
@ResponseBody public Integer getZibHhByZhubId(Integer xskpd_zhub_id) throws Exception{ Integer hh = service.getZibHhByZhubId(xskpd_zhub_id); return hh; }
1
826a0ba6e8f2bfcaec6c19ce0ff62813
c484607d405d1c762f8b7638b313f364
Tests that in case the authentication is lost, the data is restored after the login.
session, objs = standard_database users_db = await session['users'] user = (await async_gen_to_list(users_db.find({'email': 'admin@oldjokearchive.com'})))[0] token = user['tokens'][0]['token'] response = await http_client['post']('/api/users/_login', {'type':...
1
2e43671c9816ce6328a05b4b5557937f
ecc7dd2b0f2a4994d7e58291cb64013b
Calcula as horas trabalhadas
class CargaHorária(utils.CalculadoraTempoMixin, TimeStampedModel): def horas_trabalhadas(self): total = datetime.timedelta() for mês in self.meses.all(): total += mês.horas_trabalhadas return total
1
cbef99c94755719bcd27fc4e7d108837
a164e801442e9e8204a0e94ff1f738be
移除invoiceCount
void unsetInvoice();
0
e9e429e5807b03416abcbc1f760973cf
b96666e02a8eb4620e640812076d8d9c
Gets the length of a stack of cards.
public class Game public int getNumberOfCardsInStackAtPosition (int position) { return stacks[position].size (); }
1
cf3dcf5aa25b2a236f8d8007865a7e28
be5db647d1468fca16583d3a5f083b26
Nos da el valor de una palabra del diccionario
Function getWord($value){ $file_name = 'dictionary.txt'; $file_handler = fopen($file_name, "r") or die("******File does NOT exist or you lack permission to open it.*****"); $line = fgets($file_handler); $dictionaryWord = strtok($line, "\t1234567890" ); while($line !== false ){ if(wordValue($dicti...
0
d7a744ed30b148aae337b6c975ffe075
80f5c682001110f184b97f3c7331df0a
Find the nearest location along a linear {@link Geometry} to a given point.
public GeoResults<T> geoNear(@NotNull Point point, double maxDistance, String[] propName, Object[] propValue, String order);
0
3ece3e74925ee4f3fc75e708e8d3bfad
f89fe1a72812d607ee42a1d95babcc26
! \brief handles hfp module specific ui inputs Invokes routines based on ui input received from ui module.
bool CDlgRingingBase::OnChannelKeyPress(int iKey) { bool bHandled = TRUE; switch (iKey) { case PHONE_KEY_HANDSET_OFF_HOOK: case PHONE_KEY_HEADSET_CTRL: case PHONE_KEY_HANDFREE: { SendUIRequestAction(TALK_ACTION_ANSWER, 1, iKey); ProcessAnswerIncomingCall(); ...
1
644557996963fe64a5668a74f358a8b1
4521025303cb4b0dc08ff896cc1a93a8
Setter for <code>CONTACTS_DATA.PERSON.CONTACT_ID</code>.
{ synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(CONTACTID$0, 0); if (target == null) { target = (org.apach...
1
c70d773528fc84c6d834052212744ece
ef218841f35d4717bc19acf30b2030c5
Déduit l'elo des joueurs après un match.
namespace OrionsBelt.Engine.Tournament public class TournamentManager public static void CalcElo(IBattleResult player1, IBattleResult player2, BattleType battleType) { TournamentUtil.CalcElo(player1, player2, battleType); }
1
6770e739714bf8d15b8f9c60fc32000f
63fdbb0144ad9670c3613cdef2cd273e
Формирование команд горизонтального и вертикального поворотов головы по координатам ThumbStick-джойстика (нефиксируемый обзор).
if (Math.abs(x_stick) >= (2 * Math.abs(y_stick)) + .1) { flMotor.setPower(x_stick * multiplier); frMotor.setPower(-x_stick * multiplier); blMotor.setPower(-x_stick * multiplier); brMotor.setPower(x_stick * multiplier); } else { flMotor.setPower...
0
039c06cd3502d07025ddb65ea689dce1
55fdd6b28a26cdcc85857ca78b8c4763
очистить список предпочтений
function clearWishlist() { $('body').on('click', ".js-clearWishlist", function(e) { e.preventDefault(); $('.price-item__wrapper').addClass('-is-removeSlow'); $('.js-wishlistPagination').fadeOut(); setTimeout(function(){ $('.-is-removeSlow').addClass("-is-delete"); }, 300); }); }
1
83b927343d4337d0c13bd01f1b09ccfe
e99fe7f9407c6306ccf19adebd6b0cc0
计算end-start的毫秒数(四舍五入)
{ long time; time = time_end - time_start; time = time / 1000; return time; }
0
2816194992b9ddb105c7648b79cc29d1
a8dfb23afc5b59afd52b9f55b18d730c
Method that gets all links attached to a given node.
class Graph(object): def get_links(self, node_id): if node_id in self.__data.keys(): return self.__data[node_id]
1
e1804a7f566b9b3cf61393eb6769e9e6
c48210495440f8798c2bcbd67fec31d0
传入距离矩阵以及点的轨迹列表,计算路线距离
distance = 0 for i in range(POINTS_SIZE): (x0, y0) = points[route[i]] if i == POINTS_SIZE - 1: (x1, y1) = points[route[0]] else: (x1, y1) = points[route[i + 1]] distance = distance + math.sqrt((x0 -x1) * (x0 -x1) + (y0 -y1) * (y0 -y1)) return distance
0
848a18d720b83f2d7941605673be16c5
1ed0abbd7d1588534b448e48fb53e57e
Чтение из файла адресов метео станций.
StringBuilder builder = new StringBuilder(); try { ArrayList<String> strings = (ArrayList<String>) Files.readAllLines(Paths.get(path)); strings.forEach(builder::append); } catch (Exception e) { e.printStackTrace(); } String mosMetro = builder.t...
0
f9f16d596007c785f74677c5866954a4
b77d9f7c31cf80e364bf13e4bb33f392
Write disk CRU interface
__REGPARM int write_disk(const void *buffer, const drive_params_t *p, unsigned int lba, unsigned char blocks) { unsigned short status = 0; unsigned char failed = 0; unsigned char c, h, s; s = (lba % p->spt) + 1; c = (lba / p->spt) / p->numh; h = (lba / p->spt) % p->numh; asm volatile( "int $0x13\n" "setcb %...
1
cd3890f523f3207260be564d480f88a3
895fcbe34ad40979130e5bac2b33e288
Hides the scan settings modal
public class CombatUIManager : MonoBehaviour public void ExitScan() { ScanModeSwitch (false); scanScreen.RevealScanScreen (false); }
1
4fa1369f096414bee506f13e107629e9
2d0aa47f5043c16e6f2b0dbdde04acce
Simulate the transaction to calculate the dependencies, the required download size and the required disk space. The corresponding properties of the AptTransaction will be updated.
class TransactionQueue(gobject.GObject): def put(self, tid): trans = self.limbo.pop(tid) if trans._dpkg_status is None: trans.depends, trans._dpkg_status, trans.download, trans.space = \ self.worker.simulate(trans, self.future_status) if self.future_status_fd is not N...
1
fe910616c8f19d3f3254ea78da18d4dc
af78b565f4c9c9ad164d81a8ede0e166
# Indicates whether a vector is a date vector stored as a character vector. # Args: # x, a vector # Returns: # a length-one logical indicating whether the vector is "date-as-character".
is.date <- function(x) { inherits(x, c("Date", "POSIXt")) }
0
1756aa4c49124561c80cfa3774a12c3b
1aff5504086432f14674e4195ea6644d
Handles a TransformMarblesMessage
bool ScreenDecalManager::HandleMessage(const Telegram& msg) { switch(msg.m_message) { case msg_decalBlood: { m_pBlood->SetActive(); } return true; case msg_decalBrokenGlass: { m_pBrokenGlass->SetActive(); } return true; } return false; }
0
b938664ed3b0fec39afc2f1fbc5d1d41
3a0e3708c29de6a7fe19bd415d9eba26
杀死当前前台进程
class AppManager private fun killCurrentProcess() { Process.killProcess(Process.myPid()) exitProcess(10) }
1
3cc1427200fac5187fab0596397bc65e
79e1690d5329b783a8f940a6f2474708
보고서 page 리스트 추출 Returns
def getReportCardList(html): page = etree.HTML(html) datalist = page.findall('.//table[@id="DataGrid1"]/tr') report_list = [] index = 0 for data in datalist: row = data.findall('td') row_list = [] for c in row: row_list.append(c.text.strip()) report_list.a...
1
95a118c828068a48c24c28d4ed22422a
1963049d27931448b8e49db7f2088155
初始化计算机的一个实例
self.chess_board = board.Board() self.human = player.Player("玩家 1") self.computer = player.AIPlayer("计算机")
1
2e898c9775cdf5eb196fb7c04a748e87
41af3f1d45d5e775012309c858f20718
Add a block of XML chars/content to the list of elements. See StringHandlers.c for the definition of "content".
public abstract class WBSAXValueSerialiser public abstract void addString(char[] chars, int offset, int length) throws WBSAXException;
1
c0205e1b7d9ab721e5144fcb508851bf
254d454c0c07d1e4659c3df9d58c16bd
添加 cell 数据
{ ControlAsyncUtil.SyncInvoke(dgv, new ControlAsyncUtil.InvokeHandler(delegate() { if (cellvals != null) dgv.Rows.Add(cellvals); else dgv.Rows.Add(); })); }
1
d117645e3818591b0ee7228c07f2c570
1023575b76234651ece9dc2e21e2502a
Returns the arrows associated with this arrow bar.
public class ArrowIcon implements Icon, SwingConstants public static class ArrowButton extends JButton public int getArrowCount() { return arrowCount; }
0
a511d31f11b105309c9cefea8acd5044
980c03fa090d40bb421c4cd10ab33475
ping 测试rabbitmq连接是否正常
@Slf4j public class RabbitMQSource extends AbstractSource implements Configurable, EventDrivenSource private void testRabbitMQConnection(ConnectionFactory factory) throws IOException, TimeoutException { Connection connection = factory.newConnection(); connection.close(); }
1
e4eb1ca6566e357462ab0b4bac1e4f0e
496ddb7b9953a36693659c6afb60e622
Initialises blue squares on board
for (int i = 0; i < 16; ++i) { if (i / 4 != 0 && i % 4 != 0) { BORD[i] = 0; } else { BORD[i] = 3; } } }
0
587870c208ee4ec4645b2c86ccd21e4e
4edf8ad9ae514a19b37821e517a1fc97
Attempts to decrease the <see cref="PageCapacity"/>, by removing unallocated pages at the very end of this <see cref="IPageStorage"/>.
namespace PlcNext.Common.Tools.IO IPage Resize(long newCapacity);
0
961dad97448d216bae60ade750356784
855a324c8cf093fc7b57b3345b7e0a1c
Test adding same receiver multiple times.
solver = PipeSolver(self.echo_py) solver.reset() solver.recv() solver.emit('123') solver.emit('456') ans1 = solver.recv() ans2 = solver.recv() self.assertTrue(ans1 == '123') self.assertTrue(ans2 == '456')
0
6a0baad694ff690f6d0fdb968f862eff
b253cbecd90ea182a314bde7f29c669e
Повертає максимальний степінь вершини в графі n може дорівнювати нулю
where TGraph : IGraph { return Enumerable.Range(0, graph.VerticeCount) .Max(v => graph.Adjacents(v).Count); }
1
e1071f8eee6e0d5e0438b596a959ad19
f6aacfb01ac8ea25e9e7f1fb42c32d76
Calcule en récursif la factorielle de n
if (nombre == 0) return 1; else return nombre * factorielle(nombre - 1); }
1
18c1f6992ef9cc2866e7f5f5d1c5efae
f02be85f7588fc82f41fc616d07bbafc
创建助记词钱包账户
var that = this; var web3 = that.web3; let loading:any = that.loadingCtrl.create({ spinner:'ios', content: AppConfig.nknCrrrentTip.createWallet.creating }); loading.present(); setTimeout(function () { const newWallet = web3.eth.accounts.wallet.create(1); let newWalletKeys...
0
80d1f846963a91723f15c7a3b3323255
0e3b2f6f24783c15d50c38dcc78e319c
Time elapsed in face detection.
class Solution(object): def elapsed_time(self): return self._elapsed_time
0
36f369e0ee0e6ecebd68a0a13b00c3b1
fe5a1a601326c6723acc1db35cdf5443
# Rotina que implementa diversos algoritmos para detecção de comunidades
n <- dim(md)[1] it <- 1 ass <- vector() ass_old <- rep(2, n) ASS <- matrix(ncol = n, nrow = itmax) Fobj <- vector() if (centers == -1) { centers <- sample(n, 2) } for (i in 1:n) { ass[i] <- (md[i, centers[1]]) > (md[i, centers[2]]) } ass ASS[1, ] <- as...
0
14d29703ae8e1d1ae40b1f07885db309
9773cd941ca874432e8341a94bfd3d16
Functionality: To clear the start and goal state from barriers
def StartandGoal(): return ctostates(4,1),ctostates(4,8)
0
d3588b452cfa688794eb2fbac7366f4b
c70e7d33ac4b9e29ac56d51f9c1c9733
Go to given position, avoid opponents
class Navigation(Motion, TfTransformer): def goToPosition(self, x, y): self._target_turn_delta = self._getDestData(x, y) if self._handleObstacle(): return False return self._goToPos(self._target_turn_delta)
1
64e704b55f4259c641808a93c3092441
a8eaee44386830ec82670608f20cf7dd
Vẽ bảng danh sách sản phẩm
echo '<tbody>'; foreach( $data as $key => $value ) { echo '<tr>'; echo '<td width="2%" align="center"><input name="ick[]" type="checkbox" class="check_items" value="'.$value['ID'].'"></td>'; echo '<td class="hidden-xs" align="center">'.$value['pr_code'].'</td>'; echo '<td align="left"><a h...
1
a445894b82744948f25b61e4f433b116
ceba9a2f6d3f3478f7e3a5cd9860267b
Set The expiration time of the suspected image URL in [ISO date format](https://intl.cloud.tencent.com/document/product/266/11732?from_cn_redirect=1#I).
public class TencentVod extends AbstractModel{ public void setExpireTime(Long ExpireTime) { this.ExpireTime = ExpireTime; }
0
ab9fc37e42fbcaa59472d04ca0d9b733
316a20eb9bc8b5fc6b29815fcbbc8ec8
CanLayerBeStructuralMaterial(self: CompoundStructure,layerIndex: int) -> bool Identifies if the input layer can be designated as defining the structural material for this structure. layerIndex: Index of a layer in the CompoundStructure. Returns: True if the input layer may be used to define the structural material and ...
class _LayerTest(object): #IsLayerChangeable #IsLayerChildOf #IsLayerCurrent #IsLayerEmpty #IsLayerExpanded #IsLayerOn #IsLayerParentOf #IsLayerReference #IsLayerSelectable #IsLayerVisible #IsLayerLocked def is_selectable(self): return _base._rsf.is_l...
0
9a75a68fd92f9e3a795b2095088008ad
54019eb7aab81e565c3b1089b4352cfc
The callback for when the insert file is clicked.
public partial class CMSModules_Content_Controls_Dialogs_Properties_FileSystemPathProperties : ItemProperties protected void hdnButton_Click(object sender, EventArgs e) { if (Validate()) { var props = GetItemProperties(); var script = CMSDialogHelper.GetFileSystemItem(props);...
1
776754b4de861d634d4d3a30472dd1c6
cb7ca4e0c5449c577ecc839cfab920f4
接受变更, 清空当前的修改前的属性状态
namespace Dt.Base.FormView internal class PropertyView : INotifyPropertyChanged, ICell public void RejectChanges() { Val = OriginalVal; }
0
68ab9b03dca16d76a984a209b1f5fcbb
3ab8efe39f8aa834a8b78a7d78fbe73c
Remove data that fall outside the domain or are hidden
cond = (self.absreal.LOGN >=lognmin) & (self.absreal.LOGN <lognmax) self.absreal = self.absreal[cond] cond = (self.absrand.LOGN >=lognmin) & (self.absrand.LOGN <lognmax) self.absrand = self.absrand[cond] cond = np.hypot(self.yg,self.zg) < tdist_max self.galreal = self...
1
617906f7a185553d00dfce82fff8e16d
e63c2aea03f0892ebc0a53c649452a76
用图片帧更新追踪器 图片中可能存在多张人脸 如果人脸和已有track中的某人脸匹配,则用此frame更新已有track 如果人脸无法和已有track中的人脸匹配,新建立track
if self.tracker is None: OPENCV_OBJECT_TRACKER = {'mosse': cv2.TrackerMOSSE_create, 'kcf': cv2.TrackerKCF_create, 'csrt': cv2.TrackerCSRT_create} self.tracker = OPENCV_OBJECT_TRACKER[tracker]() self.tra...
0
73ba3e0b5b4ebb945ddb5f6a3c76cb26
c47231abab670e9fad04813c6cee2a5a
載入學生地址資料
{ Dictionary<string, StudentRecord_Ext> StudentExtDic = GetStudentExt(); Dictionary<string, string> StudentEnName = GetStudentExName(); #region 學生 暱稱&居留證號 ListPaneField StudentEnglishNameField = new ListPaneField("英文姓名"); StudentEnglishNameField.GetVar...
0
4346f64fac87f831cbd6198406afc55c
7e42a578d197e6039c22dd5773ab51cb
Выполняет резерное копировение БД
adr = Helper.settings.BASE_DIR + "/Helper/db_access/db_s.db" time = datetime.datetime.today().strftime("%Y-%m-%d-%H.%M.%S") adrout = Helper.settings.BASE_DIR + "/Helper/db_access/backup/db_s-"+ time + ".db" adr.replace('\\','/') adrout.replace('\\','/') copyfile(adr, adrout) return redirect(...
1
a450cd4143a3b29b9d4b60036145cc9d
17b50c6b8ce952b5bc5b5f1afb14f565
Return this :class:`SpotElevation` object as an (x, y, ele) tuple object based on the :class:`pyprom.lib.datamap.DataMap` passed in.
class IMapElement(metaclass=abc.ABCMeta): def getPosition(self): pass
0
9ce0eb5981b213376cb443b82ad592d5
66645d2109ccb9a8d81bda3a4374390b
解析菜单JSON
System.out.println(menuJsonStr); ApiResult apiResult = MenuApi.createMenu(menuJsonStr); if (apiResult.isSucceed()) renderText(apiResult.getJson()); else renderText(apiResult.getErrorMsg()); }
0
027e3d1c811b81f0c9a54fae88c88df9
9631b4cfe36c5ba3f99900c9c1f1660d
Test that contains char is false for empty trie
public void containsChar(){ CompTrie testTrie = new CompTrie(); assertFalse(testTrie.contains("a")); }
1
cefa1bc5b8adf1e93920cca61c9b686b
3ab7958ba366d8e696457192b779c20f
可以作 Override,預設先不處理任何動作
public abstract class ActionBase : RAINAction public virtual ActionResult Execute() { return ActionResult.FAILURE; }
1