query_id
string
corpus_id
string
query
string
code
string
label
int64
07fb9f62603eb8733fcaea7289ff0f7a
c55e960e82202a0d2f4b111e15fd8546
必须使用Path.Combine拼接,服务器不一定是windows
{ if (path.IndexOf(':') != -1 || path.StartsWith('/') || path.StartsWith('\\')) return path; return Path.Combine(AppDomain.CurrentDomain.BaseDirectory!, path); }
1
61dba8fa5b670f4eceba55a52fc9e240
26ca6bf0c227f0ceaac6b5d2a71b15c7
@@ funkcja odpowiedzialna za obsługę ekwipunku
{ lbEquip->setText(""); QString str = ""; for (int i = 0; i < hero->equipment.count();i++){ str += "<div style=\"font-weight: bold; margin-left: 0px;\">"; switch(i){ case 0: str += trUtf8("Оружие"); break; case 1: str += trUtf8("Щит"); ...
1
b8cd1560e9f5e6f9ed5c0c2938a9a9d5
1401a543ab2261d223e09db90a19550b
Made new request to google search API if the last request did not yield all Required data follow the query params.
public class SearchActivity extends Activity public void customLoadMoreDataFromApi(int offset) { int iNewStart = (offset - 1) * 8; String query = etQuery.getText().toString(); String stGoogleImageSearch = "https://ajax.googleapis.com/ajax/services/search/images?rsz=8" + "&start=" + iNewStart; if ((stImageSi...
1
456f4f6924dfd5fafdec41cb7c050062
21a04b45b7e8d2d740debfe6c2fc0a1b
Getter for the property that corresponds to the TenantRole object selected as row in a DataGrid
[PermissionFilter(MenuCode.TenantRole)] [ProducesResponseType(typeof(DetailsOutputModel), (int)HttpStatusCode.OK)] public async Task<IActionResult> GetDetailForTenant(long? id) { if (id == null) { return JsonBadRequest("Role ID is required."); ...
0
305d617b76de1750ee3179796a875851
dc12f787b16125a568d13bd8c0d45d36
Verifies that the 'Change Payor' button is disabled.
namespace Fiserv.Mobiliti.Business.Presentation.Automation.Pages bool DepositButtonIsDisabled();
0
bc2cd9fc063c75de1c4b71fa0e23915c
ca505042c7e49fb69a7f89cef0981c26
跳转至未付款订单页面
@Controller @RequestMapping("/order") public class OrderController @RequestMapping("/toBePaid.page") public String toBePaidPage(){ return FPATH + "toBePaid"; }
1
d1c27f58862100bec2a8d5b7fac50899
eb23f4b5624c26214f6c795617251901
平分list 多余的放到单个的list中
MyLinkedList<Integer> resultList = new MyLinkedList<>(); int temp = 0; int resCount = 0; for (int i = 0; i < count; i++) { temp += list.getByIndex(i); if (i % 2 == 1) { resultList.add(temp); resCount++; temp = 0; ...
0
06e67f9e0d414d71a573ab63886df5e1
4bea55eac97aa1d55b39bc0c99bf5da1
加载渲染完成时 按照默认时间排序 初始化数据
var srcArr = arr.reverse(); $.ajaxSettings.async = false; for (var i = 0; i < srcArr.length; i++) { (function (e) { var srcItem = srcArr[e]; var jsonUrl = _variable.jsonPre + srcItem.datas; var jsonForDelete = srcItem.datas; var time = srcItem.addtime;...
0
bdcbb960daeec969f0c1d571601e9d6b
cc9c4cb1d0233aa583a5b7d997208326
Returns a pointer to the worksheet if successful, 0 if otherwise.
struct SHEET *sheet_alloc(struct SHTCTL *ctl) { struct SHEET *sht; int i; for (i = 0; i < MAX_SHEETS; i++) { if (ctl -> sheets0[i].flags == 0) { sht = &ctl -> sheets0[i]; sht -> flags = SHEET_USE; sht -> height = -1; return sht; } } ...
1
6b6e6c9d25ecc3ed26f409acd0af1be3
ece117e1c024fa71c466ad4ce71e2eb3
si da clic en siguiente, se resetean los componentes y se cambia la accesbilidad de la ventana grafica
{ this.label16.Visible = false; this.txbSPLibrary.Text = ""; this.txbSPLibrary.Enabled = true; this.txbLocalDirectory.Text = ""; this.btnCheck.Enabled = true; this.dtNomina.Enabled = true; DateTimePicker dtNomina = new DateTimeP...
1
e945057a53b62b9fbe5d1c98ed4bc488
ed796a02f554d88f38ae329c0a9916cd
Checks whether a gamepad button has just been pressed.
{ bool released = false; currentGamepadState[button] = IsGamepadButtonUp(gamepad, button); if (currentGamepadState[button] != previousGamepadState[button]) { if (currentGamepadState[button]) released = true; previousGamepadState[button] = currentGamepadState[button]; } else relea...
0
d6237040434f4594e68b78c36edde21d
e85ec40723a907ef4dd07a7295c9ecd3
Remove Simple Pointer Device from Consplitter Simple Pointer list.
void LocoNetConsist::removeFromConsistList(DccLocoAddress* LocoAddress) { consistDir->remove(LocoAddress); consistList->removeOne(LocoAddress); }
0
9e2ad5999bea8d0ab4415a61782a7d44
e9f3a7845873fe10408f03619b627be1
画像をレンダリングするメソッド(DBより取得した画像データのバイナリーをStreamedContentに変換して返す)
WritableImage render(Map map);
0
4e59ec54106a4dfb4ab97d1c8dc97f9c
6027b88e78901e8c8fede741cfdc1e42
setter for Column CMSX_META_PROPENUM.GMT_CREATE
class Cms_Model_User_Group extends Cms_Model_Abstract public function setCreated($created) { $this->_created = $created; return $this; }
0
8f0222276a0004630a0c8e9323cbea2b
b73213563c0625ea5dc4126298fd3c43
○ マーカーIDを返す
const std::string LinkNode::GetMarkID()const { return m_strKey; }
1
a06ca23bc781310c6901798d82734905
07153c7be17682cdfd1056e0cee1d08b
Removes all the logs for an application
def remove_app_logs(app_name): mongo_collection.remove({'app_name': app_name},multi=True)
1
c59a33affdcfb760fa93dd3d412d2b70
52a92d1604beee6ddaa7abbb697ca69e
Posts update to the status of incoming messages upon receipt or read
class Message: def updateConversationStatus(self, conn) -> bool: if not self.conversationRecord: raise Exception('no conversation record') cur = conn.execute(''' WITH read_count AS ( SELECT DISTINCT COUNT(user_id) as count FROM %(sche...
1
a44a82b6dba30cd0a15959586ec55d2b
03f03a74137b6822b0f2aac28bbb584d
Test the property orderedListItems
class TestOrderedListMethods: def test_orderedlist_getitem(self): self.ord_lst.append("boo") self.ord_lst.append("foo") self.ord_lst.append("buzz") assert self.ord_lst[1] == "buzz"
0
cdb9b499583f78f8e35af8f5c293ce92
07329cc76e5543cf85c9e4e7b9e00ea7
Replace don't cares with two equivalent statements.
originalSourcecode = originalSourcecode.replace("&&", ConvertNotEqual.AND_SYMBOL_REPLACEMENT + ""); originalSourcecode = originalSourcecode.replace("||", ConvertNotEqual.OR_SYMBOL_REPLACEMENT + ""); return originalSourcecode; }
0
bbd817822aad6ac160bafab39aabc545
dd0fe1417d3d203a76527270baebcb03
同理,ascii转换为char 直接int强制转换为char
val c:Char = 'a' val value:Int = c.toInt() println(value) val str = "I love you" val array = str.toCharArray() val result = with(StringBuilder()){ for(ch in array){ val result = ch.toInt() append(result.toString()+" ") } toString() } println...
0
3af004cd3425b7c86fc362f3779fc981
c72f61ae0340671683ed313103756c40
Returns the number of good points (only relevant points).
Boolean countGood();
0
747760aced142b2a1cbc8c85a4c5ca13
847c0786d117512f575a3200a1202fa9
パス一致文字列を取得する
{ string ret = ""; for (int i = 0; i < common.Length; i++) { if (value.Length < i + 1) { break; } if (common[i] == value[i]) { ret = ret + common[i]; ...
1
2da935b8db1bf8057ad2b63c5dbafb14
fe090ffdb8dba0395fd5e7e78bd52f0f
查询数据库,是否有该ID的书,如果有就删除,没有提示错误
{ try { int a = database.delete("BookInfo", "bookid=" + id); return a > 0; } catch (Exception ex) { database.close(); ErrorMsg em = new ErrorMsg(DateTime.Now.ToString(), ex.Message); ...
0
5caae75f56da9585b0736451954d8230
f285e8b5bfe4fb45c04232566670577c
This function is used to take the arm to any position which is given to it by the user.
{ nMotorEncoder[topRight] = 0; if(degrees < 0) { while(nMotorEncoder[topRight] > degreesToTicks(degrees)) { moveArm(-speed); } } else { while(nMotorEncoder[topRight] < degreesToTicks(degrees)) { moveArm(speed); } } moveArm(0); lockArmPosition = nMotorEncoder[topRight]; additionalPower = 0; }
1
dc2dcc5692092365b8164414d831a2b4
c40b5866d8df65ea6fe0171a9936b012
Sets the index register.
public class Chip8 public void setIRegister(short inst) { I_REGISTER = (short) (inst & 0x0FFF); }
1
c1407400a72f56e7936814338c9030c1
9dd9d3132d1c3fbb666d2ba7bfd5ad76
OP 11: ADC r/m16, reg16
unsigned op_a1 (e8086_t *c) { unsigned short seg, ofs; seg = e86_get_seg (c, E86_REG_DS); ofs = e86_mk_uint16 (c->pq[1], c->pq[2]); e86_set_ax (c, e86_get_mem16 (c, seg, ofs)); e86_set_clk (c, 10); return (3); }
0
743af2239bf08c0c06f49d2244a00223
a9b7169513c5cdf9426d07f6c5284056
Returns the value of the '<em><b>Denominator Count</b></em>' containment reference. <!-- begin-user-doc --> <!-- end-user-doc --> <!-- begin-model-doc --> The sample size for the group that was measured for this risk estimate. <!-- end-model-doc --> extendedMetaData="kind='element' name='denominatorCount' namespace='##...
{ synchronized (monitor()) { check_orphaned(); org.apache.xmlbeans.SimpleValue target = null; target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DENOMINATORDESCRIPTION$10, 0); ...
0
11181521815e7130f41ea7d0fd5b0816
70118b0e2ac0db86807c4981c5544c47
Calculates a weight matrix for the case of 1D WC with exponentially decaying spatial connectivity.
n = self.n c = 1. / (n + 1) self.Wm = np.full(n + 1, c) self.Wc = self.Wm
0
c8e9d6ca6ca43dfcbb1e13802cae0c5e
02c2c68724c548ff747d48f632a84582
Process hotel services category subcategory names and prices:
console.log(services); console.log(services.length) for (let i = 0; i < services.length; i++) { if (services[i].service) { if (this.category_data.indexOf(services[i].service)) this.category_data.push(services[i].service); if (this.sub_category_data[services[i].service]) { ...
1
2e1f04959c24fd89b08dc7385197802d
5e9c0266e91d4fbbf70c7da507b13f59
Getter for <code>bitnami_edx.instructor_task_instructortask.task_state</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.4" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class InstructorTaskInstructortaskRecord extends UpdatableRecordImpl<InstructorTaskInstructortaskRecord> implements...
0
1242569148fd2a79f4ec49f5660d69fb
a7f8883fc67d5ad7a20da8c4c389bd69
去掉结点前面的文件及文件夹小图标
var rootText = treeView.instance.get_node(rootId).text; $('.jstree-last .jstree-icon').first().hide(); $('a:contains(' + rootText + ')').css('visibility', 'hidden'); $('ul:contains(' + rootText + ')').css('position', 'relative'); $('ul:contains(' + rootText + ')').css('top', '-20px'); $('ul:contains(' + rootText ...
1
899ca7b27551feac1239b4f6302adfd1
201678a5b589f0aaaebf5511324f58e0
Vue qui affiche les détails des annonces côté client
{ $AnnoncesType = (new AnnoncesType)->ListType(); $departement = (new Departements)->departements(); $villes = (new Villes)->annonces_villes(); $featured = Annonces::where('featured', 'TRUE')->get(); $annonces_id = Annonces::where('id_annonces', $id)->get(); $nameRubr = AnnoncesType::where('rubriqueid', ...
1
347abb2d9ead0bf62cdeb143ea1fbf30
16a64931936c97019a2acf297415093a
Render the course duration tool view.
if (empty($items->getValue()) && $items->getFieldDefinition()->getTargetBundle() == 'list_of_long_course_prices') { $now = new DrupalDateTime('now'); $now->setTimezone(new \DateTimeZone(DATETIME_STORAGE_TIMEZONE)); $query = \Drupal::entityQuery('node') ->condition('type', 'vih_long_cource'...
0
52f718eb7d41a6a8e2bae71c667fd7c5
06c1f806c1247bee0b7859ca38aa70f0
Removes the entry from the table when the delete icon is clicked. However it does not delete the item from the database. Also data is temerarily backup incase the user cancels the operation.
self._cancel_entry_id_edit() self._cancel_entry_text_edit() entry_id = self.get_entry_id(row_index) deleted_entry = self.get_category_data(category=category).pop(entry_id) self.select_entry_row_index(None) self.refresh_entries() return deleted_entry
0
c756e2d788898141c76305c7491a7fa8
a357592794d35210f8d8f148a6b2e28f
获取产品条目CODE的最大值 <p>(方法详细描述说明、方法参数的具体涵义)</p>
public int getMaxProductCode();
1
64360508350d887aa79ed096455c787d
0096116254035cf43fdd1f8f5f04d140
Gibt das Einstellungsdatum des Mitarbeiters zurück
class AdminPage public function getDateOfEmployment() { return $this->dateOfEmployment; }
1
51d0952e87a875acc5f21b3b3bcb7f64
d3e69c97c673116f6d25fbe010d413e8
[START spanner_alter_sequence]
def add_column(instance_id, database_id): spanner_client = spanner.Client() instance = spanner_client.instance(instance_id) database = instance.database(database_id) operation = database.update_ddl( ["ALTER TABLE Albums ADD COLUMN MarketingBudget INT64"] ) print("Waiting for operation to...
0
73eaf542f0fd6d0141d896e601bb4d5f
a35dbe8b5fde41ec6b1d945616d2f639
Assuming the archive has already been uploaded, create a new environment with the app deployed onto the provided stack. Attempts to use the first available cname in the cnames array.
F.Promise<Result> newEnvironment(String parentEnv);
0
ac8ea4839fca972ddd90b6430bcedb2d
afe3db7949ed055385a599a90671e499
Create the column definition for a spatial Point type.
class ElasticsearchMigrator definePoint() { return { type: 'geo_point' }; }
1
9f37abb71c9e5a7e990b92a4f0dfdcb1
5d30b9540775679931285733d2201206
Draw the hexagon and save it's array of vertices
[RequireComponent(typeof(MeshFilter), typeof(MeshRenderer), typeof(MeshCollider))] public class Unit : GameScript.Combatable void BuildHexModel() { for (int i = 0; i < 7; i++) { meshVertices.Add(GameScript.HexData.corners[i] / hexSizeDivisor); SetUVsForUnitTop(i, currentTier)...
1
cfca8211ea1a74c5e85a514b3fed534a
ce4a3c6f0de5f2b998cacc59026a34f3
提取文本中的括号及括号内内容,当有括号嵌套时,提取每一对 成对的括号的内容
if self.extract_parentheses_pattern is None or self.parentheses_pattern != parentheses: self.parentheses_pattern = parentheses extract_pattern = '[' + re.escape(self.parentheses_pattern) + ']' extract_pattern = re.compile(extract_pattern) p_length = len(self.paren...
1
a422f8a20484aa961ec863b44406c067
ce773fb61effeb691d576122107702d7
Disable the DMA for Reception.
void Uart_StopReceiver(UartPort *Port) { Port->DMAStream_Rx->CR &= ~DMA_SxCR_EN; DMA_ClearAllFlags(Port->DMAStream_Rx); Port->Usart->CR3 &= ~USART_CR3_DMAR; Port->Usart->CR1 &= ~USART_CR1_RE; }
1
f36212d77111b5c84a34b697dfb573f7
e23e7bee9f3f2249f13603465eea9ed5
Get path to hooks config to include in hook script
class UserHookScript ( HookScriptBase ): def get_hookscript_path ( self ): return self.hook_script_fspath
1
d577e5d64a15717b6ab668503a5e7708
db1457348ff3eb102336d28b0fc30d12
Gets whether the user is writing a new message
@SuppressWarnings("serial") public class MessageThreadData extends DataObject public String getNew() { return is_new; }
0
4d3be0816f6a6366719e5de4641ba5d5
3a693163695f5fbb6a2d99e9e49b42a0
Pre-calculate refpose-to-local transforms
{ const int32 NumRealBones = RefSkeleton.GetRawBoneNum(); if( RefBasesInvMatrix.Num() != NumRealBones) { RefBasesInvMatrix.Empty(NumRealBones); RefBasesInvMatrix.AddUninitialized(NumRealBones); CachedComposedRefPoseMatrices.Empty(NumRealBones); CachedComposedRefPoseMatrices.AddUninitialized(NumRealBones); ...
1
0502fccf8ff291437e9251db4f2d5b29
7aa5b1d565830a3563ce1e82baae65e8
RadioGroup的点击监听事件。RadioButton与ViewPager对应
public class MainActivity extends Activity implements MainView.IOnButtonClickListener @Override public void onButtonRadioClicked() { Intent intent = new Intent(this, RadioGroupActivity.class); startActivity(intent); }
0
0ba74f7d52ae575a5a8f32a13c0cc47d
e423f7904c7166e957185c271c58591b
Register a template filter, available in any template rendered by the application. Works like the :meth:`app_template_filter` decorator. Equivalent to :meth:`.Flask.add_template_filter`.
self, f: ft.TemplateTestCallable, name: str | None = None ) -> None: def register_template(state: BlueprintSetupState) -> None: state.app.jinja_env.tests[name or f.__name__] = f self.record_once(register_template)
0
d360dcad7730534a2e179f25a0d865aa
794a13fb06bde922b0b3d6a1a2c7bf68
Returns the benchmark bicycle parameters from [Meijaard2007]_. References
bP = benchmarkParameters mP = {} mP['rf'] = bP['rF'] mP['rr'] = bP['rR'] mP['d1'] = cos(bP['lam']) * (bP['c'] + bP['w'] - bP['rR'] * tan(bP['lam'])) mP['d3'] = -cos(bP['lam']) * (bP['c'] - bP['rF'] * tan(bP['lam'])) mP['d2'] = -cos(bP['lam'])*(bP['rF']-bP['rR']-bP['w']*tan(bP['lam'])) m...
0
113fb73d0dd245ec116f060076f91b12
bc6109440c93d5b7e74f4570053e6f7c
make the file view show only the child nodes of the currently selected directory from dir view
void MainWindow::on_dirsView_clicked(const QModelIndex &index) { QString path = dirsModel->fileInfo(index).absoluteFilePath(); ui->filesView->setRootIndex(filesModel->setRootPath(path)); }
1
6f728e068a1fe4952f3101491e382d42
2e8af572d3683abd849c4c73f891c9b9
Populates the edit window with values from the contact.
namespace AddressBookProject public partial class EditContact : Form private void btnEdit_Click(object sender, EventArgs e) { FirstName = txtFirstName.Text; LastName = txtLastName.Text; PhoneNumber = txtPhoneNumber.Text; Address = txtAddress.Text; ...
0
7ab20320655d53992bde4c13291dd50c
70bd2fd9dc51b18a3a8a0a79507311be
Fonction permettant d'updater l'état d'un capteur
void PileEtatsCapteur::miseAJour(CapteurDeLigne& capteurDeLigne) { DonneesCapteurCompactes donnee; donnee.placerDonneeBrute(capteurDeLigne.etatCapteur(obtenirSommet().brute) ); capteurDeLigne.miseAJour(); if (donnee.brute != capteurDeLigne.etatCapteur(obtenirSommet().brute)) return; changementSommet = false; ...
1
b17ba1926330d862e260f0e062056b07
785a41ce34ee71e9eeeea717c22b9d50
should first check if there is sufficient balance in the account. If the balance is sufficient,
public class Account public double Withdraw (double withdraw) throws InsufficientFundsException { if(withdraw <= balance) { balance -= withdraw; } else { double need = withdraw - balance; throw new InsufficientFundsException(); } return balance; }
1
7358d828c1160802ff21680f7a683bdd
cf61e5ba7f9cd9f0d6c82bf658d19e39
设置前3名的状态
export default class LandLordPlayingScene extends ZMClass{ setupInitialStatus(){ let self = this; let hiddenArr = [ this.leftClock, this.leftLordAssign,this.leftStatusLabel, this.rightClock, this.rightLordAssign,this.rightStatusLabel, this.selfClock, this.selfLordAssi...
0
04bfff9386b07295f438daba150b5800
37fd17e724e031d46ec129693f976fdf
Spawns Tables in Gazebo simulation
def spawn_models(ready_positions, initial_rod=0): if ready_positions: os.system("rosrun gazebo_ros spawn_model -sdf -database hanoi_ring_3 -model ring3 -x -0.15 -y 0.7 -z 0.73 -Y " + str(pi)) os.system("rosrun gazebo_ros spawn_model -sdf -database hanoi_ring_2 -model ring2 -x -0.15 -y 0.7 -z 0.77 -Y " + str(pi)) ...
0
f2053b4c72e1fd4da8ccd87337d11054
86343fddfa0699348641aa82ac43d336
Assign color sub-dictionaries to each player.
class RunGame(): def colorTerritories(self, sprites, gui): for p in self.players: for territories in p.territories: sprite = next((s for s in sprites if s.id == territories), None) gui.setSurfaceColor(sprite, p.color, 255)
0
541fdba029813975c1ef6e30ae539f97
753b88f64fe7cd0533f8bf3473326881
カラム名を表示するかどうかを処理します。
public class ClientShowListVBox extends VBox implements Initializable public boolean isShowPerformanceNameColumn() { return this.tcPerformanceName.isVisible(); }
1
6498fc5dfde70d2bb93fb359bb4534f2
106ef24074b45c58855a2523e1a19e88
finds the position of an element in the repository
public int locate(E obj);
1
ad291668a72d5f9c5a8cfa66cd04753d
982e13dad4db5aa222649269f64674b3
Gets if external broker.
class BridgeBlindTransfer extends Event public function isExternal(): bool { return $this->isExternal; }
1
5f61f58e32d5b6cf1d813af499a0d9ed
33b033b7e63aca9ec616afdd303012f3
Setter for attribute 'Constraint.BaseClass' Metamodel description: <i>MetaClass whose instances can be constrained by the current Constraint.</i>
@objid ("f5f6fdb9-1ced-48ee-a47c-b3d75da9f292") String getBaseClass();
0
27461e308517d0323dfe95a62fcc3abe
7aaba164a552f4cff160c9b35ffb77a7
Compute the maximum reciprocal rank and the index of the query it resulted from: reciprocal of the rank of the first relevant item (considering the first element being of 'rank 1'). Relevance is binary (nonzero is relevant).
items_score_direct = cf.ucf_q(target_user, args) candidates = items_score_direct.keys() candidates_length = len(candidates) if candidates_length == 0: return None items_score_inverse = {} items_users_score = args.get('items_users_score', None) for (item_new, score_old) in items_score...
0
eab5cff664d9568e023d33a4ef3bca7e
91de6d3d0bd461091eb10f63213749b1
根据图片主键和本地路径删除一条记录
class SiteFile extends Model public function removeFileByPath($path) { $imgInfo = self::where('url', $path)->find(); }
0
5e9d0ebecad8be7098041146c15398ea
63a87ddc09ecfe3ff6f25623eac5c39b
Gets rejected execution policy.
final class Worker implements WorkerInterface public function getExecutionPolicyRegistry(): ExecutionPolicyRegistryInterface { return $this->executionPolicyRegistry; }
0
90965f36d2cddfe22cff00f64d8c2839
6e96c025bf17f55240f2c8d5005c755e
This method should take data from the robot, eg. sensor data, parse it into a message and use the robot's emitter to send it to the supervisor. This message will be used as the observation of the robot.
class Robot(ABC): def sense(self): pass
0
b4c54693767410ebc6dd81f2c34f6b7c
b7dacfb546cf2881ba8ccae58aec0420
# Gets city parents (regions or countries) and ties them into the result array.
$this->db->select('pt_countries.*,pt_states.*,pt_cities.*'); $this->db->where('pt_cities.city_id', $id); $this->db->join('pt_states', 'pt_cities.city_state = pt_states.state_id'); $this->db->join('pt_countries', 'pt_states.country_id = pt_countries.iso2'); $q = $this->db->get('pt_cities')->result();...
1
81fd8914b23938ea032e098c7498c989
f040e1b565ae326e816adcf4427b0781
The number of bytes in the ``TKey``, not including the object.
namespace Org.Apache.Hadoop.IO.File.Tfile public class TFile public class Reader : IDisposable public class Scanner : IDisposable public class Entry : Comparable<RawComparable> public virtual int GetKeyLength() { return this._enclosing.klen; }
1
20bbe48ef967441acadf09f98be78d5b
4e01d3ba836bd49a3e44765f49175c80
Gets the quality setting based on the extension.
{ string extension = Path.GetExtension(fileName).ToLowerInvariant(); if (extension.Length > 0 && _dic.ContainsKey(extension.Remove(0, 1))) { return _dic[extension.Remove(0, 1)]; } return "unknown/unknown"; }
1
e1558d32d15821841d4305b0eca1b525
22c0055146af32de7915235f675a7d5d
Gets quote information for multiple stocks. The stock string should be comma separated with no spaces.
domain = 'cloud.iexapis.com' key = os.environ.get("IEX_TOKEN") if (sandbox): domain = 'sandbox.iexapis.com' key = os.environ.get("IEX_SANDBOX_TOKEN") try: batch = ",".join(batch) url = 'https://{}/stable/stock/market/batch?symbols={}&types=quote&token={}'.format( ...
1
5d5d2b0ce61a96195e94d9b05160bfd6
6fd67513c2cbc3517bb4fe9ceecbd894
Register this mod's fluid [ItemBlock]s.
public class ModItems public static void registerRenders() { registerRender(estus_flask); registerRender(estus_shard); registerRender(estus_ash); }
0
96f7a3b426e580c742623ab5a0cceefc
05a2a1f16f894c993d3424d3d778894b
Torna alla pagina precedentemente visitata.
class App_Redirector public static function redirectToPrev() { header('Location: '.$_SERVER["HTTP_REFERER"]); }
1
eee3ad2e7b16f03e7527a699ac7939b5
ca9c070c73d4d00f1a13b5922285fab2
Add the site to the filter so we only get our own site's responses.
{ $hosts = array(); if ($currentHost === true) { $hosts[] = $_SERVER["HTTP_HOST"]; } elseif (is_array($currentHost)) { foreach ($currentHost as $h) { $hosts[] = $h; } } foreach ($hosts as ...
1
c3425b4d6f6179331ab23f8bbff0e02a
3f62f9faa06c6da2fb60023e1f3503fe
Get a descriptor from mdib. When the transaction is committed, the modifications to the copy will be applied to the original version, and notification messages will be sent to clients.
class TransactionManagerProtocol(Protocol): def get_descriptor(self, descriptor_handle: str) -> AbstractDescriptorProtocol:
0
1089635b2267d48ca71649846d1fbf37
6a9759f3a94e7dcbebe7078095c3b0c8
1. 尝试释放锁
public class JamesLock implements Lock public boolean tryUnlock(){ if (owner.get() !=Thread.currentThread()){ throw new IllegalMonitorStateException(); }else{ return owner.compareAndSet(Thread.currentThread(), null); } }
1
9a04c8e93244f071bc37b8995c11fd2b
0d27d79b558907ce9df6ed2dfdb70581
根据显示的文本来查找所有对应的View实例
public class FindViewByMeXmlAction extends AnAction private void getViewList(AnActionEvent event) { PsiFile psiFile = event.getData(LangDataKeys.PSI_FILE); Editor editor = event.getData(PlatformDataKeys.EDITOR); if (psiFile == null || editor == null) { return; } Strin...
1
886a8e176dd76e8a68cc53a036dc16c1
9ed0e66d1b84441e9dd738d5a9926606
设置txtname控件背景为白色
public class HomeLayout @FXML private void nameEvent(){ name.setUnFocusColor(Paint.valueOf("#4d4d4d")); }
0
29c9b1a5cd3a59bc685a4f775150c672
5bbff0d0fe54118f652232077bf18aca
Closes the current active window and shows the previous one from the window sequence.
namespace BrowserTesting.Pages class PageExplorer : BasePage public void CloseCurrentWindow() { var lastActiveWindow = Driver.CurrentWindowHandle; Driver.Close(); if (tabsList.Count == tabsList.IndexOf(lastActiveWindow) + 1) { Driver.SwitchTo()...
1
c069e518d5b2c7fefec58ccf15236f50
d66ea3bbb6d7baac605e545bcebc5f0d
自动创建模板训练课程
List<String> resultList = new ArrayList<String>(); String lan = "3"; String ch = contents[0]; String en = contents[1]; if (StringUtils.isBlank(ch)) { lan = "2"; } if (StringUtils.isBlank(en)) { lan = "1"; } String label = (flag == 0 ? "" : "鄂尔多斯七牛视频EX"); String sql = "INSERT INTO `pe_tch_cours...
1
041dfc20682ff7d9ce63de509cb8c6f4
87b6a45d99056248d20db0e3fcd7319c
! The particles are stored in a dynamically allocoated Reactor1d which must be deleted to avoid leaks.
gridpack::dynamic_simulation::Reeca1Model::~Reeca1Model(void) { }
0
36734393e5e8b4aad65f42777482b435
197800dd8f596e072667fd27e5ad0aa1
This creates an instance of searcher_string. This argument 'strings' may be a list; a sequence of strings; or the EOF or TIMEOUT types.
onString = 0 sequence = [] question = [] answer = [] response = [] action = [] destination = [] link = [] inputFlags = [] photos = [] tag = u'' photoSmile = photoTalk = photoListen ...
0
323b16e829c9837ff32e1e2c50fe3c9d
c4a9887365c58b0dc33212cc85acd1b6
TAKEN FROM https://github.com/pltrdy/seq2seq/blob/master/seq2seq/metrics/rouge.py Computes ROUGE-N of two text collections of sentences. Sourece: http://research.microsoft.com/en-us/um/people/cyl/download/ papers/rouge-working-note-v1.3.1.pdf
hyps_and_refs = zip(hypotheses, references) hyps_and_refs = [_ for _ in hyps_and_refs if len(_[0]) > 0] hypotheses, references = zip(*hyps_and_refs) rouge_1 = [ rouge_n([hyp], [ref], 1) for hyp, ref in zip(hypotheses, references) ] rouge_2 = [ rouge_n([hyp], [ref], 2) for hyp, ref in zip(hypothe...
1
9b80e9544f975f6b58ad506de488f57b
49f814714ebf473652b4e0f41ea20411
[Service(Date = "2019-01-25", Director = "jfwang", Name = "保存角色下人员")]
[Helpers.LoginFilter(Order = 1)] public ActionResult Save(FormCollection form) { WaterKit.Role.RoleDb role = new WaterKit.Role.RoleDb(); role.jsmc = form["jsmc"].ToString(); role.jssm = form["content"].ToString(); role.jsid = Convert.ToInt32(form["...
0
e345cf4aacfc9a715df4e10e7dc92c0f
438b9f1b337d9734ec60811562cbbe28
指定の名前のスレッドが動いているか
fun isAlive(threadName: String): Boolean { val mThread = threadMap[threadName] if (mThread != null) return !mThread.kill return false }
1
7836dd8f3b2c41358280bd4453ff2605
df31671b313ff3f5a6ba7fddfffa3ee9
A decorator that adds a new method to a class.
def decorate_class_methods(decorator): def decorate(cls): for attr in cls.__dict__: if callable(getattr(cls, attr)): setattr(cls, attr, decorator(getattr(cls, attr))) return cls return decorate
0
97a840f9128e555c8888560fbb13c2cf
4125b806a9d8215e3a20b09006a2e132
No UIDs set provided, targets everyone
class RunAsEffectiveUserTests(TestCase): def test_UID(self): self._testUIDGIDSwitch(1, 0, 0, 0, [0, 1], []) self._testUIDGIDSwitch(1, 0, 1, 0, [], []) self._testUIDGIDSwitch(1, 0, 1, 1, [0, 1, 0, 1], [1, 0]) self._testUIDGIDSwitch(1, 0, 2, 1, [0, 2, 0, 1], [1, 0])
0
0fe8a003c6a5d5f99163e99edf7b6185
e1e564284a065be06ac13dfe7a8f8217
F.2 Exponentiation Function using loop
s= 1 while n>0: n = n-1 s = s*x return s
1
54e627fe0319bb5d6957982e9db51128
eddef7cf397f2208d40020774f954b52
Forget the state associated with the counter
class Counter(RestoreEntity): async def async_added_to_hass(self): await super().async_added_to_hass() if self._restore: state = await self.async_get_last_state() if state is not None: self._state = int(state.state)
0
6f3472d1c5df7ca2eaad49e6a5c18bd0
745fa11af041abaef7614d0323f14321
Create a spline of the specified order
float[] dKnots = new float[KnotCount]; knots.CopyTo( dKnots, 0 ); Vector2[] dPts = new Vector2[PointCount - 1]; for( int i = 0; i < dPts.Length; i++ ) { Vector2 num = points[i + 1] - points[i]; float den = knots[i + degree + 1] - knots[i + 1]; float scale = den == 0 ? 0 : degree / den; dPts[...
1
80008143222265fcab302c5cd7a6b849
e11e73509691a4e4639f9b57820b5a96
Método responsável por retornar o DTO de um histórico
public class HistoricoBaseController extends UtilControllerD public HistoricoResponse fetchHistoricoById(FetchByIdRequest fetchByIdRequest) { HistoricoResponse historicoResponse = new HistoricoResponse(); try { getHistoricoBAI().fetchHistoricoById(fetchByIdRequest); } catch (Exception e) { if (LOG.is...
1
4b02603aaba22c53721dcc42fb835dea
e007905c69c8ae8bbdd5cba92625ef09
Nombre de bateaux restant pendant le jeu
class Tortue(turtle.Turtle): def dessintextenombrebateaux(self, grille, position): for i, bateau in enumerate(grille.bateaux): self.aller_a(position[0] - 15, position[1] + i * 94 - 20) self.down() nombre_restant = grille.nombrebateauxdeboutpartype(bateau.TYPE) if ...
1
cfd6bb9731c96f2e4bb3b4eaa4c0b2b6
6f4d5c9d87054ffec1cfed06f40d3323
Retrieves the train lines in a prefecture via the CareerCross API
$sql = $this->_db->select()->distinct() ->from(array('line' =>$this->_name), array('line_id', 'name', 'rome')) ->joinInner(array('sta' => 'm_stations'), 'line.line_id=sta.line_id', array()) ->joinInner(array('pref'=>'m_prefs'), ...
1
cb7a67223245804c7ed08d12150b2e50
0f041eadfc4408c624b25d0a68a39a66
(F,C)
void iop_0f(CPU* cpu) { cpu->f &= ~IFL_C; if (cpu->a & 0x01) cpu->f |= IFL_C; cpu->a >>= 1; if (cpu->f & IFL_C) cpu->a |= 0x80; }
1
67ad14a42fd6a2d1fd28712c9f6a9283
745194f5190d889b2085aa265f7aee64
Ordena los jugadores por puntos
public class Game public static void sortPoint(List<Player> plist) { Collections.sort( plist, new Comparator<Player>() { @Override public int compare(Player p1, Player p2) { if(p2.getPoint() > p1.getPoint()) return 1; ...
1
6f3398406a70f8e8b68e6e2c806aceeb
cdc7d1465d829a0a442ca98ec9e12488
Set the ID of the study.
class ODMcomplexTypeDefinitionAdminData(object): def study_oid(self, study_oid): self._study_oid = study_oid
1
752e3d1ea43fe0f0a9e7e24bb32761b4
ee93762d467e48ac19fdfd42835e2793
Get the time when the document is created, in milliseconds.
public Long getTimeCreated();
1
05e6a3c621ebc09be5e969ee01ef8d78
6f4a80b1089da8965ba2e7e4cdc8b0b1
获取项目的商户号配置
class StoreFranchisee public static function GetMerchantConfig($code = '', $arr = '', $store_id = 0) { if (empty($store_id)) { $store_id = $_SESSION['store_id']; } if (empty($store_id)) { return array(); } if (empty($code)) { if (is_array($arr)) { $config = RC_DB::t...
1
2e14be196a1f03edb7d9a4261b32c969
465d5e2f5b7616249f588f33816ec91a
Creates a material from a diffuse and specular texture
namespace DecouplerShroud public class ModuleDecouplerShroud : PartModule, IAirstreamShield Material CreateMat() { Material mat = new Material(Shader.Find("KSP/Bumped Specular")); mat.SetTexture("_MainTex", surfaceTextures[textureIndex].texture); mat.SetTexture("_BumpMap", surfaceTextures[textureIndex].normal...
1
6db20454b3b045d5758ae645f51f6658
b0779d37593f0313a1a573cd6cc02b01
Overwrite the signature range in the given payload with zeroes.
void clear_boot_signature(void) { u8* dest = (u8 *)boot_signature; for (u8 i = 0; i < 32; i++) { *dest++ = 0x00; } }
1
726a0167fa62d85bd05447dad0da08c9
c79cb83dadb6d0edaa951c16876cc2f0
Este método carrega o objeto e o método enviado pelo link.
try { $route = $this->getRoute(); if(!isset($route['controller'])){ throw new Exception("URL não pôde ser processada", 500); } $args =[]; $reflection = new ReflectionFunction($route['controller']); foreach ($reflection->get...
1
45255933f10d9d3a11be95d862f3e847
949d2db59a900990b2d07a9f01f51648
Compares the two gradients by testing points at a given interval, note this does not detect when new nodes are added
{ int no = gradientList.size() ; for (int i = 0 ; i < no ; i++) { GradientEntry entry = (GradientEntry)gradientList.elementAt(i); if ( interval > entry.getDataRate() ) return false ; } return true ; }
0
c812f8c4fbed72a8f371861791c734c5
035b8bb0e3fa29bb04232de4172ae4b1
almost the same as normal wstaw, but with additional check on equal kod towaru
class CFakturaKorPozycja{ public function setTowar($Towar){ if(isset($Towar) && !empty($Towar)){ if(is_a($Towar,'CTowar')){ $this->Towar=$Towar; }else{ $this->Towar=new CTowar($Towar); } }else{ unset($this->Towar); } }
0
5ad20fe7e22081ee863747d421f9aa5f
865d1b6d5a7906ed7283e38b1b4410dc
Remove projects that are in related resources for collections
class ModsService def remove_related_item_nodes_for_collections! doc.search('/mods:mods/mods:relatedItem[@type="host"]/mods:typeOfResource[@collection=\'yes\']', "mods" => "http://www.loc.gov/mods/v3").each do |node| node.parent.remove end end
1