query_id
string
corpus_id
string
query
string
code
string
label
int64
c2ffb8b81529ff480b71b5f2f876dac1
74de30d00229a36d1d22290d73824c2a
Test that uncached queries work, albeit slowly.
self._check_cache({}, {}) self._do_query('query1', 1.0) self._check_cache( {('query1', 1, 'conn_id'): (1.0, 'result for query1')}, {1.0: ('query1', 1, 'conn_id')}) self._do_query('query2', 1.1) self._check_cache( {('query1', 1, 'conn_id'): (1.0...
0
9ccdd653b7f5c05a892519d6880af1c3
ba99665b6e9567e74b1071a7472361ae
Changes the minimum intensity threshold of the image - all pixels at or below this value are mapped to 0.
public class MagickImage extends Magick public native boolean thresholdImage(double threshold) throws MagickException;
1
aeddb74271e2e137294b0f41f34a956d
cba35a4349a68e574786aa409bf0b922
Detach a collection of cluster jobs from their owning nodes.
public Collection detachAll(Collection pcs);
1
4ef81dc81acf453b0e18da9c59327f30
34a2b38fb1db6c0874a824b2c54562e9
The Recurly resource primary key. Most of the Recurly resources have `id` as a primary ID. Other Recurly resources have different primary key or a composite key can override this method.
public function pk() { return $this->__get(static::metadata()['pk']->name); }
1
72af96b791616ff3169bb6c0d8230a3b
5dbcfd562b37d76ccf1218a09fad73db
行号格式化显示
function FMT_Num(value,row,index) { return index+1; }
1
c52e62e73ecfccc8abf84c142699212f
e40eec79fd8e76c5533f3bb84aa5aba2
Checks if the given code point is letter.
class Lexer(val source: Source) private fun isLetter(code: Int): Boolean = ( (code in 0x0061..0x007a) || (code in 0x0041..0x005a) )
1
4a0925c2a5f2ddd43cdbd753e5b4177f
de208c7a0e8ab97f5016bf1bf780f056
functional form of B if using a constant yield strength
def func(x, b0, b01,E0): return E0 + 9*a0**3*b0/(16) *( ((a0/x)**2 -1)**3*b01 + ((a0/x)**2-1)**2*(6 - 4*(a0/x)**2) );
0
18829517c06731ac8814dc9d1bd8cd13
f5c212e156a597f59ec58fff3d67b04c
Given a stream which yields future forecast samples, generate transactions.
Task<List<Transaction>> GenerateConsensusTransactionsAsync(ChainContext chainContext);
0
df21b7e8c6328381a939e9aca71a89c7
58e003efee72e373d64e24159979660b
function which takes a byte and how much places to right shift and returns a correct value after that operation
int replaceByte(int x, int n, int c) { int cAdjusted = c << (n << 3); int mask = ~(0xFF << (n << 3)); int xAdjusted = mask & x; int result = cAdjusted | xAdjusted; return result; }
0
d99126ef56ccc9eb09e2f9ca258e6738
8eb089690c8ccee42ad90710d3f0b6d2
transform a local vector (x,y,z) to global one
class SiModule Vec toGlobal(Vec vLocal) { return p.X().sum(R.rotate(vLocal)); }
1
88811414eaf5943e422c22c875222ce6
65936ac8a5a53d2bbf83947da3ff9d83
Возвращает разницу во времени между часовыми поясами.
namespace Geodesy.Datum.Time public abstract class TimeSystem : IComparable<TimeSystem> public double Subtract(TimeSystem time) { return Subtract(this, time); }
0
9d8f14ca76787ac0aea9882ef20c3953
e5ccb69dd2bdf5fa596338c002e51052
Sets responsibility for a shopping list to the given user.
adm = Administration() sl = ShoppingList.from_dict(api.payload) if sl is not None: sl.set_id(shopping_list_id) adm.save_shopping_list(sl) return '', 200 else: return '', 500
0
86d9fd7b60a8492dc8081c25980e19e8
0fea0a803b1b85189d0d8b671af65dd0
O método getErro() retorna um array com os valores do erro retornado pelo sgdb. array[0] = Código de erro do SQLSTATE (definido no padrão ANSI SQL) array[1] = Código do erro especificado pelo driver array[2] = Mensagem de Erro especificada pelo driver
class AdminManutencao public function getError() { return $this->Error; }
0
9e5c5b06bc92aba988f5e987af9d50b1
bb1f863a2adb29525c6728a7ab0c12cd
Real dirty function, though very useful under certain circumstances: It allows to change the class handle of an object into another class handle, so the object behaves like a different Class of object. Based on objects.lib SetClsHandle() __objSetClassHandle( <oObject>, <nClassHandle> ) --> <nPrevClassHandle>
r = DEFAULT_ERROR try: _self.lock(_self) r = _cmd.reset(_self._COb,0,str(object)) finally: _self.unlock(r,_self) if _self._raising(r,_self): raise QuietException return r
0
3f1884e7f4ccf35acb285cbdbdf37f9a
7a68e339482a4c176fc3340052c2742a
Creates the scroller element.
export class ScrollerExtension private createElements(target:HTMLElement):void { let container = this.grid.container; container.addEventListener('scroll', this.onContainerScroll.bind(this)); Dom.css(container, { overflow: 'auto', }); let wedge = this.wedge = docum...
1
1895bdf1baba027bb7da1550904cb33d
7af27086cca691983fdbea0db4c09478
Initialize the journalling subsystem.
{ if (!_isJournalingSupported) return Result.Success; return Initialize(_isJournalingSupported, _isMultiCommitSupported, _isJournalingEnabled); }
1
4d1514333215c1f793ef94b36278b7ef
407c5ff43f578f666dd055b1a83063a1
Disable sorting of uploads by year and use flat based file system instead.
public class VideoChooserRequestHelper extends RequestHelper<VideoChooserRequestHelper> public VideoChooserRequestHelper fromFileSystem() { mFromGallery = false; return this; }
0
cf04e27f937c73e7a1dbfd4f1003755a
df397583ffc6237f463cfb5a1f2806e2
\brief USB mass storage disable.
{ #if defined(__USB_IN_NORMAL_MODE__) if(mmi_usb_is_in_mass_storage_mode()) { return MMI_FALSE; } #endif return MMI_TRUE; }
1
9d5dca3a84199e66a2fdd1a24462bce1
631350d26aadc864bb57081becd12dca
Roll out meta learner across *multiple* tasks, collecting MAML gradients.
loss_function = self.loss_class() loss_sequence = [] net = self.model leap = Leap(net) meta_trainer = gluon.Trainer(list(leap.parameters()), self.meta_optimizer, self.meta_optimizer_params) self.meta_logger.reset() if meta_batch_size is None: meta_batc...
1
a06578a5de3bcdcb72d3c985ab967f7b
f9c13becc11070207686be8a6391e255
A intensidade de cada vétice é calculada a partir da média da intensidade de todas as faces o qual ela faz parte
{ int i; float somatorioAglom=0.0; this->calc_NumVerticesNaoIsolados(); for (i=0;i<this->numVerticesRede;i++) { somatorioAglom= somatorioAglom + this->aglomVertices.at(i); } this->ind_AglomeracaoMedia = somatorioAglom/this->numVerticesNaoIsolados; return; }
0
18c978ae7b5ec274085c96a3b0015379
9a1975bc3fd0c0430d2bed5d0bf2f5d6
Build a directed acyclic call multigrahp (call DAMG) which represents calls between routines of the program which are to be (or not to be) expanded
class Converter: def to_call_list(self): for key, node in self.nodes.items(): if (node['type'] == NodeType.function or node['type'] == NodeType.vector_table): if node['root']: level = 0 queue = {} queue[level...
1
39f6cabd42cc180e4d628eed3881e1c2
eddd6d3d5cffb1c918a577f6136674ad
Attempts to find the profile identifier which corresponds to the specified display name at a specified point in time.
@Override @Transactional("identifierRedisTemplate") public void saveIdentifier(@Nonnull ProfileName name, @Nonnull Instant timestamp) { if (this.identifierValueOperations.setIfAbsent("name:" + timestamp.getEpochSecond() + ":" + name.getName().toLowerCase(), name)) { this.identifierRedisT...
0
3cf42ecbef98f3f419224d652e076752
86bedf7c54b69e9234a08f8cf64409e2
Возвращает индивидуальное достижение абитуриента
@Service public class AchieveService public <T> T getAchieveForStudent(int achieveId, int studentId, Class<T> type) { return achievementReceivedRepository.findByIdAndStudent_Id(achieveId, studentId, type); }
1
e197dd1a1a8d93228f10bc769a866453
887334b910b87223ad39c2456062d7ef
Compute the minmax over the 8x8 subblocks.
void nmppsMin_8s7b( const nm8s7b* pSrcVec, int nSize, int8b* pMinValue) { int i; const nm8s7b* pSrcValue=pSrcVec+1; *pMinValue=pSrcVec[0]; for(i=1; i<nSize; i++,pSrcValue++){ signed char mask=((*pSrcValue)-(*pMinValue)); mask>>=7; *pMinValue=((mask)&(*pSrcValue))|((~mask)&(*pMinValue)); } }
0
557fc3a38b2e850ad4f018742b2c2643
1de110735d9c4e7025e4b11d49474092
处理点赞人头像列表Dom
if (!likes.length) { return ''; } var htmlText = ['<div class="reply-like"><i class="icon-like-blue"></i>']; var likesHtmlArr = []; for (var i = 0, len = likes.length; i < len; i++) { likesHtmlArr.push('<a class="reply-who" href="#">' + likes[i] + '</a>'); } var likesHtmlText = likesHtmlArr.join('...
0
0e315f6547f88ea26cf5161c474ab654
62e24b9b7d0842b193e99fe946c8c7fc
One pass of radix sort with the current divisor
function radixSort(arr, maxValue) { for (let divider = 1; divider < maxValue; divider *= 10) { countSort(arr, divider); } return arr; }
1
4f9acbd91a948356fb892b53ace96f6d
a57efed1eea3a55625108d66b73b5dbb
The setter method for tiles id of the left tile
void NumberTile::setX(int newX) { x = newX; }
0
830e95afaa374166ad052f72b6129a83
4475f507e1e0b1f750248d2567c74196
Clear out the pushback stack.
mac_flush() { while (mac_stack) mac_pop(); if (mac_hide) { mac_stack = mac_hide; mac_hide = 0; while (mac_stack) mac_pop(); } turnoff(glob_flags, IN_MACRO); turnoff(glob_flags, LINE_MACRO); turnoff(glob_flags, QUOTE_MACRO); }
1
559c1d225311782d9d94a42732128bbe
58aa2a35d56d355f1f2e3df29881fe67
老师教过的学生 当前/过往 数量
{ static $counts = null; if(is_null($counts)){ $counts = Cache::rememberForever('student_counts', function () { $departmentClassRepository = app(DepartmentClassRepositoryInterface::class); $counts = []; $allDepartments = $departmentClassRep...
0
ca39eff7ffa15b6bebe80f0bb2d78eaa
c0f68c255945b3b39c243008a9401ea6
响应婚宴状态信息
func marryGet(pl player.Player) (err error) { manager := pl.GetPlayerDataManager(types.PlayerMarryDataManagerType).(*playermarry.PlayerMarryDataManager) marryInfo := manager.GetMarryInfo() period := marry.GetMarryService().GetWeddingPeriod(pl.GetId()) playerSuitMap := marry.GetMarryService().GetMarryDingQing(pl.Get...
1
19f93e24df80ec51875c0e723fd673cb
b0e0e24a9483a55baa392dfaa5172362
Returns a form field for a ``db.BooleanProperty``.
def model_field(required=True): return ChoiceField(_models, required=required)
0
a0d2951f67db06583926097941caed5d
2c3dcac27c386aefde342b9e05391d6f
Test accessing some declarations through the plugin.
def testDeclaration(): pass
0
a9edb398407cb6c57932a6d9b6a49dc0
e968d60dae8f4ad9851db01c2cba7dc5
Click on "parameters expand collapse" button in project window.
class KoolprogApi(): def online_service_window_click_parameters_tab(self): return self.OnlineServiceWindow.online_service_window_click_parameters_tab(self.sym_names.koolProg_Parameters_TabItem)
0
f3e35b000c7d028c659454f7c677461c
099679d57e7d97792015faa04c80a507
funkcja ta zależnie od numeru gracza przypisuje polu w tablicy odpowiednią wartość
{ if (player==1) { if ((num == 1) && (squares[0][0] !="O")) { squares[0][0] = "X"; } if ((num == 2) && (squares[0][1] != "O")) { squares[0][1] = "X"; } if ((num == 3) && (squares[0][2] != "O")) { squares[0][2] = "X"; } if ((num == 4) && (squares[1][0] != "O")) { squares[...
1
d3fbfa452385589aa101cbc145e9ff32
509fc195c1189914a594d5a148486751
高度モードが変更されたときに呼び出される
Locale locale = Locale.getDefault(); int keymode = KEYMODE_JA_FULL_HIRAGANA; if (mPreferenceKeyMode != INVALID_KEYMODE) { keymode = mPreferenceKeyMode; } else if (mLimitedKeyMode != null) { keymode = mLimitedKeyMode[0]; } else { if (!locale.get...
0
4e9783c2479b2e7606c4acebc0ac52a1
7e5b98b343a696c850ae29ca70be0763
Возвращает объект с методами, управляющими строкой УРЛ
class Client public function getUrllinkManager() { return new Urllink($this); }
1
4377cfd208b99dc48504766c0c299bf8
647707fcebe51db060bc0cb7ee32b99a
获取商品对应的帖子关联信息
class OrderGoods extends Model public function getgoodsinfo() { return $this->hasOne(Posts::class, 'ID', 'goods_id'); }
1
775cf872ab4ae8b7fa7521ed40809b55
89581ff3721ab887eb8e79c32c1cc8d9
A method that returns replicated DNA. Takes the template strand and creates the new one.
int numberOfBases = codingStrand.length(); for (int i = 0; i < numberOfBases; i++) { switch (codingStrand[i]) { case 'a': templateStrand.push_back('t'); break; case 't': templateStrand.push_back('a'); break; case 'g': templateStrand.push_back('c'); break; case 'c': templateStrand.push_back('g');...
0
944a734f55c4891c36df7c19c8789d13
f55b708edb393017fe4ec074aab79fab
アクセストークンなどを設定、clientをクラスインスタンス変数(@)としてクラス内で共有する
class Tietuku{ public function __construct(){ self::$ttk = new TTKClient(MY_ACCESSKEY,MY_SECRETKEY); }
1
95310265a3da727f84188f835643a75a
451948959e986d2ddf47a937f4483302
aynı üründen sepette var mı diye kontrol ediliyor
namespace E_Commerce_Web_Application.App_Classes public class Sepet public void SepeteEkle(SepetItem si) { if (HttpContext.Current.Session["AktifSepet"] !=null) { Sepet s = (Sepet)HttpContext.Current.Session["AktifSepet"]; i...
1
ec764005bf1d3ef919443899326e1672
1832128c77400937ccf562152ff24205
Sets the vanity series name.
{ if (isset($this->Data["Series"][$Serie])) { $this->Data["Series"][$Serie]["Description"] = $Description; } else { throw pException::InvalidInput("Invalid serie name"); } }
0
eb248917a0a16f12833e92bdc7707c5a
f77c843669acf5de5ee1946174502edd
Calculate pitch & roll angles using only the gyro.
rollAngle = (180/3.141592654) * atan2f(((-1) * finalAccX), finalAccZ); pitchAngle = (180/3.141592654) * atan2f(finalAccY, finalAccZ); if(rollAngle < 0) { rollAngle = rollAngle + 360; } if(pitchAngle < 0) { pitchAngle = pitchAngle + 360; } }
0
e17945329de2290c4c21c658b7d106c4
49142dd80da9322392fc8709654418c9
\brief Compute the XF stress associated with the repulsive force. \b NOTE: this method does not recompute the reduced force, this force must be first computed by calcReducedForce(). This method however converts the force in the System units from the reduced force.
void TPZFastestCondensedElement::CalcStiff(TPZElementMatrixT<STATE> &ek,TPZElementMatrixT<STATE> &ef) { if(this->fMatrixComputed == false) { TPZDarcyFlowWithMem *matDarcy = dynamic_cast<TPZDarcyFlowWithMem *>(Material()); if (!matDarcy) { DebugStop(); } TPZCondensedCo...
0
6a6dd8ed8c870f4fd669e33ac1596a71
e88afbb8303ed26cfd7cd3eb432da47c
初始化IOC容器和SpringMVC九大组件
namespace Zxw.Asp.Manage public class MvcApplication : System.Web.HttpApplication private void IocInit() { IIoCContainer container = new AutofacContainer(); container.RegisterInstance(new SystemInfos() { ID = 1, SystemName = "后台管理系统" ...
0
57c083b88c66c29c60efe2adbd230c38
b98ed45a0c5d67c3bd1b514d4cbb39b0
Returns all globally accessible kernel parameters
final class Kernel public function getParameters(): array { return $this->getContainer()->get('appConfig'); }
1
9526155e837c368f869a5d4d4bf5c7cd
8bc3e7d087029f618691cec5c2c17361
! \brief update rule for global parameters theta (factor V) in variational inference
{ Vector3d dX; dX=this->X(t)-forward_kinematic(); Vector3d dPhi(0,0,0); updateInvJacobi(); dPhi=J_inv*dX; alpha_ += dPhi[0]; beta_ += dPhi[1]; gamma_ += dPhi[2]; }
0
0a59db7309963ca9c92a1e7265fbd51b
d62f47037f985f861ee3e2b1b5342856
Selects a random client from the instantiated client.
def get_rand_client(self) -> Client: return random.choice(self.consensus_client_list)
1
3f1ed7fb12115db50a5bcda956306f3a
0686301bdb02465962b7668e774be513
Gets the value of the lister property. possible object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "istInquirySummaryDTO", propOrder = { "allInquiryList", "bankPerformanceDTO", "blockSummaryDTO", "bouncedChequeSummaryDTO", "chequeBannedCustSumDTO", "chequePaymentBanDTOList", "commercialKkbDTO", "creditCardInquirySummaryDTO...
0
986f386d4df3f0b1b6c3255205fcd299
7a2b905bddc9680091f7c19983dbc700
备份列表数据
{ $all_file = glob('./uploads/sql_data/*.sql'); $final = []; $size = 0; if(count($all_file) > 0){ foreach($all_file as $v){ if(is_file($v)){ $size += filesize($v); } $final[] = [ 'name...
1
0ff61d9b3bfaa5b98cfa36a6942becd4
a41f53f8cb94b47d5a5952f1e3c0a9e3
是否是合法的货位号
{ $param = decryptcode($param); if (strpos($param, '-') !== false) { $lon = abs(intval($param)); if ($lon > 90) { return false; } else { return true; } } else { $lon = intval($param); if ($lon...
0
2e45dc02727e80358165efa8e584f318
802596d284b5515b37a7640c41803cdb
Renvoie la longueur de la liste (O(n))
namespace Grafos class MyList public int Lenght() { if (headNode == null) { return 0; } else { return headNode.Length(0); } }
1
47323a12e0cd3b6147f5060f845f8ce6
67297a65bcb40382b13a07ecd38ba844
Remove o último elemento da lista.
if self.head is None: return elif self.head.next is None: self.head = None return aux = self.head while aux.next: previous = aux aux = aux.next previous.next = None
1
6c9bed9ee6f1a796dc8a58a6a6622a0a
512576ed15f2af4b47b428efbcb355ad
Changes company url if it's not unique
class Lib_randomize function check_new_group_url($group_url = '', $localdata = null) { if (!isset($localdata)) { $localdata = $this->authentication->localdata; } $local_seq = (isset($localdata['seq']) ? $localdata['seq'] : 0); $group_url = (is_string($group_url) ? $group_url : ''); $group_url = $this->imze...
1
a9b8df9759b58fc522f54572fdbf5002
f17629b7503e4fe81739313b5099f742
Risks can be created
class RiskFacade public function createRisk($name, $description, $probability, $money, $time, $result, $primaryCause, $trigger, $reaction, $severity, $startDate, $endDate, $riskType, $phase, $responsibleUser, $creator, $autoFlush) { $risk = new Risk($name, $description, $probability, $money, $time, $result, $primary...
1
33a69e3ec5a84564e4c035e5518021d9
00534929ce1ffcabc7f7655568e1a1ea
返回指定类型的消息内容
namespace Vcyber.BLMS.IRepository SmsMessage SelectContent(ESmsType type);
1
a83306c33ec06d88fa48fdf5985cba54
7ec91efb7d90f15f807dd144bd0ce0a9
When we prefix with a `typeof` check we don't need parens, otherwise delegate.
fn is_double_negation_ignore_parenthesis( syntax: &rome_rowan::SyntaxNode<rome_js_syntax::JsLanguage>, ) -> Option<(AnyJsExpression, ExtraBooleanCastType)> { if let Some(negation_expr) = is_negation(syntax) { let argument = negation_expr.argument().ok()?; match argument { AnyJsExpres...
0
fcb1eaab43aec5c6a70c3a68dbb0501a
46efbae03901336598e596b33bb66184
Background task that creates Attrition page images.
class ImageRetriverApp(gtk.Window): def retrive_images(self, widget): gtk.threads_enter() threads = [] self.lblInfo.set_text('Pobieranie...') self.set_sensitive_for_all(False) while gtk.events_pending(): gtk.main_iteration_do(True) if int(self.entryPages.get_t...
1
6c79b445bb925c262d19191ea6932928
278c63f52eb279784bdee09482fb675a
Current DNS type
class GetDomainResult: def target_dns_type(self) -> Optional[str]: return pulumi.get(self, "target_dns_type")
1
35f5be387ea6b5e998771a45a70f0f68
b124e9f95699625d3f8003f76bd9285a
method for displaying error message and adding slots to hide it after key or button is pressed
public class MainActivity extends AppCompatActivity private void displayError(String message) { if (tvErrorMsg.getVisibility() == View.INVISIBLE) { tvErrorMsg.setVisibility(View.VISIBLE); } tvErrorMsg.setText(message); }
0
f8cbcbc086a6500fe133c0ddf74b8894
0180f2a6d6d5bd15e5475ee86b824f31
删除用户的时候,级联删除用户角色关系.
@Service public class UserInfoService extends BaseService<UserInfoDao, UserInfoDto> @CacheEvict(value = { "getUserInfoById", "getPageList", "getTotal" }, allEntries = true) public void deleteUserRoleInfo(UserInfoDto userInfoDto) { List<UserRoleDto> userRoleList = getRolesById(userInfoDto); if (userRoleList != null...
1
e161b191116547c24fa845acd407b8c7
f25c5e3919fec64677960933342de601
Begin demonstration of Abstract Factory design pattern
namespace FactoryDesignPattern class Program static void AbstractFactoryTest() { IFactory factory = new HaierFactory(); var tv = factory.ProduceTelevision(); tv.Play(); var ac = factory.ProduceAirConditioner(); ac.ChangeTemperature(); }
1
e377a51eb04a37f2dd6f6c0d0d9a6a2a
98d17df778b5916cb2169ed0dde9f007
Checks is at the end of or past their monitoring period
if (hasCriticalErrorsExceptingDate() || (new Date()).after(validationResult.endDate)) return true; else return false; }
1
82463913251e5377f0aabf2bb6030018
060641302deac1e44696fdd9562297fe
Convert rgb background string into array
function stripRGBValues(string) { rgbValues = string.substring(4, string.length-1).replace(/ /g, '').split(','); for (i = 0; i < rgbValues.length; i++) { rgbValues[i] = Number(rgbValues[i]) } return rgbValues }
1
5a91877206c343d345cdc8bc6d372242
cdcc1af0635019bb7447253e8656e3de
Is the entropy pool filled for /dev/random pull or DRNG fully seeded?
entropy_pending(void) { struct entropy_pending_count count = { 0, 0 }, *C = &count; percpu_foreach(entropy_percpu, &entropy_pending_cpu, C); return C->bitspending >= MINENTROPYBITS || C->samplespending >= MINSAMPLES; }
1
a29140628935b941189e918735ffa6ae
f3c1d909f09c67d984c030c2cb7897bd
libform_utils initialization
void elg_pform_init() {}
0
efab187719b552e0d1643797d3e196da
13056c227426effe7d7381b721edc508
Gets the log report filenames for the job.
public class DailyUpdateSCH extends AbstractSCH private String[] getLogFileName() throws CommonException, IOException { File passfile = new File(WmsParam.LOGS_PATH); String[] pass = passfile.list(); ArrayList<String> fileList = new ArrayList<String>(); ...
1
ce29728f5c88b589581948f548c131df
cc0a506f56f2ff68d0fff85cc52c72bd
# create electron-wrapped application
if (!requireNamespace("shiny", quietly = TRUE)) { stop('Shiny is needed to run the application. You can install it with `install.package("shiny")`') } shinyapp <- system.file("shinyapp.R", package = "cartofr") runApp(shinyapp, ...) }
0
186c8bb1053efc94e91c6761c0427571
ab5a46aad55f41a0845a7540f2944745
Creates a time-enabled layer in the GeoServer for the given raster mosaic if not existing by GeoServer REST-API.
namespace QRST.WorldGlobeTool.Globe public class EarthGlobe public RenderableObject GetWmsLayer(string name, string layerName, double distanceAboveSurface, double minLat, double maxLat, double minLon, double maxLon, bool visible, double levelZeroTileSizeDegrees, int numberLevels, string imageFileExtensi...
0
778255f2493bfe0a0b19a44420f3701b
2e04e51990920e7b9c16b9b83b1c345f
display daily equity curve
chart_equity_curve <- function(strategy_object){ strategy_object$ledger %>% ggplot2::ggplot(aes(x = Date, y = Acct_Val)) + ggplot2::geom_line() + ggplot2::labs(x = "Date", y = "Equity", title = paste("Equity Curve for", substitute(strategy_object), sep = " ")) + ggplot2::theme_bw() }
1
2f9536d8d8bf3eb2fc8e1b89f5685d25
e9cf0044ece504b0e80560d9a80032c2
Stretch a Image.fromarray image to fill the window while maintaining the aspect ratio
def fill_image(image): width, height = image.size new_image_length = width if width>height else height new_image = Image.new(image.mode, (new_image_length,new_image_length), color='white') if width>height: new_image.paste(image,(0,(new_image_length-height)//2)) else: new_image.pa...
0
3575d056fb9a395b03bb213a7dcce270
e5fcefa83ce9aed9282c979cdb589180
创建机台的滚动层
local normalImage = "xf_02.png" local scrollWidth = self.mBgSize.width - 215 local scrollStartX = 107 local scrollIntervalX = 215 local scrollCellWidth = 15 if isHistoryItem then normalImage = "xf_03.png" scrollWidth = self.mBgSize.width scrollStartX = 190 scrollI...
1
8b14dbef3d492de4679dc5f57ce2061d
cf411aaba9bce3ece9eff968cd580d48
把登陆按钮的点击事件注册到事件中心
public class LogonView extends RelativeLayout{ public void setBtnLoginOnClickCallBack(View.OnClickListener callback){ if(btnLogin!=null){ btnLogin.setOnClickListener(callback); } }
0
7cc1414c997cd56df6a1a03244c70a7d
24e7490028429dfc61ac585f6ccd0fb7
選択されているシート名を取得する。<br>
if (comboBoxSheets.getSelectedIndex() > -1) { final String value = comboBoxSheets.getValue(comboBoxSheets.getSelectedIndex()); if (!"".equals(value)) return value; } return null; }
1
6c5e8cfaa3fe3d2e5794676fd7a987d7
981827a11b263dd781a508939156fb3c
Retourne les résultats Open/close pour les afficher dans un tableau
{ $output = []; foreach ( $openingTimes as $day => $time ) { $dayShort = $this->daysShort[ $day ]; $output[ $dayShort ][ 0 ] = $time; } foreach ( $closingTimes as $day => $time ) { $dayShort = $this->daysShort[ $day ]; $output[ $dayShor...
1
577e5a799679682953760c61b22053de
937002d8db2639d7caf05d68500c59ef
获取域下主机分数列表
class Site extends Base public function getDomainList($id) { try { return $this->httpPostCookie($this->getUrl('DomainList'), ['search' => $id, 'list' => true]); } catch (Exception $e) { return $this->error($e->getMessage()); } }
0
340f562dcc8a30739dffc94b98565b07
67477cde60d9edc6a9ae5480245dbc26
search for posts with title or tag
class Post extends Elyon_core_controller public function search_post($data) { $query = clean($data); $filter = array('post_title LIKE "%'.$query.'%" OR post_tag LIKE "%'.$query.'%" OR post_content LIKE "%'.$query.'%" AND post_type=' => 'post', 'post_status=' => 'publish'); $this->load_all_post_page($filter, nu...
1
9b1b5cf2e0da13942c802b477bc86d6a
7ccbd520850df5985bdc85f327cb7aca
Synchronously upload the ILX file to the Big-IP.<br> Acquire the mutex lock and then use the file-transfer/uploads REST api to upload the file.
{ using (var stc = new StackTraceContext(this, "filename={0}", filename)) { ArgumentValidator.ValidateNonEmptyString(filename, "filename", _myTypeName + ".UploadIndirectPayloadFile()"); var result = UploadIndirectPayload(requestGuid, filename, true); ...
0
d8cafadab2a0d3fef91195982247c6a9
88d59ea5b944a963503c8f8c3b5e7c81
Checks whether a negative reopening delay is forbidden.
{ if (maxdelay == 0) { maxdelay = 10; } return getLastDelayTime() > maxdelay; }
0
79ad953d5685b877ea747b9671b78055
286a32eba20570567f808f87e62b8041
工会频道聊天
local data = cell:GetData() if not data then return end self.guild_view:ChangeChannelType() cell.root_node.toggle.isOn = true local current_id = ChatData.Instance:GetCurrentId() if current_id == data.role_id then return end current_id = data.role_id ChatData.Instance:SetCurrentId(current_id) self:FlushWa...
1
cdd25bba246a593e1451724bb457a7b9
175646b9fdb84af556cee01d28117648
Sets the used pes.
public class VmAllocationPolicyObO extends VmAllocationPolicy protected void setFreePes(List<Integer> freePes) { this.freePes = freePes; }
0
254f1901bee567a2c292c23a8c66f553
bfa464218755732e8e009ba9972abdcc
将LocalDateTime转为long类型的timestamp
public class DateTimeUtil public static long getTimestampOfLocalDateTime(LocalDateTime localDateTime) { ZoneId zone = ZoneId.systemDefault(); Instant instant = localDateTime.atZone(zone).toInstant(); return instant.toEpochMilli(); }
1
932e85888ccbadc17f048f399c05f97c
42194bd897688441c7fbf33db01a56a1
Returns an unique id within the manifest file for the element.
public class LaunchableAdapter implements ILaunchableAdapter public String getId() { return element.getAttribute("id"); }
1
721ec639fdebfff24845c6f7f267acdb
05678edcc74c3949dbe8d85724185820
変化分再現率を取得
export class Stats public get rme(): number { return (this.moe / this.mean) * 100 || 0; }
0
b13ab8e21143d6c75db5542628c14e43
3ca5da8c3b4e915af3240d3b620e6274
Añade un nuevo medico
def insert_medico(): log4py.info('## medico_view método insert ##') response = None payload = None jsonRequest = None loginService = None service_response = None try: jsonRequest = request.get_json(force=True) medicoService = MedicoService() service_response = medicoService.insert_medico(json...
1
92406541c2d2fcf3d2a6c7f81b11e0a9
506f7e0f441bc196caaad14516687057
Manufacturer facets (if any).
class LinkedImage(object): def inherited_facets(self): return self.__pfacets
0
7dd9b8afb8ca75a34465dc793e44731b
b5e5049f3cf7413afcba16d3a40ce83c
Reconciles the new Network Topology into the Database
def insert_to_mongo( slice_network ): for slice_key in slice_network: existing_dict = query_tile( slice_key ) if existing_dict: existing_dict.update( slice_network[slice_key] ) db.slices.update( { 'lonmin': slice_key[0][0], 'lonmax':slice_key[0][1], 'latmin': slice_key[1][0], 'latmax':slice_key[1][1]...
1
1d7fbf504e7e1060d9b2e4c922b9ccca
a213adc39f590d360908c9552478c76a
Pr&uumlft ob der Spieler mindestens einen Schwierigkeitsgrad ausgew&aumlhlt hat.
for (int i = MIN_FLOOR; i <= MAX_FLOOR; i++) if (selectedFloors.get(i)) return true; return false; }
0
d2b4506bd63b84c4d1cb42aa649d7cab
f1f3fb1533b1667c642e199f82380515
Brazo superior derecho
class PersonThinBuilder extends PersonBuilder public function buildLegRight(): void { $this->g->drawLine($this->p, 70, 100, 85, 150); }
0
1b480a590189c9378304785f6529de6e
0c5cffa14285fd1d299749b15e495110
الحصول على انواع الهواتف
interface APIClient @GET("b/5f3a3fcf4d939910361666fe/latest") fun getAllMobileHandset() : Call<ArrayList<MobileHandsetEntity>>
1
ca124022fbb55522a63d75ab6c6e5e6e
3b7191c3f6cabcd8da2a83475513d48a
This method will add a Transaction into the Cache object if it does not exist and update the value if it exists
namespace SeguraChain_Desktop_Wallet.Sync.Object public class ClassSyncCacheObject public async Task<bool> InsertBlockTransaction(ClassSyncCacheBlockTransactionObject syncCacheBlockTransactionObject, CancellationTokenSource cancellation) { bool result = false; bool semaphoreUsed = fa...
1
4890f589bfe44067e960a92c8aae74e0
6e6bff6c778d8bf120231b55ef914617
返回總頁數數組
public class AdminHelpAction extends ActionSupport{ public void setArrayPageCount(int[] arrayPageCount) { this.arrayPageCount = arrayPageCount; }
0
8691fe29fc9057a85dc0db6b9aa895d3
122c20cff8618f3606e5efe6befa5f31
sorts by date completed and updates ui
function sortFunction() { var table = document.getElementById("tableBody"); var dates = []; var allData = []; for (var i = 0, row; row = table.rows[i]; i++) { var newRowElement = new rowElement(); for (var j = 0, col; col = row.cells[j]; j++) { if (col.id == "dateField") { dates.push(col.getAt...
1
b3473e6409af8cdf9bb306053c87a64e
1be15354166371551b01703d464b4788
http://stackoverflow.com/a/377028/1689220
function strpos( haystack, needle, offset){ var i = haystack.indexOf( needle, offset ); return i >= 0 ? i : false; }
1
698c26e85fb78ce7c0cec4c1dcc93f04
162d5682e6e968e6572302c86c11a2b6
Returns the method visibility (value is a constant YaPhpDoc_Token_Class::V_PUBLIC|V_PROTECTED|V_PRIVATE).
$visibility = []; !$method->isAbstract() ?: $visibility[] = 'abstract'; !$method->isFinal() ?: $visibility[] = 'final'; !$method->isPublic() ?: $visibility[] = 'public'; !$method->isProtected() ?: $visibility[] = 'protected'; !$method->isPrivate() ?: $visibility...
0
0b7a0df244d408c2db755a0cc5c6507c
fe4e1a92b0944854c372f44971740cc9
Sends both registration id and email address. If no email address is registered on the device, the email parameter is not sent. If multiple accounts are registered, the first one is selected.
function sendRegistrationEmail(params: { "body": RegistrationEmailDetails; }): Promise<{ response: Response, data: undefined }> { const path = `/send_registration`; return makeRequest( "POST", path, params["body"] ); }
0
18115af31ba718aa42c2dcdf6927bc35
c64558c0ac4ffcd14f6dcfa2bb1c61e4
Computes the forward pass for a fully-connected layer. The input x has shape (N, Din) and contains a minibatch of N
class NVPLayer(ABC): def _forward(self, x, reuse): pass
0
6a2f33f2835de47b37c13346dd1ce9c5
5b29cdec1a61b08bc28427f22a0992ed
Tests that the unbatch timeout works.
mock_consumer = self._create_patch('kale.consumer.Consumer') get_time = self._create_patch('time.time') worker_inst = worker.Worker() worker_inst._batch_queue = worker_inst._queue_selector.get_queue() mock_consumer.assert_called_once_with() worker_inst._batch_stop_time = ...
0
d8d7aa9833d2168513deb35ccfd151da
3547301dfaff7d7c6a8d3bc460bb2ba9
Proceso que realiza el registro de la informaci&oacute;n auditada en BD.
namespace DAL.Repositories.Sql public class AuditoriaDAL public static void Insert(int residenteId, int profesionalId, DateTime fechaHora, string observacion) { try { string spNombre = "AuditoriaInsert"; List<SqlParameter> parametros = new List<SqlParameter>(); SqlParameter retVal = new SqlParam...
1
2bb7c79e4efa1aa81a83fff8d079feb0
583d9702c80ea13114ab223813395625
对list进行排序,支持map和list混合嵌套
if (map == null) { return new HashMap<>(); } else if (map.isEmpty()) { return map; } Map<String, Object> sortMap = new TreeMap<>(new Comparator<String>() { @Override public int compare(String s, String t1) { return s.compare...
0
011b865fe49ba56a5a95b46590b57f21
875f4f8f8aaca4ba0429467b13ddca20
Returns the word with the highest cosine similarity with the input embedding emb.
word_a, word_b, word_c = word_a.lower(), word_b.lower(), word_c.lower() e_a , e_b, e_c = word_to_vec_map[word_a], word_to_vec_map[word_b], word_to_vec_map[word_c] words = word_to_vec_map.keys() max_cosine_sim = -100 best_word = None for w in words: if ...
0