query_id
string
corpus_id
string
query
string
code
string
label
int64
11960ca2e510c025417d231299302f76
1cb54c701205da8196f6d586578780b5
force notify level to warning
class Logger implements LoggerInterface public function verbose() { $this->min_level = self::NOTICE; }
0
721c3bb96d4592658b32caabf0a80b36
88fb0bd64a34fec440fdf00b81ff44c5
Sets the {@link HttpSession} attribute name that the {@link CsrfToken} is stored in
@Component public class CSRFTokenService implements DisposableBean public void setCsrfTokenHeaderName(String csrfTokenHeaderName) { this.csrfTokenHeaderName = csrfTokenHeaderName; }
0
4cf9a398d49f2d78d1478a7343e35b48
6ac897833a24087cf9e051e2c11ee7b1
RunAppsTierList lists all app tiers.
{ var localVarPath = ApiClient.ApiPathPrefix + "/apps"; var localVarPathParams = new Dictionary<string, string>(); var localVarQueryParams = new Dictionary<string, string>(); var localVarHeaderParams = new Dictionary<string, string>(this.ApiClient.DefaultHeader); ...
0
6f39a2f1416ea719ff4ad37e72eb7fc6
8a987374635936eaa67e9d1754eea70e
Submit a given request via this pipe and wait for it to complete.
class Protocol public function pipeRequest($cmd) { $this->_command=$cmd; $this->_write(); }
0
05c9714d9fb3894004ff2faa497e3846
09a656a5b1bcb06424d4f92f4917036c
Tokenize the each comment. Filter out all stop words and special characters.
def tokenizer(text): text = re.sub('<[^>]*>', '', text) emoticons = re.findall('(?::|;|=)(?:-)?(?:\)|\(|D|P)', text.lower()) text = re.sub('[\W]+', ' ', text.lower()) \ + ' '.join(emoticons).replace('-', '') tokenized = [w for w in text.split() if w not in stop] return tokenized
1
90e53147c7b498fdc723f589add2d44f
0454a51766aeffe40e9e67edbefa1b0e
닉네임 중복 검사 (GET)
@RequestMapping(value="checkNiDup.do", method=RequestMethod.POST) public String checkNiDup(String nickname) throws Exception { int cnt = memberService.checkNiDup(nickname); JSONObject obj = new JSONObject(); obj.put("result", cnt); return obj.toJSONString(); }
0
2c8c5002a5b4f598cd51d2a17823d92e
dd4c5b145445e9134853c8598bec7fc3
This test checks that given the correct input for an Equilateral triangle that the correct output string is returned This test should pass.
class TriangleTest(unittest.TestCase): def testCheckTypeTriangleInEquilateral(self): t = Triangle(5, 5, 5) self.assertTrue(t.getTypeForSide() == "equilateral")
1
05be8ce96bb0c30c04bec69dc62dd428
b3396b0867150d159648592a3e8a43ab
Allows the command to be sent, without modification.
public class RlabNetworkClient extends RlabNetworkNode public void sendImmediately(RlabNetworkCommand com) throws IOException { super.sendImmediately(com); }
1
6c72bb24c54a0c96c3bcf84b3e3f6bbc
8c18d2979d060e58e5926b4d69de5331
Issue response to user over HTTP.
SimpleHttpConnectionManager httpConnectionManager = null; try { httpConnectionManager = new SimpleHttpConnectionManager(true); execute(method, uri, httpConnectionManager); int statusCode = method.getStatusCode(); if (logger.isDebugEnabled()) logger.debug("Setting response code to [" + statusCode + "...
1
d6c6bedc4d9abf3f55aeb1b402fa9bb9
60bcba1f9baf8ffcbdc2799bc58c5ceb
Rotina para Rotação Simples à ESquerda.
static Post* rotate_left(Post *p){ Post *q = p->dir; p->dir = q->esq; q->esq = p; return q; }
1
3d6fdcdc3178a13fd66a99d885cf2fe6
6dac4cb10de753204a5ef7f00b641368
Returns the value of a 'NAME=VALUE' tag.
{ gchar *name = g_strdup_printf("\"%s\"", tag); gchar *start = g_strstr_len(data, -1, name); gchar *val_start = NULL; gchar *val_end = NULL; gchar *value = NULL; gssize val_size; g_free(name); if (start == NULL) { return NULL; } start += strlen(tag) + 2; val_start = g_strstr_len(start, -1, "\""); g_assert...
1
01acc03b2a1832f217dfc0e01b14c319
528a33c9440713128acc19933686c8bb
Controller method that handles the matrix multiplication endpoint
[HttpApi(LambdaHttpMethod.Get, "/multiply/{x}/{y}")] public int Multiply(int x, int y, ILambdaContext context) { var product = _calculatorService.Multiply(x, y); context.Logger.LogInformation($"{x} multiplied by {y} is {product}"); return product; }
0
f61fd7593319af54e0adac1b19b1d6f8
14e0e0425a2a76c0c3380298430be270
1 empty 0 not empty -1 not inited
int EP_Init(uint8_t number, uint8_t type, uint16_t txsz, uint16_t rxsz, void (*func)(ep_t ep)){ if(number >= STM32ENDPOINTS) return 4; if(txsz > USB_BTABLE_SIZE || rxsz > USB_BTABLE_SIZE) return 1; if(lastaddr + txsz + rxsz >= USB_BTABLE_SIZE) return 2; USB->EPnR[number] = (type << 9) | (number & USB...
0
2fb7d2189e3c4fbfb6210ce4e09c36d1
abd98109e5ed83f8e1fba7599684f8ba
This endpoint filters the dataset by id or by pokemon's name and return one result
export class PokemonDataService getPokemonData(name?: string): Observable<any> { return this.http.get(`${this.apiUrl}/pokemon/${name}`); }
1
82d65d0b9de954257cab078dc563eaa3
a5f67bdc7f41a346d307d3307d14bd6e
Used to get the flash setting when the image was taken.
@DSSafe(DSCat.DATA_STRUCTURE) @DSGenerator(tool_name = "Doppelganger", tool_version = "2.0", generated_on = "2013-12-30 12:28:55.823 -0500", hash_original_method = "7750780C979B83A925E226C6EFF8842D", hash_generated_method = "E83475C7B7538A7AE276AD39CA15EA70") public String getFlashMode() { r...
1
ccdd7d83536ba924e4a809eb1cbfef38
d5fea40e83b1ec0dea3c47298c654324
Called when a BS becomes the new master. Resets some state that will be rebuilt over time.
class EventHandler: def on_master_start_hatching(self): self.starting()
0
7ce940782666c0c40298737bb1716df9
22bccf551505cda0d30c4caba2b33ef8
Returns whether the version is a release version.
parsed_version = parse_version(version) return ( parsed_version.weekly_release is not None and parsed_version.commit_count is None and parsed_version.pre_release is None and parsed_version.dirty is None )
1
3fa0bac1f14e12cb82b5b7be3668a014
579c51bb58bcce359eab3bf021e2ebdd
Used to prevent the mobs to be interested by (and aggressive against) spectators.
public class RespawnTimer extends JavaPlugin implements Listener @EventHandler public void onTeleport(PlayerTeleportEvent e) { if (!Utils.hasTag(e.getPlayer())) return; if (e.getCause() == PlayerTeleportEvent.TeleportCause.SPECTATE) e.setCancelled(true); }
0
4925d222dc6cc62a8f0a9aff1f85fbdd
3f9a31a73df75c5e62f9f6f333aa5470
Check for Reports on Terra and Shroom and check for Self Hinted proofs
public class Diagnostics private static String reportAnswer(KB kb, String proof, Formula query, String pQuery, String testType) { String language = kb.language; String kbName = kb.name; String hostname = KBmanager.getMgr().getPref("hostname"); String result = null; if (hostname =...
0
d9805cc4316be72f8fa8887e5bec936f
30c659822c8bb141ae07043a1cdd9639
Open file system to select image to processes
dlg = wx.DirDialog(self, "Choose a directory") if dlg.ShowModal() == wx.ID_OK: self.dirpath = dlg.GetPath() self.FileList = AOFileObjects.AOFileList() imgFiles = ['.jpg','.jpeg','.png','.bmp','.tif','.tiff'] for root, dirs, filenames in os.walk(self.dirpa...
1
50c33a6c23fe93f57e9bf2ccb1f795ba
31f558d6e917a472aca6539f77f07135
Gets the Keccak 224 bit hash of a <see cref="string"/> input.
namespace Hope.Security.HashGeneration public static class HashGenerators public static string Keccak_384(this string input) => HashGenerationHelpers.GetHash(input, new KeccakDigest(384));
0
24b909cb6ead454685642c7528dad839
40b87a01653c2ce081fae078e1a9c4de
「メーカー記号」の存在チェック
{ String sSQL = @" SELECT 'e' FROM TB_SQM_Manufacturers_BasicInfo WHERE VendorCode = @VendorCode AND TB_SQM_Vendor_TypeCID = @TB_SQM_Vendor_TypeCID AND TB_SQM_Commodity_SubTB_SQM_CommodityCID = @TB_SQM_Commodity_SubTB_SQ...
1
b328cf86b2d0b1ef5d6077b3bfd51847
1c2ccc954385c39d4700aded08176a15
Отрисовка факела
{ Gl.glDisable(Gl.GL_BLEND); Gl.glColor3f(Convert.ToSingle(_figureColor.R) / 255, Convert.ToSingle(_figureColor.G) / 255, Convert.ToSingle(_figureColor.B) / 255); Gl.glPushMatrix(); Gl.glTranslated(0, 0, -4f); RotationGlut(); if (Wire.Check...
0
2c8e216048ff2f3ed1a721853447e729
78468f7b011e285bddcf01ea74737781
全部チェックを外すとすべてのアイテムが選択解除になること
function checkAll() { document.querySelector('#check-all').addEventListener('click', function() { for(let i = 0; i < dekirukotoList.length; i++) { dekirukotoList[i].checked = true; } const check7 = document.querySelector('#check7'); const subCheck = document.querySelector('#sub-check'); chec...
0
190ab4205706e5ed6318d2d4ec3eaeaa
51da5b52a462a7635058556aa5187733
Initiates the asynchronous execution of the StartRecovery operation.
namespace Amazon.Drs StartRecoveryResponse EndStartRecovery(IAsyncResult asyncResult);
0
28102c883e9c0a1ca64f0c9fb1100a2e
ba92fe7d2ba698ca29c499f5d11906ad
获取还未被评论的学员信息
@RequestMapping("/findUnTopicStuInfs") public DataGrid findUnTopicStuInfs(PageUtil pageUtil){ DataGrid dataGrid = new DataGrid(); List<StudentInfo> stuInfoList = stuInfServiceI.findUnTopicStuInfs(pageUtil); BigInteger total = stuInfServiceI.stuUnTopCount(); List<StudentInfoDto> stuInfsList = new ArrayList<>()...
1
3489782af17fdf44d0807a9a9d594761
863497fabe355a025f4b9612a4a456de
International Chemical Identifier hash (InChIKey) computed from chemical structure using the International Union of Pure and Applied Chemistry (IUPAC) standard.
class RDKIT: # Fragment molecule def makeInchi(self, params = {}): if not "smi" in params: print("Parameter 'smi' not found in argument list") return [] req_smiles = params["smi"] inchi = Chem.inchi.MolToInchiKey(Chem.MolFromSmiles(req_smiles)) return [inchi]
1
35cc040f73519e70ee5dda032f42933e
b0ce1c278d65dcb22c70454af8a8871d
initiate all possible states and transitions
void init_StateTransition() { for (int i = 0; i < StateTransition.size(); i++) { for (int j = 0; j < 4; j++) { for (int k = 0; k < 16; k++) { StateTransition[i][j][k] = agent_move(i, j, k); } } } }
1
5d178acdebb0d642d2783908491b86a1
b2bd423f65b112a791468e3b08e72c41
Waters all pots designated by data
{ openValve(m_portsetinfo.bigWaterOutNo); wait(CYCLE_TIME); openValve(m_portsetinfo.smallWaterOutNo); wait(CYCLE_TIME); closeValve(m_portsetinfo.bigWaterInNo); wait(CYCLE_TIME); closeValve(m_portsetinfo.smallWaterInNo); wait(CYCLE_TIME); openValve(m_portsetinfo.waterInNo); openWaterPump(); wait(CYCLE_TIME);...
0
22c5966d2e86747b7b73285393044830
8975028534cb30adc677989075a738ec
Go to previous cell (parent)
{ QTreeWidgetItem *pItem, *pPrevItem; pItem = currentItem(); if (pItem != NULL && (pPrevItem = itemBelow(pItem)) != NULL) select(pPrevItem); }
0
081211e74ac2a10aa6a33f73bf2e8608
afd74e97923fb7da0e943b53ed86269d
Takes standard input, transforms sequence characters to uppercase. Use with pipes on UNIX commandline as a filter to transform lowercase sequence to uppercase sequence.
class Cmd(_CmdBase, metaclass=MetaCmd): def __filt__(self, upstream): return iter(self.update(stdin=upstream))
0
b167f2672941f44839341f5bb723fed0
d49b3a1a345c9000ab780123d5818023
Allows the user to delete their track.
@Path("/{trackId}") @DELETE void deleteTrack(@PathParam("trackId") String trackId);
1
3a7a86ebdfd62745423a11f24fa6b689
2a917eb1fa81c8f4ba79a2556943328d
Get the suffix for the rmic stub classes
switch (beanType) { case DO_BEAN: return generator.getDoSuffix(); case DTO_BEAN: return generator.getDtoSuffix(); case VO_BEAN: return generator.getVoSuffix(); case QUERY_BEAN: return generator.getQuerySuffix(); default: return ""; } }
0
a0396dc65e1058f7b06ce3f08094db13
f4c115d8aec276bd1456f4539a418ad1
添加静态精灵(用键值对形式,为了提升性能)
{ Object[] objs = AssetDatabase.LoadAllAssetsAtPath(filePath); objs.ToList().ForEach(obj => { if (obj as Sprite != null) { map.Add(obj.name, obj as Sprite); } }); }
1
25cecdc3550489a707b9f97c3f80bfcd
718a488f0544280554523e6bd996274f
insertボタンにコマンドを登録する
public class BSTView extends BorderPane public void setInsertHandler(EventHandler<ActionEvent> e) { controlsPane.getInsertBtn().setOnAction(e); controlsPane.getKeyTextField().setOnAction(e); }
1
37133950c1712445fe81b22398a7ee22
10aa9a996da02cca3e6342c6bfb75d6b
有权限访问该组(个)接口, 否则响应 403
async function groupRequired(ctx: RouterContext, next: () => Promise<any>) { await parseHeader(ctx); const currentUser = ctx.currentUser; if (!currentUser || !currentUser.isActive) { throw new AuthFailed({ msg: "您目前处于未激活状态,请联系超级管理员" }); } if (currentUser && currentUser.isSuper) { await next(); } els...
1
ba5dfa85848da86a34a3422a9ef057c7
a585bc015f5c370a9eb3a8bde71f232f
# Allow all requests, even if no file is present, so that an error # because a post_max_size or upload_max_filesize overflow
class AssetsController extends AppController function beforeFilter() { parent::beforeFilter(); $postMaxSize = ini_get('post_max_size'); $uploadMaxSize = ini_get('upload_max_filesize'); $size = $postMaxSize; if ($uploadMaxSize < $postMaxSize) { $size = $uploadMaxSize; ...
0
fe065205d46669b64bd08d33b328638a
69817f9f16a23129d8b6d372a1fdc0f7
列出某一单位类别中的所有单位。
public class TaxUnitService public List<TaxUnit> getTaxUnitListByType(String unitType) { TaxUnitDao taxUnitDao = new TaxUnitDao(); List<TaxUnit> taxUnitList = taxUnitDao.getTaxUnitListByType(unitType); return taxUnitList; }
1
bce39215ec05fb68f02a084ed1b20e11
1aa67c70c1d643aae201d7a6f03ad423
Returns function object of the mapping function.
_FunctionPtr operator *() const { return m_function; }
1
7afa8a766980b195d70b50f31d9c7245
fd1538c4f4f569bf0a96076bf331b7f6
Remove numbers from a string.
def remove_numbers(text): clean = re.compile('\d+') return re.sub(clean, '', text)
1
0ead486530ccfdde68be870261de4e07
5e6055501f1640c65b27f0586f58de5d
метод возвращает название таблицы с описанием теста по передаваемому параметру
class GetData: def get_test_name(self,row): return self.data.get_cell(row,1)
0
a5a2a83f6a52105b168165c4a83a7e37
a89ef7b1ebd721b6f06094fc4c655f8a
Get a compiled regular expression to match filenames (not full paths) that this handler handles.
if ($matches[1] == '*') { return '/?(.*)'; } else if ($matches[1] != ':') { return '/?('.$matches[2].')'; } return '/([^\/]+)'; }
1
b1becf79ea69fe3912c7d26037c99d91
d8a05bac6346320e63e7b4f5cd7066b5
Truncates to integer towards zero. returns truncated value. Special cases: +/- Inf -> unmodified +/- 0 -> unmodified NaN -> NaN (unsupported on Chimera)
class int(object): def __trunc__(self, *args, **kwargs): pass
0
9652013320adad1e4070841bdbe94759
13e5082a616bab9a67cca2a0baa197fa
Нормализует и центрирует исходный набор точек фигуры
struct norm normalize_matri(std::vector<cv::Point2d> pointsVec) { double count = (double)pointsVec.size(); double xAvg = 0; double yAvg = 0; for (auto& member : pointsVec) { xAvg = xAvg + member.x; yAvg = yAvg + member.y; } xAvg = xAvg / count; yAvg = yAvg / count; std::vector<cv::Point2f> points3d; std::v...
1
58a7cbdef55e39d9c916951c4db17650
4cc98f6a791e7fc0b372243bb75cc876
увеличивает мощность выстрела
{ ammo += amount; if (ammo >= MaxAmmo) { ammo = MaxAmmo; } }
0
383fd105c62e95f64b3e5e71fb057860
0002ee81411c56510c5ef7bb6a45ad5c
字符串转换编码
if (str != null){ try { return str.getBytes(str); } catch (UnsupportedEncodingException e) { return null; } }else{ return null; } }
1
d166718f4ac70ded39958f13b80b09da
df8b47e95c9f0a217453a329d9321c5e
Estimate buy and sell volumes by assuming all items were sold at either the max or min price
vector<double> estimatedPurchasedPrices(vector<Record>& records, int fromDate, int toDay) { int startIdx = indexOfDate(records, fromDate-1) + 1; int toIdx = indexOfDate(records, toDay) + 1; long long maxVolume = 0; for (int i = startIdx; i < records.size(); i++) { if (records[i].volume > maxVolu...
0
0d6eceec40219b00366593422ac6bac6
e18763108fdfc071ac8b970db86ea6c4
Asigna un bloque a una posicion determinada. NO incluye validaciones de indices.
{ this.blocks[x, y, z] = blockID; isDirty = true; }
1
5b14b5e55c2ed458eca047da9822f3cb
066f987d598b326f3041d33633217531
获取当前产生点产生的Npc.
Character p = npc.getCombat().getTarget(); if(p == null) { p = npc.getCombat().getAttacker(); } if(p != null && p.isPlayer()) { return p.getAsPlayer(); } return null; }
0
bf1f03afea2b3c615dc1cb183bed32c6
823190833026dc64910742a850483384
Fetches info on a Tracking form and returns the info as a JSON
namespace FrgxPublicApiSDK public class FrgxTrackingApiClient : FrgxApiClient, IFrgxTrackingApiClient public TrackingInfo GetTracking(string orderId) { if (string.IsNullOrEmpty(orderId)) throw (new EmptyFeildException("No orderId given")); var response = FrgxApicallHe...
0
f448214680ee9dc19f2db97558825e81
6f5f01cb4f34e82e37b193ca3e099582
Initializes the block data SQLite database
public void onCreate(SQLiteDatabase db) { final String CREATE_BLOCKS_TABLE = "CREATE TABLE IF NOT EXISTS " + TABLE_NAME + "(" + KEY_OWNER + " TEXT NOT NULL," + KEY_SEQ_NO + " INTEGER NOT NULL," + KEY_OWN_HASH + " TEXT NOT NULL," + KEY_PREV_HASH...
1
880cd3e20add420e16d08ee39bd7b481
2d1da7fb6cc0dfcc901814f4ce395d98
Bestimmung der Garpunktes aus der aktuellen und der gewünschten Innentemperatur
numer = 1 + (Lvap * r)/(Rdry * T) denom = cp + (Lvap*Lvap * r)/(Rwat * T*T) return g * numer/denom
0
a4407c44d45536c9ad498a900e6ade5e
31cad0bc032c871fd61dc8c58367fe97
Takes offline the document.
class ClientSession: def pull(self) -> None: self.connect() self.check_connection_errors() if self.document is None: doc = Document() else: doc = self.document self._connection.pull_doc(doc) if self.document is None: self._attach_docume...
0
55ce03ed32b1b3810a09f2b00f9bd668
e2107982a0fce36e179db3e274b71232
Return redable representation. Uses the item's title.
class Item extends \Gino\Model function __toString() { return (string) $this->title; }
1
0485fde3b99791b0444db83a0e1753ba
80154babdd053edf085660bc3d693e8a
zwalnianie wszystkich alokowanych zasobów
void zwolnij_pamiec(char **&plansza,int wysokosc) { for (int i = 0; i < wysokosc; i++) {delete [] plansza[i];} delete [] plansza; }
1
1f434ae08360bfcd8d6bd2c4f2470c39
368078fe0449f52f77a0f097ddeb7787
Seçilen Rezervasyonunun Müşterilerini Listeler
ObservableList<String> emps = FXCollections.observableArrayList(); Dictionary<Integer, Employee> la2 = ReservRemote.getEmpReserv(id); Enumeration<Integer> enam = la2.keys(); while(enam.hasMoreElements()) { Integer k = enam.nextElement(); String rest = k+", "+la2.get(k).get...
1
f60c555c7b5d6da4a6c782709163e990
77972567a1afd574786b48d6182c342c
Sets the max duration for execution.
namespace Nexus.Link.WorkflowEngine.Sdk.Abstract.Activities IActivityFlow SetMaxExecutionTimeSpan(TimeSpan timeSpan);
1
beca2e492c49b9a1034ed233715342e8
7dea78da378cf2a3c6ed1a8c949d17c7
DEBUG draw a circle to indicate attack radius
namespace KoreDefenceGodot.Core.Scripts.Tower public abstract class BaseTower : Node2D public virtual void DrawAttackRadius() => DrawCircle(ToLocal(GlobalPosition), AttackRadius, AttackColour);
1
6a6472b42016467eb9bd82c274559ed6
29a5f20b446eb693f0c8bd3c955d76e8
Finds the kth to last node in a linked list
Node findKthToTail(Node head, int k);
1
d89e9077fb5f9f3da38b89dd781cc902
4fe64af4892e4a38058dd219c2eccc1b
Geneate a texture of floats (used in distortion stages) directly from an array
PixelsBuffer[] Content = new PixelsBuffer[3+MAX_SCATTERING_ORDER]; SimpleRNG.SetSeed( 561321987, 132194982 ); for ( int arrayIndex=0; arrayIndex < 3+MAX_SCATTERING_ORDER; arrayIndex++ ) { Content[arrayIndex] = new PixelsBuffer( (uint) (HEIGHTFIELD_SIZE*HEIGHTFIELD_SIZE*16) ); using ( BinaryWriter W = C...
1
ec6ca73089b9e5229922f4e10389189c
0f2e4d27cf5c84ab870cdac49bd893eb
在指定节点下 查找指定数据节点的父亲节点
BstNode *searchFatherNode(BstTree t, int value, int *pos) { BstNode *p = t; BstNode *pre = p; *pos = 0; while(p != NULL) { if(value == p->data) { return pre; }else { pre = p; if(value < p->data) { p = p->...
1
1c109f4e601a39cea6e85fbf633c6ad3
65d1f5a2bfc7bd7f111c092667b65bd7
使用map和reduce方法返回流中处理元素的总数
public void test2() { List<Employee> employees = Arrays.asList( new Employee("张学友", 45, 5000, Employee.Status.BULY), new Employee("张学友", 45, 5000, Employee.Status.BULY), new Employee("张国荣", 35, 2000, Employee.Status.FREE), new Employee("刘德华", 2...
1
7cbb3cfb57d39b512eaa94f6bb38137e
90b2017af4dd78cdb2238b5e18c0f75e
needs to end with a new line
public class ReportCardManager : MonoBehaviour public void writeLine(string str) { str += Environment.NewLine; System.IO.File.AppendAllText(fileName, str); }
1
c554254cc775655f504d06ef16a39944
b8661a782f24fe116412e422d5ced02d
Validate the VXLAN provisioning
options = (('neutron_l2_pop', True), ('neutron_dvr', True)) self._deploy_with_neutron_configuration( "deploy_toolchain_neutron_vxlan_l2pop_dvr", config={ "net_provider": "neutron", "net_segment_type": settings.NEUTRON_SEGMENT["tu...
0
98b675a059531463c5a7a75767bc1f80
284c17ffa6c7cb012f1b8aca8596a904
Print Reverse using recursion
void printreverse(node* h){ if(h==NULL){ return; } printreverse(h->next); cout<<h->data<<" "; }
1
881387a5e0fb88d7171de8bdf3d9e407
6f94c1818b1ef5ffc65c9803aa9bc827
정수 인자에 따라 해당하는 메뉴패널을 반환한다
namespace Gs2.Sample.Stamina public class StaminaStatusWidget : MonoBehaviour private GameObject GetMenuGameObject(StaminaStatusWidgetStateMachine.State state) { switch (state) { default: return transform.Find("Panel").gameObject; } ...
0
f61da429d64cdae0c3fc079ed6578b45
aab8f6490fabc21976ffb7656147738d
Get the appropriate local.set opcode for the given register class.
static void get_reg_set(struct reg_set* my_regs, enum md_opcode op){ my_regs->src1 = REG_NONE; my_regs->src2 = REG_NONE; my_regs->dest = REG_NONE; my_regs->load = 0; my_regs->store = 0; switch(op){ case LDA: case LDAH: case LDBU: case LDQ_U: case LDWU: case LDL: case LDQ: case LDL_L: case LDQ_L: my_reg...
0
a09e763019696e3a3afe3cde89ca1127
b1768848d0be64bc07646f29f2c279f2
Distance moyenne des points au barycentre de leur cluster
nbrs = NearestNeighbors(n_neighbors=2, algorithm='ball_tree').fit(pts) d, ind = nbrs.kneighbors(pts) d = d[:, 1] return d.mean()
0
2413aa2ffb6766d472b86db19dde4df7
3595722d690bc54b491c7f32c33443bc
指定したメンバーから、そのメンバーを宣言する型の完全修飾名を取得します。
namespace FeatherSharp.Extensions static class MemberReferenceExtensions public static string GetQualifiedName(this MemberReference member) { Contract.Requires(member != null); return member.DeclaringType.GetUndecoratedFullName() + "::" + member.GetUndecoratedName(); }
1
64d9bb571493cc162764f25d5376e162
24db4dc38cbbe9c27d6930d700a6bf4d
Read data asynchonously from a device.
os_size_t os_device_read(os_device_t *dev, os_off_t pos, void *buffer, os_size_t size) { OS_ASSERT(OS_NULL != dev); OS_ASSERT(OS_OBJECT_DEVICE == os_object_get_type(&dev->parent)); if (0 == dev->ref_count) { os_set_errno(OS_ERROR); return 0; } if (OS_NULL != device_read) { ...
0
62dbccc6e146ca292736c518cd223c43
522979f2ec3cc16c29c82f4f96e04b03
@brief Вычисление вектора значений логической функции Находится число переменных логической функции, вычисляются значения функции при каждом наборе значений переменных.
{ int value = 0; values = 0; findVariables(); int length = 1 << (numberOfVariables.unicode() - 48); for (int i = length - 1; i >= 0; --i) { QString substitution = substitute(formula, i); int position = 0; while (substitution != "0" && substitution != "1") { position = findPriorityPosit...
1
08947c0f8358a3f44f187f0ea62d8ca7
60e2415cfed1094d11bd262f95f2bf6f
查询喷漆打折配置
namespace Tuhu.Provisioning.DataAccess.DAO public class DalPaintDiscountConfig public static List<PaintDiscountConfigModel> SelectPaintDiscountConfig (SqlConnection conn, string servicePid, int pageIndex, int pageSize, out int totalCount) { #region Sql var sql = @"SELECT ...
1
e3c8e2c4b219d877d3db7698c9eb44c8
e5393146e38c4b3ceff168c6ca8a58ad
Looks up the credential definition on the ledger.
this.ensurePoolHandleExist(); if(!submitterDid) this.ensureCurrentVerinymDid(); let _submitterDid = submitterDid ? submitterDid : this.currentVerinymDid; const that = this; return indy.buildGetCredDefRequest(_submitterDid, credDefId) .then(getCredDefReques...
1
cddaefc593444b48bdb45fb3b2f5d762
f5152a5dd0a51a2005e494d08bb00236
spawns a single object
{ PoolObject obj = Spawn(prefab); if (obj != null) { obj.transform.position = SpawnPosition; obj.transform.rotation = rotation; } return obj; }
1
b71839ebc9a318d3bf8bd4fd4ca0d431
4286688fc3edd3152f14f23e51f058c9
判断地址是不是人物基址
{ var BaseFFFF = this.Process.ReadUInt32((IntPtr)(FristMoneyAddress - FRIST_MONEY_ADDR_TO_BASE_ADDR_OFFSET),IntPtr.Zero); if (BaseFFFF != BASE_ADDR_VAL) return false; return true; }
1
d19e0140c3f6d3440787f2f31e7f3ff5
3184299c3918cb666ddd384af86cd793
Choose the action with the highest score
class MCTSMaximum(DataSavePlayer): def choose_with_probability( actions: List[Action], scores: List[float] ) -> Action: total = sum(scores) rand = random.random() * total action = None for (weight, action) in zip(scores, actions): if rand > weight: rand -= weight ...
0
fea78be0f2ff2cb64875b2f80f36b96c
4c4ced7bd5baa2f26f01d6cba70a6935
Is vapor pressure correctly calculated from degrees Celsius?
class WeatherUtilsTestCase(unittest.TestCase): def test_dew_point_c(self): self.assertAlmostEqual(15, weather_utils.dewpoint_c(17, 88), 2)
0
bc723182c7245666ac24c66f7dd73ad0
7b834512b75c288890eff6fc98a4c85e
变为小写字母,并排序
public class Sort public static void sortLetters(char[] chars) { if (chars.length == 0) { return; } int i = 0; int j = chars.length - 1; while (i < j) { while (chars[i] >= 'a' && chars[i] <= 'z' && i < j) { i++; } wh...
0
77c8897d53f64ac87fd7755f3472539f
03c92279565e1b9b966aebc7b96479aa
Isolation index :math:`II_g` as in equation (23) of [2]. :cite:`nijkamp2015cultural`
assert G0.N == G1.N N = G0.N MI = 0.0 for c0 in [ c for c in range(G0.Ncmty) if G0.cmtyN[c] != 0]: for c1 in [c for c in range(G1.Ncmty) if G1.cmtyN[c] != 0]: n0 = G0.cmtyN[c0] n1 = G1.cmtyN[c1] n_shared = 0 s0 = set(G0.cmtyContents(c0)) ...
0
3e9404abfb0ff185d8a789d49c720a60
5ee6e7dc7474466aad6913881ecca00f
查询URL类型的资源并预加载可访问该资源的授权信息.
class URLResource extends Resource async load( options: Resource.Option = {} ): Promise<any> { return await this._loadURLResource( this._url, options.type || this._type, options ); }
0
65451e793f4cdce1912b10f0e283ec5d
a0812557d4eaaa4f1150770e3be32689
Calculate the coordinate values.
namespace CompositionProToolkit.Win2d.Core private void ComputeCoordinates(Vector2 origin) { var leftTop = new Vector2(_leftTopWidth, 0); var rightTop = new Vector2((Size.X - _rightTopWidth), 0); var topRight = new Vector2(Size.X, _topRightHeight); var bottomRight...
1
a054ce5fa9d5fcbefb96d9d5de434e3b
a0d5570391c9e8f060a48e9410275f2b
Enables a client process to opt-in to the focus tracking mechanism for Windows Store apps that controls the invoking and dismissing semantics of the touch keyboard. If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
namespace Vanara.PInvoke public static partial class MSCTF new ITfDocumentMgr AssociateFocus([In] HWND hwnd, [In] ITfDocumentMgr pdimNew);
1
a4ac3225c4e9ec25b168d03761927118
72554cdfe7d21b537cd301be10e52a9d
Does it have the alternate version category assigned to it.
public class VaryingConfiguration extends NestedConfiguration public final boolean isAlternatingTarget() { return (myAlternate & CFG_TARGET) != 0; }
1
f8380a3be125e84181957ea6360a59ca
fb5cc59b7e3dece7b11e950cbb6c5a8e
Kill adb server daemon on host
String command = "abd -s " + udid + " shell"; exeCmd(command); }
0
a7fabe89b0ea972895afd3e19ed5839d
67fe56957a765159ccb83c42e89cc70a
Echarts map 点击某地区,点击信号传给python,根据地区获取话题列表
function getTopicHtml(currentPoint){ var city=currentPoint.city; var classify=currentPoint.classifyChinese; var countrychinaname=currentPoint.countrychinaname; var name = currentPoint.chineseTopic || currentPoint.name; if($("#language").val()=="en"){ if(currentPoint.topicEnglish!=''){ name=currentPoint.topicE...
0
8aee2f2f99acd33fa9c9ca03bd8ae521
5b764ddbdd96e70d9777929884613129
メタデータがレイアウトタイプであるか返す
{ if(ExludingTable[type] is ReplacingMeta) { return true; } return false; }
0
57e2a9faa4a0ad1615877e410f77ebf7
48bcc23cb859fc44372405d2581a78be
hide/show bottom fixed panel with animation
var scrollTop = $(window).scrollTop(); var diff = parseInt(scrollTop) - parseInt(top); if (diff > 0) { $fixed.removeClass("smooth-unfixed").addClass("scroll-fixed"); $('#smoothConfirm').addClass("smooth-fixed"); $fixed.css({ "padding-left": le...
0
e2bdf3c1afd275c3a777b6f51e210df2
be97942564f4cc7433362012bbcb802d
免费配送区被拖拽时更新免费配送区的覆盖范围
class Dispatching extends React.Component driverMoveEnter(e) { let index = e.target.dataset.index, currentDriver = this.state.checkedDriverList[index], distributedArea = {}; if(currentDriver) { distributedArea = this.state.distributedArea[currentDriver.uid]; }...
0
d566eb296f6997d15b5a2d095f1bea4f
997874612977f267005b7275c257fc43
Filter Descriptor with based on visibility.
public DescriptorVisibility getDescriptorVisibility();
0
bec5a6f1fd114d3874229f91134d83bf
74bef0558583fa778f99c007a4994831
integrand of upper surface transmission
double ST1(double z,double gam){ double sparse=0; if(z>0 && gam<fabs(z)) return(z-gam); if(z<0 && gam<fabs(z)) return(z+gam); if(gam>=fabs(z)) return(sparse); else return(0); }
0
b2bcbe3c868d90754efb5a384c07de12
b027796434ef39c6c2cd7a4aa5ce2ecb
返回调用的servlet的名称.
class SetCategoryRequest extends RequestTemplate protected function getServletName() { return "SetCategoryServlet_MainFrame"; }
1
633fe10c64de94c28f7d953e4a3ff266
f7a43b9422e9edc41655c035565d4039
Set session and _messages attributies on request.
{ $session = PEEP::getSession(); if ( $session->isKeySet('peep_messages') ) { $this->feedback = $session->get('peep_messages'); $session->delete('peep_messages'); } else { $this->feedback = array( 'error' => array(),...
0
33925101505524802d40e9b89cd05d0f
5071a1594282b7fbfee9faac957285c6
判断是否只含小写字母.
namespace WindGoes.Data public class FrequentRegex public static bool IsLowerLetterString(string s) { return RegexValidate(s, @"^[a-z]+$"); }
1
5b5ea3062743804ca68f8018afd96078
bfbf0804eb3116488c6eb66d64c24d1a
For each supported feature that has changed, update the device. to conform with device restrictions.
class DeviceStatus(object): def _update_features(self): raise NotImplementedError()
0
8cba7a29e77502107a073bcdfd207778
5815d3cf68deed0eeb47746a83a9974b
计算邻接矩阵中任意两点的距离 返回-1代表两点间无通路连接 采用广度优先搜索(Breadth First Search)
public class ReachabiltyDag public int getDistance(int fromId, int toId) { int distance = reachabilityMatrix[fromId][toId]; if (fromId == toId) { return 0; } if (distance == -1) { int lowestValue = Integer.MAX_VALUE; for (int[] row : reachabilityMatrix...
0
05c9a256ebd9eb9a38bfa12038dc0d2e
4d62be3b7bc78e2df9fb27ee727631b7
An object representing a card that we can save in the challenge.
function Card(id, content) { this.value = content; this.id = id; }
1
cc9d1cb4a53b4e68b2c6a56694d80a78
96cc765c17c3fe10b0e1b85a904b7099
Performs asynchronous Sensorcore SDK operation and handles any exceptions
{ try { return Task.Run(async () => await operation()).Result; } catch (AggregateException ex) { throw ex.InnerException; } }
1
7c622bdd78a6e723a6b6a2e4055ca93b
a3e48f3ea5b830ac38b14165231b909d
Populate the data grid with information about engine with given name
class MarketPanel(wx.Panel): def Populate(self, ename): self._SetEvent(ename) self.lst.SetEvent(ename) self.mmodel.Update(ename) self.Layout() self.lst.Layout()
1
537addfd7d79143113a6671f1312274e
d6999f3323597fbf1ce3e70d4f4ec7c8
! Sets the QBrush used when drawing the polygonal item to the brush \a b. \sa setPen(), brush(), drawShape()
void QCPLegend::setBrush(const QBrush &brush) { mBrush = brush; }
1
761acabb28451f629148379831b47b77
bd83fa8f005be2ab3499419ed46b17ae
Convenience function to post an OS model.
try: model = kate6ModelPost(**request.get_json()) result = kate6Service(authcontext['context'])\ .save(model) response = kate6ModelPostResponse() for key in response.properties: response[key] = result[key] return (respon...
1