query_id
string
corpus_id
string
query
string
code
string
label
int64
1095aeeab9c5b8739ce7c46ff65776f5
5a25930f98e9db817b9d63c200a3431e
Releases the engine when it is done rendering the current frame.
namespace CssUI.Rendering public abstract class RenderEngineBase : IRenderEngine public abstract void End();
1
5b083d7c3de385e7daaf34475ef92bde
a6914bb8400a5a2e5897f071bb6ad434
initialize the door menu.
public class DoorManager : MonoBehaviour void Start () { }
0
f18d33572498871d8fa0dc1050b8b5cb
4f4353deb87ac8b2b7d441bcad75472c
Compute the matrix product of two tensor variables.
namespace TorchSharp public static partial class torch public static Tensor matmul(Tensor input, Tensor target) => input.matmul(target);
1
d6fbfe50e8edc37d10cf413e0031e53b
d725999022e7eb3387c48938f9c870cc
获取发送数据的节点MAC地址
do { MAC_SendData(txBuffer,0,BroadcastAddr); OS_Sleep(50); }while((MAC_NP_R & MAC_NP_NPR_M) == 0); MAC_PacketGet(txBuffer, 12); sa[0] = txBuffer[6]; sa[1] = txBuffer[7]; sa[2] = txBuffer[8]; sa[3] = txBuffer[9]; sa[4] = txBuffer[10]; sa[5] = txBuffer[11]; }
1
bafdd06a342b3ad47fb20e1e9976bf4e
62b90032dffb851c1413124c6aa614e7
Read paymentinformation from datastorage
public class ClientManager public static PaymentInfo getPaymentInfo(String userID) throws DBFailureException { return databaseAdapter.getPaymentInfo(userID); }
1
a606b681435cb2b3f8288ee7545b5bbb
a6b777109571b85ecff01460ae0af63e
this method checks whether the pin number the user enetered at {@link #enterPin} was valid if the pin was valid the profile screen will continue to load if the pin is not valid the dialog fragment will be shown to allow thw user to try again
boolean pinIsValid = false; int invalid = 0; int loginAttempts = 0; while (!pinIsValid) { if (++loginAttempts == 4) { printTooManyAttemptsMsg(); logoutOfCurrentAccount(); break; } printEnterPinNumberMsg(); getPinNumberInput(); pinIsValid = pinNumber != invalid; if (pinIsValid) { ...
1
b45b18022abceef098809e4d74641157
82ef24244598524ddd6608be0a92c72f
Ends the asynchronous request with retry.
namespace Amazon.MigrationHubOrchestrator RetryWorkflowStepResponse EndRetryWorkflowStep(IAsyncResult asyncResult);
1
12587643579ce12edd710b23307098a4
9b8b491b2f6af81a3fd336bb549a7e88
Método que devuelve la descripción asociada a la naturaleza de la cuenta.
String getNature();
1
3ebaccd8817f12a56719668993f7b168
2b79751b7cf171f24d474075c5e55b5c
紀錄捐贈與否
function GuildModel:setGuildDonateStatus() self.donate_sum = self.donate_sum + 1 self:updateGuildRedStatus(GuildConst.red_index.donate, false) end
1
ed9c16696b1c77a6119e2b07e4f513e7
3b16ee4c2ff8f33372d1f277e00ae292
从弹性云服务器中卸载磁盘。 Please refer to HUAWEI cloud API Explorer for details.
const options = ParamCreater().showInstanceDisk(showInstanceDiskRequest); options['responseHeaders'] = ['']; return this.hcClient.sendRequest(options); }
0
6b0e2cb153cc91f6aca0fc8f8c1197b4
bdb89cd6082c887fb85b4f57f7eae1b3
Renames the dimensions of the data cube.
public StatuscodeMap rename() { MapValue data = getCreateModifyData(); return dbUpdateMap(Dim.DB_SOURCE_MYSQL, SQL_NAMESPACE + "rename", data); }
1
ff6eeff954d9e0617ef04afeb608031e
6452332178b16fc2a787e63ae80f988c
根据listbox内歌曲名判断播放暂停
def click_one_play(self): global judge_name music_name = o1.get(o1.curselection())+'.mp3' music_name_j = music_list[judge_name] if music_name != music_name_j : pause_resume.set(value='播放') elif music_name == music_name_j : pause_resume.set(value='暂停') else: pass
1
61b1faab84de5f05d2db613332bc43ad
0ec89ca8d63e0d2276c5f13d992187a9
根据II_Instance_DocID删除II_Instance_Doc对象
namespace CMSService public partial class CMSService public bool CanIIInstanceBeDeleted(string iiInstanceId) { try { List<SqlParameter> listPar = new List<SqlParameter>(); listPar.Add(new SqlParameter("@iiInstanceId", iiInstanceId)); st...
0
ab454c353e52a0db0134a2f95f7793e0
96de4d22affdf4f5dc75500bf24b4696
启动osgi容器
void startContainer() throws BundleException;
1
e0f54decd43649d1fab176fb8f70b029
b0c0334fc1fa57ad09c8b8374cdd3bc2
Construct a new FuzzyDict instance items is an dictionary to copy items from (optional) cutoff is the match ratio below which mathes should not be considered cutoff needs to be a float between 0 and 1 (where zero is no match and 1 is a perfect match)
self.used_elements = set() self.items = items self.index = 0 self.ignore_case = [kwargs[key] for key in kwargs] if len(kwargs) > 0 and kwargs['ignore_case'] is True \ else False
0
036c10432e47fe6c911b4f2bc04716df
e7ed8c9494d19bafa1619e20b4d6b252
Terminate any events that are still running.
class StrongholdRobot(wpilib.IterativeRobot): def disabledPeriodic(self): self.running = {} self.vision_terminate_event.clear()
1
e76cf24e7cf0f00b606854dd51f70fd3
d9eb1845534b4119118df32b00c7cd7c
Increment value in given register
void F_INC_I(BYTE reg1) { Index_Registers[reg1]++; set_flag_z(Index_Registers[reg1]); }
1
fa07126bc60cda794dfbef5bf7f03c82
49d2fc1ac5e62f6dc4156dde641c912b
Returns all objects that are considered as profiler overhead. Objects are hardcoded for convenience.
{ return array( ProfilingFlags::CPU => TIDEWAYS_FLAGS_CPU, ProfilingFlags::MEMORY => TIDEWAYS_FLAGS_MEMORY, ); }
0
c0f3a17449661105e987450f5b2d01ba
76d703c803a87c7f1fab630d92e6d0e1
<include file='doc\Size.uex' path='docs/doc[@for="Size.ToString"]/*' /> <devdoc> <para> Creates a human-readable string that represents this <see cref='System.Drawing.Size'/>. </para> </devdoc>
public override string ToString() { return FormattableString.Invariant($"{Width}, {Height}"); }
1
c313d51bdfb3ecf6604635c20828c5a1
da5936fa4a95dbc38dc61313384a5fd3
Aktuell ausgewaehltes Entry der Markierungs-Liste zurueckgeben
public function getCurrentEntry() { $id = $this->getCurrentEntryId(); if ($id === false) { return false; } return $this->getEntry($id); }
1
fe5ceefa7f19a4db40f1b1bcd41d40a7
b61504445193ca858e6e659d68052093
First Brillouin Zone
def brillouin(): return Square(Point(0., 0., 1), numpy.pi * 2.)
1
c523364d13b1d8f42c3307c16ce394a6
3a511ca7eac1e4fd782afbc922794a27
{{{ preProcess() アクション実行前共通処理
class BaseController extends SpController public function preExecute() { $this->form->setTemplateDir(APP_DIR.'/templates'); $this->form->setCompileDir(APP_DIR.'/templates_c'); $this->form->setSmartyPlugins(APP_DIR . constant('app_smarty_plugins_dir')); $appconst = get_class_vars('AppConst'); $this->form->set...
1
a7d0601643d9c58012044222d4bc30f0
5963789312256bb99690406c7e16224e
Обобщённый метод для печати массива.
public class GenericMethod public static <E> void printArray(E[] inputArray) { for (E element : inputArray) { System.out.printf("%s ", element); } System.out.println(); }
1
2210d2a737faa8f70b85bec67532732c
520a53fe454b3038cc4a9a49b97aaf0a
check input data and label.
class LogisticRegression(Classifier): def _check_input(self, X): return isinstance(X, tuple)
0
5cd1ddf54a0ddd31ba3161ff6ea88ac8
921cdf37917dd7769df1fce34a4ede40
Tests für das Lösen von linearen Gleichungssystemen
def testEquations(): e = """ A1 + A2 = 3 A1 + A3 = 4 A1 + A9 = 10 A1 + A2 + A3 + A4 + A5 + A6 + A7 + A8 + A9 = 45 """ equations = createEquations(e) puzzle = "123456789....63....9....23..76.3...2..2..4...........1...9.7.....1.267....8....64" for index, equationList in equations.items...
1
b142348301638e560f2e59c345a224a5
6bcf83b60a9ef389d8d378696f94418e
Swim idly.
public class AITrooper : AIEnemy private void Idle() { if (debugStates) Debug.Log("===== IDLE ====="); enemyMoveable.Accelerate(Vector3.forward, accelerationIdle, maxSpeedIdle, debugSpeed); enemyMoveable.StrafeTowardsConstPos(idlepos + enemyImprecision.randomImprecision); SetToChaseIfPlayer(); }
0
e42aec1023fc350706a02a6b8f2c59f4
243654e45e552a102a9c54c388da09d9
Fonction d'activation ReLU.
class neural_net: def activation_relu(self, val): return tf.maximum(val, 0.00)
1
15f8ad511967027a074d94a0fe60df0a
0cd374944307b3f76294b8f27c1a63a6
Retrieve a citation by Library of Congress call number
library_book = self._retrieve_book_by_call_number(call_number) if library_book: library_book.increment_number_of_copies() return True else: return False
0
c3d02f0a9a6f2196c2b8c045f11319df
077640cd7c7458ee2ace3593a3ca6b0e
Function to save IP address on login
void saveLoginIPAddress(Integer empNo, String ip);
1
41c92be9f31b3c7931798946f5446ed6
72572304f470187f3082367e213e9cad
The amount of cost or usage being measured for a budget.
class BudgetCostFilter(dict): def name(self) -> str: return pulumi.get(self, "name")
0
25f7244ad4adddfd31bf94eea8cc5fe1
14004829c772cd2dd83added6d7afdd8
Handles the POST request for the Program Admins overview page.
def admin_page_post_handler(): if list(request.form.keys())[0] == 'users': user = request.form['users'] start_date = request.form['trip-start'] end_date = request.form['trip-end'] return driver_week_summary(user,[start_date,end_date])
1
1593e96ef02006dda43525855a852f4b
7741bdc7368ed0176cc2c3614ecb584b
Affiche le nombre de coups restants et les états des boites
public String situationToString(){ System.out.println(""); System.out.println("Représentation des allumettes restantes :"); String situation = "Il reste "+taille_courante+" allumettes"; String allumette = "---๐"; int cpt=0; for(int i=0;i<taille_courante;i++){ cpt+=1; int reste=ta...
0
4d6832708f6c99092b8b33e41cec8546
6a2698fc3d9135eed158e1ce009fdef7
Loads the recorded calls for the specified recording.
public class CallsApi public List<CallRecording> getCallRecordings(Long id) { return getCallRecordings(id, null); }
1
35c89d1b17b5e6f6e18e884c93b70b4c
5efe0a238694d496692a0324e60d66b8
Set a property of the top open object to a MultiUnicode value.
namespace SIL.FieldWorks.FDO [ComVisible(true)] public abstract class SdaDecoratorBase : ISilDataAccess public virtual void SetObjProp(int hvo, int tag, int hvoObj) { m_baseSda.SetObjProp(hvo, tag, hvoObj); }
0
09c7465d2f7cb03e3b130354025dc6b1
11acb7e9f73de8ff9b7d67e8aef5e2c7
高级查询:设置时间小于等于查询条件
whereClause.append(LESS_THAN_EQUAL + " '" + value + "' "); return this.where; }
1
3ad8f1f5096a8a7e46ce64d6d35e6df5
1ae175884ce6893ffb49500275e7ea0d
SmartPlantEater
int main(int argc, char** argv) { SmartP(); return 0; }
0
ef5af22f7961e54add384442feaabfed
cf0f58dfdb842b5e8caaf8b206bc93c0
Функция отрисовки страницы расширенного профиля
users::o()->check_perms('profile', 1, 2); $lj = $cols = ""; if (users::o()->v()) { db::o()->p(users::o()->v('id')); $cols = ", z.id AS zebra_id, z.type AS zebra_type"; $lj = 'LEFT JOIN zebra AS z ON z.user_id=? AND z.to_userid=u.id'; } $row = d...
1
1bbd86ae05dc28c9655a41b123951e59
e204a110f0d6d45ecfac235f60cacdd1
More: https://docs.cometbft.com/v0.34/rpc/#/Info/block_by_hash
class CitaClient: def get_block_by_hash(self, hash: PARAM, tx_detail: bool = False) -> Dict: hash_str = param_to_str(hash) assert len(hash_str) == 64 + 2 r = self._jsonrpc('getBlockByHash', [hash_str, tx_detail]) return cast(Dict, r)
1
c842e95d283f54ce6bd9ec9f06db2f2a
dd45a3967322e9b1d8bbf5a2e85cf5d3
Quest size update (when changing slider)
function jqUpdateSize(){ var width = $(window).width(); var height = $(window).height(); $('#jqWidth').html(width); $('#jqHeight').html(height); }
0
823b23b8943e47bd6d5190c161b9483e
c17eaf6b68ad7c811b16bd5ae0c977b3
线类
class Start(object): # 创建类 def __init__(self, lin, n): self.lin = lin self.n = n self.bian = self.get_bian()
0
1ace61c097cbfcf44f35583ff54c833f
c4a2d609b40e1c62c891e23e6db46567
Function to load input and target tensors.
def inputs(is_test_eval): if is_test_eval: if not FLAGS.test_data_path: raise ValueError('Please supply test data path') images, labels = hw2_input.inputs(is_test_eval=is_test_eval, data_dir=FLAGS.test_data_path, batch_size=FLAGS.batch_size) else: if not FLAGS.train_data_path: rais...
1
46584a7019e0b6d01a6d16f4fdacda67
42e44b40ccef6cedf7ebd3ab8c90d4b2
用于得到最近的一个epoch的路径
class QaModel(): def get_best_result_epoch(self, path): max_epoch = 0 model_path = '' for root, dirs, files in os.walk(path): for d in dirs: epoch_num = int(d) if epoch_num >= max_epoch: model_path = os.path.join(root, d, 'ckpt.pth'...
1
6530f6bb15db7bf2b825470c0dcaf580
4c860fdf63321f54539b4a79bd564f42
Returns whether the object can be casted to a string or not.
function is_stringable($var) : bool { return \is_scalar($var) || \is_null($var) || (\is_object($var) && \method_exists($var, '__toString')); }
1
d078b07662673b7883b7f3fa4f51544f
1c923b797ad8ffa6daaf683ac227d727
Verify presence of specific option under Google Map Menu.
function et_theme_requires_google_map() { $requires_google_map = apply_filters( 'et_theme_requires_google_map', true ); return $requires_google_map; }
0
89afcb7b483641b7dea47c4d55d73e5e
03f1d2c6396f998af13f55d9b992a3c2
Set the log path creating the log dir if it does not exist
abstract class Logger public function setDir(string $dir) { $this->log_dir = rtrim($dir, '/\\').'/'; $this->checkOrCreateDirPath($this->log_dir); return $this; }
1
773c1c66d097aa91fb346ece4897c775
c6238aa3772a37f71f8cefab2b0fa128
This is to setup countries for test
public class TestData private static void setUpExistingCountries(){ existingCountries = new LinkedList<>(); Country australia = CountryRepo.createNewCountry(new Country(LeaderRepo.createNewLeader(new Leader("Malcolm", "Turnbull", "Prime Minister")), "Australia", 23000000, 1.4f, EconomyRepo.createNewEcon...
1
38969adb70242b76e6e6c3da57781b3f
979518fd885422f944799af8e8d6d613
Test that a file which doesn't exist gets saved by submit handler.
class ProcessorConfigFormTest extends ProcessorConfigFormTestBase public function testSaveConfigurationSubmit(): void { $this->drupalLogin($this->adminUser); $this->drupalGet($this->getPath()); $this->assertSession()->fieldExists('textfield'); }
0
7faeebe8209f9fa1169e57eca4571849
4c1d046c2c5a925ff8c3fac540641874
创建http服务器,并定义express app为处理器
function createServer () { const app = express() Object.entries(util).forEach(item => global[item[0]] = item[1]) app.use(history()) app.use(morgan4acc) app.use(express.json()) app.use(express.urlencoded({ extended: false })) app.use(express.static(path.join(__dirname, 'public'))) app.use(cors({ orig...
1
8a083b71bcefe234975421e35a68ad9f
f2751a5d7fe0115f0214e878ee4856ef
When we access a vertex we usually want to modify a value stored in the vertex (which in turn is stored in the graph), so we return a pointer here
impl<I, F> Diagram<I, F> where I: InputType + Neg<Output = I>, F: OutputType + Neg<Output = F>, pub(crate) fn vertex_get_(&self, vertex_id: Option<VertexIndex>) -> Option<&VertexType<I, F>> { let _ = vertex_id?; self.vertices_.get(vertex_id.unwrap().0) }
0
4e18e778f8f20eac6b4240ef8f8ee433
5056ce16e9af2359afcc1b4af7779e33
Returns the specific element as identified as some component name, e.g. subject/object This only works if current pattern contains named subpatterns
public class Pattern extends Base public Base getTarget() { return (Base) (_getFeatureValueNc(wrapGetIntCatchException(_FH_target))); }
0
4a97d352230fb18cb6ad343b3114139a
67cd08f69c7086b392d60f82bc20198b
設定就醫類別及療程
this.hospitalData = allData.filter(hos => hos.medical_type_id == '3') this.depData = allData.filter(hos => hos.medical_type_id == '2') }
0
fcce90553cd2c4f1b146ebf1f592bb52
1248d4862f079731c2e3dc1b5ed2cd74
<p>Description:根据unionid查询出 该供应商下的所有产品信息(销售中的产品数量) </p>
public Integer getCountUnionId(String unionId);
0
f7e65314f352dc2c9ff292a902a237f3
3e2204c607fcdadd46bd38c9d25bb6a8
# # // List all active teams for the actual eventgroup # // get eventgroup - list teams with hyperlinks into the schedule page for this league #
def teamLinks(): namelink = {} req = urllib2.Request( 'http://www.hltv.org/?pageid=182&mapCountOverride=10', headers={ 'User-Agent': "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/47.0.2526.111 Safari/537.36"}) con = urllib2.urlopen(req) s...
1
211ce29ce1448829fe119075ca0e7bd1
82901f6d0b5757bda6cb29943db6d7a0
根据地址,命令,数据,创建向传感器发送的数据信息
{ if (value == null) value = new byte[0]; byte[] command = new byte[10 + value.Length]; command[0] = 0x01; command[1] = 0x14; command[2] = 0x00; ...
1
01184259e79a72ae051871464e77a75e
9a895d78406f65646a21f30017730d96
Obtiene el arreglo con los tipos de datos que puede transferir la clase. En este caso solo puede hacer transferencias de tipo PilaCartas (clase flavor DataFlavorPila )
public class Model implements ClipboardOwner public void doCopy() public DataFlavor[] getTransferDataFlavors() { System.out.println(" Transferable.getTransferDataFlavors"); return new DataFlavor[] { DataFlavor.stringFlavor }; }
0
a8d1bc7321134fc76160704320b35d51
3397d5cd783b7a55e8c2676fe3d4a80b
通过ID获取编号
namespace dzh class Car public Task<string> GetID(int id) { return Task.Run(() => { return GetSequence(id); }); }
1
1577aa78baa3ae978f97478f51192d60
fa9d7957beb188efaaa03edf845f2b42
获取指定随机纯数字
namespace Micua.Infrastructure.Utility public static class RandomHelper public static long GetNumber(int length) { var sbRes = new StringBuilder(length); for (var i = 0; i < length; i++) { sbRes.Append(Numbers[Random.Next(62)]); } r...
0
a634ecd9663b9dbd760ced676ddcdf0f
72115d7fb8242a602608745925443c88
Initialize Nordic Softdevice controller
{ nrf_fstorage_api_t * p_fs_api; p_fs_api = &nrf_fstorage_sd; ret_code_t rc = nrf_fstorage_init(&fstorage, p_fs_api, NULL); APP_ERROR_CHECK(rc); }
0
35a42fce2a92f36d390a90c8701d26b4
537b1ddf2ee692f20be169c4f289c988
Sets the recipients per group.
@Loggable public final class DefaultReport implements Report public static final class Builder extends OvalBuilder<DefaultReport> public Builder setRecipients(final ImmutableSetMultimap<ReportFormat, Recipient> recipients) { _recipients = recipients; return this; }
1
b161d0ce0a44560359cae49f7a31e221
e5367e05c5b717dc59d0fea2172b36bc
LINQ-compatible implementation of the monadic map operator.
[map] (fn) { return this[reduce]( (xs, x) => Cons(fn(x))(xs), Nil, ) }
1
b6a9cb208bb2377ae6f51a92750bbdfa
035b1a7c80c9f61c6453659b876a99a4
Checks if the supplied collection of expressions contains at least one subquery in any of the expressions.
public class SubqueryPlanner public boolean containsSubqueries(Collection<Expression> expressions) { for (Expression expr : expressions) { if (containsSubqueries(expr)) return true; } return false; }
1
be692074f56e1ade81964eb43e848a7c
dacfe6169538d94a1231f3c596a84167
Binding adapter for Search result Recyclerview
imageSearchAdapter = ImageSearchAdapter(Glide.with(this)) rcv_image_search.layoutManager = GridLayoutManager(this,3) rcv_image_search.adapter = imageSearchAdapter imageSearchAdapter.setClickListener(this) }
1
e03caf3decc29dba9c3a7396ff5494a1
b81fa11db22167393618126ebd9bd908
A set of tags to return additional information for this champion when it's loaded.
class RiotAPI: def get_champions(self): url_champions = 'https://euw1.api.riotgames.com/lol/static-data/v3/champions' fields = ['blurb', 'image', 'info', 'lore', 'partype', 'passive', 'spells', 'tags'] return requests.get(url_champions, params={'api_key': self.key, 'tags': fields}).json()['data'...
1
5c90f29ca41c1f4133a054a6eef5823f
003b8397296df4ca7ffe1b77fd654bb2
Returns the masked sequence.
class Motif: def mask_seq(self,seq): masked = '' matches, endpoints, scores = self.scan(seq) cursor = 0 for start, stop in endpoints: masked = masked + seq[cursor:start] + 'N'*self.width cursor = stop+1 masked = masked + seq[cursor:] return masked
1
073968f1379cd42fa243fd67dece2cb9
b0438975cef2f7749ba97e3b0aef671d
增加支付立减金额
{ $this->spdKeys['AM'] = number_format($amount, 2, '.', ''); $this->sidKeys['AM'] = number_format($amount, 2, '.', ''); return $this; }
0
b777ff3b3d1aaaced8b1e67b865332d1
848b0bf6d553c96f323b6c4a1f660c51
数字末尾连续0的个数
public class Solution public int findNumber(String str){ int ans=0; for (int i = 0; i <str.length() ; i++) { if(str.charAt(i)=='0') ans++; } return ans; }
0
e74dbedfa91262041a976bf1a220426b
7ba121272e01b868b4f4b54ac0113d66
Création des bulles d'information
function data_creatBox(scope){ scope.box = []; var number = 0; for (var h=0;h<scope.height+2;h++){ scope.box[h] = []; for (var w=0;w<scope.width+2;w++){ scope.box[h][w]={voisine:0,bomb:false,cache:true,marque:false} if ((h!=0)&&(h!=scope.height+1)&&(w!=0)&&(w!=scope.width+1)&&(number<scope.nombre)){ ...
0
d2d60147ce6ebbf38cabfe8db24f4aff
f910452a0c23779ce81a9252395b8e58
Mark a block free in the bitmap
static inline void __frame_mark_free(unsigned bm_idx, uint_fast32_t bit) { bitmap[bm_idx] &= ~bit; }
1
7801a1a6eaf6e84e48fee09c895589ae
8057a5f9575bbc26f83de4bfc8f8211e
Return a list of ids. This list is filtered by the authenticated user's roles.
class SecurityManager(BaseSecurityManager): def get_user_roles(self, user_id, **options): return []
0
86f15a30300a643c7aa7b4d6b1217b08
61441a4480c02d283003927c4d848a78
Gets the domain for the Azure sql management API.
namespace Microsoft.Hpc public static class AzureEndpointRegistryExtension public static async Task<string> GetAzureBlobStorageDomainAsync(this IHpcContext context, string headNode = null) { return await context.GetAzureEndpointStringAsync(LegacyAzureEndpointName.AzureBlobStorageDomain, headNod...
0
f83757ff5683cef28ffa7cda518b6ceb
a35db9b12548b147d9dfd2b5880ece0f
Stores the wallet passed as parameter in the application database
int val = dml.insertWallet(max_pass, max_per_hour, guestid); if(val != -1) { System.out.println("Succesfully added"); } return val; }
1
bb159f99c9d72471cf2e029441addb14
a201a41e009f4ebaf087d0562c1877e1
Unbind mouse and touch events to slider handles
export class Rangeable unbind() { off(document, 'scroll', this.events.scroll); off(window, 'resize', this.events.resize); off(document, 'keydown', this.events.keydown); off( this.nodes.container, this.touch ? 'touchstart' : 'mousedown', this.events.start, ); off(this.input, 'in...
1
db4d9d2b22ff53a7ce779bfa90b7f37a
f972da91b30a5338e89863024f86a563
Returns common serials that are inputted into the DB for auto-complete functionality.
class EnginesController def list_serialno respond_to do |format| engines = Engine.completed.where(engine_model_name: params[:engine_model_name]) format.json { render json: engines.map { |e| e.serialno }.uniq } end end
1
0ef2383c6d716427d65f2bbefa1af4d5
45172384d09ea15180bad229447f6ab1
Will check if the given [type] is a List. If it is a list, it will return the wrapped type of the list.
if (!(psiFieldType instanceof PsiClassReferenceType)) { return false; } PsiClass resolvePsiClass = ((PsiClassReferenceType) psiFieldType).resolve(); if (resolvePsiClass.getQualifiedName().equals("java.util.List")) { return true; } for (PsiType psiT...
0
92362e299252ce2f84660b1602f7982d
ba38e6cc2ee5a4b08cb708cd21910f5a
Write p's tree to self.outputFile.
def writeJSON(outfile, p): makeDir(outfile.rsplit('/', 1)[0]) f = codecs.open(outfile, 'w', encoding='utf-8') f.write(getDump(p)) f.close()
1
d4098d5a8f8e4a7655be2b728b7bbc44
2f7bb8f993e32ee16a07cc0fd4ad66bb
Méthode de lecture de toutes les pièces liées aux fiches de réparation
if (!Auth::check()) { return redirect()->intended('login'); } if ($request->ajax()) { $pieces = DB::table('piece') ->join('affaire', 'affaire.id', '=', 'piece.affaire_id', 'left outer') ->join('categorie_piece', 'cat...
1
ae8ddbdc370c1b7940b52f180ec77580
73ad76dacb26b0645815a86965e88c56
显示引擎状态
@Service public class DataSyncService public String getEnginState(){ EngineState state = dataSyncEngine.getState(); return state.toString(); }
1
1d6a5a161d661e2216436b187ab50b0c
643109cdf7d4ecde35e9a7c93f7515ef
Computes new approximation of the inverse of hessian. The notation the same as here https://ru.wikipedia.org/wiki/Алгоритм_Бройдена_—_Флетчера_—_Гольдфарба_—_Шанно
def bfgs_update_hessian(binv, y, s): y, yT = y[:, newaxis], y[newaxis, :] s, sT = s[:, newaxis], s[newaxis, :] return (binv + (sT @ y + yT @ binv @ y) * (s @ sT) / (sT @ y) ** 2 - (binv @ y @ sT + s @ yT @ binv) / (sT @ y))
1
d9e561f7608d428e3ea46750c700489c
5fd5e6bcfbb5940a8432f5428be93568
发送进入消息
{ ui->pushButtonSend->setEnabled(true); ui->pushButtonEnter->setText("离开聊天室"); QString msg= userName + ":Enter Chat Room"; msg = "0"+msg; tcpsocket->write(msg.toUtf8().data()); }
1
37dc717c9cee123627500af24d194c37
063dadb0de0c41d5e4d9c2c3238896b5
Reproduz um som de alerta padrão do sistema operacional
def defaultBeep(): call(("/usr/bin/paplay", "/usr/share/sounds/ubuntu/stereo/message.ogg"))
1
259f0d679922c2362fe1b62c15c8700d
2afc864ea7b9b286f7a9b632f735f81a
Handles the event of the Cancel Button control.
{ try { this.EnableSaveCancelButton(); } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } }
0
fe793709edc9161c44f264e82b744c97
5cb34cfd954670fa851a68f8cff17d14
按照time_step生成预测输入数据,实际中得不到预测的10分钟后的数据
data_temp_x = data_one_stock_num.iloc[:,:-2] data_temp_y = data_one_stock_num.iloc[:,-2:] data_res = [] for i in range(time_step - 1, len(data_temp_x.index)): data_res.append(data_temp_x.iloc[i - time_step + 1: i + 1].values.reshape(1, time_step * n_dim).tolist() + data_t...
1
f8f509ccf85d5958385c60c433fe9fad
83b38a06569bca1903fcf9d34b3e3ec6
Read data callback. Called when decoder needs more input data.
int LZMA::inputCallback(void *_ctx, void *_buf, size_t *_size) { size_t rd = 0; struct DataStream *stream = (struct DataStream*)_ctx; assert(stream != NULL); rd = (stream->inLen < *_size) ? stream->inLen : *_size; if (rd > 0) { memcpy(_buf, (void *)stream->inData, rd); stream->inData += rd; stream->inLen -=...
1
5c6df303ee9b6f9c74fe817f086923fc
cdc75270250ee61d81203e7130c550e1
对box里的控件进行布局
export class LayoutBox layout(containingBlock: Dimensions) { if (this.boxType) { this.layoutBlock(containingBlock); } else { } }
1
f03032d2f9d83a6b9b662d04201196d5
2e15d1d8b37059ae3cb08feb732f4d7e
Returns the highest priority job if there is one; otherwise None.
class LogManager(object): def gettop(self): for priority in sorted(self.stacks.keys(), reverse=True): stack = self.stacks[priority] if stack.has_events(): return stack return None
1
d752bbb299914211b050585f2caef3ad
3f173eaad3c516aac463820a52d369a7
在某个节点后插入某个值
PNode insertAfter(PNode node, int value) { PNode nextNode = (PNode)malloc(sizeof(Node)); nextNode->value = value; nextNode->next = NULL; if (node) { if (node->next) { nextNode->next = node->next; } node->next = nextNode; } return nextNode; }
1
bb2496bcb2749b4d3f88b4f317e542ba
29e86557b0ec3eeff9b604d93a314ee9
初始化时,先申请一个timerfd然后用channel监听这个fd的读事件,把回调函数handel_read交给它
mkfifo("myfifo", 0664); int fd = open("myfifo", O_RDONLY|O_NONBLOCK); if (-1 == fd) { perror("open error"); exit(0); } struct event_base* base = event_base_new(); struct event* ev = event_new(base, fd, EV_READ|EV_PERSIST, read_cb, NULL); event_add(ev, NULL); event_base_dispatch(base); event_free(ev); even...
0
bfd2125c267627ed942ba26c5af71ddd
6375aa69ea299675a816b455f622353d
send a redirect to the correct home, superadmin home if in superadmin mode or normal home if in normal mode
if current_customer if params[:controller] == "support_admin/base" redirect_to controller: 'customer_portal/base', action:'index' end elsif current_support_admin if params[:controller] == "customer_portal/base" redirect_to controller: 'support_admin/base', action:'index' ...
0
be7960d82cad55558d81dda0a7133804
62a381fdd1d9bf6a136260da5e79d357
indent line
void Syntax::syntax_indent() { switch (syntax_state) { case SNTX_NUL: _color_token(token); break; case SNTX_SP: printf(" "); _color_token(token); break; case SNTX_LF_HT:{ if (token.type() == TokenType::TK_END) syntax_level--; printf("\n...
1
997e03a4205fd6d2dff5806a0150130d
e8815be9d61ec54a658f0e69d7dad593
__init__方法接收名、姓、薪水三个参数
class Person: def __init__(self, name, job=None, pay=0): self.name = name self.job = job self.pay = pay
0
1428b2ac476ed433a22c0df8e6f0e4e1
1444a153a665771db4da1a069b30766c
set font sizes for frequency boxes and time field based on selection
pre_loop_label["width"] = 30 pre_loop_text_box["width"] = 30 pre_loop_text_box["height"] = 5 main_loop_label["width"] = 30 main_loop_text_box["width"] = 30 main_loop_text_box["height"] = 5 post_loop_label["width"] = 30 post_loop_text_box["width"] = 30 post_loop_text_box["height"] = 5...
0
528d35b3c1a86e99c0dee0243705d708
e73869a021458ed9d73e51cdd0538f39
returns the status of the IMU
mpu->resetFIFO(); fifoCount = mpu->getFIFOCount(); mpuIntStatus = mpu->getIntStatus(); if (mpuIntStatus & 0x02) { while (fifoCount < packetSize) { fifoCount = mpu->getFIFOCount(); } mpu->getFIFOBytes(fifoBuffer, packetSize); fifoCount -= packetSize; mpu->dmpGetQuaternion(quaternion, fifoBuffer); mpu-...
0
461894c6ba90cb48635e5e931d8319f1
e77a0a5b8ec1e00bce999e38718d5775
组装退废报表内容
BigDecimal rst = BigDecimal.ZERO; tarList.clear(); int len = srcList.size(); for (int i = 0; i < len; i++) { JiaMaterialLoss item = srcList.get(i); List<String> row = new ArrayList<>(); row.add((i + 1) + ""); row.add(item.getProductName());...
1
621d6ee7c01987c6b08726ea384cb3f1
be080fbef54810dc6e2769a26e477eb3
通过用户名和时间查询相应数量的预警消息
{ return http.Get(TDCommon.PublicInfo.WebAPIRoute + "Alarm/GetViewsByTimeandContent?data=" + data + ""); }
0
5edeb3a255514337fc299cde890716e7
0fc69f6211aca7ee84468976c819d3ac
调用kmeans函数numTrials次,返回相异度最小的结果.
def Kmeans(K,data): First_C =[] C=[random.randint (0,len(data)-1)for _ in range(K)] for i in range(len(C)): First_C.append(data[C[i]]) New_cluster1=NewNode(First_C,data) err=np.array(New_cluster1) -np.array(First_C) Jud=1 while Jud: New_cluster2=NewNode(...
0
05544a8823d4b9db1bef322fe8caa37c
efc5c20a541acaec7bd02c9c6c4d5ff3
最後のジョブ取得.
Connection conn = null; Item latest = null; try { Class.forName(DRIVER_NAME); conn = DriverManager.getConnection(JDBC_URL, DB_USER, DB_PASS); String sql = "SELECT" + " * FROM todo_item" + " ORDER BY" + " no DESC" + " LIMIT 1"; PreparedStatement ps = conn.prepareStatement(sq...
1
8eaf28e89ac81352a75eef9f421e3aed
42d5b4bb17045464c66fbd7907bda077
USI文字列の1バイト駒をPieceに変換する。
pub fn pro_pt_to_pt(pt: &PieceType) -> PieceType { use super::super::teigi::shogi_syugo::PieceType::*; match *pt { K => Empty, R => Empty, B => Empty, G => Empty, S => Empty, N => Empty, L => Empty, P => Empty, PR => R, PB => B, ...
0
f6970dc2cff7857a709cb0786c88324c
8dbac5f2d59cee1d670e70dc94ef16cc
Check if this is an EffectiveSan function.
return substr($functionString, 0, 1) == "/" && substr($functionString, -1, 1) == "/"; }
0
248eeac55237c4d0ceaaf39322ee3144
1c7c6e9fa4acdb913d4f56498ebc9c84
Проверяет что имя написано кириллицей
class Validator static verifyName(name) { return /^[a-zа-яё\s\-]{3,}$/i.test(name); }
0
a042d49a9ac6c2d45803141a2fe0dd5d
a32ac93b86609d1443a27f61ad5662c6
System.Boolean Mono.Security.X509.X509ExtensionCollection::Contains(System.String)
bool Collection_1_Contains_m1_6808_gshared (Collection_1_t1_1122 * __this, CustomAttributeNamedArgument_t1_333 ___item, const MethodInfo* method) { { Object_t* L_0 = (Object_t*)(__this->___list_0); CustomAttributeNamedArgument_t1_333 L_1 = ___item; NullCheck((Object_t*)L_0); bool L_2 = (bool)InterfaceFuncInv...
0