query_id
string
corpus_id
string
query
string
code
string
label
int64
13785488135304f99bc07fc8c6c37386
eff77cd494d788571e2150a58fe8b01d
根据业务ID查询已办数据
Map<String, Object> queryBusiByBusId(Map<String, Object> params);
1
392411e568716d7ca244b998258a4f14
97dc6ffb7708743099ee758492748777
EntityManager의 변경을 Transaction을 이용하여 DB에 적용합니다.
@Stateless public abstract class AbstractManagerBean<T extends AbstractEntity> implements Serializable public void flush() { em.flush(); }
0
9abc8d042de98a73f202ef68c828143c
6f13bdf6a41416b6373d1d408d8193ec
Add selected field to cursor pos in editor
{ if (e.RowIndex < 0 || e.RowIndex > dgvFields.Rows.Count - 1) return; rtbExpression.SelectedText = "[" + dgvFields.Rows[e.RowIndex].Cells[dgvcName.Name].Value + "]"; }
1
0544355607d578966d1e010951dcf4fb
23f056b5ebf46c65288988766e908c59
Test not well formed reciprocate payload
uint8_t data[] = { 0x40, 0x00, 0x00, 0x00, }; CU_ASSERT_EQUAL(coap_parse_message(&coap_pkt, data, sizeof(data)), NO_ERROR) }
0
b712e14ca520c93144b9f0ea83eafb38
d4b2f3f03c60a220258a805c8d59bee5
Generates a name for an unknown bit in the form UNK_{byte}_{bit}, where the byte and bit values are one-based.
if (bit_width == 0) return ""; if (bit_width == 1) return data + vcd_name; return std::string("b") + strip_leading_bits(data.c_str()) + " " + vcd_name; }
0
e956706a88e4a102e306ad6d6edbb0e8
4493569014800f1a58a995aa6887d5a7
On button click, gets the information you typed into the prompts. Makes the credentials box section invisible again.
{ if (userName.Text.Length != 0 && passWord.Text.Length != 0) { if (Credentials.Check(userName.Text, passWord.Text) == true) { DialogResult = DialogResult.OK; } else { ...
0
28731003e744838896ddee80cb03f3c3
e8e0ee4b7fff70732f31f7a478ff5ab1
Deze functie wordt aangeroepen om het hele, onthulde, veld te printen.
class Field: def show_field(self): i = 0 f = "" for p in self.FIELD: if i == self.x: f += "\n" i = 0 if len(self.FIELD[p]['r']) == 0 and len(self.FIELD[p]['w']) == 0: f += "-\t" else: if len(self....
1
a58f4fb75f70bb37f278d405bf7659bc
3c777a0bdb19701c78b45e7d6b858b28
指定した点から、角度と距離を入力すると新点を出す計算(極座標計算)
var dx = distance * 1000 * Math.sin(Deg2rad(angle)) var dy = distance * 1000 * Math.cos(Deg2rad(angle)) var bjd = ((dx / A.Ed + A.m_RadLo) * 180.0) / Math.PI var bwd = ((dy / A.Ec + A.m_RadLa) * 180.0) / Math.PI return new MyLatLng(bjd, bwd) }
1
e27c7b3b5de444ba93cea3740302d56a
eb67127d1f2af86be32b1a5497e4ec87
Updates GUI's variables holding information about the last received recovery packet.
class Gui(QtGui.QWidget): def updatePackets(self, unpackedInfo): self.packetEditText.append(unpackedInfo)
0
2d1991ebccdfdfb14085ad50040fba7e
7f7aa02f03d639cc225df0d082567e43
Checks whether two line segments intersect.
double dX1 = segment1.To.X - segment1.From.X; double dY1 = segment1.To.Y - segment1.From.Y; double dX2 = segment2.To.X - segment2.From.X; double dY2 = segment2.To.Y - segment2.From.Y; if (dX1.DEquals(0)) { dX1 += EqualsEpsilon * EqualsEpsilon; ...
1
1c6f497f554ca4866bc8aa2ee383e95b
b4ef3e6e5b2695210ae181e37decdab6
Get Nelson-Aalen estimator of risk See: www.med.mcgill.ca/epidemiology/hanley/material/ ... NelsonAalenEstimator.pdf
x, y = np.atleast_1d(x), np.atleast_1d(y) assert len(x) == len(y) r = np.empty(len(y)) r1 = np.empty(len(y)) r2 = np.empty(len(y)) for i, t in enumerate(x): inds = (x >= t - 0.5 * dt) * (x <= t + 0.5 * dt) r[i] = np.nanmean(y[inds]) for i, ...
0
edcc04630f94a576f8dfba02d8c4e434
36f18ddc0721bb91e015f345474d36f3
Initiate pastebin scraper
begin username = credentials[:username] || nil password = credentials[:password] || nil heap = Refheap::Paste.new(username, password) input = File.open("#{@home}/#{@script_filename}").read language = Linguist::FileBlob.new("#{@home}/#{@script_filename}").language.name paste = "In...
0
77033188311f9ebed89dbab95efa8956
f36dfa48d9236e6aef6e562127e1834a
Устанавливает ФИО отправителя
class Base_Mailer{ public function setFromName($from_name) { $this->from_name = $from_name; }
1
cefaddf0ce5fd745f923002d7e564a0e
b14e45020d8894f829fad77602f91a8c
获取真实的评价分数
dist = self.__getScoreAndDist(movieID, subRemarkMat, ratedIndex) score = self.__scorePredict(self.remarks[userID], dist, ratedIndex) return score
0
14ee58ff8d16e844154b0f5ac4f0cff1
65b5b50c789038e49cc36ef858157c9e
Delete an input for a stream analytics job.
namespace Microsoft.Azure.PowerShell.Cmdlets.StreamAnalytics public partial class StreamAnalytics public async global::System.Threading.Tasks.Task StreamingJobsDelete(string subscriptionId, string resourceGroupName, string jobName, global::System.Func<global::System.Net.Http.HttpResponseMessage, global::System.Thre...
0
48ea74f85ac229cfb2fc87db7f261517
e1c46bf1ccc0fc6a5deb8208910c5cc4
随机获取下一个树结构
public class MarsNode public MarsNode randomOneMarsNode() { if (childrenNodes.isEmpty()) { return null; } List<MarsNode> childrens = getAllChildren(); int p = random.nextInt(childrens.size()); return childrens.get(p); }
1
f8b7493415efb412e249847a22901c5a
d61d36a826f8c9b0315c79ecaa038c9c
显示一个弹出窗口,不刷新转向上一页
namespace ADeeWu.HuoBi3J.Libary public class WebUtility public static void ShowAndGoBack(System.Web.UI.Page page, string msg) { page.ClientScript.RegisterStartupScript(page.GetType(), NewScriptName(), GetAlertScript(msg) + "history.back();", true); }
1
a4c00ad33def81268ff0e869b7cef993
c13f23c9e45856e1e2ef5e7a062f60f9
Si pierde el foco y el campo está vacío, se rellena con el texto por defecto.
public class ValidationBox extends JTextField implements FocusListener @Override public void focusLost(FocusEvent f) { if (this.getText().equals("")) { this.setText(DEFAULT_TEXT); this.setBackground(Color.white); } }
1
f083a7f3dc42f523204343d43ca8a8c2
96747e4a527467951fb41199ef1b0ec2
@brief 获取分区剩余空间大小(字节数)
static uint32_t Get_Partition_Size(const char *Partition_Name) { return Flash_Port_Get_Partition_Size(Partition_Name); }
0
dbedbd71f855894667903d7c72ed85b4
d6f4eb1c6c3202ea628787dc5c66dcbb
Destroys the current minigame.
{ if (won) { _rigidbody.useGravity = false; _rigidbody.velocity = Vector3.zero; } PillarController.Stop(); _done = true; MinigameManager.Instance.EndGame(won, _score); }
0
acbea8b2274f8d2d6cc88a242e56e956
f82ce5c5d7ec9950790e9bf40f79a76c
get pages as a set of their ids for faster lookup
namespace OneNotePageSearcher internal class OneNoteManager public HashSet<String> GetAllPageId() { return new HashSet<string>(pageMetaInfo.Keys.ToArray()); }
1
1e4f739ac256189f097b6305a37d1641
c0ada7e3af6ec50f6430ff7f98532e8e
メール本文にフッタを追加する
class MailManager def send_mail_withfooter(addr, subject, msg) msg += MailManager.footer send_mail(addr, subject, msg) end
1
752d0babc934b88665b0dd66559bbb06
81764c8d0d3f5404a603963c46fa4b6d
Default value for the task_id member.
class NotificationRuleBase(object): def task_id(self, task_id): self._task_id = task_id
0
9ca07c632793f082801c7f93e3775d8a
e3e11b81d06a7cbe59fdbe7b4e9b74ff
Similar to RequestProcessor.readGetResponse(), but ignores the last "END\r\n" line, and returns the StringBuilder instead of the String, to make it simpler to assemble the responses for a sharded multi-get request. response format: 0 or more items, then "END\r\n" (which is discarded in this method) item format: VALUE <...
namespace Qaits.MailConnector internal class SimpleIMAPClient : SimpleEmailClient protected override void ParseLastResponse(MemoryStream pResponseStream, bool pSLReponse) { if (!pSLReponse) { pResponseStream.Seek(0, SeekOrigin.Begin); StreamReader resp...
0
9c44155ad27bfc8783fe386accd750ed
6ca5a4528e483ab91a30264dfcbb9916
在baseMetada添加前触发,可以对将要添加的baseMetada、以及所属的DomainMetadata进行操作
if (!layer.metadata) { layer.metadata = { isBaseMap: false, }; } super.addLayer(layer, beforeId); }
0
5c337cf187fd8fd0eea18899a89b1e8e
4f5ebcd5575649030810f9ccd1497f44
进行空闲状态下的GPIO输入操作
int gpio_get_input() { int value; value = get_gpio_value(4, 27); printf("DI1 = %d\n", value); value = get_gpio_value(4, 0); printf("DI2 = %d\n", value); value = get_gpio_value(4, 28); printf("DI3 = %d\n", value); value = get_gpio_value(4, 1); printf("DI4 = %d\n", value); return 0; }
1
bf1bfbbd60007588b091b56111326ad1
80a4dd29854e1c192775017382b0ac8d
Gets the value of the departureLocation property. possible object is {@link Ferry.DepartureLocation }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "EditActionSegmentDescriptionType", propOrder = { "priceLevelCode", "existing", "consumerEditActionOptionDescriptions", "editActionPlacementDescriptions", "departureLocation", "arrivalLocation", "departureDateTime", "arrivalDateTime",...
1
85b48480d01affd75eb69d1a65192278
fee493a1434df0288396f426f51befe9
Convert schema primitives to nearest JS equivalent
export class PrimitiveConverter implements types.TypeConverter public reflect( reflectedType: tsruntimeTypes.ReflectedType ): string | number | boolean | symbol { return PrimitiveConverter.MAPPINGS[reflectedType.kind]; }
1
a2004e87c9f71ca1ae55911114e59e26
a073f81b2ebd33e429961c50c8c26f89
Wrap the request factory with a BufferingClientHttpRequestFactory so that the error handler can do repeat reads on the response.getBody()
@Configuration @AutoConfigureBefore(InstanceLogsConfiguration.class) public class IntegrationTestConfig @Bean public ClientHttpRequestFactory instanceLogsRequestFactory() { return new SimpleClientHttpRequestFactory(); }
0
65a3641bf9598fa99976a85149689ea5
5b8ab42842ef9ae0bde7556ab8513042
Method provided to jump to a locus synchronously. Used for port command options
void menu_input_class::locJump() { cout << "To locJump" << endl; dialogLocJump* dialog = new dialogLocJump(this); dialog->setWindowTitle("Read Location/Jump To Location"); dialog->register_coord_system(gps_calc); dialog->show(); }
0
b526e97d316bab7268b975e355cf6e82
af132322ff397dbef0f12a27586d6023
Returns how many pages a given file has stored in the memory (as frames)
pages_lost = 0 memoryPages = ['void'] * int(frames) for page in input: if page not in memoryPages: pages_lost += 1 if 'void' in memoryPages: memoryPages.pop(0) memoryPages.append(page) else: memoryPages.pop(0) memoryPages.append(page) return pages_lost
0
c2c26e5cf46035557b5541be0f30a779
8a928bd19042de635b67d9a0a853d05e
Returns a {@code DD} whose value is {@code (this - y)}. <p>This computes the same result as {@link #add(DD) add(-y)}. <p>The computed result is within 2 eps of the exact result where eps is 2<sup>-106</sup>.
public final class DD extends Number implements NativeOperators<DD>, Serializable public DD subtract(double y) { return add(-y); }
1
8de371c96902cc62dc65224a39188395
54b6ac8335d241c09fad2b470da60b03
Pre-concatenate this transform context with the given transform.
InternalTransform set(Transform other);
0
5c14ef759b54b41a4752e905c817c2f4
a474fd63fd44265b06dd8dd1ad831a9e
Finds indexes of the min element of two-dimensional array
List<int> mA2, List<int> mB2) { int i1 = 0; int j1 = 0; int m1 = 0; Tuple<int, int, int, int, int> a1; Tuple<int, int> t = new Tuple<int, int>(0,0); List<Tuple<int, int, int, int, int>> t1 = new List<Tuple<int, ...
0
490d487277235977a5667ea1cf60f334
582b2a347a4bdb224bc5c60ae186a6dc
Déploie ou replie le sélecteur
let $icon = $("#icon4selectorPanel"); let $panel = $("#selectorPanel"); if ($icon.attr("class") == "glyphicon glyphicon-chevron-down") { $panel.collapse('show'); $icon.attr("class", "glyphicon glyphicon-chevron-up"); } else { $panel.collapse('hide'); $icon.attr("class", "glyphicon glyphicon-chevron-down"); ...
1
e6fd8adcab9b96f0ca08e5740f3847fd
6fc9b46df74125bef9da4c626c21fdc6
Generates the first N prime numbers.
primes = generateNPrimes(10001) print("Count = ", len(primes)) print("Last = ", primes[-1])
1
a9b7df99680f7ff1215df54e2c92732c
f0c3e0d7a4f588f38c072b9d98f07a7a
This method is used to obtain the references for services exposed by project browser component and Java editor component.
public class AbstractOOConnection implements OOConnection, com.sun.star.lang.XEventListener public synchronized XComponentLoader getComponentLoader() { return (XComponentLoader) getService("com.sun.star.frame.Desktop", XComponentLoader.class); }
0
066766c8fd76a1e6fc181b4e7071afe6
05b7e800c79e7e58172d27a267c50558
Asigna los miembros en un listado a un diccionario.
def list_to_dict(listname, dictname): for key in listname: dictname[key] = ''
1
2e5bc1ce8c2c6371e11a8110457003e8
58b9b4ec1c361f0806fbbc4932995042
说 明: 测量温度、湿度 参 数: 无 返 回 值: 无
namespace KD_SWHT_7101 public class SensorMain : WSensor public override void OnMeasure() { mWriteBuffer[0] = 0x0; double temperature; { bool ret = Interface.comm.i2c.writeread(0x48, mWriteBuffer, mReadBuffer); if( ret == true ) { byte sflag = (byte) (mReadBuffer[0] & 0x80); int upperb...
1
115e605a9692acc1f6be89c72fc34bcc
ceaa733aa47be202e1da54af134ad785
字节数组转Opencv图片
{ if (bytes == null) { return null; } try { MemoryStream ms = new MemoryStream(bytes); Image outputImg = Image.FromStream(ms); return outputImg; } catch (Exception)...
0
e73256fa3d4bc939b78b55af07b179f2
02395dc80199b1b2bfeefa8ea136414c
Sets wether the action should fail on error.
void setFailonerror(Object value);
1
d4bdb220f08caaee1a7bdb784b6cfc95
1d4ed7ef7dd7aba2962a155f91dbd310
寻找最近的小偷
{ pthread_mutex_lock(&b->lock); while (b->thiefpos-b->policepos>=3) { pthread_cond_wait(&b->notempty, &b->lock); } b->thiefpos++; usleep(sleeptime); x=b->thiefpos; pthread_cond_signal(&b->notfull); pthread_mutex_unlock(&b->lock); return x; }
0
5d9ee0e199927c579f5164c98ffacf9e
8892a403599f97e64bfad853dd21fff4
根据铁塔资源Id获取铁塔资源
function getResourceById(resourceId) { return request({ url: '/saas-smart-village/resource/getResourceById', method: 'post', params: { resourceId } }) }
1
d2571d6fd2392f0feacaa44cc39d7fd4
a5556312bfb735fe035613e0b3355c0d
Проверка назначены ли ресурсы на заданного сотрудника
namespace GanttDll class HelperResource private bool IsRespUser(clTask strTask, InfoObject objResurce) { bool result = false; if (strTask.ResponsibleUser != null) { var userRes = strTask.ResponsibleUser.GetValue<InfoObject>("WorkingResource"); ...
1
f3cf4ad742bf359310fc8f7d944fcdfe
86e938005af275c9a9644e8c89222cf1
Returns visible events.
export class VisTimelineService public getVisibleItems(visTimeline: string): IdType[] { if (this.timelines[visTimeline]) { return this.timelines[visTimeline].getVisibleItems(); } else { throw new Error(this.doesNotExistError(visTimeline)); } }
1
ea7f0998636264c865d084764a2f805b
cd63b0ca2bb2968ffd6a081b6a696a6d
Option 2. Calculate the theta parameter according to the spread of the solutions around the consensus ranking.
function optiontheta($ul, $k, $v, $r, $d, $t, $iscall, $isput) { $d1 = (log($ul/$k) + $t*($r-$d+$v*$v/2))/(sqrt($t)*$v); $d2 = $d1-(sqrt($t)*$v); $nd1 = normdist($d1, 0, 1); $nd2 = normdist($d2, 0, 1); $nmd1 = normdist(-$d1, 0, 1); $nmd2 = normdis...
0
16fbd921d094af2d101bf54cfc9e103a
fc65ea66253807ae127df800dd6df3be
Retrieves the temporary storage of the output from renderBegin in blocks.
public class FPTF1 implements Serializable public byte[] getTempend() { return tempend; }
0
ec0a58c14663795287e33366389011fa
c36089e3bef5d861c493485fb2a08bda
Class for creating a 3D plot for plotting unit cells.
class Plot: def __init__(self): pass
0
e97c05f2a1ad765250963adc796563fa
3e65ec093f320308c42b597474f39424
Test if the start date field is required
class TopMoviesTests(APITestCase): def test_no_start_date(self): url = '/top?end=2020-11-23' response = self.client.get(url) self.assertEqual(response.status_code, status.HTTP_400_BAD_REQUEST)
0
8f7de3707305db7e0d214655230eeca1
41b1f800ed4cc737e576f4c7e1e686b8
check to make sure entered word is made up of available letters
for i,x in enumerate(word): if set(x) & set(letters): letters = letters.replace(x, "", 1) elif set(letters) & set("?"): letters = letters.replace("?", "", 1) else: return False return True
1
c34700fded8a17d09e20960ef37a8ef5
445645ae67fee0ec6c1be697139edc75
UserList에 가장 아래에 존재하는 User 삭제
public class UserSearchViewModel extends ViewModel public void deleteUserList() { executors.diskIO().execute(() -> { githubUsersAppRepository.dropUserMiniTable(); }); }
0
827b391076470c846217b25803937b0a
06a40021b7b5ab5b1ed78f66bd42b370
An interaction model as it would be sent from Django, sans non-enum fkeys
class Interaction(db.Model): def __repr__(self): return "<Interaction id=%s with=%s, %s date=%s>" % ( self.interaction_id, self.contact_id, self.user_id, self.date)
0
89a389e0363d2c40bdb4e29cead64bcb
bc2915c425565fbfe46cca0ac163d89a
Get url for newest version of Dam Removal Science Database. Checks DOI for newest version of the Dam Removal Science Database. Returns download url for most recent version of databases as CSV.
link = self.get_daft_link() req = Request(verbose=self._verbose) soup = req.get(link) try: descript = soup.find('div', {'id':'description'}) loc = descript.select('h3') for stuff in loc: data = (stuff.get_text()) if dat...
0
092e407f766d48686ae69b6827b1a384
1081b5b205588b1330058982daa3e78f
購物車內 個人帳號的所有歷史帳單
{ $bill = bill::where('id_user', '=', session('account')->id_user)->get(); return view('front-end/auth/history', ['bill' => $bill, 'showMien' => $this->showMien]); }
1
0e76e9a690f26d501fdb60df21acad72
ea28f364188809e58082c533f6ab5a5d
根据屏幕的宽度,设置小图片的大小
DisplayMetrics dm = new DisplayMetrics(); getWindowManager().getDefaultDisplay().getMetrics(dm); int screenW = dm.widthPixels; ViewGroup.LayoutParams lp = line_tab.getLayoutParams(); lp.width = screenW / 2; line_tab.setLayoutParams(lp); moveOne = lp.width; }
1
61337d337a21920fa2ed2c0f72fc4d01
1234cec3773663c42826f98537a32255
Resets the total distance traveled by the roomba.
public class Odometer public double resetMiles() { miles=0; return miles; }
1
e58089785ee90392c5d86f12f41c3c7b
dd14338e12085369ecb8a5fdc1766113
社区团购商品到货推送
{ $order = Orders::findOne(['order_id' => $this->refId, 'pay_status' => '1', 'group_notice' => ['0', '1']]); if (empty($order)) { return new ReturnStruct(ApiCode::DATA_NOT_EXIST, HttpCode::NOT_FOUND, '未找到可推送的订单消息'); } $memberId = $order->member_id; $openid = $this...
0
dcc86964380212504985075fc158c60f
8f1c51303975ade5cbd6679e28382cd5
Greps input structure.
class P_pwinput(QEStructureParser): def parseStr(self, s): input = PWInput() input.readString(s) return self.__genStructure(input)
0
dcc3ff0c5c4cc44ae8653327b1543079
8442563c36f3e5a2ab74971eee59460e
Gets the task ID of the task this worker is executing.
long getTaskId();
1
ff4247c0ae6ffd46c9bb8dec23fb6a3e
3f94ab62463c05489a63a9615e46bb75
上に飛んでいき、画面外に出たら消滅
this.y+=1; if(this.bg1.y+this.y >= 852){ this.bg1.y -=852*2; } if(this.bg2.y+this.y >= 852){ this.bg2.y -=852*2; } }
0
6cd824dd18498278ba32850612f7083b
222c09dbf35e6c2d39a7d918645ced43
Returns the defltLocSeqId.
public class SpecialInstructionVO extends BaseVO public int getLoadInstrDefnSeqId() { return iLoadInstrDefnSeqId; }
0
3d8d5e30475bf6f9437a2b909e226b23
dee8dcb8c0f1390f740f9d86b10ee9ad
将列表项放入滑动窗口内排列好
ul.innerHTML = ""; function emptyLi() { var li = document.createElement( "li" ); li.zEmpty = true; return li; } translate( ul, 0, 0 ); loop( maxItems, function ( i ) { var targetIndex = i - (maxIt...
1
69a461c55bfc772eb7de367e8e156bfe
88148268bc581c3bbb5d911a4c88fea2
清除填挖方区域
for i = x, x + w - 1 do for j = y, y + h - 1 do self.block_t[i * 100000 + j] = nil AStarFindWay:RevertBlockInfo(i, j) end end end
1
d3bb3261996e7e97df8db3a9ebb38e88
43de0360d4c72500adc99436b43ed232
After being killed Jerry re-appear after some time
void KilledUnit(Unit* pVictim) override { if (pVictim->GetEntry() == NPC_ZOMBIE_CHOW) { DoScriptText(EMOTE_ZOMBIE, m_creature); m_creature->SetHealth(m_creature->GetHealth() + m_creature->GetMaxHealth() * 0.05f); } }
0
77f7a6d32c66ffa6e06de608bbc3a007
529ca38686dc455fc16921596cb5b5a5
响应Ensure按钮的click事件,用于确认并添加数据到存储的数据当中和
void dict_note_add_window::on_button_sure_clicked() { QString name=ui->edit_dict->text(); QString mask=ui->edit_mask->text(); QString group=ui->comboBox->currentText(); QString explain=ui->edit_explain->toPlainText(); if(name.isEmpty()||explain.isEmpty()){ } QString date=QDate::currentDate(...
1
faff388213979ffe02f51c9f0ff1426f
048b8e87ff2ad33ed4b840781e269a76
名师堂详情页渲染文章摘要块判断逻辑
function main(_) { (() => { comArticle(_); })(); (() => { if (_.__config.bookList.length) { let postBody = $('#cnblogs_post_body'), html = ''; $.each(_.__config.bookList, (i) => { let list = _.__config.bookList[i]; if (l...
0
5caa8710bbb507e9b8768b8385914f3e
0963442db20811a7fb72775d6bce0128
The DTS Performance Manager Tasklet. This is a fully defined tasklet. You should only have to instantiate an instance and use it. If you need to customize it, you should consider creating a new tasklet and basing your version on it.
self._name = name self._task_name = task_name self._task_type = TASKS_TYPES[task_name] self._state = None self._updater = updater
0
9ae68578b7a557e150939fa1663443b4
ff232cace725a0fafd91d913155d0c26
Sets (as xml) the "coupon_code" element
{ if ((is_scalar($item) && strlen($item) > 255) || (is_array($item) && count($item) > 255)) { throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 255 element(s) or a scalar of 255 character(s) at most, "%d" length given', is_scalar($item) ? strlen($item) : c...
0
92fbb0cf2a588181f5f32ca6dc1d31bc
03a89c0dfb510b1b91fca74fa11147c6
Factory should detect an MVC page from the options 'action' and 'controller'
{ if (false === strpos($controller, '::')) { $count = substr_count($controller, ':'); if (2 == $count) { if (3 !== count($parts = explode(':', $controller))) { throw new \InvalidArgumentException(sprintf('The "%s" controller is not a valid "a:b:c" ...
1
93b5fabd9c1827d10e286c31834385a0
24163b720bc01956a7dc332cf3dd40cb
进行一级模块的修改(回显查看)
public ActionResult EditModule(int moduleid) { ViewData["Operate"] = ""; ModuleTreeRepository re = new ModuleTreeRepository(); return PartialView("EditModule", re.ModuleTreeAll(moduleid)); }
1
85de723075232300953613a7ba6a6fd3
f851f55e736a0f32e5e115592b866026
Method to transfer Model to Entity (using on base service)
{ return new ParkingEntity { BusStation = parkingModel.BusStation.Select(busModel => busModel.ToEntity()).ToList(), }; }
1
0f8cf3c87968ae98c1ecedfc1125ec03
b5657983b895a39cac75c4001470a735
workerProcessTypeB - this worker process is also dispatched by the monitor process and simulates a process that sleeps often and in turn relinquishes the processor often.
super().__init__() self.daemon = True self._worker = worker self._process = psutil.Process() self._cpu_samples = [] self._io_samples = [] self._last_send_time = rdfvalue.RDFDatetime.FromSecondsSinceEpoch(0) self._should_send = False
0
d64bdbd15c1c0df7256c9171ea95d51e
4345b2b454c02a3f4bf9adc9938438ed
Смещение события по рассписанию в списке вверх
namespace FCSPlayout.Domain public partial class NewPlaylistEditor public void MoveUp(IPlayItem playItem) { Debug.Assert(playItem.ScheduleMode == PlayScheduleMode.Auto); if (_playlist[0] == playItem) return; var index = _playlist.FindIndex(i => i.PlayItem == playItem); ...
1
2a16f260a33a9c32e6fa797d68ac6a65
21ca6b4ded406d65b281f264f62aa99a
Получение общей загрузки процессора
String[] cpuInfos = null; try { BufferedReader reader = new BufferedReader(new InputStreamReader( new FileInputStream("/proc/stat")), 1000); String load = reader.readLine(); reader.close(); cpuInfos = load.split(" "); } catch (I...
1
41041a475c45187ca20ec1fa87e5e62e
f8a927b655ce0a303d428fca1164064e
补充测试任务的案例信息,因为没有外键,所以关联的任务或者需求,通过查询来补充外键
QueryFactory qf = new QueryFactory("re_task_requiredetail_ta"); StringBuffer sql = new StringBuffer("select te.* from task.re_task_executant_ta te , task.re_task_requiredetail_ta tr"); sql.append(" where tr.requiredetail_id in ("); sql.append("select requiredetail_id from test.re_test_require_detail where statu...
1
137bb4b95881c5f827d69ece108edf20
13398b0bfbdb4f7a100dd32196f3e477
Get checkout order placed notification permission.
function permission_inventory_notification() { return isset($_SESSION['logged']['roles']) && $_SESSION['logged']['roles']['inventory_notification']; }
0
cf3827136174430a51359224d9fe1834
141b2b076786cf8760cbab53ab0718ca
add new timer task to the timer linked list, and order by time
util_timer *prev = lst_head; util_timer *tmp = prev->next; while (tmp) { if (timer->expire < tmp->expire) { timer->prev = tmp->prev; tmp->prev->next = timer; timer->next = tmp; tmp->prev = timer; break; } prev = tmp; ...
1
6a613c2f305a202409136c110968625f
61286e4ae71f7dfad6f63a47a40eab9b
请求数据统一再处理(背压式,可为空)
public abstract class OkHttpRequest protected RequestBody wrapRequestBody(RequestBody requestBody, final CustomCallback callback) { return requestBody; }
0
0496bb57afe0fdd1fd9216713405510e
87a145f1dc05e5f6a9fd85477e813bde
指定キャラクターが影を持つか。
namespace INI public class MyCharController : Village.Inheritor public void SetInshadowFlag(bool inS) { inShadow = inS; }
1
471204e67b6fd4a552bc3b1f6750eb30
949fd50c9e62bc9ffdb4bb405fe56217
test for deleting key and borrow key from right sibling
def test_delete_branch_val_with_right_child_leaf_removed_correctly(filled_bst): filled_bst.delete(26) assert filled_bst.size() == 20 order = [x for x in filled_bst.pre_order()] assert order == [57, 20, 17, 12, -2, 15, 13, 23, 45, 30, 49, 53, 52, 54, 86, 75, 100, 89, 87, 101]
0
5057ede34fdf49e12b1351ded0d956b4
d968a98623fdd9fdf3113b087dc55bb1
通过布尔查询实现多域查询,即通过传入的查询参数,对文件名fileName域、文件内容contents域进行
fileName = getRelativeFileName(fileName); if (fileName == null || filters == null) { return false; } String[] arr_filters = filters.split(","); if (arr_filters == null || arr_filters.length == 0) { return true; } int len = arr_filters.length; ...
0
ca323d52a17f74b888c34e4b16595658
3ff206fd9a710b5ac912bf5aabc21d9c
Percent-Point Function (aka Quantile Function, or Inverse Cumulative Distribution Function) for a normal (or Gaussian) distribution with mean and standard deviation x such that X will take a value less than or equal to x with probability p
def qnorm(x): return norm.ppf(x)
1
e413a71077166ab003d17866dbee5638
0778ad2a007191c0e66e166fedcb542f
Test case extra 16: Backspace character and actual backspaces in link uri
def test_inline_links_511(): source_markdown = """[link](foo%20b&auml;)""" expected_tokens = [ "[para(1,1):]", "[link(1,1):inline:foo%20b%C3%A4::foo%20b&auml;:::link:False::::]", "[text(1,2):link:]", "[end-link::]", "[end-para:::True]", ] expected_gfm = """<p><a h...
0
527284945921c707fafc5833f3ee0b63
c030f95d1787d2fa181d6f6783a1bbdd
Define a constructor that sets the name of a Dealer using the setName() method
DealerBj::DealerBj(){ }
0
ad3d77e1b3ce3ba17bd5b4f9a6c7e1ed
61aa395df2c2288ca3eca8fbc99e41c5
导出微信用户表列表
class WeChatOrder extends BaseController public function ExportOrder(){ $phpexcel = new \PHPExcel(); $sql = parent::GetDataList( $param_table_name = 'wechat_pay_order_info', $param_field = [ 'id' => 'Id', 'orderinfo_codeid' => 'Code...
1
ea613e6737fa4bd7de5e61a0ccae6ece
0cb0303c03ec7ee2578d22f2e89dedf1
установить содержимое xsd-файла
{ XElement doc = XElement.Load("Sdelki.xml"); IEnumerable<XElement> elements = doc.Elements(); XElement update = null; sdelki.Clear(); foreach (XElement el in elements) { IEnumerable<XElement> props = el.Elements(); ...
0
4fafeae2b32fb2ba19d7e538b166b3f0
8b3e6d1df3e98bc66e82415c21b3a8a0
Declaração de variáveis
public class Variaveis public static void main(String[] args) { String nome = "Linguagem Java"; Integer idade = 25; Boolean fome = false; String nome1 = "Java", sobrenome = "SDK"; String str; int valor; boolean resultado; }
1
8c38aad8a70601f546ec8a0b461bac1c
dfca5353cec5ad7303d48c3cd02ef125
级联取消选中父级节点
zTree = $.fn.zTree.getZTreeObj("menuTree"); if(node.getParentNode()){ var treeObj = $.fn.zTree.getZTreeObj("menuTree"); var nodes = treeObj.getCheckedNodes(true); zTree.checkNode(node.getParentNode(),false,false); cancelParentNodeChecked(node.getParentNode()); ...
1
bb4105e0b397108f473b50f48621e560
1d2fc2071ffca1b8f58b91fde37a56c1
释放由 <see cref="T:System.Threading.ManualResetEventSlim" /> 类的当前实例占用的所有资源。
namespace Microsoft.Coyote.Rewriting.Types.Threading [System.ComponentModel.EditorBrowsable(System.ComponentModel.EditorBrowsableState.Never)] public class SemaphoreSlim : IDisposable public void Dispose() { this.Dispose(true); GC.SuppressFinalize(this); }
0
76f94f809b68394028a3c4799eb12a84
afaf9716c177acc26d391af86b2bac11
Gets the parameter with the specified name. If a parameter with the specified name does not exist, the given default value is returned if any, else null
@Nullable String getParam(String paramName);
0
cd9b0e1e8fa47b14ad30dc3a00bac02f
41b28f7f1ffb8b83e24348e80f305c45
Returns any particle that occupies position x, y
int checkParticleCollision(state* st, context* ctx, int* pos){ return st->universe[pos[2]][pos[1] * ctx->max[0] + pos[0]]; }
0
5bac735886b4196f3f595e02fe78db6f
d7a574c2085596b9cdac2637c01bbc4f
Switches to the passed in window by its unique handle
class CavissonWebDriver(object): def switchTo(self,pHandle): self.driver.switch_to_window(pHandle)
1
0a3fb7fd4425f8c0b7f7c2c8ae7b4bb6
544cd7c5216f2d51c03c80583b8c26de
Sets the custom naming strategy to use for the columns in the database as a result of the auto-mapping.
public void setNamingStrategy(String namingStrategyClassName) throws Exception;
1
d451b56aaf2ee68d1d2b4d3ac8b6b495
523ca382425a2527afaa81674e8dae87
根据 uid 判断该用户是否绑定 邮箱
class UserModel extends ApiBaseModel{ public function bindByUid($uid,$type){ return M("UserConnect")->where(['uid'=>$uid,'type'=>strtolower($type)])->find(); }
1
db7a8916055bc4fca4c9c098037861c7
e47eb589b9eaaae9e4ca9f3c4949731e
Enforces the selection mode for the tree, ensuring only the expected node or nodes are selected.
if (unref(selectionMode) === SelectionMode.Single) { enforceSingleSelectionMode(); } else if (unref(selectionMode) === SelectionMode.SelectionFollowsFocus) { enforceSelectionFollowsFocusMode(); } }
1
526f1acdc6c2975a51e3ef2a4c4f685b
fffc06aee6750c7ab1b116dd6899a273
根据邀请码,获取邀请人。如果获取不到,则说明无效的邀请码
@Select("SELECT * FROM t_invited WHERE invitedCode = #{invitedCode}") public Invited getInvitedByCodeName(String invitedCode);
1
361c2ee81cdd332c17f0d190a035b40f
0257d6d0ecf4751da66ffe9db54e852a
Creates an object wrapper for the aspnet_Applications_CreateApplication Procedure
{ SubSonic.StoredProcedure sp = new SubSonic.StoredProcedure("aspnet_Applications_CreateApplication", DataService.GetInstance("WillCall"), "dbo"); sp.Command.AddParameter("@ApplicationName", ApplicationName, DbType.String, null, null); sp.Command.AddOutputParameter("@Applicat...
1
3b0b9af6e58817a5cf3f179704868801
6f7fe33e58bb1a72ad025225544be884
Validates that number of messages returned is <= limit specified
request: Dict[str, Any] = { "anchor": "newest", "num_before": 100, "num_after": 0, "narrow": [ {"operator": "sender", "operand": "iago@zulip.com"}, {"operator": "stream", "operand": "Verona"}, ], } result = client.get_messages(request) vali...
1
574dbb0196fa1b6a36e85b0546a6d1b6
a2dbb26bf6de140bc5638436ebcd80f8
redirect to admin dashboard
class AdminController extends Controller public function index() { return Redirect::to( route( 'admin.dashboard' ) ); }
1
4d166304a5b8a43dab454e16f4f81cc8
2a1464280f441f6229a4437198adae8b
注册私有窗口类
func registerWindowClass() (err error) { wc := user32.WNDCLASSEX{} wc.CbSize = uint32(unsafe.Sizeof(wc)) wc.Style = user32.CS_HREDRAW | user32.CS_VREDRAW wc.LpfnWndProc = syscall.NewCallback(wndProc) wc.HInstance = handle wc.HIcon = user32.LoadIcon(0, win.MAKEINTRESOURCE(user32.IDI_APPLICATION)) wc.HCursor = use...
1