query_id
string
corpus_id
string
query
string
code
string
label
int64
0c085b1e2867ea4aa4008a8273062e5f
a25ea5b4d0fded8472886f531a5ef81f
检查充值金额是否符合设定
function checkRechargeAmount(obj) { if (!check.isinput(obj.val())) { obj.closest('li').find('.form-error').show().text('请填写充值金额'); return false; } if (!check.isrechargeAmount(obj.val())) { obj.closest('li').find('.form-error').show().text('填写金额有误,请重新填写'); ...
1
b4db4afb3a1792073d033c083ffcc968
34aef41428e5f7e3cb9b393c3fa44bf8
Set the resolved symbol information for the given symbol name.
namespace BuildXL.FrontEnd.Script.Values public abstract class ModuleLiteral : ModuleOrObjectBase public virtual void AddResolvedEntry(FullSymbol fullName, ResolvedEntry entry) { CurrentFileModule?.AddResolvedEntry(fullName, entry); }
1
02e38e5d90ada5d7495f4ebca428f41b
d62032cf79876c39601aedd6eb30e219
function to include account domain
m = getDomainFromAcct.match(acct) if m == None: return None else: return m[1]
1
059927d56b406baa13cd5482dde57128
180e79f2804d5c4836d2293757ccf9d4
Construct the H_{el} function, the elastic energy function.
def E_loc(Psi, DW): kin = -1. / (2. * m_red) * sec_dir(Psi.coords, Psi.shift, DW) pot = Psi.V Psi.El = kin + pot return Psi
0
b6c8ad1943ded85723d668c9caae5831
9ef7bbcd9b382b12ffd0f52a6a1df283
You can't connect a dendrite to a global output
class DotConnection(QtWidgets.QGraphicsObject): def isOutputConnection(self): return not self.dagconn.is_input
0
b98efeda3f542550151eb781ce2433f6
2d4f78517d0e6bfd70ae42e38a8e0455
Give never-used clusters back to the global bitmap. We don't need to protect these bits in the undo buffer.
void DRD_(bm_remove_cleared_marked)(struct bitmap* bm) { struct bitmap2* bm2; VG_(OSetGen_ResetIter)(bm->oset); for ( ; (bm2 = VG_(OSetGen_Next)(bm->oset)) != 0; ) { const UWord a1 = bm2->addr; if (bm2->recalc && ! DRD_(bm_has_any_access(bm, make_address(a1, 0), ...
1
3a464773c5688e502a783af5fb367eff
9258c34c2c342b20f1981843f81460ca
Action when on/off button is pressed.
self._buttontoggled = not self._buttontoggled if self._buttontoggled: self.publishMessage.emit(self._topic, self._action_on) else: self.publishMessage.emit(self._topic, self._action_off)
1
9d0c71106cc74c39ed6a03522e91df00
51eaec94e3f092452ba891c20bd4311b
NPU芯片类型,可填:D310,D910
class ContainerResp: def npu_type(self, npu_type): self._npu_type = npu_type
1
7e13f19587c33b41ea5baeae5cca8ef0
22980b191183291cd96bce7d470bdfe4
adds a list of facet objects
if (string.IsNullOrEmpty(facetName)) { throw new ArgumentNullException("facetName"); } if (facets == null) { throw new ArgumentNullException("facets"); } if (_facetFilters.ContainsKey(facetName)) { throw new NotS...
1
8e26529f243bba996c8f60007bc9b6c3
7d2eb3cf6c2252232fc1e257c6f5d4d5
Get an integer representing a pulse definition's carrier mode.
if self.isConnected: pulse_mode = bool(self.get_pulse_params()[1]) SMELLIELogger.debug('SNODROP DEBUG: PQDriver.get_pulse_mode() = {}'.format(pulse_mode)) return pulse_mode else: raise PQDriverLogicError("Laser port not open.") return 0
0
51ff57cf5ca3a570818f34290412d733
892e782a60c6c511584e8ca91e0c3858
Sync details from LDAP
function sync_user_from_LDAP( Principal &$principal, $mapping, $ldap_values ) { global $c; dbg_error_log( "LDAP", "Going to sync the user from LDAP" ); $fields_to_set = array(); $updateable_fields = Principal::updateableFields(); foreach( $updateable_fields AS $field ) { if ( isset($mapping[$field]) ) { ...
1
c863bac446ac3ed84dd9ce338decb431
6193dd3df7b417d6f3e73e85654207b9
=========================================================================*\ Render audio backend format \*=========================================================================
synthBufMode mode) { int len, tmp; synth_err rv; rv = synthTrack_getLength(&len, pTrack, pCtx); SYNTH_ASSERT_ERR(rv == SYNTH_OK, rv); if (mode & SYNTH_16BITS) { len *= 2; } if (mode & SYNTH_2CHAN) { len *= 2; } pBuf += len; rv = synthTrack_renderSequence(&...
1
9026953848d80a633135e1629dabbb37
095c29547cb5feb04af0d27cef19249c
큐에서 value 를 찾아 인덱스를 반환 , 없으면 -1 반환
if len(self.queue) == 0: print("Queue is empty") return -1 index = -1 for i in range(len(self.queue)): if self.queue[i] == value: index = i break if index == -1: return -1 _ = self.queue.pop(index) ...
0
5e08133f735553fe5e0c3161d1b443a8
8246e6bde432166781e8b3e74a26cd6a
Sets the maximum number of requests that get enqueued if no connection is available.
@AutoValue public abstract class OkHttpSender implements Sender @AutoValue.Builder public static abstract class Builder public abstract Builder maxRequests(int maxRequests);
1
404c305179fb40486ed52af5a0bccbb8
13ef3411f684674672ce2b495e93db31
Returns the qtype information to attach to question element
{ return array( 'ragtek_qus' => array( 'qus_id' => array('type' => self::TYPE_UINT, 'autoIncrement' => true), 'user_id' => array('type' => self::TYPE_UINT, 'required' => true), 'associated_user_id' => array('type' => self::T...
0
aec510260e92909544d331d6be79c16f
492367ffe09088179981b99e54845f2e
自定义按钮5的继承执行方法
namespace MEMS.Client.Common public partial class BaseinfoForm : DevExpress.XtraBars.Ribbon.RibbonForm protected virtual void custom3() { throw new NotImplementedException(); }
0
b92ffc589b806154b2a3c0840111849a
4329d5babdd960cc6bdb9be7e9899c57
Rewrites the children of the given exclusive or expression.
namespace Microsoft.Cci.MutableCodeModel.Contracts public class CodeAndContractRewriter : CodeRewriter public virtual void RewriteChildren(ThrownException thrownException) { thrownException.ExceptionType = this.Rewrite(thrownException.ExceptionType); thrownException.Postcondition = this.Rewrite((Postcondi...
0
3df27d54dec519ffba46a8bd8958e332
bf4870f48bec7f82ca54d4595dc7cff7
Returns a variance multipler (picks a random number between the two numbers (both integers) then divides by 100
var precision = 100; var randomnum = Math.floor(Math.random() * (100) * (10 * precision - 1 * precision) + 1 * precision) / (1 * precision); return randomnum; }
0
ebdefcc2dada3d315b900f0863834d71
9c53d1bbdf3cd1a72e1186cf5edbcd22
Set title of X axis
public abstract class AbstractChartArea extends JComponent public void setTitleX(String titleX) { xAxisTitle.setTitle(titleX); repaint(); }
1
3c3da28dabb576599d0459b2eb57079a
def2cceb021a249bb1e6d40c0e632512
Returns a 1 if within range or a 0 if out of range
int check_range(const int check_val, const int min, const int max) { return ( check_val >= min && check_val <= max ) ? 1 : 0; }
1
aac29c45de6f19e238e771059757c338
4680d04bbd23ff7536e265f1ae3f58c3
Set the location of the card pop-up
class WidgetCard extends Widget public function setPopover($popover) { $this->popover = $popover; return $this; }
0
54c50eb1a51d929690ba1c05462b3754
69b1c3b1e9c3e4c36b0521937030784a
根据过滤参数添加数据库DBParameter对象并返回生成的数据库参数名称
namespace DBUtility.ORM public static class Linq private static string AddDbParameter(this List<DbParameter> parameters, object value, Type type = null) { if (parameters == null) parameters = new List<DbParameter>(); var param = NewParameterBySqlType(SqlType.MSSql); ...
1
9db1dd573a645f2bd7356eb84e159580
d9e0129da1a46aebab1dac33dd86cdb5
Creates a GeneralPath representing a curve connecting different points. @param points the points to connect (at least 3 points are required). @return a GeneralPath that connects the points with curves.
Point2D.Float[] p = new Point2D.Float[pts.length / 2]; for(int i = 0; i < p.length; ++i) { p[i] = new Point2D.Float(); p[i].x = pts[i * 2]; p[i].y = pts[i * 2 + 1]; } GeneralPath aPath = new GeneralPath(); if (p.length == 1) { aPath.moveTo(p[0].x, p[0].y); return aPath; } else if (p.length ==...
1
212417eeeca5f52e2ddb99b1565748e6
db0a971639110b322f6b23f4198bc59d
소켓의 패밀리를 얻는다.
mpe_SocketSockLen *address_len) { return getpeername((int) socket, (struct sockaddr*)address, (socklen_t *) address_len); }
0
2c74b290356babb086adca2fc111a4ff
ed22b80fc0f95122696f5f7e5ec6af19
测试500错误页面
@Controller public class IndexController @RequestMapping("/500.html") public ModelAndView error_500(){ return new ModelAndView("500"); }
1
596a110822826eb8393c8b4ccce977e6
561eaff161f14618708581a781d8ee31
Добавить заказ на самовывоз на обработку DDelivery
{ $orderIDs = $this->shop->getOrderIDsByStatus(); if(is_array( $orderIDs ) && count($orderIDs)) { $result = array(); foreach( $orderIDs as $el ) { $item = $this->getOrderByCmsID($el); if( $item && !$item->ddeliveryID ) ...
1
19e5ddd7117c2882c859eb52faa37062
fe57a0214d37595302e7b3e153efd9db
Applies a qualifier search order to this vault.
class AuthorizationProxyManager: def get_qualifier_search_session_for_vault(self, vault_id, proxy): return
0
490b528f1b5aeb9a0f9795444f9438b1
1e2a834aee8a226437fc817ceac2619c
guard procedure to add socket descriptor to protected buffer each buffer has its own mutex, cond_vars sync abstracted away from main.c for ease of use, readability
std::lock_guard<std::mutex> lock(mLock); std::shared_ptr<OnSite::InputBuffer> pibIn = std::make_shared<OnSite::InputBuffer>(fdSocket, pcqIncoming); umInputBuffers->operator[](fdSocket) = pibIn; }
1
3748c0ab1dff74fdaa4b6ec632d7629a
fa1f768ad58f3d10175ef32d205cfd3b
Gets the "asNeededCodeableConcept" element
class GoalTarget extends BackboneElement get detailCodeableConcept() { return this.__detailCodeableConcept; }
0
e6b33265477d8a5a8378f0364bdfdea4
85d6aca982f22abcd3ac89d842ecd984
获取开发商工作台-推荐热门招标分类
namespace Ctrip.Youth.Manager.BusinessLogic public class ForumDefLogic : BaseLogic public List<ForumDefEntity> GetForumDefRecommended() { List<ForumDefEntity> list = forumDefDA.GetForumDefRecommended(); return list; }
0
0c7242b0b76ec8e560e6df4fc9b65cd6
7ac77101e142081bbf8f9ce6cc457a58
Checks whether this user is authorized to access the given url. == Examples user = User.find(1)
class Event def allow?(operation) u = User.current_user if !u.kind_of? User return nil else begin send(['allow_', operation, '?'].join.to_sym, u) rescue NoMethodError return nil end end end
0
61247d927f131a9ca1e18e2891c8a3e2
8f5d68865cab004b381473f110ecdb92
check out the target revision
def repo_checkout(repo, rev): old_cwd = os.getcwd() os.chdir(repo) subprocess.check_call(['git', 'checkout', rev]) os.chdir(old_cwd)
1
d435f3b38001ef15213927b6c044a0f3
ecde38fe43834b9ee3f34172bb355662
Get a node parser based on the name of the node.
public class ActivityParser public static NodeParser getNodeParser() { return nodeParser; }
0
4a1ea826ce02e132b5e4f520a8060e91
c3621014e110f8898d0138c0b4f38e79
Gets the dataset from the CLI context.
def cli(ctx, history_id, dataset_id): return ctx.gi.histories.show_dataset(history_id, dataset_id)
1
4628f85c9cf8894f04f3c12138f1199b
007085d24ecca4282a5e2e008831fc86
Register and unregister for undo/redo notifications.
function setUndoRedo(obj: ILoggableObject): void { obj.__loggable__.canUndo = canUndo(obj) obj.__loggable__.canRedo = canRedo(obj) }
0
46d216cd724dd3990aeb4bbb8ba31b4a
513d135faafb0b38e9164a7c1be4e273
looks in a DOM element for microdata to assign to an Item _extract returns a list of elements which appeared to have microdata but which were not directly related to the Item that was passed in
class BaseCrawler(object): def extract(self, doc, raw_html): doc.raw_html = raw_html doc.medium = self.identify_medium(doc) doc.country = doc.medium.country
0
281a4564b15d7eab5f4d9bde79eac02f
aab8642b89c592007f42c1923d62c57d
Sets object containing line item details for display.
public function setLineItems(array $lineItems);
1
7b7d145ebaa70cc21d5ea55026bc018a
b80d6d80673b8124c5de634bddd70a63
Возвращает перевод текста
$result = ""; if (dc_not_empty($this->from, $this->to, $this->provider_name, $this->string)) { $sql_result = DB::row(" SELECT * FROM `__translate_cache` WHERE `lang` = :lang AND `provider` = :provider_name AND `text` = " . DB::quote($this->string) . " ", [ 'lang' => "{$thi...
1
e9d35553fe2da579923726986be7ff2a
a843c77416268c98d9deb62879d5a458
Extract info about all "active" uniform blocks ("Active" just means that unused (aka inactive) blocks may have been optimized away during linking)
{ UserData *userData = p_state->user_data; int i; int total = -1; glGetProgramiv( userData->programObject, GL_ACTIVE_UNIFORMS, &total ); for(i=0; i<total; ++i) { int name_len=-1, num=-1; GLenum type = GL_ZERO; char name[100]; glGetActiveUniform( userData->programObject, (GLuint)i, sizeof(name)-1, &name_l...
0
fb795489dd5ee98bcb3e5c7657142cbd
96adfd58ffe69ef3d9233346efcb3ad6
Test that all the trials that extend a particular trial have a round number that is one greater than the trial being extended.
if 'Boosting' not in cls.__name__: return n_trials = 20 round_len = 3 algo = hyperopt.Random(DummyDecisionsBandit(3, 2, 1)) trials = hyperopt.Trials() boosting_algo = cls(algo, round_len=round_len) exp = hyperopt.Experiment(trials, boosting_algo) ...
1
f12ee41b9d686c8d0a6061d6a6a5bc3b
8853f834b1eccc15f473ea6c1d2a8f41
Creates an output port <table summary="Response Details" border="1"> <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr> <tr><td> 200 </td><td> successful operation </td><td> - </td></tr> <tr><td> 400 </td><td> NiFi was unable to complete the request because it was invalid. The request sh...
public class TranscodersApi public ApiResponse<OutputStreamTargetCreateInput> createTranscoderOutputOutputStreamTargetWithHttpInfo(String transcoderId, String outputId, OutputStreamTargetCreateInput outputStreamTarget) throws ApiException { com.squareup.okhttp.Call call = createTranscoderOutputOutputStreamTarge...
1
1a210291977788b976a756f4ca4e9f75
937b2fdc994cf22d4e9406dff5d31abb
agrega todas las actividades de un grupo determinado
class TeachersController def show_activities @group = Group.find(params[:id]) end
0
f5b3eb69a2b101ee28c535e77316f230
6a4b2dd61dca94af00ee283eedc8bb51
This method is used to retrieve the questions from the Firebase database.
public class QuestionDetailActivity extends AppCompatActivity private void initialize() { Util.getDatabase().getReference("Question").child(getIntent().getStringExtra("question_key")).addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSna...
1
b4b1f789dba93c9189f21a8ca4699398
3c900a3f42fc58feffb87a41496ab17a
gets the financialSystemOriginationCode attribute value
public class LedgerEntry extends Entry implements LaborLedgerEntry @Override public void setReferenceFinancialSystemOriginationCode(String referenceFinancialSystemOriginationCode) { this.referenceFinancialSystemOriginationCode = referenceFinancialSystemOriginationCode; }
0
74c598927fa2dbcd91ec83c2088d7631
0658174cd112508190f5953108fd4f1a
Returns the average of the match counts.
public int getMatchCount();
0
58b901203ce5d6f2f6724f0569d8c089
df4dfa97e53221e782d838d9df89da5c
自定义槽函数:获取成绩,弹出可以选择或输入分数的输入框,保留两位小数
class SeenFilms(): def get_score(self): self.e_score.delete(0,END) self.e_score.insert(0,self.score.get())
0
e1c0d4ef6c241ddecad4921e7747f6b8
3448ccb425789d36cf679fd8224d5d12
Compose a block of objects from a BVNSB. Returns a value from lmp_db_comp_retval_t. Call this function with block_size==0 if you want to know how big this message is going to be (size is returned in message_size). In this case, block can be NULL.
ALECG::comblk( const std::vector< std::size_t >& gid, const std::vector< std::set< std::size_t > >& mb ) { Assert( mb.size() == gid.size(), "Size mismatch" ); for (std::size_t i=0; i<gid.size(); ++i) { for (const auto& blid : mb[i]) { m_nodeblockidc[blid].insert(gid[i]); } } if (++m...
0
d450a1ea9ff617907175529d3d997747
af68e61dc7fc7f4b93a81bddbdd6c14f
复制,插入前后
{ iterator it; if(pos.ptr==begin().ptr) { push_front(start.ptr->data); curr=head; for(it=start+1;it!=endl;it++) { node<T>* newnode=new node<T>(it.ptr->data); node<T>* tmp=curr->next; curr->next=newno...
1
bcfa62cf2f1a92b102f1cfc61be3dfdb
55729d96356c5e9013ce94fa533ca1a6
function to calculate surface area of a squar base pyrimid
class Pyramid(Square, Triangle): def area(self): base_area = super().area() perimeter = super().perimeter() return 0.5 * perimeter * self.slant_height + base_area
1
2d874ef8a8eb4ac668ef21c62cf8e0a8
3b001075f8aa7e05ec2029600ac6f981
Returns cache key for events
def get_event_key(*args): return _make_memcache_key('E', *args)
1
6b596d3e9226dcd3300acfb52ef36822
0bab4ecc320d79b027c9eb01d593e478
创建销售调整单
class Service_Data_StockAdjustOrder public function createAdjustOrder($arrInput) { $arrRet = []; $arrSkuIds = array_unique(array_column($arrInput['detail'], 'sku_id')); if (count($arrSkuIds) > Order_Define_StockAdjustOrder::STOCK_ADJUST_ORDER_MAX_SKU) { Bd_Log::warning('exceed th...
1
a480bef4ab3974bf92889c9014366d72
00d71eaccb894541b73a6f0a0e21d0dc
Writes cache to the log file.
public class LogAccessFile public void writeCacheAsString(String str) throws IOException { synchronized (lock) { fileWriter.write(str + Constants.ENTER); fileWriter.flush(); } }
1
4548e6fa046586ac2046b942f0e9edd6
89fe12c91b1e1fa19aadd9c6a8609704
Add multiples libraries to the library list
namespace ReSharper.ExportAnnotations public sealed class AnnotationsExporterParameters [PublicAPI] public void AddLibraries([NotNull, ItemNotNull, InstantHandle] params string[] paths) => _libraries.AddRange(paths);
1
3fd0f438cc18ff7096867ffcba7ad01c
da3ca04b28d5f7615aa2cff6b4497d1a
Right Canonical MPS
def mpsCanonical(mps,mixedIndex): for k in range(mixedIndex): d0,d1,d2,d3=mps[k].shape tmp=np.reshape(mps[k],(d0*d1*d2,d3)) q,r=np.linalg.qr(tmp) mps[k]=np.reshape(q,(d0,d1,d2,q.shape[1])) mps[k+1]=np.transpose(np.tensordot(r,mps[k+1],([1],[2])),[1,2,0,3]) for i in range(...
1
b71656bbd43e14d207818e9d6bbc9b0d
fd9d30a3aa2b9f888ddadc6c97845420
SHA256 block update operation. Continues an SHA message-digest operation, processing another message block, and updating the context.
void APS_NAMESPACE(HMAC_SHA256_Update) (HMAC_SHA256_Context * ctx, const void *in, size_t len) { APS_NAMESPACE(SHA256_Update)(&ctx->ictx, in, len); }
1
bcf45715388c2fb91eca0f7b3dac5116
a7aeb05641fce348ca2f28f7a71980b6
Плавно повернуться к цели
Quaternion rotation = Quaternion.LookRotation(targetPosition - transform.position); transform.rotation = Quaternion.Slerp(transform.rotation, rotation, customDeltaTime * 8.5f); }
1
5051b31b75e02161fe3576680b0e9352
da308e928ad03781910beb1dc8146d63
Function that the producer thread will run. Produce an item and put in the buffer only if there is space in the buffer. If the buffer is full, then wait until there is space in the buffer.
pthread_mutex_lock(&mutex_3); buffer_3[prod_idx_3] = line; prod_idx_3 = prod_idx_3 + 1; count_3++; pthread_cond_signal(&full_3); pthread_mutex_unlock(&mutex_3); }
0
155eaa24eda6e7492f547a1e50121c16
129bb3e771903c0a7238dcab6afca688
将数组分页处理,并返回一个多维数组.
{ if (!$is_paging) { return array( "total_count" => 1, "pages_count" => 1, "result" => $arr ); } if (empty($arr)) { return array( "total_count" => 1, "pages_count" => 1, "result" => [] ); } $respo...
1
adc669304eb49eb25f0b11cf24ee1ac1
253847caef5585f2bb33dfed4ffdba55
判断投资金额与可投金额
if (!FalUtils.isEmpty(a0232)) { return "success"; } else { return "投资金额增减填写错误"; } }
0
73a314f1a421e991e3d246aab2cb4c5f
48b272c134c2861488ab526cf76bb790
Do we have this wheel built for the given package and python?
def package_installed(pkg): try: req = pkg_resources.Requirement.parse(pkg) except pkg_resources.DistributionNotFound: return False else: return True
0
6c6e29850c65ae673b2c46c962992c08
4d05602894b4f1ab860fb142334a1bc5
Make yatea result-file-name match filename elsewhere in the workflow
class LegacySurveyImage(object): def compute_filenames(self): self.dqfn = self.imgfn.replace('_ooi_', '_ood_').replace('_oki_','_ood_') self.wtfn = self.imgfn.replace('_ooi_', '_oow_').replace('_oki_','_oow_') assert(self.dqfn != self.imgfn) assert(self.wtfn != self.imgfn)
0
4c113d7c9f5e232a0e7e81bd3bd65678
5a9c732c5821174c2f98570c80bbb65e
Look up a business by its VAT number.
namespace IO.Swagger.Api BarcodeLookupResponse BusinessObjectGetBusinessObjectByScanCodeBusObIdV1 (string scanCode, string busobid);
0
205c50a968467431eba3127040fa7012
917cdfcd685d7c4788aba39ca9c32bb8
指定されたアンケートを集計するときのサマリ側の条件を返す
{ $answersText = $argument['answersText']; $surveyId = $argument['surveyId']; $survey = Survey::find($surveyId); $questionId = $argument['questionId']; $question = Question::find($questionId); $query = $query->whereHas('surveys', function ($query) use ($survey) { ...
1
0a5a709d405731c80feac86d87769810
00476a6442a44da0e95db57713c686a7
Comptage de noeuds. Parcours PreFixe
{ int count = 0; for (int n = 0; n < NoeudGraphe.Count; ++n) { if (NoeudGraphe[n].NumIndex != (int)MessageNoeud.index_invalide) ++count; } return count; }
0
befbdc969d0f6215b3fd5bf8d2b183a2
e872515ed3727d594bd4809db4fadad7
指定したproductIdに紐付いたcontent_dataを取得する
{ if (isset($this->entitiesByProductId[$productId])) { return $this->entitiesByProductId[$productId]; } $customizeDataFactory = $this ->customizeDataFactory ->create(); $customizeDataCollection = $customizeDataFactory ->getCustomizeData...
1
aea3c40c5baf4fd017063224ff0fc02e
1eac4e833e950b32048c6e5573a04cb7
convert the ppm model to the netcdf model.
f_pp = ml_load.init_pp(f_ppi, f) f = ml_load.transform_data(f_ppi, f_pp, f, z) o_pp = ml_load.init_pp(o_ppi, o) o = ml_load.transform_data(o_ppi, o_pp, o, z) pp_str = pp_str + 'F-' + f_ppi['name'] + '_' pp_str = pp_str + 'O-' + o_ppi['name'] + '_' pp_str = pp_str + 'Ntrnex' + str(n_trn_exs) ...
0
8442f99d95726c276cdc00da8371dde3
8dee6aca1236c53c24e97b47fdee6227
Return a list of roles for the given organisation.
namespace Windows.Privilege.Application Task<List<RoleResponse>> GetOrganizationRoles(int organizationId);
1
faa952b33695ae93055d7868d4f8d9c1
2a88e7166d603c54e849ab81b6a3e8a4
MSSQL style connection string parser Returns normalized dictionary of connection string parameters
namespace ProcessData.IDAL Dictionary<string, string> ParseConnectionString(string strConnection);
1
facd9b68d16a9f723eb7577afaf667d0
e2bf1594db42b040b03b043221611913
Obtiene los datos del estado actual del cliente seleccionado.
{ $customer = DB::table('customers')->where('id', $customerId)->first(); $states = State::all(); return view('cliente.show', compact('customer', 'states')); }
0
6198a7fad00d7e4d5872aa17778e20d5
0b9d09f65308852a69884e0dbfdf672f
还书,删除一条借阅记录
@Delete("delete from borrow where bookId = #{bookId} and readerId = #{readerId}") int deleteBorrow(Borrow borrow);
1
6c7748bd0ad3fbdff996e81581ad64d6
2dcae376c7f3b5fc70b54fe1314ab019
TERMINAL
function Terminal (props) { const classes = useStyles(); const [profileToken, setProfileToken] = useGlobal('profileToken') const [open, setOpen] = React.useState(false); const handleClickOpen = () => { setOpen(true); }; const handleClose = () => { setOpen(false); }; ...
1
0fd92ef2debd0a1e90f27803a4143d8f
1036a7a333f30360de9f5e276f7ea6a4
! Sczytuje date w odpowiednim formacie od uzytkownika, sprawdzajac poprawnosc wprowadzonych danych.
public class TIMGUIMainWindow extends JFrame implements MouseListener, ActionListener, FocusListener private void checkDateFormat(){ try { format.parse(Date.getText()); } catch (ParseException error) { System.out.println("[ERROR]@CreateDateDig/checkDateFormat"); J...
1
163f06bce0fd636ef0dcf7d78808828c
158f501458077710f644dc0e7c3a19e7
Gets the value of the children property. <p> This accessor method returns a reference to the live list, not a snapshot. Therefore any modification you make to the returned list will be present inside the JAXB object. This is why there is not a <CODE>set</CODE> method for the children property. <p> For example, to add a...
List getChildren();
1
7af09b1266e3931f6667829cb77c630a
13e886f1b4a00230341cefa068be27fd
This builds the SQL query for modifying the session.
return ( `merge ${ tablename } as T ` + `using (values (?, ?, ?)) as S (${ sidfieldname }, expired, sess) ` + `on (T.${ sidfieldname } = S.${ sidfieldname }) ` + 'when matched then ' + 'update set expired = S.expired, sess = S.sess ' + 'when not matched ...
1
3e42412239d151f1b04315355c0ef78d
76ed23a78abd4e80ca861e1e67381dad
Cifra el mensaje recibido como parámetro con el algoritmo de cifrado afín, un desplazamiento sobre el alfabeto predefinido. Parámetro: message -- el mensaje a cifrar.
output = "" message_text_freq_order = get_frequency_order(message) naive_mapping = dict(list(zip(message_text_freq_order, ETAOIN))) for c in message: if c in ALPHABET: output += naive_mapping[c] else: output += c return output
0
de8ada514f402b32db417221858a5b35
859e04a3e3d5fc5a954d202f18606bac
Modify the media view strings for a shortcut hint in the media table view.
{ $vars = [ 'preview' => $options['preview'], 'compound' => true, 'media_type' => $options['media_type'], 'select_label' => isset($options['select_label']) ? $options['select_label'] : "Select Media", 'change_label' => isset($options['change_label'...
0
efba612933edb02b831cc45e0670462d
dca6f79e24e56e9eafdcee6b3190996b
find mapping regions from a list of minimizer hits
region = [] loc_pre = 0 for x in locmax: loc = np.searchsorted(locmin, x) if loc < len(locmin) and loc != loc_pre: region.append([locmin[loc-1],locmin[loc]]) loc_pre = loc return region
1
5611550033dce5735627f67e72340b7d
ec2f8c40ba8ee3b669347175dff87713
Displays an alert panel to the user giving the user up to three option buttons.
namespace App2.Helpers public static class AlertHelper public static void DisplayAlert(string title, string message, string accept, string cancel = "Cancel") { NavigationHelper.GetNavigationPage().DisplayAlert(title, message, accept, cancel); }
0
df116eb8751f6d0715e8474cc9f5805f
c564aa7ac123cc5cef2c513c458571da
a getter on the number of layer we have
int ForgeWorld::getLayerCount(){ return static_cast<int>(m_layers.size()); }
1
12f35db926661d8541059d913c6385d5
3cd1caec327f605554724e1b5007fa20
This function sorts the users in alphabetical order.
Collections.sort(usersList, (user, u1) -> { String s1 = user.getUserName(); String s2 = u1.getUserName(); return s1.compareToIgnoreCase(s2); }); }
1
c1620e2421b1634a272bf3f48660897c
4312ed7135ee78e134875b9aee98360c
Blocks until a descriptor is readable.
class Wrapper def wait_readable(duration = nil) wait_any(:r, duration) end
1
99f55982f6833f3f56285d119e58a1d9
6e08e59f8674746180bbe087225e405c
Concatenate 2 integers
{ int z = x + y; return x + y; }
0
1139f393a5cdd74d2bb8da440d40d8b5
9c70fd7a61c7204bef0f9bbd2a47273d
获取相反的类型
Type Types::unType(Ops::Operation op, Type right){ auto rtxt = mascType[right]; Type ret; switch (op) { case Ops::u_minus: ret = int_t; if(right != int_t) Errors::throwErr(Errors::op_wrong_type, Ops::opName[op], mascType[int_t], rtxt); break; case Ops::u_not: ret = bool_t; if(right != bo...
0
9ebcf5c66986ac7adc9ff9d6e2c11bc7
f983f1b5e9c43ab4239ac7aaf250b65d
Plays a different tower shoot sound based on which tower is accessing the function.
{ Bomb * shotBomb; if (strList.value(1) == "triangleTower") { shotBomb = new TriangleBomb(QPointF(0,0)); } else if (strList.value(1) == "squareTower") { shotBomb = new SquareBomb(QPointF(0,0)); } else if (strList.value(1) == "circleTower") { shotBomb = new CircleBomb(QPointF(0,0)...
0
33213f65d8ab0bfd48603dae4e4fea00
3c8b0873dbedf7a42e73120beabcb53f
Retourne un caractère en lecture à une position donnée du String. Lance une exception si la position demandé est en dehors de la portée du String.
public class CharBuffer public char read(int pos) { return array[pos]; }
0
7bb80c2d6b2b6f3a5103d626426f2259
ce64c4ea9c1736ec40de0eae55ab91ac
判断一个unicode是否是全角数字
if u'\u0030' <= uchar and uchar <= u'\u0039': return True else: return False
0
37b7583350caa1bc70178a8964904989
b3efa068acdeb1a7862d5f8e34d3e85d
Moves the LevelObject and makes sure it does not exit the screen.
public class DHProceduralAPI extends DyeHardGame{ public void apiMoveObject(int id, double deltaX, double deltaY){ if(!(apiGetObjectPositionX(id)+deltaX < 0 && apiGetObjectPositionX(id)+deltaX > apiGetWorldWidth() && apiGetObjectPositionY(id)+deltaY < 0 && apiGetObjectPositionY(id)+deltaY > apiGetWorldHeight())) ...
1
bb6d36f196e576bbdb5822c4cd65549b
16492a47c0d03b450645f7fed43eb5b8
Ensure we won't notify inactive admins
class UsersWatchingTests(TestCase): def test_inactive(self): watch(event_type=TYPE, email='anon@ymous.com', is_active=False).save() watch(event_type=TYPE, email='active@one.com').save() self._emails_eq(['active@one.com'], SimpleEvent())
1
0d9894c83a30afb53e2c75b051c543c2
0e5bce0a474f2df45916fbd9055b5c08
MELCO WAB / I-O DATA GA-98NB 自動選択 レジスタ設定
static void GC0308_WriteMoreRegisters(camera_device_handle_t *handle) { GC0308_Write(handle, 0xfe, 1U, 0x00); GC0308_Write(handle, 0x10, 1U, 0x26); GC0308_Write(handle, 0x11, 1U, 0x0d); GC0308_Write(handle, 0x1a, 1U, 0x2a); GC0308_Write(handle, 0x1c, 1U, 0x49); GC0308_Write(handle, 0x1d, 1U, 0x...
0
5d8a9c32394f48f67d20cc34cb435c4e
cb765237cce9c47e0bce286686835fb0
Truncates the <paramref name="value"/> with a "..." after <paramref name="maxChars"/> Code provided and written by https://stackoverflow.com/users/37815/bryan-watts.
{ if (string.IsNullOrEmpty(text) || maxCharacters <= 0 || text.Length <= maxCharacters) return text; else return text.Substring(0, maxCharacters) + trailingText; }
0
9f9243917914cfcd8aa8a07b4101a360
6db5ea1a5afd2040064f3fa7ecb33e73
Gets the statusId attribute of the CustomerProductList object
public class OrderPaymentList extends ArrayList public int getStatusId() { return statusId; }
0
317a2c13d3d5a07da20a584d480a207e
1255c457deb0d94fdedd59e272889c4a
更新诱饵状态
export class GlobeFish extends Fish public updateState(state: number, odds: number = 50): void { if (this._lastEff) { this._lastEff.visible = false; egret.Tween.removeTweens(this._lastEff); } this.state = state; if (this._isHitEff) { FishingJoy.Laya.timer.clear(this, this._resetHitMov); } ...
1
4c09ca0de61154139510f345dc1d158a
d45d123900528d1f15edcad8788c086d
Show a form for creating a new website.
class WebsiteController extends Controller public function create() { return view('mage2::website.create'); }
1
a1acc99496ac42f878a764dd3680b681
5654dd6d42e17d58bee590cb00ecb27c
Returns the meta object for class '{@link org.InstantiationoftheRiskManagement.Class2 <em>Class2</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getActivity2();
0
57d136453f2d63828cf382607598de1d
4e94a02017e3008cb52e4a99aa55575c
r"""Maximum number of probes that NetScaler can send out in 10 milliseconds, to dynamically learn a service. NetScaler probes for the existence of the origin in case of wildcard virtual server or services.<br/>Default value: 7<br/>Minimum length = 1<br/>Maximum length = 65535
class nstcpprofile(base_resource) : def rateqmax(self) : try : return self._rateqmax except Exception as e: raise e
1
57a930169c80beeda7988c533f3a7fbe
637b4ae49a34d68221e70b6b38e3509c
Test case for projectsProjectIdOrdersIdConfirmPatch .
class DefaultApiTest extends \PHPUnit_Framework_TestCase public function testProjectsProjectIdTranslationsVerifyPatch() { }
0
4f864f239a927d9b7f1bf123e2c33ecb
9dc1fa28fc8bdff835c5b8e92dc2bce0
@brief Disable line interrupt.
void linDisable() { PSW_IEN = 0; rxDataBytePtr = 0; }
1
9d2a40e9f38eb8df7c93f14d80bb44f4
36c2c869a99760a89976c5470db9407a
Make a template item answer key which will uniquely identify the answer for a specific item
class OpenEndedModule(openendedchild.OpenEndedChild): def get_answers(self): anshtml = '<span class="openended-answer"><pre><code>{0}</code></pre></span>'.format(self.answer) return {self.answer_id: anshtml}
0
effc09bdb213cb120cfaefcc57909c3f
ab52dc3c167268df776c204d195b9707
Looks for an entry in the given table type with the given class name. When found, returns the value of the property with the given property name.
{ if (ClassName == null || PropertyName == null) return null; else if (PropertyName.Trim() == "") return null; return ClassName.GetProperty(PropertyName); }
0
d3eba895aced4671cb8ec132ea8664bf
f3e0c3e1fd5e277df356829ff639aecf
A getter method to get a company's insider holders data.
namespace IO.Swagger.Api List<GetCorporationsCorporationIdShareholders200Ok> GetCorporationsCorporationIdShareholders (int? corporationId, string datasource = null, string ifNoneMatch = null, int? page = null, string token = null, string userAgent = null, string xUserAgent = null);
1