query_id
string
corpus_id
string
query
string
code
string
label
int64
412fbc09b3ebb76babe0be718b52adec
2d9c8a52d7bde88f151018f53179a476
user_configurations テーブルに登録されていないユーザの場合、空の配列が返却されること
$data0 = $this->__data(); $results = array(); $results[0] = array( 'urlOptions' => $data0, 'assert' => array('method' => 'assertNotEmpty'), ); $data1 = $this->__data(); $data1['user_id'] = 3; $results[1] = array( 'urlOptions' => $data1, 'assert' => array('method' => 'assertNotEmpty'), ); $...
0
b1007363a8e9d44562ede64a739efac2
0ccb8d0f8d8b036ebe0bd5869498dfe5
Process the creation of a new affiliate
class AffiliateController extends Controller public function create() { return view('admin.affiliate.create'); }
0
74d56b93734f72b6d9c033a3b7b59779
4d085839430b0fe6f934dcaee1ac3711
Returns the number of parameters of this operation.
public abstract class ExecutionVisitor <M extends IResolvableModel<V, M>, O extends IResolvableOperation<V>, V extends VariableDeclaration, R extends Resolver<M, O, ?, V>> extends EvaluationVisitor implements IVisitor protected int getParameterCount() { return parameter.size(); }
1
cd4673f6424206add5b851cafd3bb81d
5d7baeeeaa8248418b7e07f8a502839f
定位手机号输入框
inputPhone(e){ this.setData({ phone: e.detail.value }) }
0
6e2ae1f281dee6a8f527c1d0ee793811
ad0901320a159311d37426a09881f945
Question의 질문 투표 결과를 보여주기
{ $id = $request->question_id; if ($id) { $question = QuestionModel::find($id); if ($question) { $voting = $question->voting; $voting->calculateStatus(); if ($voting->status == 'done') { $userAnswers = UserAn...
1
1b9ebb1b4d91c184e8c54945f1725006
34c7a9939a167a4e0dca0c9d9607d1d2
Функция составляет массив со всеми ид-шниками страниц
class Parser: def get_page(self, n, link): return map(lambda val: f"{link}page{val}", range(1, n + 1))
1
486ece54cf49e002efa7a1f1f3f3b0e1
dfd4cd1fe269bdb18afeb0e9578710ef
Provides Collection Index details across all ULBs
const data = []; const res = await this.getCollections(); if (res.data.length > 0) { for (const item of res.data) { const indexRes = await this.getIndexStatus({ collection_name: item.name, }); data.push({ collection_name: item.name, index_status: i...
1
faa83017239cac0b1d864fbce720dbd6
96b886607fbbc485e8ce0313209df36d
Save Freelancer
export class UserFormularioComponent implements OnInit onSubmitFreelancer() { let fd: FormData = new FormData(); fd.append('image', this.files[0]); fd.append('username', this.formularioFreelancer.value.username); fd.append('password', this.formularioFreelancer.value.password); fd.append('firstname',...
1
582fef98bc0a27d6cee842bc569542a9
e249004a8925864762cc32a10d132ce0
Returns a DataFrame with annotation information.
def read_annotation_file(filename): df_anns = pd.read_csv(filename) return df_anns
1
41df6398d1cf86c1415de20dd201c2fa
a69f6a2cd34ad35bf4df916186421a6c
获取装置磁盘使用率阈值
public String getCpuUsageThreshold(@Param("appId") Integer appId, @Param("key") String key);
0
8bb0532404b26a8061d44f4164c1059f
f621fc431fa45fedb848f853e0ad6edd
Returns a list of packages that support Custom Tabs.
namespace DocuSign.eSign.Api System.Threading.Tasks.Task<ApiResponse<TabMetadataList>> ListAsyncWithHttpInfo (string accountId, CustomTabsApi.ListOptions options = null);
0
417110ea46d66c6094ed06bd815324a2
1179674f1bd5548bf599342338a4c774
Constrains each distinct pairs of the variables in the given range of this CSP with the given condition.
varAssignment = cloneCSP[0][variable][0] for contraint in cloneCSP[1][variable]: if len(cloneCSP[0][contraint]) > 1: if varAssignment in cloneCSP[0][contraint]: cloneCSP[0][contraint].remove(varAssignment) if checkConstraints(cloneCSP) == 0: return 0 return cl...
0
caac5921c79d447db612f9d8a3176eff
d9f45684520094a1f43ab9e0c758821d
Metodo per controllare se due quadrati sono uguali
{ if (t1.Square == t2.Square) return true; return false; }
1
9ce9053f650bc3e8b0023dea62d34a00
db4ad40f00af8e5107259d46bfa70f58
调研课题附件回复上传
try{ $('#loadFile').xljAttachment({ appId: 'bbs', businessId: replyId, categoryId: '1', mode: 'add', singleUpload: false, fromTempTable:false }); }catch (e){ } }
1
23ad88d3b3cd7e2da0c57ff055997453
c14105a9f8ab803ad0bd5b2012623874
Trick sphinx into displaying the desired module in these objects' documentation.
class DocTestController(SageObject): def _repr_(self): return "DocTest Controller"
0
3074edce54230cde372099651833ecdb
fb6817cc15b96e6096bc0ba0bb803f7c
Creates a resource that is related to $entity Populates the resource with data from $data array, typically a reference Uses $relationName to create the camel case entity setter name Calls the entity setter with the new resource
class EntityMapper public function makeRelationship($data) { $rel = $this->getRelationshipFromUri($data['self']); return $this->populateRelationship($rel, $data); }
0
10768b8eba337c2488772a1e7b11efd5
067e059e0f2a5725d42d652ccdafbfcb
ひとつ前の操作による変更をやり直せるか。
class JoinTatemono boolean isChanged() { return this.isChanged; }
0
980065b6165fad2e4cd05c298c436531
b01fac75ca39889dcd365753c8cdba34
Convert the output of ``recursive_to_dict`` back into the original object. The output object is meaningful for the purpose of rebuilding the state machine, but not necessarily identical to the original.
def custom_rebuild(custom_pickled): cls, states = custom_pickled.ctor, custom_pickled.states return cls._rebuild(**states)
1
e8d4e9621ccabe408a9d796db6dc3cd5
29889c4948220cdfa01b158152631273
获取学生排名榜列表
function getRankingList (params) { return Vue.axios.get('/community/course/rank', { params }) }
1
f0b386d2db94ce124dc548d9f58e6d9d
79f64b280b6215a74ee5ed23f8da721e
Mirror point across line
P reflection(L l,P p){ P pj = projection(l,p); return pj*2.0-p; }
1
6f398f2b62e432ec02a24e16601805dd
dd7278f155c7f1abb1e32cf9a13d6038
Reaktion auf das Schließen/Zerstören des Fensters.
public class FrameHaupt extends JFrame protected void processWindowEvent(WindowEvent e) { super.processWindowEvent(e); if (e.getID() == WindowEvent.WINDOW_CLOSING) { jMenuDateiSchliessen_actionPerformed(null); } }
1
79c4f3d923287776962e366b31b39dd0
1893ea7dbd5c2304578a1a9b9ead756c
Gets the counter as a String
@ThreadSafe class CounterSyncMethods implements ICounter public synchronized String toString() { return String.format("{val: %d}", this.val); }
1
971f0c3e373bf7258ccf509231f4c884
1a497d6069cd8feeb9b80bed5b40e98f
Returns the value of the '<em><b>Connection Primary Labels Visible</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Connection Primary Labels Visible</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
String labelStackCap = get(LABELSTACKCAP, null); return labelStackCap != null ? Boolean.valueOf(labelStackCap) : false; }
0
2788b785ba07b20f71965ff1daddf8ec
c4fa59dfe6d8714b23229f977bbe38fc
Checks if url is alive. Returns True for answers 1XX, 2XX, 3XX. Returns False otherwise.
try: urlopen(url).getcode() != 200 return True except HTTPError as err: logger.error(f"[driver] Can't reach url - {url} 404") return False
0
e928a7d77a3b102ef6ea9c731c74f92c
430c58488e94a39af4b6048ab2f35800
PHP5 class autoloader for all of Akeeba's classes
{ spl_autoload_register(function ($class_name) { $class_name = str_replace('Youstice_', '', $class_name); $class_path = str_replace('_', DIRECTORY_SEPARATOR, $class_name); $path = dirname(__FILE__) . DIRECTORY_SEPARATOR . $class_path; if (is_readable($path . '.php')) require $path . '.php'; }, true...
0
87795b99f530020f6a9ee56ec3062a1b
4866a7ff0d6ded87582fea6ac15fe248
This method defines the addition between Angles.
float add_angle(float a, float b) { if ((a + b) <= -M_PI) return 2*M_PI + a + b; else if ((a+b) > M_PI) return a + b - 2*M_PI; else return a + b; }
1
0cef27ff1df87c8e425027d53ca87215
21db294bc867045b866f586395055749
Sends a GIF image.
class ImageBase public function makeGif() { $this->checkImageType('gif'); $this->sendHeader('gif'); imagegif($this->image); imagedestroy($this->image); }
1
a6a12f1e62396d8470633f63abe73fb1
bc2f9cdf52e412911366cd0b3d4bc6a5
Private method to enhance a webpack config with live reload configuration.
function _startLiveReload() { gulpLiveReload.listen(httpsOptions); gulpUtil.log(gulpUtil.colors.green.bold('-- LIVERELOAD STARTED --')); }
0
b8d26463a30105a3377bc21758990b36
75e55c44958c8a7aebfbd2b230ece11c
Gets a waiter for use in RecvSelect
{ Waiter * waiter = NULL; WorkQueue * q = WKI_GetQueue(w); ASSERT(!(w->flags & WKI_DETACHED)); if (w->submitQ.queue || (w->flags & WKI_CALL)) { waiter = WKQ_GetWaiter(&WKQ); if (waiter) { Bool waitable = False; MUTEX_Lock(&q->mutex); if (w->submitQ.que...
1
416374b420488892bc7b947a059f1bf7
1a20f65e897b4cd06257031ba9740afe
Grabs the keys of all session data that has been marked as temporary data.
namespace ProgramAssuranceTool.Interfaces string[] GetDistinctSessionKeys();
0
404e05d973d45f0d3b423da2196a17e1
532e0bace5d248822b94017186eb5236
지정한 기간이 현 기간 내에 속하는지 검사합니다.
namespace NSoft.NFramework.TimePeriods [Serializable] public abstract class TimePeriodContainer : ITimePeriodContainer public virtual bool HasInside(ITimePeriod other) { return TimeTool.HasInside(this, other); }
1
ecaf2cf930f84dcafe9044993debe77f
da930a0032e8178d5f927bb347602c0e
判断当前系统是否支持KVM虚拟化,不支持则退出
out, _ = utils.exec_with_timeout(r"""powershell -Command "Get-WindowsFeature | where {$_.Name -eq 'Hyper-V'} | select Installed" """, 5, shell=True) if "True" in out: return True return False
0
e4321491fedce65282216e4394294fe8
980631e64c1ff2bd60c4991c3734c960
Creates commands for weapons module. Called when commands are created.
{ command.Add("av.ggc.add_shovel", "Adds a shovel to your inventory", AddShovel); command.Add("av.ggc.add_giant", "Adds a giant crop to your inventory", AddGiant); command.Add("av.ggc.add_resource", "Adds a resource clump to your inventory", AddResource); command.Add("av.ggc.add_gras...
0
5ecd5356bcf8427df44a2df5346a13a2
926ca35fff045ebbf07b76324acacf34
Test that we get the right errors when we set invalid options
class PurgeUserTestCase(unittest.TestCase): def test_bad_option_values(self): self.assertRaises(splat.SplatError, self.hc.helperClass.parseOptions, {'archivedest':'/asdf'}) self.assertRaises(splat.SplatError, self.hc.helperClass.parseOptions, {'purgehomedir':'42'}) self.assertRaises(splat.SplatE...
1
e904a4c9659f0c7974c48a2144a03a7f
f960187271bc2f0bf1eb4707f6ddee7f
compute the total startup and shutdown costs, across all generators and time periods.
def build_scuc_model(start,valid_id, FlexibleRampFactor, ReserveFactor, RegulatingReserveFactor,\ gen_df, genth_df, bus_df, branch_df, ptdf_dict, wind_generator_names,\ margcost_df, blockmargcost_df, blockmargcost_dict, blockoutputlimit_dict,\ genforren...
1
5704f664247f150bf92ca6d31cc5ae17
646b8427596ad3a7a360e63ddbd904ce
Dot product of noise with local vector.
{ float n = noiseAt(xv, yv); ofVec2f v; if (angularNoise) { if (signedNoise) v = ofVec2f(cos(PI * n), sin(PI * n)); else v = ofVec2f(cos(TWO_PI * n), sin(TWO_PI * n)); } else { v = ofVec2f(n, n); } return v; }
0
a28002b5839fbd00a2c745d53b3c9d66
b9004feca00b96125bb24cf13e555757
The following function unlocks the latch buffer.
void Door_Latch_Unlock(void) { HAL_GPIO_WritePin(BA_Door_Latch_IO.IO_PORT, BA_Door_Latch_IO.IO_PIN, GPIO_PIN_RESET); }
1
85ad57e67fee3b6e3a921d50fe6abf5b
30b809aee43ab4ff3ab669aadc87e42e
触发某事件所有回调并带参数
class Event trigger(eventName, parameter = null) { if(!this.eventsMap.has(eventName)) { return; } const handlers = this.eventsMap.get(eventName); for(let i=0; i<handlers.length; i++) { handlers[i](parameter); } }
1
139863586ee3ed9e291eac62fb45167d
2ccd0c133bba6bf0d2dc14d33f260f6b
Appends or removes the toggled defect from the checkbox list and subsequently updates the display
export class LogComponent implements OnInit public toggleDetails(el: LogItem) { const idx = this.displayDetails.indexOf(el.id); if (idx !== -1) { this.displayDetails.splice(idx, 1); } else { this.displayDetails.push(el.id); } }
1
cb94f018fd0d296583961737f96e5a90
d0578f65ad28b4c84ac86fc68f4504e2
检查 指令代码是否重复,MYSQL数据库查询不区分大小写
public class ServiceDispatch implements DispatchInterface{ @Override public String excuteInsert(Object object) throws RemoteException, Exception { BufferedReader br = null; List<String> allCommends = new ArrayList<String>(); String line = ""; String[] commendsData = null; String result = ""; try { Proc...
0
9a31a28ef2910e68c979311fbb3a3df6
66ac585e733f30329073855ac465dfe8
Receive the particles from the GPU. Particle arrays are accessible by the CPU again.
cudaMemcpy(Idpg ,Idp ,sizeof(unsigned)*n,cudaMemcpyHostToDevice); cudaMemcpy(Codeg ,Code ,sizeof(typecode)*n,cudaMemcpyHostToDevice); cudaMemcpy(Dcellg ,Dcell ,sizeof(unsigned)*n,cudaMemcpyHostToDevice); cudaMemcpy(Posxyg ,Posxy ,sizeof(double2)*n ,cudaMemcpyHostToDevice); cudaMemcpy(Poszg ,Po...
0
77a8cdb1ef4700bc0a454fb0c1fce5fa
60f4c522786866c8cabd96310dfe2a6b
Gets every reserve in the list.
{ $select = $this->select()->setIntegrityCheck(false) ->from(array('reserves' => $this->_name), '*') ->order('reservationdate asc'); return $this->fetchAll($this->setJoinFieldNoDuplicateId($select)); }
1
2e44de812f01d360c72870c491b526c4
3cf0e9a65816d72ab7af9c9f15387141
Create a template of a backup VM after attaching snapshot disk of source VM to backup VM
os_tpl = compute.os_tpl.term template = pool_element(:template, os_tpl, :info) modify_basic! template, compute, os_tpl %i[set_context! set_size! set_security_groups! set_cluster!].each { |mtd| send(mtd, template, compute) } template = template.template_str %i[add_custom! ...
0
5e8743e28c185697f5ccefdcadee29b1
28be46e55fb68cb9b408ecea5f4ad3f1
Check that validation of the tree is performed and can be switched off.
class TestTreeGeneration(unittest.TestCase): def test_e_regularization_structure(self): self.family.clean_tree() self.family.generate_tree(thermo_database=self.thermoDatabase, rxns=self.treerxns) self.family.check_tree() self.family.regularize(thermo_database=self.thermoDatabase, rxns=se...
0
77a0d451a0bbad3bd2092df87d9613f4
e3d5c95f7903b4b0a4864db90f3df623
滚动消息记录至最底部
var msg = document.getElementById('messageList'); if (msg != null) { msg.scrollTop = msg.scrollHeight; HideNewMessageTip(); } }
1
be5f5a697a02922354deb4349735f3d1
d8ff5c4085c40746aa092733354af413
Calculate index of child with smaller key
int smallerLeftIndex = getSmallestChild(getLeftChild(index)); int smallerRightIndex = hasChildren(getRightChild(index)) ? getSmallestChild(getRightChild(index)) : smallerLeftIndex; HeapNode<K, V> smallerLeft = getNodeAt(smallerLeftIndex); HeapNode<K, V> smallerRight = getNodeAt(smallerRightIndex); i...
1
851dd9385c38bfe1548aff72dce51ea9
2cb259a9361d3bea03356d1ba31ee175
1.定义函数,打印所有商品信息,
class SaleManager: # 商品列表 commodities,每一个元素都是一个商品对象 def show_all_commodities(self): for commodity in self.commodities: print('名称: %s, 数量: %d, 进价: %.2f' % (commodity.Name, commodity.Numbers, commodity.inputPrice))
1
99c998f9cc0019c75c998d7b7d61c7ae
8e19fdec03494eb8d3f0bb2142fb7e00
返回短时间日期格式:年月日
class TimeUtils fun dateToStrShort(dataDate: Date): String{ val formatter = SimpleDateFormat("yyyy-MM-dd") val dateString = formatter.format(dataDate) return dateString }
1
137a32d6640c004deb5c8a5656105743
4311e4264b8b0214f28e8b177bbd7d98
Gets the value of the cpdrfVerPillar property. possible object is {@link JAXBElement }{@code <}{@link Integer }{@code >}
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Backlog_c", namespace = "/oracle/apps/sales/custExtn/views/common/", propOrder = { "id", "recordName", "createdBy", "creationDate", "lastUpdatedBy", "lastUpdateDate", "objectVersionNumber", "lastUpdateLogin", "cpdrfVerS...
1
0c665b61db235c33d07edc0e28ed2155
a8d69fd265b5c5b7a64061bfe74886ca
User can change attachments when:
class QuestionResponse(ResponseSectionOwnedModel, OrderedModel): def resources_change_answer(self): return self.question.question_type == Question.TYPE_FILE
1
2da8a197e70bba54e64665b52d8b87d7
ac7e4ceef81e6ba484d906710c2b2191
Trims excess spaces of this list.
{ for (int spanIdx = _spans.Count - 1; spanIdx >= 0; spanIdx--) { ReadOnlySpan<char> span = _spans[spanIdx].Span; int i = span.Length - 1; while (i >= 0 && char.IsWhiteSpace(span[i])) { i--; ...
1
f11a8031784789a09bda786e320d93d3
73073e890e3fbf70049b0aacbdbc588b
保存fandom分类到redis
{ $categoryModel = new Category(); $goodsModel = new Goods(); $categorys = $this->getCid($categoryModel->getCategory()); $eventually = $this->classify($categorys,$goodsModel->getAllGoods()->toArray()); $redis->set('category',json_encode($eventually)); }
1
fb3d25e56a27e291b32d40b87fafe68f
732f278baab075e1de189034698e3fc6
判断玩家的令风番
function CPlayer:GetLingZhi() return self.lingzhi; end
0
bace8e68caa379d1e7c14b13c9ce5306
f9be289bd2dd0aa613de81f13d4322c0
节流:让函数有节制地执行,而不是触发一次执行一次(在一定的时间内,只执行一次). 通过一个开关与setTimeout结合使用 :函数执行的前提条件是开关打开,持续触发时,持续关闭开关,等setTimeout时间到了,在将开关打开,函数就会执行
let time = new Date().getTime(); this.throttle = function (now) { if (now - time > constant.THROTTLE_TIME) { time = now; return true; } return false; }; this.throttle(now); }
0
7032fdfc63db052db059a5d863abb769
3a1de6bc38e76a9dbfe8b4a8a78d74e8
问题:在已有钞票组合的情况下获取钞票数量最小的张数
class MinCoins(object): def get_min_coins(self): if not self.min_num: self.min_num = self.find_min_coins() return self.min_num
1
9ec052c09f19b6621d2ceaa048898232
a68c306a4b99ea059913ad2a1103bc4b
Salva jogo e faz um POST do arquivo .json
class PsnController extends Controller public function enviaSalvaJogo($jogo,$repository): bool { $arrayJogo = [ 'jogo_id_psn' => $jogo->titleId(), 'jogo_nome' => $jogo->name(), 'jogo_detalhe' => $jogo->name(), 'jogo_url_imagem' => $jogo->imageUrl(), ...
0
7bd36af9f39432c7aa4d73c577091496
bc7ec1fe341dd052b489a6d11add5144
Embed sentence with embeddings matrix
class NegativeCBOWEmbedder(object): def embed(self, sentence): processed_sentence = self.prepare_data([sentence])[0] sentence = [self.embeddings[self.lookup_dict[word]] for word in processed_sentence] return np.array(sentence).sum(0)
1
6b9bbec95e9e0deffd8df2c63d7a1534
3d12ea4afc1eb915f9dd2ba8b7b7bb4c
Get the next subset of the dataset during dataset iteration. Converts index selections for batches to boolean selections that are supported by HDF5 datasets.
class ImageGenerator: def subset_flow(self): for name, subset in SUBSETS.items(): indices = [(np.argmax(c) in subset) for c in self.y] yield (name, self.X[indices], self.y[indices])
1
10cb385a5fb67ecc27a9ae60a600dfea
6c3e70e10eff1dc9164ef3bf2eef2f4b
for each word of a line, append a "shift" that includes that word+following words+previous words (in that order). Each shift is a tuple that keeps track of what line the initial word is in
def next_line(rule): return shift_line(1, rule)
0
b1861862e5cd519df09a5a0f5393ab5f
db1d650231093558fd694dc98d141ba6
カートで表示するモジュール名 (空にするとそのモジュールは丸ごと表示されない)
class OrderModule implements ModuleInterface public function getName() { return 'Order'; }
1
c6000de9a8db1872d086a9a584f4c2a8
54b601c8a3bdf5aa5519ebf28bd228e9
将文件中的记录record转换成用户对象User
namespace FlowerShop.SQLServerDAL public class UserDAL:IUser private UserInfo GetUserFormDataReader(IDataReader reader) { UserInfo userInfo = new UserInfo(); try { userInfo.ID = BaseDAL.GetSafeInt(reader["id"]); userInfo.Address = BaseDAL.G...
1
d560e5c48401ba3dc10abff4111439b9
9b386c3d7025ed9c83ef45d2b12d1c45
變更送出頻率的動作
void MainWindow::changeSampleRate(){ int index = 0x90; switch(ui->sampleRate_comboBox->currentIndex()){ case 0: sampleRate = 250.0; index+=6;per_channel_number = 125;break; case 1: sampleRate = 500.0; index+=5;per_channel_number = 125;break; case 2: sampleRate = 1000.0;index+=4;per_channel_number = ...
1
139563f5885154e2b59a8a5d6f22d42c
95b5fd90966c96a7497db7aebc4e951f
Store registers V0 through Vx in memory starting at location I. The interpreter copies the values of registers V0 through Vx into memory, starting at the address in I.
void chip8_op_store(chip8* c, uint8_t x) { uint16_t index = chip8_index_get(c); for (uint8_t i=0; i<=x; i++) chip8_mem_write8(c, index+i, chip8_reg_get(c,i)); }
1
f33660a74ab0702d8c20ee3186262be5
df4e31f88302bd50ed6a7b94e2fc3625
Resets the manager, removing each door from its map.
void reset_doors();
1
0858f49ae21263115875c2978edf5519
8c753d462f9e7869930320276519b4e0
First returns the first substring of s with length n.
func Replace(s, old, new string, n int) string
0
368466522aad195b4e98eb574d3d2ca0
295bbcac84b8c8593dee18afa68187d2
付费排行榜
{ $sql = "SELECT p.PID AS userId , p.PlayerName AS playerName , (SELECT IFNUlL(SUM(Amout), 0) FROM payorder WHERE PID = p.PID AND GameId = 5 AND (PayStatus = 3 OR PayStatus = 4)) AS amount , p.CreateTime AS firstTime , (SELECT ...
1
bf9f602928492da16214b5f923284da2
886d7d97a8980923dfb691ac88f36c47
检验信息三级解析
@Component public class MessageOperationUtil public static List<String> parseMessage3(String message){ List<String> resultList = new ArrayList<>(); String length = message.substring(4,8); String adr = message.substring(20,28); int LengthValue = Integer.valueOf(length,16)-4; Strin...
1
623448a059e2712921d96b9b8a726174
6ce8d811e1adeea0e618277c50cf2cb3
Separa as cartas por naipe e retorna um dicionário, com o índice sendo o naipe e o valor sendo uma lista com as cartas.
def split_hand(input_hand): hand_split = [[],[]] for item in input_hand: if item[0] == '1': hand_split[0].append('14') elif item[0] == 'K': hand_split[0].append('13') elif item[0] == 'Q': hand_split[0].append('12') elif item[0] == 'J': ...
0
25b90586fae21360d84059c68ec66f4a
b8a7f51dcdc6e2630bbb46856a4eb4d7
更改投诉状态为已完结
public class PvpCmtAppComponent extends CMISComponent public void changeChCmteoffStatus(String serno) throws ComponentException{ PvpCmtAppAgent pvpCmtAppAgent = (PvpCmtAppAgent) this .getAgentInstance(PUBConstant.PVPCMTAPP); String columnName="serno"; String tableName="pvp_Cmt_app"; try { pvpCmtAppAgent....
1
ade8104d299bf7e933192322286d20b6
ff526872dfc130890d52d105ca56921d
The cumulative probability function of a standard normal distribution.
def N(x): return norm.cdf(x=x, loc=0, scale=1)
1
062e7e29e50734bc13a90275c262b49d
b12319c4e32c5a4ba41359d71630fdae
日付名を取得します。
public class MeiboShohonJuminJouhou public RString get名称() { return this.名称; }
0
52912eed43ef56bd86dbf7e918fb7e52
5375aa680d3d83e145d87a5b2124870b
执行添加计划
namespace IERM.Handler public class PlanHandler : IHttpHandler private string AddPlan(HttpContext context) { var jr = new JsonResultModel<int>() { IsSucceed = false, Data = 0, Msg = "添加失败", RedirectUrl = string.Empty ...
1
f3eb80b11a2d4caef8994a9d9372b5dc
549676c0f18dcb7113f7b2db5a93d2b4
if the touch event has traveled past threshold since the finger first when down, it's not a tap
int temp_A = Math.abs(lastX - touchDownX); int temp_B = Math.abs(lastY - touchDownY); double deltaPath = java.lang.Math.sqrt(temp_A * temp_A + temp_B * temp_B); if (deltaPath > touchSlop) { return true; } else { return false; } }
1
c2151066bb17e75f68ecc524e511a6bd
5c5a75772bd261bc3eb664648dbec934
u"""終盤の探索の深さを設定する.
namespace GameLogic namespace FourInALine void ArtificialIntelligence::setSearchDepth(unsigned int searchDepth) { this->searchDepth = searchDepth; }
1
182ecebe8dc6bff590068d969aebc806
a30a22b95a458c527f29eb762b8973f2
返回一个user对象,如果没有就返回一个空对象{}
fun getUser(): User { return User("王五", null) }
0
620c7b4b4e354337a7f48de3782ae8f0
34e828a946758cba159c5633459b8666
调用拍摄身份证反面activity
public class IDCardActivity extends AppCompatActivity implements OcrContract.View private void scanBack() { Intent intent = new Intent(IDCardActivity.this, IDCardCameraActivity.class); intent.putExtra(IDCardCameraActivity.KEY_OUTPUT_FILE_PATH, FileUtils.getFile(getApplicationContext(), I...
1
58b896dfccb3fee34917527a3a37520e
5d89171337be97e2c323294288924e7a
Write to FIFO_EN to enable writing of gyro x, y and z and accel data to FIFO
lis2dh12_ctrl_reg5_t ctrlReg5 = {0}; ctrlReg5.fifo_en = 1; ctrlReg5.lir_int1 = 1; return writeReg(LIS2DH12_CTRL_REG5, (uint8_t *)&ctrlReg5, 1); }
1
51aa3b90efc9d613ed5a0281fe5b417e
be9d5b9e64ead62f6b344bef45b35abf
Checks if user with given id owns the bookmark with given id.
if ($this->getUser()->getId() == $userId) { return false; } return $this->getUser()->getBookmark()->hasSubscriber($userId); }
0
1a3439f6235a4d74850a7a70a5ade2d6
5254f6039beef41f1358eb1d2ef26903
プロジェクトからマップチップパレットをロードする
public class UITestMap : MonoBehaviour private void LoadMapRes() { }
0
a81850464693f356e8c6069f60e7e1b4
4dab9f3aa15d965ff90d9bf5b78e9ebb
Open the file given on the command line
main (int argc, char *argv[]) { FILE *ptr_file; ptr_file =fopen(argv[1], "r"); if (!ptr_file) { printf("file not found: was not able to open\n"); return(1); } wc(ptr_file,argv[1]); fclose(ptr_file); return(0); }
1
492764727436f3ba9fa2e88351efafa5
20e3cf136f0d47130c0c1b0ca032b8dd
프로그램 진입점
public class phte public void phoneBookStart() { System.out.println("==================="); System.out.println("전화번호 관리 프로그램"); System.out.println("==================="); while (true) { int choice = displayMenu(); switch(choice){ case 1: insert(); break; case 2: update(); break; ...
1
aa371c8ab9f4886a449da92479d82b72
3d23768c7f160dfbb371b754644d6ed8
Возвращает номер коллекции по её имени
{ string collectionNumber = SqlQueryScalar("SELECT baseName FROM Collections WHERE(programName = '" + collectionName + "')").ToString(); collectionNumber = collectionNumber.Remove(0, collectionNumber.LastIndexOf('_') + 1); return int.Parse(collectionNumber); }
1
cb50996bd81ae062abdca67cdb21671c
f15e822afc3696f0e490698f1803d6d5
* Skill types
return { "ammo", "bayonet", "bipod", "bonus", "custom", "extra" } end
0
0764ed82c08567941aa2e4c6b2f25227
213f51c990f026febff7e7b027e2d3ab
builds response to end the dialog
class SensorDialog extends CancelAndHelpDialog async finalStep(stepContext) { return await stepContext.endDialog(); }
1
908f17e8a51ba0720b21a76360c3e69c
82f129bf5b2a9fbb6f8338d0d30b5b42
\brief Empty method.
namespace void empty_thread() { }
1
f9e2082e0d64e42ffaca417db0d10753
fb20be712e54a20394ea3ae296f927b3
Returns the array containing the rectangles
public class Detector public ArrayList<Rectangle> getRectangleUnitedList() { return rectanglesUnitedList; }
1
c9996f4d28c3a9d324dd468a996080a0
a4326ff62e3c414358b0ae91d5e4f09a
Create an instance of a Wagner-Whitin problem.
solver: List[Dict[str, str]]) -> None: self.tolerance = tolerance self.solver = solver
0
f39c0d2e9495735f66b3b2fea3d904ec
ea5bbae774f5207af2c59c834d2c29bc
Add a single bit (flag) to the bitstream.
{ unsigned int newdata = (unsigned int) data; unsigned char mask = 0x80; while (mask > 0) { if ((mask & newdata) == mask) { write_bit(fphuff, 1); } else { write_bit(fphuff, 0); } mask >>= 1; } return; }
0
ac05ced2827a3c0a2ff4ebf34ee70452
60dddcc5a48464d7131537ceb0cc325a
symmetric_difference_update
class SetLike(object): def difference_update(self, elem, *args, **kwargs): update_list = self.difference(elem) copied = copy.deepcopy(self.unique) self.unique = [val for val in copied if val in update_list and elem not in elem] self.do_shuffle() return None
0
3916c170f2d0411377fcd438aaa05320
123bf2321c465e8804074e7d34d65b47
检查是否是可以忽略的默认的登录密码
public class InternetUtils public static Boolean isPasswordIlleagle(String password){ return true; }
0
38a59d48725652c2833905fee0bf86d9
ac457eb3c2988e235e2e0bd9b3e5f79e
Otorga a cada bolo una probabilidad diferente de ser derribado
double Calculator::getProbability() { std::random_device rd; std::mt19937 generator(rd()); std::uniform_real_distribution<double> distribution(0, 1); return (distribution(generator)); }
0
6c3b11d2d870ac44acf2febf1af4f1bd
87b287d4b35914ecd9c86841d5b59434
called at end of AFMETER input, to get messages near source of error.
char *results) { int i, j; char message[300], mess1[300], extramessage[1000]; special = 0; margin = 0; strcpy(message, ""); strcpy(mess1, ""); strcpy(extramessage, ""); for (i = geneindex; i < mapSize && map[i].annot_number == map[geneindex].annot_number; i++) { if (m...
0
287e0ef80663a78cd3030f6f35f05c8b
f4973690a9bab7e64a85f7522ffe47bd
采用循环
class Solution bool isPowerOfThree_loop(int n) { while (n % 3 == 0) { n = n / 3; } if (1 == n) { return true; } else { return false; } }
1
6529b180923f8bb234b233b9829f3ba6
3f59c5fc0e6eaca8e171fa09c991f0ab
Gets current index of all rotors in alphabetical form
rotors = [] with open(SpecificationFiles.rotorsOut, 'r') as f: lines = f.readlines() for line in lines: line = [x for x in line if x in AlphabetCustom.alphabet] rotors.append(line) return rotors
0
fd7a881966233b66d25c03788e64ab31
eb3cd1d55eb37327d05388ac15933c38
Test cli main call of report creation
def main(): global ORG_KEY global HOSTNAME parser = build_cli_parser() args = parser.parse_args() print_detail = args.verbose if print_detail: print(f"profile being used is {args.__dict__}") cb = get_cb_cloud_object(args) ReputationOverride.create(cb, { "description": "An...
0
7e0c7f794b40b059b0c61b93b8b347a7
8bc05027a274c8ab42d7fd538cd93249
Asserts that the document has been saved with no errors.
def assert_no_error_occurred @status.must_equal 0 end
1
5e88dd49f9fa75fbe5a502e3c7072eb1
a54aa048b49127ff070a0e506161487e
ポストエフェクト用のコンピュートシェーダーを実行する。
public class PostProcessComponent:MonoBehaviour{ public void shaderPostEffctOperate(object body) { }
0
61512977badadc4cc2fc53f44de89ce9
423829b11b36d9bb58f21518dc388bed
Устанавливает дефолтную внешность персонажу.
namespace SWLOR.Game.Server.Service public static class Race public static void SetDefaultRaceAppearance(uint player) { var gender = GetGender(player); var racialType = GetRacialType(player); var raceConfig = gender == Gender.Male ? _defaultRaceAppearances...
1
3788f581ffe402d265c36a0e91a8ab30
dde5de4caae66beac9ab395b68555156
获取支持Https的OkHttpClient <p> 不需要的项目可注释
HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(null, null, null); OkHttpClient okHttpClient = new OkHttpClient.Builder() .sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager) .build(); OkHttpUtils.initClient(okHttpClient); }
1
a04d972185e274d412fb24c352347d1c
e067a12a281fdbe9d9019865d13aea71
Liefert eine Kopie des Spielfeldes.
public class SpielGUI extends JFrame implements WindowListener, KeyListener public Einstellungen getEinstellungenCopy() { return gesamtdatensatz.getEinstellungenCopy(); }
0