query_id
string
corpus_id
string
query
string
code
string
label
int64
e31d035657d4f445c9140405f1f95ce8
7318ec8f4c2ca2bc45d4d929a93feb85
Tests that the payment times must be increasing.
class PriceRequest extends FormRequest private function assertPaymentDatesAreInvalid() { if ( ! $this->requestHasPayments()) return false; $payments = $this->input('payments'); $paymentsByPercentage = collect($payments)->sortBy('percentage_due')->pluck('percentage_due'); $paymentsByD...
1
d41cd900a7cac98ee3ad47caf71bc55f
46197e6a6f807d9f79f65c73612a723e
记录每个组加入多少个国家
this.m_labNumWei.text = WorldModel.getCountryCount(CountryType.WEI) + ''; this.m_labNumShu.text = WorldModel.getCountryCount(CountryType.SHU) + ''; this.m_labNumWu.text = WorldModel.getCountryCount(CountryType.WU) + ''; }
1
fc6d23cbdfa4adf57e5287a8810551d3
eab0a837efe378d606f22e2f62718805
当触摸点超出圆的范围的时候,设置小球边缘位置
if posX < 70 or posY < 70 or posX > 910 or posY > 475 then self:setBallState(g_EightBallData.ballState.inHole) end end
0
14e2a0332e7c2729e7615c1decc4a622
e7dd314438bb9db834e481b9a1ae0683
Start a new game if the new game button is pressed
void CNewButton::OnClick() { auto game = GetGame(); game->NewGame(); }
1
22e046e5ed0d362783f2f476b260ab80
fe5157d893427d5cc0c71536306527b1
iterAllReads():
abstract class Conversation : Serializable, Comparable<Any> abstract fun readAllMessage()
0
625663939a87ceeb4911a7505479be3c
6d30f1b70753dded492a41d771239f8f
把slot中None转成''
namespace rui public class syncHelper private static string getFildValue(string value) { if (value == "N''") return "null"; return value; }
0
9147bf6e921f5923d2000561a36deab2
2b04d1e3c13aaced37777dd3d6d6b43b
Returns the monster's start position
public double getStartPosition();
1
7a7b00d38d77ca6df90b8bf7445e2d91
5a36d34e2694aefebed5bb032953447a
Converts a clause Map (Attributes or Directives) to its {@link String} representation. Attributes or directives of the clause. In case of directives this should be ':=', while in case of attributes it should be a simple '='.
public abstract class Clause public String toString(){ return sort + " " + expression + ";" + "\n"; }
0
7307259018cbbc0d3953462df7d226d6
55e7c61961ab377a08589afcb2e16bd8
Projects the specified XYZ screen position to a 3D position representing a world position. Can be used to calculate what object the mouse over in the 3D game world using raytracing.
{ Matrix transformMatrix; UpdateMatrices(); if (includeViewTransform) { Matrix.Invert(ref _viewProjecton, out transformMatrix); } else { Matrix.Invert(ref _projection, out transformMatrix); ...
1
2b74e164bb906e6feef49d92bee7895a
5de7ead133733aa1c0c7eb3f7ee9480b
保存动态评论审核
class MysqlFix(object): def fix_dynamic_comment_status(self, dynamic_id, status): mysql_helper.execute('update dynamic_comment set status=%s where dynamic_id=%s and user_id=%s',params=(status, dynamic_id, self.user_id))
1
0a98c9376077c54aff50fbbebb992884
3c2b689ce26bbce250788bdeda8ee914
动态尺寸矩阵赋值,如果尺寸不同,则自动把等号左边的矩阵resize
{ if( dynamic() && src.dynamic() ) { if( m_data ) { delete[] m_data; } m_row = src.m_row; m_col = src.m_col; m_size = src.m_size; m_maxSize = src.m_maxSize; m_data = src.m_data; src.m_row = 0; src.m_col = 0; src.m_size = 0; src.m_maxSize...
0
a5d515810284533fd742ace863812f6a
223af8684c9a9dd3dca36fbc19893516
Token duration predictor for the GlowTTS model. Takes in embeddings of the input tokens and predicts how many frames of mel-spectrogram are aligned to each text token. Architecture is the same as the duration predictor in FastSpeech.
batch_size = encoded_input.size(0) max_length = encoded_input.size(1) inference = target is None max_frames = self._max_frames if inference else target.size(2) input_device = encoded_input.device if hp.multi_speaker and self._speaker_embedding is not None: en...
0
c7949c7018b42ba40eacb720aea35f34
751f7bb9639f97e81c95c1525f667883
Convert Json to List of Currency Objects
private List<CurrencyOnDay> ParseCurrencyOnDay(XmlDocument _doc) { List<CurrencyOnDay> result = new List<CurrencyOnDay>(); foreach (XmlNode node in _doc.DocumentElement.ChildNodes) { CurrencyOnDay currency = new CurrencyOnDay(); currenc...
0
93c8eafd185ee42671cfb839eb194724
82a53ebea3260250ab6fb5dc4457f27b
调用第三方排重接口
class Query private static function collision($req){ $api_key=C('query.other_key'); $request = Request::getClass(C('query.collision_url') . '?api_key=' . $api_key . '&vin=' . $req['vin'] . '&engine=' . $req['engine'], 'get'); $request->sendRequest(); $httpcode = $request->getResponseInfo...
1
05939453c4d126a6b7983a47ae1750a0
698edc504397d4bd2ae8053dd2d8c0ea
génère un objet contenant les infos qui doivent figurer dans le Bulletin Trimestriel d'un élève
{ return [ 'id' => $this['eleve']->id, 'last_name' => $this['eleve']->last_name, 'first_name' => $this['eleve']->first_name, 'birthday' => $this['eleve']->birthday, 'token' => $this['eleve']->token, 'email...
1
40ad2f8790a9e11399e6474c0ad22113
6da17a55180f226f32eab5974dfefd92
faces the attacker towards the enemy location
public class SoldierController : MonoBehaviour private void Face_to_enemy (){ if (gameObject.tag == "soldier") { transform.rotation = Quaternion.Slerp (transform.rotation, Quaternion.LookRotation (target.transform.position - transform.position), 0.3f); transform.rotation = Quaternion.Euler (transform.rotation.x...
1
2cf087ee1376506e24f3e4bb3f817319
0cff82c8c2d2bda5d26e87aeb19ab9be
统计数据库记录
user_pool_size = rd.scard(db_result) user_basic_size = rd.scard(db_users) user_valid_size = rd.scard(db_valid_users) movie_basic_size = rd.hlen(db_movie_info) movie_valid_size = rd.scard(db_valid_movies) print u"""统计信息如下: 用户池大小: %s 基础用户数: %s 有效用户数: %s 基础电影数: %s 有效电影数: %s ...
1
deeab5ed3402da87801204d7fc4c1c16
5c5cfb1d3b6cbecb36ddca718102f0c6
Creates new console tab
namespace Schematix public class SchematixCore public void CreateNewConsole() { Schematix.Panels.ConsolePanel console = new ConsolePanel("cmd", string.Empty); ShowPanel(console, AnchorableShowStrategy.Bottom); }
1
907d1c3744441367085d8162688c5f2b
89e0f9933206cf8063a09657f5a8e837
Retracts the solenoid.
public class PullUp extends SubsystemBase public void retractClimb() { climbSolenoid.set(DoubleSolenoid.Value.kReverse); }
1
f08052fc06429cdb609059a317d3084a
07b2dce9f9a7386eb4c180a555d53fc6
Stop RPLidar Motor
static bool _stopMotor (void) { if (LidarDrv.isSupportingMotorCtrl == TRUE) { return _setMotorPWM (0); } else { return Set_dtr_signal(FALSE); } }
1
65c8d5bf69b2bbd8834c959da20293d8
8e3175210183639483e7fa5a690fb08a
Получить функции клемм пневмоострова по его ОУ.
{ try { EFDirectoryWays ef_way = new EFDirectoryWays(this.db); return ef_way.Get().Where(w => w.Directory_InternalStations.station_uz); } catch (Exception e) { e.WriteErrorMethod(String.Format("GetFromWay...
0
b1d7186a11c77a425c55787d33a8387d
f6ffded28a26c2ad77736ab2788f9a75
日記のIDと閲覧テーブルの日記IDから 自分が閲覧した日記の日時を取得
class UsagiComponentsCommunity function getMyCommentId() { $sql = "SELECT " . "c_commu_topic_comment_id " . "FROM " . MYNETS_PREFIX_NAME . "c_commu_topic_comment " . "WHERE " . "c_member_id = ? " . "AND " ...
0
e1b2ff0bfc3937948dbc42da680602e4
87a2d53383811869af7154dc8583ec8d
round grain levels to whole numbers and initial grain level is also maximum
33 { 34 unsigned long int max = 0; 35 for (int i = 1; i < DIM-1; i++) 36 for (int j = 1; j < DIM-1; j++) 37 { 38 int g =table(i,j); 39 int r,v,b; 40 r = v = b = 0; 41 if ( g == 1) 42 v=255; 43 else if (g == 2) ...
0
6538afff5e138d1f8138dda536b4d194
80ff9d8e125c467934fff5ae2f32affe
access control - unauthenticated users are prompted to log in
class Default(ModelView): def inaccessible_callback(self, name, **kwargs): if current_user.is_authenticated: abort(403) else: return redirect(url_for('security.login', next=request.url))
1
e81952fc99d35d3f4eee6f255c3e6b48
493bdcbc874a3dca6cedcd4846781e09
редирект на страницу управления кэшем
@Controller @RequestMapping("sys") public class SystemController @RequestMapping("toCacheManager") public String toCacheManager(){ return "system/cache/cacheManager"; }
1
30c8eac2b56d358ef2a945775c99b83e
1bcc566812de0499ca952eb164d586f6
Проверяем соответсвует ли тип входной точки фронтенду.
namespace RemoteExecution.InterfaceResolution public abstract class InterfaceResolver public static bool SenderEndPointIsExpectedByInterface(IRequestMessage request) { return RequiresIpEndPoint(Singleton.GetInterface(request.MessageType), request.MethodName); }
0
dd5e6fe601f752b5ada24b852f850cba
a3418d519cd29b8d69ff83545ccc4abf
doesn't take isStatic, vel_x, vel_y, or accel values as parameters
void physics_sim(vector* position, matrix* orient, physics_info* pi, float sim_time) { if (pi->flags & PF_CONST_VEL) { vm_vec_scale_add2(position, &pi->vel, sim_time); } else { physics_sim_vel(position, pi, sim_time, orient); physics_sim_rot(orient, pi, sim_time); pi->speed = vm_vec_mag(&pi->vel); pi...
1
18be174c0fea75506a8cbecc4a119790
aa2a5185db1d33b922efb324001d8a0c
Initialise preprocessor for image of a given size and store colour pairs. These are used to find the blocks in the gridworld that we want to measure the distance between.
for (int i = 0; i < image->width; i++) { vector<int> cr; vector<double> dr; for (int j = 0; j < image->height; j++) { cr.push_back(-1); dr.push_back(FLT_MAX); } clusters.push_back(cr); distances.push_back(dr); } for (int i = step; i < i...
1
8f4ec9bcd1c18fd9e818f72ad59c34ef
1401ca6627f83eefa24c7ae82470055a
c端查询待取货订单(会计算距离)
public Map<String,Object> queryWaitDeparts(Map<String,Object> inParam) throws Exception{ String timeOut = DataFormat.getStringKey(inParam, "timeOut"); OrdOrdersInfoSV orderInfoSV = (OrdOrdersInfoSV) SysContexts.getBean("ordOrdersInfoSV"); IPage p = PageUtil.gridPage(orderInfoSV.queryWaitDepartsInfo(inParam,fal...
0
9565b46666a5f6afe14fddb0c6028cca
ccb206b6487b253c1791b8d1e7783161
Get team colors from player id
unsigned char get_player_id_color(unsigned char id_player) { return player[id_player].id_coul; }
1
1829924538487a909d54fb36dc570e6a
82c8b555214fd595a7ca1b1ed0ac32a1
Выключить компьютер
class Facade{ public function turnOff() { $this->os->halt(); $this->bios->powerDown(); }
1
72f325e395d563e937bc4bc10f0768b5
674d286e92b98b47645178c94a99b192
Overrides standard omeka form behavior to tweak display and fix radio display eccentricity
class RadioButtons extends PagerWidgetBase public function exposedFormAlter(array &$form, FormStateInterface $form_state) { parent::exposedFormAlter($form, $form_state); if (!empty($form['items_per_page'])) { $form['items_per_page']['#type'] = 'radios'; $form['items_per_page']['#prefix'] = '<div cla...
1
e11702d8a2629fd5d7f5fc8c6ff02864
1821dd719319980f2ff2c34c52f840bb
This method handles any actions that need to be taken when transitioning from one state to another.
ActivityState oldState = getState(); if (oldState == newState) return; if (isAHomeState(oldState) && newState == ActivityState.HOME_STOP_SELECTED) { while (getState() != ActivityState.HOME) goToPreviousScreen(false); setState(ActivityState.HOME...
1
2e35e70205fbf7b151f21e9871679335
6554aba76216f2a4973a5abc145df7ea
训练,AI与AI下
clf = train_ai() board = [0 for i in range(9)] generate_board(board) while True: p2 = input('Choose your move [0-8]:') board[int(p2)] = 1 if check_win(board): generate_board(board) break p1 = clf.predict([board]) while board[int(p1)] is no...
0
c1ef39e20dc3d416dfc9465551fd95bf
eb1e265ec604592ed8234c91dcf0bc6b
Returns the number of comments where groupId = &#63; and articleId = &#63;.
public int countByG_S(long groupId, int feedBackStatus) { FinderPath finderPath = FINDER_PATH_COUNT_BY_G_S; Object[] finderArgs = new Object[] { groupId, feedBackStatus }; Long count = (Long)finderCache.getResult(finderPath, finderArgs, this); if (count == null) { StringBundler query = new StringBundler(3);...
0
347057cceadc0525ea3c52955bf7df4d
64d1e96e4187da12ee28e5c9322f9e7f
計算生產線a產生的廢料
int waste = 0; for (UncutRod rod : cutCombination) waste += rod.getLength(); this.wasteSum = waste; }
1
a2a2ec74c7628ee9179e7a8262b891a9
9031d88511a30ba8d4390439f7e49419
Get a list of invader (indices) that have not yet been used in this run.
def get_unfinished(has, last): return list(set(last).difference(set(has)))
1
f6d32ace9b88a59ddc85b3ab29e29713
a6702bfef5ad9e7dc5757207ca4a2c91
Convert array of 8-bit bytes into string of 0s and 1s.
def bytesToBinString(byte_array): bin_array = [format(i, '0>8b') for i in byte_array] return ''.join(bin_array)
1
d36ccaa99d2869d233db5e3a859eafa7
babbda011c300a0950f42f3ae969b1bd
返回用户未评论过的课程id和预测评分
class CBMovieRecommend(object): def get_none_score_item(self, user): items = self.items['MovieID'].values have_score_items = self.ratings[self.ratings['UserID'] == user]['MovieID'].values none_score_items = set(items) - set(have_score_items) return none_score_items
0
483dbd400570e08f9912a5142550e7e1
78dff18d7e7e9a622f7b3369e6bdb123
Removes an instance of \MU\YourCityModule\Entity\EventEntity from the list of events.
public function deleteEvent($id);
1
47366ef6ab15a820528685aae66245b4
7f849aaedcd92f5ae17c9b8266dd6562
Modifie les valeurs d'une thème
$form = new Application_Form_AdminTheme(); if ($this->_request->isPost()) { $formData = $this->_request->getPost(); if( $form->isValid($formData)) { $page = new Application_Model_DbTable_Themes(); $row = $page->createRow(); $row->libele = stripcslashes($form->getValue('libele')); if($row->save...
0
add4d578794313e3372fdf0572e4492a
bd409fa79d1984ed02c67ef2dc9a2bbb
This function tests your trained SVM on a validation dataset, returning your SVM's predicted classifications for the validation dataset.
def model_prediction(model, validation_set=None, test_set=None): X = validation_set.iloc[:, 6:11] prediction = model.predict(X) return prediction
1
636abee035e744b49b80c2ab1b56961c
68d5467d705f2e65f608aca9cb1108ae
RequiresMapping(self: IBaseData) -> bool Indicates if there is support for mapping Returns: True indicates mapping should be used
namespace QuantConnect.Data.Custom.Tiingo public class TiingoPrice : TradeBar public override bool RequiresMapping() { return true; }
1
570334003f8ba9a73984424d12cdd59c
91daaaeb544cd5a2232043590ffd5c43
Returns the percentage of applicants that were accepted for the first stage
if self.proposal_count > 0: return float(self.acceptance_count) / float(self.proposal_count) else: return float("nan")
1
1bdb8367f0f5a5e5d1aa10315836005f
b9ba02218aa725392988898d3aa7fd0f
在B树中查找k
if T is None or str(T.item[0]) == str(k): return T if str(T.item[0])<str(k): return Find(T.right,k) return Find(T.left,k)
0
c01f454170e931b558d5203310f00448
20345a571581c662c85037b2931bd71a
Add a class field constraint
abstract class xPDOManager abstract public function addConstraint($class, $name, array $options = array());
1
f0600edcfa3e7a58d93ba8d6cee5e609
27b2a1d755c7f54a766ae996cd95cb58
Generate a number to guess
var randomNumber = Math.floor(Math.random() * 101) + 19; document.getElementById("numberToGuess").innerText = randomNumber; newRandomNumber = randomNumber; }
1
5168fb61680a7ff0b9276aa50b560746
279a456a9e16f8d7313fcabfb9dc7853
关闭当前事务,如果已经提交,直接关闭事务相关信息,如果没有提交则执行回滚操作。
void endTransaction(boolean commit);
1
107bc8dbb2fd837a95b85177e0d037c0
d0ba232605f3f89cb83700b91a11b8ee
Ввод номера телефона в инпут и переход на ввод пароля
val code = register_input_code.text.toString() val credential = PhoneAuthProvider.getCredential(id, code) AUTH.signInWithCredential(credential).addOnCompleteListener { task -> if (task.isSuccessful) { val uid = AUTH.currentUser?.uid.toString() val data...
0
159a83762105a89c6dd8acaa499c5a74
2a02bbd78131e06cb3dfdd7b03795bc7
From http://stackoverflow.com/a/3404522
def chunks(l, n): n = max(1, n) return (l[i:i+n] for i in range(0, len(l), n))
1
6c82e59857e60183be13f843d500f956
cd91b58ebef3f5b9eb5aa95bef20888b
初始化体力buff时间
{ PlayerObject* audience; BuffMap::iterator buffIt = entertainer->getEntertainerBuffMap()->begin(); while(buffIt != entertainer->getEntertainerBuffMap()->end()) { BuffStruct* buffStruct = (*buffIt).second; audience = dynamic_cast<PlayerObject*>(gWorldManager->getObjectById((*buffIt).first)); if(!audience) {...
0
b844c3bf4bed1f7e3a2a070860a1622a
50c0eea0fd5da5362c4518fdece59e17
Gets Facebook feed by username.
IDictionary<string, string> parameters) { return facebook.Get("/" + id + "/" + connectionName, parameters); }
0
6c911356e4fc870bf3acc5312268d57f
9b9519440064b9c7cdd8cca8719413b5
Adds a single parameter to this request. The order of parameters may be significant at the receiving end, therefore it is recommended that RequestBuilder implementations use a linked map or similar.
default RequestBuilder parameters(String... pairs) { return parameters(Arrays.asList(pairs)); }
0
2f2b65e189de0603be571ed1507550eb
8cef66802fd0272037945d35558f6d39
The name of the variable to add to the binding scope with the index for the row.
namespace Misp.Kernel.Ui.Base public partial class DialogAllocationRun : Window protected string getBindingNameAt(int index) { switch (index) { case 0: return "table"; case 1: return "sheet"; case 2: return "name"; case ...
1
fdc90768f3c9d64e243569a293468ffa
f758c833f8b101f88f5efc86efbf5a0c
Shows feedback (Correct! or Wrong!) after each test
for (Feedback feedback : result.getFeedbacks()) { testCases.stream().filter(testCase -> testCase.getTestName().equalsIgnoreCase(feedback.getText())).findFirst() .ifPresent(testCase -> feedback.setVisibility(testCase.getVisibility())); } }
0
3b61262f2a29b9740b55c76602609775
bc7ddd89722eda3adede4a9c0d1470ee
After path is found, reconstructs path from endpoint to start
def reconstruct_path_to_destination(prev, end): path = [end] curr = end while curr in prev.keys(): curr = prev[curr] path.insert(0, curr) return path
1
ec2fa5241133167be3121af9341a4d9a
6b68c037812159d4475d49835c7fec9a
Drive to end of wall
isfacingwall(); turnOut(true); turnIn(true); odometer.setTheta(0); Navigation.directTurn(90.0); turnIn(false); double dt = odometer.getT(); double ntheta = (dt / 2.0); Navigation.turnTo(ntheta); odometer.setTheta(45.0); Navigation.turnTo(0); }
0
39836270234116b130fa5f934c0f5d5b
f6be5469943bd2c4d246ccbcb7b613d9
Get ID of the instance to be renewed, which is required when you renew an instance.
public class ReservedInstances implements Serializable public String getReservedInstancesId() { return reservedInstancesId; }
1
22c5dacc273c8a7271d2db33fba8beb8
56a152e97db7281e2c17f83e41c86611
recurseData() Recursively interates through the data on the result object and formats it as strings. This is necessary as the data may contain N number of nested arrays of arbitrary depth.
class FormatterTwoColumn extends \SugarRestHarness\Formatters\FormatterBase implements \SugarRestHarness\Formatters\FormatterInterface public function recurseData($data, $indent='') { $formatted = ''; foreach ($data as $name => $value) { if (is_scalar($value)) { $formatte...
1
178fab3af14ed5a01d68b7a609b9381e
bd18c7b034f2fedc4add1259015f3679
enable the char counter on the field in the add note dialog
{ chaptercounter_ = new MyTextEdit2(this); chaptercounter_->setFrameStyle( QFrame::NoFrame ); chaptercounter_->setSizePolicy(QSizePolicy(QSizePolicy::Fixed, QSizePolicy::Expanding)); chaptercounter_->setHorizontalScrollBarPolicy( Qt::ScrollBarAlwaysOff ); chaptercounter_->setVerticalScrollBarPolic...
0
dddb56de46b7978d68a3e5498b54589a
cd112f710667f90f27fbfeff5f071a6e
This is the very top-level instance for running an experiment or experiments in loocius.
class BasicExperimentView: def __init__(self):
0
91360856352eaf251ba50f1aed085c2c
a934f9a5e61d53c07969315545ddc590
操作中のブロックを探す
var found = false; var draggingBlockMid = { x: draggingBlock.obj.position().left + 40, y: draggingBlock.obj.position().top + 40 } $.each(blockList, function(i, block) { var $block = $(block), blockCoor = { left: $block.position().left, top: $block.position().top, right: $block.position().le...
1
070c1d820bc8af07ea4d4891572c98f8
f5bd01eae82e17d29f995ca0b0f504fd
単位付きのファイルサイズを比較します.
$compare_size = filesize($file1->uri) - filesize($file2->uri); if ($compare_size) { return $compare_size; } else { return strnatcmp($file1->name, $file2->name); } }
0
07114f73afa6cd1b921336fe0c0564f7
ef38b8a52ff91597e37784fcf483b2b6
根据主键ID查询UserResource
EsUserModel selectByPrimaryKey(Long id);
0
49325118525d24ee5a7a752b42c2679f
1d48e45dc132b9677b4d71c98cf55970
Writes accepted particle distances to csv. For a given batch of simulated particles, the distances are written to .csv. One .csv contains all accepted particle distances for a population.
{ std::ofstream* f = new std::ofstream(); f->open(filename); for (unsigned int a = 0; a < distArray.size(); a++) { *f << std::setprecision(20) << distArray[a] << "\n"; } f->close(); delete f; }
1
3daff96832e6e6bdd1abedc2b82298e9
e33cac91348032094bce07bbb1ff400d
SetClientEventTrackWorkerId - use to passing track worker id from datagridviewform to clienteventform
{ btnClose.OnClientClick = ActiveWindow.GetHidePostBackReference(); tbxFCustomer.OnClientTriggerClick = Window2.GetSaveStateReference(txtFCode.ClientID, tbxFCustomer.ClientID) + Window2.GetShowReference("../../Common/WinCustomer.aspx"); }
0
1955a79ddd7a0797adc0502c38bb2828
b2fc78a0c6d1d70eb5dda374ccbdbf27
輸入不存在的分類
token = self.auth() self.create_category(token) req = self.client.post('/api/v1/category/5/recipe', headers=dict(Authorization=token), content_type='application/json', data=json.dumps( ...
1
11ac6228a85859eb21288ea716529fc4
34e2838e3a584c116370b2f6b1fc919a
Main function that procedurally creates a bunch of cubes and sets them according to the values of the ui.
def main(): cube_vertices_object = [] cube_uvs = [] cube_faces = [] def add_quad(vertices, uvs): index = len(cube_vertices_object) cube_faces.extend([[index + 2, index + 1, index], [index, index + 3, index + 2]]) cube_vertices_object.extend(vertices) cube_uvs.extend(uvs) ...
0
27d93dc400b01cfbaf08753e165e3b6e
49bf542dad080137ac7762ceefcca8a6
As an optimization step, if we know all values are gauges there is no need to call out to uc_get_rate as no values will be changed
{ if (m_bInSetValue) { return; } CBCGPGaugeImpl::SetDirty(bSet, FALSE); if (bSet) { m_ImageCache.Destroy(); } for (int i = 0; i < m_arSubGauges.GetSize(); i++) { CBCGPGaugeImpl* pGauge = m_arSubGauges[i]; ASSERT_VALID(pGauge); pGauge->SetDirty(bSet, FALSE); } if (bRedraw) { Redraw(); } }
0
72f29cec589a8ab162cfded9fc26a467
ad3d1ec6f74c66d494e50cd46e1b5d8c
Проверяет содержится ли в строке любое из слов массива
{ foreach ((array) $needle as $n) { if (strpos($haystack, $n) !== false) return true; } return false; }
1
e0d5e98b9aaa87a53b0771a5ac3be33c
fb51c4a63fb3639d726744d6976b6564
Returns the meta object for the '{@link easyflow.graph.jgraphx.TraversalEventGraph#applyTraversalEventCopyGraph(com.mxgraph.model.mxICell, easyflow.traversal.TraversalEvent, org.eclipse.emf.common.util.EList, easyflow.util.ReturnValue) <em>Apply Traversal Event Copy Graph</em>}' operation. <!-- begin-user-doc --> <!-- ...
EOperation getWorkflow__ApplyTraversalEvent__TraversalEvent();
0
350a7e26cf77763f9306fa346eaeae79
c2171a01f0eaf2188f922340abb3d193
Gets a range of ContentObjects, ordered by the average user rating.
where T : VariationContent { IEnumerable<ContentReference> contentLinks = this.GetPersonalizedRecommendations( contentReference: contentReference, amount: int.MaxValue); return this.GetContents<T>(contentLinks: contentLinks, amount: amount); ...
0
765316ce66d5a991fdb2743c9f2a57f6
c39fc0e77f27ee03369e3e6fa769836a
The function returns a pointer to a specified subauthority in a security identifier (SID). The subauthority value is a relative identifier (RID).
namespace AttackSurfaceAnalyzer.Utils internal class NativeMethods [DllImport("advapi32.dll", CharSet = CharSet.Auto, SetLastError = true)] public static extern IntPtr GetSidSubAuthority(IntPtr pSid, UInt32 nSubAuthority);
1
4a1ce26cf55259c04d368465140bdced
7024494919cace04f3cf43143aa8bd47
Returns a number of products of block. The formula: кол-во тетрадей * (тираж + количество изделий на приладку)
class BaseEstimateOfPrintedSheet implements EstimateOfPrintedSheet public function getNumberOfMaterial(): float { return $this->getNumberOfPrintedSheets(); }
0
066165d24a57b8a95ae2bbedea0586af
38deebdf61614f47e42ed9f866e9f5af
Output : garis horizontal dengan simbol sama dengan (=)
for ($i=0; $i<= $jum; $i++) { echo "="; } }
1
fb7ef3e18ef3ddd814ec7733c2788e2c
77c4adc9d8715571b08a6d181c2fbdc0
Configuration specific for a Remote Repository. Structure is documented below.
class Defaults: def __init__(self, remote=None, revision=None): if remote is not None: _wrn_if_not_remote(remote) if revision is None: revision = 'master' self.remote = remote self.revision = revision
1
38603675bd01ca396e4e20488e297adf
655977edb20330d8944a800bf899e809
version 0.7 Returns array of unspent transaction inputs in the wallet.
class BitcoinRpc public function listUnspent($minConf = 1, $maxConf = 999999) { return $this->makeRpcCall('listUnspent', [$minConf, $maxConf]); }
1
a26cd5ead1242d14d8c8b4dc5016ee00
b1275e34f9442cfd49d882992890f773
Удалить короткую ссылку (при условии совпадения секретного ключа)
class ShortlinkController extends Controller public function destroy($id) { $shortlink = Shortlink::where('user_id', \Auth::user()->id) ->where('id', $id) ->first(); if (!is_null($shortlink)){ $shortlink->delete(); return response()->json(null, 204); } else { return response()->json(['error' =>...
0
57a1eb02aeb2ba1fb6c3cd7ea1d051be
5c1f1cad12de1680e50ad642a32732de
@brief Enable/Disale low-pass filter on LPS22HB pressure data
{ if (LowHighPassFlag == 0) { if (lsm6dsv16x_filt_xl_lp2_set(&(pObj->Ctx), 1) != LSM6DSV16X_OK) { return LSM6DSV16X_ERROR; } if (lsm6dsv16x_filt_xl_lp2_bandwidth_set(&(pObj->Ctx), (lsm6dsv16x_filt_xl_lp2_bandwidth_t)FilterMode) != LSM6DSV16X_OK) { return LSM6DSV16X_ERROR; } } ...
0
f6923b2497be86dcdf9c18f1cc7c057c
77fd767d3d1ca1020c2631d09e27b5c6
Get notifications about user's trades in any instrument of a given kind and given currency
def get_user_trades(): path = '/v3/user_trades/' result = __make_request__(path) return result
0
5d8ee069fcba5161fbfa680d7beb015b
f17418efda409a0cf9f821f33c53d3a1
Verifica si una sentencia retorna datos
class CrearTabla def verificarInstruccionSalida(expresion, tablaActual) tablaAux = tablaActual exp = verificarExpresion(expresion.expresion, tablaAux) contenido = tablaActual.buscar(expresion.expresion.token.valor) if !contenido error = "Error en línea #{expresion.expresion....
0
d9f9cad0c3fc0832138da6c9f2133bed
61b0d59b89a4adf737647d159b6a4877
Méthode qui permet de calculer le vainqueur de la partie
pl1 = copy.deepcopy(plateau) pl2 = copy.deepcopy(plateau) pl1.placerPion(p1, self.cote) pl2.placerPion(p2, self.cote) n1 = pl1.compterPions(self.cote) n2 = pl2.compterPions(self.cote) if n1 > n2: resultat = p1 else: resultat = p2 ...
1
98538e17e364ab7918c4fa89e4fe109e
e1cd1d2da16a16bbee8c37f590434e98
Compute n-dimensional sliding windows.
def rolling_window(arr, window): shape = arr.shape[:-1] + (arr.shape[-1] - window + 1, window) strides = arr.strides + (arr.strides[-1],) return np.lib.stride_tricks.as_strided(arr, shape=shape, strides=strides)
1
e3edcb7c0d5631884ed44df785327018
1822525b83c5cc8b2ad233986d748f6f
初始化角色服务
class Role_service extends JsonRpcService public function __construct() { parent::__construct (); $this->CI = & get_instance(); $this->CI->load->model("role_mdl"); }
1
85398a11569e07ea5e00352562c619b3
0a2189656bac06aeb6e535f94e09517b
一直发送消息,直到出现了符合条件的消息为止,而且符合条件的消息也会被发射出去
c1 := msgGen("service1") c2 := msgGen("service2") c3 := msgGen("service3") c := fallIn(c1, c2, c3) for { fmt.Println(<-c) } }
0
173bcce46b7249d8b5ea13f809b0dd10
85f570f4f2b9c34dacd9b20391d91d49
Starts the Automation server in a separate process.
{ Task serverTask = new Task(() => Run(cancellationToken), TaskCreationOptions.LongRunning); serverTask.Start(); return serverTask; }
0
da3ae83f04cda8dd99e9c35dea5bf609
5e4fe7f3f096bffb1258e1ca2531d21f
Konvertierung in Figur; nur in der Ebene
public class CRenderEngine public void convertFrom(ECoord sysCoord) { }
0
c58c1c0fbd1e19f87ebc21c4f7336824
b2ab7eb7f40a67fc069e99362c800f9e
Walk all the values in a c array (ends with null)
{ cst_val *n,*np,*nl; for (nl=0,n=l; n; nl=n,n=np) { np=CST_VAL_CDR(n); CST_VAL_CDR(n) = nl; } return nl; }
0
9cffe8ffa22fbbcac5c342d3a47afed7
f18ff780bc511229faad89c25f85db9f
Check to see if NumTapesToCreate property is set
namespace Amazon.EKS.Model public partial class CreateNodegroupRequest : AmazonEKSRequest internal bool IsSetTaints() { return this._taints != null && this._taints.Count > 0; }
0
62407e2e6e957cb38feb90878166011d
a73465548d0f84af7edcb5c856b7ad48
清空一个对象的数据,默认将对象中的每一项的值都设为空
clearEmpty (data) { Object.keys(data).forEach(key => { const item = data[key] if (item === null || item === undefined || item === '') delete data[key] }) }
0
36e78beb998adf9f51e7a4b2fa1fd453
9b141a84098fe960c81a7fd4d82d0890
Delete($varId) -- Loops through the cache directory and removes any cache files with the varId specified in $varID
class Main public static function flushCache() { if (self::setting('cacheDir')) { foreach (\glob(self::setting('cacheDir') . '/*') as $file) { if (\is_file($file) && \substr($file, -4) == '.var') { \unlink($file); } } } }
0
2017c08b5fa4bc4a8d9f51e8fd2cb603
fcef38901ec9b0b67a4a86d5085fa154
Recursive Implementation of Bisection Search
double recursiveNewton(double x, double e, double a) { double abs = a*a-x; if(abs < 0) abs = -1 * abs; if(abs <= e) return a; else return recursiveNewton(x, e, (a + x/a)/2); }
0
643e0eda32c15a1a466e75d56fe8da46
9c1dcd3ec43c4fc265164e1c67c39ecb
生成分阶段期满返费信息
{ $tran_info["overdue_month"] = app_month($tran_info["overdue_time"]); $product_service = new \Frontend\Model\ProductModel(); $renewals_info = array(); $total_price = array(); $product_info = $product_service->get_product($tran_info['product_id']); if(!$product_info) ...
1
3a2f751277fb7328ea7c2fcbc00b1f3a
d261704f90e5f8f7daa20b9328d589d3
已读减1
* setReadOne({ payload }, { call, put }) { yield call(services.setReadOne, { msgId: payload }) yield put({ type: 'setRead', payload }) }
0
a93e5e0aa943f6083cc42462bf153499
6abd4bc5c0c21f34139e96a666acc0fa
セーブデータを空にします
public class SaveDataIO public static void deleteSaveData() { if (saveData.delete()) { JOptionPane.showMessageDialog(null, "セーブデータを消去しました", Main.GAME_TITLE, JOptionPane.ERROR_MESSAGE); } }
0
c0d0901b4a2a9802b9ef0edf6d8c87a6
1a21d50b6ece9515fd39ec63e969d00a
Allows the User object to subscribe to Ticker for the specified Stock
interface BrokerApi suspend fun subscribeTick(code: String, extras: Map<String, String>? = null)
1
ee6f6cd42739b59892c501b1f1f84946
5a2f1d3a57a3c857a3a0793116e036b6
dodaje dati koncept u plan koncepata pod uslovom da isti nije vec unet u plan koncepata i da nije u listi predjenih koncepata
if (checkIfConceptAlreadyInPlan(cID)) { return false; } else { if (checkIfConceptAlreadyPassed(cID)) { return false; } else { if (conceptPlanFinal.isEmpty()) { conceptPlan.addElement(cID); } else { conceptPlanFinal.addElement(cI...
1
be021c452bb4fb533a339765c7e7d928
a17926801a1e19ce5afc7355fe9c76b0
判断是否为登录接口
if (!url.startsWith("/")) { url = "/" + url; } if(url.equals("/client/login")){ return true; } if(url.equals("/client/storeLogin")){ return true; } return false; }
1
ac64715687d098d4aaaa2787fa607025
0ad328ee9a3f62241ab3ecc4650e6e29
Overriden by subclasses to display upload progress.
public class RouterWriter extends AsyncTask<String, Integer, ArrayList<String>> protected void onProgressUpdate() { }
1
6855eb4d61d23cfd281fb78f5378a6d2
5d44b975c5a5a0ffd805382ea99dad04
Loads previously generated peaks from disk.
{ List<DataPoint> tempDataPoints = new List<DataPoint>(); string path; if (useGeneratedData) path = Directory + "generated_" + _generatingDataCount + "_" + DataFileName; else { path = Directory + DataFileName; } if (F...
1