query_id
string
corpus_id
string
query
string
code
string
label
int64
8386ac89e7e9d6a59fa3e21839890239
944156e9784c6e95c86fa8dd269ea015
Get URL for osrm backend call for arbitrary to/from latlong pairs
def get_link_to_osm(lat, lon, zoom=15): return ('http://openstreetmap.org/?mlat=%(lat)s&mlon=%(lon)s' '&zoom=%(zoom)s' % {'lat': lat, 'lon': lon, 'zoom': zoom})
0
11a81ba9a0d828b65458798714c02c1a
ff12886814f06ce7c2b939646366f84c
Retrieves a list with the names of the AcroForm textfields in the PDF
class PdfFiller def get_fields(url) @pdftk.get_field_names(open(url).path) end
1
8d97b629b6de8c994710cbe10c8a8e09
6af124e931a17d46521a7fd618a1e9eb
生成一个yyyy-mm-dd+6位随机数的code码
public class CodeUtils public static String CreateCode(){ Random random = new Random(); String code = ""; for (int i = 0; i < 6; i++) { code += codeNums[random.nextInt(10)]; } return code.toString(); }
0
0d0409c398beff7af756352f3a264ec2
dac1fe8bce63dbfde0b275572a3211d2
Locates the embedded resource and attempts to load it as XML data and return it as an XDocument.
namespace Motorola.RhoMobile.VSExtension.Core.Infrastructure.Interfaces XDocument LoadXmlFile(string xmlFile);
0
948687eaa7812766d8bb8c7cde84ccfa
5134b59cd632ce18b5578627e0d711c7
Determine if this instrument type is a MIDI instrument type.
class MorphCase: def is_instrumental(self) -> bool: return self.__getValue(4)
0
b7279b3507e7e814f3c73e18e6bc1293
6a2c7d6faccafe151d7528aec0086dab
正常返回Buffer地址,如果Buffer已经用完则返回NULL
{ u8* addr; _danube_memcopy_device* pDev=danube_memcopy+1; if(pDev->len-pDev->dst_count>0) { addr=pDev->dst+pDev->dst_count; pDev->dst_count=pDev->dst_count+len; } else { addr=NULL; } return addr; }
1
1ca3c327016408fce6db9618d8a17f76
233f761bdabe34f139782446b6ab40dc
Get the version If $part is null, the entire version is returned. If it is a string, the version part is returned. If a part is given and $fromBeginning is set to true, the version is returned from the beginning to the named part.
function version($version) { return app('microservice.url')->version($version); }
0
b8cef3f91564a46a63db229da40a09b8
c7cfef8324568c740f0f665180202f6d
修改需求方案(展示草稿/方案下架)
function updateReqOP() { getObjItemCheckbox(); $.ajax({ async : false, type : 'post', url : urlRootContext+'/require/updateReqOP.do', data : $('#updateRequireForm').serialize(), success : function(data) { alert("修改成功"); ...
1
6d9d0bd155192e6aef36bfcf1e2be034
e0bdfad2c9f55251d7356af692974d15
Appends doc type for the document.
namespace Epub public class Document public void AddType(string type) { _metadata.AddType(type); }
1
6ac5a7eb72591f7339e645a1bda968d9
268e246ea2298006f4acfdf115e17ef6
通过房子图片ID获取单个房子图片方法
public String queryByHousesId1(Integer houses_id, Model model, HttpServletResponse response) { response.setContentType("text/html"); List<Images> images = call.queryByHousesId(houses_id); model.addAttribute("images", images); System.out.println(houses_id); return "proinfo"; ...
0
85e34a08409da07bf718a61824eb9774
9bf099f1623e0fbc29ca43c9d864e355
Print generic usage instructions.
print(("Usage:\n" " set_latency.py [(int) buffer_size] [(int) sample_rate]\n" "Or:\n" " set_latency.py defaults\n"))
1
55d570450a8b4e3c0872653455058ffc
9bd199ade16fdf558095e815468eeee9
Returns whether the message would have been censored based on the kws implemented.
export class Censor private testMsg(msg: string) : boolean { return this.findWord(msg) || this.findURL(msg) || this.findPhoneNumber(msg); }
1
585f93d939a9d09fed30baf82651a9ce
fba9e5c41a707a31485d97ffa7db7598
função auxiliar para imprimir árvore B
void printArvoreB(arvoreb_t *arv) { file_log("Execucao de operacao para mostrar a arvore-B gerada:\n"); section("IMPRIMINDO A ÁRVORE B"); printf(" root => %d\n", arv->root); printf(" num_pages => %d\n", arv->num_pages); printf("empty_pages => "); page_t next_page = arv->empty_pages; while(next_page != -1)...
1
e9b60a53abb55547b81713d5c2077b1e
a58743760389c491de95922b88dc3d56
Select probes with Tms between min and max
namespace PrtgAPI public partial class PrtgClient public async Task<List<Probe>> GetProbesAsync(ProbeParameters parameters) => await GetObjectsAsync<Probe>(parameters).ConfigureAwait(false);
0
e7ffc709e8838feed68736a5f16e2627
703c9299abd84384ea709e851b3a01b9
Changes a Jama project.
kwargs = request.get_json(force=True) kwargs = {to_snake_case(k): v for k, v in kwargs.items()} project = update_project(uuid=project_id, **kwargs) return jsonify(project)
1
2bc66c41cbd3e30f6487034a0607c065
9290eacb60cd9961d38e10130123d7fb
Given a DB API 2.0 cursor object that has been executed, returns a dictionary that maps each field name to a column index; 0 and up.
class DB_Manager(object): def dict_factory(self, cursor, rows): data = {} for idx, col in enumerate(cursor.description): data[col[0]] = rows[idx] return data
0
09caf33753eb7433ad2e49256076c5c6
ed035a23575fff52c121057f82327e14
将设备节点,转成设备列表
class Node(object): def deviceList(self): lst = [] for key,value in self.nodes.items(): if value.isinstance(pr.Device): lst.append(value) lst.extend(value.deviceList) return lst
1
1182b5538b964bcf6840d1d971c83b13
071ae8955631527eb5259f37ecb60b21
Returns the input character
class TKBHit: def GetCh(self): return sys.stdin.read(1)
1
c7aff6f506a40566214dc02d2facd866
a23dd338c7d26ca7841a91e315a8d53e
Invoke Vim autocommands on-demand.
def vim(): from fabfile.setup import vim vim() checkup_git_repos_legacy(config.vim_package_repos, base_dir='~/.vim/bundle')
0
5e57d1897c3240b2e0b0b59edb30078d
ae32582719ce8aeabb5e1d46611c7a83
Populates the setup fees html editor variables select options.
var isStudio = 'STUDIO' == getContestType(true)[0]; var isAlgorithm = 'ALGORITHM' == getContestType(true)[0]; var contestTypeId = getContestType(true)[1]; var billingProjectId = $('select#billingProjects').val(); var billingContestFee = getBillingContestFee(billingProjectId, contestTypeId); if (isStudio || ...
0
2aa096b8a744e03aeaadd04d01b04c02
5b401a36f49e5df3953e3784352d9533
파이어볼 쿨타임 관리
public class TimeBomb_Control : NetworkBehaviour void Update() { if( !c_IsActive ) return; { m_CountTimer += Time.deltaTime; m_CountTimer = Mathf.Min( m_CountTimer, c_CountTime ); float timeInSecond = m_CountTimer - ( int )m_CountTimer...
0
6c85c0d8af623c3a1afdd3f659801984
74e1dc889350d1699da82c6163b4f465
Called to load the AlertMonitor settings (and alerts) from the saved XML file
namespace Halloumi.Shuffler.Forms public partial class FrmMonitorSettings : BaseForm public void LoadSettings() { try { } catch { } }
0
f700bf8aca75c881ed0f21a6823c0d9c
ca90021ece55094237bf357693ea3d00
根据传入的String数组,清除空值,包括""。
String strArr[] = string; ArrayList<String> strList = new ArrayList<String>(); for (int i = 0; i < strArr.length; i++) { strList.add(strArr[i]); } while (strList.remove(null)); while (strList.remove("")); String strArrLast[] = strList.toArray(new Strin...
1
95c3b1c6f4b55db7321975ca38dee040
d62befd92b20fbccdbb549eaffc64725
Analizzatore che effettua tokenizzazione, lowercase, rimozione stopword e stemming.
tokens = self.tokenizer(rawText) filtered_tokens = [w.lower() for w in tokens if not w.lower() in self.stop_words] filtered_tokens = [self.stemmer.stem(t) for t in filtered_tokens] filtered_tokens = [self.lemm.lemmatize(t) for t in filtered_tokens] return filtered_tokens
1
5005d76c35791a8c0069dbafc645cd63
8df33d4d3924b751b13ae0d2ecf82f7d
InjectCommandFactory creates CommandFactory with configured dependencies.
{ $aggregateFactory = new PublicConstructorAggregateFactory(); return new InstitutionConfigurationCommandHandler( new InstitutionConfigurationRepository($eventStore, $eventBus, $aggregateFactory) ); }
0
f27a67ad105c8ab48ecc9fc043ac96d6
c65bc6c21cdbe9003d4cfb9504a35b12
popup a dialog box for yes, no, or cancel choice PARAMETERS INPUT : msg = prompt text nc = message length OUTPUT : ans : 1= NO 0= YES RETURNS : none SIDE EFFECTS : bring out a dialog box WARNINGS : none
getyesno(msg) char * msg; { int x, y, z; #ifdef VMS if (cmdlvl > 0) concb((char)escape); #endif cmsavp(psave,PROMPTL); cmsetp(msg); z = 0; cmini(ckxech); do { prompt(NULL); y = cmkey(yesno,nyesno,"","",NULL); if (y < 0) { if (y == -4) { z = y; break; ...
0
cc30f9253699b1d4893cf99022370330
b8106f03265a45bacdedce7af8c0ffce
组装CPU
public class CpuSources extends Sources{ @Override public Object getSources() { CpuBean bean = new CpuBean(); HashMap<String, CpuPackageBean> cpuInfos = new HashMap<>(); try { int cpuSize = sigar.getCpuInfoList().length; CpuInfo infos[] = sigar.getCpuInfoList(); ...
1
a88fa32b3aaa1ac5f3c2d8f1cbc0033a
f5bd8673392b2e45652a6e7a7b50c0d9
@brief Validates, pops, and returns a signed short argument at the stack top
{ register long l; l = st_lds(SP, n); decSP(max(n, wsize)); LOG(("@s7 spop(), return: %ld", l)); return (l); }
0
c3fe664cda9c5354a7f19c5c8f7d7237
c142f16020d139287874365bd162de5b
获取通道集合键
if (channel == null) { channel = new ArrayList<BigInteger>(); } return this.channel; }
0
85e68fa514b9f23cd76cb44ed7ee251c
3a4e625dfd9765779b98d82e7398dd12
Features: Function get_grad. Description: Test get_grad wrapped with @jit decorated function in graph mode. Expectation: No exception.
sess, _, grad_info, _, _ = self._setup_graph( default_sparsity, 'random', {}, n_inp=n_inp, n_out=n_out) expected_grad, grads_and_vars = grad_info grad, = sess.run([grads_and_vars[0][0]]) self.assertAllClose(expected_grad, grad)
0
19086d478a652670a58bd5c475c5a8b3
11ad37ec31c6fb865cf2741be028dc12
The 'in' operator for dictionaries looks for keys and not values.
def in_(k, dct): ok_((k in dct), NO_SUCH_KEY_ERROR_TEMPLATE % (k))
1
cc786b1a6b45edf18b2fbe7db9adce0b
653fae06d156e6389fed484c4e9fd4bf
定义所有代理方法,并重写原型类型中的对应方法。
function addMethods (source) { var ancestor = this.superclass && this.superclass.prototype, properties = ElyTools.keys(source); if (IS_DONTENUM_BUGGY) { if (source.toString !== Object.prototype.toString) { properties.push("toString"); } if (source....
1
806a1504695a681a18c3e9e696407386
5e03f74924b5fbc416ac1e84e8f8e804
Ensure default tools are always available.
for (const toolName in this.config.tools) { if (this.config.tools.hasOwnProperty(toolName)) { if (toolName in this.internalTools) { return; } const tool = this.config.tools[toolName]; if (!_.isFunction(tool) && !_.isFunction((tool as ToolSettings).class)) { ...
0
6cf5196a5efb202ba4e2cfde60c0c44f
5eba4c8f09d540c82f1801f4014c0e80
Function needed to make the multiple templates selectable within the form.
function templates.SelectCB(sender) templates.SetDefault(sender.Tag) end
0
797d7f5e30ac7229bae3fbccea431611
70fbd18afbd90c9b3cbfc44295c905ca
各説明変数と目的変数の相互情報量を取得する。
num_factors = ys.shape[1] h = np.zeros(num_factors) for i in range(num_factors): h[i] = sklearn.metrics.mutual_info_score(ys[:, i], ys[:, i]) return h
0
7e5b02cc88a57df94140a57978498ade
43dff86cbcf3ad110ebfa5f7e3967fca
input: matrice de adiacenta(cu costuri), sursa, destinatie output: fluxul maxim
def ford_fulkerson(matrix_a_param, source, sink): num_nodes = len(matrix_a_param) parent = [-1 for x in range(num_nodes)] matrix_a = copy_matrix(matrix_a_param) max_flow = 0 while (breadth_first(matrix_a, source, sink, parent)): max_cap = float('inf') s = sink while (s != source): max_cap = min(max_cap, m...
1
1496cb46ac4938a08359bb411ec98d43
c946dd9d3942ccbcf288fab4d98a8fd3
マップブロック内のツリーを巡回する(左上ノードのみ)
{ List<int> level_radius = this.foliage_shape; foreach(int i in level_radius) { crossection(ref map, center,(double)i,1,18); center.Y++; } }
0
70f6bc9928a4dc45520395494e227d73
ee390aa034ac44d7d8e2d31af0015b5f
Converts the given baseName and locale to the bundle name.
namespace ICU4N.Impl public sealed class ICUResourceBundleReader public static string GetFullName(string baseName, string localeName) { if (baseName == null || baseName.Length == 0) { if (localeName.Length == 0) { return localeName ...
1
3191fc09c8efc61fb85272330024ca1d
4854a92d8f038ffc2ab1f2213c3ad27b
Gets quotation for single equity
export class EndPointsApi extends BaseAPI public getQuote(id: string, xINSHURTenant?: Tenant, options?: any) { return EndPointsApiFp(this.configuration).getQuote(id, xINSHURTenant, options).then((request) => request(this.axios, this.basePath)); }
1
1cdd189e861a3fe2b72f5b7fd7260073
71b7205fc1bc1d4508d57acdcbb2822d
Builds the body for an initiate file upload request
MultipartEntityBuilder builder = MultipartEntityBuilder.create(); File file = new File(PATH_NAME); InputStream stream = new FileInputStream(file); builder.addBinaryBody("file", stream); return builder.build(); }
1
67f8aeb72959d7105803a3f7de56f0fd
043be64baa8604015e670c5b4eaffb78
从任务队列中获取任务,阻塞方法,当任务队列为空时,方法不会返回,当前线程将阻塞,等待其他线程往队列中放入任务,在获取到任务后,方法才会返回。 阻塞过程中线程被中断
public class BlockArrayQueue<T> extends ArrayQueue<T> public T task() throws InterruptedException { ReentrantLock lock = this.lock; lock.lockInterruptibly(); try { while (isEmpty()) { notEmpty.await(); } return dequeue(); } finally { lock.unlock(); } }
1
4f427f874f714db1608df317458244ff
79a8a6992041701f872e8690424f4ce1
Get a list of very fast regressors. Returns
def get_recurrent_predictors(): return [ recurrent_lstm, recurrent_stacked_lstm, ]
0
cb0c295b036e3e3056d659b00f08a8d9
c7589d721a2c335aa7370961881eeacb
the data quantity depends on the largest dataset
class Mobj(object): def datasize(self): if len(self.flow)>0 and hasattr(self.flow[0],'__len__'): return len(self.flow[0]) else: return 1
0
70b373c6bb9a1e32448f6de66b4b5d6c
47aaa483117964ccd6446eff8e39dce1
Pengulangan Menggunakan fungsi yang memanggil fungsinya sendiri - Tidak terlalu digunakan hanya contoh
int f_n, f_n_1, f_n_2, n; Scanner userInput = new Scanner(System.in); System.out.print("mengambil nilai fibonacci ke - : "); n = userInput.nextInt(); f_n_2 = 0; f_n_1 = 1; f_n = 1; for (int i = 1; i <= n; i++){ System.out.println("nilai ke - " ...
0
2f26cde0f61d00ec2603d10c7a6d457e
dbdb5727dfe1c93cb9a2a0720b269cfc
通过问题寻找该问题的父子节点
Pick p = new Pick(); List<String> ids = new ArrayList<>(); ids.add(id); List<String> fields = new ArrayList<>(); fields.add("Contained By"); String parentID = getItemByIds(ids, fields).get(0).get("Contained By"); p.setParentID(parentID); List<String> ids1 = new ArrayList<>(); ids1.add(id); List<Stri...
1
a0195a66731557e63dc2d3ed650f3041
9af2f3ee3fe47eba7589757920aa4c80
Get the target path of a link. This function is called when a link needs to be resolved. The core makes sure that the fsw_hfs_dnode_fill has been called on the dnode.
nfs3_vnop_symlink( struct vnop_symlink_args *ap) { vfs_context_t ctx = ap->a_context; vnode_t dvp = ap->a_dvp; struct vnode_attr *vap = ap->a_vap; struct componentname *cnp = ap->a_cnp; struct nfs_vattr nvattr; fhandle_t fh; int slen, error = 0, lockerror = ENOENT, busyerror = ENOENT, status, wccpostattr = 0; ...
0
ad8203795b77fa7fd36df2d1a8208df2
79d7b23f335d286f9ba7367a22a98594
Returns the value of the '<em><b>Y1</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Y1</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
int getBlueY();
0
b778df08ab4f7e27516373ec7c4b610d
704ac77231f689760a7de37a4ea2f138
Devuelve un objeto con la conexión. Según el modo establecido, obtendremos la conexión del SGBD elegido.
Connection conn = null; try { Class.forName("org.hsqldb.jdbcDriver"); if (mode == SERVER_MODE) { conn = DriverManager.getConnection("jdbc:hsqldb:hsql://localhost:" + PORT + "/" + DB_NAME, USER_NAME, PASSWORD); } else if (mode == STAND_ALONE_MODE) { ...
1
15240d0ac2f9066b66302bfa0129be99
93cd83c6cbd693ca9d316ded608a5bd7
create CVAE_ZINB object from exsiting CVAE_ZINB's config file.
if isinstance(cfg, str): with open(cfg, "r") as f: cfg = yaml.load(f, Loader=yaml.FullLoader) assert isinstance(cfg, dict), "wrong object type for cfg={}".format(cfg) return cls( noise_prob=cfg["noise_prob"], noise_types=cfg["noise_types"], ...
1
044df8c9694499a3300289003960c7bc
c4c4625e6eaf40a7ee58de274aff3eaa
Returns all available coupons
class shopYpromosPluginPromocodeSupporter public static function getAvailableCoupons() { return static::factory()->getPromocodeModel()->getAvailableCouponsWith(); }
1
147307e309a11ae1908a52ca765bcd32
ec3029da8000fa0e27d6fb7e73850ec7
更新行业状态
class Industry extends Base public function update() { if (!IS_POST) { $id = Request::instance()->get('id'); $info = Loader::model('SpeechIndustry')->getOneIndustry(['id'=>$id],'id,name,remark'); $this->assign('list',$info); $this->assign('data',$this->getUrl()); ...
0
6657f44a07d1e7620c62f95d7c96f834
a0a68331b3756a1795febe733e3ac3ac
Single cohesive element test for 1-3 shear loading with normal compression
class SingleElementCohesiveTests(av.TestCase): def test_COH2D4_shear_compression(self): self.runTest("test_COH2D4_shear_compression")
1
09a804babbc72271da21fb6b8c209cf2
82dc2e7d703717cefd993b4a6fbb29a2
Cancels the revocation timeout of the member.
namespace DSharpPlus.Entities public class DiscordMember : DiscordUser, IEquatable<DiscordMember> public Task TimeoutAsync(DateTimeOffset? until, string reason = default) => this.Discord.ApiClient.ModifyGuildMemberAsync(this._guild_id, this.Id, default, default, default, default, default, until, reason)...
0
20dca284cff1aeb4b48b89ddc269f19c
21f90a1102cafd1d83489d93e2eac857
Add a single feedback result to the database.
class FunctionResults(object): def add_new_result(self, feedback, earned_points, full_points): self.add_result(FunctionSingleResult(feedback, earned_points, full_points))
0
efbb4164e4ae027da25080d37575e3af
f37e6dde1684eb41d48d1fae40326527
memberSystem.SendValidationEmailByAPI() 回復所代表意義 return 0 : 表示 Email 寄送成功 return 1 : 表示 Email 不能為空 || Email 格式錯誤 return 2 : 表示 Email 已被註冊 return 3 : 表示 UserName 不能超過 15 個字 return 4 : 表示 Birthday 不能為空 || Birthday 不能晚於今日
{ DateTime now = DateTime.Now; if (Email == null || !Validator.IsValidEmail(Email)) { return 1; } Member user = db.Members.Where(member => member.Email == Email).FirstOrDefault(); if (user != null) { return 2; } if (UserName != null && UserName.L...
1
c08c739756a15668a1db02dbfd1711d7
ef186b3e11359267284c9e3eab283821
Set the number of bits used to represent a single component of a pixel
public abstract class Predictor public void setBitsPerComponent(int bpc) { this.bpc = bpc; }
1
5582f658a0deccee2fe2f643eeceb5a2
7c3019b38f91e26416e8d8ac3dd8a5e8
Renvoie les informations d'un joueur correspondant au couple (USERNAME - PASSWORD).
public class ServerConnection public static Player getPlayerOnServer(String username, String password){ try { String md5Hash = md5HashFunction(username, password); String connectionString = domainString + "controller.php?method=login&username=" + username + "&password=" + password + "&request=" + md5Hash; ...
1
6856a4ca6c0b6a3277055210fd8106cd
6299319eb356aa7413accb3036d7ee59
Get one organization field Returns data about a specific organization field.
public class OrganizationApi public ApiResponse<FieldConfig> getFieldconfigWithHttpInfo(String type) throws IOException { return getFieldconfig(createGetFieldconfigRequest(type).withHttpInfo()); }
1
bc3668dfcbf1aab5251601871f56aa82
fd6dedd4b69deed8da7f48af3c8e003d
播放普通攻擊音效
public class EnemyAnimationEvents : MonoBehaviour public void AttackAudioEvent() { AudioSource.PlayClipAtPoint(audioClips[(int)AudioType.attack], transform.position); }
1
6ed7941bab723685babf574ce5563f97
be1d1b7ddbdf73743eb406b392dfad9d
自动弹出键盘 :可能会由于页面未完全加载,无法弹出,所以最好延迟在弹出
if(imm!=null && editText!=null) { editText.postDelayed(() -> imm.showSoftInput(editText, 0),200); } }
1
cc96c4e172aeb8ece3a61f1273f4411c
6a75f0eb53b2e07c71408a1cbbd80a3d
Close and destroy an interface. Equivalent to `uct_iface_close`.
end_iface_scan(struct iface_conf_list *ifaces) { dfree(ifaces->conf.lifc_buf, MDL); close(ifaces->sock); ifaces->sock = -1; }
1
6bffde544037d5f45b5326f01748c614
edf09b44e228777fa74f2b890f4b7cfe
Делает все категории видимыми в меню.
namespace mprTools.Commands public static class ShowHideHelper public static Result ShowCategory( ExternalCommandData commandData, string name, string contains, ViewGraphicsOverrideType graphicsOverrideType) { try { if (BlockedByCurrentViewTemplate(command...
0
529ab529abd5d0dcbe48b25035028498
1aff436efd73614d8e774b8dee8ef9e5
Returns the service responsible for rendering the blueprint data.
def getRenderer(): return __renderer
1
467da87c9d57aa2e7ca291dd42335847
8b8d0e8bc3359a581eb2763db5805545
Load Default reporting configuration from generated table
{ $default = array(); if($this->isReportWidx($reportID)) { if(!Config::getConfig(MOD_RNANS_ENABLED)) { return $this->getResponseObject(array(), 'is_array'); } else { return $this->getResponseObject(ar...
1
4e1f30d1281ba4ff8d541374848d1351
8cc8e59ec98fba8af8192e29bb540cc1
Guardar un objeto Transporte Empresa
void updateEmpresaTransporte(EmpresaTransporteDTO empresaTransporteDTO);
1
c2b69608ededfaee9d3288cf3d2a53ca
9693a21e89812c9ce87e2080163c2d09
Tries several methods to get the MIME Content-Type of a file.
if (function_exists('mime_content_type')) { return mime_content_type ($filename); } else if (function_exists('finfo_file')) { $finfo = finfo_open(FILEINFO_MIME); $mimetype = finfo_file($finfo, $filename); finfo_close($finfo); return $mimetype; } else if (!ini_get('safe_mode')) { return...
1
7f275f61888543511a7b807a73e03ed6
cb0e29746ecc867fce49d826514afe37
The kernel preference of the session.
class _BackendServiceState: def session_affinity(self) -> Optional[pulumi.Input[str]]: return pulumi.get(self, "session_affinity")
0
484476ef23c01000eb8e53f6871cfc45
3927d6af01a1e794c59a9673db6533c1
네이버 로그인 callback
console.log(' naverLoginStart ed'); NaverLogin.login(initials, (err, token) => { console.log(`\n\n Token is fetched :: ${token} \n\n`); this.setState({ theToken: token }); if (err) { console.log(err); } }); }
1
05414fa3fb766b2f3562b0886c48df59
1aa2f793361bdb4338248205656935ed
Mostrar las entregas en curso.
document.querySelector("#divEntregas").style.display = "block"; document.querySelector("#divEntregas").innerHTML = `<table id="tabEntregas" border='2px' style='background-color: #FA047F; position: relative;'> <th>Alumno</th><th>Nivel</th><th>Título</th><th>Audio</th><th>Corrección</th><th>Realizar devolució...
1
5e34b28596c962eabd192f584f110211
6598e8dcbd9e47e7317f2d5695b9974c
handler for editing a specific version of a recipe
editExistingRecipe = get_object_or_404(RecipeModel, pk=nameOfMeal) if request.method == "POST": form = RecipeForm(request.POST, instance=editExistingRecipe) if form.is_valid(): form.save() else: print("Form is not valid") return redirect("index") form ...
1
20caea7dc9e0b7b38bac0f4de464a656
8c039603ef05725899761b945c8c10c9
Returns the index of the Zinc column
public class IndexSchema public int getColumnNumber() { return indexedColumn; }
0
c8a29e464fbeff685db5bd8b15d2d575
7f980eab9fdd6e673747615e11a78c76
Creates a data exchange endpoint for local disk
public Exchange dlxExchange(){ Map<String, Object> args = new HashMap<>(); DirectExchange exchange = new DirectExchange("deadExchanger", true, false, args); return exchange; }
0
59b2b577d7d2cec3b72aa79c7fbb1cdd
c57f04b0e88ee75a26d543e5a8639f12
Retourne la réference du produit
class Item extends AbstractEntity public function getReference() { return $this->reference; }
1
76e0d6e16abde62f3e5f5024a2b7ba92
5bdeb971af862d829dab0617f2c1f474
Returns the mean of the values of the array z.
{ if (points != null) { if (points.Length == 0) return 0; double sum = 0f; foreach (Descartes3DCoor pt in points) { sum += pt.Z; } return (sum / points.Length); ...
1
f8b1048fe5679bf20b4c6a09f28bc842
c7267455d12286cbc546ffd1ee34a649
功能:每次查询用户的日志,根据提交的语种,返回相应的语言信息 说明:因为老版本的zoam日志,每一条日志的log_desc字段信息都需要翻译 这样每种类型的日志都需要翻译一遍,太麻烦,但是在不改变数据库表的 的结构类型下,只能仿照老版本zoam的translateSysLog.php里面的信息 翻译. 但仍然需要多种情况 参数:直接总数据库查询的日志表数组 array() 返回:array()
class TestSelector: ##This variable refers to the length of time backwards that the user's cognitive test performance records will be queried, default value is 15552000000 -3 months def getUserLanguage(self,username,res): serv_topic = rospy.get_param('rapp_mysql_wrapper_user_fetch_data_topic') knowrob_servic...
0
7ade6255f6d83941b9ce44226786b308
f1d5e29b67213e63cf84bff73c4d9624
Get the value of the PromotionDiscount property.
class PayPalStructPromotedItemType extends PayPalWsdlClass public function getPromotionPrice() { return $this->PromotionPrice; }
0
b94112c45d23fe584cc0473b3ceb24f0
d3e29845a31342d7ddbadfb3aa752b3a
Возвращает список доступных формул расчета с периодами действия, доступных для расчета заданной услуги, оказываемой заданным поставщиком
namespace Bars.Gkh.RegOperator.DomainModelServices IDataResult ListAvailableSources(BaseParams baseParams);
0
085386e801cdf5ad41e8b783f1208f12
5ad8c4253defb95cd0e67bd591cf5fd4
spawns the random object on the random point
public class RandomSpawner_Target : MonoBehaviour public void spawnObject() { randomGameObject = Random.Range (0, 5); Vector3 pos = centre + new Vector3 (Random.Range (- size.x / 2, size.x / 2), Random.Range (- size.y / 2, size.y / 2), Random.Range (- size.z / 2, size.z / 2)); Instantiate (spawnObjectPrefab[rand...
1
01251c1af26ebd11891061be633334ba
462024bfad5f05007783811f77d929b6
Get Price Tax scope
abstract class Innoexts_Zone_Block_Adminhtml_Catalog_Product_Edit_Tab_Compound_Renderer_Abstract extends Innoexts_Core_Block_Adminhtml_Widget_Form_Element_Renderer_Abstract public function isWebsitePriceScope() { return $this->getProductPriceHelper()->isWebsiteScope(); }
0
e9a86cb00df89a3eed363e90a9adc166
f115af9da8fb6ab9e49e1826a8ca8f76
Tweak stock control surfaces for sane behavior
try: env = api.Environment(cr, SUPERUSER_ID, {}) mto_route = env.ref('stock.route_warehouse0_mto') mto_route.write({ 'name': _('Make To Order'), }) mto_route.with_context(lang='en_US').write({ 'name': 'Make To Order', }) warehouses = en...
1
6b63c1e7899a7603afa9eb89d5a0176f
e127a508546bf8dd7bd5925e84af2e0f
True = carry False = no carry
bool RegisterFlags::isCarry() { return isSet( FLAG_CF ); }
1
8b490c3d0ba054964ead6c2467915b43
2788db8d907ebaa07039216b74da2bcd
Create the disconnection screen
return this.h("main.container", {role: "main"}, [ this.h("div", {class: "alert alert-primary center-block mt-5"}, ["Disconnected"]) ]); }
1
de8daecc45bd7277a74551afaabfdcc8
f6b20fe2b0a9fa14f3d1c2603357513a
设置包名,如SceneOne/test.prefeb
public class AndroidTarget public static final class Builder public Builder packageName(@NonNull String packageName) { this.mPackageName = packageName; return this; }
1
ac37cf974872a77859c0f971e519dc7f
f50b955aec80c72cd368edc246c8066d
callback function to read png image
void PngUtils::pngReadFileCallback(png_structp pPng, png_bytep pBuf, png_size_t len) { AAsset *pAsset = (AAsset*)png_get_io_ptr(pPng); #ifndef LIBPNGDEBUG_MACOSX AAsset_read(pAsset, pBuf, len); #else fread (pBuf, len, 1, pAsset); #endif }
1
000c9986c37be3dbb4b80ea9aba43a1e
7ffb581fd7bd18f4e2ebbe97d6f952d1
Valida se deve adicionar o link ao XML
{ foreach (var format in WrongLinkFormat) { if (item.Contains(format)) { return false; } } return true; }
1
295ed5aa5ff19ef10632e56c3ad1e49d
c7cf7e5b615fb0f5739dfbae94c37df6
点击PlayerMember按钮处理事件
namespace gm public partial class Gm : AGmPage protected void vipButton_Click(object sender, EventArgs e) { }
0
86f232bb8fb0f72cf1efbc62c48725f2
a130b8decf7bb0536531554408e07677
Convert command parameters and call backend samples method with actual parameters.
class CommandMethod(CommandProtocol): def call(self, args: Dict): return self._implementation(**args)
1
18b26e87bb5e39131feb5185e7c82a7d
002e414414989f7450da21cad2164c2c
Create an instance of {@link RetrieveAllForIteration }
@XmlRegistry public class ObjectFactory public GetAll createGetAll() { return new GetAll(); }
0
dc3e369627317c8b59119e1065e94b62
1f30e54a36ffbe8ea20bdf8de0d4fb20
Returns the workbench part which contributed the current contents of this view.
IWorkbenchWindow active = PlatformUI.getWorkbench() .getActiveWorkbenchWindow(); if (active == null) return null; IWorkbenchPage page = active.getActivePage(); if (page == null) return null; IWorkbenchPart part = page.getActivePart(); if (part == null) return null; return (ExtendedMarkersView...
1
7172584eddebb378bbb12189e9186c47
5d9f7fb00f0fd251f962db79897de920
Returns a registered {@link PageSetConfig} instance corresponding to the specified key or <code>null</code> if no configurations were found for the given key. key
public class PageSetConfigRegistry public PageSetConfig getPageSetConfig(String key) { synchronized (fRegistry) { return fRegistry.get(key); } }
1
8a9f666ec0161808eedb8ec519612f53
483d6cbe5a9824cbac4ec6fc136e9b23
get delay between atempts for index initialization during start up process
@Configuration @ConfigurationProperties("spring.dataenvelopes-api.elasticsearch") @EnableConfigurationProperties @EnableRetry public class ElasticsearchDataEnvelopesAPIConfiguration public long getIndexInitialization_RetryDelay_Millis() { return indexInitialization_RetryDelay_Millis; }
1
449cf3163de78fac95cddfdeb1e7957d
af6f225468294b09df33b5182c3f9461
@brief Recording task that takes samples from audio and places them into buffer queue
{ finish_buf_t finish_buf; struct timeval cur_tv; while(1) { xQueueReceive(audio_info.queue_ready, &finish_buf, portMAX_DELAY ); gettimeofday(&cur_tv, NULL); if(audio_info.notice) audio_info.notice(finish_buf.pbuf, finish_buf.size, cur_tv); xQueueSendToBack( audio_info.queue_empty, &finish_buf.pbuf, port...
0
59c3b97333ea3055abe924eb0170a226
e4f4e045815f5be9d1db1945115b769f
A utility to process a `difflib.unified_diff` header.
diffopts = patch.diffopts(ui, {b'noprefix': False}) stats = patch.diffstatdata(util.iterlines(ctx.diff(basectx, opts=diffopts))) maxname, maxtotal, addtotal, removetotal, binary = patch.diffstatsum(stats) while True: yield stats, maxname, maxtotal, addtotal, removetotal, binary
0
bb18a476f79665acfbff904f3f5183f9
45ef6a56fec68daf9eb31f5bca86c269
check if the video etags are different.
if (prevProps.videoId !== props.videoId) { return true; } var prevVars = prevProps.opts.playerVars || {}; var vars = props.opts.playerVars || {}; return prevVars.start !== vars.start || prevVars.end !== vars.end; }
0
40a1a8a0b029356f2cafdd5f56a60066
75bcd9a901d866d02de4e8b661db8541
A method that returns the current mean fitness.
class PSO(): def get_current_fitness(self): return np.apply_along_axis(self.func, axis=1, arr=self.X)
0
087a778b22b49fbc543ee42d375ebf98
df4235a79572c9dbe737a1e637aa49ad
查询IAM用户的登录保护状态信息列表 该接口可以用于[管理员](https://support.huaweicloud.com/usermanual-iam/iam_01_0001.html)查询IAM用户的登录保护状态列表。 该接口可以使用全局区域的Endpoint和其他区域的Endpoint调用。IAM的Endpoint请参见:[地区和终端节点](https://developer.huaweicloud.com/endpoint?IAM)。
public class IamClient public ListUserLoginProtectsResponse listUserLoginProtects(ListUserLoginProtectsRequest request) { return hcClient.syncInvokeHttp(request, IamMeta.listUserLoginProtects); }
1
d4740f9d2e563bca85ea203a4a2702f8
3c7b0bdbe152a8f722fd2acc11ee6df3
function to count the number of odd numbers
var i; var temp; var count = 0; for(i=0;i<array.length;i++){ temp = array[i]; if(n<temp && temp%2==0){ count +=1; } } return count; }
0
0f66aaf84138e9c9ad76f2088c6ac2ed
d443d135939debd11f7f6dae76a11579
二次验证登录
new SecondCheckDialog(this) .setMobileInfo(mobile, area) .setTyfType(tfa_type) .setOnConfirmListener(new SecondCheckDialog.OnConfirmListener() { @Override public void onConfirm(SuperRequest request) { ...
1
76ad7bfc12f80a68f1ae8f0c2f6383a8
b20f053c6ea55bf28f490e7082ec4897
Sets the currently active node (view), and activates the view (displays cached information in the view browser).
{ Clear(); if (session == null || !session.Connected) { return; } Browser browser = new Browser(session); browser.BrowseDirection = BrowseDirection.Forward; browser.ReferenceTypeId = null; ...
1
14c23297f1012267b92590a152ce9a8b
41136986cf8ef66e81c792d7404c24e1
Simuluje vlastní chod servisu. Vaším úkolem je její implementace. Funkce vytvoří vlákna pro jednotlivé automechaniky, zajistí jejich synchronizaci a ukončení. Rozhraní funkce je následující:
Simulation::Simulation() : _scheduler(SimulateScheduler()), _proxy(SimulateProxy(&_scheduler)), _servant(SimulateServant(&_scheduler)) { _servant.runThread(); }
0