query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
6a68ae488b32353a048d4a4f0df168b9 | e20d94e06a4c48d235af7c14a2172bfd | Gets query for [[Charging]]. | class TheSieuRe extends AbstractDriver
public function getChargeUrl(): string
{
return 'http://api.thesieure.com/chargingws/v2';
} | 1 |
4f9beac07842d58ff89a6813cb6eeedd | 15fe5a9e2c750b45720af75ff5eee37f | Метод виводить список всіх фракцій | {
for (int i = 0; i < QuantityFarey; i++)
{
Console.WriteLine((fractionMass[i].R).ToString() + "/" + (fractionMass[i].Q).ToString());
}
} | 1 |
8b2dfef9eaa0a73fb442ec5bec4456d8 | 2ae5279f48fb6a91a7f64e95927d90bd | Returns a boolean value given a sampling frequency/probability,
returning true with that frequency. | $success = false;
if ($sampleFrequency > 0) {
if (mt_rand(1, $sampleFrequency) == 1) {
$success = true;
}
}
return $success;
} | 1 |
475ddebfe16b051a33694d7a800136d0 | 55f86df2ba2145f2a0704a4f36d61f97 | Get the partitions for this RDD. | java.util.concurrent.Future<GetPartitionsResult> getPartitionsAsync(GetPartitionsRequest getPartitionsRequest); | 1 |
c465f57e0eefeeb21f8370e22bd0a5fc | 888295b09fe56440b635bf054025fec2 | ! Lists the uploaded files. The files which are uploaded by post function are
listed under that user's session folder. | class UploadController extends ApiController
public function index()
{
$uploads = Upload::where('user_id', '=', Session::get('id'))->get();
return $this->respond(Upload::_($uploads->toArray()));
} | 1 |
a47a5dbfce9fea9603459a894b748648 | 124f1baf2574540c2b240de74023c58c | write a simple ascii file with date and baseline columns | def read_baseline_file(baselineFile, exDateList=[]):
exDateList = ptime.yymmdd(exDateList)
if not exDateList: exDateList = []
fb = open(baselineFile)
lines = []
for line in fb.xreadlines():
l = str.replace(line,'\n','').strip()
lines.append(l)
fb.close()
date6List = []
... | 0 |
5369b0a30589ab71eaf64f159571be01 | 4295306983207514a8865c3cd80286d2 | Calculates the lower hull | upper = []
lower = []
points.sort()
for point in points:
while len(upper) > 1 and orientation(upper[-2], upper[-1], point) <= 0:
upper.pop()
while len(lower) > 1 and orientation(lower[-2], lower[-1], point) >= 0:
lower.pop()
upper.append(point)
low... | 1 |
b5fc5a14b5b3bdf55a85d82f82cc0b25 | b335a696b2886c27c0a4354f087f1e69 | Returns the number of items currently in a characters inventory. | {
int count = 0;
for (int i = 0; i < Avatar.MAX_INV; i++)
{
if (items[i] != null) count++;
}
return count;
} | 1 |
72301b64da7e1a3f11bc3d98dfc62030 | 10610857bdcb7efd56e9de6fcfd96c03 | 获得仓库语言占比列表 | String language) {
List<Map<String, Object>> ret = binolcm01BL.getDepotList(
organizationID, language);
return ret;
} | 0 |
c7faa8e7369fbd855bc74dac530edc5d | f7cdeeafdd4f2eabf2225a5a6215147b | Calculer le facteur d'ordonnancement pour cet état. | public class Controleur
public void setEtatTourneeCalcule() {
etatTourneeCalcule.init(this);
etatCourant = etatTourneeCalcule;
} | 0 |
14447cceffe48c281f7449e59f24f7c1 | 1700bf9b3c6ab39c747e4a5c3f83ed9d | 计算上个季度末天 | Calendar calendar = Calendar.getInstance();
Integer month = new Integer(0);
if (quarter == 1) {
month = 12 - 1;
} else if (quarter == 2) {
month = 3 - 1;
} else if (quarter == 3) {
month = 6 - 1;
} else if (quarter == 4) {
month = 9 - 1;
} else {
month = calendar.get(Calendar.MONTH);
}
... | 1 |
cbd8236569bf78d376530d1549ca80ac | 32fe8618afcd57b92be5a03067f9e0bd | Trigger fetching of high level object | obj = {
:jsonrpc => "2.0",
:method => "trigger.get",
:params => {
:output => [
"triggerid",
"description",
"priority",
"value"
],
:filter => {
},
:sortfield => "priority",
:sortorder => "DESC",
:expandData => true,
:expandCo... | 1 |
2e02b663d5d4e500bc2225a64ff7e674 | 5a210395fe8b898a38307a6965f51e21 | Constructs a dictionary that maps congressmembers to how they voted on certain bills | class Voting_Matrix(object):
def generate_matrix(self, category=[0,1,2,3,4,5]):
bills, members = self.load_data(category)
member_to_row = dict()
for index, dictionary in enumerate(members):
person__id = str(dictionary['person__id'])
member_to_row[person__id] = index
votes = self.fill_in_matrix(bills, memb... | 1 |
cdbaa414627c2cddbeea07e6159ba8ea | f8256d94a7c324eefb1171866ca35456 | Test for updating whether game has AI to an an incorrect gameId | public class MockServerFacade implements IServerFacade
@Override
public boolean addAI(int userId, int gameId){
return true;
} | 0 |
03d22cd22ec45ef43798186e536d6530 | 89d51be4b829591b8f37b514320bf63c | Left-hand side of ODE equation | def right_hand_side(x, t, args):
u = 0.0
arguments = hstack((x, u, args))
dx = array(solve(M_func(*arguments),
F_func(*arguments))).T[0]
return dx | 0 |
f923edf85ec5b9acd6c26639d9ea7d58 | 70d7e7bb23a6945341a2fc9a2956312b | Gets query for [[Pricelists]]. | {
$arrOptions['group'] = (($arrOptions['group'] ?? null) ? $arrOptions['group'].', ' : '') . 'tl_iso_product_price.id';
$query = QueryBuilder::find($arrOptions);
$from = substr($query, strpos($query, '*')+1);
$query = "SELECT tl_iso_product_price.*, GROUP_CONCAT(tl_iso_product_price... | 1 |
97fa1b7b562daca7bb2ef19ff064b985 | 48a91a53b53122df180df20f70d3b864 | sprawdzenie poprawności kodu pocztowego | function sprawdzKodPoczt($kod_poczt){
if( preg_match('/^[0-9]{2}-[0-9]{3}$/D',$kod_poczt)==true){
return true;
}else{
return false;
}
} | 1 |
43750ea6b3201acb6bbbbab6191922dc | e5fe0b13e61dff7532da72aaeee771f4 | Update or save a featured article | if ( ! isset( $_POST['be_featured_areas_nonce'] ) || ! wp_verify_nonce( $_POST['be_featured_areas_nonce'], 'be_featured_areas' ) ) {
return;
}
if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) {
return;
}
if ( defined( 'DOING_AJAX' ) && DOING_AJAX ) {
return;
}
if ( defined( 'DOING_CRON' ) && ... | 1 |
a934dcea41d0dcea769c0f2971d3fc2e | fbfbfac21a6323245f668b5ab73711c3 | this will be called from HAL to notify GEF of new device configuration | host_dev_config_t* dev_cfg,
uint8_t evt_channel_num)
{
_dev_cfg = dev_cfg;
_evt_chn_num = evt_channel_num;
return;
} | 1 |
5a6ab37ed2dbf08b687beb73b55ee2d1 | a3da5b98a046068f796a769a20181da4 | 更新支付信息payItem payInfo | Integer payinfoId = mlfrontPayInfoIn.getPayinfoId();
MlfrontPayInfo mlfrontPayInfoNew = new MlfrontPayInfo();
mlfrontPayInfoNew.setPayinfoId(payinfoId);
List<MlfrontPayInfo> MlfrontPayInfoList =mlfrontPayInfoService.selectMlfrontPayInfoById(mlfrontPayInfoNew);
MlfrontPayInfo mlfrontPayInfoIOne = Mlfront... | 0 |
8c7d09802ad0e764d1d97471cc80fcf2 | e77bcb8c7a398d4cdc35557c4fc50eb4 | return the Neptune specific explaination of the query
see https://docs.aws.amazon.com/neptune/latest/userguide/gremlin-explain-api.html
see https://docs.aws.amazon.com/neptune/latest/userguide/gremlin-explain-background.html | namespace Amazon.Neptunedata
public partial class AmazonNeptunedataClient : AmazonServiceClient, IAmazonNeptunedata
public virtual ExecuteGremlinExplainQueryResponse EndExecuteGremlinExplainQuery(IAsyncResult asyncResult)
{
return EndInvoke<ExecuteGremlinExplainQueryResponse>(asyncResult);
... | 1 |
e395acfac1a5ba5997b0c4d387c713c0 | b93363341b90420f906692e47fc7fa79 | ランダム画像変更関数 | function changeImage() {
var image = getRandomImage();
while ( image == document.getElementById( 'destruction' ).src.substr( -image.length ) ) {
image = getRandomImage();
}
document.getElementById( 'destruction' ).src = image;
} | 1 |
023ba2e9d9a2b72b7a84becd47f0b1e6 | 996dfec2a62b702608172af94dd1ad0d | find linear prediction filter using single value decomposition | void lpc(float *r, unsigned short p, spf_t *a, spf_t *k, float *e)
{
unsigned short i, j, jmax;
float v, tmp;
int warn = 1;
*e = *r;
for (i = 1; i <= p; i++) {
if (*e == 0.0)
v = 0.0;
else {
v = -r[i];
for (j = 1; j < i; j++)
v -= a[j-1] * r[i-j];
v /= *e;
if ((v ... | 0 |
39f16341b1c9c4abf8992123825fe77c | 554f09079b6f06b765b8ab858fe7544b | Translate pixel values to arcsecond units | self.nxy, self.dxy = gd.get_image_size(np.hstack(self.u), np.hstack(self.v),
**img_sz_kwargs, verbose=True)
self.dxy_arcsec = self.dxy / arcsec | 1 |
4194d4f0678fb63a5c5f480f78c444fa | 64aede4e5d25a96317312a2e93940dc9 | Extracts meta data from the request for use with the browse | def meta(url):
try:
metadata = loop.run_until_complete(run_metadata(url))
for key in ["encoding", "media", "encoding_vbr", "source"]:
del metadata[key]
click.echo()
pprint(metadata)
except ScrapeError as e:
click.secho(f"Scrape failed: {e}", fg="red") | 1 |
00b8522f417f46ff11fa20bb6c501fe0 | 339a031f1cb948e1b8765beb77958610 | 复制文件<br>
如果目标文件为目录,则将源文件以相同文件名拷贝到目标目录
源文件
目标文件或目录
是否覆盖目标文件
IO异常 | if (origin == null || dest == null) {
return false;
}
if (!dest.exists()) {
File parentFile = dest.getParentFile();
if (!parentFile.exists()) {
boolean succeed = parentFile.mkdirs();
if (!succeed) {
CLog.i("copyFile failed, cause mkdirs return false");
return false;
}
}
try {
... | 0 |
46fb2bae0635b26cdfc6eff46e94feb6 | 70a7c911d2ef8a4fd3c8e0556400e5bc | 从七牛上删除图片 | {
require_once(PLUGINS_PATH . '/qiniu/autoload.php');
$accessKey = $_SESSION['think']['user']['accessKey'];
$secretKey = $_SESSION['think']['user']['secretKey'];
$bucket = $_SESSION['think']['user']['bucket'];
$key = $url;
$auth = new Auth($accessKey, $secretKey);
... | 1 |
a8d30621617b926f951095da39473656 | 5869ef17c145f8d7a54f12381c466c64 | Read the data and OOB data from the device, no ECC correction with the
data or OOB data | enum yaffs_ecc_result check_ecc_data(unsigned char *data, int data_len){
unsigned char ecc_buf[9];
unsigned char *read_ecc = &ecc_buf[0];
unsigned char *test_ecc = &ecc_buf[3];
unsigned char *test_ecc_virgin = &ecc_buf[6];
int result;
int a;
assert(data_len / 256 == noob.eccbytes / 3);
ECC_ALGO_PRINT... | 0 |
864f210979a954ed58ce8fbdd710e7a0 | 608b0c2da40093b35429424f8391b719 | 根据教师id获取学生 | List<TeacherModel> getTeacherList(int stuId)throws Exception; | 0 |
c02b17561f0ccbe69f82bf758859fcef | b1ac4445ba06691f235026e25f37b1a8 | Flush a file to disk. | static int
file_flush (void *handle, uint32_t flags)
{
struct handle *h = handle;
if (fdatasync (h->fd) == -1) {
nbdkit_error ("fdatasync: %m");
return -1;
}
return 0;
} | 1 |
5094dc7a6b5578d0588d60b795d86bbb | 71dce59088166c25f852044bc00ff1ca | Updates a notecard citation. | let ret: boolean = false;
const item = this.getItem(id);
if (item.note.getTitle() !== title) {
item.note.setTitle(title);
item.needsUpdate = true;
ret = true;
}
if (item.note.getBody() !== body) {
item.note.setBody(body);
... | 0 |
0a3b445d314cf4dac11966ccbc985b3a | 35069f4ca598863028df8caa4779a7c8 | Sets the physical file size for the specified file to the current position of the file pointer. | namespace NtfsSharp.Contracts
long MoveFromCurrent(long offset); | 0 |
6bd2a1da6aaa5489391f0cc69376435f | 6b495b93fc149f8d4a05b275b458606e | Sets when you would like to install optional updates. | class _HaproxyLayerState:
def install_updates_on_boot(self) -> Optional[pulumi.Input[bool]]:
return pulumi.get(self, "install_updates_on_boot") | 0 |
c31ad7bf00544f7535f99b55b093f4a3 | 25c372cce959317650283e3f580d414e | @brief 向下键功能键的回调函数 | static void sys_win_direct_key_up_cb(KEY_MESSAGE *key_msg)
{
dis_select_text_ele(g_cur_text_ele);
if(&g_cur_win->text.list_head != g_cur_text_ele->list.prev)
{
g_cur_text_ele = list_entry(g_cur_text_ele->list.prev, TEXT_ELE_T, list);
}
select_text_ele(g_cur_text_ele);
} | 0 |
44e6a261721ba092f8aff4087793977d | 939ab2b3b267ae7ea0dc4f6932b4e95f | Tests the modifying addition of a field and a root Template. | Root root = getRootExample();
inheritanceDao.createRoot(root);
root.setRootProp(new Double(-166963355.0));
inheritanceDao.updateRoot(root);
boolean found = false;
for (Root currentRoot : inheritanceDao.findAllRoots()) {
if (currentRoot.equals(root)) {
found = true;
... | 1 |
dd88f2cbf57ed746fb671eb3dd842b39 | 0b73d1071d608d5237548099c1ededa1 | Get Team Players base on selected team
Debounce quick changes to Team toggles | let name: string;
switch (playerRole) {
case 'player':
name = this.playerDataArray.controls[i].get('playerName').value;
this.teamService.playerName = {index: i, playerName: name};
break;
case 'farm':
name = this.farmPlayerDataArray.controls[i].get('playerName').value;... | 0 |
823d11f625f35ae37a4cd7ee67eee62a | 27286743b2f5863f19ee4f9ec18c4094 | 如果正在提交,则返回false, 表示当前动作是重复提交 | function checkSubmit(){
var resubmit = $("#flagSubmit").val();
if(resubmit) {
return false;
} else {
resubmit = true;
return true;
}
} | 1 |
3c277b0963df3baedcbfa4791f31df81 | c20c47100254390114d7a17904d57775 | 查出所有一级分类 | public List<ProductCategory> getAllFirstCategory(); | 1 |
bd1814248d089b0208818cb83afe5d65 | 9141547a38545e63293f2d2223425258 | write a value (0-255) into the specified register | int i2cm_write(int i2c_fd, int addr, int value) {
i2c_register_write(i2c_fd, AS7265X_I2C_ADDR, addr, value);
} | 1 |
b82411772c14a19f2039277e37f385a4 | 342014a202988eb0436adc6408c8d52b | Gets the right extrapolator name. | @BeanDefinition
@Config(description = "SABR Swaption Interpolation", group = "SABR Params")
public class SabrSwaptionInterpolationConfig implements ImmutableBean
public String getRightTenorExtrapolatorName() {
return _rightTenorExtrapolatorName;
} | 1 |
8025f75c537ec1500263681e70bdb8ae | ea137c9a43b2c43add2d900f7a8a19fe | The button HTML to use. | class DialogTable extends Widget
public function button($button)
{
$this->button = $button;
return $this;
} | 0 |
f6718262f50807065f86ca094bdae995 | 7bcd3df3cee5e32daf3866feb8d41bf7 | Helper function that clears the given pixel.
@brief DrawArea::clearPixel | void Display::clear_pixel(uint8_t x, uint8_t y)
{
set_pixel(x, y, CRGB::Black);
} | 1 |
5dad1abde637eca59e33560005beea96 | 06b1628ef0358eb6884d2598e0262e04 | 顶部个人信息 | return (
<div>
{}
<div className='personInfo'>
<div className='Info-Box'>
<div className='header'>
<div className='headerImgBox' style={{width:60,height:60,backgroundColor:'#fff'}}><img style={{width:60}} src={ip+'/imgs/'+`${this.state.header}`+'.jpg'}/>... | 1 |
a30a813eb2d758d81cc1317678936a46 | bc5a7d503d1e7926b709ab05e32c875c | ○ CWパーティ編成 ステータスの再作成 | class Window_BattleStatus
def refresh
if @last_fronts != $game_party.front_members.size || @last_backs != $game_party.back_members.size
create_windows
self.visible = true
update
else
@windows.each { |w| w.refresh}
end
end | 1 |
dbb8ddde994adc90b6cf8719d393987c | 81656bd1ca6b2a468024c880e19bb018 | 登录失败获取元素 | class QQLoginHandle:
# 对page页面元素的操作
def login_fail_prompt(self):
return self.qq_login_page.login_fail_prompt() | 1 |
4eb9c1bd8ad73e2a468dd8ac041f19fa | fbe20422cec39c939ff41ed63da80da5 | 读取文件所有内容; 除非调用read_lseek重置位置或有新内容写入, 否则超出文件长度后将会返回空字符串. | function file_get_contents($filename, $use_include_path = false, $context = null, $offset = 0, $maxlen = null)
{
return '';
} | 1 |
1ce1447bcbd9e88f7aee4ab816c879c4 | 169b021fc1034238519451beb6c696e5 | Returns a hash of the seed used in the sketch. | abstract class JApplicationTracker extends JApplicationWeb
public static function getHash($seed)
{
return md5(JFactory::getConfig()->get('secret') . $seed);
} | 1 |
2b6d12005382984e50a3bf85a7e3649c | a8ec6f0f09ecf37ec487b8330fe03009 | このファクトリが生成するオブジェクトを管理するかどうかを設定する。<p>
trueにした場合、その後、このファクトリによって生成されるオブジェクトは、このファクトリの管理化に置かれる。管理されているオブジェクトは、このファクトリの属性の変更を反映される。(どのような属性が管理されるかは、実装に依存する)そのため、このファクトリが参照を保持するので、使う側が参照を捨てても、ガベージされない。このファクトリが、破棄された場合には、管理されているオブジェクトの参照も破棄される。<br>
falseにした場合、その後、このファクトリによって生成されるオブジェクトは、このファクトリの管理化に置かれない。管理されていないオブジェクトは、このファ... | public class CreateProduct
public void setCatalogManaged(boolean catalogManaged) {
this.catalogManaged = catalogManaged;
} | 1 |
e2ce1a1cf6bc749ddd5d489625e77b73 | 44519bdc8234e0ee415800d4ecdb93b1 | Returns a collection of all connection string registered via deep config | {
var connStringEntityList = from values in doc.Descendants("connectionStrings").Elements("add")
select new ConnectionStringEntity()
{
Name = values.Attribute("name").Value,
... | 1 |
da07bdf8151e291b257c9d5134b096f1 | 3a843b8f3f147d3c1aa201d3e7ba99a4 | 显示底部格子的状态并且根据不同的状态显示对应的颜色 | switch (state){
case 1:
mBinding.txtDetail.setTextColor(ContextCompat.getColor(this, R.color.white));
mBinding.txtEvaluate.setTextColor(ContextCompat.getColor(this,R.color.white));
mBinding.txtCommodity.setTextColor(ContextCompat.getColor(this,R.color.... | 1 |
fbc70067021d7d73102acb839e1b4c3f | 6fdab79ce83b9145a4c5c26dc8668097 | Enables the value fields and disables
the save and change buttons. | public class adminGuiController
public void enableEditing() {
nodes = vboxValues.getChildren();
for (Node node : nodes) {
if (node.getId().equalsIgnoreCase("locked")) {
node.setId("");
((TextField) node).setEditable(true);
node.setFocusTraversa... | 0 |
4cfcfed08a624ed549dbc395c9e7a40a | a49d3418b3952c1f934669dd16cbc685 | Returns whether the current head has leading whitespace. | class Line:
def startsWithSpace(self):
return self.__text[0].isspace() | 1 |
03a43f3afb02e64a59e21c42d247b208 | 216949ce494d3d8a7a13a177a285b8b4 | 发布可执行脚本文件 | def write_script(filename, cmd):
fid = open(filename, 'w')
fid.write("#!/bin/bash\n")
for s in cmd:
fid.write(s+'\n')
fid.close()
os.chmod(filename, 0700) | 1 |
8b7de0665de3172c8e5d9e72ef11fec5 | 235fb5a28fb8fc8a8dc6cdf9f85c66aa | Записывает время получения бонуса в бд | {
$balance = $_POST['balance'];
$status = $_POST['status'];
$date = $_POST['date_bonus'];
$mysqli = connection();
$sql = <<<SQL
UPDATE bonuses SET balance = '$balance', status = '$status', date_bonus = '$date'
WHERE id = $id AND id_client = $client
SQL;
try {
if (!$mysq... | 1 |
8bba2293caeb9026b987a2e68fbea34d | e681236858403ebb87ec11105e036f83 | Успешная запись на урок | class AddTest extends DbWebTestCase
public function testSuccess(): void
{
$this->authAsAdmin();
$successData = $this->getSuccessData();
$this->postWithContent(self::BASE_URL_TEACHER_1, $successData);
$data = $this->getJsonData(Response::HTTP_CREATED);
self::assertEmpty($data)... | 1 |
d8fb24d6c75358c89295410ede31cca3 | 7810b749b7abbd21efd962ad6d364299 | bubble sort to sort catalogue by price | void sortPrice(Item inventory[])
{
Item temp;
bool swap;
do {
swap = false;
for (int i = 0; i < SIZE - 1; ++i) {
if (inventory[i].price > inventory[i + 1].price) {
temp = inventory[i];
inventory[i] = inventory[i + 1];
inventory[i + 1] = temp;
swap = true;
}
}
} while (swap);
} | 1 |
b1a2f8161d57a1757a3d0e5f194137f8 | 39ecd4b22b3c8acfe1e0c97f06102e76 | Set a user's role in this organization, as described in :py:meth:`get_roles()`.
This can be either ``ROLE_USER``, ``ROLE_ADMIN`` or ``ROLE_GUEST``.
.. note::
Although for org admins, :py:meth:`get_roles()` will return both
``ROLE_USER`` and ``ROLE_ADMIN``, to make someone an org admin you only
need to pass ``ROLE_ADMIN... | class ApiUserAuthMetadata(object):
def role(self, role):
self._role = role | 1 |
21da5495756317c65d933adfe04960e7 | faac5735844f801d8bde77f2ea47aae6 | 掛け算の結果を返す | namespace Basic
public class Calculation
public int AddDouble(int x, int y)
{
return hoge.Add(x, y) * 2;
} | 0 |
450f6bcd0ba4c7b8d41a387f43e24a80 | dcd634599bb8e4cffdfdcdb60d8106cb | creates a new enrollment | class EnrollmentsController
def create
@enrollment = Enrollment.new(params[:enrollment])
respond_to do |format|
if @enrollment.save
flash[:notice] = 'Enrollment was successfully created.'
format.html { redirect_to(department_lecture_path(@enrollment.lecture.department, @enrollment.lecture)... | 1 |
999a53785d4fa25d8374f7d70380023c | ceb02e0b36e6131ace313ccf3a323bb4 | 伪大数相乘(大数相乘基础) | {
bigInteger tmp;
int num1[500] = { 0 };
int num2[500] = { 0 };
int result[500] = { 0 };
for (int i = 0; i < obj1.length; i++) num1[i] = obj1.data[obj1.length - 1 - i];
for (int i = 0; i < obj2.length; i++) num2[i] = obj2.data[obj2.length - 1 - i];
for (int i = 0; i < obj1.length; i++)
... | 1 |
e69bcd2895dc924aeb27906580ddac57 | 41c13c74d797ff15a54bb03f61535c83 | Set the view template for the admin control bar
Called by the EkpAdminControlBar Helper | class ListBuilder extends BaseCtl
public function initialize() {
parent::initialize();
$this->_template = 'builder/list';
} | 0 |
58fd6a10c163a71a6ad16bc4ad826f12 | f56a39bd56a3100d1d36880631637aee | 循环去重,使用 === | datas = datas||[];
for (let j = 0; j < datas.length; j++) {
let valid = true;
const data = datas[j];
for (let i = 0; i < this.data.length; i++) {
const element = this.data[i];
if(element === data){
valid = false;
... | 1 |
0f5bedd1f60a098389a605808b46ea2f | 84d37efbf9126ebf91c3d0f4727543eb | Compute Levenshtein w/ embedding similarity-based weigthing | static double lv(unsigned int *a, int na, unsigned int *b, int nb, double *weight, double maxDistance, double *scores){
if (na == 0){
if ( maxDistance > 0 && maxDistance < nb ){
return -1;
} else {
return (double) nb;
}
}
if (nb == 0){
if (maxDistance > 0 && maxDistance < na){
re... | 1 |
9bf2cdd16831e74bb4492cfc5de12e14 | 090755ab405319881fe1df5155941d94 | Test if function raises a ``ValueError`` when the list of event photons numbers
is empty. | with pytest.raises(
ValueError,
match=r"Please provide a bin number greater*"
):
check_number_bins(num_bins=-1) | 0 |
a682b2e55c15e4bdc63166b206fc7989 | 28a4a05fef889ae24f1f20bb0aed7d36 | Returns the player's total experience. | class PlayerStats extends \Protobuf\AbstractMessage
public function getExperience()
{
return $this->experience;
} | 1 |
844dc5b3670b74af0a250a54cbb066d4 | b888764c1c3def6b967a342b0834e747 | Generate a subsetted copy of an .otf or .ttf font. | let currentFilePath = `${outputFontPath}/${filePathToFilename(inputFontPath)}`;
mkdir(currentFilePath);
emptyDir(currentFilePath);
let transFont = fontCarrier.transfer(inputFontPath);
let font = fontCarrier.create();
font.setGlyph(transFont.getGlyph(targetText));
font.output({ path: `${curre... | 1 |
23149bb5dcb107cbb562e0c4a872c6d7 | d4a04420c2aec359eb7d1d09b90e8e55 | Esta función permite validar si existe una función en el controlador
preparada para ser llamada como la acción invocada | abstract class Controller_Abstract
public static function isValid($controller)
{
return ($controller instanceof Controller_Abstract
&& is_callable(array($controller, 'index_Action')));
} | 1 |
c20d46531a9301ab2035cf2e880cc671 | bcc7ebb98168fa5f3a8312ddc072315d | Removes an input dataset field from the DataJobPatchBuilder. | public function removeField($name); | 1 |
043090ade6ace65d0d4577ab43577f39 | 1db95889b4afc6d9d4e34fdd532d049b | 返回source_file在target_dir对应文件有修改的文件路径集合 | function diffNotRelyOn(src) {
const arr = eachDir(src).map(o => o.src)
const fls = getRelyOn()
const notRelyOnFile = arr.forEach(s => !fls.includes(s))
console.log(notRelyOnFile)
return notRelyOnFile
} | 0 |
fa07a2c9bff38691f32ba877ed63ac13 | d9633acad8a1939bde1522111c2db7e8 | Performs topological watershed by performing the method of Ju et. al 2007 for every grayscale level. | def _watershed(labels: np.ndarray) -> np.ndarray:
dists = _distance_transform(labels)
seeds = _watershed_seeds(dists)
_, markers = cv.connectedComponents(seeds)
water = morphology.watershed(-dists, markers)
return water * (dists > 0) | 0 |
e91e955199f1f4df83715a66de82985f | 907f45fe6984517626f8a06f8e72d12b | Updates statistics of current search. | namespace PKS.WebAPI.Services
public class SearchService : AppService, ISearchService, ISingletonAppService
public virtual SearchStatisticsResult Statistics(SearchStatisticsRequest request)
{
return Task.Run(() => StatisticsAsync(request)).Result;
} | 0 |
170e1f5e2c43c9f7375a2bc7f5e298c8 | cdf2415bb4b60cf11a707319ea915890 | Gets the id of this HostnamesForIp. # noqa: E501 | class IscsiTarget(object):
def id(self, id):
if self.local_vars_configuration.client_side_validation and id is None:
raise ValueError("Invalid value for `id`, must not be `None`")
self._id = id | 0 |
456a34b9320aa71fe9d47ed82b5c082d | 8faa404f82e8370524b4be45c0dd3048 | Удалить сохраненный плейлист по его имени | class VideoPlayer:
def delete_playlist(self, playlist_name):
self._playlist.delete(playlist_name) | 1 |
59e4b8e1d848357c50df2d371a2d8d54 | c34d225c79d226fc50114d5f197ab48c | Draw every object in their new position | {
for(var i =0; i < oTools.objs.length; i++)
{
oTools.objs[i].updatePos();
}
} | 0 |
46fecab68e8d363eb677748fc970245d | 8d8a8a0c2b4c4fa40d101b6a754f129b | Link all territories together | setTerritoryNeighbors("alaska", "northwestTerritory", "alberta", "kamchatka");
setTerritoryNeighbors("northwestTerritory", "alaska", "alberta", "ontario", "greenland");
setTerritoryNeighbors("greenland", "northwestTerritory", "ontario", "quebec", "iceland");
setTerritoryNeighbors("albert... | 1 |
a477c5ecf4f57f141389e506ceef4c19 | 26b6284a8acc0ee644b9bcbad4166ff2 | 设置计价方式(1-普通,2-计重, 3-计数) | class AutoPriceInfo
public function setMode($Mode)
{
$this->Mode = $Mode;
return $this;
} | 1 |
a2b7d488671668b74dc26c71e2bbd811 | 29b50d07f49410a43c1a6827ddd2e9cd | Raises the DataBinding event. | {
var bindData = new BindDataHandler(BindData);
this.BeginInvoke(bindData, true, true, true, true);
} | 0 |
fff9770473bbcbf849231c46ebf7f060 | e61b3893c11556b185fed8512bc16ced | Gets the name of this MemoryParameters. # noqa: E501
A name for the Memory. # noqa: E501 | result = self._values.get("name")
assert result is not None, "Required property 'name' is missing"
return typing.cast(builtins.str, result) | 1 |
1231a202517fa03ea0374d0472587ee8 | 8ea80170153108984cd1a05d47e1389d | Factory method that creates a new IFieldPredicate predicate: [FieldName] [Operator] [Value].
Example: WHERE FirstName = 'Foo' | IFromQuery<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10> Where(bool condition, Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> ifPredicate, Expression<Func<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, bool>> elsePredicate = null); | 0 |
8f00bcf3976961af065f65c1781492d9 | 54c1b7c27480024d4a329968c1437630 | SETNO r/m8 | MODRM m = read_modrm(emu);
assert(m.mod == 3);
int8_t imm8 = readmem_next_uint8(emu);
if (m.raw_r == 0 ) { update_flag(*m.M, (int32_t)imm8, emu) ;*m.M += imm8;}
else if (m.raw_r == 1 ) { *m.M = (*m.M | imm8) ;}
else if (m.raw_r == 2 ) { EXIT_MSG("adc is not supp... | 0 |
c8098164fa03b48d2b5b6115d44c63d0 | 3251344d1c9c31b563014e78f40d0a7f | 科目明细账<BR> 查询AccSubjLedger分页 | public List<AccSubjLedger> collectBalanceLedgerDetail(Map<String,Object> entityMap, RowBounds rowBounds) throws DataAccessException; | 1 |
5df81bf2f589a62d35f20bffdd36d2e0 | 9d49064114b56b250f01f19f12b707e5 | Remove `pad_width` voxels around the edges of a given patch. | def pad_func(array, pad_width, axis, kwargs):
pad_val = kwargs.get('pad_val', 0)
array[:pad_width[0]] = pad_val
if pad_width[1] != 0:
array[-pad_width[1]:] = pad_val | 0 |
854ba3cab8955d7e36180c1646ba2ab0 | 1220450cca9f5bc44c793a0ef80e02e6 | Returns the time the network transfer took in nanoseconds. | namespace UnityEngine.Networking
public sealed class NetworkTransport
[WrapperlessIcall]
[MethodImpl(MethodImplOptions.InternalCall)]
public static extern int GetNetworkTimestamp(); | 0 |
c49efd395895848fcd6d1afb3ecb8909 | 9da6d9ea8f28ff898fbc3d2b4cabb702 | 交换数组中索引为p,q两个元素的值 | public class IndexMinPQ<Key extends Comparable<Key>>
private void exch(int i, int j) {
qp[pq[i]] = j;
qp[pq[i]] = i;
int tmp = pq[i];
pq[i] = pq[j];
pq[j] = tmp;
} | 0 |
7bd1f279650448bff1d04a6971737f96 | e52b99258e6c6fc1bdb19ca52b8e74d6 | 设置当事人类型 | @Table(name = "gas_market_precise_detail")
public class GasMarketPreciseDetailDO implements Serializable
public void setMemberType(String memberType) {
this.memberType = memberType == null ? null : memberType.trim();
} | 1 |
10941f9996b71dcc9045c0df4437aafb | ff49c55354b1346c22909d321de51d0b | Sets email 1. | {
if (!is_null($id1) && !(is_int($id1) || ctype_digit($id1))) {
throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($id1, true), gettype($id1)), __LINE__);
}
$this->id1 = $id1;
return $this;
} | 0 |
b5cebf976fce7b155ef33748966b30b2 | 57fd93aa476f49a7da65af352902c1c8 | このメソッドを使って関連付いているレコードの一覧を取得しているのです。
今回のHistoryテーブルは、Newsテーブルの変更履歴を記録するために利用されます。
つまり、Newsテーブルが更新されるタイミングでHistoryテーブルが作成されるということになります。 | class News extends Model
public function readingHistories()
{
return $this->hasMany(readingHistory::class)->where('liked',true);
} | 0 |
39deb612b031a2c85acb688eaf1fdfb4 | 08224d55a083d8860215e95832684c1e | 通过团队id得到团队下的所有关系(不包含项目的) | public List<UserTeam> getUserByTeamId(int teamId) throws Exception; | 1 |
fd01fe74da66e28ce2c6b88aeb8dda49 | a362fd2994f2a12d766f9875d51311c9 | 斜率
如果是垂直线,则返回Infinity | namespace Geo.Coordinates
public class XyUtil
public static double GetSlope(XY lineAxy1, XY lineAxy2)
{
double aDeltaX = lineAxy2.X - lineAxy1.X;
double aDeltaY = lineAxy2.Y - lineAxy1.Y;
if (aDeltaX == 0) return Double.PositiveInfinity;
double slopeA = aDelta... | 1 |
75fdc8e5f86e7e6a19a5165520368f74 | 49e1bf2dfbf25193cc15ed47217fc9a1 | 今月の家計簿を額のレポートの文字列にして返す | $y = $yy;
$m = $mm;
$getBody='';
$wd1= date("w",mktime(0,0,0,$m,1,$y));
for($i=1;$i<=$wd1;$i++){
$getBody .= "<td> </td>";
}
$d=1;
while(checkdate($m,$d,$y)){
$gokei = $this->hiniti_gokei($y,$m,$d);
$today = date('Y-m-d');
$aaa ... | 1 |
3d5f245fe78e8ed7e5cde88fa33c6b77 | eba45b58f776b52682cf8f4365ea52ec | Set Swimmer 2 Id property | class SDIFD2Record extends SDIFDxRecord
function setSwimmerAddress2($txt)
{
$this->_swimmer_address_2 = $txt ;
} | 0 |
b04d253473d540173d32ebfd15d86809 | 3bb087384ec028f9b4c59bd909e040e6 | Add a new Spark to this figure. If ``spark`` is none, a new Spark is
created with default attribute values and returned. | ax = plt.subplot(self.gs[row:row + rowspan, col:col + colspan], **kwargs)
if name == None:
name = 'ax{0}'.format(len(self.axes))
self.axes[name] = ax
if self.verbose:
print self.prefix + 'added axes at rows {0}-{1} and columns {2}-{3}, named {4}'.format(row,row + ... | 0 |
4d15616c0c97894fbdd84c8e5270bda7 | e17fcc6afe7a62110fb869c1ed757218 | On trigger enter event handler. | {
if ( VuScriptPlug *pPlug = mpScriptComponent->getPlug("OnTrigger") )
pPlug->execute(params);
return VuRetVal();
} | 1 |
a27feb9644a322899f3bcb98fdf75129 | 4c5a07218ad49283c5cdd412248466d7 | Returns the Destination Register field for this instruction. | static int get_dreg(uint32_t insn)
{
return (insn & 0x003e0000) >> 17;
} | 1 |
11b576b3ba38896ebb1cad20e39bf313 | 2d73481efe5a4aea3913a58cfca75eea | Helper method to make sure that memcached extension is loaded | class EE_Cache_memcached extends CI_Driver
public function is_supported()
{
if ( ! extension_loaded('memcached') && ! extension_loaded('memcache'))
{
log_message('debug', 'The Memcached Extension must be loaded to use Memcached Cache.');
return FALSE;
}
if ( ! is_null($this->_memcached))
{
return TR... | 1 |
f9c35d539bc84203cf51ec107091b414 | a7b82c7c387e5a5d53104882bb5538cc | Deletes one or more activities. | class Activityajaxcalls extends MX_Controller
function delMultipleActivity(){
$items = $this->input->post('items');
foreach($items as $item){
$this->Activity_model->delete_activity($item);
}
} | 1 |
d8eb1df5a6c107eb0f01a297e7e5e1ef | 31ed9d71bc7ca3e34f2a2757c2b26545 | The <see cref="FFmpegClient.GetOrLoadLibrary(string)"/> loads the ffmpeg library. | namespace OpenCvSharp.PInvoke.NativeLibraryUtilties
void LoadLibrary(string filename); | 0 |
f5b5f6272509e7222310f91021afd609 | f5fd656254c3e6aef700e47979bc7f4a | 各パーツごとにデフォルトに戻すflagを入れる | namespace ymglp
void UtilFcn::resetFlag()
{
has_nearest_index_ = false;
has_nearest_direction_ = false;
has_local_goal_ = false;
search_index_bgn_ = 0;
search_index_end_ = plan_.size()-1;
} | 1 |
12da0cc4edc7083f0a98168bae6bbf4a | f3162a213b65c0ec22fc6f6ca42a753b | Gets the course year combination. | {
return (from cy in Context.CourseYears
where cy.AcademicYear.SchoolID == schoolId && cy.AcademicYear.StartDate <= DateTime.Now && cy.AcademicYear.EndDate >= DateTime.Now && teachingYearCodes.Contains(cy.YearType.Code)
select new CourseYearsByCodes
... | 1 |
ee3a7112f32264662f534dbaa72ccec0 | 987a84c116d3107705d649e451a05560 | !
@brief
Gets the MIDI jack type.
None
Returns the MIDI jack type. | {
static char *jack_locations[4] = { "Ext", "Int", "Sep", "Oth" };
return jack_locations[(cfg >> (AC_DEFCFG_LOCATION_SHIFT + 4)) & 3];
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.