query_id
string
corpus_id
string
query
string
code
string
label
int64
47a71ecb220d405632f4508353a9b8e6
a8b02914bc670d1d5f72a062e9cf8b5c
Constructs a major chord from its base note
$chroma = $this->_truemod($noteNumber, 12); $octave = (($noteNumber - $chroma) / 12) + 4; $this->octave = $octave; if (is_array(self::$chromas[$chroma])) { if ($preferredAlteration == 1) { $this->step = self::$chromas[$chroma][1]['step']; $this->alter = self::$chromas[$chroma][1]['alter']; ...
0
89d01c5bc833f7b747ee8c7c2c16ef95
a2f0256c6439853a9c9db38c55aa77c9
Creates a new finder.
class FileViewFinder extends IlluminateFileViewFinder public function __construct(Filesystem $files, Translator $translator, array $paths, array $extensions = null) { $this->translator = $translator; parent::__construct($files, $paths, $extensions); }
1
4e78d6a864f3c6e6ef09054e832a1dfe
a8ecfd685754138b57c2eec265ec5cf4
retorna o nome do método, com o primeiro caracter em minúsculo. Ex.: index
{ if (coluna.Length > 0) return String.Concat(coluna.Substring(0, 1).ToLower(), coluna.Substring(1)); return coluna; }
1
167e97cbeb8f43ccbed4d4c23e875a70
4833f711878b4afd9b151be764a53db9
PrivateRegistryTransform modifies all Pods to use registry for the image source and adds the imagePullSecret
image_with_registry = image.copy() if self.parent_registry: if image.registry and image.registry != self.parent_registry: error = ( "Registry specified in dockerfile image doesn't match configured one. " "Dockerfile: '%s'; expected regi...
0
f778533bb043a9acad464c8cfe530cd1
4b0c6943f18ec8152d671c3b56c42eff
Создать HashMap, где для каждого ключа из списка keys будет ассоциировано значение с таким же индексом из списка values. Ожидаемый результат: {1=v1, 2=v2, 3=v3}.
list1 = ['a', 'b', 'c'] list2 = [1,3,3,4] assert make_dict(list1, list2) == {'a': 1, 'b': 3, 'c': 3}
0
bac1fa25a672cee49bf03faa5485b704
dca224ede6f054260c6c1f81a4b14d11
根据物流单号查询该订单的物流状态信息
var allParams = { url: 'express/logistics_info?code=' + code + '&no=' + no, sCallback: function (data) { callback && callback(data); }, eCallback: function(){ } }; this.request(allParams); }
1
f999159b98fafea03adabe114975d677
0aa51543a98437c63c8ebd925a02ac72
从账表中计算某个产品的剩余库存
tmpl = product.product_tmpl_id if tmpl.state != 'platform_published': return 0 merchant = tmpl.merchant_id if not merchant: raise UserError(u'Not found template merchant!') loc_obj = self.env['stock.location'] supplier_loc = loc_obj.return_merchant...
1
65478b5f848034644220fd6cc9839000
3328b66d55b8e628a7e09bfa32bb7a13
Passing a valid input, testing that FutureMeeting returned matches the Id entered into that meeting.
public class ContactManagerTest @Test public void testaddFutureMeeting(){ System.out.println("---------------------- ADDING NEW FUTURE MEETING -----------------"); cons.add(jane ); cm.addFutureMeeting(cons, this.date); System.out.println("----------------------------------------------------------------")...
0
c933c44cc759daa9553be118cd3fc936
acd89c96d61ab0a3cb05f455b942ebc9
Register the above content view.
public void setContentView(View view, ViewGroup.LayoutParams params) { contentLayout.addView(view, params); }
0
3fe9296b978b985797d12e51f3d66b1a
ab920312bbc8d7d80f93daab84b30fe9
Spawn Infected at the Airdrop location.
{ origin = destination; playerPosition = PlayerManager.Player.transform.position; var potentialDestinations = landingPositions.Where(p => p != origin).ToArray(); destination = potentialDestinations[Random.Range(0, potentialDestinations.Length)]; health.SetInvincible(true); ...
0
508a6ea2f0a9c0ad06b45d9c5c59630c
55814c67b84fe15451532e9ad04860f9
Обновляет заявление о согласии на зачисление абитуриента
namespace KisVuzDotNetCore2.Models.Abitur public class AbiturientRepository : IAbiturientRepository public async Task UpdateApplicationForAdmissionAsync(ApplicationForAdmission applicationForAdmission, IFormFile uploadedFile) { await _applicationForAdmissionRepository.UpdateApplicationForAdmissi...
1
ca0a645305960954566d6cf928dd7b2d
2415e439b819f17f9bcc3c1fe92c2777
Delete a flat from the database.
public class FirebaseManager public void deleteExpense(final String expenseId, String flatId){ FirebaseDatabase mFirebaseDatabase = FirebaseDatabase.getInstance(); final DatabaseReference mDatabaseReference = mFirebaseDatabase.getReference().child("flats").child(flatId).child("expenses"); mDatab...
0
53383604e7ec0e761775a24c9ffd2fc0
ccaf29811afea9bd393b9dc3bde031ee
Zend_Dateインスタンスの取得
class System_Admin_Date extends Data_Object public function GetDate() { return $this->date; }
0
3c183e34fd8940bd3756fca18728ce5b
3a29bd0b76a4645629559a88f6eef557
Returns the publication browser's content in HTML format.
pbl = _get_publication(puid) if os.path.sep not in style: style = 'publications_bootstrap/citations/{}.html'.format(style) return render_template(style, context['request'], {'publication': pbl})
1
f448b0cd5a0962992e2cc0e85997f532
bb7adc5e67d4ae71694a4b400ecbb055
Notify connected nodes that AudioPath has changed
@pl.wendigo.chrome.protocol.Experimental class WebAudioOperations internal constructor(private val connection: pl.wendigo.chrome.protocol.ChromeDebuggerConnection) fun nodesConnected(): io.reactivex.Flowable<NodesConnectedEvent> = connection.events("WebAudio.nodesConnected", NodesConnectedEvent::class.java)
0
6b1dde64b7bff648b36a2459ead83c8e
3e4a3849e2629cb44d690e7a8561be05
@brief Computes and compares the CRC stored in a packet
int csum_index = get_csum_index(); calculate_csum(csum_index,rcv_buf); #ifdef DEBUG uartSW_puts("\r\n die richtige csum waere: "); uartSW_puts(csum); uartSW_puts("\r\n"); #endif return(strcmp(csum, &rcv_buf[csum_index])); }
1
f62bcf45f918bf9e0a5373f0fa370852
5a23f0b8287991a49b68829392d32146
Change chart visibility
void BubbleChartView::toggleTitleVisibility(bool visible) { QSize s = size(); header->setVisible(visible); setChartRectSize(s.width()*0.8, s.height()*0.8); showChart(); }
0
ec9d66435c476bccc892bc0a3ff1508d
7981d567e113df33d5d72b62ad89074a
Gets information about one of your numbers using the number's ID '/users/:user_id/phoneNumbers/:number_id' GET
operationId: string, options?: coreHttp.OperationOptions ): Promise<PhoneNumbersGetOperationResponse> { const operationArguments: coreHttp.OperationArguments = { operationId, options: coreHttp.operationOptionsToRequestOptionsBase(options || {}) }; return this.client.sendOperationReques...
0
36733e3c466f3858ae490755f051ca07
08b38f4021d97b2102468977fb32d29a
Get the validity of each subdivision:
{ for ( int i = 0; i < Subdomains.size(); i++ ) if ( !Subdomains[i].IsValid() ) return false; return true; }
1
7b21b0546cdda9baa54921addc85f2f4
263fb138c443f01a3a0b333419743be2
创建标题部分,并绑定事件
init() { this.renderTitle(); this.bindEvent(); }
1
25bf790b6b3bb8a0e61556f662723f94
73628aeefcb16b9bc7e5b1c59d1d0132
Get a monster on the current level by its index.
public class YugiPlayerField{ public Mon getMon(int target){ if(target < monsters.size() && target > -1) return monsters.get(target); else return null; }
1
316e6ebe74ad383f37c53b2aa4b1b857
be6707608512ffe8ff48537c61cfc984
Checks Discord to see the current user's Discord information.
try: query = urlopen(Request(method="GET", url="https://discordapp.com/api/v6/users/@me", headers=args[1])) self.valid.append((args[0], query)) except: self.invalid.append(args[0])
1
9631ebc1e1517e8fdbd8b7b0d2f55750
9adeb15e8875941a4d796ec5f3ae059e
Finds the XML base attribute for a specified XElement.
{ var childXmlNodes = GetChildNodes(parentXmlNode); if (childXmlNodes != null && childXmlNodes.Count > 0) { return childXmlNodes[0]; } return null; }
0
54b055208ba8d52e97d8e30a7a4f8473
01445cac7cad41df89ca65aa80b60fa4
Tests example with non-existing dir.
print() options = { "images_path": self.empty2_dir, "verbose": True } rets = up.execute(options) self.assertNotEqual(rets, None) self.assertEqual(len(rets), 0)
0
0bdd52a9059c461214523b327541e744
3fa69683172e6772a05aaeab02b8d5ce
Read an environment variable and interpret it as an integer.
env_str = get_str_from_env(env_var_names, u"") try: return int(env_str) except ValueError: return default_value
1
d9c16394d37c71bd22fad226dac3e931
4d552b80a0f2ef11045f2d63dc778a46
Scope a query to only include posts that are available to show.
class Post extends Model public function scopeNotDraft($query) { return $query->whereNotNull('title') ->whereNotNull('slug') ->whereNotNull('user_id'); }
1
debdcd15bf89c7fdf180b9a2a048f775
7f61448ad6da3ef0f9cb03f40c5be655
Always include a root segment
cases like (1)
0
00d75b2cd167a53e1efbafb759964292
6da5295cd2517b0e97150770109acae1
把选择好的产品封装成Json
Bundle bundle = new Bundle(); StringBuilder pid = new StringBuilder(); Set<Integer> keys = mSelected.keySet(); for (Integer key : keys) { pid.append(mSelected.get(key).getPid() + "|"); } bundle.putString(PRODUCT_ID, pid.substring(0, pid.length() - 1)); ...
0
61ebd77d784af4cdb6533fe18530e53b
422ded0d916fb9930b734d340a34a0bf
Возвращает количество пользователей по фильтру
class PluginAdmin_ModuleUsers extends Module public function GetUsersComplaintsCountByFilter($aFilter = array()) { return $this->oMapper->GetUsersComplaintsCountByFilter($aFilter); }
0
38ccb5b8cbfc4ea2525602550800ed77
872abd17825ae4f83afff433e03c8db6
Dequeue the given process from the wait queue on the given resource.
int RCB::removeProcess(PCB *process) { WaitingList.remove(process); return true; }
1
c3feefda9db5fc5992719079e8afe173
844efd009cf52279f6862e3efdcf208a
设置ExpandCollapseToggle背景颜色附加属性
@Route(path = TrainingRouterTable.PAGER_LIST, name = "ViewPager + FragmentPagerAdapter") class PagerListActivity : BaseActivity() private fun TabLayout?.toggleState(isAppBarExpanded: Boolean) = with(this) { val normalColor = Color(if (isAppBarExpanded) 0xFFF5F5F5 else 0xFF666666).toArgb() val selectedCo...
0
b8fdcb74df4a9cf6bf04afb38c5501a5
a206b6cd7285c1236784d3fac5b4522e
Factory method that creates the input attribute map for a newly created {@link FlowExecution}. This implementation uses the registered input mapper, if any.
String id = getContext().getFlowId(); AttributeMap attributes = getContext().getFlowAttributes(); return getContext().getFlowArtifactFactory().createFlow(id, attributes); }
0
94ad84efd1edb03a39f0882455ce4a67
7fb861a0f21b76c4a38a4510fccecdd6
Mastermetod för att uppdatera alla prisliste-combos i systemet.. 4 ställen Anropas i början och vid ändring i prislistor..
class TUpdater private function _updatePrice($userID, $filePriceList, $dbPriceList) { $sqlQuery = ""; foreach ($filePriceList as $airusCode => $price) { try { if ($dbPriceList[$airusCode]) { $sqlQuery = " UPDATE ...
1
c528fa23f279b934926c56de7cc53162
af3bfcf07db2d3d490e0d7d2bc0f2ea6
根据餐类ID查询餐桌
List<OrderEntity> findByTableId(int dinnerTableId);
0
e51076430dfed3ab2adf13f443359961
5a1825e2ff14fc3970288b601aa711a4
날짜를 지정하면 20190601식으로 리스트를 반환합니다.
public class DateUtil public static List<String> getDatesList(String year, String month, int week) { return getDatesList(Integer.parseInt(year), Integer.parseInt(month), week, "yyyyMMdd"); }
1
ba792cf2f23ab82e13b59049805cd517
4da94aff7d0aa0e3269bef9d54a50513
Calculate the outer minus Equivalent to the outer product, but with the product operator replaced by minus
class DPLOL_MF: def bsxfun_minus(self,a, b): l = np.shape(a)[1] return a - np.tile(b.reshape((-1, 1)), (1, l))
1
0b94ab57c7b2c21e5a3e20d05e5fba31
d604147251b596f13ccf6caf2433cb68
Check each custom attribute of the property for the "Required" attribute.
var attribute = Lambda.GetAttribute<RequiredAttribute>( _expression ); if( attribute != null ) this.Required( attribute.ErrorMessage ); }
1
a69d082b5579225554d7718110927c8d
c8c842ab39d69f68a936127f15dbe550
Enable masks for [reset, start, stop, trigger] signals
namespace ManoMotion.RunTime public class RunTimeApplication : MonoBehaviour void EnableAllTriggers() { ShouldShowDrop(true); ShouldShowPick(true); ShouldShowClick(true); ShouldShowGrab(true); ShouldShowRelease(true); }
0
9419c0f2c677e45998b1cbe921173959
619ca31150c30d7ce2058da343f7c46b
Send a message to all players in the room, optionally exclude up to two players
namespace RiptideNetworking public class Server : Common public void SendToAll(Message message, ushort exceptToClientId, byte maxSendAttempts = 15, bool shouldRelease = true) => server.SendToAll(message, exceptToClientId, maxSendAttempts, shouldRelease);
1
276ebdd776db80c04cc3affdfd950db2
cf3ab7f6c85df57f23590edaa256dda6
Simply ensure that attrArg is a dictionary
class AttrDict(dict): def __init__(self, *args): temp_dict = args if temp_dict is not (): temp_dict, = temp_dict for key, value in temp_dict.items(): if isinstance(value, dict): temp_dict[key] = AttrDict(value) super(AttrDict, self).__i...
0
9fda7fa99f2e5f9bb347c21ff652dd0b
269c78f56c620194583359018001e2b6
Closes replies from a comment.
function closeReply() { replying = false; $('.column-2c').removeClass('reply-message-active'); $('.reply-actions-panel').hide(); $('.column-2a').show(); $('.column-2b').show(); }
1
feff58a782068412ae82431d92299fa6
4139a11ccc7c35cca208d66f9c9b37da
Right aligned field that is cropped or padded with spaces to exact size.
if width is None: try: width = int(subprocess.check_output(['stty', 'size']).split()[1]) except: width = 80 return ''.ljust(width, fill) if not text else ('%s %s ' % (3*fill, text)).ljust(width, fill)
0
ccb5c554f6e300c6eb7f2ddf8a4b744b
e6dafa7e85e51e2a3a2db29459dd460a
individual relations until no more variables can be updated. You are not allowed to modify this function.
while True: delete = [] for var, clauses in self.matches.iteritems(): always_positive = all(c[0] == var or c[1] == var for c in clauses) if always_positive: self.clauses -= clauses for c in clauses: ...
1
252aaf7fba5c3a8fcfeb7b26e1a1af64
3fe3ed48fcf01ee07bccd06e87fa805a
GETS SERVER STATUS FROM RIOT API
namespace CS_EVE_XML_API public class EVEXMLAPI public XmlDocument serverStatus() { XmlDocument xmldoc = new XmlDocument(); WebClient web = new WebClient(); StringBuilder sb = new StringBuilder(); string response = null; sb.Append("https://api.eveo...
0
66d4e57d46c735541fe1782e80e29045
d9e2ecd9b6b65e1415e5a02376451077
frees all dynamically allocated memory associated with a smallSectorBoard
{ utFree(chBoards.PositionIndex_); utFree(chBoards.NumPosition); utFree(chBoards.Position); utFree(chBoards.PlayerWhite); utFree(chBoards.WhiteKing); utFree(chBoards.BlackKing); utFree(chBoards.MoveIndex_); utFree(chBoards.NumMove); utFree(chBoards.Move); utFree(chBoards.MoveStac...
1
ec6d6c321f44fe42d0a54b1cd1ca4eb0
9317f580b117ba9d78dbabf09fa26098
判断实际到期日,如果是,则计息日为实际到期日,否则,查找第一个工作日为实际到期日
LmPmShd iShd = loanRelate.getInterestDatePmShd(conn, this.buzDate); List<LmPmShd> list = DAOContainer .getLmPmShdDAO(conn != null) .findByLoanNoAfterPsDueDt(conn, loanRelate.getLoanNo(), buzDate); if (CollectionUtils.isEmpty(list)) { throw new YcLoansException("没有找到调整好的还款计划记录"); } if (SystemUtils.i...
0
07c1a49ae54fed037c3dfb35c69ac7dc
049705039cda296e8325a90108c8c01c
Calculates the right-hand side of dP/dm.
{ dPdt[0] = m_gamma * (Q[0] - Q[1]); for (int j = 1; j < m_M - 1; j++) { dPdt[j] = m_gamma * (Q[j] - Q[j + 1]); } if (m_outEnd.isEmpty()) { dPdt[m_M - 1] = 0; } else { double q = getQ(); for (int i = 0; i < m_inEnd.size(); ++i) q += m_inEnd[i]->getQ(); for (int i = 0; i < m_outEnd.size(); ++i) ...
1
08630ca6854c70f2d08c0b0c84456c23
744a0b949653ab93bc178d08d58c40b2
Fetch the user-friendly name for a role
$list = array(); foreach ($rids as $rid => $value) { $role = user_role_load($rid); $list[] = $role->name; } return implode(', ', $list); }
1
e322d35e6570e0b3833330d062088c06
3ee095a302f66a177de136c97d1aa2bd
remove the key specified by this publicKey.
if (keystore.deleteKey(msg.getPublicKey(), msg.getDescription())) { sendAgentSuccess(); } else { sendAgentFailure(SshAgentFailure.SSH_AGENT_ERROR_KEY_NOT_FOUND); } }
1
7c85825314114bb641ed56dabbc92adb
71e94d287687a5728e807f5ce9e62c1d
Computes the distance between two circles' centers
function init() function distanceBetweenCircles(i, j) { return Math.sqrt(Math.pow(circ[i].x - circ[j].x, 2) + Math.pow(circ[i].y - circ[j].y, 2)); }
1
8be3e26b773db07c0218958a542bcaec
de62f27936c1e596d2f39522e91ebdc3
对静态成员执行动作
public object Invoke(object target, object[] parameters) { if (isStatic) return method.Invoke(null, new object[] { target, parameters[0] }); return method.Invoke(target, parameters); }
1
d926a2f649ad65fd3c7cbc3138526fc5
a2f3a7c35455c35f2c37b5b51102c8d9
Compare analytic coc, dipole and quadrupole moments.
t, x_n, x_p, r_n, r_p = self.t, self.x_n, self.x_p, self.r_n, self.r_p tol = 1e-16 if self.model.options["particle"] in ["quadratic profile", "quartic profile"]: neg_diff = self.c_s_n_rav(t[1:], x_n) - self.c_s_n_rav(t[:-1], x_n) pos_diff = self.c_s_p_rav(t[1:], x_p) - se...
0
dd16b6b170752589b3ceb3d5b9ca60d2
28a474f5cb43e87e541cb10ec002d744
封装使顶部导航栏字体颜色恢复的动作
{ if(gstyle=="inv") { var links=document.getElementsByTagName("a"); for(var i=0;i<links.length;i++) { if(links[i].href) { links[i].style.color="#FFFF88"; } } var spans=document.getElementsByTagName("span"); for...
0
c35aa67fa4dd82421cdaaa64d1822703
8817aa3bbac9798b98bf81da97e8b23f
Holds a DataFrame along with associated columns of interest.
class Pandas: def __init__(self, df): self._df = df
1
ad77c4c397bdc4fed754779f4514d870
96af83356afb4e391332e31768005bb9
The number of test cases is the number of rows
int Codejam::get_num_tests() { int N; m_in >> N; return N; }
1
b877fe3c79b36b4f94143f9c6ae6d66f
14ba9be48db93519866cdf1cec39ad88
Same as DynamicSubqueryPruning, but the subquery is not executed. Thus, we fail.
namespace Exprelsior.Tests.DynamicQuery.SimpleQueries.Boolean.Contracts [Fact] void Assert_Boolean_Inequality_Dynamic_Query_Expression_Is_Generated_Correctly();
0
9e84d2d61699329d81dcfc21b283fcf3
8396f3e72f77ffe3e87610c2936734c0
创建留言数据库
{ $Message = D('Message'); if($Message->create()) { $result = $Message->add(); if($result) { $this->success('留言成功'); } else { $this->error('写入错误!'); } } else { $this->error($Message->getError()); } }
0
5e23bdbbae61193dbdbbd07a3854d047
c9c3fc39d27eb70216c1c9678850128a
Called when the X axis JScrollBar changes.
void SerialTool::horzScrollBarTriggered() { int value = ui.horizontalScrollBar->value(); ui.customPlot->xAxis->setRange(value / (100.0 / xRange) + xRange, ui.customPlot->xAxis->range().size(), Qt::AlignRight); ui.customPlot->replot(); }
1
2a91eeee57d6d69b61f9921e6731b4d6
88efe6cec736ed447e683717ffd03a3d
Export downloaded images report to file.
if not os.path.exists(export_dir): logger.info("Creating directory at {0} for media files.".format(export_dir)) os.makedirs(export_dir) file_path = os.path.join(export_dir, filename + '.' + extension) if os.path.isfile(file_path): logger.info('Overwriting existing report at ' + file_...
1
5696db53a8b14575f4827cda27e4cb6b
ca63ba51ec69b1e977e14d1635f8ac24
删除采购单主表
namespace XHD.BLL public partial class Purchase_CGLY public bool Delete(string Purid) { return dal.Delete(Purid); }
1
80f8a0cb8125649d55fec423bb8e614b
3dc171e73a7c88a8afef54f6c998ed75
Обновить баннер
if ($id) { $model = $this->loadModel($id); $this->breadcrumbs = array( 'Banner' => array('admin'), $model->name => array( 'view', 'id' => $model->id ), 'Update', ); } else { $model = new Banner(); ...
1
11931bca453927275f2894f1baa9c93f
714129d842b711dd4f033b8a64dc0f05
Tries to print all 256 colors
{ Type type = typeof(ConsoleColor); Console.ForegroundColor = ConsoleColor.White; foreach (string name in Enum.GetNames(type)) { Console.BackgroundColor = (ConsoleColor)Enum.Parse(type, name); Console.WriteLine(name); } ...
0
748a6ada01e3cedc9c82408d200d8fd5
eaa00c62dcb71b838d9ca061073c1410
Функція, яка записує розмір картинки, що буде передаватися сцені
def size(): global t,w,h, _drawman_scale,_shag, _vod w=20*_shag h=20*_shag t.screen.screensize(w,h)
1
d25ff77e51fc97490ffa769c0ae713e2
d3436c26acca8e68689ce391823cb723
Handle new task return of each host.
class ServerHandler implements ServerHandlerInterface, ServerSocketBufferHandlerInterface public function onFinish($server, $taskId, $data) { if ($data instanceof TaskResponse) { $data->setTaskId($taskId); $data->setSrcWorkerId($server->getWorkerId()); $data->run($this->a...
1
74ee42e858705df5afdcb683ecc18723
dd4c4ff6547aaddad102825677d2d9a1
Returns a list of links to explore sorted by similarity to the dest
def optimizer(final_processed): sorted_slds = sorted(final_processed, key=lambda s: len(s[2]), reverse=True) done = [0] * len(sorted_slds) done[0] = 1 output = [sorted_slds[0]] sorted_slds_len = len(sorted_slds) for i in tqdm(xrange(1, sorted_slds_len)): sld = output[-1] tags = s...
1
9d73d4495705c32ccdb2fa36103dde2a
f4439e8d392f684f29f0b671d0e9e4e3
就是以一定的速度比例t,平滑的从start位置移动到end位置;
{ float duration = Vector3.Distance(rectTransform.anchoredPosition, endAnchoredPos) / speed; moveTween.Kill(); moveTween = rectTransform.DOAnchorPos(end.anchoredPosition, duration) .OnComplete(MoveToEndFromStart) .SetEase(Ease...
1
5e6913a76d1d402520f4344c216146fa
b81c0c825e9845c756208f969ba135d7
将日期时间格式的数值还原为日期类型
try: return datetime.strptime(date,"%Y-%m-%d") except: try: return datetime.strptime(date,"%Y-%m-%d %H:%M") except: return datetime.strptime(date,"%Y-%m-%d %H:%M:%S")
1
e076e12bdab7c5306d3e3100d5d14c38
bfbf84418cb2c88a987e25d38efe3101
查找备付金账号创建日期
@Table(name = "project_accounts") public class ProjectAccounts public String getAccountsCreateTime() { return accountsCreateTime; }
1
30245b4121cd31b30830ea036732f88e
be337f3d2babaec95d25e99d60b35e9c
Lists all FeedsFavoritos models.
class FeedsController extends Controller public function index() { }
0
e7835e42565da393a2b313315feaed0b
c84a879d4f803092c5126dbbe41f2a08
Calcule la distance Hamming entre les formes binaire de deux adresses IEML http://fr.wikipedia.org/wiki/Distance_de_Hamming
def hamming_dist(h1, h2): return np.count_nonzero(np.unpackbits(np.bitwise_xor(h1, h2)))
1
1f5bcb975af65c074a7af19288c6253c
ca13676c976285c9e8ad9ef49bb95825
Gets the delta value as an object.
ObjectDelta<?> getCurrentDelta();
1
812e8f1e2aefdf010ac3e4126ef3539d
e8e21972fad677b55947270ed81bb87d
This function is used to determine the rotated angles of each side of the square.
xPlusAngle = math.degrees(math.atan2(27-x_now, height)) xMinusAngle = math.degrees(math.atan2(-27-x_now, height)) yPlusAngle = math.degrees(math.atan2(13.5-y_now, height)) yMinusAngle = math.degrees(math.atan2(-13.5-y_now, height)) return (xPlusAngle, xMinusAngle, yPlusAngle, yMinusAngle)
1
0e7bd3b704fa8dbce05245fc2e74c3fb
ce2737bc2038d891a02e0768a996efc0
Queries if the encoder will handle granule marking. MT safe.
public class PreLzsDecoder implements PreLzssDecoder public boolean markSupported() { return this.in.markSupported(); }
0
bcc82150f421fe2652c27214feeb85c0
2fa838a4a069f5456989ec2bcb32cbce
Getter de la liste des ordinateurs connectés à l'imprimante
{ List<string> printermass = new List<string>(); ManagementObjectSearcher searcherInstallPrinters = new ManagementObjectSearcher("root\\CIMV2", "SELECT * FROM Win32_Printer"); foreach (ManagementObject queryObj in searcherInstallPrinters.Get()) { p...
0
73cf07c1e18cffa67d40962f477a67a1
fbcbeae059e11b68c446b3d513cd097a
Get arrival master by Id for edit data fetch
return new Promise((resolve, reject) => { console.log('id ', id); dynamodb.scan({ TableName: "MRM_Master", ExpressionAttributeValues: { ":id": { N: id } }, Filt...
1
7d80c38964a6caf7336584e464c75105
4d5faddfad663eb7f9763d9d58eb89a0
Creates the dynamic type without loading it.
namespace Mrwesb.Builder.Types.Builders public static class TypesBuildersFactory public static ITypeBuilder CreateDynamicTypeBuilder() { var moduleBuilder = CreateModuleBuilder(Guid.NewGuid().ToString()); return new DynamicTypeBuilder(moduleBuilder); }
1
2ac2c2752df168e5f4323afb2538515b
ac7ae0d8d70b7a0d23de1073d4407d61
Conteggia i valori unici assunti da un determinato attributo, per ogni valore unico indica il numero di occorrenze.
@Service public class ImpresaService implements Filter<Impresa,Object>{ public ArrayList<Occorrenza> ContaOccorrenze(ArrayList<Impresa> dati) { int occ=0; ArrayList<Occorrenza> out=new ArrayList<Occorrenza>(); for(int i=0; i<dati.size();i+=occ) { occ=0; Occorrenza tmp=new Occorrenza(); for(int j=i;j...
1
a2f047ccbe4c7ac6813cfd0763b04dac
8154f72d2e54fe0c18ea63d81716035e
获取离开天数
public class AttendanceRecord implements Serializable public Integer getLeave() { return leave; }
1
9d03a0e2336ec968dab09929433e0a15
b7131a41e59fb4f6b12cf0c8050b4ebc
Get the string representation of the mean counter value. Ensures the value is represented as int, if it's possible
class ZabbixServerFinder protected function getValueString($avg) { return is_null($avg) ? 'n/a' : round($avg, 2); }
0
dc4648938f3675c00dafca32a21d7648
6dd2fffdbc9c10b2a609b907d582df57
返回绝对的包围盒,就是说,如果节点是运动的,经过变换的,返回的包围盒也会是经过变换的。
const BoundingBox & AssimpMesh::getBoundingBox() { _transformedBox = _modelInfo->boundingBox.transform(gameObject->getTransform().getMatrix()); return _transformedBox; }
1
c4447e0c454cd3f5467a8c0577e652b1
8dc8cf91b9e605a09d226bd1943fa87b
Move one column right across the screen, taking into account moving between controllers or over the last column
public final class ControlPanel extends JPanel public void moveRight() { int moveGap = (int) (projectWindow.getGenomeWindow().getSize() / (double) INCREMENT_FACTOR); moveGapRight(moveGap); }
0
044a57c73145ac94c2b16254fe307b9e
5933cb00c7aafe2aadc1d18ea077aae5
根据Redis中保存的两个set集合进行差值计算,获得垃圾图片名称集合
public class ClearImgJob public void executeClearImg(){ Set<String> set = jedisPool.getResource().sdiff(RedisConstant.SETMEAL_PIC_RESOURCES, RedisConstant.SETMEAL_PIC_DB_RESOURCES); Iterator<String> iterator = set.iterator(); while(iterator.hasNext()){ String filename = iterator.next...
1
7efca5c6f41ddf170cd003fc4f34affc
be917b75e28aec4ffb9a78c04ccbe759
Enables traversal through torrent listing via j/k keys.
var mainContent = document.getElementById("main_content"); var listEntries = []; if (document.getElementById("archives")) { var lists = mainContent.getElementsByTagName("ul"); for (var i=0; i<lists.length; i++){ var currListEntries = [].slice.call(lists[i].getElementsByTagName("li")); for (va...
1
959051a5451a2849c57bfbc3be0515e8
b3a39cd9577ba60c10284ca58efb9a35
<h2>根据提供的领取优惠券请求生成 RowKey, 只可以在领取优惠券的时候使用</h2>
StringBuffer rowkey = new StringBuffer(); String regionCode = genRegionCode(sponsorID); rowkey.append(regionCode + "_").append(sponsorID + "_").append(System.currentTimeMillis()); return rowkey.toString(); }
1
4890d78b6d5c8e36bab9ab186265afbb
2e8eb450ba917f5a2aa9eebb68bd783f
Method for getting other user profiles
$.ajax({ method: 'GET', url: `/user/notes/all/${userSelected}`, }) .done(data => { otherAccount.username = userSelected; displayOtherUsername(otherAccount.username); adjustOthersProfile(data) showProfileSection(); }) ...
1
6110ca15de41bbf4e4527260fe145d89
594f73b3ad520991c66f50119732fba0
Returns the set of optical slots occupied in all the traversed fibers of this lightpath
class OpticalSystem(OpticalElement): def optical_elements(self): return self._optical_elements
0
e0ce52cd0924a59ce026ada4ac32d771
382444729b0696e33663847f85e45efe
Ensures that the three argument constructor throws an IllegalArgumentException when given a zero identifier.
try { Company c = new Company(); c.setId(-1); manager.getClientsForCompany(c); fail("IllegalArgumentException is expected."); } catch (IllegalArgumentException e) { } }
0
60b90a9f47bb85f3a9d9ffd8e254565a
57630e50a836017daffa84ff111434d1
Cancels out the lower two bits which can be used to store information.
void die(entity_t this){ this.status &= 0b11111100; }
1
28c491477326bf62375f35c5949e6d38
b1d9571f12c51186e753febd53d7d35b
Adds another child to the view
export class DataRecordChildrenView extends ToolbarView onChildrenAdd(){ if(this._childAdd){ this._childAdd.raise(); } }
0
58d8367002f92dd013b28d9472afc0d3
899371ab90e7a19a1c66d00c4f905b44
Update the network with new events. If the network has accumulated enough events this function will also train it
if self._replay.add_count > self.min_replay_history: if self.training_steps % self.update_period == 0: self._sample_from_replay_buffer() if self._replay_scheme == 'prioritized': probs = self.replay_elements['sampling_probabilities'] loss_weights = 1.0 / jnp.sqrt(probs + 1e-...
1
8cf918b22efeb9c4c2dcc2b038bba143
c8085c26c3e4bdec9246ce0ab6846d7b
Autentica no Active Directory
{ WexAuthenticateAD ad = new WexAuthenticateAD(ADResources.ADServer); bool sucesso = ad.IsAuthenticated(ADResources.ADDomain, userName, password); return sucesso; }
1
85cb4a2bace372107e9dd0606b7f4f03
dd143f27f19a53334ff0f7b0c1d3655d
某段时间的注册用户回到本月的用户
$map = array(); $map['user_registered']= array('between',array($start_date,$end_date)); $field = 'DATE_FORMAT(user_registered, "%Y-%m-%d" ) as date , COUNT(*) as Num'; $newbus = D('BigweUser')->where($map)->field($field)->group('date')->select(); return $newbus; }
0
c04f0a5aa5bc8875c765cabb048e8e5a
083bec2072a8d9a1f5114376b874a0c8
Performs compilation of a Cap'n Proto file into it's binary representation
def main(command_arguments): command_arguments = [argument.encode() for argument in command_arguments] return _protoc_compiler.run_main(command_arguments)
1
ab0bf5229f918a262063a5eed6f77d61
f10613b05f776aa6f4f72cb758c8b6df
姓(漢字)を格納するメソッド
public class User implements Serializable{ public void setMeiKana(String meiKana) { this.meiKana = meiKana; }
0
da48aac0252a8bac40c48b32bf0e430a
2f5a34117f28b7a4ac2c572b219af38e
Handle custom events, mainly flushUpdates
export class DotEditPageMainComponent implements OnInit, OnDestroy onCustomEvent($event: CustomEvent): void { if (this.customEventsHandler[$event.detail.name]) { this.customEventsHandler[$event.detail.name]($event); } }
1
8aec1e51dd3e25a2caa03b07ac524189
af5fe212838f49f28ebe439d6dd362b7
Store the displays flag indicating if a palette is used
VMValue Palette_EnablePaletteUsage(int argCount, VMValue* args, Uint32 threadID) { CHECK_ARGCOUNT(1); int usePalettes = GET_ARG(0, GetInteger); Graphics::UsePalettes = usePalettes; return NULL_VAL; }
1
42286eabab38d8e4ace03fe24b8f4dd7
7e7007c18f7900ff9c7d9179d102bb8a
Enter safe for GC state. When thread is in safe state it is allowed to execute code at the same time with the GC. Returns current state to restore later.
pub fn gc_disable() { unsafe { sys::GC_disable() } }
0
fc4df9751b5f1ae64b9bbf762c75ee2a
a370432ebd932ec3a73a1dda9f3c4b00
Ставим оценку лектору
student = Student.objects(user_id=msg.chat.id).first() bot.send_message(cfg.LECTOR_ID, msg.text) bot.send_message(msg.chat.id, "📮 Ваш вопрос принят!") student.status = "standby" student.save()
0
42cc673f7aaf7a3a691bca5bf3325505
71f0f0bb09acaadcc555a60afab4ff74
CombineTransform [GDI32.@] Combines two transformation matrices. PARAMS xformResult [O] Stores the result of combining the two matrices xform1 [I] Specifies the first matrix to apply xform2 [I] Specifies the second matrix to apply REMARKS The same matrix can be passed in for more than one of the parameters. R...
{ IntPtr proc = HalconAPI.PreCall(1638); HalconAPI.StoreS(proc, 0, sourceFile); HalconAPI.StoreS(proc, 1, destinationFile); int procResult = HalconAPI.CallProcedure(proc); HalconAPI.PostCall(proc, procResult); }
0
6b4061930df19202a555d8d9387b053f
fd82f5013f005bb0058c545ada8ad503
Get updates from friends. Calls the delgate once for each status object received.
namespace MyShelf.API.Services Task<Updates> GetFriendUpdates(string type, string filter, string maxUpdates);
0