query_id
string
corpus_id
string
query
string
code
string
label
int64
348eb9cf03febbd667774edf7fb5ecf4
ab3ac9ae293e88556a86ba522d05f5d6
State Attributes: non-creatable, non-modifiable Possible values: <ul> <li> "initial" - Initializing, <li> "queued" - Queued, <li> "running" - Running, <li> "waiting" - Waiting For Another Job, <li> "pausing" - Entering Paused State, <li> "paused" - Paused, <li> "quitting" ...
class GetJobResult: def current_state(self) -> str: return pulumi.get(self, "current_state")
1
05b659da474c578bce988c3c82feccf6
6a933c5475994a4160c4b41355b38527
Determines whether a range is contained by a specified multirange.
namespace Kudu.Client private bool RangeContains(byte[] value) { return (Lower == null || Compare(Column, value, Lower) >= 0) && (Upper == null || Compare(Column, value, Upper) < 0); }
0
64101d512fc8d002fa98a53c6e09e28b
1778228c627e02898e4e0909a0c9fa6e
Check integer division which is now a method call rather than the symbol "\".
class NumericExpression(Expression): def __truediv__(self, other): return self._bin_op_numeric("/", other, self._div_ret_type_f)
0
bd19bb36b4a471e875de8edc47e2c8db
c914611a452cdb8dc85c3a2d5d5d376c
Gets the Page Repository
class ContentElementService implements SingletonInterface protected function getPageRepository() { return $GLOBALS['TSFE']->sys_page; }
1
db2846de513ded8b3a1f570aa4d34d0f
9e5b7a1ec3f90c5b82fc846fba51e9ce
Send Notification on Rotation Pkg Status Changed from Comp to NC
class NewsRouter(object): def rotate_w(self): mpp_chip_cc.Router_news_w(self._router)
0
7e00bc3625892564b88b669ac7cee5b6
8c750a47121857baa144d6fbb8638666
Конверсия UDP пакета DT контроллера Удаляет нулевые байты используемые контроллером после кажого символа и в конце строки
def TrimRxData(rxData): start = rxData.find(DTProtocolRxStartStr) firstTrim = rxData[start + len(DTProtocolRxStartStr):] return firstTrim[:firstTrim.find(DTProtocolRxEndStr)]
0
975ae6acd27b3bedf3073b4ad469b468
359ad078ca13235b4307f2d7d70476aa
根据流程定义的ID来返回流程图片的流
public InputStream findImageInputStream(String processDefinitionKey);
1
80fe29313feb309b854941f7b5d88162
e2e7b1ceaa4d2ca37c06602bcb5ef11d
Successfully update a node as a normal user
login_details = { "username": "Admin", "password": "testAdmin" } response = self.client.post('/api/v2/auth/login', content_type='application/json', json=login_details) msg = json.loa...
0
22140049de6c234ef3783189de3de690
4cce402f278924ae2302b6a91c10cb7c
update the cell's row and column span.
{ rowSpan = GetRowSpan(item); columnSpan = GetColumnSpan(item); if (columnSpan <= 0) { columnSpan = 1; } if (rowSpan <= 0) { rowSpan = 1; } }
1
5697a9ff51be315e99f00c6239e2f478
f411357d2a991085fe6102cbeb7da0b1
构造黑猫的函数
function BlackChess(x,y,r) { this.r=r; this.status = true; var rannum = parseInt(12*Math.random())%12; if(rannum <= 2) { this.y = 100; this.x = 650+rannum*70+10; this.direction = 2; } else if(rannum >2 && rannum <= 5) { this.x = 1000-50; this.y = 350+(rannum%3)*70+10; ...
0
425b63ce336899204e90645003a3fcee
22fc05b507324625d361a31a1db48608
Attempts a "best guess" at the direction of the minecart. If the minecart is moving, it will return the correct direction, but if it's stopped, it will use the value stored in memory.
{ CellDirection result = CellDirection.Null; if (me == CarMotions.LeftToRight) result = CellDirection.Right; if (me == CarMotions.RightToLeft) result = CellDirection.Left; if (me == CarMotions.FrontToBack) result = CellDirection.Next; if (me == CarMotions.BackToFront) result ...
0
7964ae0818a1f9ba3b715aafcbb0d98e
700ee6cdc5ba2c69acf21ff22accdea1
产生number大小的A~Z的字符串
{ $a = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; $rand_str = ''; while(strlen($rand_str)<$num){ $rand_str .= $a[rand(0,strlen($a)-1)]; } return $rand_str; }
1
6b7f79cf3af5c17a0c10969bb812e07f
17eda442711ff16a1d45ce525212575b
Methode permettant de gérer l'appel ajax en fonction des différents choix de filtres
$tabPaths = array(); if (!empty($_POST)) { if ($_POST['categorie'] == 'all') { $tabImages = $this->model->getAll(); } elseif ($_POST['categorie'] == 'Arts') { $tabImages = $this->model->getListCate(1); } elseif ($_POST['categorie'] == 'Animaux - Vie Sauvage') { $tabImages = $this->model->getLis...
1
d61074c5bc11026a81e7d02cb9c7c933
7e56e2612059aa07672499037de17daa
Raw method for converting Observed (observer specific) -> Galactic coordinates
public class SkyCoordinates extends SkyCoordinatesData implements SummaryTableRow public void convertToGalactic() { convertToSystem(SYSTEM_GALACTIC); }
1
105e7d65b1500ebfd00a94d2a7127f52
33342421b3acc31af4ebebe554c6b65a
@brief Respond to the 'execute' request of OneNET OneNet LwM2M basic function,respond to the execute request of OneNET On error, return an error code.
public class RTObject_impl extends DataFlowComponentPOA protected ReturnCode_t onExecute(int ec_id) { rtcout.println(Logbuf.TRACE, "RTObject_impl.onExecute(" + ec_id + ")"); return ReturnCode_t.RTC_OK; }
0
6f613822657e4ef3ff9a78a97f3ea0f6
33303c3de5f8d5947648efbbe7223bc9
Writes an unsigned 16-bit integer value to the [WorldPacket].
{ Span<byte> bytes = stackalloc byte[sizeof(ushort)]; BinaryPrimitives.WriteUInt16LittleEndian(bytes, value); Write(offset, sizeof(ushort), bytes); }
1
aaaa7b2986721786d919614538f4ff57
0dd1ad987de014f7d666555bf0ec4db1
添加获取游戏服务器ping值监听
export default class NetUtil{ startHearbeat(){ this.sio.on('game_pong',()=>{ this.lastRecieveTime = Date.now(); this.delayMS = this.lastRecieveTime - this.lastSendTime; }); this.lastRecieveTime = Date.now(); if(!this.isPinging){ this.isPinging = true; ...
1
d1913a15432bb55536f4c4d97de07043
58e97077a5f34139eb8f4fc18efa0abd
Specifies whether an element with a printRepeatedValues attribute set to true should be redisplayed for every new page or column that is not an overflow from a previous page or column.
public abstract class XBaseSlideNumber extends XContentObject public void setDisplayPrint(Boolean value){ _displayPrint = value; }
0
f4942c993f37faf6f8748a59b47c6464
0fdf813b01aef8e40ca87206a0c6c4e5
AAutomatedShootingEntity.setAI() Replaces the current ai with a new one
namespace BunnyQuest.ECS.Components class CmpAI : Component public void set_ai_type(string ai_type) { if (ai_type == "chasing") { is_patrolling = false; is_chasing = true; } else if (ai_type == "patrolling") { ...
0
4e35c95ae158c8956fbf0834e98ea47b
9b041c997a48633ff5fa7d46227e223c
Launch the order generation of active agreements.
class API(object): def active_orders(self, **params): return self.request_tapi(func_name="active_orders", params=params)
0
37207511c6908bde63092f1ef967a9d4
135700b6111830457024785832ecc1b8
Seuraa jotakin peliobjektia Y- eli pystysuunnassa.
namespace Jypeli public partial class GameObject public virtual void Move(Vector movement) { Position += movement; }
0
47c7a10299ff6f9709f1af4eb7ecadbf
06a0d35f71249a0a5dd4dead895c8e25
Returns the current User's PeerId
public class Torrent extends Thread public String getPeerID() { return localPeerID; }
1
d638f8a5a2b9d2a28a54c2e73300764c
4a1afd1353577c89842fa97c961d41d4
Can we parse input, create an optimiser instance, and run the tasks?
class BaseOptimizer(abc.ABC): def is_available(cls) -> bool: raise NotImplementedError()
0
61533857b4543fedbaba6bb641582af7
b404ec6863b39035734578dba79e6d0d
判断目标地址和参考地址的距离是否在误差范围内
{ bool rel = false; if (arg0 > arg1 - allowAbleErrorRange && arg0 < arg1 + allowAbleErrorRange) { rel = true; } return rel; }
1
efd8b0a1aa23ff4fdfeeceb5f368b429
a3363fc7cdeff2326e1671394eb33600
Try to discover and decode the wireserver endpoint in the specified dhcp leases path.
dhcp_server_leases_re = ( r'\n+(?P<expiry_time>[\S+\s*]{24})\s+(?P<mac_address>\S+)\s+' r'(?P<ip_address>\S+)\s+(?P<hostname>\S+)\s+(?P<client_id>\S+)' ) result = {} for re_result in re.finditer(dhcp_server_leases_re, raw_result): lease = re_result.groupdict() result[leas...
0
c2ba73e09120cffe7be76f780ad47bcf
373f70572f0668ac7b4e202d230a2ba7
GET: api/DetallePedido
namespace UAAEcommerce.Controllers [EnableCors("*", "*", "*")] public class PedidoDetallesController : ApiController public IQueryable<PedidoDetalle> GetPedidoDetalle() { return db.PedidoDetalle; }
1
66c2e2d2431456700e366b104e39877a
cd385cf1fff465ff41c0a2714bb8f1f8
Edita la informacion de un estudiante de la base de datos
{ global $conn; $data = $conn->query("UPDATE alumnos SET nombre = '$nombre', email = '$email', telefono = '$tel' WHERE id = $id"); }
1
123d028382a104c3251dd5805f315c23
e5f713cadf1c36adb58bcab9f6ef1fcb
Sanitize wrong nestings of json elements by adding missing closing parentheses (brackets & braces)
def fix_unclosed_brackets(value): s = value if re.search(r'\([^\)]*$', s): s = '{})'.format(s) if re.search(r'\[[^\]]*$', s): s = '{}]'.format(s) return s
1
d6b7cd0f5947bb9322dc303659f5d50b
b0c14ce14b98b5dfbae2d1f49bf84d41
7) Найти сумму всех четных и сумму всех нечетных элементов массива
public class Main12 public static void main(String[] args) { double[] mas1 = new double[] { 1, 3,3 , 35,1 , 88, 99 }; double sum = 0; for (int i = 2; i < mas1.length; i++) { if ((i == 2) || (i % 2 != 0)) { sum = sum + mas1[i]; System.out.print(mas1[i] + " "); } } System.out.println(); Sys...
0
7aad3a5f30ad480f62c765f9ff17489e
17158d794dbb2371f08bb583e54daa97
Recherche du minimal adjacent
public ICle rechercheMin();
0
af8634a015a3b9c82921950b136f07af
5cca91b4840377d5244d965f40005c24
function to calculate accuracy of our kNN model.
correct=0 count=len(y) for i in range(count): if pred_y[i].split('_')[0]==y[i].split('_')[0]: correct+=1 return correct/count
1
970fa5d1248562daa96d3ed0069bc8c7
2dbbde9c210a701a47b2434338a5419f
Delete a tag for a replenishmentPlan. (asynchronously) Deletes an existing replenishmentPlan tag using the specified data.
public class ServiceStageAsyncClient public AsyncInvoker<DeleteTagRequest, DeleteTagResponse> deleteTagAsyncInvoker(DeleteTagRequest request) { return new AsyncInvoker<DeleteTagRequest, DeleteTagResponse>(request, ServiceStageMeta.deleteTag, hcClient); }
1
46b6872d2a4660c95de147d9af9c76f1
24b19c283e30230cfbf22c3b12684767
Merge headers with override.
default_headers = {'Accept': 'text/json', 'Custom': 'foo'} self.mock_default_headers.return_value = default_headers context = RequestContext( self.auth_token, self.base_api_url, headers={'Custom': 'bar', 'Content': 'xml'}) self.assertEqual({'Accept': 'text/json', 'Custom': 'b...
1
953ee01c89edd99eb6ceb9d98f490416
6042f331d9e7ad6fcf9f9709b7f50147
! Constructs a QFSFileEngine.
documentWorker::documentWorker(QObject *parent) : QObject(parent), buildEngine(CDC_buildEngine::none) { fp = new configurationFileParser(); infp = new inputFileParser(); structure = new QStandardItemModel(); }
0
ef6110b0e08fd98637e6e1a89042e1e8
8128fc6566e7a6d8db05f103cd4748f4
UnsafeFirst returns the first substring of the length n. The behaviour of this function is not defined when asking for a substring longer than the input string.
runeIndex := 0 for idx := range s { if runeIndex == runeCount { return s[idx:] } runeIndex += 1 } return "" }
0
a4b2e768cf6543fddc4dd2eb8d1b7f44
188be4bfa47f7f905055d7f9293b7562
POST: ReceptionistController/Create
[ValidateAntiForgeryToken] public ActionResult Create(RepairPersonCreate model) { if (!ModelState.IsValid) { return View(model); } var service = CreateRepairPersonsService(); if (service.CreateRepairPerson(model)) ...
1
6244b6d15a421d960f5242b842286a58
ed24e9a45af62844d4c60de8979773a1
Find all using directive<br/> And try to load the namespace as assembly<br/> 寻找源代码中的所有using指令<br/> 并尝试加载命名空间对应的程序集<br/>
{ Console.WriteLine(AppDomain.CurrentDomain.BaseDirectory); DirectoryInfo dinfo = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); FileInfo[] dllfile = dinfo.GetFiles("*.dll"); Assembly assembly = Assembly.LoadFile(dllfile[0].FullName); Type[]...
0
4ec70031966d5f1e90138e4fc6133a7b
f3a3e5959c4b48b9b16710c38a722745
保存背景
modifyBackground({ commit, state }, image) { commit(types.SET_BING_STATUS, true) commit(types.SET_BING_INITAL, false) BingAPI.saveBackground(image) Setting.modify('bing', true) }
1
1728a217e15bbbc10478301f5daadf06
6a423896d21f787aa7331cd2a0e4cae3
Get task category system default association counts.
customerRelevanceTaskCountData() { return this.relevanceTaskCountData[TaskFieldNameMappingEnum.Customer]; }
0
1aacca5412de2e6f1ed83bb93b0efe74
e771bcbce581151938b5d442576d5e2a
Keydown event for dropdown list municipality
if(navigator.appName != "Microsoft Internet Explorer") var whichCode = e.which; else var whichCode = e.keyCode; if (whichCode == 0) return true; if (whichCode == 8) return true; if (whichCode == 9) return true; if (whichCode == 13) return true; if (f.value.length < 5) if ((whichCode >=...
0
c1801d26fadb0b1cd408dbbc2436cfb9
048f040b60b2135560c9d94b20520716
This example pings a destination.
def ping_test(how_many_pings=5, dest_host=config.active_config.source_ip): p = run_cmd('ping -c ', how_many_pings, ' ', dest_host, verbose=True) p.wait()
1
8e875e6c23f34264e8f0a9d4dde08162
70b81a076b5fe727a2944e35bbc8e01a
重试同步任务,部分可恢复报错情况下,可通过该接口重试同步任务,可通过查询同步任务信息接口DescribeSyncJobs,获取操作后状态。
try: params = request._serialize() headers = request.headers body = self.call("RecoverSyncJob", params, headers=headers) response = json.loads(body) model = models.RecoverSyncJobResponse() model._deserialize(response["Response"]) ...
1
1aee10315f8ba20612d666f4c22eccd5
6ccae17e5626606ebc1b1da9211e6142
Matches social security in the following format xxx-xx-xxxx where x is a number
namespace Utilities public class Validator public static bool SsnDashes(string str) { return str != null && new Regex("^[0-9]{3}-[0-9]{2}-[0-9]{4}$").IsMatch(str); }
1
0825e8e40f29b51c9d392680d9c26569
1ab57ac85e3b6fa4b548addf7bede9bf
Returns the value of the '<em><b>Receipts</b></em>' reference list. The list contents are of type {@link CIM.IEC61968.PaymentMetering.Receipt}. It is bidirectional and its opposite is '{@link CIM.IEC61968.PaymentMetering.Receipt#getCashierShift <em>Cashier Shift</em>}'. <!-- begin-user-doc --> <p> If the meaning of the...
EClass getReceipt();
0
50ebfd2924c5703513620a0bd7ec6701
326120dfea7e1f54901a72f2861d17f2
解析保存的资源数据
File file = new File(sResPath); String[] list = file.list(); if (!file.exists() || list == null || list.length == 0) { throw new IllegalStateException("resource dir not found or empty, call XmagicResParser.copyRes first."); } List<XmagicUIProperty<?>> beautyList = new...
1
e85390c94e18e51d6da5aff727b3a185
7041944ea6b084632d4bf36d57aaec37
Initializes DataPoint List Control.
{ m_wndTree.CreateControl(_T("NXDATALIST2.NxDataListCtrl.1"), "", WS_CHILD, CRect(0,0,0,0), this, IDC_TEMPLATE_TREE); if (m_wndTree.GetSafeHwnd()) { m_wndTree.ModifyStyleEx(WS_EX_NOPARENTNOTIFY, 0); } m_Tree = m_wndTree.GetControlUnknown(); m_Tree->IsComboBox = VARIANT_FALSE; m_Tree->AdoConnection = GetRemoteDa...
1
63fc14832a8f31348e9ee9f1ca553c8a
c794d0535f2a6808b578fca4cdca6c8f
結束模型,這裡會自動管理數據庫連接
class adminModel extends BaseModel public function __destruct() { parent::__destruct(); }
0
c72921c9780bb3f057494437259d384e
96bbc4806bbf3fd1faf22cb36fec5a03
Copy to another Probe instance. Note: device_channel_indices is not copied and electrode_ids is not copied
namespace DuetAPI.Machine public class Probe : ICloneable public object Clone() { return new Probe { Type = Type, Value = Value, SecondaryValues = (int[])SecondaryValues.Clone(), Threshold = Threshold, Sp...
1
6892d644306360a0f386ae782498f7e0
14405d3f85a72bf46fd79e05630a8098
Saves the finalized merged dataframe to specified or default output file.
class UpdateAlternativeName(): def save_model(self,dataframe): dataframe.to_csv(self.output_path,index=False) return True
1
40b23c2d6b66e879edcedcd7ae402fee
5262e1f5400489bd1cfd6f1f84922abc
Get all animation groups
List<Animation> getAnimations();
0
5d5939d689da52b2f0454ad8aee70a1a
c486a3b135b4001e7ffb59fa7062b6c4
Replace commas with points
class Client: def replaceWithCommas(self,s): splits = s.split(".") result = "" for split in splits: result = result + split + "," return result;
0
0119bdd63eb147dc5b74f7fe02d29d17
dc484d346cff0cade44027f7051ca715
Load the update form with the selected incident details and set the displayed view on the update incident view
incident = incident_service.get(db_session=db_session, incident_id=incident_id) type_options = [] for t in incident_type_service.get_all(db_session=db_session): type_options.append({"label": t.name, "value": t.name}) priority_options = [] for priority in incident_priority_service.get_all(db_...
1
3e54999d38b15e7561e4cb297ea44cb8
d3fbfb21a333b5a6816f102410f07caf
Creates a new Commodity model. If creation is successful, the browser will be redirected to the 'view' page.
namespace Agribusiness.Web.Controllers [UserOnly] public class CommodityController : ApplicationController public ActionResult Create() { var viewModel = CommodityViewModel.Create(Repository); return View(viewModel); }
0
d283d5ef45be8a4a536cd62f1e27959e
b239393c89dcc849391d9b0e9c31a794
Saves Final information for course date
def enters_the_final_data_about_course(course_data,chat_id): course_data.update({"id": get_uniq_id(category="courses"), "rating": "0", "creation_date": str(datetime.now().date()), "id_customer": chat_id}) add_new_course_for_customers(chat_id,course_data["id"]) return add_info(category="co...
1
51b066e019af84dd718ca82eb12e8d2c
c6b3c734421805ad981bd3b85897f31a
その式の終わりまで読み飛ばします。<br/> カンマでも式の終わりと判断することに注意しなければなりません。
while (cursor != end && (expr[cursor] != '\n' && expr[cursor] != '\r' && expr[cursor] != ';')) { cursor++; } }
0
784db142e7cc3664e1280acdee0e0efc
f84cad2d50d7195b6eccb152e0a017b9
Returns the destinatario of this richieste utenza.
public abstract class Message implements Serializable public String getUserDest() { return userDest; }
1
c9a91dade45516b676b29234af7e8475
232be9ae207b5dadec4aef531d513c99
检测是否包含图片
class Goods extends Model public function _hasImages($photoArr) { foreach ($photoArr as $k => $v) { if ($v) { return true; } } return false; }
1
f95bb38931659d7a673d4a74616e8866
2bb11b18ffbcf858b9c064d6a29ffbf2
Add a visualization callback to print/show the cost values and constraint violations at each iteration
{ return IsInitialized && IpoptAdapter.SetIntermediateCallback( m_problem, m_intermediate_cb = new IntermediateReporter(intermediate_cb).Report) == IpoptBoolType.True; }
1
62f8a8e20d03835fb846c1e03058cccb
f268a7e74922f93e3a8cdfb2ce1b8f6d
嵌入式
def Embedded(subcon): return Reconfig(subcon.name, subcon, subcon.FLAG_EMBED)
1
a5668805bf1b17c9c71143e073803c05
af1f1249441b0747f9a5a94f55033a02
Test case for getMeasurements Get measurements for this user.
class TestMeasurablesApi(unittest.TestCase): def test_getmeasurables(self): pass
0
4cf6f6d823ca83b4a886eaf8294fbf91
59c89a87206cf5b2bfc475be8458109f
Formats numbers for LateX.
def fmt(x, pos): if abs(x) > 1e4 or (abs(x) < 1e-2 and abs(x) > 0): a, b = f"{x:.2e}".split("e") b = int(b) return fr"${a} \cdot 10^{{{b}}}$" elif abs(x) > 1e2 or (float(abs(x))).is_integer(): return fr"${int(x):d}$" elif abs(x) > 1e1: return fr"${x:.1f}$" elif ab...
1
afa9a80dfe93cfbf14efdf128d0f3300
060ec913d4882d1b22c71d600da6aa4a
This will re-init the cached schedulers on the next usage, which can be useful in testing.
function updateSchedulerEvents() { nw.App.clearCache(); }
1
a14dadb5f00a607c52063f00ea2ce4a5
422a5cc6a571850a1e41ec5c830f9068
<pre> When this rule is matched, the request is redirected to a URL specified by urlRedirect. If urlRedirect is specified, service or routeAction must not be set. Not supported when the URL map is bound to a target gRPC proxy. </pre> <code>optional .google.cloud.compute.v1.HttpRedirectAction url_redirect = 405147820;</...
public final class HttpRouteRule extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.compute.v1.HttpRouteRule) HttpRouteRuleOrBuilder public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder> im...
1
ee8809d7e315d552c0cb9f969eae0d8f
f4c6a231923a7a206bfa6e22194aa8f7
Releaes the baton and removes its file.
class File(object): def release(self, ctx=None): pass
0
c095d56f89fa93fad774dcc35b7df805
34e54d979c81429e539782a26f13a334
Finds the shortest distance between the two boxes. Returns 0 if the boxes are overlapping, or if one box is inside another box.
left = self.lower_right.x < r2.upper_left.x right = self.upper_left.x < r2.lower_right.x bottom = self.upper_left.y < r2.lower_right.y top = self.lower_right.y < r2.upper_left.y if top and left: return Coordinate(r2.upper_left.x, self.lower_right.y).euclidian_distance...
1
4552aadf97b5f509b2abee4dbe057e8e
7a4655c1af91c178d9d7b5312c7518d2
Deserializes the the specified source to an object of the specified target type.
namespace Librame.Extensions.Core.Serializers TSource Deserialize(TTarget target);
1
6e7d1c447a4300052520f5c812fe1a53
d5b4f54a16296985cd2a3bd82a1de0e0
@brief Device mode state callback. Registers a callback routine that is notified when the device mode changes.
{ if ( appCallbacks ) { PAppCBs = appCallbacks; return ( SUCCESS ); } else { return ( bleAlreadyInRequestedMode ); } }
0
a8804daad54f75a2492b1e9cd6215ddc
80d0b5bfbd1c37e69f167056378497f0
从target数组中随机去一个,并删除,将此值作为target值传给对象
function random(target) { return target[Math.floor(Math.random() * target.length)]; }
0
24e8f2ba6d75187328c876061e9c7dfb
bcff430d767185508e7995942a91c36c
根据groupId获取GroupUser对象
public List<User> getByGroupId(Long groupId);
0
bdb28104df3e6c98e8d088b9a8c2e3f6
bfedc33effbdc782d8c6acb8327c4309
Deletes all the reminders in the db
public class RemindersDbAdapter public boolean deleteAllReminders() { return mDb.delete(DATABASE_TABLE, null, null) > 0; }
1
8e7fab0f2c30d04a113c479d395e06b8
a94880a60b96244373c61c9ba5a974fa
Calls the API to log the user out and returns the user to the login page
function callLogOut() { return client.call(ENDPOINTS.USER_LOGOUT, { method: 'GET', }) }
1
bff7f7c563e6be6f8e4b9f9b502936d8
abc74f02ee9926cc2c4614c68b3984d0
Run a data flow problem.
if not session: session = CFG.start_session(self.path.stem) if task: session['diagnostics'] = task with log_to_dir(session.run_dir): self._load(session=session) self._engine.run() return self.get_output()
1
e63f31cab16507861d55d421cb2249c8
3c885e7a25a1ab91662e235de4a689a3
Gets an array of argument files to lint.
{ return array( array('include', InputArgument::IS_ARRAY, 'Include file(s) before starting tinker'), ); }
0
6ef59fe4973290171dc44b313329b831
a4e8b4d3aa75c991f75694bd793253fa
Gets the qualityUpdatesPauseStartDate property value. The Quality Updates Pause start date. This value is the time when the admin paused or extended the pause for the ring. Returned by default. Query parameters are not supported. This property is read-only.
class WindowsUpdateForBusinessConfiguration def feature_updates_pause_expiry_date_time return @feature_updates_pause_expiry_date_time end
0
a88f3cc3e1cbe7baca597128185dca9b
889bb0a1d8528ef91823efbebbbf76a0
Projectiles are instantiated with a sound.
public class ProjectileController : MonoBehaviour void Start() { ballShootSource = AudioHelper.CreateAudioSource(gameObject, ballShoot); }
1
5d0c67bb609127df1f0b4eba9334f969
95b497fa815f96f9ebb71b3564dab6aa
由右向左滑动屏幕,滑动屏幕上方1/4处,如需滑动其他位置,需重新封装
class swipeScreen(): def swipeScreen_Right(self): driver = self.driver x = driver.get_window_size()['width'] y = driver.get_window_size()['height'] sleep(4) x1 = int (x * 0.25) x2 = int (x * 0.75) y1 = int (y * 0.5) driver.swipe(x1, y1, x2, y1, 1000)...
0
e556f6803f04837d0f1fd405e22bf88b
c85b0dd57a3bbba2304663da1106b3a8
Fired when ports on a switch change (any change to the collection of OFPhysicalPorts and/or to a particular port). Does nothing.
public class DHCPSwitchFlowSetter implements IFloodlightModule, IOFSwitchListener @Override public void removedSwitch(IOFSwitch sw) { }
0
99b7ce28f3e1a42948daa239689ad676
b533c51800ee665e598590b3c34882f7
Sets Spanish Title of CLASS CHAPTER
class Chapter function setSpanishTitle($aSpanishTitle) { $this->spanishTitle = $aSpanishTitle; }
1
05b8d3ae74df2b467d1e9f8fadca42bc
ee60d1324d0e11689c468a6c6d83fcf9
Ensure we can't create a person with a bad permission.
class TestPerson(TestBase): def test_1185_regression(self): manager = Person.objects.create_user( username='manager', personal='Manager', family='Manager', email='manager@example.org', password='manager') can_change_person = Permission.objects.get(codename='change_person') ...
0
d8a561912fef5a940c4e3b12ca7349a7
55539d2646d50456adf2e3a0f77520d1
根据产品ID和显示终端类型查询产品库包装信息
public List<ProductLibraryDetail> getByPidAndType(String productId,String terminalType)throws DBOPException;
1
4d6b8156be8a436b69e183f9627dc43c
e0af95547c589cafb77d2b583fea8d55
Add Zend Framework file validators. Emulates the way Zend Framework adds validators.
public function loadValidators();
0
705ba5be789ca88d5789071754e68213
d719d2bd1128b4eb7b4bac9da0ba8ab6
只更新错题和收藏集合,用于错题练习
public class ExerciseContentFragment extends BaseFragment implements View.OnClickListener @Override public void onPause() { if (data != null && data.getStatus() == 200) { data.setCurType(curQuestionType); data.setCurIndexSingle(curIndexSingle); data.setCurIndexMultiple(cu...
0
637cb3178f45184084d44afcd4dbd16b
c1d8e06f74de299b49cdc68a117a69f0
Set the filename and the path to that file.
class DccFileReceive: def set_filename(self, filename): self.filename = filename
0
b49569aa79785b22f0640a04563033d7
bedce86e1c1f1036beac68d470993c04
Returns pandas DataFrame of last year passthrough gifts
def Carga_pasto_2003(): return pd.read_csv("c:/Users/sebastian/Desktop/2021/Electiva Datos/Proyecto de la materia/Datos/pasto 2003.csv", sep=';', index_col=0)
0
ce77cadb61a7f1e0e4e89ef23aec2609
72c83534d9d8211e96fc64b19dffb8a6
Enables the beam, spark fx and set their positions.
{ lineRenderer.enabled = true; lineRenderer.startWidth = fBeamWidth; lineRenderer.endWidth = fBeamWidth; laserSight.EnableLaser(false); Vector2 direction = tFirePoint.rotation * Vector2.up; if (playerController.FacingLeft) { direction *= -1; ...
1
589970325702eedffc519520a799a46e
de38d1d0760b5f75d5a8a04d804339c1
产品合成
public class AssembleReqManager private ArrayList<com.neusoft.preaccept.model.datamodel.mobilePreSub.Product> AssembleProduct(MobilePreSub info) { ArrayList<com.neusoft.preaccept.model.datamodel.mobilePreSub.Product> productArr = new ArrayList<>(); com.neusoft.preaccept.model.datamodel.mobilePreSub.Prod...
1
9513a413432b073b11f18c4a51ce2b11
95b6eaf434207bfc4fbf369e164d52bd
se limita la posibilidad de escribir a 16 caracteres
public void keyTyped(KeyEvent e) { if (minutosTextField.getText().length() >= 2 ) e.consume(); }
0
9658458162ef0069a1fb1902d6761885
321400e7ce0df5bef7479d011c3f6a61
Count the number of relationships in the database.
class RelationshipMatch(object): def __len__(self): return self.graph.evaluate(*self._query_and_parameters(count=True))
1
65e69c5046fc3aece6281bcabbee3161
e8a35e3d9876f4f02eb46481f46ef3a9
Getters for the max dimensions of the walking area.
{ $this->options['maxWalkingDistanceDep'] = $originDistance; $this->options['maxWalkingDistanceDest'] = $destinationDistance; return $this; }
0
8ace77cdf9084ad8ff029f8b83f49e0e
9ca5367c8ef165b926dcc9bddc07ade9
and output the correct C++ type/typedef decleration.
class CWriter(PSyIRVisitor): def gen_declaration(self, symbol): code = "" try: intrinsic = symbol.datatype.intrinsic code = code + TYPE_MAP_TO_C[intrinsic] + " " except (AttributeError, KeyError): raise NotImplementedError( "Could not generate ...
0
41673586e40be96a5f1ffd43b6b78de9
88c04f9c2ae3669758deb12cff4ed723
Checks if an image is a single slice image.
first_header = pydicom.read_file(slice_paths[0]) last_header = pydicom.read_file(slice_paths[-1]) first_image_orientation1 = np.array(first_header.ImageOrientationPatient)[0:3] first_image_orientation2 = np.array(first_header.ImageOrientationPatient)[3:6] first_image_position = np.array(first_header...
0
c0338bbfbe3dfa03cd5787ee400437e1
0e95a96749c10f9f2b5f964bbdb400f7
Function used to handle the data stream. Send the initiate command, waits for data to become available and then compiles the stream into correct data packets. Continues while 'stream_open' is true, throws a a disconnect event if no data read for two seconds.
{ uint16_t block_num; std::string response; opcode opc; next_block = 0; std::vector<std::string> blocks; do { response = communicator.receiveData(timeout, block_size); if (response.empty()) { communicator.resendLast(); continue; } opc = this->parseOpcode(response); switch (opc) { case opcode::AC...
0
e3d43e4f300493b07943beb1f1108a3d
aa153eb0016b039ce8d4cbcd7fde3492
Carga las obras del archivo. Por cada obra se indica al modelo que debe adicionarla al catalogo.
file = cf.data_dir + 'Artworks-utf8-5pct.csv' input_file = csv.DictReader(open(file, encoding='utf-8')) for obra in input_file: model.addObra(catalog, obra)
1
3a99681f300e575fc6ea669cfe6aa4e3
1e980f91181b83c8f601f54d711399b9
Tests RequestInterface::getRequestTarget.
class SearchByLabelRequestTest extends TestCase public function testEndpoint() { $request = new SearchByLabelRequest('FooBar'); $this->assertEquals('services?label=FooBar', $request->getRequestTarget()); }
1
f0fbf709fa685eb84679bbe3d038096e
0b966afaf7daa426bf9446d6f2dc1e39
Apply the device pixel ratio.
export class ViewportConfig public static matchDevice():void { this.initialScale = this.pixelRatioScale; }
1
a9d28611d332a82164553c45567c3292
da6e4d83342f370f9a74648dbcd45777
(Boolean) Display all faces as shades in the 3D view and UV editor
class ToolSettings(bpy_struct): def show_uv_local_view(self): return bool()
0
b8b194f5eb78a66360f36708343f1a0f
ada3430fe58bf2e9621f09cb28afa49f
测试链上的出块间隔
w3 = self.w3_list[0] blocknumber = w3.eth.blockNumber blockinfo = w3.eth.getBlock(blocknumber) for w in self.w3_list[1:-1]: info = w3.eth.getBlock(blocknumber) assert blockinfo == info, "不同节点的相同块高信息不一致"
0
17bdad8f0125c6210e8a0896432c5269
1c6a9ba5d5cebc80aab9150ee6202f40
جستجوی یک متن در آرشیوهای یک کلاس خاص
public class Classes public static List<String> findClassesInArchive(File f) { return findClassesInArchive(f, null); }
0
8f91049d91cfb8ad4122f01acf164c20
a38ca969ac469ba5a7050bb48f4784e1
Returns everything after the last occurence of the provided character in source.
public static class StringUtils public static string FromLast(this string s, char c) { int lastIndex = s.LastIndexOf(c); if (lastIndex == -1) { return s; } return s.Substring(lastIndex+1); }
1
b031203c3580363afe73a843b855b663
46b3dfeb881d611937dc3c7c52af12a0
Clip the edge with a face
class Attach3D: def setEdge(self, edgeIdx): self._setEdgeOnly(edgeIdx) for vertexIdx in self._edgeMan.getLowDimFacesContained(edgeIdx): self._setVertexOnly(vertexIdx)
0