query_id
string
corpus_id
string
query
string
code
string
label
int64
675140c7a9d4e0124a8c531bff1a2d54
78a54c92da676ae4d5fb8f2f68f952f4
draw text in a circle, and return a ui.image
static coord_t DrawRadioImg(const rect_st *rec, uint8_t state, color_t colRadioBack, color_t colLine, color_t colText) { coord_t x0, y0; color_t caa; const coord_t radius = 6; x0 = rec->x + radius + 2; y0 = rec->y + rec->h / 2; P2D_SetColor(colRadioBack); P2D_FillCircle(x0, y0, radius); P2D_SetColor(col...
0
2fcb041dc75fa54fc21889319fc0e95d
c69e3344fc4b67ac068a1347bdf40202
Read an EEGLAB digitization file.
def read_eeg(): pass
0
1b8e10585b789f54b8a7ba2ffaf7b578
2afc0e74c264eb0a3caceb4356868362
Полный метод для генерации "магического" кода подтверждения по мобильному телефону.
StringBuilder generater = new StringBuilder(); generater.append(randomAreaCode()); generater.append(randomBirthday()); generater.append(randomCode()); generater.append(calcTrailingNumber(generater.toString().toCharArray())); return generater.toString(); }
1
6af7d50dd64960b11f772218f61de7e3
759b6cfc222d3162b80d648cbe29ff04
改变类型限制配置
{ $this->config = array_replace($this->config, $config); $default_type = $this->getDefaultTypeConfig(); foreach ($config['types'] as $key => $value) { $this->config['types'][$key] = array_replace($default_type, $this->config['types'][$key]); } return $this; }
1
50c2b73e4149b9a2e178b57ae8d7a941
fcb4272ff1239a0bd6f8bbb020dfc9a5
Kilépést kezelő gomb függvénye
namespace Nyilvantarto public partial class FormAlap : Form private void btnBezar_Click(object sender, EventArgs e) { Close(); }
1
72c0320405778f501756b4df1f1a4386
82a017f1b177bd63d8fa1ddedc4bf900
判断一个Comment是否为IE的条件注释
{ var kind = node.Kind(); return kind == SyntaxKind.SingleLineCommentTrivia || kind == SyntaxKind.MultiLineCommentTrivia; }
0
64e2b8a20f41d1b0c906aae991a1354a
e197d569b520c644ebe49cf4c223f6cb
获取积分消费开关
class IntegralRedis extends Model public function isJidu(){ $jidu=Db::name('video_integral_jiduset')->field('is_open')->where('id=1')->find(); return $jidu; }
1
bf5aca5f4dadf58c171a3f77afe5e691
8ef60827dc12dd0fde597d9a289574c0
直接使程序崩溃 后续代码不执行
{ while (2>1) { printf("Hello, World!\n"); exit(-1); } printf("hhahahah \n"); }
1
5d994978ef55ed1196ce63a351580aaa
b56f4c3f1fad270251309fc68e53c159
页面广告 - 支付宝同步通知页面
class Payment::AlipayController def notify_page @host = request.remote_ip.to_s if @host.eql?("121.0.26.1") alipay_notify(params,@@partner,@@security_code,@@sign_type,@@_input_charset,@@transport) verify_result = true flash[:error]=return_verify() orderinfo = Order.find(:first, :condition...
1
97a9087354a670b0f1b6e990b604bbe0
ae155b0d4aa81a2a3f6cb64ecc959fcb
获取照射剂量5(Gy)
public class Fangliaoxinxi extends BaseEntity public String getZhaoshejiliang5() { return zhaoshejiliang5; }
1
5768a83ea56b0a7246180b2cd2cdf0cd
0c9e41ac42d97911ed82644bf64ceb63
完全背包,装满的排列数
class Solution: def backPackIV(self, nums, target): if not nums: return 0 n = len(nums) f = [[0] * (target + 1) for _ in range(n + 1)] f[0][0] = 1 for i in range(1, n + 1): for j in range(target + 1): f[i][j] += f[i - 1][j] ...
1
320de1801c5d9d60d3efcbf8d5c875fb
d3636dd4017fcebabc4956ba730719a1
Closes the value file corresponding to the given GPIO.
try: with open(GPIO_INTERRUPT_DEVICE_VALUE): return except IOError: with open(GPIO_EXPORT_FILE, 'w') as export_file: export_file.write(str(GPIO_INTERRUPT_PIN)) wait_until_file_exists(GPIO_INTERRUPT_DEVICE_VALUE)
0
2d3493165b149345b92bbff3bb225206
a542317a3157da9024a72406d3c66858
Returns value of 'slot' property
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "SlotValueType", propOrder = { "slot" }) public class SlotValueType extends ValueType public SlotType getSlot() { return slot; }
1
a1a2dec83ac0b83dba03cb9ad3f51171
9f77d4c36e148ec953b1c4b32ad017ad
设置toolBar的PaddingHeight
int version = getAndroidOSVersion(); Log.e("version", version + ""); if (version >= 19) { int statusHeight = -1; try { Class<?> clazz = Class.forName("com.android.internal.R$dimen"); Object object = clazz.newInstance(); int ...
1
692e38e4545446e0a3ab36361dea6799
41f22d0dab4e45c49a99af0b768cdb1a
Возвращает объект коткретного жанра.
class Category public function getGenre() { return $this->genre; }
0
c62b832d92f771b65ae996e103ffb1ce
952356ae8595cf198022b347d0b46903
Deleting model 'BannedIP'
class BoundPrimaryIP(BoundModelBase): def delete(self) -> bool: return self._client.delete(self)
0
59f3c63539d7741df108e6d4c1175b6e
297941cd48870dd417d2bf4b1a616deb
Setup all compiler/linker flags with are shared over all targets using the clang compiler for the "debug" configuration
def cgt_flags(conf): env = conf.env env.DEST_BIN_FMT = "elf" env.AR_TGT_F = ["rq"] env.CC_COMPILE_ONLY = ["--compile_only"] env.CC_TGT_F = ["--output_file="] env.CCLINK_TGT_F = ["--output_file="] env.RUN_LINKER = ["-qq", "--run_linker"] env.DEFINES_ST = "-D%s" env.CMD_FILES_ST = "-...
0
31d959e3895f2de8d5cc5f405844210d
cd1e8a9aa6c0823b30679505e34610ba
Getter for <code>WETRN.V_OFFR_ALL_WITH_BEST_COST.OPSCP_SKU_OFFR_STRGTH_PCT</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class OffrPrflSlsClsPlcmtRecord extends UpdatableRecordImpl<OffrPrflSlsClsPlcmtRecord> implements Record20<BigDecimal, String, Integer, ...
0
653dbdc1f457a8b1bcaf02f575ef8202
b6e6cbf37770f544aa84d3dd38f15d10
Get the list of application agents that must be loaded into the login scenario's combo.
def get_agent_list results = Authority::Agent.get_typeahead_objs agents = results.nil? ? [] : results.collect{|result| [result['display_value_ssm'].first,result['id']]} agents.sort {|a,b| a.first.downcase <=> b.first.downcase } end
1
c80d55f3f86a2d065a58b248577b8bc1
2ca7df131235b646f297a18e20d49cd8
byte数据转换为开关状态
{ int btn_id = 0; unsigned char *byte = data; unsigned char check = 0x01; for( int i = 0; i < datalen; ++i ) { for ( int j = 0; j < 8; ++j ) { btn_id++; if ( ((*byte) & (check << j)) > 0) { LogDebug("开关量:%d (开)\n", btn_id); ...
1
927aa0234f326e175e9ad347bd8c85b1
0f4ce513c67c1e01d165abd9726af314
取染色体长度
public class chromo public int getLength() {return chromoLength;}
1
5bd21bb2fbc054cb7ec17db115f26ece
8c6d7fe2347e1f47d0ecf04655745ef3
Close the slot
if self.inventoryslot: self.inventoryslot = None self.update_graphics() return True else: return False
1
21b673ba5f7b663d32c3568a86748d33
b34b4da515d6d99bd6f390084e5a4365
字符串转日期(只有小时和分钟)
const d = new Date(parseInt(str.substring(6, str.length - 2))); return d.toLocaleDateString("chinese", { hour12: false }); }
0
6dadf961920297228fc6496f80166190
d4d8bfa7f500d0656dea122053d85f77
if the property exists but is commented, uncomment it so it can be found
class LiftoverController def find_liftover_comments(fullpath) liftover_comment = /^\s*#liftover:/ lifted = File.open(fullpath) found_comment = false while line = lifted.gets if line =~ liftover_comment then found_comment = true command_object.stderr += ">> #{line.sub("#liftover: "...
0
d8fd0ba6d06b73a90e51c98a1e185a6e
9e5360b4ba195576ccc83dad7a85cb19
! \brief MeasurementData::saveSelection saves current selection in \a filename.
void MainWindow::saveS(){ }
0
1f48dc081c59ee4793b43ba21757b9d4
89be47ca223a8804d949725682e262e3
Display a listing of the files customers.
class FilesCustomersController extends Controller public function index(Request $request) { $input=$request->all(); $r=FilesCustomer::where('id', '<>', '0'); if(isset($input['id']) and $input['id']<>0){ $r->where('id', '=', $input['id']); } $filesCustomers = $r->with('oportunity','user')->paginate(25);...
1
0b98be84200255e8aff7e54aa53fe39e
5e30c12240eaa3023e3de3e4449f95f3
初始化容器,包括签字面板的高宽,以及添加签字面板的事件监听
this.mWidth = width; this.mHeight = height; mBitmap = Bitmap.createBitmap(mWidth, mHeight, Bitmap.Config.ARGB_4444); mStokeBrushPen = new SteelPen(); initPaint(); initCanvas(); mStepOperation = new StepOperator(); if (!TextUtils.isEmpty(path)) { ...
0
46290ab0a0700b1bcbd2f6f045b392ad
408da12554a11be7f373a03ffeefc3bc
Batch version of "destroy" method
class MultiSchemaStorageManagerDB(db.StorageManagerDB): def destroy(self, unit): if self.logflags & logflags.DESTROY: self.log(logflags.DESTROY.message(unit)) self._table_map[unit.__class__].delete(**unit._properties)
0
9d25b714eda8c65b35335e26cee59262
9d1d59960b693c2e00f8925e48b93841
Get a list of tags with the number of related posts.
class TagManager(models.Manager): def get_tag_list(self): tags = Tag.objects.all() taglist = [] for i in range(len(tags)): taglist.append([]) for i in range(len(tags)): temp = Tag.objects.get(tagname=tags[i]) posts = temp.article_set.all() ...
1
94a538b261de9d3b2edf47853933ca05
4caa8d8039f0458691f09ac4c3bbf9be
Moves the projectiles shot by the player.
int x = proj.getTarget().getX() + (proj.getTarget().getWidth()/2); int y = proj.getTarget().getY() + (proj.getTarget().getHeight()/2); int dx = x - proj.getX(); int dy = y - proj.getY(); float direction = (float)Math.atan2(dy, dx); proj.setX((int)(proj.getX() + (proj.getS...
1
7066880b8159023817a622e7531e321e
30b5b6471868441c2db72e51a92d28a3
Specifies for what entities the operation should be carried out. <p> Specifying several be equivalent to performing a logical AND on the provided filters.
public class GetEntitiesInfoRequest extends BaseObject public void setRestriction(Restriction value) { this.restriction = value; }
1
a6100172ac41bc45b87fbbb30f5dd1c7
c250666b2ba1887eeb24e093f5e90866
Cmova
void Cowboy::mover() { if (sf::Keyboard::isKeyPressed(sf::Keyboard::A)) this->compMov.acelerarX(-0.2f); if (sf::Keyboard::isKeyPressed(sf::Keyboard::D)) this->compMov.acelerarX(0.2f); if (sf::Keyboard::isKeyPressed(sf::Keyboard::W) && this->compMov.getCaindo() == false) this->compMov.setVelY(-13.f); if (sf::K...
1
d9a3bb8430bd5e7787fce99ffe237e5a
5116f49a060804fa846f0e37c472c4c8
Is any component negative?
for val in arr: if val < 0: return True return False
1
2c76b7ad24976828cf93415c5f714d0e
7ff9d0ccf4745cbf48b089ee06c6080b
! @brief Reads all standard error.
int Process::getStdErr() const { return fdErr; }
0
3bcace1c35164f1112a84975ddbe5b2f
20c6492ee850a49a6b15e83fdc3eb511
初始化一个链式队列
QNode * initQueue(){ QNode * queue=(QNode*)malloc(sizeof(QNode)); queue->next=NULL; return queue; }
1
e845531c09b6a9c6cd4c40a3094ebd6f
841c1748c127b6bbf8fb6dfaf77e77a2
make an AJAX call to server to get calculations via GET
var req = new XMLHttpRequest(); if(!req){ throw 'Unable to create HttpRequest.'; } var url = 'testCenter.php'; var params = { getTeacherTestScores: 'all' }; url += '?' + urlStringify(params); req.onreadystatechange = function(){ if(this.readyState === 4){ ajaxTestList = JSON.parse(this...
0
da60aef2897e47420559eaa978b4860c
fa82d5bb11a6840356d93439a4a181f9
触发未选中事件
public abstract class BaseSelectAdapter2<T, B extends BaseSelectAdapter2.SelecteViewHolder> extends BaseQuickAdapter<T, B> public void unSelected(B helper, int position, View view) { Log.d("thf", "unSelected " + position); }
1
5096c914b2db6713394447c30d8687fa
55f2444b9c4f998fedaf7792e983e79e
Funkcja dodająca zaimportowane zestawy do bazy, dodaje tylko nieistniejace
class ManufacturerController extends AdminDefaultController public function actionImport() { $images = []; $rows = Yii::$app->db->createCommand('SELECT * FROM `mans` WHERE manufacturer_id NOT IN ( SELECT old_id FROM man_assoc )')->queryAll(); foreach ($rows as $row) { $model = new M...
1
09dac2f68b8d97efa840aec6e4a983c8
0d6806e8350075cebb1a3f551e7a6d2b
@brief indicate whether rule has SAMEMASK flag or not
{ return (flags & static_cast< uint32_t >(vsdk::VSDK_TEMP_UMAT)) != 0U; }
0
4b2c4ce3b4fb47a3756cf40b072787c9
8e6736a70ce8b7f55a734af7f51bb0d2
用点乘计算两角度间的夹角
public class MathsUtil public static int twoPointAngle(int x1, int y1, int x2, int y2) { WrapVector vector = new WrapVector(x2 - x1, y2 - y1); return (int) vectorTransAngle(vector); }
0
46cb1966e28d3bc0b37f77812a744d45
0f112f265be2f3de3c660aa9bb749d25
Checks which insects are above their threshold
overThresholdList = [] for li in result: if "score" in li: if float(li["score"]) >= int(Parent.paramDict["threshold"]): overThresholdList.append(li) return overThresholdList
1
48974021bb697b8cf869dac9d1cc198a
f425c9a34be315863890ef2d4b1e1bee
<p> Get the number of <code>{@link org.quartz.Job}</code> s that are stored in the <code>JobsStore</code>. </p>
int queryJobsCount();
1
479b92e8715d8652cfc7696611a03325
b2467b735be7d68638fb45b5a7590bc2
Funkcja do szyfrowania za pomocą Playfair Cipher
void encryptByPlayfairCipher(char str[], char key[]) { char ps, ks, keyT[5][5]; ks = strlen(key); ks = removeSpaces(key, ks); toLowerCase(key, ks); ps = strlen(str); toLowerCase(str, ps); ps = removeSpaces(str, ps); ps = prepare(str, ps); generateKeyTable(key, ks, keyT); ...
1
da34a1cd032c179a9c976c67b95076b2
b485daf17a3b16533a91ed9f6e8e335f
Изменяем высоту объекта-контейнера, к которому применен данный класс исходя из количества кнопок-детей в нем
while self.object_buttons_box.count(): item = self.object_buttons_box.takeAt(0) item.widget().deleteLater() s_bar_pos = self.s_bar.value() if 1 < len(self.object_list) < 4: number = len(self.object_list) else: number = 4 self.s_bar....
0
8d199cd2e7608b23f72a2e31947c270b
2976746d42e285ab1171268829e58384
Update the z-vector with the current readings.
class Axis(): def update(self,x,y,z): (cx, cy) = self.center self.oldvalue = self.value self.value = ( (x*(cx)/2048), (y*(cx)/2048), (z*(cx)/2048) )
1
7337fd945852c8dbc5e4160536018f60
1f1999f3ffbce7f9a5e38b65b21896f7
字符串单字用,号分隔组成新字符串
public class Page private String getWordStr(List<String> words){ StringBuilder stringBuilder = new StringBuilder(); boolean isFirst = true; for (String word : words){ if(isFirst){ stringBuilder.append(word); isFirst = false; } else { ...
0
9aad73fed9ae4157be3dc4ce4534929f
df79b70ab872712f54249f3105cd026d
导航栏待办事项更新
var jq = top.jQuery; if (jq(mainTabs)) { var tabdb = jq(mainTabs).tabs('getTab', "待办事项一览"); if (tabdb) { var dbtitle = tabdb.panel('options').title; if (jq(mainTabs).tabs('exists', dbtitle)) { jq(mainTabs).tabs('refresh', dbtitle); } } var tabzc = jq(mainTabs).tabs('getTab', "暂存流程一览"); if (tabz...
1
c72a80b7f4752067c89507e63e208856
bf48800148bfcf1290bd27fe62a13eea
判斷是否有設定科目
$.ajax({ url : rootPath + "/branchSchool/couseSetting", data:{"companyId":$("#companyId").val()}, type : "post", success : function(result){ if(result==""||result.status==0){ $(".setting").addClass("none"); }else{ $(".setting").removeClass("none"); } } }); }
1
64601b24ef03b8d9ca6f849fd1524962
9327cc02778c862f33c7c7f7ce8489d3
Получить название валюты по её числовому коду.
def get_currency_name(currency_code): c = CurrencyCodes() currency_name = c.get_currency_name(currency_code) return currency_name
1
cadea46ca816b4ec05cf8f39e873b9d7
3d69267121277ea2d95d1c45e51db8d9
Procédure pour déterminer le genre de la personne avec laquelle on veut échanger
{ if ($_COOKIE['CKugender'] == 'female') { print('une femme'); } else { print('un homme'); } }
1
e13e1be7738de806445ef574e4eb5777
d79f8e97bd9f12bcbc799380faffa142
Mask off a portion of an IPv4 address
uint32_t NetAddr(int len, int address){ return Mask(len) & address; }
1
4634b5637b126015660e6f824b09b9c5
4e44b24499329a4478c5d5f6d924d2c2
テーブルのレコード登録を行うテストケースです
Properties props = new Properties(TEST_PROPERTIES); Connection conn = DriverManager.getConnection(getUrl(), props); try { String upsert = "UPSERT INTO " + DATA_TABLE_FULL_NAME + " VALUES(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)"; PreparedStateme...
1
7984bddf57ebe8d85aabfd684f428f83
45ab9882adc51261178df2c8d46146f2
Get elements in range from {@code start} to {@code end} where score is between {@code min} and {@code max} from sorted set.
Set<Tuple> sortSetRangeByScoreWithScores(String key, String minScore, String maxScore, boolean reversed);
0
6fc88d8a05ad513c6fc70f0ba52406ce
99ecc3796e7b4b547fe75016467167c6
Executa um comando no banco de dados e retorna um DataReader.
namespace WS.Data Task<DbDataReader> ExecuteReader(CommandType commandType, string commandText, params DbParameter[] parameters);
1
191c80a54545d4d6844df2c9358b5e5f
0bd217b9ce2af0c0b1d86a8c56b29a41
@brief RAM controller write byte to specified address.
{ ctrl_WriteRAM_fptr WriteRAM = cptr->deviceId->ctrlInterface->WriteRAM_fptr; void* pProHW = cptr->deviceId->ctrlInterface->hCtrl; return WriteRAM(pProHW, cptr->channel, addr, val); }
1
891af6897e580f37c1d3ea4a99994c62
9267b947a3bab11c40edebbb3799f079
Length (distance) of edge
function lengthOfEdge(edge) { return Math.sqrt(Math.pow((edge.from.x - edge.to.x), 2) + Math.pow((edge.from.y - edge.to.y), 2)); }
1
b11401f8949675d42af8b67b4f22869c
4774abc7888032d2d08e1b36ef1110bd
Finishes the asynchronous execution of the PostAgentProfile operation.
namespace Amazon.AlexaForBusiness public partial class AmazonAlexaForBusinessClient : AmazonServiceClient, IAmazonAlexaForBusiness [Obsolete("Alexa For Business is no longer supported")] public virtual DeleteProfileResponse EndDeleteProfile(IAsyncResult asyncResult) { return EndInvoke<De...
0
1630671f378450b0e1fb96b315820bf5
58da437605db763ca0e5e1fa42132f87
创建APP目录下的audio目录
public class AudioActivity extends Activity public void createAudioFile(){ if(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){ String rootPath = Environment.getExternalStorageDirectory().getAbsolutePath(); Log.i(TAG,"rootPath = "+rootPath); File dir =...
1
653d29281ca1dd9ca61f369861ef4b0f
5742f1fd8678896eacebc692568ce03d
Turns on/off surfaces so Luper will always know what ground is steep and what isn't relative to the direction of gravity.
public class RendererConfiguration extends FundamentalEntity /*implements Comparable <RendererConfiguration>*/ public void setSurfaces(boolean b) { this.surfaces = b; }
1
5e975f573c095e97b47e90e6df9bf3fe
ac11f30e91cee9aaded0913aca14401e
Report user
namespace PhotoHub.BLL.Services public class UsersService : IUsersService public void Report(string userName, string text) { var currentUser = _currentUserService.CurrentUser; var reportedUser = _unitOfWork.Users.Find(u => u.UserName == userName).FirstOrDefault(); if (cur...
1
e003976fd358140c21fd98448700854c
6a2ee94845ebe57961db14b5d5cdef5f
Keeps fading the LED of the center button in and out.
{ static uint8_t i = 0; fadeToBlackBy(_ledsOfRing, NUM_LEDS_RING, 85); _ledsOfRing[i++] = CHSV(hue, 255, 255); i %= NUM_LEDS_RING; }
0
d46018c160a364d3c8f052f89bad69ad
86ae1e762d59a47962dd021f845d5876
生成区县数据访问地址
public class HttpUtilsx public static String url_huoqushengshiqu() { String url = null; url = BASE_URL+"api/area/getAreas"; return url; }
1
7bdb50232165a01f212e6b7d4be0e5ba
3072dca0170e9e6e93afd4489ebb560e
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`.
set state(value){}
0
77a5dd70006a68c5d0d46f53ac44ad22
5ff9e079f309f88ecbd39036c29efbf6
根据登录用户获取预算编码,预算股用户和业务股室用户. 供离退休人员工资列表使用 预算股用户登录,可以看到所有数据,业务股室用户登录,只能看到该归属股室是该业务股室的预算单位数据
String req=""; String rep=""; SysYh user=AppUtil.getCurrentUser(); if(("".equals(user.getJbm1())||user.getJbm1()==null)&&("".equals(user.getJbm2())||user.getJbm2()==null) &&("".equals(user.getJbm3())||user.getJbm3()==null)&&("".equals(user.getJbm4())||user.getJbm4()==null)){ List<Map<String,Object>> jybm...
1
c2392d2cf31749c602952ff4559e4b4d
97c13d56a4ef04f3f54fb2045feb45e4
Get derived sum column indexes.
class OpenXUserAggregation extends AbstractAggregation public function getIndexes() { return [ ['keys' => ['start' => 1, 'action' => 1, 'adId' => 1, 'userId' => 1], 'options' => ['unique' => true]], ['keys' => ['lastInsert' => -1], 'options' => []], ]; }
0
50d0dc33cae88966565ea6e3ce9317aa
5c5bb0ffc2f1e92bf345282084f2e964
The unit to get the attention weight for a segment from hidden feature.
super(Attention, self).__init__() self.seq_len = seq_len self.hidden_emb = hidden_emb self.mlp1_units = 3072 self.mlp2_units = 1024 self.fc = nn.Sequential( nn.Linear(self.seq_len*self.hidden_emb, self.mlp1_units), nn.ReLU(inplace=True), nn.Dropout(p=0.5), nn....
1
cc1dc14c8300ff10de6cacfb867ac8a5
04c91886c1c0fafb06f57bd5e0d0fa39
Declares a heuristic for selecting properties for injection.
{ Ensure.ArgumentNotNull(type, "type"); return type.GetMethods(Flags).Where(m => InjectionHeuristics.Any(h => h.ShouldInject(m))); }
0
289106f34c91e06fdf570aa40f5f6e61
a1be488a0b19b63eeca6784e874e2bce
Get the latest resolved date of the specified assessment
@JsonIdentityInfo(generator = ObjectIdGenerators.PropertyGenerator.class, property = "id", scope = AssessmentView.class , resolver = ObjectResolver.class) public class AssessmentView @JsonProperty("lastUpdated") public String getLastUpdated() { return lastUpdated; }
1
13a6a53940d21ddf51f42d0e0cb86876
732f18a6735b2c1e3421e52fdf1881b0
Get first day of a quarter.
{ int month = 0; if (quarter > 4) { return null; } else { month = (quarter - 1) * 3 + 1; } return getFirstDayOfMonth(year, month); }
1
4791b77a30e3565d22451908011d23ec
59fa1e9a1c49bcfb17c6489f06a0c521
Load the choice items lazily.
class LegacyChoiceListAdapter implements ChoiceListInterface public function getChoices() { if (!$this->choices) { $this->initialize(); } return $this->choices; }
1
4f7979f6e5c8d89892766d91953eddbb
27c562fa725eb912df59e34e196a9394
주어진 리모트 그룹의 유저상황을 브라우저에 알린다.
function notify_user_update(room_id) { var room = g_rooms[room_id]; var user_states = []; var sem = (room.game != null) ? room.game.semaphore : null; console.log('notify_user_update', g_users); console.log('notify_user_update_2', room.user_ids); for (var i in room.user_ids) { var u = g_users[room.user_i...
1
58d83a9049708e040a2b45f391cb9335
ed374544ef8f09bf85ca01284e0fc464
Manage information flow from treeview to controls and vice-versa
{ BackPB.Enabled = (currentHistoryIndex > 0); ForwardPB.Enabled = (lastHistoryIndex > currentHistoryIndex); NextPB.Enabled = (getNextChartNode(treeView.SelectedNode) != null); PreviousPB.Enabled = (getPrevChartNode(treeView.SelectedNode) != null); if ((null != treeView.SelectedNode) && (null != treeVie...
1
10e96b0e3e8a832c92f7aaede0845a22
09212aa1e728657e7d4b6e8a7e09a330
Test para validar que se retornen los espacios disponibles filtrados por ubicación y los sitios que componen dicha ubicación
class TrainingSpaceListAPIViewTests(APITestCase): def test_returns_physical_spaces_filtered_by_location(self): view_url = reverse('api:physical-spaces') query_string = urlencode({'location': [self.la_ceiba.id]}, doseq=True) response = self.client.get(f'{view_url}?{query_string}') expecte...
1
377148b2a0cb04696b62b039cc6d58c5
19d5a39eb72ef6de35c2659a00c99d6e
read in a new JMOL directory path through console input.
DirectoryChooser openDirectoryChooser = new DirectoryChooser(); File selectedDirectory = openDirectoryChooser.showDialog(null); lbDirectory.setText(selectedDirectory.getAbsolutePath()); MS_Manager.dataLocation = selectedDirectory.getAbsolutePath().toString(); }
0
d36b7bff9c96909be15280153cc877e1
e8b4993d989b3d8c7bfb8636e0f7122f
非静默授权,第一次有弹框
Thread.sleep(3000); comfun.ClickElem("ID", "com.taobao.taobao:id/provision_positive_button"); Thread.sleep(3000); comfun.ClickElem("ID", "com.taobao.taobao:id/txtConfirm"); Thread.sleep(3000); comfun.ClickElem("ID", "com.android.packageinstaller:id/permission_allow_button...
1
4a8e65cc557af0b74d8b8819de5e0ac3
37141382b120eec6349fe958a4e0413c
将其它点云格式转成xyz格式
temp = []; for(i=0;i<vertices.length;i++){ x1 = vertices[i].x; y1 = vertices[i].y; z1 = vertices[i].z; if(xyz == 'x' || xyz == '-x'){ z1 = -z1; }else if(xyz == 'z' || xyz == '-z'){ x1 = - x1; } temp.push(new THREE.Vector3(x1,y1,z1))...
0
7175273093920aeea09a23ccccae528c
7060c9d789c6eae56405b91f47ad9247
create a new user based on the inputted id
string create(const string& id, const string& username, const string& password, const char tweetFile [], const char userFile [], const char friendFile []){ string line, token; fstream idfile(userFile); if(!idfile.is_open()){cerr<< "Users.txt file did not open, create failed \n";} bool idexists = 0; ...
1
266b5ab0eb11e0082efdcba0e8c63251
e222261b52f93aa12df587527839c895
SSH to <host> with <host_user> and <host_password> then connect to "iscsitest1".
si = provider.service_instance assert si is not None wrapanapi.virtualcenter.SmartConnect.assert_called_with(host='vhost', user='vuser', pwd='vpass')
0
5dc0ac2e6c24a520d988deeedf260ff2
790feb3b8025550ac5a6024a266d6db8
Returns the reference to the Network service for this cloud provider. Calls to the same method on the same context return the same Network service implementation.
Set<ServiceNetwork> getServiceNetworks();
0
27c8575f5611115041327d188939ed03
f723da701f0549e3918373811ed41d8a
Test all types of ChemicalEnvironment objects with defined atoms and bonds Each will be tetrahedral carbons connected by ring single bonds
class TestTopoFromGeom(absltest.TestCase): def test_multi_topology_detection(self): single = dataset_pb2.BondTopology.BondType.BOND_SINGLE double = dataset_pb2.BondTopology.BondType.BOND_DOUBLE all_dist = bond_length_distribution.AllAtomPairLengthDistributions() all_dist.add(dataset_pb2.BondTopology.ATO...
0
e1b258097cfd9c56b6330bf44f0297e5
96636b27f85a982bd21f7fba2b5dd9dd
The method will create a delay so that the pickup service will picked the order within a random delay of 2 to 6 sec.
try { Thread.sleep(10000 + (randomNumber() * 100)); } catch (InterruptedException e) { } }
0
2042d825a43ae38c1c761e9aef4dd489
9d280cc2620af7bf938abfb9361bddbc
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._appfirewallrequestsperprofilerate except Exception as e: raise e
0
20b8239f7a79c32d2a91662b782feb50
96033a12bb9b3c80bab0f76cc3ac30a6
事件发生点在全局舞台坐标中的水平坐标。
public class InteractionEvent extends ClientEvent public int getX() { return x; }
1
927c244697d0cb169f0d08afcbdbfd5b
c147c94b38b703dbab54d3f8703e7ffb
Method to select question1 from Dropdown
{ try { GenericHelper.WaitUntilElement(By.Id("rdoAssessment")); WebDriver.FindElement(By.Id("rdoAssessment")).Click(); } catch (Exception e) { GenericHelper.Logs(e.ToString(), "FAILED"); throw ne...
0
6ce9b2b4cbfee89fe010d5531bdb9d0a
b324ae526e1503a3b7b9d8bf20ddcd65
формирует для записи sql на вставку или обновление в зависмости от наличие такой записи в таблице
{ DataBaseTypeData.Reset().Model = model; Sql.AddText(string.Format("IF(EXISTS(")); Sql.AddText("SELECT 0 FROM"); Sql.AddText(TableName); Sql.AddText("WHERE"); Sql.AddText(string.Join(" AND ", IdSqlParameters.Select(item => ...
1
fcf65a4a8ffbe8e8ac7bbf56508c98f4
6a396f2a20decf7bdc86ed5575c65512
Test that returned sale packing list workflow
so_vals = { 'partner_id': self.partner.id, 'partner_invoice_id': self.partner.id, 'partner_shipping_id': self.partner.id, 'order_line': [(0, 0, {'name': self.product_bom.name, 'product_id': self.product_bom.id, 'product_uom_qty': 1, 'product_uom': self.product_bom...
0
f052302f8cf8e02dbd5f74611718d068
a11bd2157e4f88b3266e18c11d94b55a
Determine whether arguments can be substracted without overflow
static Boolean is_applicable_sub(int arg1, int arg2) { if (arg1 == 0 || arg2 == 0) { return TRUE; } if (arg2 < 0) { if ((int)(INT_MAX + arg2) >= arg1) { return TRUE; } } else { if ((int)(INT_MIN + arg2) <= arg1) { return TRUE; } } r...
1
f2c827bd0aa6e4f44baa4a4c662b536f
c7ad39383d04b40adc887e6bff809112
Checks whether a composed text in this text component
namespace MS.Internal internal static class Helper internal static bool IsComposing(DependencyObject d, DependencyProperty dp) { if (dp != TextBox.TextProperty) return false; return IsComposing(d as TextBoxBase); }
1
d59777f603f5367c70ae3f0733c11d66
e526c93956782d89f7a49f664f6b23aa
Test that API call not allowed when API call limit reached
async def test_rate_limit(hass: HomeAssistant, mock_get_regions: AsyncMock) -> None: mock_get_regions.side_effect = ClientResponseError(None, None, status=429) result = await hass.config_entries.flow.async_init( DOMAIN, context={"source": config_entries.SOURCE_USER} ) assert result["type"] == Fl...
1
0c4a13013d00a4f9078579c8e7232a54
84fe43a0729a55bcee6724357119d474
Метод определяет идентификатор сообщения.
public class Message @Override public int hashCode() { return Objects.hash(id); }
0
dc9f6d9be2190b99dd89bb3f00730868
364718711b06a0aabaa1b43a6e7f5ce6
Allow some task to go back to the end of the queue, returning the processor to dispatcher
var length = taskQueueLength - nextIndexToProcess nextIndexToProcess = taskQueueLength = taskQueue.length = 0 return length }
0
0ab81f82516c10dcea0dfe91236aab41
68594ff1ad8dd09cc7adc12dc7a5691c
储存函数,将二手房信息存入csv表
time.sleep(2) with open('链家二手房价格信息表.csv', 'a', newline='', encoding='gb18030') as f: writer = csv.writer(f) while True: if not self.msgQueue.empty(): try: getmsg = self.msgQueue.get(timeout=2) wri...
1
05c2064fad17a87994f0759fa64930c0
219d67fdc1e4a7b1bd68b1c5846d1123
setter for artillery availability
class Sniper setactive( status ) { typeof status == 'boolean' ? ( this.active = status ) : ( this.active = false ) }
0
5fc1f521ca2567c02ac967bea5210da6
ca793c9e981d71e4d711ceed079a0133
Puts $ around a string
def init(strin): strin = strin + '$' return strin
0
d86e2ca76281b61485886a26f28d78fa
af1e3348f6d5d80c6b4ea45436fec5d3
Return model type for well known paths.
public function getType($path);
1
a88a161a182f5931ea58ee034c391b4b
805e6c92e1532f58974f5f4a66e3f753
Changes the state of the current order to the next possible value. From ordered to prepared and from prepared to delivered.
class OrderCrudController extends AbstractCrudController public function updatePreparation(): \Symfony\Component\HttpFoundation\RedirectResponse { return $this->updateState(2); }
1
9cb8de0d1968da8ac85f1cb9171ed721
9a3406f12698fb58dc0b5f8354dbbbd2
保存岗位机构关联信息 保存之前先删除原有
@Service @Transactional @SuppressWarnings("rawtypes") public class PlasDimeOrgRelManager extends BaseService<PlasDimeOrgRel, String> public void saveNewDimeOrgRel(PlasDimeOrgRel rel) { this.deleteOldDimeOrgRel(rel.getPlasOrg().getPlasOrgId(), rel.getParentId(),rel.getPlasOrgDime().getPlasOrgDimeId()); this.savePla...
1
786caeb41c420b184621c7fea7071d3c
2080a7a8c77fcce52dfc216f6423e8da
Available bulk options - used in requests (eg. BulkClientRequests).
self.session_id = session_id self.session = session or requests.Session() self.bulk_url = bulk_url if not session and proxies is not None: self.session.proxies = proxies self.headers = { 'Content-Type': 'application/json', 'X-SFDC-Session': sel...
0
cb1ad219c5d588d7172f5435e8f7c8bf
66b42e13c84dabba58152a32ed437b77
Returns the live data which monitors the secondary call details.
class PlivoCalls(object): def get_details_of_a_live_call(self, call_uuid): logger = log("get_details_of_call_based_on_uuid") self.entity = '/Call/'+call_uuid+'/?status=live' res = invoke_plivo_api(entity=self.entity, type='get') if not res.ok: logger.warn("unable to fetch cal...
1
cbdab3b247f41039efc5e7373958707c
c5819af1ad207442493490894bcba3c4
回答用のテキストボックスの入力値が変わった際の関数
def btn_click(): text1 = input_text.get() label2['text'] = text1
1