query_id
string
corpus_id
string
query
string
code
string
label
int64
ded5a3bf59e9d2fc483c81648855c46c
f6a16fc3bce42bc18b0a89d63df06cab
Calculates the sale margin.
return ( normalizedSales * (this.maxUnitsSold - this.minUnitsSold) + this.minUnitsSold ); }
0
b0567d8601806a2238a67da837585049
675442d9170ac8b0d81901554e947121
retorna o resultado da função objetivo
class SimplexAFS(): def __transformar_funcao_objetivo(self, matriz_T): funcao_obj_T = np.dot(self.funcao_objetivo, matriz_T) self.funcao_objetivo = funcao_obj_T.getA()[0]
0
c1b5b9a9b0262c913da3c17099230109
308d198c56616f61b003a797d08ef539
Ask the factory setter to set factories. Look at ATracingFactorySetter to see how the factories are set
SetFactory getSetFactory();
0
ae8a84d7bbee698af5b4f3178b092d93
430d7771dd6c9cda7192ff32932b3a0f
Sets tie breaker to multiplier value to balance the scores between lower and higher scoring fields. If not set, defaults to 0.0.
class MultiMatch(AbstractQuery): def set_tie_breaker(self, tie_breaker=0.0): return self.set_param('tie_breaker', float(tie_breaker))
1
e25ce4880eb448c843f5df702367f271
b81bd8bef603d00739560038246c282e
根据图书总类,获取书柜中图书列表
public class BookshelfModule extends BookshelfManager @Override public List<PgBookshelfItem> getBookShelfItemList(int type, int offset, int count) { List<DbBookshelfEntity> list = new ArrayList<>(); Ln.d("BookshelfModule:getBookShelfItemList:type:" + type); if (type == Constant.BOOKSHELF_TYP...
1
ea0147606803b65804fc9ad47b7a54f9
05689caa4e483eb1c730d6f83517350a
Initiates the asynchronous execution of the ListVodSources operation.
namespace Amazon.CodeCatalyst IAsyncResult BeginListSourceRepositories(ListSourceRepositoriesRequest request, AsyncCallback callback, object state);
0
b6fb6e973a1a3421e14d1320ced290cf
d5c9b79fd55eb896141fef10fc3d8823
Attempt to cast the spell, which will remove energy from Energies Returns true if successful, false if not It is up to the caller to define and invoke any effects
namespace WCell.RealmServer.Spells public partial class SpellCast : IUpdatable, IWorldLocation public bool ConsumeReagents() { return true; }
0
562fe7496ffa755ce3ea93d693b89b99
f1db32d9b3e9c4f2a9f6890835928352
Follow the routine through, checking the timing comments This follows the case where one value is less than 128
{ printf(" After3 ... "); const auto prev_time = std::chrono::system_clock::now(); int sum = 0; for (int loop = 0; loop < LOOP_OPT08_TYPE6; ++loop) { sum += testOpt08_Type6_After3(value1); sum += testOpt08_Type6_After3(value2); sum += testOpt08_Type6_After3(value3); sum += testOpt08_Type6_After3(value4)...
0
858c334e30e6a2ab09c6e7c0b7bf8050
2258c4ff471556c0bff4a21d720b2209
格式化日期“yyyy-mm-dd”
public class ConvertUtil public static String formatDate(String value) { if(StringUtil.isEmpty(value)) return value; return formatDate(value,"yyyy.MM.dd"); }
0
d2e6c9d286936fcf201db3ef9b11ecfe
6abe5beddc2133bd25caf212c9eecbcf
Выравниваем спрайт по границам области
class Wrapper(games.Sprite): def update(self): if self.top > games.screen.height: self.bottom = 0 if self.bottom < 0: self.top = games.screen.height if self.left > games.screen.width: self.right = 0 if self.right < 0: self.left = games.scre...
1
ee1501fdc3771c749f3796bbd32f1d1e
799c2b4e1af854a3e13e947c81d85821
Determines whether to automatically hide the popup when clicking outside the element.
export class ElderShellService public get clickOutsideToClose(): boolean { return this._clickOutsideToClose; }
1
38f12f87d6e50a6b2e86d11527bda983
947afa059f48c774acb24d67d7247c29
Generic method to handle the starting and stopping of the SPDIF keep alive audio clip playback.
Task<Status> AuthUserPlaybackStartResumeAsync( PlaybackRequest request = null, string deviceId = null);
0
648c65ba981b6c0e515a5b6ad7aebc39
1733c88dbbb893efee175071d443b06e
Unhooks the current feed if it isn't currently valid.
namespace VirtualRadar.Plugin.BaseStationDatabaseWriter public class Plugin : IPlugin private void FeedManager_FeedsChanged(object sender, EventArgs args) { UnhookFeed(); StartSession(); HookFeed(); }
1
4b2e327db8e5c7411933300113b3841a
6c30f1589e4927ff64070b52a28967ce
- Sets the points we want to triangulate. - Marks the holes we want to ignore by their interior points. - Triangulation: no interior steiner points, we want triangles to fill the whole space between two boundaries. Allowing for quality meshing would also mess with the triangulation we want.
self.bounds = np.asarray(bounds) self.shape = np.asarray(shape) x, y, z = self._create_default_points(self.bounds, self.shape) self.set_interpolation_points(x, y, z)
0
9868f3ecec092627c9266ab164fd55fa
1820bf3558520f42c28a231d593bda5c
whether last word from query is present in title - boolean flag
for phrase in ns_keyphrases: if phrase in title: return True title = title.split(" ") for word in title: if word[-1] in string.punctuation: word = word[:-1] if word in ns_keywords: return True return False
0
c5f6c16f72f5cb223c8488be90f755ec
0b23a8fbf77fcafcc5864f88e180dbc7
Convert JsonObjects in diff state to String representation as JsonObject is not serializable
if state: state_to_parse = state else: state_to_parse = self.state return (json.dumps(state_to_parse))
1
a02bd69c5627f7f3e7c48fe17892b658
8e8c87695a0a71e87380c92cb7265781
Given a string of the form "(a,b)", returns the tuple (a,b).
def parseTuple(s, f = lambda x: x): s = s.strip('() ').split(',') return tuple(map(lambda x: f(x.strip()), s))
1
152636018db78ada16d74488bb6ea538
94c9685cfd86443febde68aa7cec8d29
修改代祷需求
@Update("update t_activity_pray " + "set to_user_name=#{toUserName},pray_content=#{prayContent},update_time=#{updateTime} " + "where from_user_id=#{fromUserId}") void updatePrayInfo(ActivityPray pray);
1
79413ebfb49e5a2a7b1ea918d0eeac21
415818a6fbd61bdcc2d7b8db48e0e01a
transfer real avi outfit from old layering system
console.log("Skin converted"); Copy(context, 4, 16, 4, 4, 20, 48, true); Copy(context, 8, 16, 4, 4, 24, 48, true); Copy(context, 0, 20, 4, 12, 24, 52, true); Copy(context, 4, 20, 4, 12, 20, 52, true); Copy(context, 8, 20, 4, 12, 16, 52, true); Copy(context, 12, 20, 4, 12, 28, 52, true); Copy(context, 4...
0
37983f09a3fcb1259e2e3864c4a5d18e
70ed92d5d103522907e7328f0516bce6
Mark link as selected
namespace moveit_setup_assistant void KinematicChainWidget::itemSelected() { QTreeWidgetItem* item = link_tree_->currentItem(); if (item != nullptr) { Q_EMIT unhighlightAll(); std::string name = item->text(0).toStdString(); if (name.empty()) return; Q_EMIT highlightLink(item->text(0).toStdSt...
1
51498b1eeb7fb1c3f95d4798307a5ea3
90a3f3b6003a6f751cff1eaa81e25bbe
填充所有下拉框
var url="./../assigenwork/assignlist.app?method=initDropAll"; $.post(url, function(data){ var list = eval(data); for(var j=0;j<list.length;j++){ var detailList = list[j]; var code = detailList[0]; if(code=='main_event_type'){ $("<option value='"+detailList[1]+"'>"+detailList[2]+"<...
1
e209d19f9f3ef7f4af0efed93b76785c
2a5b77f6e5e21010c58bd2e90f3dc048
判断 该售后 是否 要退元宝
@Transient public boolean getCanAfterSalService(){ ProductService productService = SpringContextHolder.getBean(ProductService.class); ServeService serveService = SpringContextHolder.getBean(ServeService.class); List<Product> product = productService.list("select pt from OrderItem as oi, Product as pt where oi...
0
c30bf244045bf5dd79d703c09adb6b6a
9b96514fa5bbdc126d99a57fad9ae460
add / edit county
$repo = $this->getRepo('EkpCountry\Entity\EkpCountry'); $form = $this->getForm(); $form->setBindOnValidate(false); $request = $this->getRequest(); if ($request->isPost()) { $data = $request->getPost(); $form->setData($data); if ($form->isValid()) { $save = $rep...
1
7507b99253765387d0b64e0c18cc6bd6
5ae51201aeb06e8b27298276126dd99a
验证昵称是否有关键词
class ConfigController extends MobileController private function checkNickname($nickname) { $length = mb_strlen($nickname, 'utf8'); if ($length == 0) { $this->error('请输入昵称。'); } else if ($length >= 10) { $this->error('昵称不能超过10个字。'); } else if ($length <= 1) { ...
0
1fc5a9d10c6cfe39453303c7886bfd87
d47b1b44f251d91e7da864e64a573dc2
Default implementation that returns the display name.
class Displayable(object): def _display_name(self): return "%s %s" % (self._model_name(), self.id)
1
293123212fd0b245df7f25690e0a60a4
f5155085ac090838df481dbcec608f18
Test if initiating ark does set cfg and core modules
initConfig() err := apm.Init() assert.Equal(t, err, nil) span, err := apm.CreateEntrySpan(initInv()) assert.Equal(t, err, nil) apm.EndSpan(span, 1) }
0
0a120aed326fe8eb3876533dacfe2e03
6606024a6e9716181e1be33e543cfe5e
Gets a boolean value of a data reader by a column name
{ try { return GetBooleanNullSafe(dataReader, dataReader.GetOrdinal(name)); } catch (IndexOutOfRangeException ex) { throw new OscErrorException(string.Format(SR.Unknown_column, name), ex); } catch (Exception ex) when (!(ex is OscException)) { throw new OscErrorException(string.Format(SR.Exception_on_column, ...
1
5c99331876594bba575f6afcf7b29782
ba7e8c928fa4f4c42a6582abcd48451c
Get the microseconds of the DateTime object as an integer.
public function getMicroseconds(): int;
1
8acee57ab7b748b4c6c0874bddfd2a1c
f04e69af47f3ac2e04db4247676d220a
Add a field to table using alter.
abstract class BaseEditor extends ForgeClass protected function _add_field_alter(BaseModel $model, Field $field) { $sql_def = $this->column_sql($field); $this->add_column($model->meta->db_table, [$field->db_column_name() => $sql_def]); }
1
58b310e8b4febead0cf932cf4b2e41cc
9d69b4d7a4a6bdcea2c26a08d1472112
Stops the Whatsapp Client
class WhatsappService public function __destruct() { if (isset($this->whatsapp) && $this->connected) { $this->whatsapp->disconnect(); } }
1
dc17de98d2501f3b19b8efda4f33e32c
552a94e1f27b0c2b87e4f5478e60cd76
判断是否为闭合标签,如果是返回true,否则返回false(自闭合标签返回false)
function isOkTag(tag) { return (new RegExp("(," + tag + ",) | (," + tag + "$)", "g").test(",pre,blockquote,code,input,button,textarea")) == false; }
0
b3022865436ec993fc51eca779ac244b
ea42ed4297a760c4188fb090adad7e4f
闪烁中心点
point = new BMap.Point(a,b); map.centerAndZoom(point, 19); for(var i=0; i<toBeClearedMark.length; i++){ map.removeOverlay(toBeClearedMark[i]); } var brokenLightMarker = new BMap.Marker(point); map.addOverlay(brokenLightMarker); brokenLightMarker.setAnimation(BMAP_ANIMATION_BOUNCE); toBeClea...
1
c6c07965db862219cef8d035eb7a7fa9
d0eabfe1fe601f4f394bcf2c4827fd4b
Fetch a single bucketlist given its identifier.
class BucketlistTestCase(unittest.TestCase): def test_api_can_get_bucketlist_by_id(self): self.register_user() result = self.login_user() access_token = json.loads(result.data.decode())['access_token'] rv = self.client().post( '/bucketlists/', headers=dict(Authori...
1
70ea3ecdd809b41de3ff1c098a5ae1b8
14000e336c84d83903e83dba82fcdf2b
Add the item to the cache, replacing any existing item with the same ID.
namespace Panuon.UI.Utils public class PUCache<T> public static void Add(string uid, T obj) { Caches.AddOrUpdate(uid, obj, (key, oldValue) => obj); }
1
226f2df4c5ccf292e21cb4e5cf370af3
6141f792cb2179527073ad8d74af53ec
コンポーネントを起動 <p>出力をシフトJISに変換するためのヘルパを動的に読み込む</p>
EventQueue.invokeLater(new Runnable() { public void run() { try { ComponentListener_00 frame = new ComponentListener_00(); frame.setVisible(true); } catch (Exception e) { e.printStackTrace(); } } }); }
0
f700fc9a0485865734cdcaee295fc32c
63c39564092a041ecd51ac2311852a97
是否拥有销售标准价格部分数据查看权限
public class SalesAmountSkuBean extends UIBackBean implements UISearchBean public boolean isExportAuthority() { return exportAuthority; }
0
ace15cd82f46548a0ed724315ce63384
f406c879627166c1e7e71cd373ca8bd1
adds request options using -o,-O flag to dhcp packet
{ uint8_t *len; *optptr++ = DHCP_OPTION_REQ_LIST; len = optptr; *len = 0; optptr++; if (!(toys.optflags & FLAG_o)) { *len = 4; *optptr++ = DHCP_OPTION_SUBNET_MASK; *optptr++ = DHCP_OPTION_ROUTER; *optptr++ = DHCP_OPTION_DNS_SERVER; *optptr++ = DHCP_OPTION_BROADCAST; } if (toys.optfla...
1
3f735fb085caa2b556798f9ba82ddd6d
06a8c68e4f5de8690c06ecbd97ff9347
假删除
if(IS_AJAX){ $ids = I('post.ids', 0) OR failed('缺少参数id'); if($ids=='1' || in_array(1, $ids)) failed('faker!'); M('admin')->where(array('id'=>array('in', $ids)))->delete() ? success() : failed(); } }
0
6d67e0a5f72261f69c6a7e6c09bf1ce8
0e29a985fe9039d25fd3c79a90765c10
Downloads the contents of a blob to a stream.
{ var stream = new MemoryStream(); BlobContainer.GetBlockBlobReference(blobAddress).DownloadToStream(stream); return stream; }
1
1c1821bb4395dc3393375f5c0f25c76a
d9f33631fc6f6a308a830715487044ab
Define some standard lists and groups.
class RLGroupList: def defaultInit(self): self.groups = { 'Background':RLGroup(['bck', 'background']), 'Foreground':RLGroup(['fgd', 'foreground']) }
1
59f5f22cd0ff5db97cf57dade51bae93
11f205d923e31f324c55a613cbd20cee
Computes Dice score to compare the similarity of two arrays or images and returns the result
def get_dice(logits, labels, epsilon=1e-10, sum_over_labels=False, sum_over_batches=False, use_hard_pred=True): ndims = logits.get_shape().ndims prediction = tf.nn.softmax(logits) if use_hard_pred: prediction = tf.one_hot(tf.argmax(prediction, axis=-1), depth=tf.shape(prediction)[-1]) intersecti...
1
0450da0296f651f9c8a5ab426fab3f90
f0ba0ac5a04670595ef5a0a32b4424a6
ДЕАКТИВИРУЕМ КНОПКУ ОТПРАВКИ ФОРМЫ ЕСЛИ НЕ СТОИТ ЧЕКБОКС
function formSubmit(form){ if (!form.classList.contains('form_noajax')){ form.addEventListener('submit', function(){ var form=this, elements=form.elements, page_h1 = document.querySelector('h1'), formData = new FormData(), request = new XMLHttpRequest(), link = form.form_mail ? '/form.php' : ...
0
ffa880455786041dbb3f7217e06ea3d7
14fa070bc683c3b1775a84d478f9e547
diffusion d'une nouvelle enchere aux clients de la salle concernée
void diffuserVoleur(int depart, int arrive) throws RemoteException;
0
88a34dc6f81e94f22278f19272e9d698
5eaa454cfb18e975cc216cc669e3a6ad
OBJ: Ladder shop: Eliminate all ladders
void CNexFormsImportLadderSheet::FillDefaultLaddersToImport() { ASSERT(m_pdlLaddersToImport->GetRowCount() == 0); IRowSettingsPtr pRow = m_pdlAvailableLadders->GetFirstRow(); while(pRow != NULL) { IRowSettingsPtr pNextRow = pRow->GetNextRow(); IRowSettingsPtr pExistingLadderRow = m_pdlExistingLadders->FindByCol...
0
2e88c3f41272826402ac215d8024d6ce
0f1a3a04537536df85f7d1c95bae60b1
Test if object is a parameter.
class ProfileItemDao(ElementDao): def is_parameter(self): return self.dtype == self.DTYPE.PARAM
1
d83753c5e163afe06ba4fb1e4597f941
398211af0230bbbd6c29dd927c2a2476
管理员修改辅导员信息
def modify_instructor(): global t14 global modify_dn1 global modify_in global modify_ina global modify_is global modify_tel t14 = tk.Toplevel () t14.title ("修改一条辅导员记录") t14.geometry ('300x280+440+240') frame = tk.Frame (t14) frame.pack () frame_l = tk.Frame (frame) fr...
1
f0505f3967b3fde93dd8dfc618e89cd6
a561f39510a3ddd5db4e3d8976c710df
forgot password validation
try { let errors = {} if (!req.body.hasOwnProperty('password') || req.body.password === '') { errors['password'] = 'Please enter old password' } if (!req.body.hasOwnProperty('new_password') || req.body.new_password === '') { errors['new_password'] = 'Please en...
0
f37303315aa6fc99e37fe95d383693c2
320a989eeb1a0d30f61d13b32d96f826
去掉ActionBar
{ ActionBar actionBar = this.getActionBar(); if( null != actionBar) { int layoutId = R.layout.common_actionbar; actionBar.setDisplayShowHomeEnabled( false ); actionBar.setDisplayShowCustomEnabled(true); LayoutInflater inflator = (LayoutInflater...
0
b499f38a3a39b147e48b69eae10eaea3
6e36bf38af9956f79b2881517baac9af
删除店铺账号
if (IS_POST) { $user = D('User'); $uid = intval($_POST['uid']); $store_id = $this->store_id; $type = $this->user_session['type']; if (empty($uid)) { json_return(1, '缺少参数'); } $physicalUserStoreId = D('User')->where(array('uid'=>$uid))->field("drp_store_id")->find(); $physicalUserStoreId = ...
1
e55c370d7027c497c74f3558780497a8
9402a5352912b37d6692c3cee49b6dde
Turn off animation on spawn
public class Enemy : MonoBehaviour private void Start() { gameObject.SetActive(false); Invoke("Spawn", spawnTime); }
0
93f3155f5990e6d7ed7f91d3ec642e4b
154844c3c70647f4ece64f52c2bf2643
the prob of link u -> v
float rate = std::inner_product(&model->P[r->uid*model->dim_off], &model->P[r->uid*model->dim_off]+model->dim, &model->Q[r->iid*model->dim_off], 0.0) + model->avg; if(model->en_ub) rat...
1
b8a7af5d5ccd6a1165b18f54aaa02a9a
db1b04c7835985ba86855988912b96ee
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % % % % % % ...
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_FileType_imageType_feature"), getString("_UI_PropertyDescriptor_description", "_UI_FileType_imageType_feature", "_UI_FileType_type"...
0
d086f7aa87cabb7f9b3150312808e64d
e4fa5768ec5e5a0e86d715892b339268
Trim capability when reconnecting MDS ===================================
if getattr(self, "_netmiko_device", None): self._netmiko_device.disconnect() self._netmiko_device = None self.device = None
0
403ee0ed3698f5816fdfc08af3b49b87
9d1f8b5bc06d0fe00c8aa60d8c02dbb7
write out vertical chain of data
for(int i = 0; i < length; i++) { storage[i]->OutShort(ofst); if(i<length-1){ ofst << "\n"; } } }
1
2a61dd6abb5bdd00a931fee419428d35
0381b56268b9f314632fbff65d7f4761
ボクセル格子データを取得
def get_compute_cell_data(cluster_id=None, namespace_id=None): cells_info = client.CustomObjectsApi().list_cluster_custom_object('kiyot.elotl.co', 'v1beta1', 'cells') return cells_info
0
3cf1374eb6fe3716930d3ff1fdd5e43a
03711ff5f692c14350e7aca89a477d2a
Receives a single character from the UART. Blocking.
{ uint8_t ch; while (uartRXReady == 0) { ; } uartRXReady = 0; HAL_UART_Receive_DMA(&huart2, &ch, 1); while (uartRXReady == 0) { ; } return ch; }
1
a1352585374d26c2f1b3446d7ceaa461
f1e41654c7a141821dae008470bfe16f
Compares two arguments for whether the first argument is greater than or equal to the second argument
static public void GreaterOrEqual(ulong arg1, ulong arg2, string message, params object[] args) { Assert.That(arg1, Is.GreaterThanOrEqualTo(arg2), message, args); }
1
17da188ab0d0a2ba0eb51cbabbb7ede8
123ae141302616a83f1c474877bff963
Creates access token with specified expiration time
def create_access_token(user_id: int, key: str, expiry_time: dict) -> str: expiry = datetime.datetime.utcnow() + datetime.timedelta(**expiry_time) return jwt.encode({"id": user_id, "exp": expiry}, key)
1
06b9a71dff77b0012e9ae2eea7a92f74
ef7fd61b9e59ff41dd9173c9b9b21057
Test formatting a cookie with attributes for a Set-Cookie header.
ex_desc = {"attr2": "value", "attr1": "sample"} ctx = {"redirect_uri": "/example/cb?q1=search"} expected_url = "/example/cb?q1=search#attr1=sample&attr2=value" self.assertEqual(expected_url, self._formatter.format_ex(ex_desc, ctx))
0
e11ea794316b4afef40027ad817df92f
2433fa4f42269d4637247716dde573b9
request to run the modeling method, and then enable the prediction page.
class AimPage(DataRobotPage): def set_modeling_mode(self, mode): self.click(mode)
0
b1fdfc5c96157b89ac4f719c813e837e
520070e8fdefedf3d0370c6cf96c6a28
Удаляет запись из источника
public function delete(Record $record);
1
82c2b6bf70dd0c3b0b274d20989cd473
a12bcea60e5e0db48cf97f5f547fbcb0
获取节日的日期
namespace IriskingAttend.Web public partial class DomainServiceIriskingAttend private string GetHoliday(DateTime beginTime, DateTime endTime,string where) { if (endTime.Year>=9999) { string sql = "select max(attend_day) from attend_record_all"; DataTab...
1
3738b350a811149326470a72276b0ef1
f655481f396b17c2a0d9770ca3e906b7
A widget to show solve options when determining the stellar parameters.
QtWidgets.QWidget.__init__(self) self.ivm = ivm vbox = QtWidgets.QVBoxLayout() self.setLayout(vbox) self.optbox = OptionBox() self.optbox.add("DSC Data", DataOption(self.ivm), key="data") self.optbox.add("ROI", DataOption(self.ivm, rois=True, data=False), key="mas...
0
76b1a2d5d3d6aa24b2d6a9acfe43fcda
f12e47ad6083f52344149496678bb5c7
Sets if a hint has been used on the room
public class MenuBar public boolean getUsedHint() { return usedHint; }
0
fbe5423381c2f4566c21625f37941a66
64eef7d212f1b1e6c9a53c13cf1bd43a
Create the business term as requested.
class ITermPolicy(zope.interface.Interface): def createTerm(source, value, title, token, request):
1
78c17764ecaca9ec2262fc4c603aa6f0
3e0f2f81824227d49188efacc0988a4c
通過表單取得會員註冊資料,確認資料庫無相同帳號, 若無,新增會員記錄、導向登入檢視頁面; 若有,錯誤訊息提示、導向註冊檢視頁面。
namespace prjShoppingCarAjax.Controllers public class HomeController : Controller [HttpPost] public ActionResult Register(string fUserId, string fName, string fEmail, string fPwd) { if (fPwd == "") { fPwd = null; } var pMember = new tMe...
1
8d03859a3e010c5f33638c82e1a220c3
672af91f75dfcdb06b1110ace140a194
현재 유저 라운드별 점수합계
public class CyclicBarrierTest class ScoreComputer implements Runnable{ public void run() { for (int i = 0; i<data.length; ++i){ if (round == 0){ this.scores[i] = data[i][round]; }else { this.scores[i] += data[i][round]; ...
1
ca4ee2f725ac8caccc1ab7a94559bbdc
5afbd694cab928636dfc6ad4aaf7625a
获取节目评分
class Douban public function getScore() { return $this->score ?: ''; }
1
05eb7865121424fba1709f54291a6d51
ebf6a0f20a36af81f61725dc01cba6d4
Simple Recursive Function
if n == 1 or n == 0: return n else: return n * recursiveFac(n-1)
1
4edc7b03ff866381b0e5a7e21ae27835
25751c7bcdd42e4e6b17c9031060bd9c
Gets the Metricon RSM WCF service base URL, based on the current URL in the browser address bar.
namespace Magenic.Maqs.BaseWebServiceTest public class BaseWebServiceTest : BaseExtendableTest<IWebServiceTestObject> protected virtual string GetBaseWebServiceUrl() { return WebServiceConfig.GetWebServiceUri(); }
0
fca89a40d454fcee71e7e8f1a29018cb
24541727e1df0044bc22bceeaec13210
Initialisation pour la page de création de compte
{ $nb_user = User::where('id_client',Auth::user()->id_client)->count(); $nb_max_user = Client::where('id',Auth::user()->id_client)->lists('nb_utilisateurs'); if(intval($nb_user) >= $nb_max_user[0]) return redirect('/utilisateur/list')->withInput()->with('error','Nombre maximum d\'utilisateurs'); $rolesList...
1
70a0eaa55f0289eae9b37bd1d9fdbb6d
93fae58a7fb631c6bb175c24d293409f
Adiciona segundos ao Horário
public class Horario public void subtractSeconds(double seconds) { double aux = this.toSeconds() - seconds; this.setHorario(aux); }
0
ce23e37c637e74eaef02758b826a7034
09dcfe0921ec7ef57c0e996065d9df5c
used to parse a known pointer and retrieve the data stored in it
public final class IndexDatabase public void get_pointer(IndexPointer poniter, long number) { poniter.node_id = ptr_buff[(int) (number * POINTER_LENGTH / ptr_parts_size[0])].getLong((int) (number * POINTER_LENGTH % ptr_parts_size[0])); poniter.canonical = ptr_buff[(int) (number * POINTER_LENGTH / ptr_pa...
1
7fba27e8d0b1aa3b980f925c500a9379
17a49ca4ddaa65ba2afd728e04cfd9f2
starts timer for a request
function startRequest(httpMethod) { httpMethod = normalizedHttpMethod(httpMethod); total.all++; total[ httpMethod ]++; pending.all++; pending[ httpMethod ]++; }
0
bfb6d4d577d13ca0791d0dbb01adeb86
688f5063aff5b94e2fe795c867ebef12
获取泡泡球模型
{ GrassBubble *pRet = GrassBubble::create(); if (pRet && pRet->initWithFile(getStringByType(type))) { pRet->setBubbleType(type); cocos2d::Size sz = pRet->getContentSize(); pRet->setScale(PAOPAO_SIZE/sz.width); pRet->ignoreAnchorPointForPosition(false); } else { C...
1
a60d9dcd3d029f1407b8963444b72e87
31c295a54d774ae5ac16dfdd28f3954c
Updates and positions an axis break element.
newPos = Math.max(A._min, splitter._DA - B._max, Math.min(newPos, A._max, splitter._DA - bar._DA - B._min)); bar._DA = bar[0][opts.pxSplit]; bar.css(opts.origin, newPos).css(opts.fixed, splitter._DF); A.css(opts.origin, 0).css(...
1
c0064c1be6257a4ec1a94e210333a179
0c1ed103bd654da2b5286aac172f3a4a
处理第二个人物实体右边的文本,生成该文本的词语和词性
class Plots: def semantic_role_label(self): parser = Parser() parser.load('ltp_data/parser.model') arcs = parser.parse(self.words, self.postags) parser.release() labeller = SementicRoleLabeller() labeller.load('ltp_data/srl') roles = labeller.label(self.words, sel...
0
55fa25d23c5b9715271752e8fb132357
0789cff66d22c46b36cd6c07b3d6d22c
## 단순히 이미지를 (좌 -> 우)로 박스 쌓듯이 쌓는다. 전체 가로사이즈와 분할갯수를 가지고 이미지 위치를 설정한다. 재사용을 위해 마지막 높이값을 반환한다.
{ if (totalBoxes == 1) { return new List<LbBox>() { _wholeImageBox }; } double width = Math.Sqrt(TotalPixels / (double)totalBoxes); int w = Convert.ToInt32(Math.Ceiling(width)); return GetBoxes(w, w); }
0
9d837e9f788af717d4b4aabf02150713
484253325eff47a0db2219c222c52753
@brief 在主线程中运行任务
{ if (m_sync) { AutoLock autoLock(*syncLock()); if (m_queue.empty()) { syncCondition()->Broadcast(); } m_queue.push_back(task); } else { callOnMainThread(RunTask, task); } }
1
933ecb78edcc91926a0a515bb762d5c1
810ca806129ce520ddd4ea6667b0a168
Determines whether this instance can format a message based on the specified parameters.
namespace Jeffijoe.MessageFormat.Formatting.Formatters public class PluralFormatter : BaseFormatter, IFormatter public bool CanFormat(FormatterRequest request) { return request.FormatterName == "plural"; }
1
7abf455ffffcf5eb197f2136544b87ea
da5fa7c795c8a9d8ae38749ffd628ef7
remove tag from task
public class Tag implements Serializable void removeTask(Task t) { tasks.remove(t); }
0
3a15fe9ea179124553f29952542abdde
4f5828b97634087e377943cf99c74ecb
Retrieve the overlay index from a overlay toolwindow.
namespace user i32 still::BaseToolTipGetIndex() { return (i32)GetDlgCtrlId(); }
0
3cb58550d3cc4d41fe3bb59d77473e49
f816de9026ade4d67c30d0a296c09d5d
Call Twitter API and save IDs of resources to destroy.
url = "https://api.twitter.com/2/tweets?ids={}".format( tweet_id ) data = process_yaml() bearer_token = create_bearer_token(data) res_json = twitter_auth_and_connect(bearer_token, url) return res_json
0
fe2d51085c259f264d7b3120f962ae61
42db4fc447c236ddf65e200ebbcf3bb0
بناء صفحه المستخدم
$data=array(); $data['pages'] = $this->model_user->loadPages(); $data['blocks'] = $this->model_user->loadBlocksIndex(); $data['page'] = $this->model_user->loadIndexPage(); $data['index'] = 1; $data['template_top'] = 'page'; ...
1
ca7c39d2c0e8ed7b1f8b1ceed99ed052
0defb186dad9857de7a3e5d8dcd57556
Add a listener for a new toggle.
{ if(toggle != null) { if(!AllToggle.Contains(toggle)) { AllToggle.Add(toggle); } toggle.onValueChanged.RemoveAllListeners(); toggle.onValueChanged.AddListener(action); toggle.onValueChanged.AddListener(TogglePlaySound); } }
1
765134a27cd8447693f53444ff668912
ab4845a60427a4a029629c0de6f0894e
.. method:: setup_motion() Set the configuration for motion detection.
class BlinkCamera(): def set_motion_detect(self, enable): if enable: return api.request_motion_detection_enable(self.sync.blink, self.network_id, self.camera_id) return api.request_m...
1
7b74d0c44df21d797b13dbe0bbcf52e5
ec7440b579e649a1ce6a5c899161e0ae
Plot the delta between the simulated and estimated gyroscope bias over time.
plt.figure(figsize=(15, 6), facecolor='w', edgecolor='k') x = [sd for sd in deltas.keys()] y = [delta for delta in deltas.values()] plt.plot( x, y, ) plt.ylabel('Delta [Continuous- Static] Final Threshold') plt.xlabel('Noise Standard Deviation') plt.tight_layout() plt.show() plt.savefig(...
0
db1c40f3f71816eb181c9cfe32cd82a5
a098d6ecc3fbb815e919895620feb952
テンポラリファイルのプレフィックスが指定されているかを判定する。
: _flxFile != null ? _flxFile.ContainsFile(filePath.Substring(_prefixLength)) : _idxFile != null ? _idxFile.ContainsFile(filePath.Substring(_prefixLength)) : throw new InvalidOperationException("Unknown type");
0
dd5c710a02dd7b1d9bfce358a1887329
cc3c0ef1a8bfe3801457657ec0699b75
Downsamples using average pooling, padding if necessary. To match the Tensorflow MS-SSIM implementation, we need to pad images before pooling if their height/width does not evenly divide 2. Tensorflow uses "SYMMETRIC" padding, which is equivalent to PyTorch's replication padding in our special case where at most 1 elem...
output = tf.nn.avg_pool( _input, ksize=[1, 2, 2, 1], strides=[1, 2, 2, 1], padding='VALID') return output
0
3a298f76d8f83666b2b79348616b9971
5d4d6132815cb066383f7766a07988a4
Returns the meta object for the attribute '{@link de.uni_stuttgart.iste.cowolf.model.statechart.StateMachine#getName <em>Name</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getStateDeclaration_Name();
0
687d2dec97b0dc8de74a4db080330968
9a91181247e184d737f4cd8e784a8bdb
database level helper function.<br> deletes all copies of doc defined in requests url from this instance's public DB <br><br> sister function of {@link insertItemCopies}
const t = this const result = [] if (!urls) return result urls = typeof urls === 'string' ? [urls] : urls t.db.transaction((data) => { for (let i = 0; i < data.length; i++) { const item = data[i] result.push(t.deleteByUrl(item)) } })(urls) return result }
1
d7a632e0a3490a30bb9f6e2115ba246a
ba35b61e881aa9141f468ed0a71471a8
Wait for not selected indexes.
public class GameLoop extends Task<Void> void waitForSelection() throws InterruptedException { while (!currentSelector.isLockedIn) {if (Thread.interrupted()) {System.exit(0);} Thread.yield();}; }
0
328870cfb68dd0c2d61761b2ed9cd4d5
94a02b5a2c849513af30c4048685dfff
This function sanity checks a range of affinity levels.
_(writes \array_range(pxm2node, sizeof(pxm2node))) _(writes \array_range(apicid_to_node, sizeof(apicid_to_node))) { unsigned start, end; unsigned pxm; unsigned node; int i; if (srat_disabled()) return; if (sizeof(ma->header) != sizeof(struct acpi_srat_mem_affinity)) { bad_srat(); return; } if (!(ma->flags...
1
f80e046be8d3fa7abdfa22f1f1ca9217
4500672cab5a777f888d03af6540a52e
设置拼多多默认缓存配置
[SET_DEFAULT_STORE_SET](state, obj) { state.defaltStoreSet = obj }
0
243b104c016fdce5ccb54f74022f7a0f
460e9abe821a47bd0f7417bef0305e53
获取当前聊天Gid
function FriendDlg:getCurChatGid() return self.chatGid end
1
36c518184d43498bc533aa5c44f43924
0e4223413d158d4872a6cc673d012a1d
Get z range.
class BossRequest: def get_z_span(self): return self.z_stop - self.z_start
1
64454b26f344a37a5ac46e35289fb4ef
60c5eb6e3a488ccb2c935f86553518bb
Appends and returns a new empty "priceperunit_base" element
public class MonthlyfiscalcalendarImpl extends com.microsoft.schemas.crm._2006.webservices.impl.BusinessEntityImpl implements com.microsoft.schemas.crm._2007.webservices.Monthlyfiscalcalendar public com.microsoft.schemas.crm._2006.webservices.CrmMoney addNewMonth2Base() { synchronized (monitor()) { ...
0
38f94fc3fd35d17b57ed1b704959a184
e2aa7a8e724ba941638766fb89979b81
vgPrepImage - Create thumbnail and image pyramid scheme for image, also link in full sized image.
{ widthOne = gPyramid.at(0).cols; heightOne = gPyramid.at(0).rows; imageList = cv::Mat(widthOne * heightOne , memoryLength , CV_32FC3); filteredList = imageList.clone(); tickCount = (float)cvGetTickCount(); }
0
896e739ddf041675859ea55bf97cf5a2
074cea02327d18458f5f95b43321478f
It is used to write the user credentials in a PHP file.
$savedCreds = self::getSavedCreds(); foreach ($creds as $login => $pwd) { if (empty($pwd)) { unset($creds[$login]); } elseif (!$noPwdEncryption) { $creds[$login] = password_hash($pwd, PASSWORD_DEFAULT); } } $creds = array_merge($savedCreds, $creds); ksort($creds); $toSave = ''; foreach ($...
1
d62a55ceada4d5e2efe5addc7fe0bb42
c9f47a7e74264e6aa1c8926554d6ea5a
this will check all entertainers that have specify times and redo their box text
{ if(mouseLL != nullptr) { if(mouseLL->get_Count() > 0) { double mov_firstTime = -1; double mov_lastTime = -1; if(mouseLL->getFirstLastTimes(&mov_firstTime, &mov_lastTime)) { eventFirstTextBox->Text = MovieTimeToString(mov_firstTime); eventLastTextBox->Text = MovieTimeToString(mov_l...
0