query_id
string
corpus_id
string
query
string
code
string
label
int64
0d5eec16680f700439d1aa4274005910
653ea27ab453b7382cf7bdc07766c6da
Cancels notifying recording error
void CancelErrorRead();
1
3b75a260e7738dab4d5d7baac4b9bb05
d07701c655d5edf6f6461243cd71a7cb
页面大小改变,jqgrid作相应改变
window.onresize = function doResize() { var ps = pageSize(); $("#" + gridTableId).jqGrid('setGridWidth', ps.winWidths - 25).jqGrid('setGridHeight', ps.winHeights - 180); } }
1
2ece19b592f0b0588e859500d03b7d7e
518673563c974b844b2851af7fedb2ae
Регистрируем сервис воркера
class WsServer extends Component implements BootstrapInterface public static function initRegisterWorker(){ $address = Yii::$app->wsserver->registerConfig['address']; $register = new Register("text://" . $address); }
1
ad5f6ea71fbdf15dab58331905ce7d06
51f98b68596fc1181dd07b27b32a61dc
当前文件相对路径
public class FileUtil public static String getFileRelativePath() { return bundle.getString("file.relative.path"); }
1
4d76e10d7855f7417702f1deff0b5b31
65674ff479ebceea8a8e369b75ccabc8
Tasks to handle after posting a message. An identifier for the current form. This must be the same form id as the one that was used when calling {@link spamhurdles_api_init()}.
class MailService public function afterSend($message, $is_successful) { }
0
7100c7618604b3314351baaace291682
e066e701f26917fd5c2282e02e52831e
년도 와 달을 입력 받아서 달력 출력
function showCal(yyyy, mm) { CreateHeader(); let today = new Date(yyyy + '-' + mm + '-01'); let firstDay = today.getDay(); today = new Date(yyyy, mm, 0); let lastDay = today.getDate(); tr = document.createElement('tr'); for(let i = 1; i <= lastDay; i++) { td = document.createElement(...
1
06d50cb22d35cef8780867443d0cd24b
144ac463bf88c63ff2ac2efe18939fb6
获取阵营索引对应的地块索引
function M:indexToPos(fId,index) local formation = "" if fId == 1 then formation= "2,4,5,6,8" elseif fId == 2 then formation= "2,3,4,5,7" elseif fId == 3 then formation= "1,2,3,4,5" elseif fId == 4 then formation= "2,3,6,8,9" elseif fId == 5 then formation= "1,4,5,6,7" els...
1
2670a35c7f111fde57aac66b9e4eb94e
276da006039095513c5863feeaad163e
Adiciona um panel para os botões, necessário para posicionar botões ao lado do outro
{ Button btn = new Button(); btn.Text = n; btn.Dock = DockStyle.Bottom; btn.Size = new Size(100, 50); btn.FlatAppearance.BorderSize = 1; btn.Font = new System.Drawing.Font("Arial Narrow", 10F); btn.FlatStyle = System.Windows.For...
0
b54771ab674b4e9c9980bf2756356d48
d6aef64bb79bb6815a757f1f6f784843
Plots and shows the point. The `color` attribute can be any of r, b, g, c, m, y, k, w. See the matplotlib doucmentation.
if len(self.fig.axes) == 0: ax = self.fig.subplots() ax = self.fig.axes[0] ax.scatter(x, y, c=c, **kwargs)
1
7cd123dfa46b07dd5fa00f0e1a4f3b45
0f44bfdc9c5bb4d83faac5e4e78952a0
Find the Hops that provide the bitterness in this recipe
if self.file_type == 1: hop_path = "./order" elif self.file_type == 2: hop_path = "./hops" for hop_elem in xml_root.find(hop_path): self.hops.append(KettleNode(hop_elem))
0
75bea7948571de8a828ce13216ba58b9
b56a9401b21b11693879f1c9f618e647
finding the minimum of the given heap
{ HeapNode *x = NULL; HeapNode *temp = T->root; int min = __INT_MAX__; while (temp != NULL) { if (temp->key < min) { min = temp->key; x = temp; } temp = temp ->next; } return min; }
1
320fa510c20b1f7a095dd0fbbe4693f2
9e155f6384d89e294bc9f8ab93ba208f
根据IP获取该条IP记录.
class Ip2locationRepository extends AbstractRepository public function getIpData($ip) { return $this->search(['ip_from'=>ip2long($ip)]) ->order(['ip_from','desc']) ->result_one(); }
1
40ac6a43c5a5513f273a73e2c8a99306
038c831ed6210ed68121b7a70a8b4082
Attach a template portal as content to this keyboard container
export class OuiPanelTrigger implements AfterContentInit, OnDestroy private _getPortal(): TemplatePortal { if (!this._portal || this._portal.templateRef !== this.panel.templateRef) { this._portal = new TemplatePortal( this.panel.templateRef, this._viewContainerRef ); } return thi...
1
0482eb6f61a283c830461df84aaa482d
de51397dfa64c442c846bd1449698c05
init the display with commands in dsp_command array
static void ili_init() { int cmd=0; gpio_set_direction(LCD_PIN_NUM_DC, GPIO_MODE_OUTPUT); gpio_set_direction(LCD_PIN_NUM_BCKL, GPIO_MODE_OUTPUT); while (ili_init_cmds[cmd].databytes!=0xff) { ili_cmd(spi, ili_init_cmds[cmd].cmd); ili_data(spi, ili_init_cmds[cmd].data, ili_init_cmds[cmd].d...
1
a34645475d90921908098743ea672500
83700479942ac0be4208657b1aa2d9a6
An :class:`EnvironMixin` for wsgi requests.
class Request(object): def __init__(self,env): self.raw_env = env self.request_method = env['REQUEST_METHOD'] self.posted_body = None self.path = env['PATH_INFO'] self.url_vars = {} if env['QUERY_STRING'] == '': self.query_dict = {} else: s...
0
6d49bb29ba366976534cee1a2f2150b3
6e5e6ee857b1005027fef2ad2df7921e
Function for forming constructor initializer
class Node: def ctor_init (self, hide): indent = " " * 4 init = indent + ": " first = True for sup in self.super: if not first: init += ",\n" + indent + " " init += sup.name + " (" + sup.ctor_args (hide, False) + ")" first = False for a in self.attributes: if hide and a.hid...
1
59b04e3568b57f468a6f8d54ecb0e7b3
3441858b5ad5ff7a08012a4e591e14e8
Customize logging by specifying the function the ProvisioningApi should use to log its activity. For example, on API calls or CometD notifications.
public class Configuration public static void setLoggerProvider(Function<Class<?>, ? extends Logger> provider) { loggerProvider = provider; }
1
b622fcc5981086da2abe4fc8d33cb0b5
558549d9a9fbee6db9a210ab298a1952
保存库位信息
{ $time = time(); $user_id = $this->session->get_userdata()['user_id']; $info = []; if (!empty($data['location_id'])) { $this->get($data['location_id']); $where['location_id !='] = $data['location_id']; } else { $info['create_time'] = $time...
1
9361d7e25eb9bc6c95362e9c015cfe4c
6700b0cf6428eafbb91889b8d9c70509
Uses Eevee for viewport shading in LookDev shading mode
scn = context.scene for area in context.screen.areas: if area.type == 'VIEW_3D': space = area.spaces.active space.show_textured_solid = True if scn.render.engine == 'CYCLES': area.spaces.active.viewport_shade = 'TEXTURED' elif scn.render.engine == 'BLENDER_RENDER': area.spaces.active.viewport_sh...
0
0726451da66bdff0f14aa67bb27c0efb
ccc50ca13266766f9e910c3c057d1084
新增卡塞
class Control_OperationFRG extends BaseGm public function actionAddCard(){ if ($this->_isAjax()){ $this->_utilFRGInterface=$this->_getGlobalData('Util_FRGInterface','object'); $this->_utilFRGInterface->setServerUrl($_REQUEST['server_id']); $sendParams=Tools::getFilterRequestParam(); $this->_utilFRGInterfa...
1
846c897e6114d9a9194b8cabcadd0351
33fd6e84abfd7e824320c90651c1d70f
Function Synopsis [Sets the maxCacheHard parameter of the manager.] Description [Sets the maxCacheHard parameter of the manager. The cache cannot grow larger than maxCacheHard entries. This parameter allows an application to control the trade-off of memory versus speed. If the value passed to this function is 0, the...
{ dbg_err_if (opts == NULL || max <= 0); opts->max = max; return U_HMAP_ERR_NONE; err: return U_HMAP_ERR_FAIL; }
1
80ae01e26c4f5e52126e42e823039a1b
0d1c738db6647ea8038a09addd2fa3f7
Получает оставшийся заряд батареи в %.
namespace NotifierForPreventOvercharging public partial class NotifyIconWrapper : Component public int GetButteryPercentage() { var managementClass = new ManagementClass("Win32_Battery"); var managementObject = managementClass.GetInstances(); var butteryPercentage = 0; ...
1
c0020a1b280d05e0e922e917376a025b
5e996b30130eaf32b8fdae006ea09d96
获取营业执照号
public class ViewMerchantResult extends AbstractModel{ public String getBusinessLicenseNo() { return this.BusinessLicenseNo; }
1
a102bc9dc097da0a89ec182f016d9488
6755de3fb82e333aff84a8089f6b3d99
@brief Transform factory.
BlendTransform::BlendTransform(){}
0
acf98d8ba383d959f304f8f775415a92
ace260bd1f0e980aa8fe0ba49c3dd3a5
We want: 1. A different request 2. That is for the same cat. 3. That overlaps.
CatRentalRequest .where.not(id: self.id) .where(cat_id: cat_id) .where(<<-SQL, start_date: start_date, end_date: end_date) NOT( (start_date > :end_date) OR (end_date < :start_date) ) SQL end
1
778dbc6f6ebd119b9440274cbc011dcb
1c2aee07fb485741d136f689538eedfa
대용량파일을 삭제 처리한다.
@Slf4j @Controller @RequestMapping("/file") public class FileController @ResponseBody @RequestMapping(value="/remove.java6", method=RequestMethod.POST) public void remove(BoardFileDTO boardFileDTO) { boardFileServiceImpl.removeOnlyFile(boardFileDTO); }
0
fd2b1987b3c3886661cb1de7fd318fa8
4af82b3bd2e644e12cb435bdc6da2e1d
Gets the configured name prefix for given definition.
class WorkflowDefinitionType extends AbstractType public function getBlockPrefix() { return self::NAME; }
1
ac3129af9c05cdf16cbb8c977c54c053
3babad231406dc4f31c34dd7d088e0c2
small 'info' tweak: for `,`, report tactic state at following token instead
impl<I: Iterator<Item=char>> Parser<I> fn try_insert_semicolon(&mut self, offending_token: &Token) { if offending_token.preceded_by_newline || offending_token.kind == TokenKind::RightBrace { self.insert_semicolon(); } }
0
ad8b3e9f189167e035ad1fd873ab371f
8936c8e8e3dfefeba9b5bb048e91c3ae
Initialize the window object given its width and height.
self.reset() self.width = width self.height = height if height >= width: self.pixelSize = math.floor((self.cHi-2*self.padding) / height) else: self.pixelSize = math.floor( (self.cWi-2*self.padding) / width) self.create_rectangle(self.padding, self.padding, self.padding + width*self.pixelSize,...
1
b786b96e28f780c7bb8798729224ef8e
7f4e4112266f4c0e38c5c1e31b491016
inserimento in CODA - su lista dinamica singly linked
if (!testa || testa->num > n) return inserisciInTesta(testa,n); testa->next = inserisciInOrdine(testa->next,n); return testa; }
0
b500c2b11824843a618549b6925c3906
9799d5bbdb9f3cfd6232e75e9f488700
查询某一会议的所有参会人员id
@SuppressWarnings({ "serial", "rawtypes" }) public class MeetingRecModel extends Model<Model> public List<Model> getUserList(int meeting_id) { return MeetingRecModel.me.find("SELECT" + " r.rec_user,u.user_name " + "FROM" + " xip_moa_meeting_rec r," + " xip_moa_user u " + "WHERE" + " r.rec_user=u.user_id" + " ...
1
49d6bb4c36a879ce1558e98af20668c6
51628027bb6d22ec12d455c61386b95a
Implemented method from IAnimatedEntity. Set the animTick field to the tick in the parameter.
namespace EC_Proto abstract public class Entity virtual public void AnimationTick() { }
0
c988b1044f9c6a32dbf286406b835faf
2ecab3b966bd602013f5bf30a4d89f65
6) Programa una función para contar el número de veces que se repite una palabra en un texto largo, pe. miFuncion("hola mundo adios mundo", "mundo") devolverá 2.
def wCount(word): wlist = [] for wd in text.split(): wlist.append(wd) cnt = wlist.count(word) return cnt
1
adf05950efcec81650147ef43888c07f
8ef0eb05e070e081d9c4544334effa46
controls the respawning of the character
public class playerHealth : MonoBehaviour IEnumerator respawn() { respawning = true; transform.position = respawnPoint; health = maxHealth; movement.stop = true; yield return new WaitForSeconds(5); movement.stop = false; respawning = false; }
1
ea58ae615703fedc04b10512d76c0ad5
b5a7b8b4aa39ab7bf954f4427e88be19
获取授信历史
info('GET').then(res => { blank_my_detail_content = res.data; if (res.data.credit_status == '授信成功') { getInquire_lending(); if (localStorage.getItem('bank') != 'true') { localStorage.setItem('bank', 'true') $('.bank_index').css('display', 'none') } } else { if (localStorage.getItem('bank') ==...
0
08005068f9b379762155ccd143c936ea
52a3c161b0dd14d7af9c4c02df251ce3
Determine whether this interval intersects another.
boolean contains(IInterval<T> otherInterval);
0
a619afffd581db8306160bdd52ede18e
3e9de67a3493ad869bc3c5f2612e4129
Obtiene el nombre del propietario del certificado
class CvCdoComparendo public function getPropietarioNombre() { return $this->propietarioNombre; }
1
6e02455c45beff105386c4a202e6bf80
f9666b0785cad456d299138a83f202f2
Matches strings of letters and numbers.
def strings(text): return re.findall(r'[A-Za-z\d]+', text, re.ASCII)
1
adf593aa21f80b30d0a95f0904b5ec60
c8fc3a93b0918ccddc16dc9a358eacbe
保存领取奖励数据
receiveawards (context,value) { context.commit("RECIVE_AWARDS",value); context.commit('SAVE_GAME'); }
1
cb60b35007001e1b5feeffa2e3c51659
c0a940c87240deba52325977e34ffd4e
Edit Grease Pencil strokes instead of viewport data
export class View3DOverlay public set use_gpencil_edit_lines(value: boolean) { PythonInterop.setBoolean(this.interop, `${this.accessor}.use_gpencil_edit_lines`, value) }
1
894a0b19604b1b897d270df09d820dc1
6da2d2142862853e5be7f97d1229dcbd
Tekee tietokannalle kyselyn.
class Tietokantakasittelija: def kysymysten_maara(self): maara = self.database.execute("SELECT COUNT(*) FROM Kysymyksia").fetchone() return maara[0]
1
e20276348e7fc90334605858df1197b2
96acfd5580d3fa1bf2c370b24ba69e25
read data from file and set default value to edit text views
sharedPreferences = getSharedPreferences( getString(R.string.preference_file_key), Context.MODE_PRIVATE); editUserName.setText(sharedPreferences.getString(getString(R.string.key_user_name), "")); editUserPassword.setText(sharedPreferences.getString(getString(R.string.key_user_pas...
1
fc976c0780cd392498248d0e2d772f82
fd85e8f1e5e6044465521dd939d17a8d
Reads user inputs from keyboard and assigns them to variables, does some tweaking to make them easier to work with later on. No values returned
incub = input("What is the incubation rate? ") infec = input("What is the infection rate? ") R_not = input("What is the R_0 factor? ") N = input("What is the total population size? ") return incub,infec,R_not,N
0
44603126d602d684ee3be23e5a72f2f7
3a72b4d3e4a18d1daeaa656564a670b5
Converts to form required by Dynamic Linq e.g. "Field1 desc"
namespace ComLib.Data public class OrderByClause public override string ToString() { return ToString(false, "[", "]"); }
0
fc6b05cb682dc3ead0c9e47fc9a79ee8
d9042a4e0c63a7fe060598543054e99e
---------------------------------------------------------- process search using field selection and search criteria ----------------------------------------------------------
namespace IOER.Admin public partial class QueryMgmt : BaseAppPage private void DoSearch() { int selectedPageNbr = 0; string sortTerm = GetCurrentSortTerm(); DoSearch( selectedPageNbr, sortTerm ); }
0
08da0283099fbe773db485d7978a5a12
258c792101f1cf6d39aee5fba1c08127
测试springSecurity的BCryptPasswordEncoder加密
protected void configure(AuthenticationManagerBuilder auth) throws Exception { PasswordEncoder encoder = new Pbkdf2PasswordEncoder(this.secret); System.out.println(" ------> " + encoder.matches("123456", "7cf6a3ddba50a6d0341270933922f8ef49a8ae459cea6a8ae715d211e2664ad1d007bdfdadc7830b")); au...
0
aea8179509825ee2bc0edc8656c2734f
37fd20cf5ad458cb167c0cff9468d4d6
Compute the value of a variogram with an exponential model
double X2 = 25.0){ double Vo = vmax_gl * ((1 - A) * exp((Rmax - r) / X1) + A * exp((Rmax - r) / X2)); return Vo; }
0
003e7c35fc64009eefcf446b17a5d034
cb635297f5fd9a6effbbebdd9c413891
Determines whether this instance is in gated room.
namespace NetMud.DataStructure.Base.Supporting bool IsOutside();
0
2cf4b4c9b85bbf2bdf28ecdb7d8e89f7
f5c2a21ef8e2a4c39477ef1d476f9ea7
获取最大的红包序列号值
public int getMaxSequence(Map<String,Object> params);
1
83b8a14575c265baec44416cc1c48ebf
0aab1f01501cef1d5416d2966aec15e4
Test errors thrown by binary operations.
point_binary_operations(0, 0, 0.0, 0.0) point_binary_operations(0, 1, 2.5, 3.75) point_binary_operations(0, -2, -2.0, -3.25) point_binary_operations(-10.5, 9.0, 4, -6)
0
0eb3bd9b3c3c16f0f4c09b6f611035c3
83bf98c85a007b033b6e94473203295b
Returns true if inner result set has current row.
{ if (!isset($this->rs)) { $this->doRs(); } return in_array($this->currentKey, array_keys($this->rs)); }
1
eb7af63d1041801057e102f165dc8fbd
2f0e046ab8f99d95d13f2efc5c5d6fed
Sort by inheritance.
let diff = info.left.schema.sortOrder - info.right.schema.sortOrder; return diff <= 0 ? left : right; }
0
3949eff634a8b9be23cfba6e2be9a2db
048e203a8e11741527bdeea4b02a01fb
Returns distance from start (0,0) based on the location the drunk ends up in
{ if (location > start) return Magnitude; else return 0; }
0
584890162e1b5cd80122865ad56a2c54
83625e0828e72a7daa9cb0b4cbe78e70
Create Identifier with keys that have no data
impl Keys pub fn none() -> Self { Keys(0x00) }
1
33dda491a9dc155331f60db5705f4046
46b857499f8dcba2973c28d269d4ca14
Return the textureID of a texture. If the requested texture doesn't exist, it will load it
{ for(TextureMap::iterator it = mTextures.begin(); it != mTextures.end(); it++) { Texture* pTexture = it->second; if(pTexture && pTexture->mPath == path) { pTexture->mRefCount++; return pTexture->mID; } } Texture* pTexture = new Texture(); size_t convertedChars = 0; wchar_t wpath[1024]; mbsto...
1
c7c563511336dd487d61d5801cd1ff13
07eb07e6cfc88a4122b3fff765f84dfa
更新平台用户的防沉迷信息
void updateUserZfss(Map<String, Object> map);
1
a78168efebf2b4f8c5e5b58de96052a4
c1cb049f00941d75a27869b69dc73137
获取所有 JOB 平均运行时间
long value = -1L; if (getMetrics() != null) { value = getMetrics().getAverageTimePerJob(); } return Long.toString(value); }
1
54a685737a70a266da1400b0dce19bd8
2afe1ab7f22e71d72a47a1fba8403da7
分页查询WebAd
@Controller public class ArticleSpread @RequestMapping("/queryAdPage") @ResponseBody public Object queryAdPage(int page,int rows,Advertisement a) { JSONObject json=adverservice.queryAdPage(page,rows,a); return json; }
1
ecd07f479223f02c49f8047060b472b1
27be295ac9de1a7e5b9d18b69be212da
don't send any context information
class GloveKB(KnowledgeBase): def _extract_relevant_context(self, sent, base_word): return ''
1
3fe5cbd40d8f783b25862cbaff1dea93
addac1e1a968f0b11d1680059ca89752
The preset throughput of the File system. Valid values: `1` to `1024`, Unit: MB/s.
class FileSystem(pulumi.CustomResource): def throughput_mode(self) -> pulumi.Output[Optional[str]]: return pulumi.get(self, "throughput_mode")
0
eb8261ed67a82506dc0e7154aa6dbcb2
a488f54c4adeb3dbed454b8c01309063
Method to retrieve Java FX GUI components.
tabPane = (TabPane) loginScene.lookup("#tabPane"); borderPane = (BorderPane) loginScene.lookup("#borderPane"); pane = (Pane) loginScene.lookup("#pane"); toolbar = (ToolBar) loginScene.lookup("#toolbar"); }
1
4a5760adc86222435759dccbabd5be15
f81e8ac15e37d147ae9d4d2bcb6aa438
Calculate root ItemID of jDownloads component
{ $db =& JFactory::getDBO(); $query = 'SELECT id' . ' FROM #__plugins' . ' WHERE element = '. $db->Quote('jce') ; $db->setQuery($query); return $db->loadResult(); }
0
b24a9fe640c7d5a55b8e5af6a3974ddf
f657fb73f98e58320d58b25beefeaf3e
Do a binary lookup on a sorted array of strings
static int ranlib_bsearch( const char *symbol_name, const struct ranlib *ran) { return(strcmp(symbol_name, strings + ran->ran_un.ran_strx)); }
0
12099574fab0bdee23e7a34b1a8c7cbf
235f025dc0406efc0d68b1000a3b6ba5
Insert test geocoding metadata into library
print ("\t\ttesting geocode recording") self.success = True sources = { 'origin' : { 'name' : 'name', 'latitude' : 'latitude', 'longitude' : 'longitude' }, 'closest' : { 'gid' : 'gid' }, 'major' : { 'gid' : 'major_gid' } } if self.database_exists () : Event.objects.all ().d...
1
01f49812042408fe59d0823db5427f11
8e4f76d3e5a474386db896a2666b6d64
Calculates the sum of all proper divisors
public class ProjectEuler public static int sumOfProperDivisors(int number, int[] primes) { int n = number; int sum = 1; int p = primes[0]; int j; int i = 0; while(p*p <= n) { j = p = primes[i]; i++; while(n % p == 0) { n = n / p; ...
1
754fb3cc1f8f2a0321c58218c5062d57
dc117e16dd6545cd7c40f51cabfe0716
Set the artist's formation date.
public LocalDate getFormationDate();
0
f608a718b5d55a88ab9965855b51654d
b01f460899833b3cb706cb0ded34fee4
Representation for a AnnotatedStruct object.
class Annotation(Data): def __repr__(self): if self.label: return f'{self.label.name} ({self.start_offset}, {self.end_offset}): {self.offset_string}' else: return f'No Label ({self.start_offset}, {self.end_offset})'
0
2148d38a833bca0c262a81aa93574166
35f6db06fb2fa8a1306bc604f40f2290
删除mall_goods重复SKU
{ if (!empty($data['goodsSKU'])) { if (json_decode($data['goodsSKU'])) { $goodsSku = json_decode($data['goodsSKU'], true); if (!empty($goodsSku) && \is_array($goodsSku)) { return $this->checkDuplicatesForMultiSku($goodsSku); } ...
1
3908f4569db4fd171d6616d6481e277f
467839c82642876a778f3453541106b5
Returns a list of a list of Numeric arrays. Unpacks the continuous data from the .data file into a list of a list of Numeric arrays where each array corresponds to a track.
list_data = read_col(filename) col1 = [] col2 = [] col3 = [] col4 = [] col5 = [] col6 = [] col7 = [] for i in range(2, len(list_data)): if(list_data[i][0][0] != '#'): col1.append(float(list_data[i][0])) col2.append(float(list_data[i][1])) c...
1
09abea7334eaeaf91941086ee1504695
63b1dc512b01abfd77a64f18fd798408
Firing SelectedIndexChanged event of ToolStripComboBox to fetch the data.
namespace Serialcoder.VisualLogParser.Forms public partial class MainForm : Form void OnComboBoxSelectedIndexChanged(object sender, EventArgs e) { if (uxInputToolStripComboBox.ComboBox.SelectedValue == null) { return; } string baseUrl; if (Properties.Settings.Default.InputName == "EVT" || Properti...
1
d292248468d9423896dd7b55325b0b00
14d48f17b35897964e9ef8c412d98576
## produce a quoted list of names separated by commas
format_varnames <- function(varnames, quot = "`", delim = ", ") { between <- paste0(quot, delim, quot) paste0( quot, paste(collapse = between, varnames), quot ) }
1
a949b8fa480bda748c29ea52fc46d866
f183f371a193aa8fb077f3f9fd254b9a
Returns the array of error bars, possibly estimated.
class Style (object): def errorbars (self): return self._errorbars
1
37653b4c7021fd24930928bc51c4400a
3b48bf872e52afa9b0465fc635c2994c
Filter the query on the language_id column Example usage: <code> $query->filterByLanguageId(1234); // WHERE language_id = 1234 $query->filterByLanguageId(array(12, 34)); // WHERE language_id IN (12, 34) $query->filterByLanguageId(array('min' => 12)); // WHERE language_id > 12 </code> Use scalar values for equality. Use...
class I18nMessageCreateModel extends Model protected function loadLanguageFilter () { $this->filterLanguageId = ( new FormFilter( [ 'filterName' => 'languageFilter', 'sessionKey' => 'i18n-message-list_language-filter', 'fieldList' => [ [ 'language_id' ], ...
1
96e5ab5fa75520a0bc0942e18b008cc9
f5ccfcd7f92f57907492439aa0c6be94
\fn void Timer_ScheduleRoutine(const TTimerChannle channelNb, const UINT16 busClkCyclesDelay) \brief Sets a timer channel to generate an interrupt to run attached routine after a certain number of bus clock cycles. \warning TCn += busClkCyclesDelay
BOOL LRADCClass::ScheduleChannel(LRADC_CHANNEL eChannel) { BF_SETV(LRADC_CTRL0, SCHEDULE, (1 << eChannel)); return TRUE; }
0
a88159f18d1386a9a205fbd9bd8d8040
58f98bba84f1f8ec1474b344315e6ec2
Checks if there is a residue with the given ID in this PolypeptideChain PolypeptideChain, false otherwise
boolean contains(String id);
1
0738ce287a11fa2f582c0c9210a252b5
eaa23e7cf18702c3181671c615cc0f98
recursive version of delete alternates
public class RedBlackLongKeySet implements Serializable private void deleteEntry(RBNode p) { if (p.left != null && p.right != null) { RBNode s = null; RBNode node = root; while (node != null) { if (p.key >= node.key) { node = node.right; ...
0
cc3a4df4299946e773749cebaa056762
7e74e930cd83fb7d8e619b836874d0b7
Gets a decoder for inferring a single result.
decoder = self._node_decoders.get(node_type) if not decoder: warnings.warn("Node_type {} not exist in graph. Use default decoder." .format(node_type)) decoder = data.Decoder() return decoder
1
b561c2be955b91994f3033aa763c3f66
475278710b8454cdc624537964dfe8e1
Load in the external scripts one by one using some recursion to call this method again until all the scripts have been loaded in.
let that = this; let src = scripts[0].getAttribute('src') || ""; let script = document.createElement('script'); if (src.length && results.indexOf(src) === -1) { results.push(src); script.setAttribute('src', src); } script.innerHTML = scripts[0].inn...
1
13b33cd0b2eb860a4eabaa5eb50624b2
95226bf8ad851ed19b1c775d01a2e7e9
获取急诊图文信息
function getGraphicInfo(params){ return new Promise((resolve)=>{ $post(`Microportal.Common.imgtxtInfo`,params).then(res=>{ resolve(res) }) }) }
1
7d8034d27e9b42d43e1b1aa79a07bcd0
39366883a38e433f37b65586eeb2bafb
判斷CCP類有沒有已經創建好的對象,如果沒有,創建一個對象,並且保存 如果有,則將保存的對象直接返回
if cls.instance is None: obj = super(CCP, cls).__new__(cls) cls.instance = obj obj.rest = REST(serverIP, serverPort, softVersion) obj.rest.setAccount(accountSid, accountToken) obj.rest.setAppId(appId) return cls.instance
1
ebee02963dd0303858f6dac415894833
4da7be8f871dcdf97f86db21642f28ec
Get JSON data using websocket
fetch('http://127.0.0.1:3000/getJson', { method: 'GET', headers: { 'Accept': 'text/html', 'Content-Type': 'text/html', }, }); }
0
789da1628e1e895ab8d3c811eb106d01
379947776df76f7bc0f9894e196e0da8
# Purpose: # Extracts the coefficients, indicators for significance, # the singular metric of choice, and a logical vector # indicating the fold with the best predictive fit. # Arguments: # x - An R object of class 'kfold_cv' # metric - The type of fit metric to report # Returns: # A data frame.
getInd <- function(ind, x){ ind <- c("deviance", "LL_model", "df.residual", "AIC", "BIC")[ind] X <- ifelse(ind == "df.residual", list(x$fitobj), list(x$mods))[[1]] return(unname(sapply(X, '[[', ind))) } out <- do.call(cbind.data.frame, lapply(1:5, getInd, x = object)) colnames(out) <- ...
0
8a33b3314d7c299d472886f4d4707757
86f2d4efeb1c42c97b5b00dc510f0c6e
固定位置及tab下面的channel不能拖动
class AggregationFragment: BaseFragment<AggregationViewModel, FragmentProjectBinding>() override fun initView() { tab.tabMode = TabLayout.MODE_FIXED view_pager.init(this, fragments) }
1
4b678b689cf180966b9a590ed49c4212
800aa2d0a4b55a76ba36e59c9fba29c7
Function to generate the final output of the insertion sort algorithm
passes = 0; comparisons =0; swaps=0; int totalSwap =0; int totalComp = 0; int totalPasses=0; int n = 11; output = new ArrayList<String>(); boolean wasChanged=true; while( n >0 ||wasChanged) { if(n<1) { n=1; } int k = calculateK(n); ...
0
270d63b367751222eeac828fd884774e
e7d549267deef15331cfab51850c9a4e
pw_task任务回调方法
function OnTaskCallBack(btype,bcount,bindex) if OnUpdateTask(btype,bcount,bindex) == 1 then end end
1
85c57abde2c9e5df99b024618f3f9b58
d7a8363985100e9cca1e0198f63cf806
Creates a DatagramSocket on the local host at a specified port.
namespace java.net DatagramSocketImpl CreateDatagramSocketImpl();
0
1418df48446be9a2a6acf165af10b161
0cf7f9a150246e5f5fd0beda3568cdbb
Takes data, the size of the data, the offset to start writing to the file, and the filename. Writes the data out to that file.
function writeData(fileName, data) local file = fileCreate(fileName) if (file) then fileWrite(file, data) fileClose(file) outputDebugString("[AMNESTY][FILE] Wrote "..tostring(#data).." bytes to file \""..tostring(fileName).."\"") return true end return false end
0
7333d39b4568d636d96a0b187599ce11
9b33ace9169bcad45cbcd97e15263e0a
获取网关指定的关键词组
namespace SMSPlatform public partial class SMSPlatformService : MarshalByRefObject, ISMSPlatformService public SMS.Model.RPCResult<string> GetKeyGroupGatewayBinds(string gateway) { return SMSProxy.GetSMSService().GetKeyGroupGatewayBinds(gateway); }
1
3f37678af9f4e630c00f8904f0076348
173bdf9b9387800ae71774cbf6469d8b
Returns <c>true</c> if component is NOT in design mode. Othervise returns <c>false</c>.
public class ViewModelLocator private bool IsInDesignMode() { return DesignerProperties.GetIsInDesignMode(dummy); }
0
212bfbb302ead0a0502721c36b00e706
86884235c0a30efd7c4a5fef6b7cbc34
This API clears the current event broadcast block value for Core module XAIETILE_EVENT_BLOCK_SOUTH, XAIETILE_EVENT_BLOCK_WEST, XAIETILE_EVENT_BLOCK_NORTH, or XAIETILE_EVENT_BLOCK_EAST.
u32 XAieTileCore_EventBroadcastBlockValue(XAieGbl_Tile *TileInstPtr, u8 Dir) { XAie_AssertNonvoid(TileInstPtr != XAIE_NULL); XAie_AssertNonvoid(TileInstPtr->TileType == XAIEGBL_TILE_TYPE_AIETILE); XAie_AssertNonvoid(Dir < 4); return XAieGbl_Read32(TileInstPtr->TileAddr + EventBroadcastValue[XAIETILE_EVENT_MODULE...
0
5fe16c25e78f4c3a677be3282e4823e5
6e977c59bbdf14a62b84e4561eed6733
判断当前是否在网络环境下
public class WebViewUtil public boolean isNetWork() { boolean status = false; if (context != null) { ConnectivityManager mConnectivityManager = (ConnectivityManager) context .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo mNetworkInfo = mConnectivityManager .getActiveNetworkInfo(); i...
1
6cd64d22c7a698774ba5ebdc73e9d4d1
758109a947827a0e48b9146a1f2d72cd
Convert input matrix to vector.
def mat2vec(matrix): return matrix.reshape(-1)
1
68fb37ff1b6e9ccd56246200b38476ad
74926a0193fe3d6369516269b19a68e3
Renders level limits settings.
{ $limit = self::opt($args['key'], 5); printf('<select name="%1$s" id="%1$s">', $args['label_for']); foreach(range(5, 50) as $_ => $i) { printf( '<option value="%1$s" %2$s>%1$s</option>', esc_attr($i), selected($limit, $i, f...
1
44c248e4207e1c0a433ba4eb02a6533a
da2840c0b0acf51dcd284825c3767fd9
Returns the meta object for class '{@link encuesta2.NodoInicio <em>Nodo Inicio</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getEntrada();
0
7da6f89a480239fc3cdfcf83a1ed2f5c
7418f77ad52baff4b33c319154b4b448
Insert a new integer value into an existing BST recursively
public class BinarySearchOperation public BinaryNode recursiveInsert(int value) { return recursiveInsert(value, this.root); }
1
1bffe2799351d5b12014ca782cba74a5
e616c4183f27c8a930cb0e9a81e3942f
Gets the position of the element considering the parent current state.
default Vector2i getAbsolutePosition() { ParentElement e = getParent(); if (e == null) { return getRelativePosition(); } return e.getAbsolutePosition().add(getRelativePosition()); }
1
71f2684926a5119fceea0adaa4939cbe
1e96ef2dcab6b5fa8dc8642bf19e9be9
description: - given embeddings matrix, returns normalized embeddings matrix
class Embeddings(nn.Module): def forward(self, x): return self.embeddings(x) * math.sqrt(self.embed_dim)
0
bc80c686871eb798215dd8976986cf16
afb1e482baa47e2386e2e8ebf3d42460
取消团队订单
{ $user = User::getTokenData($request->token); if (!$user) { return ['status'=>'401','msg'=>'用户不存在或者已被禁用']; } $group_data = self::where(['fight_user'=>$user['id'],'boutique_id'=>$request->id,'group_status'=>'1','status'=>1]) ->where('fight_end_time','>',time()...
1
72073b7f9a24bdbbcb518c9168b7be95
fe0894587ee95726a7c98a8789361b00
http://stackoverflow.com/a/273631
function string.split(s, delim) if type(delim) ~= "string" or string.len(delim) <= 0 then return end local start = 1 local t = {} while true do local pos = string.find (s, delim, start, true) if not pos then break end table.insert (t, string.sub (...
1
081463fa50b306065fd2e21521e55db5
f5a75703e2720c9c0b43d02b1faaadc8
Validation function, used to compute test accuracy during training
def evaluate(): num_correct = 0 total = 0 for i in xrange(dataset.num_test_examples // dataset.batch_size): num_correct += true_count.eval(feed_dict=mytf.utils._get_eval_feed_dict()) total += dataset.batch_size return "Accuracy on validation set: %0.3f%%" % (100*float(num_correct) / ...
1