query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
6f8138767980896456f7c39ce0d120cd | 5864e6c8b81b6d97eb996a9ee6de99dc | Expose the LiveData Categories query so the UI can observe it. | class LibraryPresenter(
private val db: DatabaseHelper = Injekt.get(),
private val preferences: PreferencesHelper = Injekt.get(),
private val coverCache: CoverCache = Injekt.get(),
private val sourceManager: SourceManager = Injekt.get(),
private val downloadManager: DownloadManager = Injekt.get(),
... | 0 |
0f1d1734d94e4e85eef1e38b7ab37c38 | 50a2164af850eb6abac6ae6332653e9e | Registers a subsystem implementation based on the given subystem parameters. | namespace UnityEngine.XR.ARSubsystems
public sealed class XRSessionSubsystemDescriptor : SubsystemDescriptor<XRSessionSubsystem>
public static void RegisterDescriptor(Cinfo cinfo)
{
SubsystemRegistration.CreateDescriptor(new XRSessionSubsystemDescriptor(cinfo));
} | 1 |
87ea9acf738ade5cbf3353ed5b46d9e1 | a3eedeb47361397f9e6634d044b5a2d3 | <para>Toggles the (computed) value of the boolean property showCommandLabel.</para> | namespace qx.ui.toolbar
[JsType(JsMode.Prototype, Name = "qx.ui.toolbar.ToolBar", OmitOptionalParameters = true, Export = false)]
public partial class ToolBar : qx.ui.core.Widget
[JsMethod(Name = "getShow")]
public object GetShow() { throw new NotImplementedException(); } | 0 |
25866088f65cc9dd72ec3a4b1f45679f | b1b1478ba7845794359a362bd2bed59f | 根据文章的articleId返回图片的url | {
Model.article model = new BLL.article().GetModel(article_id);
if (model != null)
{
return model.img_url;
}
return "";
} | 1 |
d33a1d1b798a43390f2b7a2f08fad285 | ed45195451516df48212d54930f7ad0c | Function responsible for storing the Chat Model | {
if($this->request->isAjax()){
$chatMod = new chatMod;
$param = $this->param;
return $chatMod->store($param);
}
} | 1 |
54249ecbe753c3504f5720b941f421fc | df05d027f4ea1908c7ba740b2cfd611d | Get all event days from Calendar data | class eventsCalendar
function getEvents($id, $month, $year) {
global $modx;
$days = array();
$res = $modx->db->select("DATE_FORMAT(FROM_UNIXTIME($this->dateSource),'%d' ) AS day",
$modx->getFullTableName('site_content'),
"DATE_FORMAT(FROM_UNIXTIME($thi... | 1 |
756e1054d3c1e13e6c9640e36a6a5553 | ff45a9b8f367ef4a5ec5566f92ac84c0 | Search bo handle in shared bo map to get va information | {
debug("Entered mb gethandle, mb handle is %s\n", mb->handle);
return mb->handle;
} | 0 |
2a56062ed880e3565e5fc6d73e1829dd | 135b06a9368b01ed018c8b58c8209c3e | se busca si existe un nodo de un tipo ya creado con el nombre deseado | public class BitacoraVehículos
public boolean buscarTipo(String Nombre){
boolean resultado = true;
if (contadorTipo==0) {
resultado = true;
}else{
for (int i = 0; i < contadorTipo; i++) {
if (Nombre.equals(this.h... | 1 |
98a7f6f3971ef567b2c89cde8e7b9609 | 5aa09457aa643f79a25af538ff8e83f1 | Vectorized calculation of the great circle distance between two points
on the earth (specified in decimal degrees) | import numexpr as ne
lambs = np.radians(ra1 )
phis = np.radians(dec1)
lambf = np.radians(ra2 )
phif = np.radians(dec2)
dlamb = lambf - lambs
ne.set_num_threads(nthreads)
hold1 = ne.evaluate('sin(phif)' )
hold2 = ne.evaluate('sin(phis)' )
hold3 = ne.evaluate('cos(phif)' )
... | 1 |
b1d958e67d78e30615b2df3c2b5432b9 | 58e0722d66937c381790e7eae6c787b0 | Get the passport's ExpirationDate for forms. | public class GoRegistrationChangeAction extends ActionSupport implements SessionAware
public String getExpirationDate() {
return expirationDate;
} | 0 |
f9aef8c1293fb8414bc0420308922c13 | 194446be0a3812746e3913fa83c40cc8 | Enqueue of messages LinuxDB::sensapp::registerSensor | TRobotIF::RetCode TRobotIF::SerialIOIface::sendSensorData( TRobotIF::BaseSensorData& sensorData )
{
m_sensorDataQueue.push( sensorData );
return TRobotIF::SUCCESS;
} | 0 |
2a2551aaf00967adcbd1f9e9f5305ad9 | 1d62cff73b8742ea4adf3b2156ad6c86 | Convert a signed integer to a FourCC string. | class cv2Capture(Thread):
def decode_fourcc(val):
return "".join([chr((int(val) >> 8 * i) & 0xFF) for i in range(4)]) | 1 |
2ff3c63046261c9ec72f42efb33e22a8 | 78583b57ad2fbd84ed87ba038baf19c3 | given a pointer to a sorted x[i], returns mean, median, and
stdev | let mut sum = 0f64;
for x in f.iter() {
sum += *x;
}
let mn = sum/(f.len() as f64);
let mut sqdist = 0f64;
for x in f.iter() {
let dist = x - mn;
sqdist += dist*dist;
}
(mn, sqdist/((f.len()-1) as f64))
} | 0 |
68312d9dfba26a5116c6ac1ce70ea60c | 3de6487ca366d8e886efc4c996d5f36f | 使用尾递归实现波那契数列结果 | if i == 0 {
return 0
} else if i == 1 {
return 1
} else {
return fbn(i - 1) + fbn(i - 2)
}
} | 0 |
2e5cf1434b381edd4b2d8db486263ab0 | 8303ccf8e897263d745c2f81091baa9a | Add the task to the list of tasks to be processed. If there aren't enough
delegates currently queued or running to process tasks, schedule another. | namespace ZubeNet.Common.Threading
public class LimitedConcurrencyLevelTaskScheduler : TaskScheduler
protected sealed override void QueueTask(Task task)
{
lock (_tasks)
{
_tasks.AddLast(task);
if (_delegatesQueuedOrRunning < _maxDegreeOfParallelism)
... | 1 |
b3b89e06c06a196f2f027bb7e1f92c4f | 2c0ed905dc273b989a31b3a5a5ca5426 | functie care verifica daca un string e numar | int esNumerico(char str[])
{
int i = 0;
while(str[i] != '\0')
{
if(str[i]<'0'||str[i]>'9')
return 0;
i++;
}
return 1;
} | 1 |
fd3310982b24e8252e20e3acf7121135 | a37a5e3b84a7d1d3537d7e9b7125ed45 | Verify that the initial state zeroes all possible EV_REL axes. | class TestRadarDatabase(unittest.TestCase):
def test_initial_state(self) -> None:
self.assertEqual(0, len(self.database.event_identifiers())) | 0 |
90e9d4c50045265b3bc95d0814a7b11c | e72fa27eeaa6e1ed04765fec77621a07 | 累加末尾的阶乘和 | let tmp = 0;
if (cache.has(`k${num}l${last}`)) {
return cache.get(`k${num}l${last}`);
} else if (cache.has(`k${num}l${last + 1}`)) {
const j = cache.get(`k${num}l${last + 1}`);
cache.set(`k${num}l${last}`, j + last);
return j + last;
}
for (let i = num; i >= last; i--) {
tmp += i;
}
ca... | 0 |
9a8e6497cdb4f95e0cf8e4a19a9c5c58 | 432e5bfda2190a664f93445e55a9533c | 将已经读取到缓存中的VOList分页展示给前台 | public class GetJsonUtils extends CommonAction
public <T> String displayJSonString(List<T> VOList, Paginator paginator){
String josnStr = BodyListToJSON.getJSON(VOList, paginator.getPageCount(),
paginator.getCurrentPage(), paginator.getCount());
try {
response.setCharacterEncoding("UTF-8");
response.getW... | 1 |
c2620682dbcdfe50c041746c58e99824 | 1623f4fe1ce741cac67d2e9a6b7e7d74 | Gets the value of the specificationVersion property. | VersionSpec getVersionSpec(); | 0 |
9dbbb0db25e78e52987d88335611e3e0 | cec08c2e10e0c649981463a2573f908f | activity销毁时,调用,关闭请求返回 | public class TestActivity extends BaseActivity
@Override
protected void onDestroy() {
super.onDestroy();
OkHttpUtils.getInstance().cancelTag(this);
} | 1 |
55e5894e8452e9bc1587aa4a4a54a473 | f823f16215050fb718aa598f36a3feed | 新增代金券方案 | if ($this->post) {
$post = $this->post;
$result = $this->validator($post, 'Admin/VoucherTemplate.add');
if (true !== $result) {
return $this->send($result);
}
$price = intval($post['price']) > 0 ? intval($post['price']) : 0;
$limit = intval($post['limit']) > 0 ? intval($post['limit']) : 0;
if... | 1 |
ab65270e706def3e6ea23f45563cf4ec | 07bea360b41913fbdbc100b1741fe53b | Runs when the file is about to be included. | {
include 'file.php';
include_once 'file.php';
require 'file.php';
require_once 'file.php';
return 'foo';
} | 0 |
09daed760bbceabdd1e3bc2b35f820d6 | 5816bae333a14b4be5e426df542d7c7b | Set the flag to control whether certain well-known imports are blocked
from being automatically loaded if they encountered in an <code>imports</code>
statement. Note that automatic loading of all imports can be switched of
with {@link #setLoadImportedOntologies}.
autoloaded, even if autoloading is on | @javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "LoadCommand.eti;LoadCommand.eix;LoadCommand.etx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
@gw.internal.gosu.parser.ExtendedType
@gw.lang.SimplePropertyProcessing
@gw.entity.EntityName(value = "LoadComm... | 0 |
0e6ec9370fe940869568e4853405f23e | 2ff68ff5cd524a4495ecb1ca30391174 | https://mesosphere.github.io/marathon/docs/marathon-ui.html#application-status-reference | {
foreach (var statusRow in from DataRow row in this.applicationStatusTable.Rows
where (int)row["JobId"] == jobId
select new
{
Count = (int)row[... | 0 |
f8e579604db8253db4475aa582e77cf5 | 160a32be6d1e27ecdc70e20a0ce8a688 | Add a parameter (its key and value) to the list | if (parameterValue == null) {
list.add(parameterName);
list.add(new NullFile());
} else {
list.add(parameterName);
list.add(parameterValue);
}
} | 1 |
11de1660e7b6419ff84261be33a90ef9 | 363f6c5c749c5483a5df86ae0964f78d | Returns a list object of next changed categories. | long[] getCategoryChanges(); | 0 |
c885a303f930de5daae70ee4eeaae93c | 92091d8e61a1f707a2d73a0caa88d010 | finds shortest path to reach from one vertex to another in graph | public class Graph
public double findMinimumDistance(int startIndex,int stopIndex){
nodes[startIndex].setDistanceFromOrigin(0);
nodes[startIndex].setVisited(true);
nodes[startIndex].setMinFound(true);
currentIndex = startIndex;
while (!nodes[stopIndex].isMinFound()){
... | 1 |
5b5ba6fffd8eab307795585496996970 | 8948cc6990a991a46dd263b445ea9dc0 | 商品価格2(税込)を取得する<br> | public class Ver01
double getPrice02(){
return getBasePrice() * getDiscountFactor();
} | 0 |
dcaad9cd7284ea44411c6ced9710f9de | bb1b6fea6f05e0d0415990f5678d3a88 | GET: Disponibilites | {
LocationViewModel lvm = new LocationViewModel() {
Vehicule = VehiculeHelper.Current.GetList(),
Commercial = PersonneHelper.Current.GetPersonByType(4),
Client = PersonneHelper.Current.GetPersonByType(0)
};
return View("Index", lvm)... | 0 |
b52d8ffe329de7e3203ffc7e879b20c9 | 0aaa8eb221e62c39b08b419410f5e5e3 | 对佣金的处理, 默认万分之几, 保留小数点后一位. | if(!ObjectUtil.isBlank(listCommissionDetails)){
for(CommissionBO bean : listCommissionDetails){
if(!ObjectUtil.isBlank(bean.getCommissionAmount())){
bean.setCommissionAmount(MathUtil.round(bean.getCommissionAmount(), 2));
}
}
}
... | 0 |
87844da97cace13031d67e4540872c20 | 6088db3f97bd23620678d0abb28258ec | 尾插法创建链表
备注:
教材中默认从控制台读取数据 | void CreateFromTail(LinkList L)
{
Node *r,*s;
int flag=1;
r=L;
while(flag)
{
c=getchar();
if(c!='$')
{
s=(Node*)malloc(sizeof(Node));
s->data=c;
r->next=s;
r=s;
}
else
{
flag=0;
r->next=NULL;
}
}
} | 1 |
be99ddf9d4d6f95f8b09048c81e8bf3b | 2b40336094d083ed9fdd25f9f1a0163e | shows a number of hearts corresponding to the enemy's health | var s = "";
if (n == 0)
return '<img src="img/heart0.png"/>';
if (n >= 30)
return '<img src="img/heart100.png"/>' + ' Full Recovery';
while (n >= 1) {
if (n > 10) {
s += '<img src="img/heart1000.png"/>';
n -= 10;
} else if (n > 5) {
s += '<img src="img/heart500.png"/>';
n -= 5;
} else {
s +... | 1 |
a713e8df1e63b27d888e457c8e4d9cee | cf8b093470f5946b03088063cc38b68a | Activates the Metro draw pile for instances when the player
clicks on the draw pile. | public class GUIGame
@FXML
private void handleDraftPoolClicked(MouseEvent event) {
if(playerState.canPlaceDie())
windowpattern.highlightPlaceableSpaces(draftpool.getSelectedDie());
} | 0 |
82a747148fdeec1de407852a480db9ae | 6506f9725f1e2bdc0fb7e98c0390854c | Checks if a value is really meant to be "true". <br />
Can be usefull when checking smarty params for the value true | export class Util
public static isTrue(value) {
if (typeof(value) === 'string') {
value = value.trim().toLowerCase();
}
switch (value) {
case true:
case 'true':
case 1:
case '1':
case 'on':
case 'yes':
... | 1 |
3ab75412f583393d660c4cb9e1a4abff | 6cb4c464965bda7621166b4ce54c27bf | 检查忘记密码表单 | export default class UserPassWordCom extends Vue
private async init_foget_form(): Promise<boolean> {
return new Promise((resolve, reject) => {
(this.$refs['fogetform'] as any).validate((valid: any) => {
if (valid) {
resolve(true);
} else {
... | 1 |
4995251995a058c3640e03dfda855634 | 1b08202f48019341844262676a9518a6 | Method is used to get all hsn codes | function getAllBsnNumbers() {
return new Promise((resolve, reject) => {
db.all(SELECT_ALL_BSN, (err, res) => {
if (err) reject({ code: 500, message: err });
resolve(res.map(({ BSN }) => BSN));
});
});
} | 0 |
fc7eb9093edc05feadea8d7c2a776bc6 | 8d5ca2ec43fcca71e6908541dfb5033d | Get customerAddressLine4 | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "Address1", propOrder = {
"addressType",
"addressLine1",
"addressLine2",
"addressLine3",
"addressLine4",
"addressLine5",
"addressLine6",
"city",
"state",
"region",
"postalCode",
"country",
"mailHandingInstruction"
... | 1 |
dfb597d2a2a017cf463b25a73553aa1e | 0c19af2a91d66060fda2ff94decb0c25 | Test that kinetics search accepts 1 reactant and 2 products | c = models.Chemistry()
c.reaction("A=>B")
c.reaction("A+X<=>C+D")
c.reaction("B+Y<=>C+E")
c.reaction("E+D<=>F")
c.initial_concentrations(A=1, X=1, B=1, Y=1)
c.time_stop = 50
sol = c.run(plot=plot, output=True)
self.assertTrue(sol.success) | 0 |
22e51e7bafa9e30efbe268156fe71cbe | 01fee2f36dbc3ff2d5cc74d31250c70f | This function finds open spot for Func/Sub in CallTable | for(unsigned long i=0; i<vectorFunc.size(); i++){
if (vectorFunc[i].BeginOffset <= Offset &&
Offset <= vectorFunc[i].EndOffset)
{
return i;
}
}
return -1;
} | 0 |
63249bfb3be8532cbf4c6a0226bb000d | ed6a89a205134fe038f215f124326cec | Copy ovf env file from dvd to hard disk.
Remove password before save it to the disk | self._copy_kickstart(os.path.join(self.iso_contents, "ks.cfg"))
initrdline = " append initrd=initrd.img ks=cdrom:/dev/cdrom:/ks.cfg"
if self.tdl.installtype == "url":
initrdline += " repo=" + self.url + "\n"
else:
initrdline += " repo=cdrom:/dev/cdrom"
se... | 0 |
1e021b4103167d676b4316ed2762a348 | 9fe1512aacdbeaa8ea63868ad777f357 | Counts the time in milliseconds from the human-friendly representation | function timeIntervalToMilliseconds(subject) {
var match = pattern.exec(subject);
if (match) {
return match[1] * multipliers[match[2]] * 1000;
}
return -1;
} | 1 |
cb9246abe1087e7dd6643fa00d133d74 | d9bff9d7fca3b0a19f2b1812451d24bd | 获取Connector域名 | String getConnectorName(); | 0 |
a94e87a72b21887f3e6b19ccc0b1b46d | 9289362469db71a2d316b27da829d47e | Returns the names of all existing remote branches. | def existing_remote_branches
remote_branches = array_output_of 'git branch -r'
remote_branches.reject { |b| b.include?('HEAD') }
end | 1 |
a5b00a95486a31b26f6e75d639b0b5c8 | 1f818ec65dbf9f2773bff844efb9e975 | Returns the absolute extension path.
Wrapper around the static method. This makes the method mockable. | class PathsPMakeupPlugin(pm.AbstractPmakeupPlugin):
def get_extension(self, *p) -> pm.path:
f = self._abs_wrt_cwd(*p)
return os.path.splitext(f)[1].lstrip('.') | 0 |
68001c16942e634c28c4e4694a79eb6c | 350ed12771beb6e3a96f3fb007133970 | 将unicode编码转化为中文,转化失败返回原字符串 | def zhuanunicode(kkk):
ds=""
chang=len(kkk)
d=0
while d<chang:
if kkk[d]=="\\" and kkk[d+1]=="u":
try:
asdf="\\"+kkk[d+1:d+6]
zhuanyi=asdf.encode().decode('unicode-escape')
ds=ds+zhuanyi.encode('UTF-8','ignore').decode('UTF-8')
... | 1 |
4e0a0ce8f024a284e20d65392c2a2c68 | 8274a478c36547f5043557edcf517bbe | Get Z_PickingProd ID. | class ZestimateRequest extends Request
public function getZpid() {
return $this->zpid;
} | 0 |
bfc2649cc5044606c6a177a2f95f2872 | 221a23e3d18b3bb8de76f51ea184a60f | post a new club request. | {
\IPS\Session::i()->csrfCheck();
if ( !$this->club->isLeader() )
{
\IPS\Output::i()->error( 'no_module_permission', '2C350/3', 403, '' );
}
$member = \IPS\Member::load( \IPS\Request::i()->member );
if ( $this->club->memberStatus( $member ) != \IPS\Member\Club::STATUS_REQUESTED )
{
\IPS\Output::i()... | 0 |
62f2f298a79091d58aa5cca415576768 | 10c9e4a2f0926a1220ae01433c77d26c | Method to get data set directory
Returns:
data set directory | class DataSetHandling(object):
def get_data_set(self):
return self._data | 0 |
598c8febf2b2385bb2cc1f8e926e1f6a | b828cdd052016ba73075951dd00bf5ae | salva os dados complementares ao cadastro de pessoa (endereço e contatos) | getNome = lbtop1_entry.get()
getCpf = lbtop2_entry.get()
getSexo = valor_a.get()
getEstado = spin1.get()
getEndereco = lbtop4_entry.get()
getRua = lbtop5_entry.get()
getCidade = lbtop6_entry.get()
getBairro = lbtop7_entry.ge... | 1 |
23332ebb541646db3317829fe1b88a9f | e673a80180c95e93dcf8588bcb1baa6b | map array of JSON results to array of { label: _, value: _ } | let data = [];
results.map(row => {
try {
let item = {};
let json = dataPointAsJson(row.data_point);
if (json && json.temperature) {
item.id = row.id;
item.mac_address = row.mac_address.toLowerCase();
item.recorded_at = ... | 0 |
bd5b5430eca267c923f0cee3cf7ae792 | 4df50ddb2de5909fcc769860d72b3083 | Calculate the feature size according to the input size, used only for the network using pooling to downsample. | if layernum>len(net): layernum=len(net)
outsize = 1
for layer in reversed(range(layernum)):
ksize, stride, pad = net[layer]
outsize = ((outsize -1)* stride) + ksize
rf_size = outsize
return rf_size | 0 |
5d52ac1a12c302fe316ba9cc4a94b85d | 4da729ae3c13e1f9d6a2a5773a89334d | Return an iter of jobs that match this time pattern | class CronJob(object):
def next_times(self, now=None):
while True:
now = self.next_time(now)
yield now | 0 |
34747f355531b488ce20c7878f76ef32 | 3bada5401d4e92d010898301630d74fd | Regression: Test that we can read taxalabels delimited by spaces not new
lines. | $input = '';
for ($i = 0; $i < 100; $i++) {
$input .= "line $i";
if ($i < 99) {
$input .= "\n";
}
}
$lines = array();
$parser = RecordParser::newDelimited("\n", function($buffer) use (&$lines) {
$lines[] = trim((string) $buffer);
});
$parser->handle(new Vertx\... | 0 |
d006e53a6849b3de0eb10dd89dde7b72 | 7c279bf4a31f7ea0ae315e19cb859c12 | Clear <stop_id> value | def parse_stop_id(s):
id_node = s.getElementsByTagName("PARADAAUTOBUS")
return id_node[0].firstChild.data | 0 |
d47f88a7cc2684f2abd8f75bc4abb707 | 265301fa21d0b96fb3f8bcfcaa0e30a7 | Set the total number of subtests | public function setTotalQuestions($totalQuestions)
{
$this->totalQuestions = $totalQuestions;
return $this;
} | 0 |
00b219f7f30ab02c5466e10b55393aa3 | 6ecf6d099c82888258cafddeb06af037 | How many different repositories the user opened pull requests in. | q = <<-QUERY
select count(distinct(prh.pull_request_id)) as num_open
from pull_request_history prh, pull_requests pr, pull_request_history prh3
where prh.created_at < prh3.created_at
and prh.action = 'opened'
and pr.id = prh.pull_request_id
and prh3.pull_request_id = ?
and (exists (sele... | 0 |
afe5903418c786e9a8373121307c3fbb | 7742ef542e443ef330e77ef8be960cf9 | 车辆出场上报信息 | request.setCharacterEncoding("UTF-8");
response.setContentType("text/json;charset=utf-8");
log.info("Someone come from ip address <" + request.getRemoteAddr()+ ">");
log.debug("add TractorInfo");
User user=(User)request.getSession().getAttribute("user");
String replacementInfoIds = (String) request.getParam... | 1 |
5b2d23a643062f6b157801a8f8966da3 | 92b47bea03228bf50b9082abcc631439 | Returns true if the cached projection is valid. | return mLeftPoints != null && mLeftPoints.size() >= MINIMUM_SIZE &&
mRightPoints != null && mRightPoints.size() >= MINIMUM_SIZE &&
mLeftPoints.size() == mRightPoints.size() &&
mLeftIntrinsics != null && mRightIntrinsics != null &&
mHomographyEstima... | 1 |
5d72eb922c37c9845edbc0118504ac18 | 54caa1ba8461d171c61dd240fa35a393 | 获取文件名称,包含后缀名 | class uploadFile(models.Model):
# 所属用户
def getFileName(self):
return self.file.name.split('/')[-1] | 1 |
f4cfea9f9ce839da4ff7e6234ada0a9a | 7fb0ff6a55e634aca15f2716de1c202e | 保存图片,返回图片路径 | public class FileUtils
@SuppressWarnings("unused")
public static String savePic(String filePath, Bitmap bitmap) {
File f = new File(filePath);
try {
boolean success = f.createNewFile();
} catch (IOException e) {
e.printStackTrace();
}
try {
... | 1 |
9441c1276e816c79a2804a2a1e564c0f | 9b06091315ddb2efc1fbac1861b0cba0 | Computes the element-wise error function of `x`:
The output tensor has the same shape as ``x``.
This implementation is from the Handbook of Mathematical Functions and
has error less than 1.5 * 10-7 for all inputs.
book can be found here 'http://people.math.sfu.ca/~cbm/aands/frameindex.htm | alpha = 1.6732632423543772848170429916717
scale = 1.0507009873554804934193349852946
return scale * elu(x, alpha) | 0 |
c6ea5a58b04d2c13667df225a0b12c64 | ae5b40ef0eca40d2bdedec11d668b3e3 | 消息处理 统一让房间数据管理来进行处理 | if not _is_message_on_handle(key_action) then
return
end
flog("info", "on_message: key_action "..key_action)
data = decode_client_data(data)
if data.actor_id == nil or data.actor_id == 0 then
if faction_factory[data.func_name] ~= nil then
faction_factory[data.func_name](d... | 0 |
c4e2d1df8c2fc4c822fbfe171be3fedb | 9e2c479043340bea509b6d67034a7bf2 | Copy the header buffer into this network buffer
This is to support the case where the client doesn't know ahead of time
how many packets it will write | int i = 0;
if (ptrToDataForHost != NULL && maxBufferLength > 0) {
if (myData.length < maxBufferLength) {
for(i = 0; i < myData.length; i++) {
ptrToDataForHost->payload[i] = myData.payload[i];
}
ptrToDataForHost->length = myData.length;
}
}
... | 0 |
26d8f31e347cb3b3243897f9d32b0a96 | 4fd221ec24a8be9bedc3629b2bc3c042 | Tests the state getter and setter methods with an invalid state. | {
$marshal= 'marshal';
$new = 'new';
$dirty = 'dirty';
$delete = 'delete';
$this->assertEquals($new, $this->state->getState());
$this->assertTrue($this->state->isNew());
$this->assertFalse($this->state->isMarshal());
$this->assertFalse($this->state->isDirty());
$this->assertFalse($this->state->isDel... | 0 |
b85b6ef022e60908cfa2a5be5c251a48 | 90270d77aaffbc5010a9c46a6451168a | Asserts that the given argument is not null. Throws an exception if null. | if (object == null) {
throw new IllegalArgumentException(message);
}
} | 1 |
cb8a3ef13d32b5a20053f3999dd57a2b | 48386b910207317b2ad93201ee2b624c | 하위 Node의 화면출력 여부를 얻는다. | public boolean isVisible() {
if (node == null){
return false;
} else {
return node.isVisible();
}
} | 1 |
cd71fdc348d06c9f66119ed918fd2336 | e44327e0583a887eedea24da15030606 | 物品の棚卸評価単価取得 (API0008) | namespace Jp.Co.Unisys.Espa.Ap.Da.XA05
public class WTegakiSKUInfoExDa : CommonBase
public DataSet GetWTegakiSKUInfoEx_011 ( DataSet dataSet, string selUNIQ, int gyoNO )
{
DBAccess dbAccess = new DBAccess();
EFSASqlDataAdapter adapter = GetAdapterForSelWTegakiSKUInfoEx_011( selUNIQ, ... | 0 |
099696c9dc1c22be309a00703a8000b3 | b7d0bf78bfc6881cfabc22daba78648c | Specifies that depth-first-search will be used for the traversal of a graph, and returns a builder to
further configure that traversal. | Builder eager(); | 0 |
9a2e53466cd5a3a39fa1faf7fb2d51c7 | f1089b3230ebfb20d45e407374171b14 | Add an item to the inventory
@param itemID: ID of the item to add
@param quantity: Number of items to add | namespace NeoFPS
InventoryAddResult AddItem (IInventoryItem item); | 0 |
a78ff10241def04143358f0a431de2be | 0711a6c73100973f628de2c2d51139da | Commands related to setting up a new game build notifier | class SiteChangedNotifier extends Command
public function __construct()
{
parent::__construct();
} | 0 |
1ebed43310bcfb6bf2cbbcf5c0dc4975 | 484b553dc8f49aaeebd0f8b688693cfd | {@code GET /statuts} : get all the statuts. | public String index(ModelMap modelMap) {
modelMap.put("statuses", statusService.findAll());
return "status.index";
} | 1 |
aab09ce6e0c4789e7224dc1fa03280ef | 457d20e50b4564bd04c03e56cfdfd3d8 | Visit a parse tree produced by {@link ApexParser#nonWildcardTypeArguments}. | T visitNonWildcardTypeArguments(ApexParser.NonWildcardTypeArgumentsContext ctx); | 1 |
2acef4fd96c2de4ef755d1a52aaec18e | 76b4de2ae19193e2c3e9abb49b787947 | 選取贈品 | {
if (this.giftListBox.SelectedIndex == -1)
{
return;
}
if (this.itemListBox.SelectedIndex < 0) { return; }
var config = GiftTable.GiftListEx[this.giftListBox.SelectedIndex];
switch (this.itemListBox.SelectedIndex)
... | 1 |
552fd4c4cb5cbad737fdeb06be0067df | d246bf3b60eb15adabfa2a00cc5bf37a | !
Returns the maximum level of detail parameter.
\sa setMaximumLevelOfDetail(), minimumLevelOfDetail(), levelOfDetailRange() | int CvGFilter::getThresholdLevel() const
{
return thresholdLevel;
} | 0 |
bf4b4ec24e858dba1875a5fcd6f049dc | 0d2f5db1224337e9d76b98ad6e25f17b | 转换XML中的<与>号为代码标记 | StringBuilder sb = new StringBuilder();
int cInK = 0;
int cInV = 0;
for (int i = 0; i < xmlString.length(); i++) {
char c = xmlString.charAt(i);
if(c == '<'){
cInK = i;
}
if(c == '>'){
cInV = i + 1;
... | 1 |
822394c593c1bc0d82302ed72339b284 | 7a5a4f5b0bd31f976c4807fa9fe72535 | Gets the Requirement's totalHours. | public class Employee
public int getTotalHours() {
return availability.getTotalHours();
} | 0 |
40ba12538f4900abc34f5162abf444a4 | e308f00e453cdb77888431a1f1b84722 | Try to fetch all of the elements on the stream.
This implies that the stream needs to rewind itself to its first element
in the case that there were already elements read from the stream.
Thrown when the stream is not able to {@link Stream#rewind()
rewind} itself.
Thrown when an error occurred while this stream was try... | public TreeSet<T> read(); | 0 |
7bc29d8d8af6b5a16ecce18618a74c05 | 6082e15e10c88d2ec695db7cad03d0f8 | Store egresados basic info. | class EgresadosController extends Controller
public function index(Request $request)
{
$carerras = Carreras::orderBy('nombre')->pluck('nombre','id');
$title = "Egresados";
$page_no = ($request->get('page'))? $request->get('page'):1;
$x = ($page_no != 1)? (($page_no -1) * 15)+1 :$page... | 0 |
7054f4f524db23d0a5be4c47b1c0a379 | e5e63ddd12d71dd332d817d59bef0bc4 | Pearson correlation of the flattened array. | def f(x,y):
numpy.corrcoef(x, y)[0][1] | 1 |
7ec3757487571f589b3b51f6a391bfec | 3ca72f6a1c85a7e8c9a2e1def07c9d39 | @brief Function for handling characters received by the Nordic UART Service (NUS).
If @ref ECHOBACK_BLE_UART_DATA is set, the data is sent back to sender. | {
uint8_t rcvdbyte;
if (instance == BackchannelUART)
rcvdbyte = UCA0RXBUF;
else
rcvdbyte = UCA1RXBUF;
bus_ctx->rx_bytes_rcvd++;
if (bus_ctx->echo_on == 1)
{
if (instance == BackchannelUART)
UCA0TXBUF = rcvdbyte;
else
UCA1TXBUF = rcvdbyte;
... | 1 |
ee6307ff77e9b3a19b0ef06cbf65281f | 2321d61010ea3bdab45c95d963754113 | Generate a second order transfer function based on its typical
characteristics. | def generateTfFromCharac(G, wn, zeta):
ft = tf([G], [1/wn**2, 2*zeta/wn, 1])
return ft | 1 |
58be3da3f5c1e742227765cc2c6b32e7 | c3c49ace45ca296b16dbd62f23e7f0ff | Clears the settings cache for the given user group | if (!empty($group)) {
$list = apc_cache_info('user');
if (!empty($list['cache_list'])) {
$key = $this->_pre . $group;
$len = strlen($key);
foreach ((array)$list['cache_list'] as $v) {
if (substr($v['info'], 0, $len) == $... | 1 |
8a3e5319141c2a943f208f63c7431a5a | def5c9f6de2af4e639e9baaae585b992 | Test that shifting an empty list returns an index error. | def test_shift_will_not_break_if_pop_and_shift_are_used_on_same_list(dll_fixture):
dll_fixture.push(1)
dll_fixture.push(2)
dll_fixture.push(3)
dll_fixture.pop()
dll_fixture.pop()
dll_fixture.shift()
with pytest.raises(IndexError):
dll_fixture.shift() | 1 |
6bd4622e30f14dc22bae3d8a73835a71 | e8798fc55394874a35e78a2140093605 | 修改状态为提现成功通知 | {
if (string.IsNullOrEmpty(tiXianId)) return 0;
int dalRetCode = dal.SheZhiTiXianStatus(tiXianId, 0, (int)status, beiZhu);
if (dalRetCode == 1)
{
if (status == EyouSoft.Model.Enum.TiXianShenHe.未通过)
{
var info = G... | 0 |
b649b3c258149f41e2d94f9137f398e1 | a3cd01a946267dd49c1aad35359c61f6 | 能否审核不通过 | {
if (empty($post->id)) {
return false;
}
list($can_examination, $reason) = $this->canExaminationImpl($post);
return $can_examination;
} | 0 |
cb4e92a304ce7e5d29728d20c23ee762 | 23969c8dd9781d84f97afc8bbeb460de | Read a 2D array of bytes. | if (view instanceof Float32Array) {
this.readFloatArray(view);
} else {
this.readIntArray(view);
}
} | 0 |
6fe6f7390e6ebe80155a45812c412075 | 2d6feceddc538fd5f3654a6bf31994c2 | 编辑联系人验证 | String message;
switch (type) {
case CONTACT_TYPE_QQ:
editkey = EditKey.s_key_qq;
authkey = EditKey.s_key_qqAuth;
message = context.getString(R.string.user_edit_info_input_qq);
break;
case CONTACT_TYPE_MOBILE:
... | 1 |
30b4315a77c5f10c33a8dad0db22aa88 | a76f997fc94d456ea064f77634b925f0 | Add a member to a trip | public void acceptTripMember(String memberId); | 1 |
db95dcac9076a98010449b5f9840d16b | ed75c3f7f10bac9929372b76d2d093fc | Retrieve the Jurisdiction that levied the tax | class TaxAddress(object):
def juris_code(self):
return self._juris_code | 1 |
4c40d1bd8e4363f5b15b709b4c06dc12 | 7de04f6d382d30c43139bb092689734e | Gives the Arduino object to the specified client | public void setClient(ChatClientMessage ccm) throws RemoteException; | 0 |
f2d0ccb6afce6cb62fdce07c4e22498f | fbcd4daf1808cbda4aff0d1a1e5d56f4 | 调整字典顺序,按照关键词频数从大到小进行排序;并选取频次大于x的关键词 | def _select_top_timeline(freq_list, number=10):
scores = dict()
for dic in freq_list:
for word,freq in dic.items():
if word in dic.keys():
scores[word] += freq
else:
scores[word] = freq
top_words = sorted([k for (k,v) in scores.items()], revers... | 0 |
fa96876183314af3ae4c07b2aaeed975 | e31501c5919dc963f74dad5da08716a0 | Check if dialogue variables match current Global + Player + NPC variables. | public class NPC_QuestContainer : MonoBehaviour
void DialogueFinish(){
if (questStatus != QUEST_STATUS.FAILED) {
if (questStatus == QUEST_STATUS.FINISHED)
{
GetComponent<SavingLoading_StorageKeyCheck> ().OnKeyCheck -= KeyCheck;
questTypeScript.GetComponent<SavingLoading_StorageKeyCheck> ().OnKeyCheck -... | 0 |
84cb2e510275c99d069f109d05163f4d | e5869d44db5d0e7a02ef1e30b7e8f21f | Delete all Estadoses | namespace T3.Controles
public partial class _Ctrl_Multifiltro2014 : UserControl
public void eliminarEstados()
{
gListaEstados.Clear();
_Cmb_Estado.DataSource = null;
} | 1 |
97eb799856028f99e85b237fad3e5635 | 19ca6ce34bc55b678635251b23b8efc2 | 在 Java 8 中获取今天的日期,只有日期,没有时分秒 | public class DateUtil
public static LocalDate getTodayDate() {
return LocalDate.now();
} | 1 |
f5ad5d87ca8028ffafc18fdb378ea54c | 303ad6f4851128b7d6faba11d7a95885 | ulozeni celociselne hodnoty do konfiguracniho souboru | {
ifstream myfile ("zmienne.txt");
if (!myfile.is_open())
{
ofstream myfile;
myfile.open ("zmienne.txt");
myfile << x << " " << n;
myfile.close();
}
} | 1 |
50c7a43028e29989e8e63dab74bebdcb | e8d823b4475d35304583d8c02d6533c4 | Determines whether the application identifier represents
the PICC Master Application or not
the PICC Master Application; <code>false</code> otherwise | byte[] isMob = hcd.getValue(MobConstants.IS_MOB);
return isMob != null && isMob.length == 1 && Bytes.toBoolean(isMob);
} | 0 |
af9698c08897cccb7139274aab596c71 | fedc8b6ee5c38c19249db9c8901aba81 | Store validity booleans for each table column, so we can
check that each of the possible commands is accompanied by
the arguments needed for that command.
Used to handle external commands from Prosp, required for automatic observing
until I replace this with an RPC call. | if state == Qt.Checked:
enabled = True
elif state == Qt.Unchecked:
enabled = False
else:
return
model = self.table_files.source_model
model.reset_results()
settings.VALIDATE_EXTERNAL_SCHEMAS = enabled | 0 |
6079d374d36412efc0b5ee06b49a2563 | 570be2579c5de1996d633f4d86ddb767 | 升序排列。 | public class ArrayUtil
public <T extends Comparable> void sortedByAsc(T[] array) {
if(array==null || array.length==0) {
return;
}
sortAlgorithm.sort(array);
} | 1 |
bf10d21a746d5730bceac48bb0ef2c8a | 25d512c68a4dabb5e7876425eb3d2ec7 | 通过filepath查询book信息 | func GetFilelist(root_path string) {
t1 := time.Now()
err := filepath.Walk(root_path, func(root_path string, f os.FileInfo, err error) error {
if f == nil {
return err
}
if f.IsDir() {
return nil
}
paths, fileName := filepath.Split(root_path)
new_book := Book{}
new_book.book_path = paths
new_boo... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.