query_id
string
corpus_id
string
query
string
code
string
label
int64
70ce521ebbd087dc02919305e8743ef4
e2d5ab09dbaa455214e2966d4978a176
Gets the bonus planet animator.
public class Model public PlanetInteractor getPlanetInteractor() { return (PlanetInteractor) interactorMap.get("Planets"); }
0
4605265d7152decfdd49191a42768c99
e37301e03f85837e3cfe3b985088df73
Ebay 广告费
{ $aSet = array('aal_price_flag'=>0); $aVars = array('product_id'=>$this->_oAdvt['product_id'], 'sg_ebay_account'=>$this->_oAdvt['sg_ebay_account'], 'ship_fee'=>$this->getShippingFee(), 'ebay_category_id'=>$this->_oItem['PrimaryCategory']['CategoryID'], 'bid_price'=>...
0
0f750ecd75f0542604ccd50cc63657a8
17339c26c783c9f151dfdffe71c3b642
@brief Read metadata about siblings.
lyb_read_sibling_meta(struct lyd_lyb_sibling *sib, struct lylyb_ctx *lybctx) { uint8_t meta_buf[LYB_META_BYTES]; uint64_t num = 0; ly_in_read(lybctx->in, meta_buf, LYB_META_BYTES); memcpy(&num, meta_buf, LYB_SIZE_BYTES); sib->written = le64toh(num); memcpy(&num, meta_buf + LYB_SIZE_BYTES, LYB_IN...
1
ca4e229f9acdbbcc7bbf0b324eaff06c
1d9ca02a11d85e92b00473c1bf04c983
Función que recibe el formulario con la petición de búsqueda y envía los resultados a las vista correspondiente
$response = new xajaxResponse(); $datos = f_getCalculos($frm); $response->assign("divbusqueda", "innerHTML", $datos); $response->assign("datosdiv", "value", $datos); return $response; }
1
d6dd3462bef4581b6bae891e3d7fd146
b6295b19a3a2a23a237ea00996131044
in deze functie komt alles te staan wat er moet gebeuren als het spel is afgelopen
global canvas, punktestand, lb_abc, restartbutton, label_punkte canvas.destroy() label_punkte.place(relx = 0.5, y = h-150, anchor = "n") lb_abc = tkinter.Label(main, background = "white", text = "Du bist am Ende des Spiels angekommen!", font = "Arial...
1
3f3e1a2b4bd5f2cf6ed64271a0ae3ef8
e7e92d8fa4368cc15b589a3ff81fb36d
Determine the standard keyword arguments to pass to list() method.
return super().base_args() | { EPPostListParamBase.LANG_CODE: fields.Str(), EPPostListParamBase.START: fields.Int(default=0), EPPostListParamBase.LIMIT: fields.Int(default=DEFAULT_LIST_LIMIT) }
1
f190b99840af578f1c4203cbbbf1c2bc
c7b1264e0656f5c116730ec9503bf35f
Writes the blocks of the skeleton _ID.py to file for one calculation.
N = parameters["ncomponents"] D = parameters["dimension"] assert N == 1 if timeslots is None: T = 0 Ts = None else: T = timeslots Ts = timeslots if lincombsize is None: J = 0 Js = None csJs = 32 else: J = lincombsize Js ...
0
709b985b8f50f69e2e90e1a037abad9e
90b1ba59fe9bd406bdcc54100f7c3342
Reindexed products with price which depends on date
{ $process = $this->getProductFlat(); if ($process) { $process->reindexAll(); } return $this; }
0
749c60754ce7ccbe9b0a35335cf53303
14be6aabbfbfa1e73308688196109112
Constructs a multinomial probability distribution.
self.force_flatten = force_flatten self.force_merge = force_merge if kwargs: assert not args args = kwargs.items() elif len(args) == 1 and isinstance(args[0], dict): args = args[0].items() elif len(args) == 1 and isinstance(args[0], list): ...
1
bdc04cd768a187aa296a63e98cadf3d4
e78ea23e185bddcf89fd419d741b0302
Answer the redzone size plus space for any signal handlers to run in. N.B. Space for signal handers may include space for the dynamic linker to run in since signal handlers may reference other functions, and linking may be lazy. The reportheadroom switch can be used to check empirically that there is sufficient headro...
{ return q_pointer->spaceForFocusIndicator() + q_pointer->gradientThickness() + 2 * q_pointer->handleOutlineThickness(); }
0
e99e584c2002f44bbd9463461aa8a31c
d945d6bfb4e96bfead2ff18c9b75e52e
[initToolBar 初始化工具栏的按钮状态]
export class PayDetailComponent extends BaseDetailComponent implements OnInit private initToolbar() { this.preNextOption = { currentSheet: this.routerParam.entity.sheetid, keyWord: 'sheetid', searchParams: this.routerParam.entity.searchParams, loadDataInterface: (...
1
94aafcc89c2b2c519138029c9872731c
aadfce432332a0bec2a4a7929afe930c
Find the file path in local PC of depot file @depot_file Note: p4 where does not check file exists is local or not. So local path of file that already removed from depot will also found
def _get_depot_file_content(depot_file_path): cmd = ('p4', 'print', '-q', depot_file_path) return run(cmd).stdout
0
f4dce22e92df978184f54bb33501681f
2d74369db24e71cb0d82a56d9ba6476f
驱散部分怪物(怪物放入缓存池中)
namespace GameFramework.Taurus void DespwanAll();
0
a8c302bcfeadc2e2ce80446bd2e78562
9b65ecc8fd81a9315e2d83ecb54b800b
======================================================= Actually filters out quickchecks, but shows all OHW =======================================================
function filter_classes(){ var my_classes = JSON.parse(JSON.stringify(basic_classes)); take_out_physics(my_classes); take_out_physicslab(my_classes); take_out_chemistry(my_classes); take_out_chemlab(my_classes); take_out_nontech(my_classes); return my_classes; }
0
e6d84e1dc58118a6f7d57280b2f3da59
b0db047b01fd88e67071b46652f56827
将一串以默认逗号分隔的数字转换为Long的list
public class StringUtil public static final java.util.List<Long> toLongList(Object obj) { return toLongList(obj, ","); }
1
449f8c4b31a6b8b5122f981641925513
099441f6ca79eb48daab1495a3e92674
編集コマンドを実行する(ブロックの開始と終了を伴う)
{ string operationCode = ""; string operand = ""; for(int i = startLine + 1; i < sourceCode.Length; i++) { operationCode = ""; operand = ""; string line = sourceCode[i]; string[] term = line.Split(del...
0
f80e1a53f13ba2bdb200da0869515833
36d9e94745ad32beb7a288f6c3c1cc23
Radius of curvature of the parabola
double rad = r; if ((rad <= 0) || (rad > (a * sqrt(2)))) throw std::exception("Radius of curvature versus polar radius:" " incorrect radius value. Such a point doesn't exist."); return (2 * a * a) / (3 * rad); }
0
1019ec0dc06cc627e8412cb8bfb75447
20bb82dc60dfd97ffae79e6bfb17e601
Convenience method to provide audit logging to other services.
@Logged(executionLevel = LogLevel.TRACE, errorLevel = LogLevel.DEBUG) public class PollVDSCommand<P extends VdsIdVDSCommandParametersBase> extends FutureVDSCommand<P> @Override protected void logToAudit() { }
0
d893cbd6cb5139bb5f27c82c1d3e6cae
c6099d73a9d5e38d6442c5fd5adf158c
包含全选操作权限头部指令
optionsRender(_, record) { const match = this.props; const operators = [ { key: 'edit', ele: ( <ButtonPermission type="text" permissionList={[ { code: `${match.path}.button.edit`, type: 'button', ...
0
a106092a305915ac7a991fdf7a9f0a8a
e92ef90bda437d751f4d10d94a9ff2ca
计算每个店铺(所有店铺级优惠活动)总共优惠多少金额
namespace Himall.Application public class OrderApplication private static decimal GetShopFullDiscount(List<CartItemModel> cartItems) { var productIds = cartItems.Select(a => a.id).Distinct(); var shopId = cartItems.FirstOrDefault().shopId; var actives = FullDiscountApplic...
1
5b5563c18357baf87f57c2aba113bf10
a2f93ba7e315529a7f929c43cbbfce5a
切换其他模型
when (select) { ModelSelect.MODEL_ENGINE -> { if (modelLoader.modelEngine) { val active = ModelEngineAPI.createActiveModel(modelID) val modelEntity = if (init) ModelEngineAPI.createModeledEntity(this) else ModelEngineAPI...
1
d8fa1baa13bfbdb5f96c41120e500a4f
fb8fdee75af0ba7bd2eea7c09b932062
Clear Watchdog time-out flag and Watchdog Interrupt flag
{ if (unStatus & WWDT_WDMOD_WDTOF) { WATCHDOG_vClearOption(WWDT_WDMOD_WDTOF); } if (unStatus & WWDT_WDMOD_WDINT) { WATCHDOG_vClearOption(WWDT_WDMOD_WDINT); } }
1
62b72af501f0e3120410063a1cbdad01
eb082c65c9a76ea71c62eb33a426bd41
Registers a configuration instance which default <see cref="SqliteStoringOptions"/> will bind against.
.ConfigureServices((context, services) => { services.AddSingleton<IDbConnectionFactory>(c => new OrmLiteConnectionFactory( context.HostingEnvironment.ContentRootPath.CombineWith("App_Data/Northwind.sqlite"), SqliteDialect.Provider)); });
0
21c48821017973a69f897499f29da694
e197f4c05ce9bd3e3b0a372a6f67b576
function for character count
def Character_count(file_path): file = open(file_path, 'r', encoding='utf-8') character_count = str(len(file.read())) return character_count
1
a96d17c61a34ee464b7a22a0ae12f6ad
cda6b284366f30dddd1650bec503a47e
查询自己在讨论组内的信息
String sql = "select * from groupInfo where groupAttribute ='" + Group.Type.DISCUSS + "'"; return helper.queryAll(Group.class, sql); }
0
f135b71aba2b6c6e6900b2c334e8a244
5f0667f2e8a245b4f47fd50d1e109b53
Displays the editor of the building appearance.
class Project extends Auth public function showBuildingEdit(){ config(['default_ajax_return' => 'html',]); return $this->fetch('building_edit'); }
1
ab1f1ac5bf73680bce635cffb1d30f2f
80979c3740dd2461356fa1e6ec3d813b
Convolutional Neural Network model class, used with input set to model type 1. Should be paired with EMNIST data, set to data type 1.
self.input_layer = input_layer self.trainable = False self.params = [] self.bias_params = [] self.mb_size = self.input_layer.mb_size self.data_order = layers.data_order.type2 assert (len(self.input_layer.get_output_shape()) == 4), \ 'Input must have 4 ...
1
8249b253c846ceb19347414b24af6b32
f523a4c66460dc61ef56033f113df7d7
add the tabbed widget to the interface
class Browser_Main_Widget(QMainWindow): def addTab(self, tabName, widget): self.tabBar.addTab(widget, tabName) self.tabBar.setCurrentWidget(widget) index = self.tabBar.currentIndex() self.tabBar.setTabIcon(index, self.page_icon)
1
336f8f808b6fe9ccd2e3d976cfe93675
a0707c93ed83308d5ebfbc365a7b9840
返回 ``delta`` 个季度后的报告期
class DataLoader(object): def _last_nperiod(raw_data, curr_period, back_quarter=1): new_period = period_backward(curr_period.values, back_nquarter=back_quarter) new_idx = pd.MultiIndex.from_arrays([curr_period.index, new_period], names=['IDs', 'date']) return raw_data.reindex(new_idx).reset_inde...
0
e408b87cf9033cf2dddb07cc007d80fe
154dee64ebe1524ab0c534b7e02c97aa
Performs linear interpolation on all rows of a matrix
{ Matrix4 result; result.M11 = start.M11 + ((end.M11 - start.M11) * amount); result.M12 = start.M12 + ((end.M12 - start.M12) * amount); result.M13 = start.M13 + ((end.M13 - start.M13) * amount); result.M14 = start.M14 + ((end.M14 - start.M14) * amount)...
1
121182375d26e618cc2d74006937c652
3333d7286d97fe70fd87997c3d0d911d
Configures the set reg creds form submit event handler, so an ajax post is performed instead of a normal form post.
function settingMemberFormSubmit() { memberForm = el('.member-form') buttonLogin = el('button.button-login') buttonSignup = el('button.button-signup') if (buttonSignup) { formValidState.passwordConfirm = false } memberForm.addEventListener('submit', handleSubmit) }
0
0444ab10a56b78f0af5529a1476d632b
f73eb320bdb57e0145a3f3f620c4ec5c
Sets default values for a HitObject.
Hit::Hit(): hit_(false), distance_(0.0f), intersec_({0.0f, 0.0f, 0.0f}), normvec_({0.0f, 0.0f, 0.0f}), matname_("Material"), type_(""){}
1
c0e0f49380b435b8bda57887d6c355ef
28e7bffef7be6537f02d8547f0d30d5f
Lista todas las entradas de un usuario
{ var uri = $"/api/users/{userId}/entries/"; (string content, bool isSuccess) = await ExecuteRequest(RequestType.Get, uri, ""); if (!isSuccess) { return (null, content); } return (JsonConvert.DeserializeObject<EntryModel[]>(...
1
c790e01ba404bfccbbb8f5e606b496f3
cabb804b0a94abd597467edbbf3c489e
Computes the log (base 10) ligand concentration using and exponential gradient.
class ReinforceMultiModalSets(Reinforce): def get_log_molar(self, y): return y * (self.ic50_max - self.ic50_min) + self.ic50_min
0
ff3da48d1392cf8001c9be7e8a3a6c8b
165531d9bceb3f96a072f45378501bcd
This method takes the two different classes as testing data, labels them, takes its prediction with trained parameters, check the prediction against actual label, count the true preictions and then return the accuracy of the model
total = 0 predict_labels = model.predict(test_sentences) predict_labels = np.argmax(predict_labels, axis=1) for i in range(predict_labels.shape[0]): if predict_labels[i] == test_labels[i]: total += 1 accuracy = total/predict_labels.shape[0] return accuracy, predict_labels
1
cb0f834b9b039ac05f133663dcd408fb
f157b1cc2ad0d7f83ab4b502a3277fb7
根据treeId查询表sys_menutree_config中的数据
@RequestMapping("/api/getTreeByTreeId") public ResponseData getTreeByTreeId(@RequestParam int tree_id);
1
6e4557b957c27292e8d11bd646e383c9
31e742adca444cace08f73a5f386b447
create object of predefined type
namespace ODPSpatial public abstract class OracleCustomTypeBase<T> : INullable , IOracleCustomType, IOracleCustomTypeFactory where T : OracleCustomTypeBase<T>, new() public IOracleCustomType CreateObject() { return new T(); }
1
6c9d90452d11f56ed39b407f9820b38b
12bcf5e6c619005ce9c3f7f9a84a63c2
批量打开格口.
namespace Driver public class E3JManipulator public void GrabOpen() { Port.Write("GO"); }
0
8953a6a65ba8de42fa416696157ec3b6
df2e1f518a6e21bb2f2aa920a6dab232
根据年份和月份获取月份天数
function get_days_by_year_and_month($year, $month) { if ($year % 400 == 0 || ($year % 4 == 0 && $year % 100 !== 0)) { $rday = 29; } else { $rday = 28; } if ($month == 2) { $days = $rday; } else { $days = (($month - 1) % 7 % 2) ? 30 : 31; } return $days; }
1
0490b93528849294a1b7891f3da9ad15
5a29ee3ab06d7bb8293b3239cefa18fc
The goal of fake GET is to check if this function was indeed called or not
def dummy_get_response(request: HttpRequest): return None
1
74127debe558c68bbdadc946654d60c7
cbf050c0a2badfd227f4f94503401c85
カテゴリーの番号を指定してkindテーブルの値を割合が高い順に取得する関数
is_tensor = [True for value in cat_to_name.values() if value == 0] is_tensor = len(is_tensor) > 0 if is_tensor: key_name = 'folder_number' value_name = 'tensor_id' else: key_name = 'index' value_name = 'flower_name' flower_dict = {key_name: [], value_name: []} for...
0
5f7fb84970e2deab82a8eac14bb2d49e
e65d5707b14c450b4e177a6959e372c5
Composes an HTML build report.
headers = dict(self.request.headers) headers["Content-Type"] = "application/json" response = self._proxy( "{0!s}/buildreport.{1!s}".format(self.config["print_url"], spec["outputFormat"]), method="POST", body=dumps(spec), headers=headers, ) ...
0
b3552919e4991f0c709ffd622c412cde
35ec7ff91c1213079b7dd6953069893a
Funzione che lancia l'evento di conclusione della macchina a stati
public class StateMachine : MonoBehaviour public void stopStateMachine(){ if(isMachineRunning){ CancelInvoke ("startStateMachine"); currentState.stopState (); isMachineRunning = false; } }
0
d33cfb77b736225f76a9efdcc6e45488
6cc3295f8e20a5daee2e301d51afa321
显示当前的body
{ $body = Bodys::findOrFail($id); $pageConfigs = ['bodyCustomClass' => 'app-page menu-collapse']; return view('pages.bodys.show', ['pageConfigs' => $pageConfigs] ,compact('body')); }
1
adcd989e6df9202761f2e6acbadb1c6a
55d9d480e0790aef60487b0ad49b7106
If status is already in the list, don't add (return false)
namespace rc bool StateMachine::AddState(StatePtr state) { auto it = states_.find(state->name()); if (states_.end() != it) { return false; } states_.insert(std::make_pair(state->name(), state)); return true; }
1
24e43a84cf6a5795e0fadeb655344356
87e0a9facef32f45f8ad4ef3b95d7677
Returns if there is a next {@link ISlice}.
namespace Opsive.UltimateInventorySystem.UI.Grid public class GridNavigatorBase : MonoBehaviour protected virtual bool IsNextSliceAvailableInternal() { return m_Index < MaxSliceIndex; }
1
1a0a7baba959a8336e7a44d3f8f391b9
fecc20dd367267ec3d58fc9cab273904
Listar Mantenedoras (retorna um ResultSet)
public class PersistenciaSuperAndes public List<Categoria> darBebedores () { return sqlBebedor.darBebedores (pmf.getPersistenceManager()); }
0
5dcab01b2f14369c72c5c464cd46abba
1e1f5de1ca5dbb96bb79077a8f57df3f
Price Stream Get a stream of Account Prices starting from when the request is made. This pricing stream does not include every single price created for the Account, but instead will provide at most 4 prices per second (every 250 milliseconds) for each instrument being requested. If more than one price is created for an...
namespace Binance.Net public class BinanceClient : RestClient, IBinanceClient public WebCallResult<IEnumerable<BinancePrice>> GetAllPrices(CancellationToken ct = default) => GetAllPricesAsync(ct).Result;
0
ea7e45a0f68ecd5f5320d4ab853d3195
a123043a702c007bca25c2d2d40e433e
Updates the title for an already shown icon. This is a platform dependent implementation.
public class JSysTrayIcon public void setWindowTitle(final String windowTitle) throws IOException { int rc; if(systrayHandle==0) { throw(new IOException("Systray icon has already been deleted")); } this.windowTitle = windowTitle; rc = nativeModifySystrayIcon(this.systrayHandle,-1,null,this...
1
b662fc810cfcbaa9923c0f8169d7cba1
bcaa594ffc670e6fc509b1bcbb696365
Get the ITAUpdateControl interface from the TA Display Manager Store it as a member variable for future use The DisplayManager is a singleton so the reference should never change
class Intersection_Control: def get_t_update_ctrl(self): return self._t_update_ctrl
0
f66134d0e81edca64c8576019094ceae
2f5576e025010104fb1cd32553b5c94d
Sets event handlers, and default variable values
{ setupEmailListeners(); setupPhoneListeners(); setupLabelListeners(); setupPwListeners(); let checkboxes = $("input[type=checkbox]"); for (let i = 0; i < checkboxes.length; ++i) { checkboxes[i].addEventListener("keydown", checkboxKeydownListener); } setupSubmitButton(); ...
1
be310857a284fbe0023ba27f24365ca8
5dbf5e35c825e4cf486755c644518bcc
Attempts to upload a file tuple to Discovery using REST API (tuple includes the file name, the file content, and file content type). Has a single retry on HTTP code 429 status. Returns a response with following format" { "success": True / False "response_code": HTTP response code "doc_id" : "The uploaded document Id, o...
d_status = DOC_UPLOAD_DEFAULT_STATUS if document_id is not None: discovery_url = disco_instance.url + '/v1/environments/{0}/collections/{1}/documents/{2}?version={3}'.format(disco_instance.env_id, disco_instance.col_id, document_id, WDS_API_VERSION) else: discovery_url = disco_instance.url ...
1
a894fbc0eb98a62b7624614f08f714eb
570897b8e18ce0acd6837ec7a429c796
吧double转变成一个小数点两位的string 会四舍五入
public class TrayOrderDealActivity extends BaseActivity implements OnClickListener,AbsListView.OnScrollListener private String DoubleCast(Double data){ NumberFormat nf = NumberFormat.getNumberInstance(); nf.setMaximumFractionDigits(2); nf.setRoundingMode(RoundingMode.HALF_UP); return nf.format(data); }
1
0c0b32d0b837f95a3fbae530337bd4ea
346a887a66d9272b8d2fad2d4ec959e9
기 등록된 서버정보를 수정한다.
@Repository("serverDAO") public class ServerDAO extends EgovComAbstractDAO public void updateServerEqpmn(ServerEqpmn serverEqpmn) throws Exception { update("serverDAO.updateServerEqpmn", serverEqpmn); }
1
69caaaebfa99134e6107554bf0caedde
26061b5ddbcd2cb8ace9f823d338b0de
Test error is raised if coordinates do not match
p1 = (52.398382, 16.924408) p2 = (52.202013, 21.014115, 21.014115) with self.assertRaises(AssertionError): utils.haversine_distance(p1, p2)
1
0fd2cabd9f2e09c893af6f1c9c2fd040
7e730772c98005f971fe5f981580e52b
Get list of reminders today
{ $sql = new DbQuery(); $sql->select('r.*'); $sql->from('ingenico_reminder', 'r'); $sql->where(sprintf('r.is_sent = %d', 0)); return Db::getInstance()->executeS($sql); }
0
825a92eb67fe51284194712c716abb54
72be7cad584fea54d3a82d957c2eddc4
包含核心公共的函数库
class Loader{ private static function loadCore() { $file = array( './ZGPHP/Kernel/Function.php', './ZGPHP/Kernel/Constants.php', './ZGPHP/Kernel/SmartyView.php', './ZGPHP/Kernel/Controller.php', './ZGPHP/Kernel/App.php', ); ...
1
538b6a3fb54bac2aeac4deaab3c66a85
95f07117b646b9b1d6903bd53856bc53
이전 던전의 정보를 변경하는 매소드
class UI_ChooseDungeon : NGUIChildGUI private void GenerateDungeonInfoForChapter() { if(m_dbfDungeonList.Count>0 && btnDungeonPrefab!=null) { int iCount = 0; List<DungeonInfo> dif = dungeonInfoList; if(m_dbfDungeonList.Count >= dif.Count) { iCount = m_dbfDungeonList.Count - dif.Count; for(int i...
0
e446038603e92555cc1db79860073a48
8b9b0739b175c85a69eedbc55921be12
Trim scale to the image size
class ImageSize public function scale() { $this->crop = false; return $this; }
0
927e761a544d6f0372505396cc4b5b93
6fa3bd6323005fe6840a6abf22915813
Set the value related to the column: STAT_NB_SMS.
{ if ($v !== null) { $v = (int) $v; } if ($this->stat_count !== $v) { $this->stat_count = $v; $this->modifiedColumns[] = MissionTypePeer::STAT_COUNT; } return $this; }
0
4f21ac263a79e90df2e6826f9f3e9279
b619c7716d5994b77fab0f93337b3eb7
Team validieren
if(validateVon() && validateBis() && validateAnzahl() && validateModelle() && validateBemerkung() ) { return true; } else { return false; } }
0
471d267b505247ef00c1d12c29f2a256
ccbe74745bea6fd1116e68442f1fe65b
gets the bumped version from the environment variable passed by the `tag-and-deploy` script in the project root
def active_version(): link = '/'.join([deployment_root(), 'env', env.project_name]) if not exists(link): return None active = os.path.split(run('ls -al ' + link).split(' -> ')[1])[1] return active
0
37ab6a894b6786dba15e64ead8472df6
df89c0d19d10a7c90f709167de8666de
Show contact point locus
void VuDynamicsDebugDrawerImpl::drawContactPoint(const btVector3& pointOnB, const btVector3& normalOnB, btScalar distance, int lifeTime, const btVector3& color) { if ( mbEnabled && (mDebugMode & btIDebugDraw::DBG_DrawContactPoints) ) { drawLine(pointOnB, pointOnB + normalOnB*distance, color); char buf[12]; VU_S...
1
ec500057d02db18d44c813701002fe91
171e58c48349855ff82c8fc1112bcbd8
Convert wind mph to wind knots
class UnitConvertor: def mphToKt(self, value): return value * 0.868
1
27e8d71c670b581685fc9314052986d8
a8bf32844935aa8920d8d5bc2e6fce7f
Maybe replace noscript elements with placeholders. This is done because libxml<2.8 might parse them incorrectly. When appearing in the head element, a noscript can cause the head to close prematurely and the noscript gets moved to the body and anything after it which was in the head. See <https://stackoverflow.com/ques...
if (!context.querySelector('script[data-big-pipe-event="start"]')) { return false; } once( 'big-pipe', 'script[data-big-pipe-replacement-for-placeholder-with-id]', context, ).forEach(bigPipeProcessPlaceholderReplacement); if (context.querySelector('script[data-big-pipe-event=...
0
8232b8e23f7ec802c046f9d0cf2a7b04
4d8c4aeda9d4c7e5c9e2629298fb605f
Returns the meta object for the attribute '{@link org.abchip.mimo.biz.model.order.return_.ReturnItemType#getDescription <em>Description</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getPerfReviewItemType_Description();
0
bb3f8eacfdd08bbc51affaa5b21452b8
ba1f541d6d2c08b79604be7338597f75
Primero pregunto al usuario cuántos números introducirá, para así poner un máximo
var contador = 0; var numero; var respuesta = true; var maximo; var minimo; while (respuesta == true) { numero = prompt("ingrese un numero:"); numero = parseInt(numero); if (contador == 0) { maximo = numero; minimo = numero; } else { if (numero > maximo) { maximo = numero; } else { i...
0
071c62c38fc9f589df390471795bc95d
0651eda508f94b4b73b94b00b9e60afd
Create delta coordinates by subtracting other coordinates from this coordinates.
class Coordinates(object): def __sub__(self, other): return Coordinates([c1 - c2 for c1, c2 in zip(self._values, other._values)])
1
c3bca22a968fc6b2b54667255a0b3797
52f255f23e3e994d11b5b97907901d9b
guaranteed to be 0 or 1
int flip() { if ((((float) rand()) / RAND_MAX) < 0.5) return 0; else return 1; }
1
75cc839a9f81e9532919c2031fd646b5
da354c4695931c822d4f51de9b2b4891
used to reload Messages table again from database to memory
void loadNewMsgFromDB();
1
fb8862a3cd9013c69f626b7843d39793
ae3a1bc33f3907c6cc2d6b4e759b8771
Retrieves a single audit log for the given Id. Attributes: audit_log_id: The Id of the audit log to retrieve.
class Audits(base.HasClient): def get(self, id): return AuditReport(self._client, id=id)
1
e37146b068c739ac7fd02238900b87a6
af3b900168504079e3b7be6aae0e63f7
Returns a new <see cref="DateTime"/> that adds the specified number of days to the value of this instance.
namespace Deveel.Data.Sql.Objects public SqlDateTime Add(SqlDayToSecond interval) { if (IsNull) return Null; if (interval.IsNull) return this; var result = value.Value.AddMilliseconds(interval.TotalMilliseconds); return new SqlDateTime(result.Ticks); }
0
c02861f5d5ce41b87e2b1d01d413939c
640c2c6c99a27ce7212970f15ffc34fa
@brief 分配大块内存,超过一页
static void *alloc_memblock(size_t size) { uintptr_t addr, start; static unsigned long total_vm = 0; size = ALIGN(size, VPAGE_SIZE); addr = (uintptr_t)os_mmap(0, size); if (skp_unlikely(!addr)) { log_error("mmap to [%zu]MB failed : %s[%d], total vm : %lu\n", size >> 20, strerror_local(), errno, total_vm); r...
1
a7e23fced38c7b4a79a9eced98529c2c
c02248489f648f18e38e1f76a9fd99aa
分析RTU上行非协议(调试)数据
if data == None : data = bytearray(0) analysis = SiemensS7Net.AnalysisAddress( address ) if analysis.IsSuccess == False : return OperateResult.CreateFailedResult(analysis) _PLCCommand = bytearray(35 + len(data)) _PLCCommand[0] = 0x03 _PLCCommand[1] = 0x00 _PLCComm...
0
0a2bca4eb6ed7319b3759d78e08e7707
683ce5ae4624abae6659e2c03728c6e7
Deselect NRF24L01 chip
static inline void dfmemDeselectChip(void) { spic2EndTransaction(); }
1
b8ab3ed26c05bd42d38265c1cd3a1b65
ab3692dc2e85aa72b76efcabbc75dcda
Returns store with any possible keyword ending at store.chars[position - 1] identified as such in store.typeface
CheckForKeyword(c, store, position) char c; ElementType store; int position; { if (KeyWord(c, store, position)) store = ChangeTypeface(store, KeyWord(c, store, position), position, KW); return(store); }
1
992d5a4f37096bfedc31713926fdab56
5648a7352f572f80a84dcd56f70e5be6
获取所有的预测话题
class Extrasense public function getAllPredicts(){ return $_SESSION[$this->extrasense_name]['predicts']; }
1
f8266c4766222f91f016c55eadf910ae
f963a76c0ebf6d0579e753850a0193b6
Vložení událostí s tříděním podle druhů
{ Issue.Vote += Issue_VoteEvent1; Issue.Vote += Issue_VoteEvent2; Issue.Vote += Issue_VoteEvent3; }
0
c937d4effd844101925d5ec95a80e8d9
6b3a12aa529865f79b81b10a5bb079af
Sets the normalized username.
namespace Bing.Admin.Data.Repositories.Systems public class UserRepository : RepositoryBase<User>, IUserRepository, IUserPasswordStore<User>, IUserSecurityStampStore<User>, IUserLockoutStore<User>, IUserEmailStore<User>, IUserPhoneNumberStore<User>, IQueryableUserStore<User> public Task SetNormalizedUserNameAsync(U...
1
56f0e00384aa268246ccf02a7c471f02
520cbc70a282f922feac80f92b6bc92a
Configures services that are used by the Kaponata Operator.
keystone_config = { 'admin-password': 'openstack', 'admin-token': 'ubuntutesting', 'preferred-api-version': self.keystone_api_version, } if self.git: amulet_http_proxy = os.environ.get('AMULET_HTTP_PROXY') reqs_repo = 'git://github.com/...
0
1a7b472a4c1e4412a95273b4ca4d5137
82b6d35f8d504f29b9372f7b9eddaf14
查询托管任务 查询OBS存量托管任务列表。
public class EgClient public SyncInvoker<ListObsBucketsRequest, ListObsBucketsResponse> listObsBucketsInvoker( ListObsBucketsRequest request) { return new SyncInvoker<ListObsBucketsRequest, ListObsBucketsResponse>(request, EgMeta.listObsBuckets, hcClient); }
0
d1bacadabdcc5da25d9d24306d21d253
72ce2fce670036d79adbf0952c75971d
将当前 <see cref="HandleUnion"/> 的值复制到指定字节跨度中。
{ byte[] bytes = GetBytes(value); Array.Copy(bytes, 0, data, offset, bytes.Length); return bytes.Length; }
1
ef92953752a8017ca8b104e7efecfff4
5459ff7507d658f5cdb1035066a75efa
When the asteroid is destroyed
{ if (_durability <= 0) { return true; } _durability -= damage; if (_durability <= 0) { var targetRange = Mathf.Min(2000.0f, Vector3.Distance(this.transform.position, _player.transform.position) * 0.8f); MainGameState.Instance.AddScore((int)(_score * ((2500.0f...
1
3edcbc6036ae153db07f867719eb0c31
967093675d4ad4a8000ddcb59677eed9
expanding '/:year/:slug/' scheme into e.g. '/2011/awesome-title/
def full_path return self.slug if [self.slug_map].flatten.compact.empty? self.slug_map.dup.join("/") end
1
f0a19db7db08454329e32d19525565ef
6e9e063293f71864b51f2f69ff528983
Create an instance of {@link NotofiableAuxsType }
NotCoExistence createNotCoExistence();
0
ce7db696df937d2dfdf876abd77c9504
e8da7143039ec6cf6b62defb6c6a6c82
Get the child b of this node
public abstract class ASTNode public String getBvalue() { return bvalue; }
0
528e8573420b56ec263d14ff7bab9145
4c909d9498c0ad4d5f463d420533b0d4
检查密码版本号
class ParamFilter extends ActionFilter protected function checkVersion($ver){ preg_match("/^[0-9]+\.[0-9]+\.[0-9]+$/",$ver) or ResponseData::returnError('ERROR_VERSION'); array_key_exists($ver, Yii::$app->params['androidVer']) or ResponseData::returnError('ERROR_VERSION_NOT_EXIST'); }
0
da85aad5633b65ae2dc1b22ca4b2cf54
cd441fd1047adc8ab1477aa659e947ee
获取固定电话的区号
public class DetailsActivity extends BaseActivity<DetailsViewModel> implements OnClickListener public String getCenterNumber(String number) { return number.substring(3, 7); }
0
11a7e620e7e0e8ef7df872e5bd1e51af
3e2e012a5386d4517b17dcd356435250
Number of connections per user
{ boost::mutex::scoped_lock lock(_mutex); std::size_t connectionNumber = 0; SessionsPtrMap::iterator it = _sessionsPtrMap.find(userID); if (it != _sessionsPtrMap.end()) { ConnectionsPtrMap connectionsPtr = it->second->connectionsPtrMap(); ConnectionsPtrMap::iterator iter = connectionsPtr...
1
318878d60799b2e0773da135ae7ea6d5
989782b249f49b3ad8e7c52b3db0bb3a
Genera y retorna identificador de menu
public class MenuManager public int generateNewID() { return menus.keySet().size() == 0 ? 0 : Collections.max(menus.keySet()) + 1; }
1
df01bbcb0a52b8c2738f2113347d9a80
0d28f283bec6c50434d6b3bce5a689ce
判断 100以内的素数
namespace Homework2_9 class Program static void Main(string[] args) { int n = 0; bool[] numbers = new bool[100]; for (int k = 0; k < 100; k++) numbers[k] = true; for (int a = 2;a <= 50; a++) { if (numbers[a - 1]) ...
1
02fd5d65bc4cf409693b4cdfc6cbfde2
d50f2cdba08865e687e8ed31cf0ff7c6
Set logradouro
class EnderecoAprovadoPersistValue_ implements ArrayAccess public function getLogradouro() { return $this->logradouro; }
0
7ae770ce99c1a71190d9d94ed005a6bf
5d58ad5dc29455b42d4aa73e5ceb05ee
Gets the rect in absolute coordinates by relative.
namespace CeGui public Rect AsRelative(SizeF bounds) { return new Rect( this.Min.X.AsRelative(bounds.Width), this.Min.Y.AsRelative(bounds.Height), this.Max.X.AsRelative(bounds.Width), this.Max.Y.AsRelative(bounds.Height) ); }
0
ada1cefa2a5d532f8c33fe8d532aff28
e38d49d2d99e9fda353b064babc1dfc0
从界面类中获取页面数据。赋值到元数据
void initPageData();
0
28afa7a7497ce78e09d97ecd1acd5a86
9243fbdec70be0b3863d7328f239ff93
将编号为ID的机器人进行一次操作,如何操作根据next_step决定
class BaseNode(object): def step(self, last_ack): self.send_packet_() reward = self.evaluate_ack_(last_ack) action, _ = self.agent.observe_and_act(observation=np.array(self.observation), last_reward=reward) self.observation.append(action) if self.observation[-1] is not None: ...
0
6775fd8e0431d663d55967e2aa12fd76
373fcb80ca2f4b4d73d379f41226e8a3
Returns a list of DisplayField objects selected for this group.
public class OrderByGroupByDialog extends TitleAreaDialog public List<FastCodeDataBaseFieldDecorator> getSelectedFields() { return this.selectedFields; }
0
7e10593837240c470ced3ad2a625f1ce
32afda4bf233ec60128ad11547460558
The voltage magnitude of the bus in p.u.
class NfuSink(DataSink): def get_voltage(self): return '{:6.2f}'.format(self.mpl_status['bus_voltage'])
0
923139b133964decd8864daef3a00b48
53902b7fee250b222693213f2421b60b
Test if the sudoku solver gives the same solution Input and output files are from online (Sample problem 7, easy) http://www.nikoli.com/en/puzzles/sudoku/
def test_solve_sudoku_easy9(): sudoku_input_filename = "data/sudoku_easy9_in.csv" sudoku_output_filename = "data/sudoku_easy9_out.csv" verify_sudoku_solution(sudoku_input_filename, sudoku_output_filename)
1
a070921c5ce0c19319c53eabb5b35c2d
6640dc028adbb5a3c1c4cd8528c88688
Returns the Notice Recipients button of this panel.
mine = new JCheckBox(Messages.getInstance().getString("NoticesPanel.0")); mine.setName(".mine"); acknowledged = new JCheckBox(Messages.getInstance().getString("NoticesPanel.2")); acknowledged.setName(".acknowledged"); setCheckBoxes(new JCheckBox[] {mine, acknowledged}, null, ...
0
fe1fea78364395245d7cf6303125dae4
de678d1a6db9e2d4f1ec59009158430e
配置下拉根元素类名
popupClasses() { return [ `${prefixCls}-popup` ]; }
1