query_id
string
corpus_id
string
query
string
code
string
label
int64
3445ff266984507ea99bf3f62d63cea7
f1a6a9841282e7ce55bcdd754b321348
# extract the booked hotel for one search
{ $bestHotels = new BestHotels(); $getHotelsData = $bestHotels->getHotelsData( "2019-11-01", "2019-11-18", "AUH", 4 ); $this->assertArrayStructure($getHotelsData, ['*' => ['hotel', 'hotelRate', 'hotelFare', 'roomAmenities']...
0
9c2ec0c7c8a776735ad4d75236e96144
2aee1ea8bee22f3b3e3fe91cdf273597
We have to disable the AVR's internal pull-up resistors to get our sensing to work (technically, we can still do this when we're using an external pull-up resisor, but we disable them globally for flexibility
void enableInputPullups(void) { DDRB &= ~((1 << PORTB1) | (1 << PORTB0)); PORTB |= (1 << PORTB1) | (1 << PORTB0); DDRD &= ~((1 << PORTD7) | (1 << PORTD6)); PORTD |= (1 << PORTD7) | (1 << PORTD6); }
0
f598839db842fec2ee8e9921eead4248
4a707f6ae681423841bbc884eb8e4cc1
The handler for the "dasm" command
static void cmd_dasm_to_file( void ) { char buffer[127+1], *cmd = CMD; const char *filename; int length; FILE *file; unsigned i, pc, size, start, end, width, opcodes; filename = get_file_name( &cmd, &length ); if( !length ) { win_msgbox( cur_col[E_ERROR], "DASM arguments", "Filename missing"); edit_cmds_...
1
7a45c4c7ebf201cea4482bf3c905e3a1
c107f9086c11f95f3404a9566449f08f
Zkonvertuje stav v rozhrani na stav FreshService.
namespace SynchronicWorldService.Business Models.EventStatus ConvertEventStatusToWcfEventStatus(EventStatus eventStatus);
0
b028bcb75d18ebb51ae7ce3292f9722b
0d5ba260922e099f3bea233d3c32e5c9
Based on from and to value will fetch details from Database
public List<T> getData(int from, int to);
1
c00c3738d093b5c87fcfea08dc816393
bc3449026d55adb3beea8052dd77719a
将数组转换为以 "/" 分隔的字符串
function arrayToStr(array) { var str = ''; array.forEach(r => { if (typeof r === 'string' && r.indexOf(':') > -1) { if (str == '') { str += r; } else { str += `;${r}` } } }) return str; }
0
02269ffb1c34fd0b7ec494b17f1b4427
e778b98e17837a12d5355e612617e4b4
给用户礼包
{ $result = false; $transaction = \Yii::$app->db->beginTransaction(); try { $order = Order::findOne(['order_no' => $order_no]); if ($order) { if (!ActivityGiftRecord::findOne(['order_no' => $order_no, "user_id" => $user_id, "role" => Ref::USER_TYPE_USER])) { $records = ActivityGiftRecord::fin...
1
4e611154807cfa02588ba7544f5e15a8
dc621bc17bf49c4dc1c24ddf75c36c2f
Function requires zipcode, time, weather input Will construct and execute sql query to find longitude and latitude and traffic severity to display points returns array of array of points
JSONObject getPointsData(String strLats, String strLngs, String year, String month, String day, String hour, String minute);
0
db59817fe64047e6cc0881fdc4889df7
e852c83285055263fa3c3462033a0316
拆将
$this->parent_project_data = NULL; if(is_numeric($arg)) { $split_datas = $this->where(array('parent_prj_id' => $arg, 'status' => self::STATUS_WAITING))->select(); } else { $split_datas = $arg; } if(!$split_datas) return TRUE; $parent_prj_id = $spli...
1
5b8e997cd33363066d3b125376245092
c67933651109bbce2e65192b985cc2e5
根据条件返回立项信息条数
@Description("社团活动立项") public class ClubActivityProject implements DaoBase public int getCount(List cdt) { int iResult = -1; Connection con = null; try { con = DbConnectionManager.getConnection("jdbc/ds"); iResult = getCount(con, cdt); con.close(); ...
1
261bebfbdba1c484a282b9cd475d6593
47701f6122eb1cd2cdc1171662fe7e6c
Velocity callback. Recomputes trajectory when new velocity command comes in
{ cmd_vel_watch_ = ros::Time::now(); if(joy_vel_received_) return; double linear_velocity{msg->linear.x}; double angular_velocity{msg->angular.z}; double right_vel{}, left_vel{}; if(linear_velocity == 0) { right_vel = angular_velocity * BASE_MODEL_.Wheel_Base/2000.0; ...
1
e1bb81346d0b726d23dd5b6d6bbe3daf
edbc3dda1c5cd75e3ef3388db7b7a339
! This state waits for APS confirm or timeout for an ongoing poll request. In any case it moves back to PollNext state. If the request is successful the DEV_PollItem will be removed from the queue.
{ Console.WriteLine("MstpStateActionPollForMaster"); _bacnetMstpLink.EnableRx(); _bacnetMstpLink.RxTimeoutSetting = TUsageDelay; _bacnetMstpLink.RunRxAnalyzer(); if (PollForMasterState_ReceivedReplyToPFM) { Console.WriteLine...
0
1f7c1da3ec50d93d6ac8e2e0e60af70e
8a0c4d1c2de9da57b3a07c9187e96085
Calculate the halo-matter correlation function.
ctime = params["cortime"] lamb = params["reorg"] with frequency_units("int"): omega = self.axis.data cfce = (2.0*lamb/ctime)*omega/(omega**2 + (1.0/ctime)**2) if values is not None: self._add_me(self.axis, values) else: self._add_me...
0
d1298c8f6bbd7932dd5824de8a2caaaf
2a02d5058846c4a3f11ec2846ab507cc
GET: Handymans
namespace AceAdmin.Web.Controllers public class WorkerController : Controller public ActionResult Index() { var model = db.Workers.ToList(); if (Request.IsAjaxRequest()) { return PartialView("ViewData", model); } return View(model);...
0
a02cf2f549dbcede3124895d8f0b232b
0b94d5301630ffe30b28639f5e3a8281
求取最大公约数:欧几里得算法
public class WayToUpgrade private static int GCD(int x,int y){ return x%y==0?y:GCD(y,x%y); }
1
1d29ed58b28a42536d56e863eb369575
f87b9b9a7e1fc10d69d9e4f53f198a04
Test if group is empty
class states_group public function is_empty() { return count($this->states) == 0; }
1
95ad442168ec308e348e590c5f7de12b
185455ee8246a97f6698f7fb83334fb9
初始化兑换商店规则
{ Exchange bases = new Exchange(); hbexchange state = RequestJson.RequestJsonToObject<hbexchange>(Request.InputStream); if (state == null || string.IsNullOrEmpty(state.access_token)) { bases.code = (int)ApiResultEnum.令牌过期; bases.msg...
1
49ab5867e1e60b455bf45bdd44daf0d8
503d7a4267408589038fbcf7a1e085a8
快慢指针的间隔是n,当快指针走到最后,那么慢指针所在位置就是要删除的节点 删除某个节点,需要先找到它前一个节点
class Solution: def removeNthFromEnd(self, head, n): if head == None or n < 0: return head lf, rg = head, head for i in range(n): rg = rg.next if rg == None: delNode = head head = head.next del delNode return head ...
1
5a73927068934cb0ecd17b9eae4fc531
d2392d42e136dfd748943105b41910b6
获取个人用户的CID(设备id)
public class Users public int getCid() { return cid; }
1
44ece24bf28d224e64ab6ab19757da7f
ef1d3b2234fdc83ed1444c8a4d64b59b
A 'docente' access test example.
self.client.force_authenticate(user=self.user_docente) data = [ { "dni": 6, "nombre": "Danilo", "apellido": "Reitano", "email": "danilo@danilo.com.ar", "legajo": 1, "fecha_nacimiento": "08/02/1998...
1
1957fb6d49acb651e7c246f21db05aff
da7982ade9c93860090d329933f39c3b
Remove images beyond the permitted number.
export default class ImageList extends React.Component render() { if (this.props.images.length > this.props.max) { let d = this.props.images.length - this.props.max; this.props.images = this.props.images.splice(d, this.props.max); } return ( <Table> <thead> <tr> ...
1
e004dadfc3c52bc59223d053d770c4cf
f67bff46d53183c43ba6151c076fc642
Views patients.
public IActionResult GetPatients() { try { return evaluator.GetPatients(); } catch (Exception e) { return BadRequest(e.Message); } }
1
ea09512f0c8aabc24dee148e843db5b7
fa91e22a782748909de9be83938733f1
从html标签中截取图片信息
soup = BeautifulSoup(html, 'html.parser') pic_src = soup.find("div", class_="main-image").find("img")["src"] pic_txt = soup.find("div", class_="main-image").find("img")["alt"] pic_url = {"src" : pic_src, "txt": pic_txt} return pic_url
1
244be85ec27968bb321ad9f6e45bcc03
8371e86aec4d0354a51175e4561c6ed0
根据采购单id得到供应商信息
{ if (!$this->purchase_id) { $this->msg = '没有主键'; return false; } $m_supplier = M('Supplier'); $supplier_id = $this->where(array('purchase_id' => $this->purchase_id))->getField('type_id'); if ($field) { return $m_supplier->where(array('supplier_id' => $supplier_id))->getField($field); } else { ...
1
37adaeb00f111e28bcd11124ac17869c
9ba80125832f068fff0e5845c10ca569
A decoder algorithm to retrieve sequences from decoder output Inputs inputs (tf-tensor): Output from decoder, size (batch, max_seq_len, num_chars) Outputs seq of greedily decoded sequences
probs = self.probs_batch(inputs) result = [ctc_decode(p, **kw) for p in probs] return result
1
91e89b955196ca010863b7513e347f9f
625d998b9b399a6c650618cb7b825ac1
Processes a YaraProcessDumpInformation further. This method is called at most once per YaraProcessDumpInformation. It is called when a YaraProcessDumpInformation and all its memory areas have been received.
match = self.RE_PROCESS.search(self.dump) if match: self.pid = match.group(1) self.processName = match.group(2) match = self.RE_TOTAL_PSS.search(self.dump) if match: self.totalPSS = round(float(match.group(1))/1024,2) match = self.RE_JAVA_HEAP....
1
4b56fd4e42daaa62d7a1dad4d83124e6
ec6ca2c9ee24da68bbd01d13e859ea17
Identify the nodes which should see the query based on partition resolver
public function discoveryQuery(Node $input, Context $context) : StatementInterface;
0
8f8bbdf12ec217f4d79d59f3ca0edd07
57fcf857d4c297d090d6ee2de6b97326
Fonction qui va tester s'il existe un coloriage possible pour une ligne de la matrice
def verification(fichier): matrice = fabrication_matrice(fichier)[0] bille = [0, 0, matrice[0][0]+1] return solveur_optim(matrice, bille, set())
0
6abb1e0049a0c56d3e08d393dceb0706
04b1a0392a4b3cfc1f1cd9c589c7b387
Obtiene privilegio.
public function getPrivilege($id);
1
8559a1b455e44e7725cc1002e44d3ab9
42b6595cd1c461ddb687e556efe4f763
判断服务器地址表是否为空
class VM: def DNS2_is_empty(self): if self.DNS2 == None: return True return False
0
a14db08fe4c9b0f42fdfd42db3dd75c2
ea3d3e3210a91e794bf3f266f7eaf163
hsi转rgb
il.RGB2IHS(img) img:mapPixels( function(i) return 200, i, 200 end ) return il.IHS2RGB(img) end
1
0f26608893100b49fb75250bc576dcf7
76d8b7e7d7035d06d5b31ae0fd7d499f
获取iceberg表指定数量的最新的commit msg记录。
String getLogs(Long lines);
0
86d698584b6dc1581d2c3e7e94f5bdd6
dc34c973bbfc97132412f4a60327c9e2
Get the value of a GreyList item
char *query, *r; MYSQL_RES *result; MYSQL_ROW row; struct list_item_t *ret = NULL; int i, fields; CHECK_MYSQL_CONNECT; query = (char *) malloc((112 + strlen(url) + strlen(cookie)) * sizeof(char)); sprintf(query, "SELECT * FROM `graylist` WHERE url='%s' AN...
1
961b0d055560b32213b68c0601a2777c
eb883e1bfdda4248e0e33ef421fb9f06
Send user input to the prediction service.
function sendRequest(input) { if (input !== undefined) { } else { var input = document.getElementById("textarea").value.trim(); } if (input.length>1) { var data = JSON.stringify({"input": input}); var xhr = new XMLHttpRequest(); xhr.withCredentials = true; xhr...
1
f561886e45e59aec2e62fe86391d2ff8
6ee68a6c90131ee724491c53c1934f1b
Returns eigenvalues and eigenvectors of a given diffusion tensor Negative eigenvalues are set to an arbitrary small value.
def eigs(m): D_half = np.diag(m.sum(1)**(-1/2)) I = np.identity(m.shape[0]) norm_L = I - (np.matmul(np.matmul(D_half, m), D_half)) return LA.eigh(norm_L)
0
1ac87e6727b06fe2194c6ff0c2c23d5d
297ed714a9f12a23a865b4463100d8c0
返回SurfaceView的SurfaceHolder
public class CameraHandler class CameraSurface extends SurfaceView implements SurfaceHolder.Callback public SurfaceHolder getSurfaceHolder() { return mSurfaceHolder; }
1
74a963ac3acf65f803f6007c7ac292cb
125f931f4bb7f9f1acba99f5c4776bab
https://gist.github.com/codeBelt/2e3db2ae6db24e86a9a6
function copyTextToClipboard(text) { var textArea = document.createElement('textarea'); textArea.style.position = 'fixed'; textArea.style.top = 0; textArea.style.left = 0; textArea.style.width = '2em'; textArea.style.height = '2em'; textArea.style.padding = 0; textArea.style.border = 'no...
1
0779beb5f23b8e78e8d3e927a26228ee
60cb1c3877fd9237f792243809bfd520
Format byte range for use in header.
def _parse_range_header(range_header): if not range_header: return None, None try: range_type, ranges = range_header.split('=', 1) if range_type != 'bytes': return None, None ranges = ranges.lstrip() if ',' in ranges: return None, None end = None if ranges.startswith('-'): ...
0
a2c372352288e8476f605d1b942e391e
fe8357f1f80abb4a30cde67281cff4e6
For the given phone number columns, apply normalize_phone_number().
class CountryCanonizer(object): def _canonize_simple(self, phone_number): canonize_success = False for index, regex_repl in enumerate(self._regexes_lst): regex, replace, should_canonize = regex_repl match = regex.search(phone_number) if match: if shoul...
0
7ea24dce4b062ae61a89aac35c186e8d
9b01374e5b93f3b3e9237b9dd3d218f5
Új edzés entitás bevitele az adatbázisba.
class AllatokMarhaController extends Controller public function create(array $data) { $marha=$this->elokeszites($data); $user = AllatokMarha::create([ 'enarszam' => $marha['enarszam'], 'neve' => $marha['neve'], 'neme' => $marha['neme'], 'szuletes_datuma' ...
0
8f9d675e992299a73e84f7277a86b1f3
9e2327fee22e1dc75b6415b1e7f72104
Metodo donde se agregan los pedidos, si no hay ninguno se crea una nueva instancia de esta lista, sino simplemente se agrega un nuevo pedido
try: if(len(carritoDeCompras) == 0): return redirect('crearpedido') if request.session['proveedorActual'] == None: return redirect('crearpedido') dataPedido = [] tiempoActual = timezone.now() valorTotal = 0 idProvActual = request.session['...
0
97bff587a5e7cb49f974ca7a47146dd3
b6b7e30428e43c1973bdf09d4c786676
批量注册人脸至沃土平台
try { return getClient().batchAddFacesWithOptions(request, aliFaceBodyClientSupport.getRuntimeOptions()); } catch (Exception e) { throw new RuntimeException(e); } }
1
489f79c9265b27a94f2fa1ad45fc46b2
822ffc2d75a247c2172733cc397d05ce
Fonction qui récupère la liste des paniers d'un utilisateur
class items_panierApiController extends Controller public function index() { $items_panier = DB::table('users') ->select('users.user_id','t_items.item_id','t_items.item_name','t_items.item_description','t_items.item_date_creation', 'from_user.user_id as from_user_id','from_user.name as from_...
0
0032e949d2397670012009641b8cef12
cc5cc6ea98e3931d1d44c421f23439fd
\brief - Structure for decorating a cell matrix with minesweeper cells to handle certain specific logics.
id_( id ), minGridX_( 0 ), maxGridX_( 0 ), minGridY_( 0 ), maxGridY_( 0 ) { }
0
b781378d13155fb16d0c54da9ee9d516
d34efce71d0da30bf403c330657134bb
Returns <code>TRUE</code> if the amount of text in the field meets or exceeds the {@link #getThreshold} requirement. You can override this to impose a different standard for when filtering will be triggered.
default boolean exceedsThreshold(final HttpServletRequest request) { return false; }
0
d85de453bbaa6356159b59f8a10379a8
42d8b802259337769d2cb01ca5be0341
Sends a data page to this service
namespace ColorimeterService.Service void sendData(byte[] bytes);
1
b0b5552d1657d264285d477fdaa12044
2a5baa386c008e37a1924ac19b9e3639
Returns the time bins (list of N+1 time flags in case of N time bins) associated to the projection.
extern int get_static_projection_info_prompt(unsigned int *time_bin, unsigned int *time_start, unsigned int *time_end, unsigned int *N_counts, unsigned int *N_locations, float *compression_ratio, float *listmode_loss, unsigned int *N_axial, unsigned int *N_azimuthal, float *angles_axial, float *angles_azimuthal, float ...
0
4fbb1b7a9dd986dbbf287cd36b441e6f
54411127b0f297438c775a1893c2866d
Show the form for creating a new Game.
class GameController extends \BaseController public function create() { return View::make('games.create'); }
1
994a796dcb4e70be8ce080bd8c7537b2
e0304d3e70bdb64e345effe8bc80e04b
Calculate the maximum value, given a histogram.
class Histogram1D: def max(self): result = None for x, v in self.iteritems(): if v is not None: result = v if result is None else max(v, result) return result
1
f922101c5fe6c8b59c8530346d5f5706
34615b7d5f9790a2820ab4da9c5f7991
获取苏宁的订单,并同步到数据库
namespace HozestERP.BusinessLogic.ManageProject void SynchronousSuningOrdData(string createDateStart, string createDateEnd, ref int InsertCount, ref int UpdateCount, XMOrderInfoApp xMorderInfoApp);
1
03fcef79abfd90e42f650d0dca72cfc0
fb0114d8b4b7189792acde6feca4a750
Visit all keyword's call in suite_setup to do somethings.
class FileChecker(ast.NodeVisitor): def visit_TestTeardown(self, node): if self.checkKeywordAndResource: self.is_keyword_used_for_run_keywords(node) elif self.checkModelsUsingSameKeywords: self.append_same_keywords_for_run_keywords(node)
0
2fa61efc824e76655a0c11586d91b3e7
83ceae3d0a4aea0f28a1967da968c8b7
Convert a list of lists to a list of dicts given a header list
if not columns: return [] column_names = columns.keys() return [ dict(zip(column_names, values)) for values in zip(*columns.values()) ]
1
fedf09b7bd173351d3d0f67aa3006ea1
e73010811df22210ed7ab57033781191
设置是否免费, 一般用于服务类型商品. 参数示例:<pre></pre> 此参数必填
if ($isPostFree != CHWechatShopConst::POST_FREE && $isPostFree != CHWechatShopConst::NOT_POST_FREE) { throw new \RuntimeException('PostFree invalid!'); } $this->attrExtData[self::IS_POST_FREE] = $isPostFree; return $this; }
1
bdb9f1029c51d2aa22ab8d1cfe0406da
a1aaf09538b42cd8a23dfd8d132a3389
Initializes table attributes from information provided by the table setting and the database.
addGeneratedColumns(table, dataDecl); initTableColumnHeaders(table, dataDecl); initTableVisibleColumns(table, dataDecl); initTableCollapsedColumns(table, dataDecl); initTableColumnConverters(table, dataDecl); }
1
0f5e90ea23aa7684596a5f0b59e7a859
1c9c10f349b03dde0b2acc53561c1975
checks if bag is full
public class Bag : MonoBehaviour public bool Full() { return this.num >= this.inventorySize; }
1
9d09558cfd626b1eab7924449c57fb96
d299111f548c1a2e35b58009dc79ebcf
Computes and returns the planar area of a single fin in the set
if self.isSymmetric is True: return np.r_[self.areaFx, self.areaFz] else: return np.r_[self.areaFx, self.areaFy, self.areaFz]
0
2e2082030e5a5c30e1f9e95136a39cdd
28c6e17f1dbc8b4757b5155f2f69ba6a
attr_sep = "="
class Parser(object): def parse_attribute(self): name = self.consume_alphanum() assert self.consume_char() == "=" value = self.parse_attribute_value() return (name, value)
1
7cd515543368d89b9fbbe9b9c774609e
ddd006a832f81a386d2bf1f849e7650d
=============== HÀM CẬP NHẬT LẠI TỔNG THÀNH TIỀN CỦA GIỎ HÀNG ===============
{ $carts = $this->cart->contents(); foreach($carts as $key => $row) { $total_qty = $this->input->post('qty_'.$row['id']); $data = array(); $data['rowid'] = $key; $data['qty'] = $total_qty; $this->cart->update($data); } redirect(base_url('gio-hang')); }
0
81627c9a63f800f1f528425695dad125
38caeb8f9c881c4a6d2b5db1e633dea3
========================================================================= Uranus longitudes (IERS 2003) =========================================================================
t = self.jc try: return (-0.052928 \ + (10.556378 \ + ( 0.4932044 \ + (-0.00031238 \ + (-0.000002788 \ + ( 0.0000000260) \ * t) * t) * t) * t) * t) * lcst.AS2R exc...
0
787b5c505e890a90112b7d083240f4e3
1fefa7d3cd0e0fb3e4f7eedc067bbe8b
Transforms this sequence into a series, by running a loop.
T Sequential();
0
52530dcc4c661f3eabe7eae20d728803
d111a7d28e89e7a269238af8c0f9174c
执行带有参数的SQL语句,得到一个结果值
{ SqlConnection conn = GetConn(); SqlCommand comm = new SqlCommand(sql, conn); try { comm.Parameters.AddRange(param); conn.Open(); return comm.ExecuteScalar(); } catch (Exception ex) ...
1
f9a7c39bbcb9eeeb8e791f0d1f07a31d
e2d92c42ac3ca5a65120cf81ec615a68
Initialize the data structures for the server. Handshake with any new nfsds starting up to avoid any chance of corruption.
APPLESTATIC void nfsrvd_initcache(void) { int i; static int inited = 0; if (inited) return; inited = 1; for (i = 0; i < NFSRVCACHE_HASHSIZE; i++) { LIST_INIT(&nfsrvudphashtbl[i]); LIST_INIT(&nfsrchash_table[i].tbl); LIST_INIT(&nfsrcahash_table[i].tbl); } TAILQ_INIT(&nfsrvudplru); nfsrc_tcpsavedreplies =...
1
8efd2c023e68f90d02fe975079810350
01f678dbc5654f56c64a3df67cc8b36b
sets Circle Profile Image
protected void setResource(Bitmap resource) { RoundedBitmapDrawable circularBitmapDrawable = RoundedBitmapDrawableFactory.create(getContext().getResources(), resource); circularBitmapDrawable.setCircular(true); ...
1
fe9a105347c55f8c04c0c68c09e9750e
d9a8a0b16de005f52085d4a88836f940
显示字符串的后四位,用于显示手机尾号,银行卡尾号等地方
if (StringUtil.isNotBlank(bankNo)) { return "******" + bankNo.substring(bankNo.length() - 4, bankNo.length()); } return ""; }
1
dce174f4426ccf0f1c5c1b5ccbcdf9f3
e5adbf5b347c03129d6f2f29329709d0
공사_셀_정보(TN_CNTRWK_CELL_INFO)을 등록한다.
@Repository("jnitrscDAO") public class JnitrscDAO extends EgovComAbstractDAO public String insertJnitrsc(JnitrscVO vo) throws Exception { return (String)insert("jnitrscDAO.insertJnitrsc_S", vo); }
0
76b6dbaf08921bba18dfa3d2031067d4
2ca44b31a383a292cbf592e553abc9ee
print the contents of a node without newlines
void NN::printNode(node * ptr) { cout<<"Num next nodes: "<<ptr->next_index<<endl; cout<<"Good: "<<ptr->good<<endl; cout<<"Bad: "<<ptr->bad<<endl; cout<<"Okay: "<<ptr->okay<<endl; }
0
4e638661738328da66dd10a6967cf4a5
27bfc1b235c6c49e3b858648153f7a52
Read the packet and move the index to the next word after the packet end.
unsigned inputDataSize, unsigned* dataIndex) { if (!inputData || *dataIndex >= inputDataSize) return -1; int packetDataSize = PacketDecoder::GetPacketDataSize(inputData + *dataIndex); *dataIndex += sizeof(PacketHeader); memcpy(packetDataToWrite, inputData + *dataIndex, packetDataSize); *dataIndex += pac...
1
9882567b418652b709f634f92c9b2254
c63edb2815434d455d3fd6a9ce92dd0d
Returns a given child node's parent index
{ for (int i = 0; i < node->n_children; i++) { if (&node->child[i] == childNode) { return i; } } return -1; }
0
0af2b9a2922d6f489a62b1ddbc3409b4
1a2f746443f7c3661a6d90f0e5aef54b
use this extension point to store formatting information, e.g. for final sorting.
namespace ClearCanvas.Ris.Client [AssociateView(typeof(MergeComponentViewExtensionPoint))] public abstract class MergeComponentBase : ApplicationComponent public abstract object FormatItem(object p);
0
a83752b197be6aae30dc5e65e895e01f
25e8e53c5e52b4438457dc6fb6ea6547
Returns links before active page
{ if ($this->currentPage <= 1) { return '<li class="arrow unavailable"><a href="">'.$text.'</a></li>'; } else { $url = $this->paginator->getUrl($this->currentPage - 1); return '<li><a href="'.$url.'">'.$text.'</a></li>'; } }
0
9ac271799207741eabd490841a2d5cc9
d7fd25a4fd5cfcd3cf795c213eafba3c
Setter method for the selected note-person relations.
public class Notesmoneysview public void setNotesinswho(String notesinswho) { this.notesinswho = notesinswho; }
1
108ffc5c474b7f09abe12f990c57c568
0cdaf2b6dc2e7828a6725165bdc6dab2
선택한 캐릭터의한 로비정보 적용
namespace SelectCharacter public class ChooseCharacter : MonoBehaviour public void OnSelectCharacter(GameObject character) { EventSystem.current.SetSelectedGameObject(null); myGameManagerData.SetCharactor(character); gameStartButton.SetActive(true); }
0
5818433a884086825f0567ba6ab450e2
54db2554247a105f6f925e51847784ff
每个商品属于一个品牌
class Product extends BaseModel public function linkBrand() { return $this->belongsTo('Brand','pid'); }
1
c9e54c130029111aae2f0751087528b3
3e21c0c04be495e94e8240833dac47ad
Создать модель, исходя из переданных аргументов - количества скинов персонажей, количества блюд в заказе, количества блюд
{ Meal meal = new Meal(); meal.AddItem(new ChickenBurger()); meal.AddItem(new Pepsi()); return meal; }
0
d34e4573b534c549ab03db19ed7b9701
15c7367c8863d57c2b11ce64ecf3cc81
Scorer, which implements logic of data folding and scoring for classification models. This is a function-like object
self.scores_std = [] self.scores_std_mean = [] self.scores = None self.recognized_classes = [] self.crossings = None self.save_fold = None self.testing_initialized = True
0
fa2462ffaf521b7a9c4ca974ad9cd099
b739d0bc0479c33cdb80a78fadb00473
Create the RequestInterface for getClientApiCredentials.
class Gateway extends AbstractGateway protected function createRequest($class, array $parameters) { $this->httpClient = $this->httpClient ?: $this->getDefaultHttpClient(); return parent::createRequest($class, $parameters); }
0
14902880c768a0885b80af59288edb07
2f4af929bf036d723c36778c848bcefd
metoda eliminacji Gaussa z częściowym wyborem
{ for(int k=0; k<N; k++) for(int i=k+1; i<N;i++) { b[i]-=b[k]*(A[i][k]/A[k][k]);; for(int j=0;j<N;j++) { A[i][j]=A[i][j]-A[k][j]*(A[i][k]/A[k][k]);; } } double z=0; for(int i=N-1;i>=0;i--) { z=0; for(...
0
e62bdd590e004f3d2de801e7f08e37ed
758b35f9fdd607eae8508c5ade011c7f
If this property is True, it can only mean that, at the instant the property was read, we were waiting for the stage to finish moving. (Unless you read the property from another thread, in which case its meaning is undefined.)
public boolean waiting();
1
edf9bf966682f67f08345db879cb349e
74d7d4967949ca57575e7a4b0c1c0ca5
Set the bottom navigation background resource
public class NavigationBar extends LinearLayout implements ViewTreeObserver.OnGlobalLayoutListener public void setSearchBackgroundResource(int resId) { editText.setBackgroundResource(resId); }
0
f6f0a94ecfaaaa24d131cdf54190ed39
f49fe0902ccaa87ea57e334bb36753a5
Check to see if ImageTestsConfiguration property is set
namespace Amazon.QuickSight.Model public partial class TableFieldURLConfiguration internal bool IsSetImageConfiguration() { return this._imageConfiguration != null; }
0
13c975f2de9c032b0e79eafc9169f7a9
cec611d90d776a851ff4cf6ebe2eab64
Return all comments on a wishlist.
public function getComments();
1
42e6ab1a14719d50b831872cd38faf2c
2f98357ea2ca3f21d51e4d4a28c1ae52
data konfigurasi modul aplikasi dalam model
{ return array( 'DisplayName' => 'Midtrans Payment Gateway Module', 'APIVersion' => '1.1', 'DisableLocalCredtCardInput' => true, 'TokenisedStorage' => true, ); }
1
e366f922cca9a2f7e6c102c53d307282
1c02a7a85c4725dda02ea490a8f878f8
保存Asset打包配置
{ if (assetBuildInfos != null && assetBuildInfos.Count > 0) { var dataWriter = new ABDataWriter(); ABUtils.CreateDirectory(BuildPath); var filePath = BuildPath + "/" + ABDefine.kConfigFile; dataWriter.Write(filePath, assetBu...
1
37aa65cb392a28698b364b636a34e486
40b8c385d8ba87e4666a09f064348d8f
To override for defining viewBase (default : @framework/crud)
{ parent::beforeRender($event); if ($this->_mappedAction && $this->viewBuilder()->getClassName() === null) { $this->viewBuilder()->setClassName(CrudView::class); } }
1
89909c8ccfdb87db05b0f5c794d16a12
8425d9c4676ab7514da63438d293cc69
Create an image summary entity. This function wraps tf.summary.image.
def make_image(tensor): height, width, channel = tensor.shape image = Image.fromarray(tensor) output = io.BytesIO() image.save(output, format='PNG') image_string = output.getvalue() output.close() return tf.Summary.Image(height=height, width=width, ...
1
68019e4392ae1da3bbe2f9397184a462
3cb1d591e845e6e87c0827aa0f90eacb
@brief 平均值
{ float sum = 0.0, avg; for(unsigned long i = 0; i<_sz; i++) { sum += _v[i]; } return avg = sum / _sz; }
1
d98b51d82f54a4d7beae51e3c034911b
d287923b8aa11f5a7b6aade7bc986a0f
Show all student details related to the subject as a table.
class ClassSubjectApp extends AppObject{ public static function ClassSubjectDetail($id_classsubject){ $db = new Database; $table1 = DB_TABLE_PREFIX . 'profile'; $table2 = DB_TABLE_PREFIX . 'student'; $table3 = DB_TABLE_PREFIX . 'class_subject_details'; $table4 = DB_TABLE_PREFIX ....
1
10e86329028c5f83386b2ef266dbb849
54f1d22a308885442466428b45b55b31
設定Stack最後進入的Node的step資料
int j; for (int i = 0; i < bindingStackStored; i++) { for (j = 0; j < aStep.length; j++) { if (bindingStack[i] == null) { bindingStack[i] = new IntArrayList(); } if (aStep[j] >= 0) bindingStack[i]...
0
19634ceacd7121a1991bd34b7f02ddf8
870e70e364c4f8d95cba1d3f270786af
Initialize the private fields. No one has accessed them before.
namespace Framework namespace Exceptions void Exception::__initialize() { this->has_reason = false; this->has_line = false; this->has_file = false; this->line = 0; this->msg = NULL; this->file = NULL; }
1
7afd7b9501933ce936eb7867e262816c
522a30b05d5d20a37c3096c2ac0f81f6
Gets collection of entries from Employees table with the same position. Used to filter.
namespace Gamadu.PVA.Core.DataAccess.MySQL public partial class MySQLDataAccess public IEnumerable<IPosition> GetPositions() { string sql = "GetAllPositions"; List<IPosition> positions = new List<IPosition>(); using (IDbConnection connection = this.GetDbConnection()) { positions =...
0
ba112349df089d867e3ea6b8acf8081c
b25479f396b66ee0f5b8786a8b721b33
retorna un observable de un arreglo de usuarios
export class UsuariosService getUsuarios():Observable<Usuario[]> { return this.http.get<Usuario[]>(this.url_getUsuarios); }
1
c7442da19bad245cd0a529107ecde9a0
ebca6d24803741780751517b0ee0a911
从数据库读匹配日志信息,返回匹配日志信息集合
list<MLogRec>& LogReader::readLog(void) throw(ClientException) { cout<<"读取日志开始..."<<endl; backup(); readLoginsFile(); readBackupFile(); match(); saveLoginsFile(); cout<<"读取日志完成"<<endl; return m_logs; }
0
074b3381034383b91ed9b18c74f13e3a
e496d11c9121027851d718ee91edda90
Solves for the source panel strengths required to guarantee tangential flow at the centre of each rectangular source panel.
xc,yc,sx,sy = self.get_array('xc','yc','sx','sy') A = numpy.empty((len(xc), len(xc))) for j, p_j in enumerate(self.panels): u,v = p_j._constant(xc,yc) A[:,j] = u*sx+v*sy numpy.fill_diagonal(A,0.5) ...
1
f73d2d4ad42c678dbab387c074dbae72
cfd3e3c7874eee47673b48b69b1b7a57
请求购买资源
buyer = request.user data_list = request.data.get('data',None) if not data_list: return JsonResponse(u'请传入合适的参数',status = 0) for i in data_list: print i['id'] if int(i['id']) not in buyer.cart: pass for data in data_list: ...
1
40ef8445c30935f21547e830a8d7c927
9f959b7247e992477c6b8fb1897e5a43
Import the bookmarks from XML.
public class SimpleBookmark implements SimpleXMLDocHandler public static List importFromXML(InputStream in) throws IOException { SimpleBookmark book = new SimpleBookmark(); SimpleXMLParser.parse(book, in); return book.topList; }
1
d6429ab4fe4b44fc6913eba3476548b5
a96fa93ce95f661ff9136da77cc3c656
指定された終了コードが終了条件に一致しているかを判定する。
{ var done = WaitUntil( () => { if (targetProcess.WaitForExit(0)) { return true; } switch (this.CheckState(targetProcess...
0
35efc0da687036b1969c81280e9a118e
e8989a125c53e9344419416f88ce8ef9
获得RedissonClient用来调用其他方法
public class RedissonUtil public static RedissonClient getRedisson() { return getRedissonByClassPath("properties/redisson.json"); }
1
b519d50a7b5fbed2e1caa06b22334d4c
47c0924e1c9e68caab3381f12c1c70db
Gets the different layers to the song
class ArticlesTableEx extends ArticlesTable public function getLayers() { return $this->layers; }
0
3cefeeb8cd12b9eedc7e2e3fa97f0c77
4bc4f1e4661d9f29621c447d76ee09a3
Получаем актуальную дату-время
namespace PurchaseOrder.Domain public class Purchase public DateTime GetDate() => new DateTime(Date.Ticks);
0
839cefd28f9f91d49ebf7a73bd8ff759
ee5aa627d1299fb4bccb3dc940f49d6b
创建语音输入模式UI
try { mDialog = new Dialog(context, R.style.hg_dialog_1); LayoutInflater inflater = LayoutInflater.from(context); View view = inflater.inflate(R.layout.audio_dlg_pop, null); mDialog.setContentView(view); mIcon = mDialog.findViewById(R.id.dlg_recorder_i...
1