query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
3f5f2c16ed642cc0c865afa6ffb8a3cc | a6e014e53f1b8d7bc6859ed5925327a4 | 续签申请 | @ResponseBody
@RequestMapping(value = "/postReApply")
public JsonResult reApply(@RequestParam("number") Integer number,@RequestParam("id") Integer id,@RequestParam("totalPrice") Double total,HttpSession session){
JsonResult jsonResult = new JsonResult();
String openid = session.getAttribute(... | 1 |
cd8d6eac6cf93b51a57fd7bba15bcfad | bb93b2afa1569dc487450cd066e6f3d6 | Removes an element from this document. | namespace Couchbase.Core
IOperationResult Remove<T>(IDocument<T> document, ReplicateTo replicateTo); | 1 |
3d12ff71d229240cd64068881d5ca602 | 3c08849007bab6c9d8407a90cc1e9fd0 | Disables sorting buttons during sorting to restrict use of another sorting algorithm in between | document.querySelector(".bubsort").disabled = true;
document.querySelector(".insertionsort").disabled = true;
document.querySelector(".mergesort").disabled = true;
document.querySelector(".quicksort").disabled = true;
document.querySelector(".selectionsort").disabled = true;
} | 1 |
dbbc260bdf72102a1fd8f0afe2ac1dcf | 2cb4d0da65e8756e8041e1a2dcf33bf1 | Function used to create recurring bookings. | try:
booking = models.Booking(
airplane=airplane,
start=start,
finish=finish,
reservationType=reservation_type,
instructor=instructor,
comments="",
status=status)
booking.save(... | 0 |
9a8283001939a5244d7c47b94678577b | 57a15d9916135b9a7aeb62ff7144058a | Modifica los atributos de un objeto Tipo_docuemnto ya existente en base de datos.
Puede recibir NullPointerException desde los métodos del Dao | @Stateless
@Dependent
public class TipoProductoBean implements Serializable
public void editarTipoProducto(TipoProducto tipoDocumento) {
entityManager.merge(tipoDocumento);
} | 1 |
559a3be03ad3bdfc20bd24f80d2acbef | 5ce3496f3ef2b0e1efb80ffe03d8c001 | Returns the meta object for the attribute '{@link IOTApplication.Person#getGender <em>Gender</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "personDetails", propOrder = {
"gender",
"maritalStatus",
"title",
"middleName",
"lastName",
"surnameatBirth",
"mothersMaidenName",
"fathersName",
"dateOfBirth",
"educationLevels",
"numberOfDependents",
"residencyStatu... | 0 |
393d500bd5c85b15ef4b5fa5a4e7f699 | e96ada426e75d5a3793a8c20ec637a8c | Returns the weights along with the the soure and destination pairs | class graph(object):
def get_edge_weights(self):
edge_list = []
unique_list = {}
for u in self.nodes():
for v in self.neighbors(u):
if not unique_list.get(v) or u not in unique_list.get(v):
edge_list.append((self.node_neighbors[u][v], (u, v)))
... | 1 |
56587a27fff2e05219d46ff276361a43 | c65e2ef79a822ffbdbd1b56caea96e59 | 先创建socket,绑定本地地址,然后开始监听 | int main(int argc, char **argv)
{
if ((sockfd = socket(AF_INET,SOCK_STREAM,0))<0)
{
perror("socket");
exit(1);
}
else
{
printf("socket created success.\n");
}
struct sockaddr_in addr;
bzero(&addr,sizeof(addr));
addr.sin_family = AF_INET;
addr.sin_ad... | 1 |
789fae7fb54999808b6d4c4d2f467ddb | 7d8e5c2ec69a4c65958cd1bd2f1d347a | start the dressing activity | class AdminDressingController extends AdminController
public function getCreate()
{
$title = Lang::get('admin/dressing/title.create_a_new_dressing');
return View::make('admin/dressing/create_edit', compact('title'));
} | 0 |
cd72c7c63493706957bf1ab9f374a569 | 3e24718ec8d1faa3fea78b348297c41a | Same as vanilla bow, except it can be fired without arrows with infinity. | public void onPlayerStoppedUsing(ItemStack stack, World worldIn, LivingEntity entityLiving, int timeLeft) {
if (entityLiving instanceof PlayerEntity) {
PlayerEntity playerentity = (PlayerEntity)entityLiving;
boolean flag = playerentity.abilities.isCreativeMode || EnchantmentHelper.ge... | 1 |
010eb701d5d46e093b52ab48886441b7 | 44e65fbfc6c6aebaa105dbe3198b1a0a | Calculate the power in the given frequency band using the Lomb-Scargle
periodogram. | f_max = 1 / p_min
f0 = 1 / p_max
n_data = 4 * 365 * 48
n_freqs = oversampling * n_data
df = f_max / n_freqs
freqs = f0 + df * np.arange(n_freqs)
model = LombScargleFast()
model.fit(self.l_curve.times, self.l_curve.fluxes,
self.l_curve.flu... | 1 |
071cc4f71ba7005e84932616b31a2bc9 | 76e5a28a994a7d12b342dbc00d6f0ade | 根据月份英文缩写获取数字月份 | func GetMonthNum(monthEn string) int {
switch monthEn {
case "January":
return 1
case "February":
return 2
case "March":
return 3
case "April":
return 4
case "May":
return 5
case "June":
return 6
case "July":
return 7
case "August":
return 8
case "September":
return 9
case "October":
retu... | 0 |
6ef9892f2bf81a0d2162d617fd957abc | e005822d632f682add3429b4793af170 | Construct resumptionToken from parameters for query | def makeResumptionToken(pars, nextOffset):
toEncode = pars.copy()
toEncode["nextOffset"] = str(nextOffset)
toEncode["queryDate"] = time.time()
return urllib.urlencode(toEncode).encode("zlib").encode("hex"
).replace("\n", "") | 1 |
cc9b7a187a23c0b75da3ef45968d2a6e | 3d5f130996bdf04d680b91af2ae29cca | Power up the IC. | {
uint32_t i;
for (i = 0; i < (RST_WAIT_TIME * (iso7816_gs_frequency / 1000000)); i++) {
}
iso7816_icc_power_on();
} | 1 |
a1c631bf7f7bb52647fd3289c5278157 | b630a27b667488ff2e6da5efa5425c6f | 根据RoleId查询Claims | [Authorize(Policy = Permissions.RoleClaims.View)]
public async Task<IActionResult> GetAllClaimsAsync()
{
var response = await _roleClaimService.GetAllAsync();
return Ok(response);
} | 0 |
b419d1483a5c1d5457c27df5e4e0cf2e | a86c3f75275fc5cfae907ed5039d4b73 | 默认订单详情查询(最新订单) | class Order
public function order_query($orderCode)
{
$orderRequest = [
'order' => [
'orderCode' => $orderCode
]
];
$arr = $this->getPostParam("QUERY_ORDER_NEW_REQ", $orderRequest);
$result = $this->curlPost($this->config['url'], $arr);
... | 0 |
d332620c46c6268cb4c5f10b3fb1dfec | 46e980a710aa95231a528818e7d8deb0 | Call API to get resources by SPARQL | try:
response = self.knowledge_graph.query(sparql_query=sparql_query)
if isinstance(response, list):
if len(response) == 0:
result = ""
else:
result = []
for x in response:
... | 1 |
52d7b4079fabd2eb26a2b086d98d1c61 | 6504a31d99caaf3f37a9d1d6f1561655 | 如果是可以展开返回true,如果是不可展开返回false | if (parentData == null) {
return false;
}
return parentData.isbExpand();
} | 1 |
f9de3ed21343bb8c456aafcc1430e12d | 28215b63bcf864167f922a85415a0cbe | 媒资标题,长度不超过128个字节,UTF-8编码。 | public class InsightHeroDTO
public String getArticleImageTitle() {
return articleImageTitle;
} | 0 |
c80b84c582cdfcaafd6e7c33748e0852 | 18c454bec77e7e745cd181a7872a1a22 | 生成YUV420P格式的灰阶测试图
Generate YUV420P gray scale bar. | FILE *fp_output = NULL;
unsigned char tmp_y;
unsigned char inc_y = (float)(ymax - ymin)/(barnum - 1);
int boreder_width = width/barnum;
int uv_width = width/2;
int uv_height = height/2;
int i=0, j=0, t=0;
unsigned char *y_data = (unsigned char *)malloc(width*height);
unsigned char *u... | 1 |
8a654c04347481827cf37ed07785ed69 | 6e18ef18ccaeea0e9f3df217e1e62313 | Set handlers for label position based on link position (label's
position is based on link's position) | if(labelPosition_ != labp) {
labelPosition_ = labp;
modified("Axis: setLabelPosition()");
}
} | 0 |
1779b67c79d5d032608f94d2bef4295d | 1c0196b915ef90d01ac555313fcd356a | 摇晃重置游戏 | {
this.x += this.shakeNum * 2;
this.y -= this.shakeNum * 2;
this.shakeNum = - this.shakeNum;
} | 0 |
67374d0c2f49d58edffbf7c991eb30d2 | 9cd16cb62958a9e9e878de4daee5aba0 | Get the nb attest emploi a deduire. | class Compteur
public function getNbBulValidesADeduire() {
return $this->nbBulValidesADeduire;
} | 0 |
67dab42588c67b950e4b51bd703b2bdc | b3fb07bdc6d5d541f18fc19aec0c911e | Get selected categories array | class MidcatTable extends Report\ReportTable
public function getCatSelect() {
if( !$this->atc ) {
$this->initCats();
}
return $this->ata;
} | 1 |
bd1cd63b17c33868d90167edf2b23ee3 | e15e3ac3f11b215f6072dd978ebbe2e0 | Initialize the password field names structure. | {
return array(
'oldPassword' => UserModule::t("Old password"),
'password' => UserModule::t("Password"),
'verifyPassword' => UserModule::t("Retype password"),
);
} | 1 |
a07058f08cbcd142c16fe1a726420f53 | 48b77c816301f959e0333f07dd845af2 | @brief 停止ボタンの押下状態を返す | {
if (iState != BTN_STATE_NORMAL)
return true;
return false;
} | 0 |
1499c1c6836c7ce471388a50e7adf4b6 | 982d95aa55ae20befa15662a931f2902 | recursive helper function to traverse BSTree for input to an array | {
if(root!=NULL)
{
inorder_array(root->left, seq_tree);
seq_tree.push_back(root);
inorder_array(root->right, seq_tree);
}
} | 1 |
8c0f64c68a9444d1d94ee7609368fdf8 | d909f6cedab7f24c864cc6bfedbfb1da | 刷新方案进度 | function XDynamicDailyTask:UpdateProgress(data)
self.Data = data
local config = XDataCenter.TaskManager.GetTaskTemplate(data.Id)
if #config.Condition < 2 then
self.ImgProgress.transform.parent.gameObject:SetActive(true)
self.TxtTaskNumQian.gameObject:SetActive(true)
local result = co... | 1 |
6c6235e9aec9b5812a7dedc082d95274 | 4e1bf331ef1ef2e8ec32e258cbdf77e2 | Orient an object to point to magnetic north | def orient_turtle(turtle, impact_pos):
turtle.setheading(0)
turtle.left(turtle.towards(impact_pos)) | 0 |
15e4d221692847210e17d1930dcdc8c3 | ffc5f950ee866e1518f82f579aac5ce4 | Causes the new information displayed in a wizard to be presented
to the user. | @Singleton
public class NewProjectWizardPresenter implements WizardDialog, Wizard.UpdateDelegate, ProjectWizardView.ActionDelegate
@Override
public void show() {
wizardContext.clear();
wizardContext.putData(ProjectWizard.PROJECT_VISIBILITY, true);
showFirstPage();
} | 1 |
40281ff80e5911940715a95cbc79c995 | 13133cd3b320364018ff09e8b36346fd | 从数据库里载入某个节点 | static BDBNODE *tcbdbnodeload(TCBDB *bdb, uint64_t id){
assert(bdb && id > BDBNODEIDBASE);
bool clk = BDBLOCKCACHE(bdb);
int rsiz;
BDBNODE *node = (BDBNODE *)tcmapget3(bdb->nodec, &id, sizeof(id), &rsiz);
if(node){
if(clk) BDBUNLOCKCACHE(bdb);
return node;
}
if(clk) BDBUNLOCKCACHE(bdb);
TCDODEBU... | 1 |
a7899c414cdd9f39c2299ed2d78bb952 | 941700610aaf141921121789971db2c5 | Performs calculation of prefix expression | public class PrefixExpressions implements IPrefixExpressionsADT
public double evaluatePrefix()
{
char ch = strExp.charAt(0);
strExp = strExp.substring(1);
int chNum = Character.getNumericValue(ch);
if(chNum >= 10 && chNum <= 35)
{
return chNum;
}
else
{
double operand1 = evaluatePrefix();
dou... | 1 |
d631a6e8c12559fe949dc7b57cc4934c | 59c615c9c957b0f58f16151d746141a1 | Gets the input and output arguments for the libsvt-av1 FFMPEG-encoder | def get_svtav1_args(input_args, output_args, x):
return input_args, output_args, False | 1 |
08d26931a51a5bdd06e05acfdc1f0936 | 0ed9eb171edd4f2ad75303bfcd8df667 | # Look up the Reactivation rate | r=c("2004-01-01"=0.015,
"2005-01-01"=0.020,
"2006-01-01"=0.018,
"2007-01-01"=0.018,
"2008-01-01"=0.011,
"2008-09-01"=0.0191,
"2009-04-01"=0.010,
"2010-04-01"=0.009,
"2011-04-01"=0.021,
"2012-04-01"=0.021,
"2013-04-01"=0.013
)
ifelse(
day(date)!=1,
... | 1 |
ab668f17ef6b875f2a92c86fb5604e6d | b547fdc928f2a2cc64b8c6b40d8bb702 | 根据ServerID删除传送门 | def delete(request):
server = get_server_by_request(request)
data = dict(request.POST.items())
data["severId"] = server.id
data_urlencode = urllib.urlencode(data)
url = "%s/gmapi/send/delete/?" % server.gm_url
url_get = url + data_urlencode
req = urllib2.Request(url_get)
response = urlli... | 1 |
2461dcb907543730877b77663a2e3856 | b3b86dfade63eec46e632e19467e997a | 最後に受信した周辺情報を取得する。 | namespace OtenkiBotCore.Logic
public class WeatherForecastLogic
public ForecastAreaRelationship GetTargetArea(string mention)
{
using (var context = new OtenkiBotDbContext())
{
var t = from f in context.ForecastAreaRelationships
join c in conte... | 0 |
70457a9a7ceb4990a0ce2d64e6dc17c9 | c7d5a5cd9beafe8f9f1f99245be22211 | 初始化日期控件初始值,默认范围一个月 | function initDate() {
var currentTime = new Date();
var year = currentTime.getFullYear();
var month = currentTime.getMonth() + 1;
var start = year + "/" + month + "/01";
$("#start_date").val(start);
var end = "";
if (month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12... | 1 |
b1b4261f4622bc36b43a9ef57ece8135 | 2e660f1aff32f5714e5522f506e583ef | Gets swap_id | {
if (isset($this->sourceable_type, $this->sourceable_id)) {
return (string) (in_array('App\Libraries\Traits\Entity\Swap\Identity', class_uses($this->sourceable_type)) ? app($this->sourceable_type)->asPrimaryTid($this->sourceable_id) : $this->sourceable_id);
}
return null;
} | 1 |
478ea80a225b1d8feba4e2ec1309a8d9 | dc796adde88142be91e9613b0cdcf524 | 返回驱动的函数 | class DriverFactory:
def get_driver(self):
return self.driver | 1 |
3c52e3b4e572333e9502fe8bcfff4c1d | 9e6fecfebab6b593595e1a9ed70de368 | Updates the maximal number of parallel iteration threads. | expect class Options() : RocksObject
fun setIncreaseParallelism(totalThreads: Int): Options | 1 |
c6549bdd06d66b216d3bfc6b535199ef | d65e63d7eb1d956550bf6b9e6203c191 | Regola gli interpreti per il Db.
<p/>
Crea e assegna al Db le istanze delle classi che dovranno
trasformare gli oggetti in comandi Sql.<br>
Sovrascrive il metodo della superclasse. | public final class DbSqlPostgres extends DbSqlBase
protected void regolaInterpreti() {
super.regolaInterpreti();
this.setInterpreteStruct(new InterpreteStructPostgres(this));
} | 1 |
4d37a0550c683f35efa82c91c68264cd | ebbc907d7e9f6558d366e9ea71d69efe | u"""验证不可设置开始地址大于结束地址(testlink_ID:2463) | payload = {'eid':'','name':'',"limit1":'','status':'','address':'','start_time':''}
r = requests.post(self.base_url,data=payload)
self.result = r.json()
print(self.result)
self.assertEqual(self.result['status'],10021)
self.assertEqual(self.result['message'],'parameter err... | 0 |
25badb277c8232a33c992a15de53754b | 28b5c985ed9a32601d12fa1518ac0126 | Sets the value of the '{@link tfsm_plaink3Trace.States.tfsm_plaink3.TracedTFSM#getOriginalObject <em>Original Object</em>}' reference.
<!-- begin-user-doc -->
<!-- end-user-doc --> | void setOriginObject(Objectable originObject); | 1 |
c0ed99710ba0443c59cf8e918d911ca3 | 260933aecf25d2c92210d781180f1da7 | 괄호 점수를 구하는 method | count = 0
for i in range(len(p)) :
if p[i] == '(' :
count += 1
else :
count -= 1
if count == 0 :
return i | 0 |
e42455e95c5a452107dfad647e6b97b1 | 70dd04368e941ca6a1ce45a9fe63a346 | make temp dir if it does not exist; | function makeTempDir() {
global $SETTINGS;
$tempdir = tempnam($SETTINGS["spin_tmp_dir"],'spinfolder_');
if (file_exists($tempdir)) { unlink($tempdir); }
mkdir($tempdir);
return $tempdir;
} | 0 |
f2ecae96b4e14d3c292d056b9b6d4dea | 184a469a48e5ab396382b98b5f3fbc94 | 获取本机安装的net版本清单 | rRet = public.ExecShell("%windir%\\Microsoft.NET\\Framework\\v2.0.50727\\aspnet_regiis.exe -lv")
tmps = re.findall("v[1-9]\\d*.[0-9]\\d*",rRet[0])
data = []
for item in tmps:
item = item.replace('v','')
if not item in data: data.append(item)
if len(data) =... | 1 |
02580645e8764da9fcad3f7637d0ab8d | e1529253fe461911dd8bbc6a7ba2e383 | Tests the case when there's a <ui:decorate> with a template that wants to
insert a property defined by the <ui:decorate>, but the property was not
defined. In this case the default value (= body of <ui:insert>) must be rendered. | public class TestJspTagLifecycle extends JspTestCase
public void endOutTagDefaultBodyIgnored(WebResponse theResponse)
{
String output = theResponse.getText();
assertEquals("Value", output);
} | 0 |
51f23db90b9d584396e352bd3c12dee0 | 0241c8e0ef1612368a6d1945c52ae8da | Specify filename for the shapefile to read. | super();
this.type = JSONKnownTypes.shapefileFeatureSource;
this._filePath = filePath || '';
if (name !== undefined) {
this.name = name;
} else if (filePath != undefined) {
this.name = ShapefileFeatureSource._filename(filePath);
}
this.flag... | 1 |
c35d59dd8936b6c56ebef2586daa7a42 | 56cc18eb642c244f8abf1c189d2ba47e | return all handles that are set to force load | class Manager
public function getHandles()
{
return array_keys($this->handles);
} | 0 |
705d98189fd722794b0e89aab70e351e | f706de7ce26dea385ca0cc3149b44cdf | Обчислює список студентів, що отримають спипендію. | {
$auth = \Yii::$app->user->identity;
$students = (new \yii\db\Query())
->select(['name' => 's.name'])
->from(['s' => Student::tableName()])
->innerJoin(['i' => Invoicestud::tableName()], 'i.calc_studname=s.id')
->innerJoin(['gt' => self::tableName()]... | 0 |
4cdf3af64d20f7dde0da921684763715 | a9bba4810881cbc765022a440abdec78 | Helper function that creates input layer of the neural network. | input_size = int(input_layer.get_shape()[1])
W = init_weights([input_size,size])
b = init_bias([size])
return tf.matmul(input_layer,W) + b | 0 |
36c603e59e9235b2b5f77380171bee9d | efe7779001281a9e206bb2f6ee94074d | Returns words and vector matrix from a dictionary. | dictionary_size = get_file_lines(dictionary)
file_lines = get_file_lines(filename)
d = 0
matrix = np.zeros((file_lines, dictionary_size))
did = np.zeros(file_lines)
with open(filename, "r") as fh:
for line in fh:
tokens = line.split()
if len(tokens) > 0:
... | 1 |
b46bcc9b68b7cce53c3763013ebc50dc | bf6a9f6c3831b887dbbd0ebc0d81910b | Updates a RRD file with the given samples. This implements the
rrdupdate_ command. | logging.info('%s', metrics_url)
request = urllib2.Request(metrics_url)
try:
with open(rrdfile, 'w+') as f:
f.write(urllib2.urlopen(request).read())
rrdutils.gen_graph(rrdfile, rrdutils.RRDTOOL,
show_mem_limit=False)
except urllib2.HTTPError as err:
... | 0 |
2ef23af8770bd6b703eaadc38ac2fb17 | 4315c9456456454975922e5066da7df1 | [ja]ページコンポーネントのクラスを指定します。[/ja] | @NotNull
String getPageComponentPath(); | 0 |
96f1044e7f3f39be394ae31c6edd4d7d | 21703026bd00e6f41d97cdf75b6a0373 | Test of finding reserved rooms at specific time | {
$rooms = DB::select("SELECT *
FROM rooms
WHERE roomid NOT IN(
SELECT DISTINCT roomid
FROM reservations
WHERE checkindate <= '2018-04-06' AND checkoutdate >='2018-04-07' and res... | 1 |
c52f5a154ed9512fc290ebac41cae2cf | fab67b27060132046f6c9e2976d0c6d9 | 判断信令是否需要处理 | {
if (calling == null)
{
#warning 测试用,告警消除时,由于告警下发延时了,导致Calling销毁才收到告警,暂时返回true
return true;
}
if (!(ModelManager.Instance.Context.SystemUser is IDispatcher))
{
#warning 测试管理端,暂时返回true(管理端没有创建调度服务,通话信息将无法下发)
return true;... | 1 |
aa9f3ab0cce49735cb9617248aee9656 | 7a0eabd638a4fa00ea3345c8ab5a7ad2 | Sets the html-element to use on highlighted words
<para>Defaults to "mark"</para>
<para>Set to null to disable</para> | public class Tree extends AbstractPubNodeContainer<Tree, Leaf, Leaf>
implements Scrollable<Tree>, HiddenContainer<Tree>, HtmlContentHolder<Tree>, LazyLoad<Tree>
public Tree setHighlight(Highlight highlight) {
this.highlight = highlight;
return this;
} | 0 |
b3e8267ba22765b2dac1ddb8768a022f | 0daebc80a22b34960f12c4604ac6f1af | Configures the application representative | class CampaignGetItem extends CampaignBase
public function setRepresentedBy(CampaignAssistant $value = null)
{
$this->RepresentedBy = $value;
return $this;
} | 1 |
abc9724e3817feddce39a9f7660ce55b | 31d96156c5baaed94c48b019adc5d3a1 | 生成编码(保证每次生成的不会重复) | $this->code = "";
$len = strlen($this->charset) - 1;
for($i=0;$i<$this->codelen;$i++) {
$this->code .= $this->charset[ mt_rand(0,$len) ];
}
return $this->code;
} | 0 |
d536f6407c92c3f87dc520fb61ef1d1d | 1953d705b618109a9b29ed92d077f711 | Sets the id of the parent Component | class Component
def parent=(parent)
@parent = parent
end | 0 |
a96719607bba7de6a97b3f4d25c18dec | 8d1d7e15794fd307add31ed63a26cd61 | Gibt den Memcache zur Verwaltung des Storages zurück | if (null === $this->_storage) {
$bootstrap = Front::getInstance()->getParam('bootstrap');
$this->_storage = $bootstrap->getResource('Cachemanager')->getCache('file');
}
return $this->_storage;
} | 0 |
a1211a18d345751482cd8ae2f48e75da | ffa4c6011314bce5da2f71b41cf07655 | Final check; nothing. | void cms_sus_13_012::Finalize(const SampleFormat& summary, const std::vector<SampleFormat>& files)
{
cout << "BEGIN Finalization" << endl;
cout << "not really doing anything"<<endl;
cout << "END Finalization" << endl;
return;
} | 1 |
d43caa7c0e7629fc8bd4a5526ea25ce9 | 620e0a51af088bee8e19dbe43163caf6 | Creates a new deposite address for the specified currency. | query = {
'currency': currency
}
return self._request('post', 'deposits/generate_coin_address', query=query) | 1 |
c7a2c928eb681e1c689537257d965e84 | e4b7bc7f5e3665dfc2470fa2b82b2f94 | 更新矿池释放信息 | export class DZPKSceneView extends ui.game_dzpk.DZPKSceneUI{
public updateTablePool(pot){
this.box_dichi.visible = true;
this.txt_dichi.text = CFun.formatCurrency(pot);
} | 0 |
4071c34192db0e24572d9edd7081fede | 726de1fc24d4eeeebc8a41e138d8ab35 | Prints the items in a given list of integers. | void print_int_list(int list[], int length){
for(int i = 0; i < length; i++){
cout << *(list+i) << " ";
}
cout << endl;
} | 1 |
57504558530d5f68cc78fd102e694d74 | 370123efd237bc3cea1bb9aa88d4f143 | Injects Geocoder related services in the application. | function CartographicGeocoderService() {} | 0 |
39048d2ed8eafae9bb08cebe67142664 | 32b573a8316af69a4a01c4257a8edb9f | Get users of a concert | {
$db = Zend_Registry::get('db');
$data = array($idCampaign);
$where = '';
if ($isIndividual !== false)
{
$where = 'AND cg.isIndividual = ?';
$data[] = $isIndividual;
}
$sql ='
SELECT
*
FROM
... | 1 |
9de2079724b8be8e7cd433da21ff59fe | a016a1de77e93fbe9f2966f6994f5500 | Accesseur en écriture de l'ID de la news. | public class News
public void setNewsId(String newsId) {
this.newsId = newsId == null ? null : newsId.trim();
} | 1 |
5da01f07913891eafce862828e7c23e1 | 2da993c6b2d2520604adc143162eec56 | Adiciona um valor ao total acumulado. | if (_total.containsKey(key)) {
BigDecimal pre = (BigDecimal) _total.get(key);
switch (_calcType) {
case TOTAL :
val = val.add(pre);
break;
case AVG :
val = val.add(pre);
increment(key);
break;
case MAX :
val = val.compareTo(pre) <= 0 ? pre : val;
break;
case... | 1 |
34ed2a1a387e8f7f026c376d8f0f0656 | bc346dceb567aeb0aa492f707868d535 | Construct a BN for specified phylogenetic tree using supplied model. | num_tuples = describer['meta']['num_tuples']
num_attributes = describer['meta']['num_attrs_in_BN']
if not k:
k = calculate_k(num_attributes, num_tuples)
attributes = set(describer['meta']['attrs_in_BN'])
N = []
V = set()
V.add(random.choice(describer['meta']['attrs_in_BN']))
prin... | 0 |
e07ca5254ece36f7d1355fffc3c832b6 | bf82929fa0862c9225619177fc354715 | 创建聊天小图标 | public class Lesson7_1_NotificationHelper_Lite extends ContextWrapper
private int getSmallIcon() {
return android.R.drawable.stat_notify_chat;
} | 1 |
cf612847493481f70ba5a19ce811fdcf | aa4da2a3385ffb439d6c0105c138cabd | 팀 초대 현황 페이지 | print("여기까지")
conn = oci.connect('final_teamB_xman/test11@192.168.0.15:1521/xe')
print(conn.version)
cursor = conn.cursor()
cursor.execute('select*from place')
plist = cursor.fetchall()
return render(request, "finalProject/sungma_chu.html", {"plist": plist}) | 0 |
7bf5ccf236bd05614b0bf1c58e7d172b | 7ef0b707dd80be835c5baceed539df44 | Extension for business phone number. | class PhoneNumber_PNRB extends AbstractStructBase
public function getExtension()
{
return $this->Extension;
} | 1 |
de3c2e2f8f4ae0aaa47fd2e06afc5386 | 33fe87b1cbeafaef3d13618c4030eda2 | Gets the name of the a pitch [0, 127] as a String.
For example, giving 60 (middle-c) would return "C4". | string pitch_letter, octave_letter;
switch (pitch_) {
case 0: pitch_letter = "c"; break;
case 1: pitch_letter = "cis"; break;
case 2: pitch_letter = "d"; break;
case 3: pitch_letter = "dis"; break;
case 4: pitch_letter = "e"; break;
case 5: pitch_letter = "f"; break;
case 6: pitch_letter = "fis"; break;
cas... | 0 |
52b7183b270d5ff6c80c4625212a0672 | 6017d431869efcd1ed4897fd0eb294bd | Multiply two 128-bit integers, result is 256 bits. | func PMULLWm128int16(X1 []int16, X2 []int16) | 0 |
15a7a8c8813d903d53233c6d4082e975 | fca5dfea4224e70d7bd020a45a971c3d | Discretize whether a scan to insert is discretized first into octree key cells (default: false).
This reduces the number of raycasts, resulting in a potential speedup. | namespace octomapcustomization
void NavigationOcTree::insertPointCloud(const Pointcloud &scan,
const octomap::point3d &sensor_origin, double maxrange,
bool lazy_eval, bool discretize) {
KeySet free_cells, occupied_cells;
... | 1 |
e8dcd4cf6430071c6af3aa6f16ba6e1e | a68de04233643540382b818fa542f99e | Calculates the ratio between two terms. | class Rational:
def divide(self, first_term, second_term):
return Fraction(first_term / second_term) | 1 |
0602bf23c148e48c0f7825b4e76b7072 | 340c3a08064ae4f0604d9e8bc567d616 | Orders the ranking by win rate. | return Object.keys(playersObject).sort(function (a, b) {
return playersObject[b].won/playersObject[b].lost
- playersObject[a].won/playersObject[a].lost; });
} | 1 |
08659921d5a587a294b694cd6ee41b96 | 8ce6c64fd82d20009e06570340384da6 | 传入节点,检查是否为最后一个节点 | public class Node{
public boolean isLast(){
return next==null;
} | 1 |
add3d33f476be9b99bb270de9db4f4a1 | 3d9ac54c3b55a62688d886b7f67f8544 | Validate daily social request limits | $apiAccountConfig = $this->getSiteApiAccount();
$currentDate = explode(' ', $this->transaction_time)[0];
$dateAccumulatedAmount = self::getAccumulatedAmountByDate($currentDate, $currentDate);
return $apiAccountConfig->daily_transaction_limit != 0
&& $this->amount + $dateAccumulatedAmount->accumulate... | 1 |
77a6816fc9abdc65104a297a5ae83ff9 | 5e72d2e490195ddb1551a497a9a8b4ba | 每增加一个实例,count计数加1 | class Solution:
#用来定义一个count,就可以不断的在原来基础上叠加了
def __init__(self):
self.count = 0 | 0 |
2e2093b0e2bfee7c4c1d72cd78969169 | 5c325e0b25dd14022b2975f353d0de13 | 我的关注列表,包括 话题和用户,分2次请求。 | {
var param = new Dictionary<string, string>();
param.Add("up_mid", _userId);
string url = BiliFactory.UrlContact(Api.ACCOUNT_MEDIALIST, param, true);
string response = await BiliClient.GetStringFromWebAsync(url);
try
{
var ... | 0 |
c303112801e3ffd9b5976c38ff393cf4 | 947e52068a5e2bce54366acc2ecb562f | 忽略Ctrl + z和Ctrl + c退出信号 | void signalhandler(void)
{
sigset_t sigSet;
sigemptyset(&sigSet);
sigaddset(&sigSet,SIGINT);
sigaddset(&sigSet,SIGQUIT);
sigprocmask(SIG_BLOCK,&sigSet,NULL);
} | 0 |
f50570a43318adf61825cb6f2c9f6e4c | ffa78d61ad428d97f827e8390b6c3edf | Parses a Csv to a jagged array | {
var cellGrid = new string[csvRows.Length, maxNumColumns];
for (var i = 0; i < csvRows.Length; i++)
{
string csvRow = csvRows[i];
string[] csvColumns = csvRow.Split(',');
for (var j = 0; j < maxNumColumns; j++)
... | 0 |
35f9dbf2b0be25e580a98b13805f8930 | 3b7fac1b042ab4a0e1aea39a631f46c3 | 待收货状态 可以收货 | {
$afterSaleStatus = $afterSale['status'];
if (!in_array($afterSaleStatus, $this->afterSaleReturnStatusCanReceiveArr)) {
return false;
}
return true;
} | 1 |
904a2571497a65e7b63784bfd2cf3634 | 1507a65f83feab9465ad3795dff3d580 | This function process the payload part of a JWT. All public claim types
are validated. This function must not silently fail or the jwt struct
may be only a partial representation of the actual JWT. | oidc_provider_t *provider, const char *id_token, const char *nonce,
char **user, apr_jwt_t **jwt, apr_byte_t is_code_flow) {
char buf[APR_RFC822_DATE_LEN + 1];
apr_jwt_error_t err;
oidc_debug(r, "enter");
if (apr_jwt_parse(r->pool, id_token, jwt, cfg->private_keys,
provider->client_secret, &err) == FALSE) {
... | 1 |
60f317f030cfdc14c2ffbdcd00e90fdd | 17425b325a0dfa9444278e3fccec61f2 | Represents a declaration of a variable, such as `let x = 7;` | const result = new nodes.VariableDeclaration();
result.name = this.parseBindingName();
if (this.lexer.peek().type === TokenType.colon) {
result.colonToken = this.lexer.read().start;
result.type = this.parseTypeExpression();
}
if (this.lexer.peek().type ===... | 1 |
2f8c3f6dcbf9eb0799f888b064216097 | a166c0191c926f837a5a8b4f40bff7ab | Apply an affine transform to the joint position:
<p>
<code> q_filt = scale * q_in + bias </code>
</p>
<p>
Useful when the sensor measurement does not directly reflect the joint position, i.e. separated with a constant gear ratio plus an offset.
Implemented as a cumulative processor but should probably be called only on... | R apply(IReadableTransformation t); | 1 |
cc7823f0bdee4f3b2a842a58d7498c2b | 1f3b7e51ad5e377badc41c7b2c475aa7 | Sample from a discrete logistic mixture. | def sample_from_discretized_mix_logistic(y, log_scale_min=None):
if log_scale_min is None:
log_scale_min = float(np.log(1e-14))
assert y.size(1) % 3 == 0
nr_mix = y.size(1) // 3
y = y.transpose(1, 2)
logit_probs = y[:, :, :nr_mix]
temp = logit_probs.data.new(logit_probs.size()).uniform_(... | 1 |
fc4888144adc7f33e532596df48cad31 | 536e2e9d6e159152c8b45bb57091892b | プレイヤーのターンかEnemyが動いた後ならUpdateしない | public class Player : MonoBehaviour
private void Update() {
if( Game.IsStageCleared()) {
return;
}
CheckMouseLock();
CheckMove();
if(animator.GetBool("Jump"))
StartCoroutine("JumpAnimation");
} | 0 |
38bfe79ed3bf549157e90df250fea68c | f59c15a870fcf847834e678cf1b2761d | create a new cheatsheet, filling its contents with menu items | void Initialize()
{
CheatManager.AddCheat("galaxymenu", new GalaxyMenuCheat());
} | 0 |
2008f74aebce0a374add2741b7b8c801 | fa84f791d7d0ca2033c6b44be37fab1a | Rotate the character to the destination. | namespace KinematicCharacterController
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(CapsuleCollider))]
public class KinematicCharacterMotor : MonoBehaviour
public void RotateCharacter(Quaternion toRotation)
{
_moveRotationDirty = true;
_moveRotationTarget = ... | 1 |
4d09b18079a65030a09c35125034130e | b5ca7d23c5c56bb391d663aecde33af3 | 新建拍照或相册发图按钮 | const actionSheet = this._ActionSheetController.create({
title: '请选择图片',
buttons: [
{
text: '拍照',
handler: () => {
this._NativeService.getPictureByCamera().subscribe(img => {
let postBody = {
file: img
};
t... | 1 |
1f8f3c11abc5147351faa39458d2b60f | 6390b2ef164481cbe7fcbe26e2030318 | The attribute name for updated at date time. | public function getUpdatedAtColumn()
{
return static::UPDATED_AT;
} | 1 |
0ba107834e080394903b22238111b1e2 | dd0f6d53a37e02aae5e8ba0a4b5cdafa | проверка на полноту заполненности фильтра запроса | if(!$reqvs)
$reqvs = $this->getUserReqvs();
if($form_type === null) $form_type = $reqvs['form_type'];
$is_filled = explode(',',preg_replace('/[}{]/', '', $reqvs['is_filled']));
return $is_filled[$form_type - 1] == 't';
} | 1 |
ae38bf09aefaffe692be2e9601cb7b65 | 5c5f1c975d7866f53a55bd5521dd26b3 | Принимает дату в формате ISO 8601, возвращает дату вида "1 января 2020" | function euro_date(string $date): string
{
return (empty($date)) ? '' : date("d.m.Y", strtotime($date));
} | 0 |
cdfe142b45a3282a58bd2edf58594f13 | a220d296df3729a6ff84ef6d63e40324 | call will execute the "chunk of code" that gets passed in | function callback (foo){
foo();
} | 1 |
024d3292d17a6ca1d4404c3e99f32374 | 073548e6ac6c3961e4943a5de01db4ec | If output cache is disabled, don't return a cache result | class Block extends ConcreteObject implements ObjectInterface
public function getBlockCachedOutput($area)
{
if ($this->getBlockTypeHandle() === BLOCK_HANDLE_STACK_PROXY) {
return false;
}
$db = app(Connection::class);
$arHandle = $this->getAreaHandle();
if ($this-... | 0 |
7817b54af56f5d5ff0d07c7d4ec96e4b | 7fea208def2b4d0c0bde4037e7754828 | 设置控件左边缘与其容器的工作区左边缘之间的距离(以像素为单位)。 | class DomStyleStatic
static void setMarginLeft(DomStyle domStyle, double value, Unit unit) {
domStyle.setProperty(STYLE_MARGIN_LEFT, value, unit);
} | 1 |
457c0338f9d53131667e84e56bd6c01a | c5ad3bc88f0df67515607b4bded499f0 | 让子View自己计算自己的尺寸,传给子View的两个尺寸限制参数 | public class CustomView extends View
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
super.onMeasure(widthMeasureSpec, heightMeasureSpec);
int width = 0;
int height = 0;
int specMode = MeasureSpec.getMode(widthMeasureSpec);
int specSize = Mea... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.