query_id
string
corpus_id
string
query
string
code
string
label
int64
716fd826b8f2a629ee93db0433f7f6fc
6bfd0ea8ca5c7e493c10914606c5d691
Closes the video output and prints a status message to console.
namespace AirMonitor.Interfaces void CloseVideo(object winPanel);
0
1b430196cd455d7914d58305bb0a052b
69f1378350dfb4c04f9c214e30937d9d
Load an asset from the asset library given a <paramref name="type"/> and a <paramref name="filePath"/>.
namespace Loxodon.Framework.Bundles Object LoadAsset(string name, System.Type type);
0
99b74608e33df1c765507566c8389824
2ac373e0b5372d1e4e2aab828a2fb539
Returns the meta object for class '{@link org.malai.widget.ToggleButton <em>Toggle Button</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getButton();
0
384748aa6d5c34b4442a7f3d9a782634
d3711308e936aec2abc6c2652eecbddb
Gets the "ShippingAddress" element
public class ShoppingCartInfoEntityImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements magento.ShoppingCartInfoEntity public boolean isSetShippingAddress() { synchronized (monitor()) { check_orphaned(); return get_store().count_elements(SHIPPINGADDRE...
0
48b0b31c8c06ae63a334494de11ce07d
8d82360fd33dc0fc27cff493b877035f
This function should align the current location counter to the specified boundary. For example, suppose that: * The current location counter is 9 * This function receives the value 4 in its align parameter It should therefore increment the location counter to 12, so that it is aligned to a 4-byte boundary. If we're in...
{ return (Origin + Alignment - 1) / Alignment * Alignment; }
1
e6cb28cf1b1c93471d5a9ae7cf585e14
7f49d31f7ab0f62c2244ad6da2e7d371
Removes the given dimension from this size
class OrmAttachment extends OrmObject implements Attachment public function removeSize($size) { $size = is_array($size) ? new Size($size[0], $size[1]) : $size; $key = "$size"; if (isset($this->sizes[$key])) { unset($this->sizes[$key]); } if (isset($this->sizeUrls[...
1
aff786ecf24eb7e0eb326369bd9b5361
c1cc4e8a8d5ec2c14b293908f7097075
write character to stdout, return -1 if failed
FWUpgrade_Error_t vFWPrChar(uint8_t chr){ int res; res = fputc(chr, f_fw); if(res == EOF) return FW_WRITE_ERROR; return FW_WRITE_OK; }
0
097fe25fa446f49268ab79e5d5db3e40
c6e1b3c8b04ca797d9d3afdcfcb236f8
Set the block color based on element properties.
$("#element"+ i +"-property").text(''); $('#legend-property').text(' '); var colorState = {Solid: '#FF3366', Liquid:'#33FFFF', Gas: '#99FF33'} if (!elements[i]['melting_point'] && !elements[i]['boiling_point']){ unknownElements(i); } else if (elements[i]['melting_point'] > temperature ){ $('#element'+...
1
f7bf610c01b8ee8d2b3988f18d460111
4bb7ea2bad6ee7f78c2de2a3d571e9ef
将字符串形式的数据库类型转换为枚举类型的数据库类型
public static DatabaseType getType(String dbType) { DatabaseType[] dts = DatabaseType.values(); for (DatabaseType dt : dts) { if (dt.getName().equalsIgnoreCase(dbType)) { return dt; } } return OTHER; }
1
c2a8e3329c7303e45087e79d808ead29
521ea2a503d63e0d7c01a07287668485
Converts this HTTP request into a CloudEvent object, with the given extensions, overriding the formatter.
CloudEventsSpecVersion specVersion, string eventId, string eventType, Uri source, string eventBody);
0
766ae4f1f0b7ea36fb0e95509215f2c3
e518e0f2186f4a3aeac6364e97656734
Start new lap.
export default class stopwatch extends Component handleLapPress() { let lap = this.state.timeElapsed; this.setState({ startTime: new Date(), laps: this.state.laps.concat([lap]) }); }
1
474ffb89a45b60c64aa93873ae9471b6
7b690a35477504a82fd59d06d490b6cf
U2 [up 2]
{ const uint8_t X64_UD2[] = {0x0f, 0x0b}; return machine_code_append_array(machine_code, 2, (uint8_t*) X64_UD2); }
0
d0c2a8bbb404c059ca49b8b2c54229fe
4358f7cb01fd2b7ddd6ca5524fcfbb69
Fetch data on route change
if (nextProps.routeParams.dialect_path !== this.props.routeParams.dialect_path) { this.fetchData(nextProps); } else if (nextProps.routeParams.phrase !== this.props.routeParams.phrase) { this.fetchData(nextProps); } }
1
7df5038f22112255812997aff62978a1
87bb0f582c7c9e254e31a4b43093df44
該当日付の年度を返す
namespace FukjBizSystem.Application.Utility public class DateUtility public static int GetNendo(DateTime dt, int startingMonth = FiscalYearStartingMonth) { int nendo = (dt.Month >= startingMonth ? dt.Year : dt.Year - 1); #if DEBUG Debug.WriteLine("日付:" + dt.ToString() + " 年度:" + nend...
1
9ab92ad96c26c806b8a1dc2856bcf255
6b9bf30b0c4a8e7124ad3dc0ec95e5ea
Open the file stream for the file descriptor.
{ initsync->fp = fopen(initsync->fn, opentype); if (initsync->fp != NULL) { initsync->fd = fileno(initsync->fp); if (initsync->fd == -1) { log_critical("Error reading file descriptor: '%s'", initsync->fn); fclose(initsync->fp); initsync->fp = NULL;...
1
c284e465b77f6a800ddff879ef835618
e81b2666b29e7daea26fd22f9230785c
BinarySearch is to implement binary search. It gives index and a boolean value as result.
{ if (n < 0) { return false; } else { int start = 0; int end = n; for(int i =0,j=log(n)/log(2);i<j;i++) { if(values[(end+start)/2] > value){ if(end<=start){ return false; } end = (end+start)/2; } ...
0
6dfcff0183f9db33d04bdd21364b33df
1ecb7c16de5c06e8cc37e338eccc4ed8
还原:每次点击都需要隐藏大图片,显示小图片
for (var i = 0; i < smallBtnArr.length; i++) { smallBtnArr[i].className = ''; txtArr[i].className = ''; if (parseInt(imgArr[0].style.left) == 0) { smallBtnArr[smallBtnArr.length - 1].className = 'smallBtnCurrent'; txtArr...
0
f223c043ad56927265909c738dcef27c
b6fbeb1844727d1f2a3d7cda64f0b3d4
启动docker
load_env("./%s/.env" % (LARADOCK_DIR)) env_name = 'pro' load_env("./compose/%s.env" % (env_name)) COMPOSE_PROJECT_NAME = os.getenv('COMPOSE_PROJECT_NAME') say('Step1: 创建 %s 的镜像配置' % (COMPOSE_PROJECT_NAME)) os.system(''' cp -r %s/php-fpm ./compose/tmp/ && \ sed -i '/ADD .\/xlarave...
0
a08e015c1a6944c929938822fa930337
270f17894e86369b94e1bc892518d1f0
Veículo que transporta itens entre duas bases
class Transport: def __init__(self): pass
0
8e94db8460ecadae9731ee038f876753
09dfb00042b4979e8f14a99ae10034b9
ログイン中のuserが投稿したぼやきのみ表示
{ if (empty($request->is_own) || $request->is_own == 'false') { return; } $user_id = Auth::id(); $search_query->where(function($query) use($user_id){ $query->where('create_user_id', $user_id); }); }
1
3c6dc5580ac4c15ee0861c593f3b2306
53b813a3be964df7de9deec92ee65c76
Creates a human readable test file csv.
class BaseTest(unittest.TestCase): def _format(data): return 'File: #\n' + ''.join('%40s\t%d\n' % i for i in data) + '\n'
0
e02b2b5626946e71f945e55043950458
8bf603dfd127a8b7d9c1fdbf2120ca83
Tests that the function actually creates a file
class TestNewCasesWriter(TestPyEpiabm): def test_del(self, mock_mkdir): fake_file = MagicMock() with patch("builtins.open", return_value=fake_file, create=True): m = pe.output.NewCasesWriter('mock_folder') m.__del__() fake_file.close.assert_called_once()
0
1cb3c95ab2656c187670617244882fe2
67aa2b5a956afc745a1fd9910b1ac75d
Test whether each point in a disk is listed exactly once.
assert self.test_shape.processed_points == [ (49.937460888595446, 2.5, "circle"), (43.300748759659555, 25.000903120744287, "circle"), (27.1320420790315, 41.99824154201773, "straight"), (77.154447582418, 128.6358861991937, "circle"), (129.90375269002172...
0
124d93457cfb4313ba935b027e4abfce
391392d154aac02a3146cd336e3f226e
Run a simulation for a size num_pes GEMM array. Creates a ./sim working folder.
def create_simulation(destDir, inputPath): if(not os.path.isdir(destDir)): print 'library_wall_st_results' print 'create_simulation' sys.exit('***directory '+destDir+' does not exist***') exePath = generate_exe(inputPath) if(not os.path.isfile(exePath)): ...
0
4099943c4c576b7bf0792a6f315a6d66
89ff64f2997cbdec544c1b188e05d2db
Map the basic capability strings.
def _translate_capability_string(cap_str): cap_str = cap_str.replace('AlwaysPass', 'alwayspass').replace('AlwaysFail', 'alwaysfail') if ',' in cap_str: caps = cap_str.split(',') else: caps = cap_str.split() return ','.join(caps)
1
5d936f1d3b35a7a191a3aa1d7ed8206e
8c6dcf845b57aa8e809922af3e9354e7
Vérifie si les cartes constituent une série
const valuesSorted = this.sortValues(); const isAllCardsDifferent = [...new Set(valuesSorted)]; if (isAllCardsDifferent.length !== 5) return false; return isAllCardsDifferent.every((num, i) => { const indexOfCurrentNumber = CARD_VALUES.indexOf(isAllCardsDifferent[i]); const indexOfNextNumber...
1
704d587ef2a9a78d675c12930b95a6d8
67a4d317ae94089faefe6a767b3f6efa
Aplica los criterios de filtro, actualiza la pantalla de facturas de compra e inicializa los checkboxes del grid.
public class AnticipoRemuneracion extends Pantalla public void filtrarSolicitud(SelectEvent evt) { limpiar(); autBusca.onSelect(evt); dibujarPantalla(); }
0
67b3325a62a77c54f74cbcc80b3a6899
184c70f3a6b2f8591736f7ebae61d6e9
Show a target box for a given target tracked by a given trackable.
{ if (ImageTarget.GetComponent<DefaultTrackableEventHandler>().isFound == true) { GetComponent<RawImage>().texture = known; GetComponent<Button>().enabled = true; transform.Find("RawImage").GetComponent<RawImage>().enabled = true; transform.Find("Text"...
0
731a913e7233fb4fb2140b31ff758cf5
482f9ef31517cb661cea1a889b1d1ea9
Get all bids with brigade info
public function getAllBids();
0
2fac32ec581a467fe9d88e40316fc6fa
eaceea920e28f0819f8ff4bdfc50362f
Get all URL components
class AnyUriTypeComponentBuilder public function getComponents(): array { return [ $this->getUri(), $this->scheme, $this->getAuthority(), $this->userInfo, $this->host, $this->port, $this->path, $this->query, ...
1
753dc0deef1063aa383eecadec7cbc10
560c10c65ff1d9746de58ee298861237
Send a localised text message to all clients without the server login. The parameter is an array of structures {Lang='??', Text='...'}. If no matching language is found, the last text in the array is used. Only available to Admin.
namespace UwuNet void SendMessage(string msg, Options opts = Options.LAN);
0
cafb0eba21a7568d172f9fc11368cd1e
17d1fa6e10a5a72a38b4b8edecbb36dd
<p> Determines whether or not specified types satisfy the bounds of their mapped type variables. When a type parameter extends another (such as <code><T, S extends T></code>), uses another as a type parameter (such as <code><T, S extends Comparable<T></code>), or otherwise depends on another type variable to be specifi...
if (!(typeWrapper instanceof WildcardTypeWrapper)) { return typeWrapper; } if (typeVar.getBounds().length == 0) { return typeWrapper; } WildcardType wctype = (WildcardType) typeWrapper.getType(); boolean unbounded = wctype.getUpperBounds().length == 0 || wctype.getUpperBounds().length == 1 &...
0
93ac49b75193e7c46bc89bf0559fcceb
59c0b2b1b55823479bfa520fe7e65e36
使用switch完成:模拟计算器操作:输入第一个整数,输入第二个整数,输入运算符(+-*/),打印结果
public class Test6 public static void main(String[] args) { System.out.println("输入一个计算表达式:例:1+2"); Scanner scanner = new Scanner(System.in); String s = scanner.nextLine(); String[] ss =new String[0]; if (s.split("\\+").length >1){ ss =s.split("\\+"); I...
0
d0c48085fe3ccb67a6c20d3dd9b0dc02
7c716ecfb63c6cc440de8ee18bae5bcd
Gets a value indicating whether a specified annotation value is valid.
namespace Microsoft.Psi.Data.Annotations [DataContract(Namespace = "http://www.microsoft.com/psi")] public class AnnotationSchema public bool IsValidValue(string value) { return true; }
1
ecd0094c1726cb58c794e4098a04a6ed
46903ebb5a03792d68cd6b9a7724c2ad
eventからpageX/Yを適切に取って返す
function getPage(event) { var event = event || window.event; return { pageX: event.pageX || event.clientX + document.documentElement.scrollLeft, pageY: event.pageY || event.clientY + document.documentElement.scrollTop } }
1
aceb00e09198ddded26c43577bbe8bd6
7c21efeeb9a1ceb52118c1773281a034
Calls the notifications manager to handle turning on/off notifications depending on the status chosen by the user
CheckBoxPreference enableNotification = (CheckBoxPreference) findPreference(NOTIFICATION_ENABLE); CheckBoxPreference restrictionNotification = (CheckBoxPreference) findPreference(NOTIFICATION_RESTRICTION_ENABLE); restrictionNotification.setEnabled(enableNotificati...
0
673b1c90f5aba20079b7d827c4b7520e
2dd877eb9046962ca65d6fb9a2e43d01
Method to request the survival analysis be performed.
def execute(args): vars_dict = io.fetch_args(args) vars_dict = convert_survival_matrix(vars_dict) io.save_population_csv(vars_dict)
0
f49cb3b44a9d75aafb990a2c772b7782
39524155997b08eebce6930f3a20a94c
draws a texture mapped sphere
void sphereTexture(){ glPushMatrix(); glTranslatef(-40.f, -40.f, -400.f); glCallList(SPHERE_TEXTURE); glPopMatrix(); }
1
af3b37bbd3c5090af5d8bc50d3c20832
b7c8f5bca84e2fa8c07fac0191037065
POST /test_type_versions
@answer_type = AnswerType.new(answer_type_params) if @answer_type.save redirect_to @answer_type, notice: 'Answer type was successfully created.' else render action: 'new' end end
0
903d836149d1e2eb46a5713b68729a66
b62beb59098faef3c45cde941781e9c7
змінна, що визначає чи поставили мінус
public class Main private static boolean isMinus(int Negative) { boolean res = Negative < 0; return res; }
1
5ea96700fc711d1971bdc756db89c9f5
21d42874a47faebc9ea3b1bb872ed953
Show some initialisation statistics
void Transporter::stat() { m_print.diag( "Mesh statistics: min/max/avg(edgelength) = " + std::to_string( m_minstat[0] ) + " / " + std::to_string( m_maxstat[0] ) + " / " + std::to_string( m_avgstat[0] ) ); m_print.diag( "Mesh statistics: min/max/avg(V^{1/3}) = " + ...
1
7532d61cc779567d25d4e305f1da48af
eef719881be650b5a9af2c283b3b936e
Creates a new MapServer instance
function Map() {}
0
d7f4785895e011a24cdaee220a24922e
3781f3207baeae48d693b188111359f8
Replenishes power bar
public class PowerMeter : MonoBehaviour public void AddBtnPower() { gaugeDecay = false; StartCoroutine ("AddPowerTotal"); }
1
806202eacc38b1924be3af818ad0d535
421648d31c1acb88d1da5004df0c4116
Moves the enumerator to the previous element of the hashtable's list.
namespace Vanara.PInvoke public static partial class Opc [PreserveSig] HRESULT MovePrevious([MarshalAs(UnmanagedType.Bool)] out bool hasPrevious);
1
9a0ebc23f81d93167c2fa7e15e4b07ad
bd585ed406a66a0714d95b51aa4d0924
获取本地视频列表
$timeout(function () { picture.getPictures('video').then(function (data) { if (data.errCode === '0') { $rootScope.videos = data.message; } else { dialogs.openAlert('数据管理',data.message, '确定', '') } });...
1
9114cb593b3db3f7ce121ba42a1d3705
0d1edee89809b347df175587a4a4326c
Test API cannot delete flight for regular user (DELETE request)
self.user.is_staff = False self.user.save() response = self.client.post(reverse("flight-list"), self.data) self.assertEqual(response.status_code, status.HTTP_403_FORBIDDEN) self.assertEqual(str(response.data["detail"]), "You do not have permission to perf...
0
080d2729e45f0e59c3df4fa96e10e1ec
0ccb6d927b0e25cd92a66a7f516dfbfb
set public methods here that may be called from outside.
class Yapoo def internal_use; end
0
7fcedf329e7efffb3a4b6adadf50236d
ae83c4b31ec397a5761e2576d03c1dc5
Define a global constant. Uses the corresponding Java method on the Ruby class.
class Module def const_set(sym, obj) end
0
3b9e45b90777b4b71b4eda0a218fe58d
20cf7915e1742c561a2da079a1cf9f6a
set the size of the document
{ doc.PageHeight = height; doc.PageWidth = width; return doc; }
1
80afef6ea1bcec55d08c7c648e6e2038
1124e194b15bb53d154b145f9579f8db
# Nettoie les données manquantes en remplaçant par les modes ou médiandes les plus fréquentes
replaceWithMode <- function(v) { mod <- names(sort(-table(v)))[1] v[is.na(v)] <- mod return(v) }
1
5af0c56002c7acaad50813209a40e565
d6441cdf4033bb08081076ecf94c4e16
从返回的header中解析object的metadata信息
func IncomingHTTPRequest(r *http.Request) Metadata { md := Metadata{} for k, vs := range r.Header { if strings.HasPrefix(k, xPrefixKey) { md[k] = strings.Join(vs, ",") } } return md }
1
ef36c963d4a569a85341312de52efe6e
6aadccd2ec45ca1408f100224c648ba1
check the read_only fields are really read_only
class TestScribusUtils(ERP5TypeTestCase): def test_06_readOnlyFields(self): self.portal.ERP5Site_createModuleScribus( module_id="dummy_module", module_portal_type="Dummy Module", module_title="Dummy Module Title", import_pdf_file=self.makeFileUpload('test_field_properties.pdf...
1
1cb79a8d6a024822512ece875b88fad1
4982114a90a81e9a4ca665f44eb07c74
Parses lines of strings to a shortcut object by splitting the entries with the delimiters comma and semicolon.
class Str2List(DSCEntryParser): def __init__(self): DSCEntryParser.__init__(self) self.regex = re.compile(r'(?:[^,(]|\([^)]*\))+')
0
fec47d7025f0260152b1afbf507a014e
ff9be34a7f8bf0c77ad6b34c7b21f1c5
Applies a service to a domain.
def application(environ, start_response): global domain return domain.service.request(start_response)
1
e9504d19da0fe2311d14baebf17c3d71
8a264c7015b6b5d8fb678a8db1508786
Loads the argument to be passed to managed functions In by-ref scenarios (ref T), it is &T
namespace Chela.Compiler.Semantic public class FunctionGenerator: ObjectDeclarator private void LoadCurrentSelf() { builder.CreateLoadArg(0); FunctionDefinition defNode = currentFunction.DefinitionNode; if(defNode != null && defNode.IsGenerator) builder.Cr...
0
d30861a75fc1efab2341fdd745efde5b
90d9f185060d17954053725730093a04
绑定银行卡检测
if(!MValify.realName($("#userRealName").val(), "userRealName")){ return; }else{ AlertDialog.hide(); } if(!MValify.cardCode($("#certificateNo").val(), "certificateNo")){ return; }else{ AlertDialog.hide(); } if(!checkBankCardCode("bankCardCode")){ return; }else{ AlertDialog.hide(); } if(!checkPhone(...
1
d00a428a1f59eedb4e207f91450448d0
88dda6c028884efa2dbb51c6e42d9ff9
函数功能描述:插入[TB_BID_SUPPLIER 中标供应商, 序列seq_bidsupplierid]
Integer insertTbBidSupplier(TbBidSupplier tbBidSupplier);
1
3923274d646fc807faa05b4d768789e3
70634026c0ac505fe0a00bd014b84f94
Method that allows you to convert the DoublyLinkedList into a String easily. Primitive right now. (output is rather ugly) === Representation Invariant === We assume that the content of each _Node can be converted to a String already. @type self: DoublyLinkedList @rtype: str
rep = "" current_node = self.head while current_node: if current_node.get_value() != None: rep += str(current_node.get_value()) rep += "\n" current_node = current_node.get_link() return rep
1
148c74b99283e967d185a8b78ae85428
e1f06af9fe1bcc379d0640286198ac8a
Plots the time taken to calculate features only (ignoring model prediction time), with time on the y-axis and window sizes on the x-axis.
def plot_features(booster, figsize): fig, ax = plt.subplots(1,1,figsize=figsize) return plot_importance(booster=booster, ax=ax)
0
a8cdb308995670b251646d91ab689efc
46b14c80ecc037f0c3239d7c8879b153
测试: 验证根据一个数列出该数的倍数
n = 1 while n <= 10.0: print('Multiply by', number, n, '\t', n * number) n = n + 1
1
018011737cfe1ce035d97a56e7f641cd
a4608ebe139e725683e048b33ab63972
Get the first child node or <code>null</code> if no child is present
TreeLinkedList getFirstChild();
1
726f04afcf6115eee15529e340739382
e19a102b47725b17e53274ec21a154b1
根据Source生成查询总数sql
if(StringUtil.isEmpty(sql)) { return ""; } StringBuilder sb = new StringBuilder("select count(1) "); sb.append(sql.substring(sql.indexOf("from"))); return sb.toString(); }
1
322dd41872a0679fc2340aedfd9e1a9b
bbabcaadbd76c37321908f3606a42232
Deletes the committee member.
class CommitteeMemberController extends AdminController public function actionDelete($id) { $this->loadModel($id)->delete(); if (!isset($_GET['ajax'])) $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('admin')); }
1
a06d8a5c487983ee0ff1f914a8f746bf
ef8af6459ae553c5b5f3bdad78cf2695
重置各分类文件列表文件总大小
@Component public class FileRepository implements ServletContextAware private void resetUploadProgress() { ThreadLocalUtils.getRequest().getSession().setAttribute(TOTAL_SIZE, 0l); ThreadLocalUtils.getRequest().getSession() .setAttribute(UPLOAD_SIZE, 0l); }
0
16464675d93a59d39d6db650d575d1af
3704695c5cb3b7a7a4922349b0f75cd4
Test that all of the permissions survive initialisation.
log.info( "Testing Zeta PermissionGroups ..." ) for permname in userscomp.get_permname() : pg = 'defgrp_' + permname.perm_name.lower() pg = userscomp.get_permgroup( pg ) assert_equal( pg.perm_names, [ permname ], 'Permission name and its `defgrp_` does...
1
a9c2f24956c9c1b210fb30700f08ef82
1a33cabe265781e26bedd58135f657b3
Handle product sale creation
{ $this->methodPost(); $errors = $this->validate( $_POST, [ 'member_id' => 'required', 'payment_method' => 'required', 'stocksale_id' => 'required', 'quantity' => 'required' ]); if( $errors ) { echo $this->errors(); return; } if( !isset( $_POST['stocksale_id'] ) ) { array_push( $th...
1
b5e972643b0521c1a7f94cd4427cc68f
a558c378531d8ecc8f92d9d386a44b80
hasKey checks if the given string map contains the given key
func MapContains(src map[string]int ,key string) bool{ if _, ok := src[key]; ok { return true } return false }
1
4a7382b895c63bc1209c32072eafe9b7
436e4886a4081a62dcd9a7526f393a33
敌机下移
class EnemyPlane(object): def move_down(self): self.enemy_img_rect.move_ip(0, self.enemy_speed) if self.enemy_img_rect[1] > core_data.SCREEN_HEIGHT: self.reset()
1
e6f0e2909b9f65740b53a312961b875b
a019805fd2de14e3a22f7e5caa1390e6
Removes inert and aria-hidden attribute from sibling elements
const overlayContainer = this.overlayContainer.getContainerElement(); if (overlayContainer.parentElement) { const siblings = overlayContainer.parentElement.children; for (let i = siblings.length - 1; i > -1; i--) { const sibling = siblings[i]; if (...
0
29282353b8d147cd2b066e8f211c290d
dc6a9e7887f7b1524e80cde7570eac89
Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem. Will remove the appropriate germling from the farm's inventory. It's up to the logic to only call this on a valid location.
public final class MithrilSeeds public static void plantSeed(Player player) { if (player.isPlantingMithrilSeed) { return; } if (!player.getInventory().contains(299)) { return; } int select = NumberUtil.random(FLOWER_SCENERY_ID.length); player.isPlantingMithrilSeed = true; player.getInventory().remov...
0
1b6a5fedae012c3bba8143fdbd6787c7
c3cf1676f15e89e84a0a0c4a65d90cd5
根据模具型号号获得模具型号
namespace ClassLibrary.Repository.Implement public class MoldTypeRepository : IMoldTypeRepositotry public MoldType GetById(string moldTypeId) { MoldType moldtype = context.MoldType.Single(type => type.MoldTypeID.Equals(moldTypeId)); return moldtype; }
1
33f17df89fe4bb8e1b92ef3ee8e84eed
54805d3fa2e55e6bed68b5257ed50b3a
质量压缩,默认压缩到 500K 以下
const options = { quality: 0.90, noCompressIfLarger: true, ...opts } return compressImage(file, options) }
0
027d1fbd56bed2300d8fe5ee03fec4af
8e28f36afcf640f2eaf211865d0ab5f7
The more detailed status of the L2 network.
class DefaultCniNetwork(pulumi.CustomResource): def detailed_status(self) -> pulumi.Output[str]: return pulumi.get(self, "detailed_status")
1
855600ba12011a1789184b7e8d2dc05f
d01c4e4bc98749ed27eb8e08d2521d06
如果不使用goal,则直接返回
class GoalEnvWrapper(gym.RewardWrapper): def __init__(self,*args,**kwargs): if "indices" in kwargs: self.indices = kwargs.get("indices") del kwargs['indices'] else: self.indices = None super(GoalEnvWrapper, self).__init__(*args, **kwargs) if self.indic...
0
d66f2136534856ef140c7884483bd3ec
add9fc239da523efbbf11bf460bcb10b
設定學生的組別編號
class Student (Human): def set_group(self, group): self.group = group
1
6b573d559a46758ef394c574e88aad72
6b83515551e14de8947775309a1fcdbb
Сортировка по типу изменения
namespace RollMetCalc public static class Result public static void SortOrderByType() { foreach (Assembly asm in CurrOrder.AsmList) { foreach (Part part in asm.PartList) { if (part.Material == "Алюминий") { ...
0
15a73cbc00f930ddb2027ccfdfef806e
8f99404432adef2b9116e0bd7eb7c9f4
Calculate time between calls for animation
let deltaTime = (currentTime - lastTime) || (1 / 60); deltaTime = isNaN(deltaTime) ? (1 / 60) : deltaTime / 1000; if (deltaTime >= 0.2) { deltaTime = (1 / 60); } return deltaTime; }
1
4c7622c9a1dd1860ca7b32518e3f71d9
e3765cf4b962c8bf0a259730533a5080
Translate problem to standard conic form
namespace solver void ConicProblem::buildProblem(int iter_id, bool warm_start) { numTrustRegions_ = 0; numSoftConstraints_ = 0; int row_start = 0, row_offset = 0; int mextra = objective_.extraVars().size() + soccons_.size(); for (int id=0; id<(int)qineqcons_.size(); id++) { mextra += qineqcons_[id].coeffs(...
1
9e3a42f2da848960c00990c2cbd9420f
fa1eb50a9c6cb9c5dfadc4226785e892
Retrieve the data that AT+CESQ provides
AT_DRESULT standard_at_cmd_cesq_get(PUART_INFO_CTX dev, standard_cesq_rep_t *val, unsigned int timeout) { unsigned int at_n_vals, at_val_index; char *atvalues[20]; char *atvalue = NULL; char *tmp_str = NULL; if (timeout == 0) { return AT_RES_ERROR; } internal_log("SendData: %s\r\n", CESQ); if (send_at_comm...
1
1e1324f16d9ea0cf531f1cca111efac4
410a5f683734d81afcb17cafcb702bd6
数値配列の要素に奇数が含まれているか
namespace DataStructures.Continuous public static class ContinuousSet public static bool OpOdd(bool[] bools) { return bools.Aggregate(AggOdd); }
0
5ba414e8a0a70c621c8f2686c629b825
26ae4d957c570734042f2943946706c4
让用户选择是否打这个电话
public abstract class Base_activity extends AppCompatActivity implements IUIOperation private void show_ansdialog(String type, String key, String value) { dialog_text_answer = new Dialog_text_answer(this); dialog_text_answer.set_on_refuse_listener(new Dialog_text_answer.On_refuse_listener() { ...
1
f09993faf80dbfe8e21f5d47410b5c74
32bfdf70f3e09a76c32f10768c5a92e0
点击我的手牌
class BasePokerPage extends MatchPage protected setMyCards(isSendCards: boolean = false): void { var player = BaseGameData.getPlayerDataBySeatid(BaseGameData.selfSeatid); var cards: Array<number> = player.handCards; var card: poker.CardBigUI; for (var i: number = 0; i < cards.length; i++...
0
c4832721c5507b112c49d42ed926f81e
79dd956f731059508cb315eb5af65b04
This method clicks on rememberme check box.
namespace SeShell.Test.PageObjects public class LoginPage public static String RememberMe() { return LoginPageResources.RememberMeCheckBoxID; }
0
ae37674ebbdd224891b7cd4ae6d03758
3ac8d96d511d64e86b4d14beb7c95e43
Creates a new intersection record indicating whether there was a hit or not and the object which was hit.
CollideBox targetCollide, ref CollisionResult result) { totalCollidingCount++; float? distance = sourceCollide.Ray.Intersects(targetCollide.BoundingBox); if (distance != null) ...
1
eecb90cdc83f8f40e9ea3ccf34646e36
9abf83152736bf5a1b96fd85add18abe
Nếu tồn tại admin
$stmt = $this->con->prepare("SELECT `admin_id` FROM `master_admin`"); $stmt->execute(); $stmt->store_result(); return $stmt->num_rows>0; }
1
f732e3d9edd5595a2917790cef617542
c56f244d1dc59a7ad90e03a08e10004e
Sets a string-type config item's value.
namespace eIDMW void CConfig::SetString( tLocation location, const struct Param_Str param, const std::wstring &csValue ) { return(SetString(location,param.csParam,param.csSection,csValue)); }
1
3ac39d80261ebfef2b4eadee70d7db19
8b1fc029c6cae63e00ee97c9844f728f
GET: Shop/Categories
{ var output = data.GetListOfCategories(); ProductViewModel productViewModel = new ProductViewModel(); productViewModel.CategoryModels = output; return View(productViewModel); }
1
fb831f3da79bea4519a9b4dc8503e7a0
ffb5d0a49da3f2d2a7f153274a38902f
Function based view used to display the details of a bike object
class BikeController extends Controller public function show(Bike $bike) { return view('bikes.show', ['bike' => $bike]); }
1
1a711a1caaca7fed9c1a37eccb103e02
f7f6b8e567d2b68de59bd23180bdc299
插入默认配置超时检查
if (angular.isNumber(nTimeout) && nTimeout > 0) { oDefaultConfig.timeout = nTimeout; } }
1
2c89518c933b01586baf2dc4801da58b
aa805bb598d6155e49012135d36a1843
Listen to a lot of chunks and deduce the rms threshold.
def calculateAudioPeaks(audio, chunkCount=256, dbCeiling=64): if len(audio) < chunkCount: chunkCount = len(audio) chunk_length = len(audio) / chunkCount loudness_of_chunks = [ audio[i * chunk_length: (i + 1) * chunk_length].rms for i in range(chunkCount)] max_rms = max(0.0001, ma...
1
dadefee4b277122d989f6eaa4d921108
5a281944f2d32cc0ffbf88641f2d5e3f
登录视图函数:获取二维码并在页面显示
qr_code = requests.get("https://mark.changyou.com/UQRCodeImage?from=web_auth&action=login&imgType=&imgWidth=128&imgHeight=128&random=0.4145753824385646", timeout=2, headers=header) if qr_code.status_code == 200: fb = open("qr.jpg", "wb") fb.write(qr_code.content) fb.close() qr_im...
1
634d47e30706a5b07a9d6789e0d35a7d
98ced185dbf63d2c41a2b7cb2d00ab2b
Opens "Home screen" in the middle screen. All the screen stack is destroyed.
class TinyDecred(QtCore.QObject, Q.ThreadUtilities): def home_(self): self.appWindow.setHomeScreen(self.homeScreen)
0
265225984923b2d210c417a96f696080
e931ad73cb440f6948b0d3323c58f730
יוצר את לוח המודעות
{ ctx.fillStyle = "black"; ctx.fillRect(650, 20, 130, 70); ctx.lineWidth = 3; ctx.strokeRect(650, 20, squareSize+80, squareSize+20); ctx.font = "25px Arial"; ctx.fillStyle = "white"; ctx.textAlign = "center"; ctx.fillText("נקה לוח",712,63); }
0
c4aff1f1964aba160a6a1e2b9700f68c
beeedbe11400fced3f08039776801d0c
设置内容是否为空的的监听事件
abstract class AbstractAdapter<VH : BaseRvViewHolder<E>, E> : RecyclerView.Adapter<VH>() fun setOnEmptyClickListener(lis: OnEmptyClickListener) { mWrapper.mEmptyClickListener = lis }
1
bcd94818015441a78d606c98e591269a
a8753fb09a96f0484581779c09c8fc75
将seatMap的行转化为string
function exportSeatPlan() { var str = ""; for (var i = 0; i < selected.length; i++) { str += selected[i]+','; } return str.substring(0, str.length - 1); }
0
3be4cb7ff8f4e0fbc556562089ce12cd
24f93cd370f01892ec287207559a8c01
get the node-type based on service-profile prefix.
def get_profile_type(device_id, profile): result = adc_collection.find_one({'name': profile, "code": "lpr", "deviceId": device_id}) return result and result['type'] or ''
0
edb980b7a6ab6b829b52b8f030bf5c82
41a423c4a57240f6160dc043359dc351
The callback for rendering the settings page
echo '<div class="wrap">'; $errors = get_settings_errors(); parent::render_header( $this->args['menu_title'] ); if ( !empty( $errors ) ) { $errors = array_values( $errors ); if ( isset( $errors[0]['code'] ) && $errors[0]['code'] == 'settings_updated' ) { $this->update_slugs(); } } pa...
1
b40fac3c46f8bcb92aa2dc5885b42b8b
7c8953b2d2a705b1583167a1e201ec59
menyediakan sebuah transformasi pada x-axis kedua ticks labels. Returns a tuple of the form (transform, valign, halign)
x2 = ax.twiny() x2.set_xlim(ax.get_xlim()) x2.set_xscale(ax.get_xscale()) x2.set_xticks(ax.get_xticks()) x2.set_xticklabels([]) x2.set_xbound(ax.get_xbound()) x2.tick_params(direction="in", which="both") return x2
0
94ec1a9409bc43efe925f1a79e328536
43e8cfa53b7b96972920d0743727fd0b
기준통화 데이터 목록을 리턴한다
public class LoginInfo implements Serializable public List < String > getRefCurrencyList() { return refCurrencyList; }
1
111b5b80382c6b5cea93da260602a18a
5f1ea4f9ddf0f9c4fb1093150bd17327
funkcija koja ce skrolovati na dole automatski pri pisanju poruka, a ukoliko smo mi skrolovali malo vise na gore(iznad poslednje poruke), nece nas spustati dole kada dodje nova poruka
global writeMessage if writeMessage == True: nicknameFile = open('users/current', 'r') nickName = nicknameFile.readline().rstrip('\n') nicknameFile.close() messageText = str(self.textEditWriteMessage.toPlainText()) self.textEdi...
0