query_id
string
corpus_id
string
query
string
code
string
label
int64
e5855cacbce21fd7c9f837fee0ac46a9
11408329b39e8f05a64caf1f494a4f70
修改系统变量
class ctl_system public function config_edit() { if( req::$request_mdthod=='POST' ) { $info = req::item('data'); $info['name'] = isset($info['name']) ? preg_replace("#[^\w]#", '', $info['name']) : ''; if( empty($info['name']) ) { $msg =...
1
82108a60c32e46a67584d5e732c6d226
e131c6d2107108ddde962a51d2aa1440
Преобразование из инфиксной нотации (алгоритм Дейкстра).
operands = deque() postfix = deque() for element in infix: if element.isalpha(): postfix.append(self.variables[element]) elif element.isnumeric() or len(element) > 1: postfix.append(element) else: if not operands...
1
9728a5f876c3ab5f65eb7322b719df86
08e4532419cb7ddb8bda0f9ee4bfc5f4
Perform all the pairwise distances.
class Network: def calc_all_dists(self, net): dist = [] for ii in range(self.nnodes): dist.append(self.calc_dist(net, ii)) return dist
0
b344e5f40e16740cf52d8d11e7dbed30
59c561cddda4560a066a47abc8f4b8ff
黄色框选择按钮触发槽
void MainWindow::yellowBoxClearBnSlot() { ui->yellowBoxXLabel->setText("X:"); ui->yellowBoxYLabel->setText("Y:"); imgThread->clearSelectType(YELLOW_BOX); if(ui->distinguishCB->isChecked()) { ui->hueMinLabel->setText(QString("MIN:%1").arg(YELLOW_BOX_H_MIN)); ui->hueMaxLabel->setText(Q...
1
42d31a94e968f4df08435b3dc61e3550
d920be7540f64194f36aad374b999b8a
Removes a hold and enable the save buttons when all holds are gone!
{ FPEInteractablePickupScript[] puObjs = GameObject.FindObjectsOfType<FPEInteractablePickupScript>(); GameObject heldObject = FPEInteractionManagerScript.Instance.getHeldObject(); int heldObjectID = 0; if (heldObject != null && (heldObject.GetComponent<FPEInteract...
0
0a792ba765f36e85fecfaaeb7fd1c776
194c99f73b9301d0d62e2d11fd1098ab
Simple model of a university student
class Student(Member): def __init__(self, name, address, email, student_num): super().__init__(name, address, email) self.student_number = student_num self.courses_taken = [] self.courses_taking = []
1
1e0b4c9503670370de4fe2ac585d623d
cca2e4e4ad209120d4df6db7b32329a0
Exécution du code court (shortcode) de saisie d'une recette
{ $retContent = ''; if($this->canProcess) { try { $conf = $this->conf(); $lang = $this->i18n(); $objInstall = new \NativeRentalSystem\Models\Install\Install($this->conf, $this->lang, $conf->getBlogId()); ...
0
5422b0ffc9a933eb90fa6dba50fa0ae9
8fdc916222fe43fb7c92faf6f667bca9
Ajoute une entrée Gt_poeme.
namespace GstBdd public class GstBDD public void addPrescriptionGael(int idMedoc, int idIndividu, int idDosage, string txtPosologie) { cmd = new MySqlCommand("INSERT INTO prescrire VALUES (" + idMedoc + ", " + idIndividu + ", " + idDosage + ", '" + txtPosologie + "')", cnx); cmd.Exec...
0
b9a55441b95e9dc3b43a82fe22828673
24cf871b433bd22e730f780319300d52
"""Вывод метеорита на экран."""
def draw_alien_meteor(x, y): scale = 0.05 texture = arcade.load_texture("meteor.png") arcade.draw_texture_rectangle(x, y, scale * texture.width, scale * texture.height, texture, 0)
1
51d541dbd7c36c00d288a43a2fa5d61c
2aa772cb25d40a6dbe42328f219b3d0e
返回即将上映的8部电影,还有即将上映的电影数量。
getNowMovie({ start:"0", count:"8", city:"context.state.city" }).then((result)=>{ let [error, data1] = result; context.state.nowPlayingList=data1.data.subjects; context.state.title=data1.data.title; }) }
0
5f7de650f35d70f789e85cff3f8a97a2
212ed341466d2ad303d533a95f192ff1
Tests for QuestionQuery
question_title = "question_title" question_schema = { "id": "question_id", "title": question_title, "type": "GENERAL", "answers": [self.answer_schema], } question = Question(question_schema, self.answer_store, self.schema, None) sel...
0
7d916aee8fe336de5dcf91af9a785fb4
035bb0091578f93371b66cb5187d3ad5
stops the AI upon death and plays the death animation or ragdoll
public class g_AIHealthScript : MonoBehaviour void DeathCheck() { KillAI(); }
0
2e2de7e7a398cd7fe707d27f962d9dee
58564aa3bdc8455738462e9d1b5283bc
Check an account/nick name and password to see if they are valid Returns the account display name if valid
namespace DinnergeddonService [OperationContract] Account VerifyCredentials(string name, string password);
1
2ffbeecdb2b7f2f81f8b61cc0fe3cc1d
67b2744b8b13d4e437b790c784118c6d
Reads CSV file into a Spark dataset
public class SparkSQLStock private static Dataset<Row> readFileToDS(String path) { Dataset<Row> dataset = sparkSession.read().text(path); return dataset; }
0
54d757a9bbaf89fc0d3ddf629ae04a3e
1b1d4c406cab6b2752145759fe6aeae9
Sets the channel bindings to be used during context establishment. Only valid before the context creation process begins.
public final class ChannelBindingsContext extends BaseContext @Nonnull @Live public Collection<ChannelBindings> getChannelBindings() { return channelBindings; }
0
262e0a994a0b6c698c5ac8455455c383
61c7c222a8d21fafc1ee0f48579dd9d8
버튼 클릭 확인하는 스크립트
public class testBtnScript : MonoBehaviour void Update () { }
0
f42061e204e8f0e6a7835c08a4d58354
38b322bf2d2a1b55c5dc65aff6b99aa4
scale and move the coordinates so they fit [0; 1] range
def scale_trans(x, y, scale): x = float(x)/scale y = float(y)/scale x += 512 y -= 512 if y < 0: y = -y assert x <= 1024 assert y <= 1024 x = int(min(round(x), 1023)) y = int(min(round(y), 1023)) return x, y
0
a70cfc22a06f6896b5b3be53ebb1a093
7c7a3e0d6897192eff822c9eed840a3d
Tests whether a given code point is an octal digit `[0-7]`.
function isDigit(codePoint: number): boolean { return Chars.digit({}).has(codePoint) }
0
14ff1369c4981c186e15cca5de1e8016
23f532673f38b42c5bec101133fe2470
该方法在用户进行了web上某个需要上传文件的操作时回调。我们应该在这里打开一个文件选择器, 如果要取消这个请求我们可以调用filePathCallback.onReceiveValue(null)并返回true。
public boolean onShowFileChooser(WebView webView, ValueCallback<Uri[]> filePathCallback, FileChooserParams fileChooserParams) { if(activity.mFilePathCallback!=null){ activity.mFilePathCallback.onReceiveValue(null); } activity.mFilePathCallback=filePathCallback; Intent tak...
1
85727973c82b80358c09098988308aa3
8c562ec2c7c0846474824b74e38b844d
等待任务退出
namespace OcrTesseract public partial class TaskListControl : UserControl private void label3_Click(object sender, EventArgs e) { this.WaitTaskItem(this.selectedTaskItemControl.TaskItem); this.selectedTaskItemControl.Timer_Stop(); }
1
0d051e2c5a5ad2071c363e07b5157ca2
631e791162559db4ab4e5f97d9c84688
ドロップ可能なQStandardItemModelの派生クラス。
class DragDropItemModel( QtGui.QStandardItemModel ): def __init__( self, parent=None ): super( DragDropItemModel, self ).__init__( 0, 3, parent ) self.setHeaderData( 0, QtCore.Qt.Horizontal, 'URL' ) self.setHeaderData( 1, QtCore.Qt.Horizontal, 'Done' ) self.setHeaderData( 2, QtCore.Qt.Ho...
1
2f9b35a8f0d573ca5db01ecd9e0a79b9
267f48e70ece39034e7fa43ec46145b6
Sprawdza, czy dane odbiorcy są poprawne
function checkReceiverCard(event){ var value = receiverCard.value; if (!checkInput(receiverCard)) return false; if (!receiverCardRegex.test(value)){ setInvalid(receiverCard, incorrectReceiverCard); return false; } if (value === senderCard.value){ setInvalid(receiverCard, senderAndReceiverCardsEqual) } if (...
1
22059151fb444980f805677af98cf747
cfe4804f816f596d1a41876c8da10f22
Updates the state of the "Select all" checkbox.
int size = getModel().getSize(); for (int i = 0; i < size; i++) { JCheckBox jCheckBox = (JCheckBox) getModel().getElementAt(i); if (StringUtils.equalsIgnoreCase(jCheckBox.getText(), CHECKBOX_ALL)) { jCheckBox.setSelected(selected); boxes.put(CHECKBOX_ALL, selected); break; ...
1
f94aa7873b6bc6b8d9e46b0841eaa1f5
76093bda8036ad064deef7777e5d80b3
Parse out the xml string from the passed chunk data byte array
Object c_xml_parse_chunk(sax_parser_index,buffer,size,terminate) Object sax_parser_index, buffer, size, terminate; { Object gensymed_symbol, temp; x_note_fn_call(190,4); gensymed_symbol = copy_foreign_string_arg_if_appropriate(buffer); temp = gensymed_symbol; if (temp); else temp = buffer; ...
1
19020205b18ab97285cc5a03a14ca65e
c9360e7d2f4977a3d7ee628681f47a20
Adding a node to the Doubly Linked List at a specific position.
SinglyLinkedListNode newNode=new SinglyLinkedListNode(data); if(head==null){ head=newNode; return head; } if(position==0){ newNode.next=head; head=newNode; }else{ int currPos=-1; SinglyLinkedListNode currentN...
0
924fe670aa173c42011c8db020b22c61
649206d27b945d901e221ab3f0536623
set player camera dependednt on player type
mainCam.enabled = false; bedroomCam.enabled = false; combatCam.enabled = false; switch(camNum){ case 0: mainCam.enabled = true; playerSpawn.transform.position = mainSpawn.transform.position; canvas.GetComponent<Canvas>().world...
0
b83014022a3fec03ddebe8b229192551
e2b65e23dfcabab3f5b8a24f3c03ad06
Creates Envelope Draft
namespace eSaw public static partial class EnvelopeExtensions public static async Task<object> CreateFromTemplateAsync(this IEnvelope operations, DraftCreateFromTemplateModel createFromTemplateModel, CancellationToken cancellationToken = default(CancellationToken)) { using (var _result =...
1
8b36023baf4e26b1e01e0e131db741f3
ae85ceacd859c454b1734bf6a768d024
find the ratio of specific heats of the oil-refrigerant mixture
{ int id; double W = 0; double sumC = 0; W += c[0]*31.998800; W += c[1]*18.015340; W += c[2]*16.043030; W += c[3]*28.010550; W += c[4]*44.009950; W += c[5]*28.013400; for (id = 0; id < 6; ++id) { sumC += c[id]; } *rho = *P * W / (sumC * (*T) * 8.31451e+07);...
0
d0c954b05a6125f9d20ef61b878202c1
425a509a4c27a91487d56754cbbaed18
Test 'ping6 <ip> -O -p' on Centos 7.7
class MyTests(unittest.TestCase): # input # centos def test_ping6_ip_O_D_p_ubuntu_18_4(self): self.assertEqual(jc.parsers.ping.parse(self.ubuntu_18_4_ping6_ip_O_D_p, quiet=True), self.ubuntu_18_4_ping6_ip_O_D_p_json)
0
7577b30fb32d19fc2729e1e49f648197
11ba6d54959cc3af68132102786c25b9
Performs the SUBCLU algorithm on the given database.
public class Client public void submit() throws SDBPException { int status = scaliendb_client.SDBP_Submit(cptr); result = new Result(scaliendb_client.SDBP_GetResult(cptr)); checkStatus(status); }
0
543f117f479046e808d3ed95e172a99b
2a9f0e3d755de9c11197db275e5d3755
Check if the validation was successful If there are no validation messages set, the validation result object is considered valid.
class Validator implements ValidationInterface public function succeeded() { return !$this->results->in(false); }
1
f231ae5dccecdccb0e7893b1fe7291c7
f1b87917a1f9ca448a38c6aa798b2953
Given a list of x values in the form of (user, movie, time) predicts the rating
def predict_ratings(user, movie): other_ratings = movie.ratings other_users = [r.user for r in movie.ratings] users_similarity = [] for o_user in other_users: o_user_similarity = user.similarity(o_user) similarity_pair = (o_user_similarity, o_user) users_similarity.append(similar...
0
2e24e2068689a4bdaa3876354a881552
faf3559acda5e5ad48bbc9e82c2a208e
Метод построения модели для отображения подробностей проведенной или запланированной встречи.
namespace OrangeBricks.Web.Controllers.Appointments.Builders public class AppointmentsOnPropertyViewModelBuilder public AppointmentsOnPropertyViewModel Build(int propertyId, string sellerUserId) { var property = _context.Properties .Where(p => p.Id == propertyI...
1
2483319eb43ecdabcfcae5a19880f97f
8207f233495f365b36d374186b51cbff
access map info in local arrays with an offset to accommodate tiles outside the map
useMapArray = MapDataManager.mapArray; cellSize = MapDataManager.cellSize; myPosX = (int) transform.position.x / cellSize; myPosZ = (int) transform.position.z / cellSize; }
0
f9b013b58795f7fc7d86e4139da22ed3
613153a189e140b93cafabcbf2605624
Read the list of groups, if necessary.
$this->cleanGroups(); if (empty($list)) { $list = array(JeprolabSettingModelSetting::getValue('unidentified_group'), JeprolabSettingModelSetting::getValue('guest_group'), JeprolabSettingModelSetting::getValue('customer_group')); } $this->addGroups($list); }
1
5940d87ca28651b9cd1376b3ad8a89c6
812d5b629c3e4753107521ab8ab1f3e7
Create IR variable operand.
mir_operand_t *op = malloc(sizeof(mir_operand_t)); op->var = NULL; op->optype = MIR_OP_REG; op->val = temp_reg; op->indirect = 0; return op; }
1
28e9805a6a15a512ca8183fb280083cc
ec793979f3b1511dde999cf910842682
데이터를 읽어들이고 정규화 및 셔플을 수행함.
def _normalization_process_data(length,path): data = pd.read_csv(path) data = (data.astype(np.float32) - 127.5) / 127.5 data = data.values.reshape(data.shape[0], length) data = np.delete(data, -1, axis=1) return data
0
5ed71975586ee443e76d6ce527a62e0f
c364ed21f1d35e19414dd1dff0901e2d
parses RFC3339 timestamps
def parse_date(value): if value: t = rfc822.parsedate_tz(value) if t is not None: return datetime.utcfromtimestamp(rfc822.mktime_tz(t))
0
d7f92b7984d9701595894f26db33c749
5a68f3f09b90913a1d8887dc822e527c
Returns session hash based on moodle session, IP and browser info
class quizaccess_onesession extends quiz_access_rule_base private function get_session_hash() { $sessionstring = sesskey(); $whitelist = get_config('quizaccess_onesession', 'whitelist'); $ipaddress = getremoteaddr(); if (!address_in_subnet($ipaddress, $whitelist)) { $sessions...
1
d04ea6456d7ca53820e8f641551f0e9b
cbdc987d51290cba607ceea368c087a1
\brief To populate one report descriptor payload
{ uint8_t* pPayload; uint32_t PayloadSize; PayloadSize = ((uint32_t)(pRecordStruct->PayloadLength3)<<24) | ((uint32_t)(pRecordStruct->PayloadLength2)<<16) | ((uint32_t)(pRecordStruct->PayloadLength1)<<8) | pRecordStruct->PayloadLength0; pPayload = (uint8_t*)(pRecordStruct->PayloadBufferAdd); if( pRecordStruct...
0
24339e46afc3b2de797a4734ab8a5fcb
1eb2ac7703e7fb1a236246911e3f142b
Add one or more templates that this PagesType represents #pw-group-family
_method_name = 'add_template' self.__logger.entering(template, class_name=self.__class_name, method_name=_method_name) try: self.__load_global('addTemplate')(template) except offlineWLSTException, e: pwe = exception_helper.create_exception(self.__exception_type, '...
1
035b0135304ecba51e5f1fc46bcc4dfb
630ebfa24669c874fe70261fd4066dda
Crée le cache des données d'affichage de la carte
public class WMTSLayer extends TiledServiceLayer private void initCachData() { File file = new File(getMapPathforCache(0, 0)); if (!file.exists()){ file.mkdirs(); } }
1
94153949b04a40696aac7c7aca181372
0008a94b85d06bef7d950f461c6ae9e8
develop dictionary of TCGA_ID:vital status
return { "bg": 0, "neoplastic": 1, "inflammatory": 2, "connective": 3, "dead": 4, "epithelial": 5, }
0
94ecbc925ce31a9d082f8a9b2a3df3b9
cd57b8920814a4d87d3d3848a8a6dde5
Return a task which performs a blocking flush of any in-memory index data to persistent storage, independent of any flush of the base table. Note that this method is only invoked outside of normal flushes: if there is no in-memory storage for this index, and it only extracts data on flush from the base table's Memtable...
public Callable<?> getBlockingFlushTask();
1
463b696109730f3b60a1a889d7aca9c9
b199fb353280ea4d699ea9815c96ccb8
シーンの初期化を行わずに指定したシーンに遷移する
abstract class BaseScene : SwipeBackGroupScene() fun startWithPop(scene: Scene) { start(scene, PushOptions.Builder().clearCurrent().build()) }
1
90905d9588b0a0f6120dd5df74d228dc
84ded67aa64cc299fb9e718e273ceeac
Generates a button with a dropdown menu.
class TbHtml extends CHtml // required in order to access the protected methods in CHtml public static function buttonDropdown($label, $items, $htmlOptions = array()) { $htmlOptions['items'] = $items; $type = TbArray::popValue('type', $htmlOptions, self::BUTTON_TYPE_LINKBUTTON); return self:...
1
01219b9b1124ec24dadbc57bcf2da4a9
88f298e80f68656a99b50fb43a85630f
RaceKeyを指定して、そのレースが行われる開催情報を、DataFrame(1×?)で返す。
class Horse(HorseTable): def get_race_results(self,RaceKey): getQuery = """ SELECT DataKubun, Year, MonthDay, JyoCD, Kaiji, RaceNum, Umaban, KettoNum, KisyuRyakusyo, KakuteiJyuni FRO...
1
76250e50b715bae6d71f3ede942ac22a
a2a20633d6c5e41409aa6b67b2b66935
获取body参数,转换为dict,如果发生异常,抛出错误
class ReqHandler(RequestHandler): def get_body_args(self): if self.request.body_arguments: return {key: value[-1] for key, value in list(self.request.body_arguments.items())} elif self.request.body: try: data = json.loads(self.request.body) return ...
1
659186a7a226125ab8482a93c54a6d2d
b772da3f98623e072b7ee560f50f2048
重置页面数据(不刷新) 需要传递指针
public abstract class BaseLoadMoreHolder <T, RefreshLayout> implements LoadmoreListener.Emitter<T>{ public final void reset(){ page = 1; mAdapter.setNewData(null); openLoadMore(); }
0
256c5e8ad320bd2c856d56fbdee404dd
92040a1e1e28e8cadc889522be0fa062
Try to find a cover that can be used for this Edition.
return parent.listFiles()?.find { it.nameWithoutExtension == "cover" }?.takeIf { it.isFile && ImageUtil.isImage(it.name) { it.inputStream() } } }
1
22296132d5909af6d6883ec2e0984bcc
5e0845ae0c1ab4b7460fbadeb549b3c3
获取entityId下的所有role
Observable<List<EntityRole>> listPatternAnyEntityRolesAsync(UUID appId, String versionId, UUID entityId);
1
14ef66f618391a0197b374c7e1af4d09
31fc36d02972283eadbb379d1f6fddab
Snippet for ListDatabasesAsync
string projectId, string instanceId, string databaseId) { string connectionString = $"Data Source=projects/{projectId}/instances/{instanceId}" + $"/databases/{databaseId}"; using (var connection = new SpannerConnection(connectionString)) { ...
0
53bf74de2c63a211cf81c0e4367c436b
9293ef06f60170549a02d348b96547ab
jokuaren menuko panela sortzen duen metodoa
Inventory inventory, String[] sortingTypesStringArray) { for(int i = 0; i < newJMenuItems.length; i++) { subMenu.addSeparator(); newJMenuItems[i].setIconTextGap(60); String sortType = sortingTypesStringArray[i]; newJMenuItems[i].addActionListen...
1
983573fa0dcbea58eb3394405f3173f6
a5cd6593bc5f5ea2e05d969b236045fa
모든 열에 대해 정렬을 수행한다.
int col = Arr[0].length; int str = Arr.length; int[] tempArr; boolean isSorted = false; int buf; while (!isSorted) { isSorted = true; for (int i = 0; i < str - 1; i++) { if (Arr[i][sortField] > Arr[i + 1][sortField]) { ...
0
999836e644510c95a8354e9746c9c983
9bce2f34f73c6137d39efbed2e9d0eae
if a hash is found in the DB then it is applied.
func HashUpsert(db *gorm.DB, hash string) (bool, error) { tx := db.Begin() defer func() { if r := recover(); r != nil { tx.Rollback() } }() if err := tx.Error; err != nil { return false, err } var tempHash HashTable errCheck := tx.Where("hash = ?", hash).First(&tempHash).Error if errCheck != gorm.ErrRe...
0
292d9ffce28314d2011c1400c640639e
cb66e3328d75c180fef9d5bd56ce7343
当前页面是否为dataBinding模式
public abstract class BaseActivity extends AppCompatActivity implements BaseView, NetEventHandler protected boolean isDataBinding() { return false; }
1
ebde7a6753020997f94c685d1ef1e181
7cce10b436b869e63f1e587a8b45a5ca
Retrieves the resolution of the right thumbstick's vertical axis.
public class FtcGamepad extends TrcGameController public double getRightStickY() { return getRightStickY(false); }
0
10607991bdd7576e6c633d05745f810d
c12e5f6edbdf296a19f1e6de46ff5d12
Add router groups
Router::addGroup('/oauth', function (RouteCollector $router) { $router->addRoute('GET', '/authorize', '\Richard\HyperfPassport\Controller\AuthorizationController@authorize'); $router->addRoute('POST', '/authorize', '\Richard\HyperfPassport\Controller\ApproveAuthorizationController@approv...
1
b95b2e647432ecf418f02d0458f51898
7e4f9c5d49014a2466f96e7942285ed3
Функция выполняет поиск элемента в сортированном массиве - возвращает ключ указанного елемента
{ foreach ($array as $key => $value) { if ($value == $searchingElement) { return $key; } } return -1; }
0
2e656654fb53ddbc8b82087f4aad30ed
a99ab34a590aaba85ddd10676d2e1e7e
ajax执行不再关注标签的方法
var elements = $("#content .leaveMessageContent li") for(j=0;j<elements.length;j++){ elements.find(".isLike").addClass("notLike") } }
0
524914d75d7be1d483622f64a9fc919e
69f7b5327b5eaffd8f04b5160c2365c6
callback: is application connected to ayatana service
val accessibilityManager: AccessibilityManager = RApplication.getApp().getSystemService(Context.ACCESSIBILITY_SERVICE) as AccessibilityManager val accessibilityServices = accessibilityManager.getEnabledAccessibilityServiceList(AccessibilityServiceInfo.FEEDBACK_ALL...
0
35c8e4c2ed7ffab0d6ba55e75ba3bfb1
d235e1a51aed435b84aad0070f5fd774
更新数据库里面的购物车被选泽数量
class cartControl extends commonControl public function updateNums() { parent::updateNums(); }
0
1285f95d2d371568e5af3a81df535635
0cfa4cbc9000a5ad89365a59b93c4345
Este metodo toma el tipo de visita seleccionada por el Responsable de Visita
public List getListTiposVisita();
0
59d1398affee572db3f569de305d51f4
a20a1ae1837a35bfee330cefaf291eea
Checks if player has edit access in a town
if (towny != null) { switch (tr) { case wilderness: return (TownyUniverse.isWilderness(l.getBlock())); case town: return playerIsResident(p, l).canTravel(); default: return playerIsCompatriot(...
0
d772f7f932176ce05ead966221087687
c3a2d0f752920670902befe29b21d3d7
Get the artis associated with the Film
{ $query = $this->createQueryBuilder('af') ->innerJoin('af.acteur', 'a') ->andWhere('af.film = :film') ->setParameter('film', $film_id); if (is_null($role)) { $query = $query->orderBy('af.principal', 'DESC'); } else { $query = $quer...
1
ea67bebbe4530990c0abc6ffc87e97cc
4c13d5105947da91182c5d83f84d776d
Zwraca punkt przeciwny
class Vector3D(): def w_przeciw(self): return (-self.x,-self.y,-self.z)
1
1fe4ce514159542b9a53724558bc5df3
16e69e2926897c39d37823e9b7ee139b
isProperty - sees if the line looks like a property
public class PropertiesToDataNodeConverter private boolean isValidPropertyLine(String line) { return !line.trim().equals("") && line.contains("="); }
1
56e0f10387f83175e2f00a5a59fb63e8
edcff93698cc4bbb745bd944414a0320
解冻计划
{ $resopnse = $this->postponeRepository->store($request, $plan_user); if ($resopnse !== true) { return back()->with('error', $resopnse); } return back()->with('success', PostponePlan::FROZEN_PLAN_MESSAGE); }
0
f7cebf0e6c1a8b15fc6c13b52335e37a
db3094d3aabaa52e8509d564ae3226b9
change length but keep pitch
{ PHONEME_LIST *p; int sign1; int sign2; if(selected_ph < 0) return; p = &phlist[selected_ph]; sign1 = p->pitch1 - p->pitch2; p->pitch1 += pitch1; p->pitch2 += (pitch1 + pitch2); sign2 = p->pitch1 - p->pitch2; if((sign1 != 0) && ((sign1 * sign2) <= 0)) { if(p->env == 1) p->env = 0; else if(p->env ...
0
6d36cba6e37e6abf96c5afdd2d6398d0
21b5e7489ee9bfd4b5be5d722b9d8eb8
CANNOT ADD WHEN QUES ID EXIST
{ $exam = Exam::find($exam_id); $questions = Question::where('exam_id', $exam_id)->get(); $avail_quests = Question::where('exam_id', $exam_id)->count(); if($exam->no_of_quest == $avail_quests) { Session::flash('err_msg', 'You have no more slots to add questions.')...
0
3c872b8d877e927fac10b67e90ec149a
54c81d95956d460c840f35309557dbec
Enables controls that allow the user to select source files.
if (initializeContent.getSelection()) { initializeContentKind.setEnabled(true); initializeContentFileLabel.setEnabled(true); initializeContentFile.setEnabled(true); initializeContentBrowseButton.setEnabled(true); } else { initializeContentKind.setEnabled(false); initializeContentFileLabel.setEnabl...
1
ca4fcf647593f6db54ca05f343ae3876
d80335d7109ec04d684b0aea04c29248
Ensure operation completes, regardless of any channel/connection errors occuring. Will retry by establishing the connection, and reapplying the function.
command(function(error) { if(error) { setTimeout(retryUntilSuccess, interval, command, interval, callback); } else { return callback(); } }); }
1
64d469c6abe690447e63938a81a8c5d4
78a7dca1488d8dfd7c40e634acf26523
Retrieve the host reservations from the specified host reservation file.
def main(): if len(sys.argv) != 3: print("Usage: parse_dhcpd_config.pb <isc-dicp-file> <csv_file_name>") sys.exit() if not os.path.isfile(sys.argv[1]): print(f"Can't find file '{sys.argv[1]}'") sys.exit() with open(sys.argv[1]) as f: raw = f.read() hosts = re.findall(r'.+?\n\s+host\s+(\S+)\s...
1
5a3d2f496d81c4f70e31fcd4aee9c33b
27b5b7b3bb539be29dfde13dedb107bf
检查某一天是否浇过水
java.text.DecimalFormat df = new java.text.DecimalFormat("#0.0"); DbUtils db = DbUtils.create(getActivity()); List<BltModel> blts; float averageWater = 0; WhereBuilder builder = WhereBuilder.b("date", "==", today) .and("hour", "==", hour).and("modelstate", "==", checkType); try { blts = db.findAll(Se...
0
a6343ee66535e990906939c2c1554cbe
18e50a881fac229ab23f5f1241b31d6c
số lượng GV đã hd đề tài
Connection con = JDBC_Connection.getConnection(); String sql = "select count(*) as 'dem' from HOCVIEN_LOPHOC where id_LH=?"; PreparedStatement preparedStatement = con.prepareStatement(sql); preparedStatement.setInt(1, id_LH); ResultSet resultSet = preparedStatement.executeQuery(); resultSet.next(); int de...
0
abd5a99e75759ed699b26e4dd170179d
8ab4c7ad9adba8de04f78cd8e63c716b
Send Email to the user after success paypal/sofort payment
class SendEmailApi public function sendPaymentOnSiteEmail($userId, $orderId) { return $this->sendEmail(SettingsApi::PAYMENT_ON_SITE_EMAIL_TEMPLATE_ID, $userId, array( 'orderId' => $orderId )); }
1
5b1025b6b44c7ab0751452656977f90f
b5e52e00142b79e523191b180ab72501
clears the ADC interrupt flag
void ADC1_Tasks ( void ) { IFS0bits.ADCIF = 0; }
1
519d149d902af957412b632ad85f0555
d98a79aa3045fc32944325658854a465
Load an update file in current instance, returning the state of operation.
{ csf_unqiue_lock<decltype(m_modify_mutex)> tmp_modify_lock(m_modify_mutex); refresh_modify_map(); } { csf_unqiue_lock<decltype(m_mutex)> tmp_lock(m_mutex); return update_file(file_absolute); } return csf_true; }
1
9052ee27950c63b4015074e669c1e23b
f91e102a8278fa1bd7269301ffef778b
Retrieve duplicate items.
public partial class Persister public virtual async Task<IReadOnlyCollection<(Guid, string)>> Duplicate(string sourceMessageId, SqlConnection connection, SqlTransaction? transaction, string targetMessageId, Cancel cancel = default) { Guard.AgainstNullOrEmpty(sourceMessageId); Guard.AgainstNullOrEmpt...
1
ff99dc09527e4dc51df1bd0dc5e9bdc9
bf8722af1719bd8d06b1830eaa73d114
新增院系信息
@Service public class CollegeInfoService public void addCollegeInfo(CollegeInfo collegeInfo) throws Exception { collegeInfoMapper.addCollegeInfo(collegeInfo); }
1
b39ebc0103acea8cecb4e7da65ea279e
b8800eb27d876adf4c87a8db575048f3
Deletes the user attributes in a user pool as an administrator. Works on any user. Access Level: Write https://docs.aws.amazon.com/cognito-user-identity-pools/latest/APIReference/API_AdminDeleteUserAttributes.html
export class Sdb extends PolicyStatement public toDeleteAttributes() { this.add('sdb:DeleteAttributes'); return this; }
0
b09041f96fce8d8df9947ab3da59241a
7d19ea0aa84a38cf5e2d75e92f5c2f59
シンボル名を元に文字列表現された型情報を返す
kType k_tmnt_find_type(kuint sym) { kType ret; k_return_value_if_fail(sym != 0, 0); TYPE_LOCK; ret = _k_tihash_get(sym); TYPE_UNLOCK; return ret; }
0
229f664799c9fe895bb23d9a41687f29
666c9937cb640ed13121dd0a66700ffa
입하검수 상태 반환
public class LI01010E extends AsetecSessionFlex implements ISaveCallableWithType @SuppressWarnings("unchecked") public static String getInbound_stateLI010ND(Connection conn, DAOFlex dao, String strCenter_cd,String strOrder_date,String strBrand_cd, String strOrder_no, String strLine_no) throws Exception { Paramete...
1
90258f02e098987cf31cd29d2038918c
1ba03709e75aebe7e1e8cf4d1d10108e
get_drink_infoで取得した商品一覧の多次元配列から目当てのcolumnの値を取得
class ProductTableModel(val data: List<Product>) : AbstractTableModel() override fun getValueAt(rowIndex: Int, columnIndex: Int): Any? { val (productid, category, cname, ename) = data[rowIndex] return when (columnIndex) { 0 -> productid 1 -> category 2 -> cname ...
1
730e9a0c9a24657ac9064a25b6d5107d
f9f2007822aaa391d93a6814d05c64a8
Called when the test rig requests that an event be fed
namespace LHCb class AmsDataReceiver : public NetworkDataReceiver virtual StatusCode rearmNetRequest(const RecvEntry& src) { int sc = ::amsc_send_message("EVENT_REQUEST",14,src.service.c_str(),WT_FACILITY_CBMREQEVENT,0); return sc==AMS_SUCCESS ? StatusCode::SUCCESS : StatusCode::FAILURE; }
1
1fe9d5ea762950051ec38c98b24e7cb9
c78b1677b369b26a0fe53ac5a7d59968
处理地图平移到指定房地产,且指定房产颜色高亮
function houseResetColor() { map.removeLayer(houseColorLayer); $("#houseRentRate").hide(); }
0
736696b221b8aeaa7938834226bc9284
b0036a9afa3ec6ca6de7cb6bec9b5da2
Generates determining values for all buildings, evenly spaced between given min and max values. Order is randomised,
public class Platform : MonoBehaviour public void generateBuildings() { GameObject newBuildingLeft = Instantiate(building[Random.Range(0, building.Length)], transform.position, Quaternion.identity); newBuildingLeft.transform.parent = buildingParent; newBuildingLeft.transform.localPosition = ...
0
4916fd2ff4695e010136897312bcf3c3
03d220a984369efccfc5f8242b866696
Test that landlord has no access for retrive of roommate post
self.client.force_login(user=self.user_a) response = self.client.get( reverse(self.detail_view, kwargs={'pk': 4}) ) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN)
1
a238c30589dddea6192f91001fa68038
aace50a2d59541e74bcfcb2f7c28c593
при загрузке скрывается веб браузер
namespace RankHelper public partial class WebForm : Form void InitWebBrowser() { webBrowser_new.ScriptErrorsSuppressed = true; }
0
4afa462430619a9248e8fe77ec507377
9ea81ed1a5c78ccbdb99ad2afa2a54b8
Take the most frequent attackers which cover the tau \in (0,1) of the cdf
class MultiArmedBandit(object): def get_max_kl_ucb(self,time,c,precision): emperical_means = self.succ/(self.succ+self.fail) low = emperical_means.copy() high = np.ones(self.n) rhs = np.log(time) + c*np.log(np.log(time)) mid = np.ones(self.n) lhs = np.ones(self.n) ...
0
1f376e88ca051195e2df51b27334c28f
b3a18186f37f01ed175a4997adbfb1bb
获取单词表(EnWords)指定条件的拼写列表(排除重复项单词) 转Excel时使用
{ List<string> cncoll = new List<string>(); string ltbysscn = FileOperation.ReadFile(@"pt_resources\cnptfword", true, Encoding.GetEncoding("GB2312")); string cnbyslt = FileOperation.ReadFile(@"pt_resources\r2cnnocsv", true, Encoding.GetEncoding("GB2312")); Parallel.For(0, ltbys...
0
f01df5e28b4a50c2732422fd1f20dabc
8cccd667916dad72b9a0a7be324cb077
Gets the Amount of the transaction in cents.
public class OrderCodePaymentRequest extends Request public Long getAmountInCents() { return amountInCents; }
1
9632fc2b2e833675383ab079ea9ac04e
fac3383b7a72147e5685c7413bb6a2eb
构造函数中创建root节点
class Store constructor(root) { this.root = root }
0
1962a46b52a6cebd85c9f6331a408b24
3b3b4c92870692c98671afa4583f40a2
根据指定的就诊信息,获取该次住院产生的检查数据列表
{ sql = @"select chartevents.* , d_items.label, item_unit from mimiciii.chartevents, mimiciii.d_items, " + dbsource + " where chartevents.itemid=d_items.itemid and chartevents.itemid=" + dbsource + ".item_id and icustay_id =" + icustayid + " and chartevents.i...
1
f93dbc84c351dca6ce47e74c1e80c304
3848bb8dbbd4b26ebc43a41c14f64f7a
남은 '.' 인 곳 개수 count
int findDot(char* num) { int lenOfNumber = strcspn(num, "."); return lenOfNumber; }
0
4dafb198931968508a7ed8811b6cd85a
f0d92b1322d24bdcd737199c08608bc1
合取
{ if (this->MaxPower > s.MaxPower) return s + *this; auto result = new TSet(this->BitField & s.BitField); return *result; }
1
84896c13dc94fb472f4f2d32c9a3e065
107fd6dcca1cc23b7025c6abe3cbb363
根据传入的URL,对图片进行加载。如果这张图片已经存在于SD卡中,则直接从SD卡中获取,否则就从网络上下载
public class ImageLoader public Bitmap loadBitmapSync(String url, int reWidth, int reHeight){ String key = hashKeyFromUrl(url); Bitmap bitmap = getBitmapFromMemoryCache(key); if(bitmap != null){ Log.d(TAG, "loadBitmapFromMemory, url: " + url); return bitmap; } ...
1
642ce9810d85dec615f418c841264f01
203cfaa72ae108578657d69f521157ea
Get score and make it into a string formatting example: 00005
class NeuralNetwork: def justify_score_string(value: float) -> str: return str(round(value, 4)).ljust(6, '0')
1
5877ef9f18ff493deb0a8f6e0327be0b
e086b6e50611c219cdb3f18755906c50
Get A list of interventions based on its creator
namespace RingCentral.EngageDigital.Api public partial class InterventionsApi : IInterventionsApi public GetAllInterventionsResponse CreateIntervention (string contentId) { RingCentral.EngageDigital.Client.ApiResponse<GetAllInterventionsResponse> localVarResponse = CreateInterventionWithHttpInf...
0
233fa2ce9b31c925f24ef726f7162614
72062dd15e4a22e6bf10a5857736b1df
プリペアドステートメントを実行し、PDOStatementクラスのインスタンスを取得する。
abstract class Basedb public function getPdoStatement() { $Connection = DbManager::getConnection($this->connection_id); $Statement = $Connection->prepare($this->getQuery()); if (empty($this->getBindTypes()) === TRUE) { $Statement = $Connection->executePrepared($statement, $this-...
1