query_id
string
corpus_id
string
query
string
code
string
label
int64
6300f6b24bf88941a711af529145b2d7
b674bc62680018ffe4e3ce5b3e5df414
adapted from https://scikit-learn.org/stable/auto_examples/applications/plot_face_recognition.html
X = [] y = [] for class_dir in os.listdir(train_dir): if not os.path.isdir(os.path.join(train_dir, class_dir)): continue for img_path in image_files_in_folder(os.path.join(train_dir, class_dir)): image = face_recognition.load_image_file(img_path) face_boun...
1
1f7c223525d2f280b615dcac0d1be046
42b67d1a3264eeb2f3b3e60ee798ad3c
得意先店マスタを検索し、データを取得する。
{ try { if (!base.CheckAllValidation()) { this.ErrorMessage = "入力内容に誤りがあります。"; MessageBox.Show("入力内容に誤りがあります。"); return; } base.SendRequest( new...
1
3451b826010fbba19ee91e4de7672d34
cddb4502e086a2101463a951f6afa380
update regularization parameters
global glayerwise global elayerwise learning_rate = op...
1
08fec2b7c42ad292f651d117db2bbe31
ab6e66acc7843176a9f0f07c2ce65c08
返还当前方块
public class SuperBlock public boolean returnBlock(int blockNumber) { if(blockNumber >= 0) { byte[] tempData = new byte[512]; SysLib.int2bytes(freeList, tempData, 0); SysLib.rawwrite(blockNumber, tempData); freeList = blockNumber; return true; } return false; }
1
422d13f196d0db860b74c2bb2588e415
774ac478d0c3b7bd32385a70b2a876b6
Get info about url without download it.
{ $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_VERBOSE, true); curl_setopt($ch, CURLOPT_HEADER, true); curl_setopt($ch, CURLOPT_NOBODY, true); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET'); curl_setopt($ch, CURLOPT_RETURNTR...
1
ab0e643702602877a40009f1a15ef8a7
4a2c27262ff7b78d952776391c73ec9d
This adds a property descriptor for the Text Enclosure feature. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Feature_encodeUriKey_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Feature_encodeUriKey_feature", "_UI_Feature_ty...
0
86ed6592340c79bd5d994380dbcc4e44
d06c98a90c92afb4837d4e1ef45bd4d9
định dạng đoạn văn bản dài
function formatLongText(text, size) { if (size > 1) { if (text.length > size) { text = text.substring(0, size - 1); text += '...'; } } return text; }
1
b0d25ec332a55f6e9b4c4cf60341695e
b179034dbd4430f86aab3f6495c50a9a
Get the image URLs by scraping dpchallenge.net pages. Should do in parallel.
async def get_images(): tasks = [] async with aiohttp.ClientSession(read_timeout=0) as session: for img_url in img_urls: task = asyncio.ensure_future(fetch(session, img_url)) tasks.append(task) global responses responses = await asyncio.gather(*tasks)
0
e76c4ee4c7fe4c2c86a55a84c386fef3
1d1c1edf3c807f19ab0ef1f818a36385
Specifies how the <Byte Sequence> property should be interpreted
public class ByteSequenceRowObject public String getSequence() { return byteSequence; }
0
4d2ab16fddf50682a4e6ed59abf1a88b
0c643a98337fc430c21441bf6a6fbf2a
Returns the meta object for the containment reference '{@link Primitives.Left#getAngle <em>Angle</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getConditionalAndExpression_Left();
0
c91dd196ce03c77210a8e60460d4f763
3b7cc11db50881a47784d17ebda38479
Waits for all messages to clear the queue. This typically takes at least one second, since that is the timeout on the worker thread.
class WorkQueue(object): def wait_until_done(self): self.collection.wait_all()
1
146f79876518ca04d6914095ae9cc22c
f88ab2b41b6266cf90cdb4af3784d99d
Simple decorator to keep a list of conversion tasks.
if tasks is None: tasks = [] self.tasks = tasks
0
e8c78ce91c5917e142b14731e1539e38
cfad9ddf82bc51ad0cc68c7692f95bf4
Performs actions which change state of widget to default.
namespace Y_ public partial class Widget : Y_.Base protected void _defaultCB(){}
0
33e61da67e6510f7a0bd26a36dbde516
222f1f15bd725b2fd12acf376f91fbad
Pass the level when score reaches 0
Gson gson = new Gson(); Sendable sendable = new Sendable(); sendable.setFunction("level_complete"); LevelComplete lc = new LevelComplete(GameConnection.gameModel.myPlayer().getScore()); sendable.setData(gson.toJson(lc)); try { client.dos.writeObject(sendable); } catch (IOException e) {...
0
c83a966698b81d4b63abff110dddc6df
fbc750f237de1243be36e8ef44177896
Forcefully animates to end.
{ if (m_endAnimator0 != null) { m_endAnimator0.AnimateToState2(); } if (m_endAnimator1 != null) { m_endAnimator1.AnimateToState2(); } }
1
5a6a7776930c9a8af20e1afa761f7acd
355c569efd3c5ceb72d6058ad172a300
Returns a date a prescribed number of years ago
def n_days_ago(n): return datetime.now() - timedelta(days=n)
0
24960fb1fceb8c6ab3d06401b6834820
b6cb0476b1d392b558575761f65e0a31
convert scanline of colrs to gamma bytes
void CJPEG::j_putRGBScanline(BYTE * jpegline, int widthPix, BYTE * outBuf, int row) { int offset = row * widthPix * 3; int count; for (count=0;count<widthPix;count++) { *(outBuf + offset + count * 3 + 0) = *(jpegline + count * 3 + 0); *(outBuf + offset + count * 3 + 1) = *(jpegline + count * 3 + 1); *(outBuf...
0
76c5e3300703bb9322762ed605b6b0b9
7eae54ed4ae53e68649362fc7f85a80e
Collapsing the node and its children recursively
function childCollapse(node){ node.eachChild(function(currNode) { if(!currNode.isLeaf()) { currNode.collapse(); childCollapse(currNode); } } ); }
1
bdbdb151255b7ade5227b7a469fdff0a
c497d8c823639eb20e74a96555833d6e
Get a list of the meetings you are assigned to.
{ if ($userId == null) { $userId = User::findCurrent()->email; } $cache = StudipCacheFactory::getCache(); if ($meetings = $cache->read('zoom-user-meetings-' . $userId)) { return json_decode($meetings); } else { $result = self::_call('users/...
1
872d6b14630a149d38d8053c7ed74004
211a2f6b685974ca79038aa6e1b4122f
write to a list of registers
{ for(int i = regAddressLen - 1; i >=0; --i) { char byte = (reg >> (i * 8)) & 0xFF; driver->write(byte); if(!driver->waitForAck()) { driver->stop(); return false; } } return true; }
1
937033a3c256afc5cca79fa0716e7545
63ac5d416478996ee2eddc81a5141eb9
指定エフェクトパスにレイアウトIDからレイアウトをセットする
namespace UtilSharpDX public sealed class MCInputLayoutMgr public int IASetInputLayout(EffectPass p, int layoutID) { InputLayout il=null; if (Search(p, layoutID, out il) !=0) return -1; App.ImmediateContext.InputAssembler.InputLayout = il; retu...
1
9eeadc6dec6e621a0b7983c423926200
3afe7fca0b0c379317a72e23daef3f81
Создание шляпки винта с методом выдавливания
{ WorkAxis xAxis = _inventorApi.PartDefinition.WorkAxes[1]; WorkAxis yAxis = _inventorApi.PartDefinition.WorkAxes[2]; WorkAxis zAxis = _inventorApi.PartDefinition.WorkAxes[3]; var firstStageLenght = RocketParameters.GetParameter(ParameterType.FirstStageLength).Val...
0
f643461734330d39facf3a21221365bf
d6620c7c31a7705e0fcff4c845db114d
设置上部分文字
public class CircleProgressBar extends View public void setTopText(String text) { if (mTopText != null && mTopText.equals(text)) return; mTopText = text; invalidate(); }
1
88e50b1cb049c7468d49bdfbfb3c828f
45c3be3e0423e74ea90272963ef7d95b
Getter for <code>WETRN.DLTD_OFFR_SLS_CLS_SKU.LAST_UPDT_TS</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 OffrSlsClsSkuRecord extends UpdatableRecordImpl<OffrSlsClsSkuRecord> implements Record20<BigDecimal, String, Integer, BigDecimal, ...
1
5e7383d04db8f71e0318cfabbac3ccc1
353dde5ed83d1fffbcb1d21ab20d151c
Sends a REMOVE KEY APDU.
class LedgerDevice static get apduKey() { return [0x77, 0x30, 0x77]; }
0
c0944c1135e9d1e6226445f8d6c665e9
b7f755d12576ebd1d585c3aefe805d4e
thêm chi tiết hóa
{ DateTime now = DateTime.Now; DateTime date = new DateTime(now.Year, now.Month, now.Day, 0, 0, 0); HDON hDON = new HDON(); hDON.MAKH = makh; hDON.MANV = manv; hDON.NGAYLAPHD = date.Date; hDON.THANHTIEN = thanhtien; ...
0
a6ba0ccfbc0d0aadda3f6b45851f3a1f
3856f5e63ff13c1737bcdd3b0fdb2c45
API Reference: https://developers.planet.com/docs/api/reference/#operation/ListItemTypes
{ var localVarPath = "/extensions/types"; var localVarPathParams = new Dictionary<string, string>(); var localVarQueryParams = new List<KeyValuePair<string, string>>(); var localVarHeaderParams = new Dictionary<string, string>(Configuration.DefaultHeader); ...
1
b73823d64d2199385af791b46a66656f
ada8cd5e3c64636fb8ba639390ceea94
uses yens algorithm to calculate the k shortest paths
s = g.v[n] for v in g.v: v.k = float('inf') v.parent = 0 s.k = 0 S = [] Q = [] for vert in g.v: heapq.heappush(Q, vert) while len(Q) > 0: Q.sort() u = heapq.heappo...
0
913b742a51a3134a508795e34044147f
231df9910be97f01832c925586b0d2d5
Delay reminder by 1 day/week/month/year, depending on preferences.
private DateTime checkFrequencySelection(DateTime chosenDateTime, FrequencyChoices chosenFrequency) { long nextReminderTime = chosenDateTime.getMillis(); if (chosenFrequency.getRepeatType() == REPEAT_WEEKLY) { assert chosenFrequency.getDaysChosen() != null; List<Integer>...
1
337139c5c55dc08cbdaf399fa2b963b8
4f99030494e607eef8d78b6084cddbb1
Stop current generation
namespace RCT2MazeGenerator public class MazeEditor : Control public void EndGeneration() { if (this.generating) { this.generating = false; this.genVisited = null; this.genStack.Clear(); OnGenerationFinished(new EventArgs()); Console.WriteLine("Finished"); } }
1
b6ddc2804f6dec0b1ef53861ce72925e
206c58e5279a2471c7d5e0c507a85135
Before testing, grab the original passwords so they can be reset in tearDown
try: result = admin_disable_user("testuser@test.com") result = admin_delete_user("testuser@test.com") except Exception as ex: pass self.username = "testuser@test.com" self.password = "testpass123" self.initialise_test_user()
0
66fbd19c9466fa7601be3a611d52f337
320980c083c2f2e1d65f30ce47d699ab
returns a list of 4 neighbors around a given cell
def checkCell(cellPos): cellH = ord(cellPos[0]) cellV = int(cellPos[1]) return [(cellH+1,cellV+2),(cellH-1,cellV+2),(cellH+1,cellV-2),(cellH-1,cellV-2),\ (cellH+2,cellV+1),(cellH+2,cellV-1),(cellH-2,cellV+1),(cellH-2,cellV-1)]
0
c4b3cdbf94ef593e48e764b5f34504ca
abf53e3419c0014de8cf1dc251be8044
태그를 완전 제거하여 Text만 보여주기
public class AddHomeService extends AppCompatActivity implements DatePickerDialog.OnDateSetListener @Override protected void onCreate(Bundle savedInstanceState) @Override public void onTextChanged(CharSequence s, int start, int before, int count) { for (int i = 0; i < tagViewState.si...
0
f1139acc008116d307e8da5db08a22a3
7679186e06917abc965c2b8bc87b8274
实现到float的类型转换。
class constFloat extends constBase private void toFloat( int v ) { f = Float.intBitsToFloat( v ); }
1
469ea0462b03ef4166b795d56194b867
4f2f9e4869c463581709ab22992650e3
Handles the CustomColumnDisplayText event of the nguyennhanLydoModelGridView control.
{ switch (e.Column.FieldName) { case "INDEX1": case "INDEX2": e.DisplayText = Convert.ToString(e.RowHandle + 1); break; default: break; } }
1
bc43307ecf7941c1d74db516a4abc1b1
f5918f6756b979463ee159d1a8c71bb9
For crystalline materials only, allow a fall-back modelling of any components with absent dynamic information via a VDOS-Debye model using the specified Debye temperature.
a = -9.070217 b = 62.45326 d = -135.1102 f = 4.79594 g = 0.250047 h = 1.14188 j = 0.0861488 k = 0.0344483 e = exp(f + g*omega + h*omega**2) C = j + k*omega tau = 1. - T/Tc if T < Tc else 0. B = Pc*(-1 + a*tau**(1/3.) + b*tau**(2/3.) + d*tau + e*tau**(4/3.)) if isinsta...
0
acb851673d0a0f7498e90f53b745ee3c
ecaa57a0c78e08f83accfb7ff26989c6
设置目标账户交易后余额
@TableName("cellar_member_balance_change_record_db") @ApiModel("会员余额变动记录表") public class CellarMemberBalanceChangeRecordDbEntity extends AbstractEntity implements Serializable public void setAfterBalance(BigDecimal afterBalance) { this.afterBalance = afterBalance; }
1
9da290fbc8fa29f57900596b0f3be221
5612f49b27028bdf7962bcb38d247ba8
get the number of points in the region map with the specified index
{ AFX_MANAGE_STATE(AfxGetStaticModuleState()) if( ShapeIndex < 0 || ShapeIndex >= (long)_shapeData.size()) { *pVal = NULL; ErrorMessage(tkINDEX_OUT_OF_BOUNDS); return FALSE; } if( _isEditingShapes == TRUE) { _shapeData[ShapeIndex]->shape->get_NumPoints(pVal); return S_OK; } fseek(_shpfile,_shpOffset...
1
7053d27ec4d37dd15444b24c604c3e23
52de4befc050c42c358d9862d4c6d7a5
Vertically flip the image
def flip_vertical(img): return img.transpose(Image.FLIP_LEFT_RIGHT)
0
ff5487baf62bb8e08369ee8e520dbb12
b986d32fa594af1f06afac47f76ae1c0
Reduces the draw area to the given rect
int activeX0, activeY0, activeH, activeW; synchronized (this) { if (currentRgbMap == null) { throw new RuntimeException("Need to add at least one pallete."); } activeX0 = (x * ratioX) / 1000; activeY0 = (y * ratioY) / 1000; acti...
1
13c8b4bb29440d3d5da4bce3d856172c
0028ac71855cf933d453c82e938c357a
Set the expiration for a ``key`` as a UNIX timestamp or a Python datetime object.
class dnskey(base_resource) : def expires(self, expires) : try : self._expires = expires except Exception as e: raise e
1
e20d801a52c27f754d70afc5e70ed79c
d41e6e3a70d15c872c9101ba163445bf
Fits the model before sampling.
class Sampler: def fit(self, **kwargs): if self._pc is None: self._pc = perf_counter() self._fit(**kwargs)
1
3d6ede1c68cb7a78d193402721c36678
fb16b208f75d7c8d5162582c37c35188
This method is responsible for validating the value passed to the setSurname method This method is willingly generated in order to preserve the one-line inline validation within the setSurname method This has to validate that the property which is being set is the only one among the given choices
public class Validator public static boolean validateSurname(String enterSurname) { Matcher mSurname = pSurname.matcher(enterSurname); LOG.debug("Validate Surname: " + mSurname.matches()); return mSurname.matches(); }
0
331f2d23ebc54a6218716ca9d4d7cd06
d7823fe22eac7018aa6c4119fa17c0c9
指定ファイル・ディレクトリをコピーするタスク
export default class UploadOrchestrator extends UploadOrchestratorInterface copyFile(remoteSource: string, remoteTarget: string) { this.tasks.push(new Task('copy', remoteSource, remoteTarget)); }
1
e5afc33b4f6e86edb3b1c9707eb69468
98127113df523c6d89f11c521588552b
Return an object that can be used to render a JSON representation of the model.
class ErrorResponse def renderable { json: as_json, status: status } end
1
cfd49069e7400e43d241c9261b8eccc2
9f993e428f4a43b03fc106e527a2e0e4
Gets the remaining coffee percentage.
{ double cost = 0.0; if (sCoffee.isSelected()) cost = sCost; else if (mCoffee.isSelected()) cost = mCost; else if (lCoffee.isSelected()) cost = lCost; return cost; }
0
925b0d820eaa90874db72667168e42b8
5926f7221c8ca338e08bebd3d0b2a9a5
ファイル番号を設定します。
@Table(name = "check_umine_mountain_file") public class UmineMountainFileCheck extends BaseExtendEntity public void setFileNo(String fileNo) { this.fileNo = fileNo == null ? null : fileNo.trim(); }
1
73564cb2040134809eb9d032cca15c7e
17a0c5e0ff3d0062e5260106d8e8d4a9
Calc the Signal-To-Noise ratio of the unprocessed vector waveform (e.g. acceleration after mean removal on components specified by comp) relative to a pick: i.e. the ratio between the maximum after the arrival (pick_time + secs_delay over secs_after seconds) and the RMS before the pick (over secs_before seconds). Retur...
noise_amp = _rms( tr.slice(starttime=noise_window[0], endtime=noise_window[1]).data) if np.isnan(noise_amp): noise_amp = 1.0 try: signal_amp = tr.slice( starttime=signal_window[0], endtime=signal_window[1]).data.max() except ValueError as e: return np.nan ...
1
374ad278358bd6cf28684217cdb87066
c1cb012a3b61678a4c63b91e5bd5bd42
Create and load existing stream for an activity
void setActivityStream(ActivityStream as);
0
a754e26880d5e5bb78428417e6c2ddd1
562bd68d1101532b96f7e897b85d5e5c
Periodically send "watching" command to the API. This is necessary to keep the session alive.
def keep_alive() -> None: while True: time.sleep(6) send_request("heartbeat")
1
cd6ffbee32a6c871c62cc4ee82850406
8bd6d7e8c61ce9046114e7dca6691809
Rotates the direction of the toy 90 degrees to the right.
{ if (this.position.Direction == null) { return false; } this.position.Direction = this.position.Direction.rightDirection(); return true; }
1
3ef3717728ba429976e1fbdc3053528e
4d4dfc272dee22904e58d18d43586019
@brief 保存修改众筹信息
class CrowdfundingController extends HomeController public function add(){ $data['order_id'] = trim(I('id')); $this->checkEmpty($data['order_id'], '订单id'); $data['msg'] = trim(I('msg')); $crowdfunding_id = D('CrowdfundingOrder')->update($data); if($crowdfunding_id){ $arr['id'] = $crowdfunding_...
1
8059d3ebccc5ce21e966a113f569106a
a8d510b3a40735e5aa27ebb58b404287
Enable &#039;render stack&#039; pop draw call.
{ if( --tr.draw_stack_pos < 0 ) gEngfuncs.Host_Error( "draw stack underflow\n" ); tr.draw_list = &tr.draw_stack[tr.draw_stack_pos]; }
0
1b5b17f5f75668104a81a773ef199c48
7b200cc207e6f39777d00421a83153ee
If map has key, delete key, return true
bool JsonEntry::rm(const string& key) { return static_cast<bool>(_map.erase(key)); }
1
1e8c8856b8578f1ffce26537ca3013a8
7f6e54271faf2354019f40db0f9fba92
批量上传所使用的方法,该方法不会自己调用openServer()打开连接,完成之后也不会关闭连接<br> 所以这里需要调用者自己调用openServer方法打开连接,在调用此方法进行上传,等所有上传完后需要自己调用closeServer关闭
String serverPath) throws Exception { if (files.keySet().size() == 0) { return false; } for (Map.Entry<String, InputStream> entry : files.entrySet()) { boolean result = uploadToServer(entry.getValue(), serverPath, entry.getKey()); if (!result) { return false; } } return true; }
1
8047fb443c0058b383cea783737256e4
61270743202e828684a5255e82004179
Smarty相关配置
class Config public function getSmartyConfig() { return $this->smartyConfig; }
1
baeabe0f8431e20cf547369413e826ca
e368143eb9bb7354058d9ca6e742c1bb
Merge two fragments from corresponding vertices representing source and sink of an edge.
auto u = nodes[contract_edge.to].edges[contract_edge.reverse_edge_index].to; auto v = contract_edge.to; assert (!((u == sink_index) && (v == source_index))); assert (!((u == source_index) && (v == sink_index))); for (auto i = 0; i < nodes[v].edges.size(); ++i) { auto ...
1
f358b5104c161c33f8433019bd32fe43
a244eeccc2cc8bc3f3556f20f036dcb4
Funcao responsavel por receber o alarme de que o tempo maximo de execuçao foi atingido
{ fprintf(stderr,"maxInacHandlerGrandFather\n"); if (signum == SigMaxInac) { char buffer[BUFFER_SIZE]; if (readln(pidPipeAlarm[0], buffer, BUFFER_SIZE)) { Instructions aux = tarefas; while (aux != NULL) { if (aux->pid == atoi(buffer...
1
28df938040cf3bfdb0fd169f564fc4fb
f55102a141da95dda8fb1ff2c8c6b2a4
Find AlgoGroup by module and class
def get_api_class(module_label, classname): return get_api_classes(module_label, [classname])[0]
1
5746074f1813a30af960ddabe8239f2a
e95973c6eb3bd26296425d4f3e6aac2e
格式化发出去的消息,对于输入的消息 显示的消息= html转义->处理超链接->处理换行和空格
text = HTML_Utils.autoMakeLink(FormatTool.html(text), true, false); text = StringUtils.replace(text, "\r\n", "<br/>"); text = StringUtils.replace(text, "\r", "<br/>"); text = StringUtils.replace(text, "\n", "<br/>"); return text; }
1
980641c26e0fc17c97e18e1afd328d33
32928f95602e8e5bb558bb9d8f1cd085
Returns a vector that contains the prime factors of n
public class PrimeFactorization public int[] GetFactors(int n) { var r = new List<int>(); while (n > 1) { r.Add(minPs[n]); n /= minPs[n]; } return r.ToArray(); }
1
0345a808e64392be0c62030d8fbba10e
6fa3043a339ea4f56d04eddacaca161a
Deletes an existing origin within an endpoint.
public class AFDOriginsInner public Observable<Void> beginDeleteAsync(String resourceGroupName, String profileName, String originGroupName, String originName) { return beginDeleteWithServiceResponseAsync(resourceGroupName, profileName, originGroupName, originName).map(new Func1<ServiceResponse<Void>, Void>() { ...
1
281dc90c873e5b667f6963c0d35cf909
646ae49b07fe3774d5d5667bbbfda527
Gets the character template.
String getCharacter();
0
feb1fce1ca13ef4cd9579c8393909d38
de4572c1beddce2fe05717f4e613af79
can be null if invoked from a unit-test. See http://msdn.microsoft.com/en-us/library/system.reflection.assembly.getentryassembly(v=vs.100).aspx
namespace Bio.Util public static class FileUtils public static Assembly GetEntryOrCallingAssembly() { Assembly entryAssembly = Assembly.GetEntryAssembly(); if (null != entryAssembly) { return entryAssembly; } return Assembly.GetCall...
1
b130c75ade6e35cff424a4ebfe18901c
9bb6649a0cf8bb07fb9aec658dcf8880
Should remove: uclibc / bc / netbrazil / sdk / dota / release / hdcp / engg Return list with Model / Tuner (Humax, 2T)
class DeviceConfigLoader(object): def retrieve_device_model_list(cls): device_name_list = [] for root, dirnames, filenames in os.walk(Paths.DEVICE_MODELS_CATALOG): for filename in fnmatch.filter(filenames, '*.xml'): device_name_list.append(os.path.splitext(filename)[0]) ...
0
712e9b7cb34bd57db662156808dd4b7f
de08ed53ba440757494e849927fc155a
给js文件加 md5
function loadMD5Js(callback) { UtilService.loadExtJs('/js/lib/js-md5/md5.min.js').then(function() { if (callback) { callback(); } }); }
0
a935e965a4b77aab5d78a86d65e5a078
b6db4244edc5fb7d6a4b4aef5863b9d8
Set up the edit mode verbs
$(container).find("div.bloom-editable").on('keydown', null, 'F6', function (e) { var selection = document.getSelection(); if (selection) { document.execCommand("insertHTML", false, "<span class='superscript'>" + document.getSelection() + "</span>"); } }); $(container).fin...
1
81369ed0d4c8667b730283e6b377e3d2
f5a897e70eaed13dcc9bd5a0edaa68aa
Get Users Favorite Points
global $wpdb; global $table_prefix; $temp_used_points = $wpdb->get_var($wpdb->prepare(" SELECT temp_used_points FROM " . $table_prefix . "fmt_points WHERE user_id = %d", $user_id)); return $temp_used_points; }
0
c1ae6da066f4fa7c4be1ab1fcb266496
598fd4b851a2a3dfd7815b60616eae67
returns the angle at which the maximum light intensity was found
public final class EmittanceRawData public double getMaxAngl() { return angl_max; }
0
07e59e21f7e419745b82f3a422d205ec
1ad77d223095808d59f5caf62d5ed4cb
ParameterArrayType constructor.
class ParameterArrayType extends ParameterDefaultType implements \ArrayAccess, \Iterator, \Countable public function __construct($cache, $strict) { parent::__construct($cache); $this->_values = array(); $this->_strict = $strict; }
1
237864a4a4e4d4b8ba122275b47e6cc6
680f753e83eaa15aba7d149195fdad9e
Чтение данных, которые передаются с помощью GET запроса, как данные в маршруте.
function handleGetRequest (url, req, res) { res.writeHead(200, {'Content-Type': `text/plain;charset=utf-8`}); let query = decodeURIComponent(url.query); let items = query.split('&'); let parsedData = {}; for (let item of items) { let arr = item.split('='); let key = arr[0]; let value = JSON.parse(...
1
57851a5d73366882d0929d081f28dc98
e486f692a0048bd3e2766779d7fbed78
找出所有交易员的姓名,按字母排序并拼接成字符串
public class TransactionTest @Test public void test4() { String traderStr = transactions.stream().map( transaction -> transaction.getTrader().getName()).distinct().sorted().reduce("", (n1, n2) -> n1 + n2); System.out.println(traderStr); }
1
7cebde89aacd5a0017cdeb24cbc0ec4e
2d05a7854802662f9f0f6d267a55cac2
Creates a symmetric key using given the encoded secret key.
class KCryptoServices fun symmetricKey(rawKey: ByteArray, keyType: KeyType<SymmetricKey>): SymmetricKey { return BaseSymmetricKey(rawKey.size * 8, SecretKeySpec(rawKey, keyType.algorithm)) }
1
59ac83f269a71fbc66ac078cce4f7b66
e3e819f43e76e69fe5231d1dc99220cc
Called by the controller when another client acquires the controller, or the controller stops controlling a camera.
namespace Microsoft.MixedReality.Toolkit.Internal.Devices.WindowsMixedReality public class WindowsMixedRealityDeviceManager : BaseDeviceManager private void InteractionManager_InteractionSourceReleased(InteractionSourceReleasedEventArgs args) { GetOrAddController(args.state)?.UpdateController(ar...
0
e1a0037c7407fb2c2474f82e1a5e988d
7e7da7d22ad81b4460bfbcd6fa2c3d75
Returns the expression operand for the specified expression type.
namespace SimpleEntities internal class SimpleEntityResource public EntityExpression GetExpression(string type) { EntityExpression result; if (!_expressions.TryGetValue(type, out result)) throw new ArgumentException("Not supported type"); return result; }
1
2d2d43ec90831554a365952fc9aeb82f
c046dbeb1803615d0915f61a6609b77c
Read the type name table from the Dex file, given the offset and count of entries. The stringTable must have already been read.
namespace Opc.Ua public class BinaryDecoder : IDecoder, IDisposable public bool LoadStringTable(StringTable stringTable) { int count = ReadInt32(null); if (count < -0) { return false; } for (uint ii = 0; ii < count; ii++) ...
0
07f7fa4b6039afe0584b1eafe8aa83fd
09d7fdddaa009978981b7d38d5905a93
sからgへ1ターンで移動可能か?
def can_move(s, p1, p2): if s == "DEAD": return False if not s[p1]: return False if s[p2] and s[p1][-1] > s[p2][-1]: return False return True
0
7ccc515ccbfb8750678caf9db6786a52
3d2c555fb559cdb50df7fec7a3f18100
Retrieve the balance of the given wallet on the Credits Blockchain
try { EthGetBalance ethGetBalance = web3j .ethGetBalance(address, DefaultBlockParameterName.LATEST) .sendAsync() .get(); return ethGetBalance.getBalance(); } catch (InterruptedException ie) { Log.e("FILIP", "...
0
0d4abf16e91176dadc594239506eefb9
43d30ebd07a7fea5f62b3bb0ef58447c
从栈底到栈顶依次显示所有元素
class ArrayStack2{ public void list(){ if (isEmpty()) { System.out.println("栈空!"); return; } for (int i = top;i>=0;i--){ System.out.printf("stack[%d]:value=%d\n",i,stack[i]); } }
0
f9ae51328f7d74e042a62605b3ba9c24
a1446f43c651317846418cb1637af00e
Set the type bordereau prepa.
class Libelles public function setTypeHSupLoiTepa(?string $typeHSupLoiTepa): Libelles { $this->typeHSupLoiTepa = $typeHSupLoiTepa; return $this; }
0
2138c4d618f592a918f733210d700a20
3632cc21e1e2ffc8d9734e2e52d33df5
Takes a list of kalman-filtered values and extracts the first two values from each value, expecting those two to be x and y values
def get_pair(list_object): x = float(list_object.pop(0)) y = float(list_object.pop(0)) return (x,y)
1
68d1c5bf2e7ec1cf8fa0ecc16815bd4d
97463cb10c4523ba8b056ee1dc582fcd
Makes an entity ownable so it can be owned by players / teams
namespace Valve.VR.InteractionSystem public class ObtainableObject : Photon.PunBehaviour public void TakeOwnership() { GameObject.FindGameObjectWithTag("SM").GetComponent<SoundManager>().Play("weaponPickup"); gameObject.GetComponent<Rigidbody>().useGravity = false; gameOb...
1
6ab96e2ebd615e865fdda79853c4cd0e
22e1191d1b7889c001153c849d7e7ce8
Create a new document from templates.
export class Client extends AbstractClient async CreateDocument( req: CreateDocumentRequest, cb?: (error: string, rep: CreateDocumentResponse) => void ): Promise<CreateDocumentResponse> { return this.request("CreateDocument", req, cb) }
0
908fe4f85bf67cb690f4747c4bc956e9
44d8dc73b154829e08050f1461188e4d
Signal handler for Show signal
void SysSetMainDialog::showEvent(QShowEvent *) { Showme(); }
0
782ecc00da14a143224c2d640dfe04e1
1cd6a243b348f87f93a4d5439ff6b4dc
If the login credentials are invalid, send the user to invalid login page
def invalid_login_view(request): return render_to_response('invalid_login.html')
1
a02ffba3ed6215f9078e8b0764b14715
5e94b0496bf51e0bfae72194262f1e8b
检测指定的角色是否是当前角色的友军
function Scene:IsFriend(target_obj) return self.scene_logic:IsFriend(target_obj, self.main_role) end
1
7686dda397192107693c09ee05f3d8dc
bf1b0905a26f769383b949732a5f25e5
Returns the status line for a given status flag.
if (status.down) { return { icon: icons.DOWN, message: statuses.STATUS_DOWN_MESSAGE }; } else if (status.up) { return { icon: icons.UP, message: statuses.STATUS_UP_MESSAGE }; } return { icon: icons.UNDER_MAINTENANCE, message: statuses.STATUS_UNDER_MAINTENANCE_MESS...
1
296ebb3f1eba2f32fa9a9a73f3eb3fee
7d64a49e435288362bb59b1e353e4835
设置 Client 名称,判断方法是否定义,如果没有再查找声明类
String name = m.getName(); if (name.length() > 3 && (name.startsWith("set") || name.startsWith("get"))) { char[] ch = name.toCharArray(); ch[3] = Character.toLowerCase(ch[3]); name = new String(ch, 3, ch.length - 3); } else if (name.length() > 2 && name.startsWith("is")) { char[] ch = name.toCharArray...
0
3ee4332b5b9910053984b176c18c7338
b838bac1836a3214b481f75f556b45de
フィルタ後のタスクを返す
switch (state.currentFilter) { case 'all': return state.todoList case 'active': return state.todoList.filter(todo => !todo.isCompleted) case 'completed': return state.todoList.filter(todo => todo.isCompleted) } }
1
8fbb5e0ff0c5f37d2461b4cfed888753
d4f4b212d0d92544c33f9cc0ed963bfe
Function that stores to file a list of medicines
text_file = open(name_of_file, "w") for i in listan: output = str(i+"\n") text_file.write(output) text_file.close()
1
f9e0d3c64fca8e371ca1bafb70fe4025
8fa873068a6c00d99bae53b20fe871dc
logs a given exception to the database
class DB{ private function ExceptionLog($message , $sql = ""){ $exception = '<br><br><br><br>Unhandled Exception.' . date("d.m.y H:i") . ' <br />'; $exception .= $message; $exception .= "<br /><br>En feil har skjedd."; if(!empty($sql)) { $message .= "\r\nRaw SQL : " . $sql; } if($GLOBALS['debug'...
0
fcbc55bc46523e9bbad24f57355a7816
36498490fd734e134af5a3d0d5bd7eae
Nastaví popis odkazu
if ($this->_descriptionUrl != $url) { $this->_desc = array(); } $this->_descriptionUrl = $url; }
0
03c0690a0ef358e872673099f1e240c6
339e34a6a870e39a66103ecc74b482cd
Delete all executions for a job.
@Headers("Accept: application/json") @DELETE("job/{id}/executions") Call<BulkExecutionDeleteResponse> deleteAllJobExecutions(@Path("id") String id);
1
cff66b6ec88e2dcb18cf3a930ef44f47
767c861944dfbf121cfe2438032930a3
Returns the callback method after dynamic colors have been applied.
class Definition public function getDynamicDateCallback(): ?IDynamicDateCallback { return $this->_dynamicDate; }
0
9795baa2fe8c961cbe2a908e6857721a
24f20597a312ba4fb87440faa75dfa65
Caps predicted values to [0, 1]
class CapsModel(object): def _squashing(self, _input): squared_norm = tf.reduce_sum(tf.square(_input), axis=2, keep_dims=True) squash_factor = squared_norm / (1 + squared_norm) / tf.sqrt(squared_norm) squashed_caps = _input * squash_factor return squashed_caps
0
1e4e98a241ac3c98f28995330660cfa3
b36550dcf5202e414a2d14c7e8fe93e2
The Time-To-Live of this Provisioning Profile
MeasureValue getTTL();
1
0826ec23265ee9366a0073ee103c80b6
9f556d5201c5a7ea0a4474221da6ad6b
Updates the list of neighboring countries on the basis of selection
namespace GeoHelper public partial class MainForm : Form private void listBoxContinent_SelectedIndexChanged(object sender, EventArgs e) { if(listBoxContinent.Items.Count > 0) { UpdateContinentInfo((Continent)(listBoxContinent.Items[listBoxContinent.SelectedIndex])); ...
1
be8595ce5750f91874c138726448330d
71332fe5cfb7c19bdcd21a34dbba113e
Validate that the webhook came from Mailgun.
validationToken = env['CHIWAWA_VALIDATION_TOKEN'] requestToken = request.headers['X-Chiwawa-Webhook-Token'] return validationToken == requestToken
0
8aff3cfc7d02dd596a592262c3ea516f
55ceb2fd401ce16cedda0c8b788760cd
Ignore any received packets.
data, (src_ip, src_port) = self._recv() if src_ip == self._local_ip and \ src_port == self._local.port: return None return data
0
b8aab0c8818d98b43ed7e6888c0b4441
537882d414d6ca32b3d6ad9cbefde693
取得指定區域的場站數量.
throws CommonException { station(p); DefaultDDBHandler handler = null; try { handler = new DefaultDDBHandler(getConnection()); handler.execute(String.valueOf(createSearchSql(p, false))); Entity[] countEntity = handler.getEntities(1, new...
1