query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
aa2760b92f2d11a429056c9638215049 | 9a840d3a159f9884b5537214c061e117 | Get the Service Group to which this Service belongs | public class RequestMsg extends BaseMsg
public String getServiceGroup() {
return this.serviceGroup;
} | 1 |
947b063b3719570f371026f10db3831e | 91aee141ca4277db658f1a888437cbcb | Pretend to do some compute intensive task | static void do_some_work (void)
{
int i;
double sum = 0;
for(i = 0; i < 1000; i++){
sum += sqrt (i);
}
} | 1 |
84c9ebba3ced586bef3f5dc2dc0f6d26 | 110835362f8061ad2572fff8ed7d2bb6 | Create batch with jobs. | class JobServiceGapicClient
public function batchCreateJobs($parent, $jobs, array $optionalArgs = [])
{
$request = new BatchCreateJobsRequest();
$requestParamHeaders = [];
$request->setParent($parent);
$request->setJobs($jobs);
$requestParamHeaders['parent'] = $parent;
... | 1 |
775c96ddad40698c21d266ffb7b2964f | df1298319b406442f54c98e3d6f6fb62 | Get the nir. | class PICGSFCrun:
def GetNi(self, time, silent='No'):
ni = self.GetField( "dni", time, silent=silent)
ni[0,:] = ni[1,:]
ni[:,0] = ni[:,1]
return ni*self.dfac['ions'] | 0 |
b743581eefbb717d7729bf4415629389 | c0d6384f3ae488dc05053ed1f768b91c | Default all i/o ports to input with pull-ups enabled | void ioinit(void) {
PADIR = 0xFFFF;
PAOUT = 0x0000;
PAIES = 0x0000;
PAIFG = 0x0000;
PBDIR = 0xFFFF;
PBOUT = 0x0000;
PBIES = 0x0000;
PBIFG = 0x0000;
PCDIR = 0xFFFF;
PCOUT = 0x0000;
PCIES = 0x0000;
PCIFG = 0x0000;
PDDIR = 0xFFFF;
PDOUT = 0x0000;
PDIES = 0x0000;
... | 0 |
28933749f194b41ee9492a8dc2e4393c | 3c217b242f24b6f70e00d8c2f00e9ef6 | Changes the wallet passphrase from 'oldpassphrase' to 'newpassphrase'.
<para>Blockchain name is inferred from BlockchainRpcOptions properties.</para> | namespace MCWrapper.RPC.Ledger.Clients
public class MultiChainRpcWalletClient : MultiChainRpcClient, IMultiChainRpcWallet
public Task<RpcResponse> WalletPassphraseAsync(string blockchainName, string id, string passphrase, int time_out) =>
TransactAsync(blockchainName, WalletAction.WalletPassphraseMethod... | 1 |
19b776e136feb5cef2b3af10c52c0b49 | 88807c39cca0850a6051c69ef9c2441f | Gets the maximum tick of all motions/keyframes in the model. | public class Motion
public int getEndTick() {
return this.endKeyFrame.getTime();
} | 0 |
67d773b87f419adc3388bedf384cf661 | 96eb5030ebe2f268d0701e327960b328 | Recherche un lecteur par son numéro | Teacher findByNumber(long number); | 0 |
8ea716239315d6df8138dd6fff88fcc7 | 723e72a9e811bf26fb21aef67fb2eb8f | 区分落地页与非落地页 图片文案都有变化 | aLi[0].getElementsByTagName('img')[0].src = arrImg[0];
aLi[0].getElementsByTagName('h3')[0].innerHTML = arrTitle[0];
$('.num .now').html(1);
$('.num .all').html(arrTitle.length);
$('#mobile_mask_title').html(arrTitle[0]);
aLi[1].getElementsByTagName('img')[0].src = arrImg[1];
aLi[1].getEleme... | 0 |
daa0076dcca7a32ed82ab9c19ecea005 | a9ca1db26bf7ab6cb1265bba870ab344 | Reset the alarm counter | class MyAlarm extends IPSModule
public function ResetAlarm(){
$this->setvalue("A_AlarmCode", 0);
} | 1 |
2d1d82a92fd29d613d84e0c27a76626e | 3d938e0b334397bebe259ca481f75607 | 刷新骑游记列表 | public class ScPurchaseCarInfoFragment extends SherlockFragment
private void refreshFollowInfoList() {
if (mFollowPlanLayout != null && followPlanAdapter != null) {
mFollowPlanLayout.removeAllViews();
for (int i = 0; i < followPlanAdapter.getCount(); i++) {
mFollowPlanLay... | 0 |
72afa7ee106e68843f69fee8e3e375ca | c5312d5e60daf7dbe65e04ea7cbbaeee | Retorna nova instância do DTO | @Service
public class OcupacaoService
public OcupacaoDTO fromModel(Ocupacao ocupacao) {
return new OcupacaoDTO(ocupacao);
} | 1 |
b6c38f0ae4885bae8679b1f9a6d6da32 | 3e257880d12339a93bf31a190a1c4b9e | 对五个特征id分别训练得到的user_id对应的emb进行concat处理,可作为模型的输入 | with tf.name_scope("user_fc"):
uid_fc_layer = tf.layers.dense(uid_embed_layer, embed_dim, name="uid_fc_layer", activation=tf.nn.relu)
gender_fc_layer = tf.layers.dense(gender_embed_layer, embed_dim, name="gender_fc_layer", activation=tf.nn.relu)
age_fc_layer = tf.layers.dense(age_embed_layer... | 1 |
b76520f68b872c50f06d7a38802eecc4 | 0ab0674bc016b36afa3f13b628da604b | Add behaviors and columns to the ignored list.
These columns will be ignored when form elements are created. | class Silva_Form extends Curry_Form
public function ignoreColumns(array $behaviorsOrColumns)
{
Silva_Array::extend($this->ignoredColumns, $behaviorsOrColumns);
return $this;
} | 1 |
9dd375d41b865b01526da471eb6a2844 | f44fc0b124f982d5635aa040517dcff8 | Set the etbl tel. | class user_tbl_UserProfile extends vvphp_basic_Table
public function set_tel($tel) {
$this->RecordSet[$this->RecNo]['tel'] = $tel;
return $this;
} | 1 |
3c2f818932b92480b4d11706072c0261 | 90642ce2803c4f628a7a07f3567739e2 | 统计字符串字母出现次数 | public class LC_767
public static void Solution(String str) {
char [] array = str.toCharArray();
int[] alphabetCount = new int[26];
for (int j = 0; j < str.length();j++) {
alphabetCount[array[j] - 'a']++;
}
System.out.println("count");
for(int i = 0; i < alpha... | 1 |
c11235467fd8d871253ac207b0a580e4 | d2d1cd0391c11d7bebcd7839eedc8fb2 | Обновить направление элемента чата. | namespace OneVK.Controls
public class ChatBubble : ContentControl
private void UpdateChatBubbleDirection()
{
VisualStateManager.GoToState(this, ChatBubbleDirection.ToString(), true);
} | 1 |
48364b21ebaaeb15c1a08f5d6cd8fa05 | 586aa4557ecd75e0971767740bb2fbd6 | Sets the cluster service. | class ClusterManagerServicer(object):
def SetMonitoringService(self, request, context):
context.set_code(grpc.StatusCode.UNIMPLEMENTED)
context.set_details("Method not implemented!")
raise NotImplementedError("Method not implemented!") | 0 |
eaee544e26e9023ce8f80e9d57920ede | 96f2f7682ed114879240f68a78ab6d98 | タイムゼロ時に通知 | public class BombTimer : MonoBehaviour
public void setNotifyZero( System.Action notifyZero )
{
notifyZero_ = notifyZero;
} | 1 |
f5bbe5018a46ed2db703335aa081f51a | 95e921629a426abb702343cb04f18cbf | 'Activates' an input, a, via the binary step activation function and returns the output.
Input -> double a
Output -> double a | float dActivation(float x) {
float output;
output = x * (1.0-x);
return output;
} | 0 |
12081779f49738bb5a31d7b6b9180ad6 | 8a2b377efc3169493ba1fb6f54d05139 | Get number of milliseconds that elapse between
the end of the knob turning and interrupt firing. | uint16_t rlib_get_int_timeout()
{
uint16_t data = 0x00;
twistre_read_register16(re, TWIST_TURN_INT_TIMEOUT, &data);
return data;
} | 1 |
bc38cc835eb8fc37d59d2ecd70a69e5a | 9b6bba5069729dbde47ef5b4b7ba71a0 | for each dataset returns the median background subtracted enhancer signal | new_data = data.copy()
if len(data.shape) == 3:
new_data = np.reshape(new_data, [data.shape[0] * data.shape[1], data.shape[2]])
idx = np.where(new_data[:, 0] != -1)[0]
median_vals = np.nanmedian(new_data[idx, :], axis = 0)
return median_vals | 1 |
eb6102df3da2b5116e5e40bc17e344cd | b414f1ab0f95e8f6d87e6eee5586d50f | 更新讀取對話時間 | public class TimeController : MonoBehaviour
void Start()
{
talk_time = PlayerPrefs.GetInt("TalkTime");
talk_time *= 60;
disp_time(talk_time);
} | 1 |
9fdff284631290f0dc515d4a2f8213c3 | 483a5a56dad536d8c0d90d6a92d559bf | Sendet eine neue Push-Benachrichtigung, dass sich ein Ziel einer Erinnerung in der Nähe befindet | namespace Oshyn.Ayudame.Core.Managers
public class PNManager
public static void SendNotifications(Arrival arrival)
{
if (arrival != null && arrival.Geolocation != null)
{
var deviceRepository = new DeviceRepository(new AyudameDbEntities());
List<Device... | 1 |
fe7dfcb675f64c5e40e8c0b64a18a5c5 | 297a3b5becfffd6f40ddf28fd40337a7 | Sets the processor interrupt flag. | {
uint8_t currentFlags = m_Memory.m_InterruptFlags;
currentFlags |= nInterruptID;
m_Memory.m_InterruptFlags = currentFlags;
} | 1 |
2d5cf1aec6d8e659a3ea2c47542f624e | b13dca7f5d01efb82df9f16460b13ba9 | This API retrieves the billable rate that will be charged for calls made. | class FunctionsRequestBuilder(BaseRequestBuilder):
def tbill_price(self) -> TbillPriceRequestBuilder:
from .tbill_price.tbill_price_request_builder import TbillPriceRequestBuilder
return TbillPriceRequestBuilder(self.request_adapter, self.path_parameters) | 0 |
6e00f5059d4f9a1acf55bdd9e609bd32 | 3fd504e835443e3614d52788e6e6c321 | Preserve the result of the compilation to disk, to speed up future
appdomain restart | {
if (appDomain.notNull() && assembly.notNull())
{
var assemblyLocation = assembly.location();
if (assemblyLocation.fileExists())
{
var targetFile = appDomain.binFolder().mapPath(assemblyLocation.fileName());
... | 1 |
09b9265651e3053b57a1b05ecce2d75b | 25e87f5a4440d6e9d2d41e5d27ac2e25 | 为前台生成配载车次号 | class CarSupeController extends Base
public function getOrderSn(){
$date = date("Ymd");
$str = array_merge(range('A', 'Z'));
shuffle($str);
$str = implode('', array_slice($str, 0, 4));
return 'TS' . $date . $str;
} | 1 |
66557cd8013292ff4747b34fccc7a83b | 49e30ed06f00947014da57afaf7a9129 | Both should be true to go inside IF loop
Both condition will be evaluated even if First cond is False | public class LogicalOperatorsAnd
public void simpleSingleAnd(){
boolean a = true;
boolean b = false;
if(a & b){
System.out.println("Hello");
}else{
System.out.println("Else");
}
} | 1 |
ec477f603b6cbbd9642754759fd9518b | b85e49ee948e6b9873dd597477ef662f | Converts all timestamps into \DateTime objects with the local timezone | {
if (! $datetimes) {
return null;
}
return array_map('static::toRfc3339DateTime', $datetimes);
} | 0 |
f15a2232ce3acc162d26b61c6b3b9b8e | 69e9dddb26bae9fc32d2daf76572fd7c | Sets the document_date of this Document. | class Document extends \Protobuf\AbstractMessage
public function setDocumentDate($value = null)
{
$this->DocumentDate = $value;
} | 1 |
f18626931edfb89f9cc5788eaee987e8 | 893fc9bbcf85fa42cdd006ae00dcb8df | Cast a py.path.local or a str or a pathlib.Path to a pathlib.Path | ctx: click.Context, param: click.Parameter, value: Any
) -> pathlib.Path:
return pathlib.Path(value) | 1 |
7b3c71fd8f938427cb8f5b1ec3fff7ff | ab3ce545430fcce48e39457b9ff8827d | ===========================================================================
Initialize the "longest match" routines for a new file | function lm_init(s) {
s.window_size = 2 * s.w_size;
zero(s.head);
s.max_lazy_match = configuration_table[s.level].max_lazy;
s.good_match = configuration_table[s.level].good_length;
s.nice_match = configuration_table[s.level].nice_length;
s.max_chain_length = configuration_table[s.level].max_chain;
s.strs... | 1 |
2615d6b0045812b0fa08d23befc29f3b | 38c0ced9d3de8ae6373ce41fcb0489da | Scans both capability strings out of the list,
stores all the properties it contains and uses the important ones to create game capabilities.
Some properties aren't used because our game doesn't support it. | {
UInt32 usagePage = element->getUsagePage();
UInt32 usage = element->getUsage();
bool store = false;
bool ret = false;
switch ( usagePage ) {
case kHIDPage_GenericDesktop:
case kHIDPage_Button:
case kHIDPage_Game:
_gameController.cap... | 1 |
dd2e4504fbd6404c771a86a61944f637 | 6497779568c56bc537e2e6035a57281a | A constant profile. | def constant_schedule(beta, t):
return beta | 1 |
555ec798827355ae25d7a0b0a938eb71 | 416a2bb38e9b7f589f45e8049b978116 | 树回调函数,点击树节点之后的操作 | function zTreeBeforeClick(treeId, treeNode) {
currentNode = treeNode;
table.draw(false);
$('.parent-select').val(treeNode.id).trigger('change');
} | 1 |
c4f6e0a87e21d340cf6a984e6df7c61c | 9b5bcd528779d611659c3f0bdde99de3 | 设置指定摊销项目的值 | public class SubAssetDepreciationDeal
public boolean setDepreciationAmt(double a_d_DepreciationAmt)
{
g_d_DepreciationAmt = a_d_DepreciationAmt;
return true;
} | 1 |
11c643fc7fc1a57ec815c25b480748bc | d5dc206eb8b342d02d1fa830d33e7455 | Gets the value of the contact property.
<p>
This accessor method returns a reference to the live list,
not a snapshot. Therefore any modification you make to the
returned list will be present inside the JAXB object.
This is why there is not a <CODE>set</CODE> method for the contact property.
<p>
For example, to add a n... | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"keywords",
"identification",
"classification",
"validTime",
"securityConstraint",
"legalConstraint",
"characteristics",
"capabilities",
"contact",
"documentation",
"history",
"member"
})
@XmlRootElem... | 1 |
1f70b966026495787d06dd6f24c4ebcf | 784a2b089f3705795d61dfd0d568af61 | Display Threat intel results. | class ThreatIntelligence:
def report(self, **kwargs):
return Report(self.tcex, **kwargs) | 0 |
235b4fd75c5e2f9d805f06abe340ed02 | 71a1fd9a37b3676f531568678b21ebc5 | 지정파일을 읽어 8kb 로 나눠서 보냄 | var myReadableStreamBuffer = new streamBuffers.ReadableStreamBuffer({
frequency: 100,
chunkSize: 32000
});
myReadableStreamBuffer.put(fs.readFileSync(filename));
myReadableStreamBuffer.put(new Buffer(3200000));
myReadableStreamBuffer.stop();
myReadableStreamBuffer.on('data', function (data) {
connecti... | 0 |
6ed51941a370dc6d76b84d446ccee340 | 8b6bc2590f61e24ca01a1c5fb8ccc640 | 由构造函数调用以绑定套接字 | class CreateSocket:
def __init__(self):
self.sockfd = socket(AF_INET,SOCK_STREAM,0)
self.sockfd.bind((bindaddr,serverport))
self.sockfd.listen(5) | 1 |
de2349d570b2b5d437f540518799ccb3 | d7a3c394c5493e6f4bbf6ae4e0996c2b | 测试把日期转换为字符串 | public void testNewDateAndToString() {
DateUtil d = new DateUtil();
System.out.println(d.toString());
System.out.println(d.toSQLString());
System.out.println(d.toOrderString());
} | 1 |
fc72882c46de10260e392baf222a4a55 | 8afa911ff7cabe039899c09668dabbe1 | This is it. This function returns keystrokes one-at-a-time, after mapping
and abbreviations have been taken into account. | dokey(code)
int code;
{
register int ekey;
register int dir;
dir = 1;
if (code > 127) {
code = code & 127;
dir = 0;
}
if (code >= 0x60) {
switch (code) {
case 0x60: l_shiftflag = dir; break;
case 0x61: r_shiftflag = dir; break;
case 0x62: lockflag = dir; break;
case 0x63: ctrlflag = dir... | 1 |
649d0c9bbd49a7d12d598a00efc3c23b | 7318a829b01ec0f5a7bfbb9c277515de | 设置字段productPrice的值,该字段的<br>
字段名称 :原保费<br>
数据类型 :varchar(20)<br>
是否主键 :false<br>
是否必填 :false<br> | public class K2ProductSkuPriceandkc
public void setProductSkuPrice(BigDecimal productSkuPrice) {
this.productSkuPrice = productSkuPrice;
} | 0 |
d2a70530b52b5c9a8bf691d96de11ba5 | 49f9d3569227a2b4b61e9667ab0f1dc5 | Retrieve summoner ID from the name. | url_name = urllib2.quote(name, safe='')
a_url = "v1.4/summoner/by-name/"
s_url = "{self_url}{api_url}{name}?api_key={api_key}".format(self_url=self.url,
api_url=a_url,
... | 1 |
b083a4aaffd0d9d85806e1bbfa7ce1a3 | 483917e01f8ffe6954ac130456d2acb3 | 隐藏浏览器自带滚动条 | function showHiddenScrollbar(gridId){
if(navigator.appVersion.indexOf('MSIE 8.0') >= 0){
$('.ui-jqgrid-bdiv', '#gbox_'+gridId).css('overflow', 'hidden').css('overflow', 'auto');
}
} | 0 |
9871d21162d3b8c70ed9f766ea99db4b | 738ed2aab475254568370967bb83ffd9 | 获取章节相关的题ID | sql = "select quesid from chapojques where chapterid=%s and banjiid=%s and teacher=%s"
cur.execute(sql,(chapter,banjiid,teacher,))
return cur.fetchall() | 1 |
96fcf214a7b5053190140e229ae77d39 | 577d5b43cec202595950de5faac3a57a | You are presented with two arrays, all containing
positive integers. One of the arrays will have one
extra number | def finder(arr1,arr2):
pass | 1 |
e3e10e3ff35979f59e5118193b1d320e | cce7b25efc119e0cd2e716f816480174 | 调用bpe算法训练bpe模型 | class BPESegmentation(DummySegmentation):
def train(datafilename, modelfilename, symbols=10000, min_frequency=2, num_workers=1):
from subword_nmt.learn_bpe import learn_bpe
with file_open(datafilename) as infile, file_open(modelfilename, 'w') as outfile:
learn_bpe(infile, outfile, symbols, m... | 1 |
e4346ad548235c82764220f72bd0db56 | 40f9316075824508229ee47eaadb11cc | Функция закрытия списка пожеланий | function closeList() {
$(".open-list").removeClass("open-list");
$(".open-button").removeClass("open-button");
} | 1 |
adce6340c42551869872ea92e8961e5b | 724b5de5fefe277e2aff3c7542ab8dd7 | 返回本集合剔除set中所有元素后的集合 | {
Set<T> newSet = new Set<T>();
foreach (T value in set.elementSet)
{
if (IsContains(value))
{
newSet.AddElement(value);
}
}
return newSet;
} | 0 |
bb609d0016639b3b74b4b89d3ecef79f | 58c899e0cbde3f1e8f8e23059b1990ae | Проставляет галочки модификаторов для хтмл из вариации | {
savingThrowAgility.UpdateCheckBoxAndLabel(refValueAgilityMod, refValueProfeciantMod);
savingThrowStrength.UpdateCheckBoxAndLabel(refValueStrengthMod, refValueProfeciantMod);
savingThrowSpirit.UpdateCheckBoxAndLabel(refValueSpiritMod, refValueProfeciantMod);
savi... | 1 |
321516e7a048d3695ee2b22b74451219 | a99d3adc33f59603b545fbba8f31330a | Operation to get diff command line options for selected utility. | protected void setupArguments(Commandline cmd) throws BuildException {
if(activities)
{
cmd.createArgument().setValue("-act");
}
if(versions)
{
if(getViewPath() == null || getViewPath().trim().length() <= 0 )
{
String msg = "ccdiff: Missing 'ViewPath' attribute. The version attribute cannot be s... | 1 |
b726b07c63e1725afe6c4229db93a33e | 80b7c4aee5cf301b96ee9596bf57ff8b | 树的前序遍历(根节点-->左节点-->右节点) | public class TreeNode
public static void preOrder(TreeNode treeNode){
if(treeNode == null){
return;
}
System.out.print(treeNode.val + " ");
preOrder(treeNode.left);
preOrder(treeNode.right);
} | 1 |
b3e5d9e884982829bba8c2329c4ec8c6 | 6d5c1d26940b2e3220db2eecbf1ffe92 | Returns a list of recent users | internal class WalletService : Service(), FFIWalletListener, LifecycleObserver inner class TariWalletServiceImpl : TariWalletService.Stub()
override fun getRecentTxUsers(maxCount: Int, error: WalletError): MutableList<User>? {
val allContacts = getContacts(error)
if (error.code != WalletErro... | 1 |
f83b60e55295393bdec85112424e8366 | 593d7b0e12883f4d991a777629895b83 | Check if cross_validation windows are sliced correctly | def test_sliding_window_transform_against_cv(n_timepoints, window_length, fh, scitype):
fh = check_fh(fh)
y = pd.Series(_make_y(0, n_timepoints))
cv = SlidingWindowSplitter(fh=fh, window_length=window_length)
xa, ya = _get_windows(cv, y)
yb, xb = _sliding_window_transform(y, window_length, fh, scity... | 1 |
4ccec20d2a6275e241a103e3f6868d3e | a15906b9c24998e662fd011b92447992 | Callback used by the generic networking code to ask us what our carrier
state is. Since we don't have a physical carrier, this is very simple | static int
p2p_getmdm(struct p2pcom *p2p, void *result)
{
softc_t *sc = IFP2SC(&p2p->p2p_if);
*(int *)result = (sc->status.link_state==STATE_UP) ? TIOCM_CAR : 0;
return 0;
} | 1 |
b09acdd35633b6f7b39cea61444a2527 | 60af28eba18bb31e2af7d0250f340f8e | 输出字段列表字符串,每个字段带双引号且字段用逗号分隔 | @SuppressWarnings({"rawtypes","unchecked","java:S3740"})
public class QueryUtil
public static String toStrColumns(List<String> fieldNames) {
return fieldNames.stream().filter(Objects::nonNull).collect(joining(", "));
} | 0 |
17faccffa4ff5d514695a306dec8c7f2 | 27d731829990e0012b00f7a6a1430da7 | Saves the national policy cost. | namespace RSA.NFOS.WPF.ViewModel
public class SavePolicyViewModelDK : SavePolicyViewModel
public override void SavePolicy()
{
try
{
this.masterTemplateViewModel.TechToBizMapper(this.masterTemplateViewModel.UITechnicalObject.GroupList, this.masterTemplateViewModel.Quot... | 0 |
eb2d6a08defcab082b639fb701e6338a | e32e86cb901e5a9db3c1357f17879f80 | Returns its argument if it is non-negative, zero if it is negative. | {
return argumentValue >= 0 ? argumentValue : -argumentValue;
} | 0 |
0abe715a2de9c5c36462e09b9d26f5a6 | 4e2b052fccac33565b0a792d994f1b19 | ограничение на ввод цены (только цифры и одна запятая) | namespace DentalManagerSys.Views
public sealed partial class EditTreatmentView : Page
private void inputTreatmentPrice_TextChanging(TextBox sender, TextBoxTextChangingEventArgs args)
{
sender.Text = new String(sender.Text.Where(char.IsDigit).ToArray());
} | 0 |
dd6150b13ff072968da70f95cb3e6bba | 1e92902da413098d94fe11927c921295 | sends command to router and returns router output | message = cmd+'\r\n'
with self.lock:
self.ser.write(message.encode())
resp = self.ser.readline().decode()
return resp | 1 |
815abc89646ca61b78a41141716a3fbd | 4d049866b3ced044a7b8cf78485c5fe5 | Returns the log pdf of a normal distribution parametrised
by mu and log_var evaluated at x. | def kde_logpdf(x, mu, sigma):
d = (x - mu) / sigma
e = -0.5 * tf.multiply(d, d)
z = tf.cast(tf.to_float(tf.shape(mu)[1]) *
tf.log(np.float32(sigma * np.sqrt(np.pi * 2.0))), tf.float32)
ret = e - z
return ret | 0 |
d6f60a21257f885b6809832810de0dc6 | b5e3d81d31cf6d3f77dd94064c60583d | The label class used by the MountDatabase is the label class
used by the databases it contains. They must all use the
same label class. | public void addLabel(String class_type); | 0 |
0148d370c59dce6637683b612c6c4380 | b7696ed3f1f8e9522027af54572ebab8 | Create a query in which nodes are ordered by their value | {
return $query->order("term_node_count " . ($order_direction < 0 ? 'DESC' : 'ASC'));
} | 1 |
64e5507b4350ef7c067895eb489e411a | 73325449b69b3f9db7e722d44cf253c1 | 判斷密碼是否輸入正確 | public class DangNhap extends javax.swing.JFrame
private boolean isPasswordCorrect(char[] input) {
boolean isCorrect = true;
char[] correctPassword = {'1', '2', '3', '4', '5', '6'};
if (input.length != correctPassword.length) {
isCorrect = false;
} else {
isCorrec... | 1 |
04c3682533bcb9f8655a6430b78766f5 | 53648727bdc1c7cc36adf253674f453e | 根据klass_id删除klass_team关系 | @Update({"UPDATE klass_team SET team_id=#{teamId} WHERE klass_id=#{klassId}"})
void setTeamIdByklassId(@Param("teamId") BigInteger teamId,@Param("klassId") BigInteger klassId); | 0 |
e3eee4878a4af001cb371d013b13eee6 | fb106c00f3e382f281135ac4c382dabf | 读取long类型时间获取种子 | Scanner sc = new Scanner(floderName).useDelimiter("\\.");
return (sc.nextLong() << 24) + (sc.nextLong() << 16)
+ (sc.nextLong() << 8) + (sc.nextLong());
} | 0 |
4ada3f4344fed8289e38d129e133212f | c404ee303877067b580efcb0e8db357b | Remove acentos de um conjunto de documentos | function removeAcentos( $pString )
{
$aMatches = array(
"A" => "/[" . chr( 194 ) . chr( 192 ) . chr( 193 ) . chr( 196 ) . chr( 195 ) . "]/",
"E" => "/[" . chr( 202 ) . chr( 200 ) . chr( 201 ) . chr( 203 ) . "]/",
"I" => "/[" . chr( 206 ) . chr( 205 ) . chr( 204 ) . chr( 207 ) . "]/",
... | 1 |
ef3ed1f8632061d20050142d7244e809 | 4e1f371463450db4dcc8ad4af9ef1d33 | Method allows to add bookmarks to other one as subtree.
Firstly parent bookmark should be found and then we try to
add other bookmarks as subtree to the parent one. | throws MojoExecutionException, MojoFailureException
{
try
{
getService().addBookmarks( createBookmarks(), Boolean.TRUE );
}
catch ( IOException e )
{
throw new MojoExecutionException( "goal failed", e );
}
catch ( InterruptedExc... | 0 |
c9e7b8491fda3ccaaefbc36cd4fa94d8 | 4b59cc248f870616df31ce37c67155c8 | Check that the common name matches the host name | void nameMismatch(X509Certificate peerCertificate, String hostName) throws CertificateException; | 1 |
3aaa8133228c8aa9150b6bd7a97da233 | 227e8ea2c65c05f1ed141850a6c1ef5b | Plots MACD object | col = list(dfti.columns)
ap = []
if ti_kw == "KD":
ap = [mpf.make_addplot(dfti[col[0]], color = 'y', panel = pid),
mpf.make_addplot(dfti[col[1]], color = 'c', panel = pid),
mpf.make_addplot(dfti[col[2]], color = 'm', panel = pid, \
... | 1 |
b01c0a2654b6befca5902fa3da346ba8 | 0e898d7d90ccb0e4e7cd28ee5d1f6714 | Starts the pipe server on a particular name. | {
this.pipeClient = new NamedPipeClientStream(serverName, PipeName, PipeDirection.InOut, PipeOptions.None);
pipeClient.Connect(ConnectionTimeout);
} | 0 |
d283c15d68004ffd75b236e141673583 | c92488c9ddbb7a8c265002a6be055b50 | 任意选一个文件,返回文件全目录 | public class MyUtils
public static File chooseDirectory() {
return chooseDirectory(null, null);
} | 0 |
5eaf6407380221bf718ba2497b27293c | 0e6c5fced1aadba2e11d23e22b9a85aa | 设置toolBar背景颜色 | public class ToolBarX implements View.OnClickListener
public ToolBarX setBackgroundColor(@ColorRes int color) {
if (mToolbar == null) return this;
Context context = mToolbar.getContext();
mToolbar.setBackgroundColor(ContextCompat.getColor(context, color));
return this;
} | 1 |
609dedfa4ba2ddb6cf1807638e54a15f | e1fdf1948546c9eb2f57629d4233d804 | 增加当前行的缩进 | public class Dumper
private void indent(){
numIndent++;
} | 1 |
ba636ff8ee14ab7337eabd4a9171df23 | 16934c7ccdc2436a788c9fe096d9a8fc | if there is enough scores for next difficulty then we increase it | function difficulty() {
if(currentScore % 1000 == 0) {
if(dy > 0)
dy += 1;
else
dy -= 1;
}
} | 0 |
f26b593d400c0c2763c978cd61f4bb3a | fc53153566b574bced861b52c0847492 | UART1 byte received interrupt handler | void USART1_IRQHandler(void)
{
uint8_t value = (uint8_t)(huartx->Instance->DR & (uint8_t)0x00FF);
RINGS_write(value, uartRing);
HAL_UART_IRQHandler(&huart1);
} | 1 |
44c09771548494e45179724f60391f66 | 694e1d6d3d8c89d3f935eb8fbcfe4842 | Converts a jOOQ POJO announcement into the announcement class defined in the API package. | @JSON(strict = true)
@ProviderType
public class AnnouncementModelImpl extends BaseModelImpl<Announcement>
implements AnnouncementModel
public static List<Announcement> toModels(AnnouncementSoap[] soapModels) {
if (soapModels == null) {
return null;
}
List<Announcement> models = new ArrayList<Announcement>(soa... | 0 |
cd487d3313ddb86a6d2a3dc597ddd0c9 | 6f557116521abb62ca006798d77df2e6 | The network on which to allocate the
Loadbalancer's address. A tenant can only create Loadbalancers on networks
authorized by policy (e.g. networks that belong to them or networks that
are shared). Changing this creates a new loadbalancer.
It is available only for Octavia. | class GetApplicationLoadBalancersBalancerResult(dict):
def network_type(self) -> str:
return pulumi.get(self, "network_type") | 0 |
5e3be1ff4b1ec0cb1af91438f9cfec28 | 2aaaef7b35592c6288c3546f3f1d1546 | 获取波浪垂直振幅比率 | def get_rate(params,p=2,hp=10,lp=150, fig=None):
from . import cwt_utils
params = smooth_and_interp.smooth(params, hp)
params -= smooth_and_interp.smooth(params, lp)
wavelet_matrix, scales, freqs = cwt_utils.cwt_analysis(params, mother_name="Morlet", \
... | 0 |
916e811aafc61219e4c89a0e13c4d957 | a53e3ed8f6eb8e05508b1c483336a1e0 | Gets a value indicating whether it is safe to start specializing the host instance (e.g. file system is ready, etc.) | namespace Infragistics
bool CanStart(); | 1 |
c9e08a80d1eb14adc1e181c351448a9a | 05899398f93d4a55ac79f9837e32022f | 获取一条有效地且在时间范围内的记录 | public abstract MemoryUseRecord getRecordAt(long time); | 0 |
fd647f37a007dcde705d01039ddf31ac | 0e0241014efd27b6291a7963bd133cdd | 从jks密钥库容器中的密钥对中读取证书公钥 | public class SignatureUtils
private static PublicKey readPublicKey(String certPath) throws CertificateException, IOException {
File file = new File(certPath);
InputStream is = null;
if (file.exists()) {
is = new FileInputStream(certPath);
} else {
Class<? extends Signature> clz = Signature.class;
Class... | 0 |
60dab59a2ee7f7673b0b0d9a254e6a87 | dda51b634e0fc5485f30d3cb1ba2c405 | Uploads the specified Attachment for the specified Requirement Specification | namespace SimpleJira.Interface
public static class JiraExtensions
public static JiraAttachment UploadAttachment(this IJira jira, JiraIssueReference issueReference,
string fileName, byte[] bytes)
{
return jira.UploadAttachmentAsync(issueReference, fileName, bytes, CancellationToken.No... | 1 |
d8b238bbdf3f55ec9f9eb0d7f52446ba | 9a7c24f0553d6a88383b240eda849088 | Get the [guar_first_name] column value. | class PersonalProfile extends Model
public function getFirstName()
{
return $this->__get(self::FIRST_NAME);
} | 0 |
8502364ce9f982b0382932ef1412e73c | 5ea54e849e7c481c078b0d540e6d6797 | Constructs a 3-component natural dimension | impl<T, U> Size3D<T, U>
pub const fn new(width: T, height: T, depth: T) -> Self {
Size3D {
width,
height,
depth,
_unit: PhantomData,
}
} | 1 |
f0737568fb8e7e879de54795971b5b31 | 74688170adf4bb7655833aba169555f4 | Sets the global mob level to make the buffed attack range of the enemy HQ
traversable. | int value = RobotPlayer.rc.readBroadcast(Channels.MOB_LEVEL);
int value2 = (value | enemyHQBaseRangeBitMask);
if(value != value2) {
RobotPlayer.rc.broadcast(Channels.MOB_LEVEL,value2);
}
} | 1 |
5481696aa8cb7f15744dba2756037c01 | 1a043372c192b03a42729d4929ddb572 | The Schematic Layers resource represents all the schematic layers
under a schematic service published by ArcGIS Server. It is returned
as an array of Schematic Layer resources by the REST API. | class GeoServerSpatialDatasetEngine(SpatialDatasetEngine):
def list_layers(self, with_properties=False, debug=False):
catalog = self._get_geoserver_catalog_object()
layer_objects = catalog.get_layers()
return self._handle_list(layer_objects, with_properties, debug) | 0 |
08e5ee62146a1bf8067dc10357f7eb50 | 13874780fb9f62b4bb3afea91a670b5e | Gets ith "magneticStrength" element | double getMagneticStrengthArray(int i); | 1 |
1e5dc294fc31a1d4ad2f922348eec41e | da960d4b4493b35abce2713b6984c0fa | Get the PGOffline agent payment data | $this->data['button_confirm'] = $this->language->get('button_confirm');
$order_id = $this->session->data['order_id'];
$this->load->model('checkout/order');
$order= $this->model_checkout_order->getOrder($order_id);
$AgentID=$this->config->get('paysonagent_agent_id');
$Key=$this->config->get('paysonagent_md5_... | 0 |
27ed4426c9d68ab2964fcb5d210ea1b1 | 28937aec99c5b0bf48b789f7969c72b2 | Wrapper that handles well-known errors. | def HandleHttpError(func):
return http_error_handler.HandleHttpErrors(HandleKnownHttpError(func)) | 1 |
b0e97f86c9696239fd05703c021eff6f | cbac06bde6cc373741094dc51155331b | Tests implemented algorithms against the brute force algorithm to ensure correct
implementation. | def verify_exact_algorithms(graph_type, max_value, print_results=False):
exact_algs = [tsp_brute_iterative, tsp_brute_recur, tsp_dynamic]
if graph_type == "circular":
exact_algs.append(tsp_greedy)
num_algs = len(exact_algs)
results = [0] * num_algs
max_func_name_len = max([len(x.__name__) fo... | 1 |
3afb3dbc486ba394558770fbf2e0495e | 4c0faf779d6477a2d88b3f061648d656 | Edit the author with the Id passed | public ActionResult Edit(int id = 0)
{
Author author = db.author.Find(id);
if (author == null)
{
return HttpNotFound();
}
return View(author);
} | 1 |
6f734e5ca31a3582eefc8a656063f056 | 0b2e75e27af3cca790af8a3a128d6cac | Compute the internet checksum of the segment given as argument.
Consult lecture 3 for details.
Our bTCP implementation always has an even number of bytes in a segment.
Remember that, when computing the checksum value before *sending* the
segment, the checksum field in the header should be set to 0x0000, and
then the re... | class Firewall:
def compute_Checksum(self, pkt, pkt_type=None):
skip = 10
checksum = 0
ran = range(0,20)
if pkt_type == "TCP":
ran = range (12, 40)
checksum = 26
skip = 36
for i in ran:
if i != skip and i % 2 != 1:
c... | 1 |
1f4ad3c4f3b93506ff56b09a613f290b | fdcac7cc73036579bbbf3df592af62d3 | 返回微秒级日期 如2017/03/01 14:00:16 345541 | public class DateUtils extends org.apache.commons.lang3.time.DateUtils{
public static String getMillisecond() {
return getDate("yyyy-MM-dd_HH:mm:ss_SSS");
} | 0 |
e4e198d8a3b8cc1f19802120abfd7758 | c263173d68a177d8bb1d83ad4f9c57c0 | Get last block from Minter Node API | function getLastBlock(address, context, asyncCallback) {
emarket.db.contracts.select(address, function(result) {
context.height = emarket.defaults.startBlock;
if(result.result == 'ok' && result.item) context.height = result.item.height;
asyncCallback(null, context);
return;
});
} | 0 |
36a77a6f9cd6fab1fa375b801ae5defe | 6eac544758e0f20325993cafb1fe7a27 | 构造函数,接收udi和pagination两参数 | class Pagination
public function __construct($db, $limitPerPage)
{
$this->setDB($db);
$this->_limitPerPage = $limitPerPage;
} | 0 |
56d5cc95ad9a18793ed600639ddeb1db | 5876043c20400c01f038626dfdc753a2 | Replace an existing container label. | namespace DotNet.Testcontainers.Containers.Builders
ITestcontainersBuilder<TDockerContainer> WithLabel(string name, string value); | 0 |
5dca489a1a43bf472e9a113cd7fa9418 | e48665418e04d64cdb99d16476469441 | Funcion donde se obtienen los campos obligatorios para
el diligenciamiento de la justificacion no pos | public class Componente
public List<String> getObrigatorias(){
return this.compObrigatorias.stream().collect(Collectors.toList());
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.