query_id
string
corpus_id
string
query
string
code
string
label
int64
ffcd7bf7f08b221797aa4ea04962adc6
b9bc50a5d50924a835dbb2b240b6ba7a
wrapper for Epicenter's static code information function
unsigned int pid; PyObject* vad_list; PyObject* target_obj; int max_depth; int max_struct_size; if(!PyArg_ParseTuple(args, "IOOii", &pid, &vad_list, &target_obj, &max_depth, &max_struct_size)) return NULL; unsigned long long target = *(unsigned long long*)PyBytes_AsString((PyObject*) target_obj); ...
1
e4d0d8f00a185a9a84ddd81e66f6ea58
67017b1a2e8e2ef4f767bdf72fbc88d7
GET: api/PCs
namespace Hadco.Web.Controllers public class PitsController : GenericController<PitDto> [ResponseType(typeof(PaginatedResult<PitDto>))] [ActionAuthorize("read")] [EndpointQueryStrings] public HttpResponseMessage Get() { var result = _pitService.GetFromCache().ToList(); ...
0
fd26b4e1fc03e0d602c89e107da619fe
1dc9e0c6dbee41108065d960770148c5
Return an array of AMF bodies to be serialized
public function getAmfBodies();
1
fda56bf717c6f2ce00d43c8da8860dcc
266da4605ffd3d7a7aab2fa5f8e83048
WARNING!! STRING STARTING INDEX AT 0
bool String::startsWith(const string& doesThisStart, const string& withThis) { if (doesThisStart.rfind(withThis, 0) == 0) return true; else return false; }
1
85dcebeffde3bf40e2ee968c259b9223
667c68136451b630771b0ae57d61b674
数据库查询,有条数限制
class Database public function query_limit($sql, $total, $offset = 0) { if (empty ( $sql )) { return ''; } $total = ($total < 0) ? 0 : $total; $offset = ($offset < 0) ? 0 : $offset; return $this->_query_limit ( $sql, $total, $offset ); }
1
fbee44da5f059875c29b93ce99e34144
8cadf3da81f93a8208acc5f024870d93
Sets published date to current time when published
class Article def set_date_posted self.date_posted = DateTime.now if posted? end
1
24fc197bb7839e6ba7e0fdfddce65b42
319fff3c40b2dc36fc40928730c446a7
获取临床诊断明细表列元数据
{ Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("Sample Source", "Sample Source"); dic.Add("DiagnoseTypeFlag", "诊断类型"); dic.Add("DiagnoseDateTime", "诊断日期"); dic.Add("ICDCode", "ICD码"); dic.Add("DiseaseName", "疾病...
1
80a934a81c78b6c3c1af40d8fc75a0f8
38123928281f01f7711a77693e0a91a5
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 获取当前Utc日期时间 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
{ DateTime chinaTime = TimeZoneInfo.ConvertTimeFromUtc( DateTime.UtcNow, TimeZoneInfo.FindSystemTimeZoneById("China Standard Time")); return chinaTime; }
0
69368abfda48d0df3c232fbfe3335208
cb29f3bf0df64316062a9c92eee9bac0
Clear <playerInfo> value
namespace nsGlasslabSDK void Core::resetPlayerInfo() { json_object_clear(m_playerInfo); setDefaultPlayerInfoKeys(); }
1
97e3c8d13ea0467ae0b4c02ebb60d102
962e22c8522362c4b15bf87a016106b1
Sets the rating entry persistence.
public abstract class NotificationEntryServiceBaseImpl extends PrincipalBean implements NotificationEntryService, IdentifiableBean public void setServicePackageEntryPersistence( ServicePackageEntryPersistence servicePackageEntryPersistence) { this.servicePackageEntryPersistence = servicePackageEntryPersistence; }
0
e93c7bbc623da36cd494abdc1c26ff38
9128390384b0d441aa0d41e6afff64be
获取declTime属性的值。
String getDeclare();
0
7c2682735d0f3cdd78f12c5775fb8e79
e815dc4d7c963a0a01130820cb1779c1
! Run the FTM state machine
void fist_turntable_fsm() { switch (first_turntable_current_state) { case START_FT1: if (!get(STD1B)) { set(MD1F); } else { reset(MD1F); first_turntable_current_state = IDLE_FT1; } case IDLE_FT1: if (first_band_current_state == MOVE_OUT_...
1
239b627ec018ef785f9fb37381231b1a
3e8c402bcc8f0657711be2123bfe1531
It lists all the messages sent by a user
c = self.getConnection() cursor = c.cursor() query = 'SELECT * FROM Message WHERE FromUserID = ' + str(userID) cursor.execute(query) return cursor
1
f155be1c566b19bce8b64af641f83de8
535d559286acf1dbddbed3be910f2690
Pack all files in the map so that it can be mailed. .. versionadded:: 5.0 **License:** `Geosoft Open License <https://geosoftgxdev.atlassian.net/wiki/spaces/GD/pages/2359406/License#License-open-lic>`_
z = zipstream.ZipFile(compression=zipstream.ZIP_DEFLATED) for fname,(tree,body) in self.tmx_files.items(): z.writestr(fname, etree.tostring(tree.getroot(), encoding=self.ENCODING, pretty_print=True, xml_declaration=True)) with open(self.filename, 'wb') as f: for data in z: f.write(data)
1
af965c1ce351a465f6a0c482fb9ce34d
d0703d7192140ac85be5ab725b7cdc99
获取十三位的时间戳
@Slf4j public class DateUtil public static String getTimeStamp13() { return System.currentTimeMillis() + ""; }
1
dc6c9439147a46291d8231b93e3e6464
304025d1b201845521835fdcb57d2c5a
Downloads data on crimes committed in Boston, writes to a collection, and creates a provenance document
client = dml.pymongo.MongoClient() repo = client.repo repo.authenticate('hschurma_rcalleja', 'hschurma_rcalleja') doc.add_namespace('alg', 'http://datamechanics.io/algorithm/') doc.add_namespace('dat', 'http://datamechanics.io/data/') doc.add_namespace('ont', 'http://da...
0
5aaa13655249c0373eb8a5ad68ee22f9
40773b9e8b865c558c2592f97218ef8c
获取AppWidget对应的视图
fun onCreateView(context: Context, appWidgetIds: IntArray): RemoteViews { return RemoteViews(context.packageName, R.layout.scene_widget_layout).apply { val adapterIntent: Intent = Intent(context, SceneWidgetService::class.java) setRemoteAdapter(R.id.scene_list, adapterIntent) ...
1
1de24f63fdfed858ebc65145d751c4b4
fdadbe144eec0845be564d5c04ef35b1
this section deals with proper assignment of walkers to bins
blk_avg += walker; blk_norm++; for(int i=0; i<n_bins; i++){ blk_histo[i] += histogram[i]; tot += histogram[i]; } return; }
0
ba398557ebece2a49e00c047f797e781
75854aaa17e6c7fee3ba6449dd283bdc
Add new feedback message action
class MainController extends Controller public function actionCreate($city = null) { return $this->_createOrUpdateFeedback('create', null, $city); }
1
9a03196fcf5906f13207f09e6cc9587f
29b7c7f9a46b7b71df370b10072fba71
Send metrics collected in last step to neptune server
for name, log_items in logger.log_history.items(): last_log_item = log_items[-1] self.neptune.send_metric(name, x=last_log_item.step, y=last_log_item.value)
1
193ad205aeafb3d88ed09482ce1686a1
8543d58ca24db0e9c45f6d73cf0f74ad
检查一个ins和一个set是否重合
boolean flag = false; int position = 0; for (Set<String> s : setList) { String[] sArr = s.toArray(new String[0]); String[] setArr = set.toArray(new String[0]); for (int i = 0; i < sArr.length; i++) { if (sArr[i].equals(setArr[i])) { position = i; } else { break; } } if (positi...
0
505de21d68ddc7090453d5755f4db4a3
401bfbe4dfd7b581b25360fcca79237f
Get the capital monnaie.
public Float getCapital();
1
2092e393fb49b32c5380cbcc8671c6f1
d4dbd43ae2dde3e029a8ecc4092171d8
각 모델의 결과를 합하였을때, 하나라도 탐지한 모델이 있었다면 비정상으로 결과 값을 도출시킴
pred_list = [] for model in model_3_list: pred = train_and_predict(model, fit_args3, pred_args3) pred_list.append(pred) for model in model_2_list: pred = train_and_predict(model, fit_args2, pred_args2) pred = decide_it_2(pred) pred_list.append(pred) return p...
0
53cd738dff78951772df820f11c1570e
8e92725c67f46172eb9b7a5568adeeb5
set the gson version which is used to serialize/deserialize json data.
open class HttpClientFactory fun getGson() = config.gson
0
4ea6f96febf742067b6a387b109eb5dd
8836f62e3c592e81b69d6d9980fa0597
合并栈中所有待合并的序列,最后剩下一个序列。这个方法在整次排序中只执行一次
{ while (_stackSize > 1) { var n = _stackSize - 2; if (n > 0 && _runLength[n - 1] < _runLength[n + 1]) { n--; } MergeAt(n); } }
1
b5155551f566a821ad1ea6d52d977ed5
4389989f816c414eac833162d1b02f55
[@property] countChangeable Whether the array can have a variable number of busses. The base implementation returns false.
@Generated @Library("AudioToolbox") @Runtime(ObjCRuntime.class) @ObjCClassBinding public class AUAudioUnitBusArray extends NSObject implements NSFastEnumeration @Generated @Selector("isCountChangeable") public native boolean isCountChangeable();
1
bf5e9083c2d255730110ccb48ec1d590
4b0d754b6a5ed98f9758a2ce7318ce05
PROCESS REGISTER DATA ADMIN
{ $obj = new AdminModel(); $var = $obj -> AdminStudentRegister($regid,$name,$address,$gender,$dob,$mobile,$email,$dept,$pword); if($var == "true") { header('Location:faculty_home.php'); } }
1
21b38a7419d2b0fc7cb8ec041b95f957
ce26ab8a992ae71084ed74b32654f46a
刷新空气质量信息
public class AirVerFilterActivity extends BaseActivity private void refreshVoc() { if (mAirPurifier != null) { if (mAirPurifier.sensor().PM25() != 65535) { switch (mAirPurifier.sensor().VOC()) { case -1: tvVocValue.setText(R.string.in_test)...
1
7d491c00b15344b2440ae758f97703a5
718a488f0544280554523e6bd996274f
Registers event handler for insert a record.
public class BSTView extends BorderPane public void setInsertHandler(EventHandler<ActionEvent> e) { controlsPane.getInsertBtn().setOnAction(e); controlsPane.getKeyTextField().setOnAction(e); }
1
254081bbe8562591aa86e8c2180fb097
9e8288d4fdadb871ba937d4e71427ded
根据用户id和appCode获取用户的菜单
public List<MenuTreeDto> findMenuTree(String userid, String appId);
1
ee59edc07587a90fb93ffca6ddc78afe
ecb279298da0e109c81cfaff1ebad66f
把信件标为已读
{ using (FWDC rdc = new FWDC()) { var model = rdc.tbl_Message.FirstOrDefault(n => n.Id == Id); if (model != null) { model.IsRead = true; rdc.SubmitChanges(); return true; ...
1
db7e8448720cab001d1dd46e98d8a375
a163ddff675eb436d9e03ded7c558746
Create an instance of {@link ProtocolType }
EEnum getProtocolType();
0
9c1c999044f991b2559ed3c68102b087
0268d541c25c061208857f33865a0c2a
Locate heterozygous genotype calls.
male_str: str = 'male', female_str: str = 'female') -> hl.MatrixTable: male = sex_expr == male_str female = sex_expr == female_str x_nonpar = mt.locus.in_x_nonpar() y_par = mt.locus.in_y_par() y_nonpar = mt.locus.in_y_nonpar() return mt.annotate_entries( GT=hl.case(...
0
dfc0b413876705a434115422f0db8c96
6b3fd795865919c5890c1aeb65d084b6
设置新单据类型
document.getElementById("btnInvoiceType").value = DicValue; document.getElementById("InvoiceType").value = Dickey; var paymethod = document.getElementsByName("radioPayMethod"); if (JudgeRadioSelectStatus(paymethod) == false) { alert("请选择付款方式"); } else { document.getElementById("D...
1
4170be31a07addfedf15cb85f6881660
ff30f7768b4a876423c80f666d6d7f8b
make all displayed bars fit the alotted max bar width by scaling them down (i.e. decreasing unit width)
RectTransform t = healthbar.transform as RectTransform; t.sizeDelta = new Vector2(healthbarUnitWidth * maxHP, t.sizeDelta.y); }
0
46566db0458b429149ce60e6baebf487
eec4516d53d6d64540ebb95525e29108
Returns the smallest non-negative argument.
if(arg0 < arg1) { return arg0; } else { return arg1; } }
0
2bd39f2a9c63de97e0678d1c963848a1
0f25424055721f0f71e51ec7b345629d
corresponding function
if func_type == "linear": return a elif func_type == "tanh": return np.tanh(a) else: print "invalid func_type :%s" % func_type return
1
58bc5efb20fcbc8bb30201e1e39269a7
204515df07391dd2f5f7e9f795688fef
Event handler für Änderungen in den Eingabefeldern
namespace ContactManager.UI public partial class UCEditTraineeObject : UserControl private void TextBoxChanged(object sender, EventArgs e) { if (sender == TxtTitle) { trainee_.title_ = TxtTitle.Text; } else if (sender == TxtFirstname) ...
1
f373446c35a1b9ae9d136a4c9353a4fb
63a17fa8b04d3dd2d9bd3c0262561cf2
Inicializa o texto do botão, posição, caixa (que irá ser o pano de fundo do botão), e qual o estado do botão está em (não ativo no início)
{ state_ = state; setShape(x, y, w, h); setText(text); }
1
568521894b7e0d778a1a81301329e599
e22c5dc7ba547a7b33b73d862834b3d7
Edit an existing variable for a schedule on the repository.
endpoint = f"schedule/{schedule_id}" resp = self._request(PATCH, endpoint, data=settings, api_version=API_VER_V2) return resp
1
0b423990b99e75019b64567d5a88daa5
2c46f5f4f77d071117c96eb9dc29d114
查询文物数量测试
public void TestFindRelicByTotalCode() { Relic relic = relicService.findRelicByRelicId(1, "31010101"); Assert.assertNotNull(relic); Assert.assertNotNull(relic.getEra()); Assert.assertNotNull(relic.getPhotos()); Assert.assertEquals(2, relic.getPhotos().size()); Assert.assertNotNull(relic.getRelicPropertyMap...
0
4b85e468d25b8bb8899c209c5b2adeb2
b641675336362080a7fbf415e27ab2ef
試合管理ビューの作成
class MatchController extends Controller public function create($schedule_id) { $schedule = Schedule::find($schedule_id); $home_player = Player::where('team_id',$schedule->home_team_id)->get(); $away_player = Player::where('team_id',$schedule->away_team_id)->get(); return view('match...
1
2e50592f6eb8ca4a91add090815ed82d
44e531c8ef0de5d8fa78a4080ad45960
把布局注入到 Activity中去
public void setContentView(View view, ViewGroup.LayoutParams params) { super.setContentView(view, params); ViewUtils.inject(this); ButterKnife.bind(this); }
1
5635cabb69e8a1b03afbe7fe17958bd4
a95497cb58e700e3151de0a18dbae958
get username & password from GUI return a list with both credentials
username = getpass.getpass("Enter UCInetID: ") password = getpass.getpass("Enter password: ") return username.strip(), password.strip()
0
f55adc67cc1aead99a1d32e79d4fa79c
d4b9e28fc9c24e52252e01be262c095f
Place the level exit at the current cursor location
void Maze::writeExit() { maze[ 0 ][ 3 ] = 'E'; }
0
05e0b3f4d326484525d41b335b64b74f
0276348df3d33c542afbac15818bac63
一括更新設定の項目に総合計の項目が含まれているかを判定する
public class S01_0502 : PT71, iPT71 public bool CheckUpdate() { base.clearExistErrorProperty(this.gbxUpdateItem.Controls); if (this.isExistHissuError()) { CommonProcess.createFactoryMsg().messageDisp("E90_022"); return false; } if (this.chbDelete.Checked == false) { if (this.checkOverlappingData_U...
0
173c87759976940985bdafa9bcd4ad12
f1a7ec4ab778d4ea4cbbf56a466db6d2
Generate random attribute values
func generateAttrib() int { return random(8, 18) }
1
37d54bf15ecc5e134f0c2b39a1645c4e
c5fac5d4a1e317abb4e3b5bcb999aaea
always returns only positive remainder
int get_mod(int a, int b) { return (a % b + b) % b; }
1
f4459d4bdf073815bd5cc2f0bcc2ce3f
c350f0c6cbaf7534633b00b396022b59
返回菜单项大小,给上层的MenuObject调,调整菜单宽度
{ if (m_sizeMenuButton.cx == -1) { return m_sizeButton; } else { return m_sizeMenuButton; } }
1
6a9b9a12a0372859be160df7933f266a
07cc845afbde3e80421cf9d4d49e8321
Méthode appelée quand le boulet est chargé.
local function BulletLoaded() end
1
9211b02d1f2a9c983c7f934f0c94f283
2de9e55118d9159daafc68c353164ce1
Search download directory and all subdirectories
{ searchResults = FileUtils.FileSearch(DirectoryPath, recursive ? SearchOption.AllDirectories : SearchOption.TopDirectoryOnly, includeRootInSearch, true, SearchPattern); }
1
21cc00095568f270a313766e5c1e6cca
18f77a7fd31542bcbef28b342593bd23
construct +++++++++++++++++++++++++++++++++++++++
mG_Correlation::mG_Correlation(int nb_data, int nb_modes, double time_duration, double relaxation, int verbose_flag){ Display_flag = verbose_flag; Debug_flag =2 ; if(Display_flag>=1)cout<<"Starting constructor of mG_Correlation."<<endl; Nb_Data = nb_data; Nb_Modes = nb_modes; DeltaT= time_duration; Tau=r...
1
91e3cb5dd311c2401a1ec8a450896c00
f4742cfd522fd2d73a414ab4bc31ad3c
Generates an unix epoch in ms.
{ var timeSpan = new TimeSpan(DateTime.UtcNow.Ticks - new DateTime(1970, 1, 1, 0, 0, 0).Ticks); return (long)timeSpan.TotalMilliseconds; }
1
e330400545f1fb2e33ecf3f636272b00
07946f8673c6c8affa1e6fdb70746fa2
Tests the cryptographic integrity of the application.
{ const string XML_PUBLIC_KEY = "[publicKeyToken]"; const string CONTENT_XML_LOCATIONS = "\\Content\\contentHashes.xml"; var doc = new XmlDocument(); try { doc.Load(AppDomain.CurrentDomain.BaseDirectory + CONTENT_XML_LOCATIONS); } catch (FileNotFoundEx...
1
fc49514dc8630463aeef28962dbcdc13
25349c49b7e671d77841d05f65ead7bb
run motor in counter clockwise direction
void loop() { Motor_CCW(); }
1
b2f7ccc5dcf1e891e2d0a0387fe493bf
49b118788b6bbf4719d409026752f698
Determines whether this derivation step has pattern facets.
public boolean isPattern();
1
b968b78fee20197d1667b6296785fade
9ab3b4f980d75e49fb85241af6d0000f
! \brief 获取HUB端下行信道频率信息
PUBLIC FMD_ERR_T fmd_GetFreq(UINT32 *pFreqKHz) { UINT8 readReg[2] = {0}; FMD_ERR_T errStatus; if (pFreqKHz == NULL) { return FMD_ERR_BAD_PARAMETER; } errStatus = fmd_Read(0x0a, readReg,2); FMD_TRACE(EDRV_FMD_TRC,0,"reg0=%x,reg1=%x",readReg[0],readReg[1]); if (errStatus == FMD_...
1
8c45ad9867431f93b9cbebc3c529a526
12627e890adebe27ca4512238c7919ae
(see https://blog.golang.org/pipelines)
var wg sync.WaitGroup out := make(chan string) fun := func(in <-chan string) { defer wg.Done() for c := range in { out <- c } } wg.Add(len(ins)) for _, cs := range ins { go fun(cs) } go func() { wg.Wait() close(out) }() return out }
1
19d7c201f2c51e70efcaf8341c5c1b57
16c58d2800125bfd029268fba100f1aa
Devuelve la primera agenda que encuentra de un día determinado
public class Modelo extends Database public Map<Integer,Reserva> obtenerReservas(Date dia){ Map<Integer,Reserva> resultadoSalida = new LinkedHashMap<Integer,Reserva>(); Map<Integer,ArrayList<Object>> resultadoBD=new LinkedHashMap<Integer,ArrayList<Object>>(); resultadoBD = select("idReserva,reserva_dia,reserva_ho...
0
81bcc8aa350794a40bfd82edc4553665
b29801eaa765bf72818e126255ea4aab
InitModule initializes a module with a given name in the given directory
if dir == "" || dir == "/" { return nil, errors.Errorf("invalid directory") } return fs{dir: dir}, nil }
0
7aa91d7db9f3939033904b83ed53efc2
f7a9ce8a7df761e6da7f567426dc5b93
分割叶节点,并插入
void btree_split_child(BTreeNode node, int location) { BTreeNode newnode = allocate_node(); BTreeNode childnode = node->child[location]; int i = 0; newnode->leaf = childnode->leaf; newnode->n = MIN_T - 1; for (i = 0; i < MIN_T - 1; i++) { newnode->key[i] = childnode->key[i + MIN_T]; printf("%d %d %d\n", child...
1
f56d01b2e6a691cd6ca8d9f046bfaa5a
cb6736eecce2c9a4c663f7796f868369
Applies filters and returns the asset as a string.
function getAssetFilterOutput(args: GetAssetFilterOutputArgs, opts?: pulumi.InvokeOptions): pulumi.Output<GetAssetFilterResult> { return pulumi.output(args).apply((a: any) => getAssetFilter(a, opts)) }
0
f53c87c6c940c280a1c2c087b4c2f3d2
5ca4bf3ca7f2188e6b1df109bade3209
Gets the review status id.
class ConsumerBase public function getReviewId() { return $this->reviewId; }
0
06e5c69a5f101826b111b9b84a2d1ed8
fdc69373e805027594a37857c612ec4a
random returns a random item from the given slice.
if len(names) < 1 { createSlice() } i := rand.Intn(len(names)) name := names[i] return name, nil }
1
4665fcde8d9c3cc972592af57e4a4b8c
ea65d3b75afee304b103ad6335a9f335
Convert values to GeoArray
{ foreach($fields as $key => &$field) { $rules = explode("#", self::GEO_FIELDS_TYPES[self::GEO_HEADERS[$key]]); switch($rules[0]){ case "int": $field = (int)$field; break; case "float": $field...
0
57b0414dbf1d01cd85d224bed1262a13
7cc8370d064a7737479b2e408ea79862
マーカーの作成
function createMarker(map, id, posn, title, icon, text, link, linkTitle, minzoom, maxzoom, editEnableFlag) { var iconF = getIcon(icon); var marker; marker = new GMarker(posn, { title: title, icon: iconF, draggable: editEnableFlag }); marker.id_ = id; marker.type_ = "marker"; marker.title_ = titl...
1
5946cc1f4e5cd318d2fe7a2a05732476
890c9d077473d21b1c1115c169ad6ea7
Shows (but does not save) the plot
class Plotter2(object): def show(self): self.draw() plt.show()
1
723434909f411ecc10d69ff9e8e243af
6305440e4f1c1090f13218b633cee885
Updates the timetable source after export.
@NonNull final IDataService dataService, @NonNull final Long oldVersion, @NonNull final Long newVersion) { if (oldVersion < VERSION_CODE_2010) { dataService.resetTimetable(); } else if (newVersion > VERSION_CODE_2110)...
0
fac9076279d47ebb5926222b0b18a0e0
5cc8f180544f4c7575d7702c61912522
知らないユーザーでリクエストしたら404エラーを起こす処理
function handleNotFound(req, res) { res.writeHead(404, { 'Content-Type': 'text/plain; charset=utf-8' }); res.end('ページがみつかりません'); }
0
af5f45c44101f7c840d419576999c0a7
9a663b3136fe9ba9a3f0e59a14ef43d7
Permet de changer l'état actuel du serveur
export class Accueil extends React.Component changeState(etat) { this.setState({ connected: etat }); }
0
7f0fa7eb824ddd99b9bc1483d1581ca1
48766cfba867c5f01dd1842639f1adad
Handles the close button of the overlay being clicked
export default class Sidebar extends Component overlayClicked() { this.props.onSetOpen(false) }
1
92a307ffde7b7ee3fd618ebccf7cd8a8
f419f7b7c4979bfe8dccfc867d5b65fe
Namespace for global variables.
class Globals: def __init__(self) -> None: self.log_dir = "" self.temp_dir = "" self.analysis_dir = "" self.object_conversion = False self.tracing_task_name_to_id = {}
1
242121e02c705d243ede008082407a5a
ff69072f6300f850bdc35ea6b308cf9c
共用バスコース座席情報取得SQL作成 悲観ロック用
$sql = "SELECT 6CODE FROM projectditealinfo LEFT JOIN projectinfo on projectditealinfo.5CODE = projectinfo.5CODE LEFT JOIN projectnuminfo on projectinfo.1CODE = projectnuminfo.1CODE LEFT JOIN edabaninfo on projectinfo.2CODE = edabaninfo.2CODE LEFT JOIN syaininfo o...
0
74d1cc849dabc7be99300ffd6b5e18ca
4e75fb3cde9fc42fa78b20ee44cbf1a8
Perform one on-policy update.
class OnPolicyTrainer(ABC): def _learn(self, update_step: int): raise NotImplementedError()
1
0e6c1c7de89534366f9792424c2a3255
b7fd8c4ab5b898343818d708b0ca0cb8
If customer is angery when time expired, penalize 2x any player who delivered incorrect salad
public class CustomerBehaviour_Seated : CustomerBehaviour public void SitAngrily() { CustomerPatienceScript.StartOrderPenaltyTimer(); }
0
078dcd3b51851d59191d608bf00e3611
59c0d8ee73b1fb8a9111bc908137784a
Get a list of payment links Returns a list of links generated by the merchant
{ ArgumentArrayValidator::validate($array, 'array'); ArgumentGetParamsValidator::validate($params, 'params'); $allowedParams = array( 'token' => 1, ); $params = ArgumentGetParamsValidator::sanitize($params, $allowedParams); $webHookList = implode(";", $arr...
1
b6edc0f227ed618080621f3a5e5f3f99
1334d5c18a62020ff59c6498df7463f2
Inserts the results of a game.
con = connect() db = con.cursor() data = (winner, loser, ) sql = "INSERT INTO results (winnerPlayerID, loserPlayerID) VALUES(%s, %s)" db.execute(sql, data) con.commit() db.close() con.close()
1
860766780128bd6d3e1ef4370d5685b2
9b2b89f009f830c19df04d09eb6b5fea
Sets the values of the X and Y axis for the right joystick
void setNunchukJoystickXY(WiiNunchukJoyCmd value);
1
6b532f7329b0aa3760438efb746c68bf
b1c5da95cfb18e476d9569e7e5ee105d
地址输入验证
var getaddr=document.getElementById('addr'); var gettdaddr=document.getElementById('tdaddr'); var str =/^\S/; if(getaddr.value=='') gettdaddr.innerHTML='地址不能为空!!'; else if(str.test(getaddr.value)) { gettdaddr.innerHTML=''; } else gettdaddr.innerHTML='地址格式不正确'; getaddr.style.background="#FFF"...
1
18b8e19c9168c89b7ff8ae031672eaed
f8f1dcc30d89a9912d797a192defe6de
correct the frame counter when overflowing
{ frames++; if ((frames & 0x0F) > 9) { frames += 6; } if (frames < TC_FR) { return; } else { frames = 0; seconds++; if ((seconds & 0x0F) > 9) { seconds += 6; } if (seconds < 0x60) ...
1
c91f1f3d5015c6e8626ef56b86a9b364
5551f8dd95b645e8f50cb2910dfa7675
Finds the closest route, by driving distance, given the coordinates of an origin and possible destinations
def ClosestXdestinations(numDestinations, allLocations, numDeliveries): TruckDistance = {} for i in range(numDestinations): dist = allLocations[i][0]**2 + allLocations[i][1]**2 TruckDistance[dist] = allLocations[i] arr = sort(list(TruckDistance.keys())) print(arr) for j in range(numD...
0
ca29933473285add5a668b163f8b2c30
91efc571920756928c6964922194798b
Create a chart for a single week.
public class Dashboard extends Header private String setWeekGraph() { DecimalFormat df = new DecimalFormat("#.##"); double divisor = Double.valueOf(df.format(Double.valueOf(Y_AXIS) / 100.0)); long usage = 0; long mInADay = 24 * 3600000; Calendar current = Calendar.getInstance(); int currentDay =...
1
2b653051578e5f241bed6f98dfb0ca03
451bfc0031b65634820e63096e58f197
Gets the anchor_horizontal_alignment_metadata of this Radio. # noqa: E501
class CustomTabs public function setAnchorHorizontalAlignment(?string $anchorHorizontalAlignment): self { $this->anchorHorizontalAlignment = $anchorHorizontalAlignment; return $this; }
0
a49d68f602b90f0d5305335aeee08f75
3a4bee74c945ca59c50ed2898faa956e
科学计数法转字符串
class kCwt(object): def scinot(self, x, pos = None): if x == 0: s = '0' else: xp = int(np.floor(np.log10(np.abs(x)))) mn = x / 10.**xp s = '$' + str('%.2f' % mn) + '\\times 10^{' + str(xp) + '}$' return s
1
36730ace22bdc8ee964617353b7b68da
3b62f8640a074e9e79b67f242a9710b3
The function corresponding to int ExposureControl.getMinExposureTime() method of AMMS Java API, see JSR-234 Spec Returns the minimum supported exposure time. Java layer guarantees the following: access to the camera device time in microseconds or 0 if the only automatic exposure is supported.
javacall_result javacall_amms_exposure_control_get_min_exposure_time( javacall_handle hNative, long *eTime) { return JAVACALL_NOT_IMPLEMENTED; }
1
8cebf4ea91c90d192bbda06cb7b9f7b2
ddefa9b38802a8db588a0ab5947ef112
Gets the generic argument of an <see cref="IEnumerable"/>.
namespace Kengic.Was.CrossCutting.LinqToWcf.Types internal class InterLinqTypeSystem internal static Type GetElementType(Type seqType) { var ienum = FindIEnumerable(seqType); if (ienum == null) { return seqType; } return ienum.GetGe...
1
451849fcc15556b7fc87ec28a3cf07ef
bb87f6a48e7e77b7ceeaf95dd027a218
generate a random ticket name
adjectives = ['iced', 'tall', 'short', 'grande', 'nonfat', 'skinny', 'almond', 'soy', 'vanilla', 'extra-hot', 'breve', 'cinnamon', 'dry'] nouns = ['mocha', 'latte', 'cappuccino', 'americano', 'steamer', 'macchiato'] adjective = adjectives[random.randint(0,len(adjectives)-1)] noun = nouns[random.randint(...
1
934637880aad85b11867b22ffb589f98
8645d6cb44a1cd7651b66aa8e4da4d38
return true if both the unique identifiers and optional ones match
{ return string.Equals(uniqueId ?? "", value.uniqueId ?? "", StringComparison.Ordinal); }
1
d4c23c3295920037943e64311c58fd39
a1c28723d155be9aee376a60d7b99547
判断是否全白图片
{ Rectangle rect = new Rectangle(0, 0, srcBitmap.Width, srcBitmap.Height); BitmapData bmpData = srcBitmap.LockBits(rect, ImageLockMode.ReadWrite, srcBitmap.PixelFormat); int depth = Bitmap.GetPixelFormatSize(srcBitmap.PixelFormat); Color color = Co...
0
7e28e588ed420dc946f3e6837fda2b9a
833799b133a9af9e3740f0d9fbaa0912
测试多重检索数据
public class TestCRUD extends EsclientrhlDemoApplicationTests @Test public void testMGET() throws Exception { String[] list = {"main2", "main3"}; List<IndexDemo> listResult = elasticsearchTemplate.mgetById(list, IndexDemo.class); listResult.forEach(main -> System.out.println(main)); }
1
ad211c5f7a801d6b1fc6a62dd68ff380
170b5105ee13db177601da31931f7004
Add common arguments shared among different kinds of data and models (e.g., n_splits, activations) to a parser. It is separate from `add_args` to prevent collision of duplicate common arguments.
class StanfordDataModule(pl.LightningDataModule): def add_data_specific_args(parent_parser): parser = ArgumentParser(parents=[parent_parser], add_help=False) parser.add_argument( "--data_path", default=None, type=Path, help="Path to fastMRI data root", ...
0
f867a6cfa37cc238d7f6c248cc376346
3f7482519a5bc18dbd0682421ed240ef
我的收藏下的文件不允许分享
class MsgMyPCChatingDouble(TestCase): def test_msg_weifenglian_PC_0257(self): chat=ChatWindowPage() chat.open_file_in_chat_page('.docx') time.sleep(2) chat.page_contain_element_more() chat.click_more_Preview() chat.page_contain_element(locator='预览文件-转发') chat.page...
0
d0d6e24c9e092f852a269697384671cd
b24590e7319ce66c0df5f9f5172f0349
Returns the value of the '<em><b>Prototype</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Prototype</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc --> extendedMetaData="kind='attribute' name='prototype'"
@Property Object getPrototype();
1
872c673b95678fd842cb2d625b0f6372
25c122fed9629cb7d81d3040d522169d
Delete all of the backup files
backups = Dir.glob(options[:directory]+'/**/*{~,.sw[a-z]}', File::FNM_DOTMATCH) backups = backups.select {|e| File.exist? e.chomp("~") } if options[:repeats] menu(backups) do |paths| paths.each {|e| File.unlink(e) } end end
1
e675d4172531bc5845c17fafc74213f2
b3d873d362da9220e436c033e3469df8
Prompt the user for input and handle any abort exceptions.
isok = raw_input('Continue? (y/n)[n]> ') if isok.startswith('y'): log.debug("Ok! Let's continue!") else: log.info('Bailing out at your command.') raise UserBailout('Bailing out at your command')
1
23fad093c39a2dd25e60f7b703998d4c
89f9ae321513b9ed4883613ccaac7d47
Obtiene las palabras clave registradas en cada elemento de la base de datos de los instalables y de recursos personalizados.
namespace SaludMovil.Negocio public class AdministracionNegocio public IList<Llave> ConsultarLlaves(string nombreTabla) { using (unitOfWork = new UnidadTrabajo()) { return unitOfWork.TablasAdministrablesRepository.ConsultarLlaves(nombreTabla); } }
0
230519aa6f783f15ca43c36b15db9918
d3d3a81e78751c494396cfab8e4d0536
歌曲播放控制 继续播放
public class MediaPlayerManager public void continuePlay(){ mMediaPlayer.start(); MEDIA_STATUS=MEDIA_STATUS_PLAY; mHandler.sendEmptyMessage(H_PROGRESS); }
1
8fb85bd7b0e18f1dcff62a8a106115fd
1d38b6ea56f24f933b5dc9d17c681b9a
Fylder combobokse med producenter
namespace AfsluttendeOpgaveOOPForm public partial class OpretInstrumentForm : Form private void FyldProducentCombo() { ProducentCombo.Items.Add("Yamaha"); ProducentCombo.Items.Add("Ibanez"); ProducentCombo.Items.Add("Pearl"); ProducentCombo.Items.Add("Korg"); ...
1
d2219fdbc1bc9e92b3a5f67046e3bf1f
0751f27dc5b85a32af93706bccd3043c
Validate AlignSimple() method with one line Rna sequence and validate the aligned sequences Input : Single Reference and Single Query Rna sequence Validation : Validate the aligned sequences
namespace MBF.TestAutomation.Algorithms.Alignment [TestClass] public class NUCmerP1TestCases [TestMethod] [Priority(1)] public void NUCmerAlignSimpleSingleRefSingleQueryRnaSequence() { ValidateNUCmerAlignSimpleGeneralTestCases(Constants.SingleRnaNucmerSequenceNodeName, ...
1
884cf6f3545502b7ae3ed82680bf0bb4
ca26f899db7fb01e9dad5186381f7ee8
Set the active transport (TCP, BOSH, WebSocket, …) to be used for the XMPP connection. Also marks the connection as connected.
{ $method = sprintf('setTransportTo%s', ucfirst($this->driver)); if (!method_exists(self::class, $method)) { throw new Exception('Unsupported transport method'); } $this->{$method}(); }
1