query_id
string
corpus_id
string
query
string
code
string
label
int64
e79da657544354633c2249583c86ce9a
9051ed8b3b1c23db1bb5c516719f8a00
Get custom button by name
{ foreach (IButtonInfo b in _Buttons) if (b.Name == name) return b; return new NullButton(); }
1
08b3fc497de2ffd191931441a43031cd
b9e8559c5e5660ed285de32b35d9d5f8
Returns the meta object for the reference list '{@link SRM.Capability#getActivities <em>Activities</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getScripting_Activities();
0
31cb8c63f8d96cb565bb19bb73f5b445
f7cbe21eabc21df94e46ceafff3fde27
Uses <see cref="FileInfo"/> to calculate the size of a file in bytes.
namespace SyncButler public class WindowsFile : WindowsFileSystem public static long SizeOf(String filename) { return (new FileInfo(filename)).Length; }
1
261ba5318379f7cf9f7ed184309e39d8
85e7cfb52a8011e8cbce1b5e64891b87
Создает расширения.
public final class OrganizationsClientImpl implements OrganizationsClient @ServiceMethod(returns = ReturnType.SINGLE) public Mono<MicrosoftGraphExtensionInner> createExtensionsAsync( String organizationId, MicrosoftGraphExtensionInner body) { return createExtensionsWithResponseAsync(organizationId, ...
1
664f0ec6681fd4a3aaf64ed291443654
aaf7e36de5ec39223123dbc96bb1eada
transform text with language tags to json
class JsonLdFormatter extends AbstractFormatter public function handle(array $jsons) { $translated_words = $this->getTranslated()->getOutputWords(); for ($j = 0; $j < \count($jsons); $j++) { $data = $jsons[$j]['json']; $node = $jsons[$j]['node']; $value = JsonLd::...
0
217375abe55c55ae3ee073f2465e8dfe
df5026277e61e859d4efd52050c0a728
returns a string of the operation name based on it's integer representation.
{ switch (operation) { case SQLOperation::ALTER: return "A0"; case SQLOperation::ALTER_LIBRARY: return "AL"; case SQLOperation::ALTER_ROUTINE: return "AR"; case SQLOperation::ALTER_ROUTINE_ACTION: return "AA"; case SQLOperation::ALTER_SCHEMA: return "AH"; case SQLOperation::ALT...
1
c1a494ba6da321d1def6b7233c20ebce
3f0523c07ab56ab8d42ea7b9ae0c18b8
Retrieves the internal ID of a subaccount by a substitute natural key.
{ $queryGenerator = new \App\QueryGenerator($this->getMapModel()->getModule()); $queryGenerator->setStateCondition('All'); $queryGenerator->setFields(['id'])->permissions = false; $queryGenerator->addCondition('account_number', $accountNumber, 'e'); $queryGenerator->addCondition('related_to', $relatedTo, 'ei...
1
a80a65e1b954e8de12605d9203f4952d
d6d7f240bb244ef17a383241eb886389
● 更新选择装备部位
public class InventoryManager : MonoBehaviour public void changeSelect_Equip(int index) { if (selectItemSlot > -1) { itemSlot[selectItemSlot].GetComponent<SlotOfItem>().setSelect(false); selectItemSlot = -1; equipButton.SetActive(false); clearButton.Se...
1
dd84f32f338d838c78683d6913e5c437
d81dab925d8610d0505c4da5e8c07c9a
function to calculate the stochastic prediction of bayes kriging
n_1=A_1-z_1 n_2=A_2-z_2 n_t=(n_1+n_2) z_t=(z_1+z_2) A_t=A_1+A_2 a=-43.25203 b=0.49192 c=3674.3927 d=-9360.6 e=0.8930 f=578.56058 kps1=a*((z_t**2)/A_t)+b*(((z_t**2)/A_t)**2) kps2=c*((n_t-z_t)/(n_t+z_t))+d*(((n_t-z_t)/(n_t+z_t))**2) kps3=(e*Es)+f kps=kps1+kps2+...
0
0da51398f10106ba4cc03f5cf8794bc4
e8fa0c29e64d5a0e6332d15bfb97ec4e
destroys the dialog when the resume button is pressed
public class MainActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) @Override public void onDismiss(DialogInterface dialog) { ...
0
555a392580a249313c4f804fe69ac6b2
d4f4e8bda6e2e221183a500e28c58e55
Test GPU stats are logged using a logger.
def test_device_stats_cpu(cpu_stats_mock, tmpdir, cpu_stats): model = BoringModel() CPU_METRIC_KEYS = (_CPU_VM_PERCENT, _CPU_SWAP_PERCENT, _CPU_PERCENT) class DebugLogger(CSVLogger): def log_metrics(self, metrics: Dict[str, float], step: Optional[int] = None) -> None: enabled = cpu_stats...
0
de0899d036c2ca45b46916c967e3b7f7
9babfec8348e4b71fb031568c4e6e072
returns the current energy of the predator
public class FoxImpl implements Fox @Override public int getEnergy() { return this.FOX_CURRENT_ENERGY; }
1
7f95eb8842cf403a29c63f37ec59dfae
9cee59a8a90b4ff6e0144f62c6e0d95d
Accepts a Node tree as input, performs the layout process and returns the final Document.
public class IlvSDMGrapherView implements IlvSDMGrapherDocumentViewInterface public void nodeLayout() { IlvSDMEngine engine = getEngine(); boolean current = engine.isNodeLayoutEnabled(); engine.setNodeLayoutEnabled(true); engine.performNodeLayout(); engine.setNodeLayoutEnabled(current); }
0
5c023edb084bcbb7e73ca1f9ae00318e
4f69c3df9d8edd93c4012a82e6bbb036
判断RULE串是否成立的方法,只有此方法成立才能创建规则对象,一旦创建则表示规则创没有问题
if (LoadCode[0] != '[' || LoadCode[LoadCode.length - 1] != ']') return false var rule1 = LoadCode[1], rule2 = LoadCode[LoadCode.length - 2] var posi1 = [], posi2 = [] for (var i = 0; i < 13; i++) { if (rules[0][i] === rule1) posi1.push(i) if (rules[1][i] === rule2) posi2.push(i) } for (var i = 0; i ...
1
ea28570d460c5bd3425755627ee0e857
cc93251ccd2c178aeb85c678b663c4af
Increases the number of current worker by 1
class PlayerMod(Base): def addWorker(self,workerNum): ctime = comm.datetime() self.db.update('tb_user',{'WorkerNumber':workerNum+1},'UserId='+str(self.uid)) workerRecord = {'UserId':self.uid,'WorkerNumCurrent':workerNum,\ 'WorkerNumExpand':workerNum+1,'CreateTime':ctime} ...
1
c806ca486d580231ef300dd138a7eee8
c4efbb05992f40d0f307d9fb5b9898f2
判断一个Long值必须存在且大于0
if(num != null && num.longValue() > 0) { return true; } return false; }
1
e4a4d15df238ca4186c19241daebd7c4
08ba837589edc7c74872421c686d4928
Prints out useful information about an OpenGL program including a listing of the active attribute variables and active uniform variables.
GLboolean printProgramInfoLog(GLuint program) { GLint status; glGetProgramiv(program, GL_LINK_STATUS, &status); if (status == GL_FALSE) { std::cerr << "Link error." << std::endl; } GLsizei bufSize; glGetProgramiv(program, GL_INFO_LOG_LENGTH, &bufSize); if (bufSize > 1) { std::vector<GLchar> infoLog(bufSize); ...
0
21b82cc35bf9ecdd86279888b0fe5629
c405b7c891b240c42d3ac512f99ab2fb
Take the inverse of the rigid transform. Returns
class Transform3D( p_basis: Basis, p_origin: Vector3 = Vector3() ) : CoreType fun affineInverse(): Transform3D { val ret = Transform3D(this._basis, this._origin) ret.affineInvert() return ret }
1
9095c62962336f5f64c30d0494b0d9a8
8fc7870c7beb7ddb8963524c3629d220
Удаление всех/конкретного элемента из сохраненного списка
export default class App extends Component deleteItem(id) { this.setState( ({ data }) => { const result = data.filter(elem => elem.id !== id) return { data: result } }) }
1
09468c8fc2967f5d32e8aca3f9a42998
ec9f22d54118f4e8100014131ad3c9d4
if we have changed the current directory, we must restore the original
BrowseForFilename::~BrowseForFilename() { SetCurrentDirectory(m_original); }
1
746f907af53e6fa058d23fb589bf0544
e85efbfa6bcaf916afd89282f531f5bc
DbCheckCreate - database check and create objects
namespace ab.Services public class DatabaseContext : BaseContext public void CheckContext() { try { Database.EnsureCreated(); _ = TelegramMessages.FirstOrDefault(); _ = Users.FirstOrDefault(); _ = Hardwares.FirstOrDefaul...
1
8c28af99e2f018eaf48217f064bcb772
4500672cab5a777f888d03af6540a52e
设置分享默认值
[SET_DEFAULT_STORE_SET](state, obj) { state.defaltStoreSet = obj }
0
a4814fafb7b025c68c0585a07e6fdb86
8a3b5933f2856592e5be580ccb382181
16 bit 按位反转
{ unsigned char i; unsigned short temp=0; for(i=0;i<16;i++) temp |= ((data>>i) & 0x0001)<<(15-i); return temp; }
1
9bdd3525d369edc7e649b684a5065a21
3af7fa65d23c029713c6ec4302411c6c
Click the left button. Determines whether drawer is already open and sets the visibility and starting positions
public class MainActivity extends AppCompatActivity @Override protected void onCreate(Bundle savedInstanceState) @Override public void onClick(View view) { mDrawerLayout.openDrawer(findViewById(R.id.left_drawer)); }
0
7a244613499b761b03b8c928bd562218
b4b770fdf3b9fd13671f2cf343996860
Shifting images in its HSV color space and converting it back to BGR color space
def shift_hsv(image): image = cv_read(image) pic_hsv = cv2.cvtColor(image, cv2.COLOR_BGR2HSV) cv_show('cat_hsv', pic_hsv) return pic_hsv
0
4240d56b1761d8e1cbb969ece81a824f
f710f62bbd034a2043f2bcc10f3499e2
Sets the next account number for the savings account.
NumberFormatted[0] = new Integer(AccountCounter++); return AccountPrefix + String.format("%010d", NumberFormatted); }
1
a50b4fbf592a4129b8d740f22ba34274
e850fce915e15e7cf3af6cfadb511383
Modify frame list from preset menu.
{ Tabs::updateOrCreate( ['frame_id' => $frame_id], [ 'frame_id' => $frame_id, 'default_frame_id' => $request->default_frame_id, 'frame_ids' => (empty($request->frame_select)) ? '' : implode(',', $request->frame_select) ] ...
1
b4e2d563a13df59c0128e1457449588d
924afb974150fb4b144bb8ef667911f6
#Writes numbers up to 1,000
{ $num = (int)$num; $retval =""; if ($num < 0) return "negative " + readNumber(-$num, 0); if ($num > 99) { if ($num > 999) $retval .= readNumber($num/1000, $depth+3); $num %= 1000; if ($num > 99) $retval .= readNumber($num/100, 2)." hundred...
1
ab19318433f80726b83eb4392bdc497a
50143282c1a83fa51a5bff479c7ade2a
opens the I/O library
int luaopen_rpiIO (lua_State *L){ wiringPiSetup(); luaL_openlib(L, "rpiIO", rpiIO, 0); return 1; }
1
19b88fef8f99a8e5fc5699ce5f522035
acee2094e4dfda61946006c6c6902942
This API is used to query the TKE Edge cluster node information.
req: DescribeEdgeClusterInstancesRequest, cb?: (error: string, rep: DescribeEdgeClusterInstancesResponse) => void ): Promise<DescribeEdgeClusterInstancesResponse> { return this.request("DescribeEdgeClusterInstances", req, cb) }
1
fccb85c1552770f10521183d73cff8f1
8d76588548c8615a375dd5aeebc41abb
Lister les clients d'un conseiller
{ $prefix = $this->wpdb->prefix; $args = array( 'role' => 'administrator' ); $admins = get_users( $args ); $sql = "SELECT client_id_name, client_id, client_name, client_tarif_name, tarif_cost, coach_id, pay_date, can_pay, notify, recurring_id " ."FROM {$prefix}clients " ....
1
302a632c585d224c04be9b44e9ec2cac
b59fbc6a683f40bde81dd8b8e2e830cf
Start shutting down the master
$Port = $this->getSocketPort(); \slc\MVC\Debug::Write('stopping master on localhost:'.$Port.'...', null, \slc\MVC\Debug::MESSAGE_NEWLINE_BEGIN, 0, __CLASS__); $fp = fsockopen('localhost', $Port); if($fp) { fputs($fp, 'shutdown'."\r\n"); while(!feof($fp)) { fread($fp, 1); usleep(10000); } fcl...
1
821b98ba379308a42d262793ddbded22
b35ef6ad6f5bfa75bc37f844106ac4f7
Test for deleting paragraph fields without node path.
remote_file_name = 'TestDeleteParagraph.docx' upload_file File.join(local_test_folder, local_file), remote_data_folder + '/' + remote_file_name request = DeleteParagraphRequest.new(name: remote_file_name, index: 0, node_path: '', folder: remote_data_folder) @words_api.delete_paragraph(request) ...
1
ecfa4758e361b939b88b24f902b7f68d
952edf124b44c0cecc200fc048404ec9
string数组转long数组
public class StringUtil public static Long[] stringsToLongs(String str[]) { Long lon[] = new Long[str.length]; for (int i = 0; i < lon.length; i++) lon[i] = new Long(str[i]); return lon; }
1
c2dc83830267aff689ce2dd39f8603f9
95b16751e991d366c1973c77d65fc6d9
Sets the state of the program so that you are drawing an oval that is outbounded by whatever shape that you may drawn.
Shapes visit(Oval shape);
0
5612d53b6f64a5348def04a93d4c5c36
fc7f2e714704f55639b949d0338e5080
将字符串按照指定分隔符转换为泛型数组
namespace Core.Ext public static partial class ExtendMethod public static T[] AsArray<T>(this string str, char c = ',') { string[] parts = str.Split(c); T[] valueParts = new T[parts.Length]; for (int i = 0; i < parts.Length; i++) valueParts[i] = (T)Convert...
1
7e46893e0260f37d9733f4f3890b1643
907fd75ea62d86526f088307e959bb87
Get date and time of bin
if bin_size == "1M": if start_time.month == 12: end_time = start_time.replace(year=start_time.year + 1, month=1, day=1) else: end_time = start_time.replace(month=start_time.month + 1, day=1) elif bin_size == "1y": end_time = start_time....
1
7a8086cc707648e8c5c5328ef0700bf8
de676f6836de2c2d6aec25583f860c0d
对 texture 扩边
const bWidth: number = texture.width + offset * 2; const bHeight: number = texture.height + offset * 2; const area: number = bHeight * bWidth * 4; const ret = new cc.RenderTexture(); ret.initWithSize(bWidth, bHeight, cc.RenderTexture.DepthStencilFormat.RB_FMT_S8); ret.ini...
1
7086bc97a5ae06fd67bb716d98e4301f
bd9a5136efe08418e1f7efbd644a7255
read a row of sprites from the sheet
class Viking(): def spritesheet_select(self, spritesheet, row, frames, w=32, h=32): animation = [] for i in range(frames): img = spritesheet.get(32*i, 32*row, w, h) img.resize(self.target_size, self.target_size) animation.append(img) return animation
1
3d9a99c27828ad344840f0d8c288ad0b
0e21c2b5228e997fac0a83dc2416fee5
模糊查询ICD编码(手术名称3)
namespace CJia.Health.Presenters public class PatientInfoInputPresenter : CJia.Health.Tools.Presenter<Models.PatientInfoInputModel, Views.IPatientInfoInputView> void View_OnICDYNGR1Search(object sender, Views.PatientInfoInputEventArgs e) { this.View.ExeICDYNGR1(Model.QueryICDBySearch(e.StrFuzzyS...
1
9f202f3499e3ec7866aa8dbe1df68a8d
d6f7bfdc00157e653f52a2783fbd4c30
Binds the Option type. When the type is Some the mapper is called and expects an result as an output. When the type is Nothing the mapper is NOT called and instead a None of the new type is returned
{ return (t1, t2) => { try { return Option.Create(self(t1, t2)); } catch { return Option.None; } }; }
0
688cac8ffa89a1cb039f002d99303007
0aedd6f0f51fcaabd59977afeabd3cd2
发送MVS通道列表到AMS服务器
{ SIPProtocolsEnum protocols = SIPProtocolsEnum.udp; var toSipUri = new SIPURI(SIPSchemesEnum.sip, new SIPEndPoint(protocols, _localIpEndPoint)); toSipUri.User = Common.SipClientConfig.SipServerDeviceId; SIPToHeader to = new SIPToHeader(null, toSip...
1
e04dabc063417b5ff8b4b0bb67b89fa2
c2858f17ee5164327b0f26c0fac36815
Create objects for copper layers. At most two. None if absent.
self.nmos_vtl(.335, .1575) self.pmos_vtl(.335, .5825) self.pdcont(.1025, .2) self.ndcont(.1025, .7175) self.pcont(.2975, .4125) metal1Box = Box(.01, .755, .5425, .83) Rect(self.metal1Layer, metal1Box) metal1Box = Box(.2325, .6425, .2975, .7825) Rec...
0
65ef63c996147d83bacc6c37e8599689
347f9a01c264006968cf26f69f00f5e6
判断当前登录系统的用户是否实名认证,如果实名认证,返回该用户发布的房屋信息
def is_certification(): user = User.query.get(session['user_id']) if user.id_card: houses = House.query.filter(House.user_id == user.id).all() house = [i.to_dict() for i in houses] return jsonify(code=200, house=house) return jsonify(status_code.MYHOUSE_USER_IS_NOT_AUTH)
1
76377fefb34cbabb923388fbce5b8a71
909c16f99ab8335403bf8cfbd760ac6c
Check is emoji in the list of favorite
namespace EmojiManagement public class EmojiService public static List<Emoji> FavoriteEmoji() { using (var db = new EmojiContext()) { var query = AllEmojis(db).Where(emo => emo.IsFavorite == true); return query.ToList(); } }
0
fd9aea26ad4a8c1902820ea5e5b627a4
d9baa60e9d80bac5ab02e1359c2ae2b1
Removes all existing ordered pairs of the form (s,r). Then, for each t in newDependents, adds the ordered pair (s,t).
namespace Dependencies public class DependencyGraph public void ReplaceDependents(string s, IEnumerable<string> newDependents) { if (s == null) throw new ArgumentNullException(nameof(s)); DependencyNode sNode = GetDependencyNode(s); sNode.ClearDependents(); fo...
1
a920a62f46f8e560680eddc36cda6ff2
a706eb2438dd508159645fc1a99425ef
Devuelve conjunto de implementaciones en el dataset
public function dataSets();
0
c3771e9af3187a788f92c2724c6d1762
c9dddb166f335ba92c818fae0e91e30f
承認・非承認を実行する処理
class Request extends Component handleDecision(is_accept) { let cost_center = this.state.cost_center; let apiUrl = `/none`, acceptID = undefined, dateID = undefined, is_manager = this.state.user_permissions === 3, is_professor = this.state.user_permissions === 2; if (is_professor) { ...
1
6fcdfb96815d1037ec17336d03a0252c
4d9cc5fe8d5acc393a334064ace109c4
All the functions of this EPC.
function EpcCreateDialog(name){ }
0
1ae3aefaf287e994ba3a8bc65defc4fa
76f613f649e623ae90e2018465cad04b
Perform atomic read-modify-write on the given integer or long location and return the location's original value. \note ARMCI RMW operations are atomic with respect to other RMW operations, but not with respect to other one-sided operations (get, put, acc, etc). ARMCI_FETCH_AND_ADD (int) ARMCI_FETCH_AND_ADD_LONG ARMCI_S...
{ locked_read_modify_write_operation_persistent_fence(); let result = self.fetch_and_(increment, Acquire); locked_read_modify_write_operation_persistent_fence(); result }
1
d623069c06b953f3752045f2d59c82df
16d7494eb898e18407083c6df76efa5e
Reads a list of warnings.
namespace NFL2K5Tool public class PlayerParser public List<string> GetWarnings() { return mWarnings; }
1
4472a3eb5736e62a9f18be0e2343e827
f681c6338c86cdef36b0b46a0f66fc43
根据组织或人员编号获取所有父级职位或组织
class Organization extends Model{ public function getPOrg($id) { $parentstr = $this->where(['status' => 0, 'id' => session('user.orgid')])->value('parentstr'); $num = mb_strpos($parentstr, $id); if (is_numeric($num) && $num >= 0 ) { $id = session('user.orgid'); } $thi...
1
d6c07b04cc7cbcef96e14a091d5b6cfa
82ac0e4ba767c489113068cd11b325da
Unset the uenc param for redirection of blocks that have cached links. If we don't do this, links redirects to where user X came from when the block was cached. This also means that cached return links for ESI blocks return a visitor to the ESI URL, and we can't have that.
class Nexcessnet_Turpentine_Model_Observer_Esi extends Varien_Event_Observer protected function _fixupUencUrl( $uencUrl ) { $esiHelper = Mage::helper( 'turpentine/esi' ); $corsOrigin = $esiHelper->getCorsOrigin(); if( $corsOrigin != $esiHelper->getCorsOrigin( $uencUrl ) ) { return $c...
1
e73bdc7da4b0ec9c2ce694b2e0aabfb1
6a2f775a727a700e3e8736fcb23f9365
# find positions of all local maxima above some threshold
local.maxima<- function(x) which(diff(sign(diff(x)))==-2)+1
0
4885cd2bab942e4222586ae323b50f49
0555408140d8361a797976d31b5658cc
# CreateMSStDataset function creates MS-Stacked Chart's Primary dataset
loadDataset <- function(dir, setname, dataColumns) { fileExtension <- ".txt" dataFilePath <- paste0(dir, "/", setname, "/X_", setname, fileExtension) activityFilePath <- paste0(dir, "/", setname, "/y_", setname, fileExtension) subjectFilePath <- paste0(dir, "/", setname, "/subject_", setname, fileExtension) m...
0
6eef69d474c347d152f84e92d873f874
19c43b99dc92325d203f97c4c805d053
从当前集合中移除迭代器最后返回的元素(可选),该方法只能在next()方法后被调用一次。
export class RowObjects<T extends any = Record<string, any>> return(): IteratorResult<T> { return this._rows.return(); }
0
dac3ea25fed5f37298d8659bdd77f6c6
8dfa9b92481d6dc9f930c96d6dc534ef
Hides the transform options when the timer has elapsed
function hideTimer() { $("#progress-bar").fadeOut(); }
0
ce16aee2aeea553cd208869ada205a40
f6a2a001a10bf11f02475dce3f6c07d0
Disable the selected network adapter.
class Base def delete_disabled_adapters read_settings.fetch('Hardware', {}).each do |adapter, params| if adapter.start_with?('net') and !params.fetch('enabled', true) execute_prlctl('set', @uuid, '--device-del', adapter) end end end
0
8aff81b40a0293820df62f94c7919aaf
8d66c9f3e9deecd8c9c884638b43b218
Require UI-elements.
class Application(tk.Tk): def set_ui(self): self.canvas = tk.Canvas(self) self.canvas.pack() self.entry = ttk.Entry(self.canvas, justify="center", font=("Calibri", 12)) self.grid = Grid(self.canvas)
1
a566fe89e5dc213709a696ccd2cb6221
8287165dca02ff0a7e9c404cb29eabda
Определение части речи
class LTP_CLASS(object): def role(self): roles = self.labeller.label(self.cut_list, self.part_speech_list, self.arcs)
1
823065f70b409e6396583d6304d7f413
029966b7e3302ebd9059148f2789765e
Handle user selecting new query by parsing query and type of date range to display
def build_trend_dashboard(params): # event handler for trend platform (ls or s2) def trend_query_date_handler(event, params): if event['type'] == 'change': params.query_dates = helpers.prepare_dates(date_tuple=event['new'])
1
dd1fce72a0874dc08257cc55e4136797
e5b9bc493106cd21f3ca7139a63a0bb3
the object may have been allocated from the relocatable mempool; provide a lightweight api call to lock the underlying image data memory in place before use, such that an aggressive compaction will skip over it.
class Image(object): def lock(self, allow_unprivileged=False): blocking = self.blocking_locks if not self.__lock.acquire(blocking=blocking): raise api_errors.ImageLockedError() self.__locked = True try: self....
0
cc5c8aa3f89910ba67eb026f2ba3b85e
7f2f31740e6559f5c37ec9e9d639b24b
Returns the minimum bit array size (m) to satisfy the desired false positive probability based on the number of elements expected for the bloom filter.
public class BloomFilter<E> implements Serializable public double getFalsePositiveProbability(double numberOfElements) { return Math.pow((1 - Math.exp(-k * numberOfElements / (double) bitSetSize)), k); }
0
a0f38ae4b25db53731150ea91c3d243c
f105a1f75f29c8c443324f232faedf80
Идентификатор национальных настроек информационной базы, например, ru_RU для России. Использование: Только запись.
class eventStore public static function countryId($int) { self::$countryId = (!empty($int)) ? $int : null; }
0
1eff25c04a185aa38058c523c89d2e58
a5816a6a3c39ba6e79a00e017aa847d1
Remove usage of specified variable.
{ if(isset($this->Variables[$key]) == false) { return false; } $this->Variables = array_diff($this->Variables, [$key]); return true; }
1
96e790e1ec57a35a204ef812cbf5ea1b
2c88903019badea8a0c22da712777173
Returns the indicated airspeed associated with the current flight condition, in meters per second.
class OperatingPoint(AeroSandboxObject): def indicated_airspeed(self): return np.sqrt( 2 * (self.total_pressure() - self.atmosphere.pressure()) / self.atmosphere.density() )
1
49aa91edab18c6c59cf4f1a943c874f0
6aef25f3dcc9ca70d4a81d9dd1b5ba47
构造一个外部函数的函数调用结点
func CreateFuncCallStmt(name string, rvs []rvalue.RValue) Funcall { var funcall Funcall funcall.FuncName = name for _, i := range rvs { funcall.FuncArgsValue = append(funcall.FuncArgsValue, i) } funcType := st.GetFuncSymbol(name) s := st.CreateSymbol(true, funcType.ReturnType, "fvar_"+name, 0) st.AddSymbol(s) ...
1
fe7357dc9d9cad8c4d91b8a120b2d7bd
678fe25ef57674e01ed5136bb029178a
Exit from infomodel server.
void exit() throws RemoteException;
1
9c74e6ded5fa03368a77c1aa853afee4
d9378c448be0d9b9dfab3e31b9787830
Iterate through both arrays and find common elements. (O(n2) steps!)
public class IntegerArray public static void findCommonElements(int[] a, int[] b) { }
1
02ccd6b8ac21f9c5400ed6241a3fa865
08b63480bdcdedc8a2d96122947fbc39
Enables lazy loading
class Image extends GridComponent public function lazy($lazy = true) { $this->lazy = $lazy; return $this; }
1
b2601745bf97e28861469b1e77a1e2af
e22d647350cdd3a31e94a578db33851e
Is the session allowed to update PopDep instances?
boolean allowUpdateFiniteSubordinate( CFSecurityAuthorization Authorization );
0
421775f06d0e4e522cfc635d09da25b2
c8d400041b3b30a9262f3e37d645bb7c
ensure setuid
if (suser()) current->uid = current->euid = current->suid = uid; else if ((uid == current->uid) || (uid == current->suid)) current->euid = uid; else return -EPERM; return(0); }
1
75d6411e99ee2d6e14c7b9f85bd6c913
e42cdbc89da10737a60bc59f0bf0a2b6
Starts a new query and set it as the active one.
class DB extends PDO public function start_query() { $this->_queries[++$this->_query_counter] = array(); $this->_active++; $this->_update_active_query(); return $this; }
1
18736b80e0c8bc1c0fac94b100f354e9
261cae5c97ad6cf774112a9b23783449
Tests view with base_date and num_runs URL parameters. Should only show dag runs older than base_date in the drop down, limited to num_runs. Should select the latest dag run. Should set base date and num runs to submitted values.
self.set_source_parameter("lookback_days_pipeline_runs", "3") now_dt = datetime.now(tz=UTC) now_timestamp = now_dt.isoformat() last_week_timestamp = (now_dt - timedelta(weeks=1)).isoformat() self.pipeline_runs["value"].extend( [ { "...
0
0b672f51366e4dfeb2b395cad907e96a
03d811ee2df0e568da68388c6901e632
This script should be used to initialize all quests into the registry.
public class QuestManager public static void registerQuests() { REGISTRY.registerQuest(0, Quest00Test.class); }
1
c874caf86928126b4458523a6c080399
c8e27293440d8eee0a63af493cd8ae12
Return true if the content of the lists are equal or within the range of allowed error.
namespace Json.Schema public static class EnumerableExtensions public static bool ContentsEqual<T>(this IReadOnlyList<T>? collection, IReadOnlyList<T>? other) { if (collection == null && other == null) return true; if (collection == null || other == null) return false; if (collection.Count != other.Count) r...
0
dad21093cba8e756b1fceb264549a63d
ac89aa8f399144978de6993d863f2f3b
将对象value插入到entry当前记录节点的之前或之后
if (this.isEmpty()) { this.setEntries([entry]) return } const head = this.record.get(this.headPath) as Head || this.emptyHead const key = this.getNodeKey() this.beforeChange() this.record.set({path: key, data: {d: entry, p: '', n: head.n}}) if (head.n) this.reco...
0
6ed3645ea282d1cd628ffefe76669920
ede213e06ebe570e39aacf6e982974fe
Checkt ob ein tier (oder item) unter mir liegt, es also gesehen wird, und isst es.
public class Mouse extends AbstractMouse @Override protected boolean seesCheeseAt(Location location) { return super.seesCheeseAt(location); }
0
46e971929d7e6046cedd85106aba32d4
dc51d60cf253510d252354ee6ec7b3c5
Calculate the extrema candidates for each joint (2*7 candidates in total) For the striking polynomial Clamp to [0,T]
class TCSet(ParticleSet): def __find_ace_extrema(self): minDr, maxDr = -undef, undef minTC, maxTC = None , None for tc in self.particles: ace = tc.ace() if ace < minDr or minDr == -undef: minDr = ace minTC = tc if ace > maxDr o...
0
37291530f63d632061550d3d2a7862ea
6e55366f58d5262b8e555fade411e13b
Q Layer that merges an advantage and value layer
class Critic(Network): def build_dueling_head(self, feature_layer): head_dense = self.build_dueling_dense(feature_layer) head_out = [ Dense( self.qvalue_dim, name='dueling_out_value', activation='linear', kernel_initializer=DENS...
1
407be9ffe9b1188aa7611af0073ff022
9d7fd3311d22b1e406e6279078b1f676
Muestra todas las Monedas.
class ApiMonedasController extends Controller public function index() { return Monedas::all(); }
1
89c23a4f6c65f4cad6c29d21927fbeb3
95efdf9c534c07787f797ae5b7162abc
Обработчик сигнала SIGHUP
class Daemon(object): def handleSIGHUP(self, num, stack): logging.debug('%s PID=%s received SIGHUP', self.__class__.__name__, self.getpid())
1
facccb46d0bfe1643c20a1c0633f1aaf
7a06b3e0e49f622512444f4d4d090de8
将html的正文写入到邮件正文中
class proxySendMail(object): def appendMsg(self,msgCont): self.__mailMsg.attach((MIMEText(msgCont, 'html', 'gb2312')))
1
5900382a60b08a3741ec4430d578bee4
6cfc7dcaad6fd71be4349dde79571ab8
根据一个JSONObject对象来生成转换器配置,配置规则为分隔符转换为驼峰命名法
public class ContentUtil public static JSONObject underlineToCamel(JSONObject jo) { return underlinerCamelExchange(jo, UNDER_LINE_TO_CAMEL); }
1
c7c5fb436dad5a88fe4dda5b9689f302
4b057bb22e0f75ae0f4349889200bbe2
Aggregate UMI counts across cells within cluster to form pseudobulks. Useful for performing e.g. DESeq2 analysis of clusters from multiple samples.
logger.info("Trimming barcodes for inference.") matrix = self.get_count_matrix_all_barcodes() umi_counts = np.array(matrix.sum(axis=1)).squeeze() umi_count_order = np.argsort(umi_counts)[::-1] n_cells = self.priors['expected_cells'] total_droplet_barcodes = self.priors[...
0
a2c789e00a2e862f5faaf9094f9e406b
964c8646cd21118b65223e78947dcd1d
Reports a valid solution.
examples = [ [5, 17, 86], [13, 55, 58], [40, 87, 94], ] for example in examples: if any(solution[example] != self.solution[example]): return False return True
0
7e368d5fe9b572b561fa9c0e4433f6f3
e73d8adb07011fd9f048662bb7360c6b
Retrieves the NamespacePrefixResolver instance in use by this XmlBinder. or {@code null} should no NamespacePrefixResolver be used by this XmlBinder.
public class XPathContext implements ExpressionContext public final PrefixResolver getNamespaceContext() { return m_currentPrefixResolver; }
1
f2944056e237d0c09d1e0d6bf8b40d4a
7ad41d9f4c0b3d6a63121d35ee8c3af7
La función que calcular la altura de cada fila (incluyendo la fila de encabezado), la anchura de cada columna (de acuerdo con el texto más largo en todas sus células, incluyendo la celda de encabezado), y toda la anchura DataGridView
{ printCell(r, worksheet); worksheet.Cells[r.EFE.columnStart + ":" + r.EFE.columnEnd].Style.Numberformat.Format = V; r.EFE.dataSource.celda.Select(x => x.columnStart).Distinct().ToList().Where(x => x > 2).ToList().ForEach(colum => { worksheet.Colum...
0
8831f0ac07e866c9f19b3dbcb28ff2ee
96fadbd5b0434372713dec223f6805c7
Check the state of the two pass transprent rendering flag.
namespace Protogame bool IsFirstRenderPass();
0
cfb1e9eb93c05b8a139537e32c1a2374
7f1665d3441cf46d8258577820a5c5be
Gets the GlyphTemplate for IsChecked = false.
InputStream resourceStream; if (uncheckedImage == null) { uncheckedImage = new Image(getDisplay(), UncheckedImageData); } return uncheckedImage; }
0
57c3fa90b67a20a50a91b4e3fc42fbe1
2d349dbb165a6bab5f09f5f9c2db5807
Returns the value of the '<em><b>Num Value</b></em>' attribute. <!-- begin-user-doc --> <p> If the meaning of the '<em>Num Value</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
int getNumV();
0
48128a34fc272e722e7e87593c9f9720
adc558637d318f733905cc5f59fa468f
Get IP address who invokes the request in integer.
abstract class RequestBase implements RequestInterface public function originIpAddress() { return $this->getOriginIpAddress(); }
0
032551f756e10fe01163659ac041f696
9352b7d3b409a1ac5052823422d1bfca
设置红包按钮位置
var w = $(window).width(); var h = $(window).height(); var buttonw = $("button").width(); var buttonh = $("button").height(); var top = (h - buttonh)/2; var left = (w - buttonw)/2; $("button").css({ "left": left+"px", "top" : top+"px" }); }
1
1607eb8f8b488908e65bc44a88b5054f
83e9e7ae097d88b5afdb4c0c69688163
Get the config items from the database.
public class BaseConfigManager extends AbstractService implements ConfigInterface private void loadConfigItems() throws ApsSystemException { String version = (String) this._params.get(SystemConstants.INIT_PROP_CONFIG_VERSION); try { _configItems = this.getConfigDAO().loadVersionItems(version); } catch (Throwab...
1
d06a899c82a3c061ee7bc077dbb6454f
ebb716a94a2305c5559e6af296c107d1
Resets the map to center on the site location
function recenterMap(lat, lng) { MAP_CENTER = new google.maps.LatLng(lat, lng); reinitMap(); }
1
371c497aba2e2c1067c77a1afab14cae
6483943008234312f0da36a92c487135
A CodeMirror mode used to highlight twig code inside html
if (luxCodemirrorDefaults.htmlModes.indexOf(modeName) >= 0) { return 'htmlmixed'; } else if (modeName === 'python') { return 'python'; } else { return 'markdown'; } }
0
334c1f8abc2ad751c3224d7f9ea626e6
25ec5b3061f2f0604a97ff61a561bdb6
Select which transfer matrix to use in the YUV->RGB conversion.
CXTPChartIdentityTransformDeviceCommand::CXTPChartIdentityTransformDeviceCommand(XTPChartMatrixType nMatrixType) { m_nMatrixType = nMatrixType; }
0
a8fc6f8fe9c621155dbbfdba683f2bbc
cb2186dcce96da6d7a40c15763ba2ad6
将对象转换成boolean类型,默认为false
public class CastUtil public static boolean castBoolean(Object obj){ return castBoolean(obj,false); }
1
6ee98d6bf0d8412ecf13cd5b11c41e6a
a013a4ae7b47266eb4bd8fa9f5631e38
Sets the latitude in degrees of the reflecting plane.
namespace Isis void LunarLambert::SetPhotoL(const double l) { p_photoL = l; }
0
4da14449adbd14c3ef9407a368976be6
8e2a96bc4c70498a335b093959559e53
CRP Note, 11-20-2013: This returns the value of the peak current. This is good for numerical computation, and not necessarily for plotting.
class IV_Response(): def criticalCurrent(self): return np.average(np.abs(self.maxSlopeVgapAndCriticalCurrent[1]))
0