query_id
string
corpus_id
string
query
string
code
string
label
int64
efb518b991cec21f8c374617e1f57f29
f1d45c3f2c09751af02e18aac05aa5cd
Get the log directory for the given attempt.
if logdir == "": if mode == MODE_CLOUD: logdir = datadir.split("output")[0] elif mode == MODE_KRAKEN: logdir = KRAKEN_BASE elif mode == MODE_TRIOPS: logdir = qhgdir + "/app" return logdir
1
770da6bc8748a9df4f0c461e8476b0da
7f60ece7477df786a30049d1faeac278
This method was generated by MyBatis Generator. This method returns the value of the database column me_voucher.ma_media_id
@DomainMapping(DAO="cn.weispace.pc.materialmng.dao.MaterialDAO", TABLE="T_001_WEIXIN_MATERIALMNG", KEY="_MEDIA_ID", RELATION="") public class MaterialDomain public String getMediaId() { return this.mediaId; }
0
01a118c77326ff78e03464a07dac142a
01f8fd2f36a86fdba5fe99788569a73d
Close the device using the <f midiInClose> API.
namespace MoEABCPlay internal static class MidiOutApi [DllImport ( "winmm.dll", EntryPoint = "midiOutClose" )] [return: MarshalAs ( UnmanagedType.U4 )] internal static extern MMResult midiOutClose ( [MarshalAs ( UnmanagedType.SysUInt )] IntPtr hMidiOut );
0
bb0f40b4d1fd72179f3f3e99df42231c
c7efd11f22481b4e9a2fe37336e5a229
Test of compareTo method, of class Hand.
public class HandTest @Test public void threeOfAKindVsHighCard() { Hand hand1 = THREE_OF_A_KIND; Hand hand2 = HIGH_CARD; assertEquals(1, hand1.compareTo(hand2)); }
1
2136162e969e2d3db40b40ebef62a844
b8b9a56030899f8e572385265ce43342
Delivers the online highscore.
public class ScoreHandler implements HttpHandler private void handleGetHighScore(HttpExchange t, String uri) throws IOException { int levelId = Integer.parseInt(uri.split("/")[1]); String response = manager.getHighScore(levelId); t.sendResponseHeaders(200, response.length()); OutputStream os = t.getResponseBody...
1
e38136974ce4ddae937d8d4dcdab888b
84be6f5760128975edeb25136165f8a4
Get invoices function builds a query string and executes it and returns a list of invoices.
namespace XeroAuth2API.Api public class AccountingApi : Xero.NetStandard.OAuth2.Api.AccountingApi, ICoreAPI public List<Invoice> Invoices(string filter = null, string order = null, int? onlypage = null, DateTime? ModifiedSince = null, List<Guid> iDs = null, List<string> invoiceNumbers = null, ...
1
71c75efe18b0adbfd0ab4d8462eefbd2
39ba31e34f27bda923ffdc05d3673582
Stop proxyconfig by destroying mutexes
CMFC20191205Dlg::~CMFC20191205Dlg() { if (m_pAutoProxy != nullptr) m_pAutoProxy->m_pDialog = nullptr; }
0
a8fe01d61b54fdda1025029e7da4a49b
7151facd10bfa18455c672eb4a991f39
Create a string "X-Y" to be used as a key to a data frame.
if self.pixfmt is None: return None s = self.pixfmt%x + ' ' + self.pixfmt%y return s
0
ba882e82105b6a0b01940c87d4ae8379
5d1cca02cda4c4eb7f650056b783128d
异步加载列表标题
function LoadNewsTitles() { $.post("/NewsAnnounce/Titles", { pageIndex: pageIndex, pageSize: pageSize, type: "news" }, function (data) { var res = strToJson(data); count = res.count; var tempStr = ""; $.each(res.titles, function (i, item) { tempStr += "<li><a href='javasc...
1
651fb097718aceff4592e6c219fb838f
1410cc60b5e6f2368c6b48ec75de4f39
Queue에서 객체 하나를 가져옵니다. 만약 Queue가 비어있는 상태라면 객체가 추가될 때 까지 대기합니다. 반환되는 객체는 Queue에서 제거됩니다.
public class ObjectPoolingManager : MonoBehaviour public GameObject GetQueue() { GameObject t_object = m_queue.Dequeue(); t_object.SetActive(true); return t_object; }
0
742c74a753b5251f73a580b8472fecba
aa68cd96650985e48904784b73471f95
Toggle all episodes of a season as seen / unseen.
public boolean onActionItemClicked(ActionMode mode, MenuItem item) { switch (item.getItemId()) { case R.id.action_episode_seen: Toast.makeText(getActivity(), "Mark as seen", Toast.LENGTH_SHORT).show()...
1
6fc5a657933e59b739b8ef2082020d51
f5aa9c8159f9805c6945c281716b9656
Given a map of headers (as returned either by {@link URLConnection#getHeaderFields()} or by {@link HttpsFetcher#fetchURL(URL)}, determines if the content type of the response is HTML.
public class CommonResponseDataAdvice implements ResponseBodyAdvice private boolean isHtml(MediaType mediaType) { return mediaType.includes(MediaType.TEXT_HTML); }
0
a64ca5e1bef23586703ce59ef442d8a2
615a1fe164ec0f6f0b84458078c8965c
GET: Cs
{ CaferServis.CaferSoapClient cfr = new CaferServis.CaferSoapClient(); TestSoapClient tst = new TestSoapClient(); ViewBag.Test = cfr.HelloWorld(); return View(cfr.tumDersler()); }
0
399ef4eb4fbefd731d05f874b411aeb0
be67105bc5ab2940c86a8e3cc8f72de9
Callback function for services section
let serviceSection = `#### ${data[0].title + os.EOL + os.EOL}| Name | Eyes | Description |${os.EOL}| ---- | ---- | ----------- |${os.EOL}`; data.forEach(item => { if (Object.keys(item).length == 1) return; let name = `[${item.name}](${item.url})`; let eyes = item.eyes ? `**${item.eyes}-e...
0
0c399c9b265bb294e523ae33fff9c17c
44f997898949d1eeea770a1c9694b700
Test if posts are assigned their chronological id's properly
class TestCases(TestCase): def test_comment_relationship(cls): post = Post.objects.filter(comment__post__id=cls.post_id).all()[0] cls.assertEqual(cls.post_id, post.id)
0
80cb605f964cb336d568202194ca348a
5f34e90a959309081105c4f511bbc2d0
Retrieve the list of teachers (and their id's) associated with the provided school
{ $that = $this; return $this->fetchCached("school_id:{$school_id}", $school_id, function ($school_id) use ($that) { $sql = "SELECT * FROM {$that->getTable()} WHERE school_id = ? AND status='published'"; return $that->getConnection()->fetchAll($sql, array($school_id)) ?: null; } ); }
0
859d52421d1b619f5d4702959f16f1ca
244652299aa75ab8b6512ae966bc78e2
Disable CMB2 styles on front end forms.
{ global $pagenow; if(!in_array($pagenow, array('post-new.php', 'post.php','admin.php'))) { return; } wp_enqueue_script('cmb2-conditionals', plugins_url('/cmb2-conditionals.js', __FILE__ ), array('jquery'), '1.0.2', true); }
0
84296fa7332c8d533b5d72bb7ea9fd20
4cc33de427aa5eaea78a8f38ae9e6fda
Check if ``query_circle`` is in ``target_circles`` Minor error on center point and radius are allowed
r = self.raytracer self.assertRaises(ValueError, r.query_circle, [0, 0], -1) self.assertRaises(ValueError, r.query_circle, [0, 0], 0) self.assertRaises(ValueError, r.query_circle, [0, 0], float('nan')) self.assertRaises(ValueError, r.query_circle, [None, 0], 1) self.asser...
0
ed5cdebbecb98220e1fae00468cfce70
69537ffb3b56384d6a5087de14bf634d
Gets the networking of this Profile. # noqa: E501
class VM(Model): def network_profile(self): return self._network_profile
1
f9fb38d39b2cec3e6ed6b1b973438045
69b5f0a98f43355b8976b2e7aaffce9b
Insert a record into the contribution_tracking table
const oThis = this; return oThis .insert({ user_id: params.userId, total_contributed_by: params.totalContributedBy, total_contributed_to: params.totalContributedTo, total_amount_raised: params.totalAmountRaised, total_amount_spent: params.totalAmountSpent }) ...
1
a4c34c55411dac976b723430aca1152e
770ef3976e288b7880ef052995bd8c05
"Выводит" сообщение об успешном сохранении настроек страницы модуля.
$messages = array( 701 => __('Preview settings saved.', 'fapro'), 801 => __('Plugin settings saved.', 'fapro') ); if( isset( $_GET['message'] ) ){ $message_id = absint( $_GET['message'] ); if( array_key_exists( $message_id , $messages ) ){ ?> <div id="message" class="updated"><p><?php echo $messages[ $m...
1
57e6a1e6e25bde18bbe7568910361e1e
409df8d94e279c8f3f6faa8705c9b937
Returns True if this is a dictionary type.
class underscore(object): def isDict(self): return self._wrap(type(self.obj) is dict)
1
17b7315ed368e984694d2ad9bcb681e9
6f96f377b9c1793dc385adb2cc2b397a
<para>Checks if the application has been loaded over HTTP.</para>
{ if (httpContext == null) throw new ArgumentNullException("httpContext"); return httpContext is FakeHttpContext; }
0
80bdcf4cef724ca1b7db853af2d5c18c
9f797eccc1dfa6d80b8b18881ce821fa
封装从book读数据的方法
workbook = xlrd.open_workbook( r"somebooks.xls") sheet = workbook.sheet_by_name("Books") book_list = [] for row in range(1, sheet.nrows): books = {} row_values = sheet.row_values(row) books['author'] = row_values[0] books['title'] = row_values[1] if row_...
1
b5a50aff82d223d65bcfd656c8ae7b46
a43aa0eb01fad2a958be55e79c268fdd
Returns the meta object for the containment reference list '{@link es.gva.cit.simapa.Aplicaciones#getAplicaciones <em>Aplicaciones</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getModel_Application();
0
7da12089e643210fe7ccdf63dc6d358d
4f77a986166a36f2599bdbe72e4b1abc
Returns the unscaled, untranslated bounding box of the cells.
export class TileTableMetadata extends UserTableMetadata<TileColumn> public getTileBoundingBox(): BoundingBox { return this.tileBoundingBox; }
1
c8a50230cee7d0298dcc4e7330b81147
dce1be57ce9b7dd69aed22aaa60853e3
hasmany嵌套table时,需要重新设置行的默认key
namespace KC.Template.Domain public class ThisDBContext: DbContext protected override void OnModelCreating(ModelBuilder modelBuilder) { modelBuilder.Entity<User>(entity => { entity.ToTable("User") .HasKey(x => x.Id); }); base.O...
0
43894919017b1f3d15c58986e405763f
65dfede35c7e2a2d86c5e9ef2f3983c2
Méthode permettant d'obtenir la propriété chrono.
public class ControleurTicTacToe public StringProperty getChrono() { return getJeu().chronoProperty(); }
1
9078f2a2ab11351dd5a5e0c2650f7ee6
965b0a1fe87d8cac8c52bd46e902905c
Checks for the instruction restrictions from page 37 ("Summary of Instruction Restrictions").
{ List<string> issues = new(); switch (Opcode.Type) { case OpcodeType.MemRead: case OpcodeType.PciRead: if (OperandTwo != 0) issues.Add("Second operand will be ignored."); break; ...
1
6f7c9c28c81fd2a83c876ec43f79286f
aac5f366806970f0e8aae71f5e72a738
Function to merge a list of yaml report files into a report object
def merge_reports(reportObj, list_reports): for report_pattern in list_reports: for report_file in glob.glob(report_pattern): to_merge = TCReport(report_file=report_file) reportObj.merge_into(to_merge) return reportObj
1
3c8ef8b9006aa704408f7daa9737e2c3
6b572f57daeed9030b290897ec8836fa
Multiply the instance by a power of 2.
class DomainElement(object): def __pow__(self, n): if not isinstance(n, (int, long)): raise TypeError Q = self R = self if n & 1 else self.__class__(1) i = 2 while i <= n: Q = (Q * Q) if n & i == i: R = (Q * R) i = i << 1 return R
0
5da16383ac5ce641dbce91455ba3f5ce
506a97311cf8904b7f2bf2c3677a903b
编辑页面调整明细数量
class NoticeRecordDetailModel extends TbModel public function edit_detail_action($pid, $ary_details) { $this->begin_trans(); $sql = "select * from wbm_notice_record where notice_record_id=:notice_record_id "; $data = $this->db->get_row($sql, array(':notice_record_id' => $pid)); try { ...
1
50c140ace9c8c86754326044e5e38e32
3791c643b0cac3f6ec13b525003d61c1
根据选中父节点的值获取对应的出入库类型
{ if (goods_type_tvw.SelectedNode.Parent == null) { parent_type_tbx.Text = "无"; type_name_txb.Text = goods_type_tvw.SelectedNode.Text; parent_type_tbx.Enabled = false; type_name_txb.Enabled = false; } ...
0
1b1dc0d696db4b364248507ff6dd672b
86f97c022a9f455ac22f96aaa114f1b7
r"""Adds a new label element to an existing CenterNet target. The new label will be concatenated to along the heatmap channel dimension immediately preceeding the regression component of the heatmap.
class CenterNetCenterHeatmapTargetAssignerTest(test_case.TestCase): def test_center_location(self): def graph_fn(): box_batch = [tf.constant([self._box_center, self._box_lower_left])] classes = [ tf.one_hot([0, 1], depth=4), ] assigner = targetassigner.CenterNetCenterHeatmapTargetAss...
0
3eba2bf5983b6811f3ab294d4998b86e
5d23757a8e5075e9757318a2ff1e5b87
本节点是否为指定Hash合约竞选节点
@Slf4j @Setter @Getter public class Node implements BeanProtoFormat public boolean hasNode(String contractHash) { return nodeBase.getHashes().contains(contractHash); }
1
7598a6d3fcefe3ceb9d6376d98f68d56
a4532c8330f50604efb4e083fc2b06d3
Indicates the value that the luma channel must have when the chroma channel is at its maximum value, if the color is to remain valid within the RGB color space.
class TriangularColorScheme(TwoDimensionColorScheme): def maximum_first_channel_color_scheme(self): return self._top_color_scheme
0
f4b4cc27c39ae66c6923c396df15edc5
3b0796edcb7e96717bba66e0db75dd9d
Retrieves a {@link Message} from the list of messages and deletes the {@link Message} from the list. no messages
if (messages != null && messages.size() > 0) messages.remove(messages.size() - 1); }
0
8f713a9b6a9c8510c2e3fc68062e0705
5c82de8b98d8f19be43220f9e3a2f7d0
Saves filing fee. For AJAX
class FeesController extends Controller public function saveFee(Request $request){ $fee = new Fee(); $fee->workshop_id = $request->workshop; $fee->category_id = $request->category; $fee->amount = $request->cfee; if ($fee->save()){ \Session::flash('message', 'Fee successful...
0
121fffd041e4c0c7331298b3e6128bfb
42ef70816669f5e9ed5d1ba184464a1e
리스트 페이지 체크박스 토글
$("#frmMemberInterface ul.checklist li div").hide(); $("#frmMemberInterface ul.checklist li div.rdo").show(); $("#frmMemberInterface ul.checklist li.checked div").show(); }
0
1315a1b544d4dcdaf3279e2870b3a157
36349420293fa4a449b55cb5e73593b0
Updates this view with the specified <code>aLLTableStructure</code>.
public class CParseTableView extends JTable implements PropertyChangeListener{ public void updateLLParseTableView(ILLParseTableComp aTableComp){ setCellColor(-1,-1); TableStructure=aTableComp.getTableStructure(); if(TableStructure!=null){ buildLLParseTableModel(aTableComp); }...
1
516774ed3a0dba0df3608bf44d4f7a67
bdb4db642a28aa41bb2a0512d3683b6c
This method was generated by MyBatis Generator. This method returns the value of the database column T_AIOT_RESOURCE.SYSTEM_RESERVE5
public class BaseEntity implements Serializable public String getSystemReserve4() { return systemReserve4; }
0
d919125a286120c64259484a58462715
df2712d9b6238a534d088af8a958e908
Encrypts a string using monoalphabetic substitution
def mono(text, key): output = "" for c in text: if c in key: output += key[c] else: output += c return output
1
5686df6bd81144d3ea2ef6f3cf8b30f9
03af359d81508de634ef083a11fa4077
Create coords from given line parameters
p1 , p2 = line[0] , line[1] x1 , y1 = p1[0] , p1[1] x2 , y2 = p2[0] , p2[1] a = y2 - y1 b = x1 - x2 c = x2*y1 - x1 * y2 return [a,b,c ]
0
4aa2c9d47b6b250d6550dc5678971207
85b073bdfd95bd171248a8e76b57a282
通过账单日期获取总手续费
{ StringBuilder strSql = new StringBuilder(); strSql.Append("SELECT sum(Fee) TotalFee FROM Shop_CommissionDetail "); strSql.Append(" WHERE TradeType=1 "); strSql.AppendFormat(" and RuleLevel={0} ", RuleLevel); strSql.AppendFormat(" and userId={0} ",...
1
e95ff03468e6a0204169a18892155265
040b23cd6e1c335ad7357873181b645d
Number of years a student has been in a particular programme
{ $newstd_result = mssql_query("SELECT std_enrollyear, count([std_stdno]) as num FROM [SOAA].[SoAA].[dbo].[vw_bigdata_student] where std_academyno like '$academe' and std_depno like '$dep_no' and std_enrollyear >= $start_year and std_enrollyear <= $end_year and std_degree = 1 and std_enrolltype != 3 and (std_schoo...
0
4b936b6dd96b910ae8816e38657f9c44
a424cd185a4b53b0c0b15bd81ed06e60
Gets all districts and inserts them into DDDB
public class DistrictUtility public static Iterator<Ngodistrict> getDistricts() { return DBIHandlerManager.getDistrictDAO().getAllDistricts(); }
0
263a0810d86f111fd0e7a8569064c691
adb8a0bccea6052733f2518485352816
向伺服器請求玩家狀態
options.path = `/getState?code=${code}&x=${mx}&y=${my}`; let req = http.request(options, (res: any) => { res.on('data', (body: any) => { serverData = JSON.parse(new TextDecoder("utf-8").decode(body)); indCurrPlayer = serverData.currentPlayerIndex; serverFood = serverData.playerState.food; ...
1
96b522b912cc9f1f6cd41126f8f0d79e
1d668515ba78b50aaaf4e2c419f314f2
Converts an array of integers into an array of doubles
public class ArrayUtils public static double[] toDouble (int[] a) { double[] a2 = new double[a.length]; for (int i = 0; i < a.length; i++) { a2[i] = a[i]; } return a2; }
1
3b6c341c018bdd0444945d9c6ce054f8
60fc97059cbc08911ff29ecd520db518
最新试卷列表
{ $this->layout = false; $result = array('success' => false, 'data' => array()); $uid = Yii::app()->user->getId(); if(!$uid){ $result['msg'] = '用户未登录'; $this->renderText(json_encode($result)); return; } $gradeid = isset($_POST['GradeID'])?$_POST['GradeID']:0; $type = ...
1
b59950096f63ea50ac0dab4b18b61743
0e884cc027548e68632d3cbce15664c3
Returns the current simulation step time in ms.
class FecDataView(PacmanDataView, SpiNNManDataView): def get_simulation_time_step_ms(cls): if cls.__fec_data._simulation_time_step_us is None: raise cls._exception("simulation_time_step_ms") return cls.__fec_data._simulation_time_step_ms
1
f25e9f190a96d6ccf182c095ba17ab66
fc4865377d021eca1f24b1eebd8e2841
在SFTP内部移动文件 源文件名 目标文件名
ChannelSftp sftp = null; Channel channel = null; short retCode = 0; try { channel = session.openChannel("sftp"); channel.connect(); sftp = (ChannelSftp) channel; InputStream ins = new FileInputStream(file); sftp.cd(targetDir); ...
0
3f20e4d879e26eacc1b7ad35fd8706d1
ac8eb57249fdf32eb30b6e8fa78639e4
Returns halving time of spread after peak (in days).
final class Spread public function spa() : int { return $this->spa; }
0
d29bc316de603c19d7e3bd47e53a6d4d
d3aab7049eb5fd1d717292de9c396be2
スコアをテキストファイルに書き込むメソッド
namespace GainsProject.Application public class ScoreSave private void writeFile() { File.WriteAllText(fileName, getTextString()); }
1
9b131a54964f9bba8ccc2770503fa554
6cf2e63bbb9a4e6fc63720714ffaf2eb
Returns whether the SDK is the Oreo release or later. SDK가 Oreo 릴리즈인지 이후 버전인지 반환함
fun isOreo(): Boolean = getVersion(Build.VERSION_CODES.O)
1
c10763a404d8fc4aa66320395996e500
9bd052d1691ccd41f2cdcb48255fc8cc
Configures the Twitter external login provider.
{ $config = $this->app['config']['services.twitter']; return new TwitterProvider( $this->app['request'], new TwitterServer($this->formatConfig($config)) ); }
1
f86df872d25b7a98619be34a32a63745
384e6fcdecc732f09ed7b83a93a9a5b4
Compares 2 IEE802.15.4 addresses
bool isEqual(DeviceAddress &deviceAddress1, DeviceAddress &deviceAddress2) { for (uint8_t i = 0; i < 8; i++) { if (deviceAddress1[i] != deviceAddress2[i]) return false; } return true; }
1
38a02aead47533b1ab597f56e0383488
907c423ef2c80a3b641c4c1f5f9dfc8f
builds a recipe object from entered information and saves it to array
let name = document.getElementById("nameHeader").innerText let description = document.getElementById("recipeDescription").innerText let ingredientsCollection = document.getElementsByName("ingredientsList") let ingredients = [] for (let i = 0; i < ingredientsCollection.length; i++) { ingredients.push(ingredients...
0
7056a420d389cdb8b8ee818f21e43beb
50016bc39e3407507461abe139291a8a
Load Transaction Line Schema
{ var result = new TS210(); result.ST = new ST(); result.ST.TransactionSetIdentifierCode_01 = "210"; result.ST.TransactionSetControlNumber_02 = controlNumber.PadLeft(9, '0'); result.B3 = new B3(); result.B3.InvoiceNumber_02 = "3410889"; ...
0
59f2b28eca3f9d880407f8954593c580
48eb0d02a62bf4df8b2f91abc8dcf9ca
Error, invalid argument. This triggers error in type checking and in runtime.
def test_empty_list_too_many_arguments_error(): def f(x: bool): return empty_list(bool, bool)
0
028c22669e5f9e5833c941bdb4682d53
19b638d00417297bfe8586b0bb6a2cd4
每个交易日结束后,将指定的成员变量进行更新,比如可用数量(指可以卖出的证券数量)等
class Period_condition(Weight_Base): def after_trading_end(self, context): if self.day_count == 0: self.g.update_black_list(self, self.g.stop_loss_stock_list) self.g.stop_loss_stock_list=[]
0
ce7380f7c6d47159f1afc7baf8370da6
9feebf00513b39d6362b8c69845f4f52
Removes extra related entity configurations.
EntityDefinitionConfig $parentConfig, string $associationName, array $parentConfigExtras = null ): void { $isNormalizationRequired = true; if (null !== $parentConfigExtras) { $isNormalizationRequired = false; foreach ($parentConfigExtras as $extra) { ...
0
ddd723875b2ba0c20ca8300c7786f942
7e687ac3ccb83c022325027ba03d0869
Training for L2-regularised Least-Squares loss with Stochastic Gradient Descent
def least_squares_SGD(y, tx, initial_w, max_iters, gamma): w = initial_w batch_size = 1 for n_iter in range(max_iters): for y_batch, tx_batch in batch_iter(y, tx, batch_size, 10,False): grad = compute_gradient_least_squares(y_batch, tx_batch, w) w = w - gamma * grad loss ...
0
e01a086bbcb4d92f297cb51e5f8c16c7
1f7f734f0b9e8742f4dd57a3e291de9b
获取缩略图的字节数组
{ using (MemoryStream ms = new MemoryStream()) using (Image thumbnail = Image.FromStream(new MemoryStream(myImage)).GetThumbnailImage(thumbWidth, thumbHeight, null, new IntPtr())) { thumbnail.Save(ms, System.Drawing.Imaging.ImageFormat.Png); re...
1
3c7d205109d1d657d069be279d469bff
0f3748f8c437fc217f1f3cd2858c75de
Return True if entity can move in the given direction.
class Car: def canMove(self, direction): assert isinstance(direction, (str)), "<direction> must be an str" if direction not in ["U","D","L","R"]: return False if self.vertical: return (direction == "U" or direction == "D") else : return (direction == "L" or direction == "R")
1
7ea2452440b6aa409e5bfbb1ccf98e0f
a51535809651cefea9df3219805ce4b7
通过促销活动的查询条件和分页条件,查找出数量
public class MarketActivityDao extends iBatis3DaoImpl implements IMarketActivityDao @Override public int countMarketActivityByMulCondition(MarketActivityVO mav) { return (Integer)getSqlSession().selectOne(NAME_SPACE+COUNTMARKETACTIVITYBYMULCONDITION,mav); }
1
47a4ececdb962791099c42c4281fdb77
26f01a5f4773f8f63ad6fbfff6337bc0
锁定事件与协程队列
assert(not s.co) s.co = coroutine.running() skynet.wait(s.co) if s.closing then skynet.wakeup(s.closing) end end
0
bb38f48291ca959e615f121adb1d619f
a72ccf0763b608ee81bff3434b2eb0f0
getting text and trimming space from beginning and end of the line.
{ char tmp[MAX_STR_LEN]; int i = 0, j = 0, k = 0; while(isspace(line[i])) { i++; } while (!IsEndOfLine(line[i])) { tmp[j] = line[i]; if (!isspace(tmp[j])) { k = j + 1; } j++; i++; } tmp[k] = '\0'; strcpy(line, tmp); }
0
760b497b83ef727392ca1c55c945e47f
8b97408be9d9b243da84fe4d42aafa5a
Test case for com_adobe_cq_social_connect_oauth_impl_facebook_provider_impl
class ConfigmgrApiTest extends \PHPUnit_Framework_TestCase public function testComAdobeCqSocialConnectOauthImplSocialOAuthAuthenticationHandle() { }
0
001265baa75e12e2e199cb851fdbf9f7
9b78bc68a036dc282c38e7c66c16f934
Used for specific test case to check if timeouts are working in ScanningResultIterator.
public class ListOfPointsTest @Test(expected = TimeoutException.class) public void testTimeout() throws IllegalArgumentException, TimeoutException { testLop = new ListOfPoints(); for (int i = 0; i < 6000; i++) { testLop.addPoint(3, 3); } for (int i = 0; i < 6000; i++) { testLop.addPoint(50...
0
37f94bbf503f741b87a49c03855e9623
89eda6eb367f059c3111e61f1d7ba5d0
colonne ADRESSE (propriete adresse) aggregee par la fonction min() a utiliser dans les requetes.
class Recherche: def adresse_to_quartier(self): index_rue = -3 index_ville = -2 index_pays = -1 for resultat in self.resultat_gmaps: partie_adresse = resultat["formatted_address"] partie_adresse = partie_adresse.split(",") try: quartier...
0
9c97adc545b35bbb5595ac16ac1d47a9
bed0f88baf0010d0f0996d55444a349f
Hook for gathering user registration validators, implementers must return a callable that accepts a :class:`~flaskbb.core.auth.registration.UserRegistrationInfo` and raises a :class:`~flaskbb.core.exceptions.ValidationError` if the registration is invalid or :class:`~flaskbb.core.exceptions.StopValidation` if validatio...
class BaseRegAuthBackend(object): def register(self, request, **kwargs): raise NotImplementedError
0
fead27e98d975f7ef894839ecf79b7da
64d96aac60c7c9fbef9ae5659caddb21
分割UDP数据包
var i=-1,tmp,frameData={}; tmp=data[++i]; frameData.fin=((tmp&parseInt("1000"+"0000",2))==0)?0:1; frameData.rsv1=((tmp&parseInt("100"+"0000",2))==0)?0:1, frameData.rsv2=((tmp&parseInt("10"+"0000",2))==0)?0:1, frameData.rsv3=((tmp&parseInt("1"+"0000",2))==0)?0:1; frameData.opcode=tmp&parseInt("1111",2); tmp=data...
0
1c83ebebdcc0a152da12ac18792292bd
1c13071063df654251eb91b77717644c
Reads initial state from the API, processes existing resources, and kicks off threads to watch the Kubernetes API for changes.
try: if await self.create(): await self.sync_state() await self.watch_until_completion() except asyncio.CancelledError: await self.cancel() return self.run_state
0
c9fb01f51282dd8b0f59bf1c9eb27e53
486d6857f04831d4491ebb934717ec64
id=1である書籍情報を取得
curs = self.conn.cursor() select = ''' SELECT data_id , isbn , name , author , translator , publisher , selling_ag...
1
b44e847064ffeb8851c4630577369969
7459564e0ee5f9e063fc2725d12d9c68
Gets (as xml) the "ClickDate" element
public class Ad implements Serializable public String getClickDay() { return clickDay; }
0
52d4f1cadcae5375976f9c71c93d7f61
b7c342f478bbebf48f6b3c2e40ec82e2
Put inventory on hold.
{ var msgCode = ValidateCommand(cmd); if (!msgCode.IsSuccess()) return msgCode; msgCode = await EnsureInventoriesSufficientAsync(cmd.Merchant_ID, cmd.Inventories).ConfigureAwait(false); if (!msgCode.IsSuccess()) return msgCode; var tran = new HoldOrder...
1
c6c86a69053e5e52f9811a0b01971823
ae08a89f2fcdf8905a8f732a004b715e
获取已访问link队列
public class LinkQueue public static Queue getUnVisitedUrl() { return unVisitedUrl; }
0
5ea3aec7acee77f582ae4cf30d1fd98d
126c88e0d0bb137b81fdebba2582a665
! \private \fn static void APP_AppModeHandleKeyboard(uint32_t keyEvent) \brief This is a handler for KBD module events. Device is in application mode.
static bool appMsg( ICall_EntityID srcEntityID, void *pMsg ) { bool resend = false; AppTerm_InitReq_t *pReq = (AppTerm_InitReq_t *)pMsg; switch ( pReq->hdr.event ) { case APPTERM_CmdIDs_INIT_REQ: break; case APPTERM_CmdIDs_KEYPRESS: { AppTerm_Keypress_t *pInd = (AppTerm_Keypress_t *...
0
bdc5ca8b8d8c005a669fbd9a1bc48a80
b0f2c8ec8d3b162e20a4ba79016be212
Draws the epithelium stored by this widgets parent. Draws the epithelium to a pre-selected GL context.
class FieldStrokeContext( VFieldContext ): def drawText( self, view ): VFieldContext.drawGL( self, view )
0
b102a5a5b8ac1f09a43599d016f260a6
aff29be5d7e3dc49d7d810e1659ba7e5
verifies if the given node does even contain a bulkId
{ global $ilDB; include_once("./Services/Link/classes/class.ilInternalLink.php"); if (is_int(strpos($a_id, "_"))) { $a_id = ilInternalLink::_extractObjIdOfTarget($a_id); } $q = "SELECT * FROM sahs_sc13_tree_node WHERE obj_id = ". $ilDB->quote($a_id, "integer"); $obj_set = $ilDB->query($q); if ($o...
0
58ab50612a97e9c74b315a1b5f1128a1
049055a890d689ff460bf593612add27
Returns a new object of class '<em>Sequence Flow</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
FlowElement sequenceFlow(String sourceId, String targetId, String conditionExpression);
1
24c81a4454e80d23d3cd5178041b9008
b76bc80ff4ad52baec163244e3e9bb56
Find the setting with maximum utility Calls :code:`utility()` for an estimate of the benfit/cost ratio for all allowed settings (i.e. start, stop combinations), and returns the settings corresponding to the maximum utility. Returns: A settings tuple.
res_min = minimize(self.get_V, 0, bounds=((0, 1),)) res_max = minimize(lambda x: -self.get_V(x), 0, bounds=((0, 1),)) return (res_min.x[0], self.get_V(res_min.x[0])), (res_max.x[0], self.get_V(res_max.x[0]))
0
c0aef764a5401ba7cdeee89729003d08
6f1d96539c1ed4717425428baa41d173
Generates numpy elements from the given `tfds.Split`. This generator can be useful for non-TensorFlow programs.
def generator(): for length in lengths: x = np.zeros([length], dtype=np.int64) yield (x, x) types = (tf.int64, tf.int64) shapes = (tf.TensorShape([None]), tf.TensorShape([None])) return tf.data.Dataset.from_generator( generator, output_types=types, output_shapes=shapes)
0
e9804aedbea4ac16cf4dc9353c571243
5971a27186788b7ebb2fb3d97a13c259
Processes a good item hit. Called from processItemHit.
public class ScoreCalculator : MonoBehaviour public float GoodHit(int currentScore, int currentMultiplier) { GameManager.instance.SetScore(currentScore + scorePerGoodNote * currentMultiplier); NoteHit(currentMultiplier); return 1f; }
1
7acd35cdaa90a4ad8e5c431aeeff6c91
80b129f217b3732b4ef5f647c8cbd2b2
找到可消除行和列
class UA4(): def checker(self,removed_cells): contain1 = [] for a, b in itertools.combinations(removed_cells, 2): if (CellProperties(a,self.puzzle).find_row() == CellProperties(b,self.puzzle).find_row() or CellProperties(a,self.puzzle).find_col() == CellProperties(b,self.puzzle).find_col()) ...
0
e75a8e08eeec08d1e23e83924aaf43f7
c9916df731967357ef98cca86679199e
Gets the color for the tab separator.
namespace Manina.Windows.Forms public partial class TabControl public class TabControlRenderer protected Color GetTabBackColor(DrawTabParams param) { if ((param.State & ItemState.Pressed) != ItemState.Inactive) return UseTabColors ? param.Tab.BackColor.Lighten...
0
e236462e1bffa111775db7c359bec01e
a3314e767c7175810ba61d645bb7fb1b
Funzione per spawnare la parete cilindrica interna della dimensione corretta nel contouring
function semiCircle(p){ alpha = p[0] b = p[1] a = [b*COS(alpha), b*SIN(alpha)] return a; }; var dom = DOMAIN([[0,PI],[0,r]])([36,1]); var cerchioO = MAP(semiCircle)(dom) var semiPlan = EXTRUDE([1])(cerchioO); return semiPlan; }
0
a6033f92de642c02bc33a5067157aee8
7f61448ad6da3ef0f9cb03f40c5be655
Armstrong
cases like (1)
0
c25f8272cd1eb4d5f48a0b52c4f9da38
86ad1ff51cf05154a540a454c1153777
Append urls to the done file
with open("download/url.txt", "a") as f: f.write(url+"/" + "\n") print("\r %s OK" % url)
1
3c5408c0cd4918a71c12a415f9b303aa
73159671a90fb7cf6f7b57853533a918
Function Name : rrcTagCheckHoTrigger Inputs : data_p - pointer to tag data in TLV API message buffer size - tag size Outputs : None. Returns : PDCP_SUCCESS or Error code Description : It checks PDCP_HO_TRIGGERED RRC tag and converts mandatory tag fields to Host byte order.
rxc_hho_begin_cmd ( mctrans_action_packet_type *cmd_ptr ) { #ifdef FEATURE_IS95B_MAHHO mccrx_rpt_type *rpt_ptr; if (cmd_ptr->action.rxc_hho_begin.rif_ind == TRUE) { rxc_rif_hho_timeout_frames = cmd_ptr->action.rxc_hho_begin.hho_timeout * 4; rxc_lost_frames = 0; if (rxc_rif_hho_timeout_frames == 0) ...
0
cb2f7bb3f94fe5119959ee0e4e27ad5d
c5a3deecf1812a556bd181f211435147
Elimina el filtro que se está aplicando en este momento, caso de haberlo.
public class OpcionesPersonalesComprobarUsuario implements Filter public void destroy() { }
0
504734554d085891fc41d7ca4474630a
813bc93c7b505485365f67649fd9b901
Runs the neural network, plots the training history and plots the results.
criterion = nn.BCELoss() optimizer = torch.optim.Adam(self.network.parameters(), lr=learning_rate, weight_decay=weight_decay) self.network.to(self.device) self.network.train() test_set_results = [] train_set_results = [] for epoch in range(epochs): i...
0
b1da97fad19ef536d214c9c7bed2b85f
05a9b4674e34c1c52e4605518c0c88ad
Parse unique ID for job
def unique_doc_id(doc): return "%s#%d" % (doc["GlobalJobId"], doc["RecordTime"])
1
1eaed99386855fc999ef530b2629e285
d2e49e37c291d117bb98555789f1b1cc
外勤打卡——坐标微调
self.driver.find_element(MobileBy.XPATH, "//*[@text='工作台']").click() daka = "打卡" self.driver.find_element(MobileBy.ANDROID_UIAUTOMATOR, 'new UiScrollable(new UiSelector().' 'scrollable(true).instance(0)).' f'scrollIntoView(new UiSelector().text("{daka}")' ...
0
476f490f2977ad637525cf1463407f68
30bd19cd1dc6be008d1b7523a80066c0
adjusts font size based on the size of the window
function getFontSize(event){ html.style.fontSize = F0 * _window.innerWidth / 750 + 'px'; }
1
150d756813fb1fdf7722f8f20c52f01a
cfd3204e5ecf68eead710362b81abf71
Este método devuelve la hora a la que se producen mas accesos al servidor.
resultados = query("SELECT * FROM Resultados WHERE actual = True") resultado = resultados.get() return resultado.fechaqualy - datetime.timedelta(hours = 5)
0
fa949a42697911ce1aa5464bd69a20fb
d130b69ab9b950fdbf7ef8cf3502cd38
Test relinking of nodes to history.
{ $node_3 = Cobra_MPTT::factory(3); $node_4 = Cobra_MPTT::factory(4); $child_node = Cobra_MPTT::factory()->insert_as_first_child($node_3); $node_3->reload(); $node_4->reload(); $this->assertTrue($child_node->is_child($node_3)); $this->assertEquals(3, $child_no...
0
41b7464c699fa169cc9045e92af35d7e
e81167356e85b71ba42169f38d0626e0
Modify the customizer (remove css editor)
function wpt_register_theme_customizer( $wp_customize ) { $wp_customize->remove_control('blogdescription'); $wp_customize->remove_section('background_image'); $wp_customize->get_section('title_tagline')->title = __('Site Title'); $wp_customize->get_section('colors')->title = __('Text and Background Color'); $wp_customi...
0
9b74d5153528b92a1e707426c537de23
b3813d68fdac6a1d6a41dc18894e7e0e
Remove a page from the btree. Caller is responsible for having relocated any keys from this page that are still wanted. The page is placed on the recycled list.
FreePageBtreeRecycle(FreePageManager *fpm, Size pageno) { char *base = fpm_segment_base(fpm); FreePageSpanLeader *head = relptr_access(base, fpm->btree_recycle); FreePageSpanLeader *span; span = (FreePageSpanLeader *) fpm_page_to_pointer(base, pageno); span->magic = FREE_PAGE_SPAN_LEADER_MAGIC; span->npages = ...
1
c8301ea6e93dcab3c2d6c7d04e7668c7
1948903705fc0c7d6c9c3a56232472a1
Проверка, что при создании пользователя с существующим именем приложение реагирует корректно
registration_page.register(regular_user.username[1:], regular_user.email, regular_user.password) time.sleep(0.5) err = registration_page.error() assert err == 'User already exist'
1