query_id
string
corpus_id
string
query
string
code
string
label
int64
94a538b261de9d3b2edf47853933ca05
155e805623048e1f4ada4db4bb51d84a
Moves the projectiles shot by the player.
class Projectile(pygame.sprite.Sprite): def update(self): self.rect.x += self.x_vel self.rect.y += self.y_vel
1
7066880b8159023817a622e7531e321e
effe7e1d4ee1355fe3d898340d1b1866
Specifies for what entities the operation should be carried out. <p> Specifying several be equivalent to performing a logical AND on the provided filters.
namespace org.camunda.bpm.engine.history UserOperationLogQuery entityTypeIn(params string[] entityTypes);
1
a6100172ac41bc45b87fbbb30f5dd1c7
7f61448ad6da3ef0f9cb03f40c5be655
Cmova
cases like (1)
0
d9a3bb8430bd5e7787fce99ffe237e5a
68a63a38ffa5466bf53f173bf3ff2b95
Is any component negative?
Vec3 { x: self.x.is_negative(), y: self.y.is_negative(), z: self.z.is_negative(), } }
0
5e44f4eb4fd5df5ad4274676f403cdc8
53d41700dd9cdf8057d8f92cf18b595d
send message pixel for Webtrekk
{ if (typeof $jq('body').jNetradaWebtrekk == 'function') { $jq('body').jNetradaWebtrekk.sendErrorPixel(strText); } }
1
3bcace1c35164f1112a84975ddbe5b2f
295724085aa9b425c40995c2fc4c019f
初始化一个链式队列
Queue *init(int n) { Queue *queue = (Queue *)malloc(sizeof(Queue)); queue->data = (int *)malloc(sizeof(int) * n); queue->head = queue->tail = 0; queue->length = n; queue->count = 0; return queue; }
0
25651ffe7d1a66473bf424a51062d3ab
0b16705e86fe332c86e6b096355983ad
代销入
class StoreSalesAction extends CommonAction public function add(){ $_REQUEST['agents_id'] = intval($_REQUEST['agents_id']); if($this->isPost()){ if(!$_REQUEST['agents_id'] || !$_POST['name']) $this->_jumpGo('添加失败,代入信息缺失', 'error'); $_POST['img'] = $_POST['img_file...
1
da60aef2897e47420559eaa978b4860c
af5a2a60978d18b16ceb738078d8566a
触发未选中事件
var option = ts.option; if (trigger) { if (emitItemEvent(ts, evt_unselect, item) === FALSE) { return; } } item.removeClass(css_selected); if (option.mode !== mode_list) { if (option.result.multi ? 0 === ts.value().length : undef...
1
5096c914b2db6713394447c30d8687fa
55f2cf1f51a35c2b64832cabd1156d20
Funkcja dodająca zaimportowane zestawy do bazy, dodaje tylko nieistniejace
os.chdir(r"C:\Jts") for plikzdanymi in listaplikowzdanymi: with open(plikzdanymi,"r") as file: reader = csv.reader(file) for line in reader: if line not in baza: baza.append(line) print(f"dopisano dane z pliku(ow): {plikzdanymi}\n")
1
09dac2f68b8d97efa840aec6e4a983c8
7fd01d5e789ab9e646ac4c533c5ddc47
@brief indicate whether rule has SAMEMASK flag or not
( uint16 const attrib_id ) { return ((attrib_id & HDRSCMRMAC3_SIMPLE_ATTRIB_MSB_MASK) == HDRSCMRMAC3_SIMPLE_ATTRIB_MSB )? TRUE : FALSE; }
0
679f8b46b6f22c2a1eb2e7a65c6d454d
dff80e373296ef2b9ad3f4129e585bf4
Use the output of policy network, pick action stochastically (Stochastic Policy)
class PolicyGradientAgent: def select_action(self, obs): action_probs, _ , _ = self.model(obs) return np.random.choice(len(action_probs), p=action_probs)
1
46cb1966e28d3bc0b37f77812a744d45
18fe38ff3e13d93105f1bf054d7922eb
Checks which insects are above their threshold
class Network(ABC): def update_states(self): to_fire = np.where(self.astates >= self.threshold) self.astates = np.zeros(self.N ** 2) self.fireworthy = np.tile(False, self.N ** 2) self.fireworthy[to_fire] = True
1
48974021bb697b8cf869dac9d1cc198a
dffbccba28ac78e29df05e4f6fe51c24
<p> Get the number of <code>{@link org.quartz.Job}</code> s that are stored in the <code>JobsStore</code>. </p>
int getTotalNumberOfStoredJobs();
1
479b92e8715d8652cfc7696611a03325
54d8cf80e441a5b383f3f163dbbde819
Funkcja do szyfrowania za pomocą Playfair Cipher
def e_playfair(plaintext, key): ciphertext = '' plaintextList = formatInput_playfair(plaintext).split(' ') row = len(key) column = len(key[0]) for element in plaintextList: (indexF_r, indexF_c) = get_index(element[0], key) (indexS_r, indexS_c) = get_index(element[1], key) if ...
1
da34a1cd032c179a9c976c67b95076b2
4e6526488e0ed2e83eb20db388465beb
Изменяем высоту объекта-контейнера, к которому применен данный класс исходя из количества кнопок-детей в нем
while self.object_buttons_box.count(): item = self.object_buttons_box.takeAt(0) item.widget().deleteLater() if 1 <= len(self.object_list) <= 4: number = len(self.object_list) else: number = 4 self.s_bar.setMaximum(len(self.object_list) - nu...
0
8d199cd2e7608b23f72a2e31947c270b
9f80cf2ab78e0315756dfc8e98f78bbc
Update the z-vector with the current readings.
void BNO055::update_grv() { i2c.get_seq(reg_grv_x_addr, 6); grv_x.update(); grv_y.update(); grv_z.update(); }
1
7337fd945852c8dbc5e4160536018f60
8ea022b8e547b4ffd8b0d86442299026
字符串单字用,号分隔组成新字符串
let list = str.split(","); str = ""; for (let i = 0; i < list.length; i++) { str += list[i]; } return str; }
0
9aad73fed9ae4157be3dc4ce4534929f
1ec4e98d36dd54656f4a1cda168d8389
导航栏待办事项更新
EDIT_TODO(state, data) { state.todoList = data; }
0
c72a80b7f4752067c89507e63e208856
219063d069da4bda8f1d899e080e9dba
判斷是否有設定科目
{ bool result = false; string sql = "select count(*) from Officedba.AccountSubjects where CompanyCD=@CompanyCD and SubjectsCD=@SubjectsCD"; SqlParameter[] parms = new SqlParameter[2]; parms[0] = SqlHelper.GetParameter("@CompanyCD", CompanyCD); parms[1] = Sql...
1
64601b24ef03b8d9ca6f849fd1524962
88885d0061a7b77fa74573f5cc9b3678
Получить название валюты по её числовому коду.
public class CurrCodeData public String getCurrencyDescription(String code) { for (int i = 0; i < currCodes.size(); i++) { if (currCodes.get(i).getLiteral().compareTo(code) == 0) { return currCodes.get(i).getDescription(); } } return "Нименование валюты дл...
0
cadea46ca816b4ec05cf8f39e873b9d7
fc53eebad56acf850ae03046f59e5d4c
Procédure pour déterminer le genre de la personne avec laquelle on veut échanger
n = int(str(secu)[0]) if n == 1: return("Homme") elif n == 2: return("Femme") else: return("Non défini")
1
e13e1be7738de806445ef574e4eb5777
66f04d5d0bb9d173d564499acada1e30
Mask off a portion of an IPv4 address
NIP::IPAddress NIP::IPAddress::from_mask(const NIP::IPAddress& mask) { IPAddress result; for(int i = 0;i < 4;++i) { result.bytes[i]=bytes[i] & mask.bytes[i]; } return result; }
1
4634b5637b126015660e6f824b09b9c5
427264e25d50f7ef0f704136034e6118
テーブルのレコード登録を行うテストケースです
{ $post = new Post(); $post->title = 'My Post'; $post->body = 'My Post Body'; $this->post('/posts', [ 'title' => $post->title, 'body' => $post->body ]); $this->assertDatabaseHas('posts', [ 'title' => $post->title, 'body'...
1
732ee00d26d0c6fe7d044d1a3fc99db2
3133a232f15b19b064ec7805a32c749c
关闭当前Tab,并跳转到某个页面
class PageFunction(BaseFunc): def close(self): self.wait_until_visible(self.workspace) self.find_element(self.close_tab).click() from object.page.base_page.main_page import MainPage return MainPage(self.driver)
1
6fc88d8a05ad513c6fc70f0ba52406ce
3d1a4332eddac3435aa6b98d74ea5424
Executa um comando no banco de dados e retorna um DataReader.
{ try { DebugProcedure(command); if (currentTransaction == null) return database.ExecuteReader(command); else return database.ExecuteReader(command, currentTransaction); } catc...
1
191c80a54545d4d6844df2c9358b5e5f
013570a6d794f5e6453c2abb3ec0db8a
@brief RAM controller write byte to specified address.
byte block[BLOCK_SIZE]; memset(block, value, BLOCK_SIZE); return write_mempak_address(controllerNumber, address, block); }
1
891af6897e580f37c1d3ea4a99994c62
cb176c93245ea5b983c3ce9c1bad8351
Length (distance) of edge
def edge_length(curve: np.ndarray): return np.linalg.norm(curve - np.roll(curve, 1, axis=0), axis=1)
1
b11401f8949675d42af8b67b4f22869c
3816c4c62d6be991387dc20ddca07ba9
Finishes the asynchronous execution of the PostAgentProfile operation.
namespace Amazon.Neptunedata public partial class AmazonNeptunedataClient : AmazonServiceClient, IAmazonNeptunedata public virtual ExecuteGremlinProfileQueryResponse EndExecuteGremlinProfileQuery(IAsyncResult asyncResult) { return EndInvoke<ExecuteGremlinProfileQueryResponse>(asyncResult); ...
0
1630671f378450b0e1fb96b315820bf5
abf559f5df357fa13d9933825e40829b
创建APP目录下的audio目录
String getAudioDir() ;
0
653d29281ca1dd9ca61f369861ef4b0f
9e1bb121cd4a5b05e5dc17daf3fbd8cf
Turns on/off surfaces so Luper will always know what ground is steep and what isn't relative to the direction of gravity.
export class WalkNavigation public set use_gravity(value: boolean) { PythonInterop.setBoolean(this.interop, `${this.accessor}.use_gravity`, value) }
1
5e975f573c095e97b47e90e6df9bf3fe
bdfddd3279ba967542a35baaea02cbbc
Report user
function Report(Users) print("USERNAME NEW POSTS REPLIES") for Username, User in pairs(Users) do print(string.format("%-15s %6d %6d", Username, User.NewPosts, User.Replies)) end end
1
2a8618cc659eb77111408921e2e22f8b
7b6c8cc5cb96429196f05f8401ff802f
绘制外部的弧线
public class XinYongView extends View private void drawOuterArc(Canvas canvas) { RectF rect = new RectF(-radius - arcSpace, -radius - arcSpace, radius + arcSpace,radius + arcSpace); outerPaint.setStrokeWidth(innerArcWidth); canvas.drawArc(rect, startAngle, sweepAngle, false, outerPaint); }
1
d46018c160a364d3c8f052f89bad69ad
87e87f5430d9ac5e251528faa25ee207
生成区县数据访问地址
def get_xiaoqu_district_url(): urls = get_urls_from_xpath(SH_XIAOQU_BASE_URL, XIAOQU_QU_XPATH) print(urls) return urls
1
7bdb50232165a01f212e6b7d4be0e5ba
f49e13dc221978a99c22e7e6f0cb50fa
A slot to set the state of the square. It gets *all* square updates, but filters out only those meant for it and passes it along to `set_state`.
if from_player is to_player: return Logger.log("{0} transfered from {1} to {2}".format( square_name, from_player.name, to_player.name)) square = self.state.board.get_square_by_name(square_name) square.owner = to_player to_player.state.properties.add(square...
0
77a5dd70006a68c5d0d46f53ac44ad22
352d8a652b0508e3e1d4ede712c57a8b
根据登录用户获取预算编码,预算股用户和业务股室用户. 供离退休人员工资列表使用 预算股用户登录,可以看到所有数据,业务股室用户登录,只能看到该归属股室是该业务股室的预算单位数据
{ string sql = string.Format(@"select distinct code=CostCenterID,name=CostCenterID from HQ_BID_CostCenterUser where UserCode='{0}'", userCode); return dal.SelectCommand(sql, null); }
0
c2392d2cf31749c602952ff4559e4b4d
5642e7303dfd552948d8d9a0445a3b4b
Get derived sum column indexes.
public final class AggregationDistinctQueryMetaData public Collection<Integer> getDerivedCountColumnIndexes() { Collection<Integer> result = new LinkedList<>(); for (AggregationDistinctColumnMetaData each : columnMetaDataList) { if (-1 != each.derivedCountIndex) { result.add(...
0
50d0dc33cae88966565ea6e3ce9317aa
8eef4555309d4cde5c3ddb8159b2dcb0
The unit to get the attention weight for a segment from hidden feature.
class Attention(nn.Module): def __init__(self, hidden_size): super().__init__() self.hidden_size = hidden_size self.attn = nn.Linear(self.hidden_size, self.hidden_size)
1
f50f7f319b15b14b37c85235d9ec38ed
a4896f9adedb93e6716fb7199ef55482
ImportSpecifier : ImportedBinding
const parent = node.parent; return ( ( parent.type === "ImportSpecifier" && parent.imported !== parent.local && parent.imported === node ) || ( parent.type === "ExportSpecifier" && parent.parent.source && parent.loc...
1
289106f34c91e06fdf570aa40f5f6e61
f48b936240883fa3e86da6eee864c566
Get the latest resolved date of the specified assessment
Date getResov_dt();
1
13a6a53940d21ddf51f42d0e0cb86876
e74f75fad14dee5044e74319c1c45b02
Get first day of a quarter.
class DateTimeCalculation public function firstDayOfQuarter() { $m = $this->firstMonthOfQuarter(); $str = $this->date->format("Y") . "-" . $m . "-01 00:00:00"; if ($this->returnImmutable) { $date = new \DateTimeImmutable($str); } else { $date = new \DateTime($str); } return $date; }
1
4791b77a30e3565d22451908011d23ec
c30dbfd880658a2975ad223dacb69702
Load the choice items lazily.
def lazyload(*keys): return strategies.EagerLazyOption(keys, lazy=True)
1
4f7979f6e5c8d89892766d91953eddbb
fc921f163e1e4a672c45decd347312ef
주어진 리모트 그룹의 유저상황을 브라우저에 알린다.
var web = starfish.web; var uid = data.split(IM_CONSTANT.hyphen)[0]; var state = data.split(IM_CONSTANT.hyphen)[1]; var containers = im_allByUid(uid); for (var i = 0; i < containers.length; i++) { var container = containers[i]; var buddy_user_state = web.className('buddy_user_state',...
1
58d83a9049708e040a2b45f391cb9335
d79d52d33815de5945e2892f1791ae64
Manage information flow from treeview to controls and vice-versa
void CDialogTextures::DoDataExchange(CDataExchange *pDX) { CDialog::DoDataExchange(pDX); DDX_Control(pDX, IDC_CHECK_HIDEROOT, m_chkHideRoot); DDX_Control(pDX, IDC_REFRESH, m_btnRefresh); DDX_Control(pDX, IDC_LOAD, m_btnLoad); DDX_Control(pDX, IDC_PREVIEW, m_wndPreview); DDX_Control(pDX, IDC_TREE_TEXTURES, m_treeT...
1
10e96b0e3e8a832c92f7aaede0845a22
a707f09e40b19da2b41e7d7a9ac1b9b8
Test para validar que se retornen los espacios disponibles filtrados por ubicación y los sitios que componen dicha ubicación
public class MapaDispersionAbiertaTest @Test public void testGet_Espacio() { testPut_Espacio(); for(int i=0; i<9; i++){ assertEquals( valores[i], mapa.get(i) ); } }
0
377148b2a0cb04696b62b039cc6d58c5
cc56e99d8fe6bed62d8d443f8ad27194
read in a new JMOL directory path through console input.
try: if os.path.isdir(selected_input_path.replace('"', "")): self.__input_dir = selected_input_path.replace('"', "") else: raise NotADirectoryError except NotADirectoryError: print('No valid directory selected.')
0
d36b7bff9c96909be15280153cc877e1
af1f99a8b579ba52d4a09c7918a437b5
非静默授权,第一次有弹框
@Controller @RequestMapping(value = "/wxBasic") public class WXBasicController extends CommonController @RequestMapping(value = "/authorize", method = RequestMethod.GET) public void authorize(@RequestParam String code, HttpServletRequest req, HttpServletResponse resp) { Status status = new Status(); try { ...
0
4a8e65cc557af0b74d8b8819de5e0ac3
29cc3fccf50ae34ec51c9fc3fb29bd99
将其它点云格式转成xyz格式
def create_xyzrgba(data): data = np.array(data, copy=False) if data.shape[-1] != 7: return ValueError("Each point should contain 3 values") rgba_dt = np.dtype(dict(names=['b','g','r','a'], formats=['u1','u1','u1','u1'], itemsize=4)) rgba_arr = np.empty(len(data), dtype=rgba_dt) rgba_arr['r']...
0
7175273093920aeea09a23ccccae528c
668190d40551468b571cb50ab1f72e15
create a new user based on the inputted id
username = get_db().execute( 'SELECT username FROM user WHERE id=?', (id,) ).fetchone() if username is None: abort(404, "User id {0} doesn't exist.".format(id)) response = requests.post(api_url + '/users', headers={'Content-Type': 'application/json'}, json={"...
1
266b5ab0eb11e0082efdcba0e8c63251
bfbefb368e51c2fb3d784de0c8751616
SSH to <host> with <host_user> and <host_password> then connect to "iscsitest1".
self._host = pyVim.vimhost.Host() self.failIf(self._host is None, "Connect and Login to hostd") self._hs = self._host.GetHostSystem() self.failIf(self._hs is None, "Retrieve HostSystem")
0
3534cfd65251e7c977f1ae409a46eea5
0f0b75de54e90bfe26a0d44f8dff3aed
Gets all umbraco folders.
public function getFolders();
1
27c8575f5611115041327d188939ed03
cba895c5f3d5f43a71eb8325f2bdb239
Test all types of ChemicalEnvironment objects with defined atoms and bonds Each will be tetrahedral carbons connected by ring single bonds
molecule = H2O.copy() molecule.set_cell([ [0.0, 0.0, 0.0], [0.0, 0.0, 0.0], [0.0, 0.0, 0.0] ]) nocell = default_desc.create(molecule) molecule.set_pbc(True) molecule.set_cell([ [20.0, 0.0, 0.0], [0.0, 30.0, 0.0],...
0
667bc6825babac9c596357737c392ae3
f0579374ad3fb823b8ba986299e9fe5f
批量格式化
batchFormat(data, filter, extend = []) { switch (Object.prototype.toString.call(data)) { case '[object Object]': for (const key in data) { data[key] = this[filter](data[key], ...extend) } return data case '[object Array]': return data.map(item => { re...
1
2042d825a43ae38c1c761e9aef4dd489
71fcefa57b4e4b6e4a6a54a61de6a73d
r"""Profile to use when a connection does not match any policy. Default setting is APPFW_BYPASS, which sends unmatched connections back to the NetScaler appliance without attempting to filter them further.<br/>Default value: APPFW_BYPASS<br/>Minimum length = 1.
try : return self._appfirewallvioldenyurlperprofile except Exception as e: raise e
0
20b8239f7a79c32d2a91662b782feb50
eee1c4956d1a3ab080ee820c7675da48
事件发生点在全局舞台坐标中的水平坐标。
public class ScreenScutcheonEvent extends com.earthview.world.core.Event public int getX() { int returnValue = getX_void(this.nativeObject.pointer); return returnValue; }
1
df12143c236915c229e56526776916d4
f1de2e77026bb6b66b241c4c686aff52
鱼快速离开页面的处理
function quickLeaveFish(fish: FishModel, reverse) { const { pos: start_pos, visible } = fish; if (!visible) { return fish.destroy(); } const { ClearFishTime, PoolWidth } = Config; const leave_fish_len = calcNormalLen('after', fish.type); const end_pos = { y: start_pos.y } as Point; l...
1
6ce9b2b4cbfee89fe010d5531bdb9d0a
7dacf43eeb64a02b3401b73873bda79a
формирует для записи sql на вставку или обновление в зависмости от наличие такой записи в таблице
class DbQuery extends \DB\DatabaseIO{ public function toQueryInsertUpdate(... $keyFields){ $r = $this->toQueryInsert(); $sql = $r[self::$_QRY_SQL]; $bind = $r[self::$_QRY_BIND]; $fld = ""; foreach ($this->sets as $k => $v){ if(empty($keyFields) || !in_array($k, $keyFi...
1
fcf65a4a8ffbe8e8ac7bbf56508c98f4
110ae8a3b1e73a15ebde91c69a99fd77
Test that returned sale packing list workflow
self.bom.bom_line_ids = [(5, 0, 0)] self.bom.bom_line_ids = [(0, 0, {'product_id': self.comp1.id, 'product_qty': 1})] resupply_sub_on_order_route = self.env['stock.location.route'].search([('name', '=', 'Resupply Subcontractor on Order')]) (self.comp1).write({'route_ids': [(4, resupply_s...
0
f052302f8cf8e02dbd5f74611718d068
67b4e6ad2757ae477a0b9324b4b8c34a
Determine whether arguments can be substracted without overflow
int ret=1; (y==INT_MIN)&&(ret=0); int s=x-y; int pos_over=x>0&&y<0&&sub<0; int neg_over=x<0&&y>0&&sub>0; ret=ret&&!(pos_over||neg_over); return ret; }
1
f2c827bd0aa6e4f44baa4a4c662b536f
ab3c6f69b51dfc8a6d93bdda228098a6
Checks whether a composed text in this text component
public class DataTextCheck extends JPanel implements DataComponent public boolean isFilled() { return true; }
0
d59777f603f5367c70ae3f0733c11d66
398dc978af8cca9ab86ce44c73832fc4
Test that API call not allowed when API call limit reached
response = requests.post(urljoin(service_url, api_path), json=None) assert response.status_code == 500 items = db.query(Item).all() assert len(items) == 0
0
674a25d2758cbb13185e6b70b1b3b213
7c6ec04f8ef4183dd2e3796e795f164d
Registers links.
class Core: def create_links(self, code1: str, code2: str) -> None: point1 = self.points[code1] point2 = self.points[code2] link1 = Link(source=point1, destination=point2) link2 = Link(source=point2, destination=point1) self.links.extend((link1, link2)) if code1[0] == "j"...
1
b4b2c590e567d97604a640663131b2fb
50d3b520a1993a337969744a6c4621ce
generate JSON of list of movies or tv shows
var result = [] if (obj.results.length == 0) { return result } else { obj.results.forEach((item, i ) => { if (i < 20) { var record = {} record["id"] = item.id if (entity == "movie") { ...
1
0ab81f82516c10dcea0dfe91236aab41
2cff50dd2bd8ffd990607c1e668c7178
储存函数,将二手房信息存入csv表
lastDayDate = self.get_last_day_date(city_name, district_name) chengjiaos = self.get_area_chengjiao_info(city_name, district_name,lastDayDate) if len(chengjiaos) > 0: csv_file = self.today_path + "/chengjiao_lastday.csv" if not os.path.exists(csv_file) or os.path.getsize(...
1
05c2064fad17a87994f0759fa64930c0
e916e78b7270c1956fd9c90ca81a99ca
setter for artillery availability
void Ship::setSafety(bool safety) { safe = safety; }
0
5fc1f521ca2567c02ac967bea5210da6
e0856e1e4a1cff7ce3946bdf85ac33b9
Puts $ around a string
class SortByPopularPosts public static function quote_str( $str ) { return sprintf( "'%s'", $str ); }
0
d86e2ca76281b61485886a26f28d78fa
06ae283e93ef46a77c6e219d6c67b9b2
Return model type for well known paths.
public function type(string $path): ?string;
1
a88a161a182f5931ea58ee034c391b4b
6769362eac65f21038a87a6ab834b6ae
Changes the state of the current order to the next possible value. From ordered to prepared and from prepared to delivered.
Objects.requireNonNull(orderPosition, "orderPosition"); long orderPositionId = orderPosition.getId(); OrderPositionEntity targetOrderPosition = getOrderPositionDao().findOne(orderPositionId); if (targetOrderPosition == null) { throw new ObjectNotFoundUserException(OrderPosition.class, orderPositio...
1
9cb8de0d1968da8ac85f1cb9171ed721
8a8c1b22c141d21f2bc76e209707f029
保存岗位机构关联信息 保存之前先删除原有
@Service @Transactional(readOnly=true) public class SysStaffService implements SysStaffApi{ @Transactional @Override public void saveStaffOrg(SysStaffOrg sysUserOrg) { sysUserOrgMapper.deleteStaffOrgByStaffId(sysUserOrg.getStaffId()); sysUserOrg.setId(RandomUtil.getUUID()); sysUserOrgMapper.insert(sysUserOrg)...
1
796460148a69e927a6000cd0f028f2e7
b767a8d37abd262347ad7027567e1750
Set the target project paths that this panel should use when generating assets. If not set, this panel will attempt to use reasonable defaults for the project.
if(pTemplatesRoot){ templatesRoot = pTemplatesRoot; } if(pControllersRoot){ controllersRoot = pControllersRoot; } if(pNlsRoot){ nlsRoot = pNlsRoot; } }
1
cb1ad219c5d588d7172f5435e8f7c8bf
13c1178e5028e6b925cecad248313af0
Returns the live data which monitors the secondary call details.
public class InCallViewModel extends AndroidViewModel implements InCallServiceImpl.ActiveCallListChangedCallback public LiveData<Integer> getPrimaryCallState() { return mCallStateLiveData; }
0
cbdab3b247f41039efc5e7373958707c
be16a3378777ddea25d6743212899e16
回答用のテキストボックスの入力値が変わった際の関数
class App extends Component handleChange(event) { this.setState({test_text: event.target.value}); }
1
546cda1463eaa7dc57b84e025e980edd
489100cc24d40ebb7713423d5da6b2f6
Returns the number of persons that arrived.
{ $query = "SELECT SUM(attending+children) as arrs " . "FROM people2 where arrival='$day'"; return RunMysqlQuery($db, $query); }
1
9ba3b137fe70f69cca21f79695722caa
95428437082777132a821fe9a872c995
Weighted version of the closeness centrality
closeness_centrality = {} for node in graph.Nodes(): n = node.GetId() sp = dijkstrasDistance(graph, nodesMap, n) totsp = sum(sp.values()) if totsp > 0.0 and graph.GetNodes() > 1: closeness_centrality[n] = (len(sp) - 1.0) / totsp if normalized: s = (len(sp)-1.0) / (graph.GetNodes() - 1) closeness...
0
6ae934b9153e67e19cd8d8a8ec3bd2a9
22ce07ef89427f5281e9864f536ec402
list of tuples (mode, proportion) reward will be a weighted sum of the mode rewards
class MRP(MP) : def __get_rewards_vec(self) : return np.array([self.transitions[k][1] for k in self.transitions.keys()])
0
45bc1dc9f2b767235a8286605a2c95df
16931cd104911da4b50eac4ac63280ab
判断candidate是否为合法的微信号码
area = {"11": "北京", "12": "天津", "13": "河北", "14": "山西", "15": "内蒙古", "21": "辽宁", "22": "吉林", "23": "黑龙江", "31": "上海", "32": "江苏", "33": "浙江", "34": "安徽", "35": "福建", "36": "江西", "37": "山东", "41": "河南", "42": "湖北", "43": "湖南", "44": "广东", "45": "广西", "46": "海南", "50": "重庆", "51": ...
0
6acb012edd7f438602a5c79efe914d6c
6617a3ce6a55eda0e2de29d9e691b3b8
获取文档的最后修改人信息
if ($fullpath == '') { return null; } else { Doo::loadClass('Enum'); $opt['where'] = 'documentid in (' . $fullpath . ') and status=' . Enum::getStatusType('Normal'); $opt['asArray'] = true; $opt['select'] = 'manageruserno'; $opt['de...
0
1c70c567f47b5fae56e72f5f8501d874
1447416e55b543f0e4916a8f22ef6cf0
fills the lens selection qcombobox with options.
counter = 0 for b in boardsNames: self.comboBox.addItem(_fromUtf8("")) self.comboBox.setItemText(counter, _translate("MainWindow", "%s" % (b), None)) counter += 1
1
c3946cbf7c9f08cbd348463a5a2941f1
2d47973caaedcea881b4411099470fd8
Create a theorem with the given list of hypotheses and proposition.
def print_theorem(*args): for name in args: print('%s: %s' % (name, get_theorem(name, svar=False)))
0
f51c7ab0542df2c770af73086ec77fd6
a121f62f2c45b7a061127fb7248d9abf
计算搜索到的有效用户数
class Anjie_users extends Model public function getCount($where='') { $where = ltrim($where, 'where '); if ($where !== '') { $where = ' and ' . $where; } $sql = "select count(1) as count from anjie_users where is_valid = 1" . $where; $rs = $this->_pdo->fetchOne($sql...
1
8030e87d883f33b5ab022bc5cf79df43
bb396885064f7e012432659370b8f57b
Se déclenche quand la bille entre dans le collider du GameObject sortie
public class Movement : MonoBehaviour private void OnTriggerEnter2D(Collider2D other) { }
1
9a909a9761b9e0e7a57768683c0322b3
1139d644690ae90e42f81069cfc12c24
Loads a config.json file and run a validation process. If the configurations seem valid, returns a list with Configuration objects. In the case of invalid config.json file, returns None.
configuration = command_util.load_json_file(file_path) if not validate_grim_configuration(configuration): config_log.error(f'Configuration file \'{file_path}\' is invalid') raise InvalidConfigurationError return configuration
0
d13dccd77a21237701165b0d1fcb91d3
39063719c47d5c4f46b536837e066fce
Gets query for [[Routes0]].
class Navigation extends \SimNavigation\Entity\Navigation implements \Doctrine\ORM\Proxy\Proxy public function getRoute() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getRoute', array()); return parent::getRoute(); }
0
19cc77d0c5e7e12eed6f1005c9a4074c
b7e97f78b2b6b3cb8c43a8833dd5cd2c
Load the Eventtype with the specified name from the database.
namespace UlterSystems.PortalLib.BusinessObjects public class UptimeEventType public static UptimeEventType GetEventType(int eventTypeID) { return m_EventTypes.ContainsKey(eventTypeID) ? m_EventTypes[eventTypeID] : null; }
0
e5f5f6c2e4c4e5bee8285cdd9400158b
844631267e7c57ab72c6c86ed0174ae0
Maps a function over the Err value of this instance, if present, asynchronously.
namespace FunctionalDotNet public static class AsyncResultMapErrorExtensions public static async Task<IResult<T1>> MapErrorAsync<T1>(this Task<IResult<T1>> source, Func<string, string> f) { var r = await source; return r.MapError(f); }
1
3280142a0f9b5dfdd1bbd0bfa0b34c87
ea1614b692a1b7f3de364e4f440bc494
Установка значения ячейки в зависимости от типа данных
{ try { if (prop.PropertyType.IsEnum) { var newEnumValue = Enum.Parse(prop.PropertyType, cellValue.ToString()); prop.SetValue(obj, newEnumValue); } else if (cellValue.ToString().Contai...
1
e6d14a66ecacde5f2f62dbdc2d735c6c
612dd9ea8ec7eb03e13702bd4f1b0b98
Set whether to update when trail emiiter are not visible.
public class CoordAxes extends TTrack public void setTrailVisible(boolean visible) { }
0
a3a2e3c790a9509e444e3114ff22250d
5f3b5b9a0abf7d31c97f8849f5ca3f5f
Se envía el resultado al cliente.
class Mailer public function respond($result) { header('Content-Type: application/json; charset=utf-8'); echo json_encode($result); }
1
7f626218fa52098d29366098cacaf352
28f3f11e7072f05ae0a14878a72a6a6a
! Generalize the WKB-geometry using the BBOX of the original geometry
class Geometry extends CApplicationComponent public static function Get_Buffered_BBox_ByWKT($centroid){ return array('xmin'=>$centroid->X-0.000001, 'ymin'=>$centroid->Y-0.000001, 'xmax'=>$centroid->X+0.000001, 'ymax'=>$centroid->Y+0.000001, ); }
0
0452ce93333ff3ec0ef5e66a60b7c820
535ef80bbaa34943e58c0ab4298c1737
按照渠道下载积分发放Excel
@Transactional(value = "readOnlyTransactionManager", propagation = Propagation.REQUIRED, readOnly = true) public HSSFWorkbook downLoadScoreGrantExcelByChannelType(ScoreGrantCountVo scoreGrantCountVo, UserDto userDto) { try { List<ScoreGrantCountVo> scoreGrantCountVoList = new ArrayList<Score...
1
7ef202b9e89adc9b874d147c5348877a
682beeb350a4aa3a3d584a7c81f6ee5c
Sets the memory cache size based on a percentage of the max available VM memory.
public class ImageLoaderConfig public static class Builder public Builder setMemCacheSizePercent(float percent) { this.memCacheSizePercent = percent; return this; }
1
414658f89c70338a381865af3449b5ca
ae6589ba9c8ad55b3634dea4be21f840
Выбор японского языка
class TitleLanguageRobot( private val composeContentTestRule: ComposeContentTestRule ) : DialogRobot(composeContentTestRule) fun chooseRomaji() { composeContentTestRule .onNodeWithText(TitleLanguage.Romaji.stringId.getResource()) .performClick() }
0
734193620f46a13a9cf2a61d43527a24
480b5a495ec1718948c823fbc1483c31
Initializes Doctrine. Called by getEntityManager.
{ $paths = array(DOCTRINE_ENTITIES_DIR); $isDevMode = false; if (ENV == 'dev') { $isDevMode = true; } $dbParams = array( 'driver' => DOCTRINE_DB_DRIVER, 'user' => DOCTRINE_DB_USER, 'password' => DOCTRINE_DB_PASSWORD, 'dbname' => DOCTRINE_DB_NAME, ); $config = Setup::createAnnotatio...
1
4ba7a740a6ea2757fd9e7a3051890d58
a7020e7dcf7efcc2f4fd0cacad53a3e3
Send a message, do not expect a response.
class ZmqSender(ZmqClient): def send(self, msg): response = self.request(msg) if response != b'ack': raise ValueError('ZmqSender did not receive ack on the other end', 'Was something wrong?')
0
7332a952a52d7789d481147ced7049a4
03d141374c1446aca695c330e9e00da6
前景、背景を合成したイメージを作成する
func convertDrawImage(srcImage image.Image, synthesis image.Image) image.Image { rect := srcImage.Bounds() width := rect.Size().X height := rect.Size().Y rgba := image.NewRGBA(rect) for x := 0; x < width; x++ { for y := 0; y < height; y++ { ...
1
825314a9bbc9ffd4b052630ce8727a63
8cc717e66f82fca29fdfb8dcd0d97329
空白スライドを追加し画像を挿入
function addImg(item) { slideShowArray.push(searchResultsArray[item]); item.clone().appendTo("#selectedList"); }
0
28c9f426a7b4388dadf580e3be924837
b928d395d0de8338592fc2ec1bac2da9
取消注册默认的流接口实现类
public class RxManager public void unRegister() { for (Map.Entry<Object, Flowable<?>> entry : mFlowables.entrySet()) { mRxBus.unRegister(entry.getKey(), entry.getValue()); } }
1
73684cb50e3319f08c084036f728b05b
4420f1c2a7ff607b1ede3f7ca1c1a8d4
返回时间的毫秒值
@Slf4j public class DateUtils extends PropertyEditorSupport public static long getMillis(Date date) { return date.getTime(); }
1
6e53de255b4660dce88301c334d33566
d19548ff5f734e7abe791e6ef6bc91a7
Sets the point values of all upgrades.
{ if (maxUpgrade.Checked) { nudUpgrade.Value = nudUpgrade.Maximum; nudQuantity.Value = nudQuantity.Maximum; } }
0
7689872ed8c686a6262860fe968752bd
4d62777e7bcb9a9f3c932ab2e88e4a51
Функция возвращает список актуальных цен
$prices = array(); CModule::IncludeModule("iblock"); $arSelect = Array("ID"); $arFilter = Array("IBLOCK_ID"=>2); $res = CIBlockElement::GetList(Array(), $arFilter, false, Array(), $arSelect); while($ob = $res->Fetch()){ $prices[$ob["ID"]] = self::price_by_id($ob["ID"]); } return $prices; }
1
14a993226c698137aba1fb00ce4e2ef7
a75dbde0e43f96c92a6a8f680ad844b8
Returns the number of rows in the *current page
class Pager implements \JsonSerializable public function getRowCount() { return $this->rowCount; }
1