query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
47315b5b0bd275619b5df847ab113710 | 149828412b2158d6d59ff94ee1b10f0e | generate VM demands per user with different senarios | sim = cs.create_sim({'rand_seed':0}, pop_size=pop_size)
base_beta_s = sim.pars['beta_layer']['s']
scns = sc.odict()
remote = {
'start_day': '2020-09-01',
'schedule': 'remote',
'screen_prob': 0,
'test_prob': 0,
'trace_prob': 0,
'ili_prob': 0,
'beta_... | 0 |
99f8e8afa5eb48dfce6d58d0c50fe5be | 6b5827554ddb4178a6b6d287c7dfa18a | Roda a batalha | namespace BattleArena
class Game
public void Battle()
{
} | 1 |
9dc89596e17447e2f3e7c05bc5bc6944 | 356aa25bbb6bcf6544487142f0a3721f | Sends off assembled message | void LocoNetInterfaceScaffold::forwardMessage(int i) {
sendTestMessage(outbound.at(i));
} | 1 |
35f47e1738b8c901ef6b28b612bc796b | 76f175a6e57b5636f8902cf0a3666f39 | 先删除文件下原先的内容 | function delete_file_content($file, $content)
{
if(false === check_file($file))
{
return false;
}
if(!isset($content) || strlen($content) <= 0)
{
return false;
}
if("Linux" == PHP_OS)
{
$line = find_file_content($file, $content);
if(isset($line) && $line > 0)
{
if(false !== strripos($line, PHP_EOL... | 0 |
60c75a711485fea356f00e8097665cd2 | d6cef575bd8ce9bee9de2db7d4c9d4ce | 将分解得到的argbs[x][y][0~4]合并为rgbs[x][y],即:
<p> 将argbs中的 alpha, red, green, blue 合并 </p> | public class RgbUtil
public static int[][] combine_argbs(int[][][] argbs) {
int width = argbs.length;
int height = argbs[0].length;
int[][] rgbs = new int[width][height];
for (int x = 0; x < width; x++) {
for (int y = 0; y < height; y++) {
rgbs[x][y] =
... | 1 |
4a50f6af05c409e0fbb7f9ec23d9f63e | 7deb743bf66d6d005a859b69448bea28 | Obtener cada uno de los pdf subido por el estudiante, se guarda en un objeto VO, para posteriormente ser guardados en
la base de datos | System.out.println("procesoPDF");
Edicto aux;
Download dw = new Download();
Iterator it = edictos.iterator();
int contador = 1;
int total = edictos.size();
while (it.hasNext()) {
System.out.println("Pdf " + contador + " de " + total);
aux =... | 0 |
b16930fdf5391695fb0638a58a5166e4 | 8f6d587b9a0bc15936ea97f34c3ae07f | 保障计划执行的总人天统计,用于外场保障计划变更与执行管理 | _ret = {}
_quota = 0.
for _i in self.task:
_pj_name = _i['issue'].split('-')[0]
if _pj_name not in _ret:
_ret[_pj_name] = 0.
_issue_updated_date = _i["created"].split('T')[0]
if handler.is_date_bef(_issue_updated_date, st_date) or h... | 1 |
91818cfbe02dda714e9f11e9cf8e8966 | 0a42bf134d7b0e35d7c97216fbf3bd1a | <PRE>
患者エージェントが集中治療室待ちをしているかのフラグを取得します。
</PRE>
1 集中治療室待ち中 | public class ERPatientAgent extends Agent
public int iGetEnterIntensiveCareUnitFlag()
{
return iEnterIntensiveCareUnitFlag;
} | 1 |
1cdc2e592fa2228992c513ca81891576 | 158141dcbad93245976c2c3934670db1 | 设置普通攻击 | public class MyAiBoss : MonoBehaviour
public void NomalAttack()
{
switch (m_myObjectName)
{
case "CarryMinister(Clone)":
if (m_hitPoint < m_maxHitPoint / 2 && m_specialAttackCount == 0 ||
m_hitPoint < m_maxHitPoint / 4 && m_specialAttackCount == 1)
{
SpecialAttack();
m_specialAttackCoun... | 1 |
e203942e290779d438129cd89f3088a6 | 44521eb42d63ccde74f49fd083746567 | Reads and parses examples from data files .tfrecords. | _, string_tensor = parallel_reader.parallel_read(data_sources=input_reader_config.input_path,
reader_class=tf.TFRecordReader,
num_epochs=input_reader_config.num_epochs,
... | 1 |
7f524c5399f02c7aa1bcc3040f7b4b57 | 93b809e5643c3ea45ec19a7155627acb | Kirjoittaa Ruokalajien nimet tiedostoon ja käskee ReseptienKäsittelijän
kirjoittamaan Reseptit | public abstract boolean createResepti(String resepti_nimi, String resepti_ohje); | 0 |
9a07e79d98abbf871ff6dd085ce45516 | 55bc4f29e0fa5b8d867c5c1bfc290b99 | Generates a list of pairs of rhyming words for producing rhyming sonnets. | def rhymeWord(word):
import pronouncing
if type(word) not in [str]:
raise TypeError("Input of type {}".format(type(word)))
return tuple(set(pronouncing.rhymes(word))) | 0 |
562e22f614175becd3ec6311df75b614 | 74e4d4c88ed3854463993c6668209ddc | A struct to hold the accuracy and area under the curve scores for a particular training run | self.acc_train = accuracy_score(self.y_train, self.preds_train)
self.acc_test = accuracy_score(self.y_test, self.preds_test)
self.balanced_acc_train = balanced_accuracy_score(self.y_train,
self.preds_train)
self.balanced_acc_test ... | 0 |
b17283719054096644db13bd04fb16ee | 1577e9ef06752d552b9dc8299bd8534f | This method populates Association To Delete. | ArrayList<DemandASSOData> assos = new ArrayList<DemandASSOData>();
for (ASSOData data : list) {
for (DemandASSOData conn : data.conn) {
DemandASSOData demandAsso = new DemandASSOData();
demandAsso = conn;
demandAsso.tag = data.tag;
assos.add(demandAsso);
}
}
return assos;
} | 0 |
a86f41ccf5fef3cd7a41a1f3efea6d79 | 2600df25c22f2c6b2c9067430f2bc396 | Procesa los llamados a listar sub-categorias | class PagSubcategoria extends CI_Controller
public function index() {
$this->lista();
} | 1 |
bb8fe0b6137d8cdd9d19dde9332d6c49 | ab125a11fa00eb68549b19553ee520db | A generator for creating a random chars id of specific length | random_id = ''
for _ in range(length):
random_id += chr(random.randint(0, 255))
return random_id | 1 |
638ea4a8a783f567983c839aee8548b6 | 001a3441004a07daecec958895cf7f1b | Returns the centre point of an array of points. | let pts = [];
if (points != undefined)
pts = points.slice(0);
if (pts.length)
{
if (pts.length == 1)
return points;
if (pts.length == 2)
{
return ({x: (pts[0].x + pts[1].x)/2, y: (pts[0].y + pts[1].y)/2});
}
else
{
let x = 0, y = 0;
... | 1 |
d20dade691e2722076c45a04045ffc1b | c99d23bf81d95ef4ece93e659ecd9f6e | (display obj)
(display obj port)
print value to provided port or to stdout if no port is provided | fth_port_display(FTH port, FTH obj)
{
if (FTH_FALSE_P(port))
port = ficlVmGetPortOut(FTH_FICL_VM());
if (FTH_IO_P(port)) {
fth_io_write_and_flush(port, fth_to_c_string(obj));
return;
}
FTH_ASSERT_ARGS(0, port, FTH_ARG1, "an open IO object or #f");
} | 1 |
26ee2bb944302d49df81cdccf1f0d6a1 | dba702abad9b84682d240ddac9ab9f4c | 从所有管理列表移除当前Activity | class ActManager private constructor()
@JvmStatic
fun remove(activity: Activity) {
instance.removeActivity(activity)
} | 1 |
fbd09e7a4229921aa9d2d1a10ce55f74 | 3d2243d60ed63ab836e672a94cab7d00 | 拉取内存配置信息 | AlertDialog.Builder builder = new AlertDialog.Builder(SystemInfoActivity.this);
builder.setTitle("内存(RAM)信息获取");
String str1 = "/proc/meminfo";
String str2 = "";
String str3 = "";
try {
FileReader fr = new FileReader(str1);
BufferedReader localBuff... | 1 |
330f9ada5c55596f40ede5f6d1709c3b | b022a2bd3e081ea603d27fe1c555f963 | Check if postcode is required | {
$enabled = Mage::getStoreConfig(
'postcodenl_api/config/enabled',
Mage::app()->getStore());
$use_housenumber = Mage::getStoreConfig(
'postcodenl_api/advanced_config/use_street2_as_housenumber',
Mage::app()->getStore());
if ($enabled && $use_h... | 0 |
160880188105ce499e485391425e36f2 | 78e16929ce3cf48f66b00d566f9ca030 | iterative function to print postorder of a tree using two stacks | void iter_postorder(NODE root)
{
if (root == NULL)
return;
NODE stack[20],cur=root;
int top=-1;
do
{
while (cur)
{
if (cur->rl)
push(stack,&top,cur->rl);
push(stack, &top,cur);
cur = cur->ll;
}
cur = pop(stack,... | 0 |
402d5604a539c0c26bae4c8739336bdd | edb2193385d96cc91c94ccec74027b13 | 根据批次id 获取批次内未正常完成的任务列表,便于邮件通知
2016-8-22 09:59:15 | @Service
public class SIBatchService extends BaseService<SIBatch>
public List<SIBatch> queryFailureList(String batchId) {
return queryForList(sqlId("queryFailureList"), batchId);
} | 1 |
40f99e58f4efad665f20dabe50ab4bfc | 9635d81f0d50a4666a8d529b11e7173c | Adds a check for whether a test should run. | def should_be(x):
global tests, fails
tests += 1
if not x:
fails += 1 | 0 |
9d3aa11b7dc07e7f19a337d0468b7000 | 1ec6fcc04e9f042c7307a65873c4f660 | Generates the filename of the data download version of the SeriesData resource. | $resource_name = $this->resourceManager->getResourceIdFromRequest();
$version = $this->resourceManager->getVersionFromRequest();
if (!$resource_name || !$version) {
return NULL;
}
return $resource_name . PluginBase::DERIVATIVE_SEPARATOR . $version[0] . '.' . $version[1];
} | 1 |
f067b40069cc4a6fe1f3e7dbe693bee5 | 0cd4ab26acba52e54cf08cc26dcee4f7 | Function to show type hint | if self.name:
return f'# type: ignore[{self.name}]'
return f'# type: ignore[{self.name!r}]' | 0 |
27fde1a99cbaedaf70e6f0b54c2ba7a9 | 4b291a8c2df47ea7fb0d4d8cc60a21db | jsonファイルに保存されたイベントを表示する関数 | function readEvents() {
if ('localStorage' in window && window['localStorage'] !== null) {
window.localStorage.getItem("events");
} else {
alert('This browser does NOT support localStorage');
}
} | 0 |
eeca5914a5773146f451e02992f216b0 | 2e322514c14892e3ef9386e5cad72520 | 插入学生的对应的课程的成绩 | if not self.has_class(class_name):
print('没有该班级')
return
class_obj = Classes.Classes(class_name)
if not class_obj.is_in_class(student_name, 'student'):
print('班级没有该学生')
return
score_info = dict()
score_info['course_name'] = self.t... | 1 |
fd6c48e299214cc8887ec55308919ffc | 4672e02e6371eaa0cb36db26591c365d | Prints the thank you letter to standard output | def thank_you():
print('\nThanks for playing Burger Grandpa!') | 1 |
f28a7513cf37ffe712a8cc8cceeb4d20 | 95ecf582d822f011b553b67d60988a64 | 根据模板ID查询自定义表列表 | @Component("tMtyAtomService")
@SuppressWarnings("rawtypes")
public class TMtyAtomService extends CommonService
public List listAll(String templetId) {
return mapper.listAll(templetId);
} | 1 |
f6eb423bbac1b400ed7f1b7218bd4933 | 9ff0291f18d48127c997a8d7dd5ad274 | 进入字序审定页面 | @RestController
@RequestMapping(value = "/evaluate")
public class EvaluateController
@GetMapping("/audit")
public ModelAndView audit() {
ModelAndView modelAndView = new ModelAndView("/evaluate/audit");
return modelAndView;
} | 1 |
1acdab3a3a56caa1e88d3eecbbbfb4f9 | 052fafcdfe1a17e80b8c80bd793577d9 | Mark all currently shown widgets to be removed | namespace Isis
void Directory::cleanupMatrixViewWidgets() {
m_matrixViewWidgets.removeAll(NULL);
} | 1 |
3d051efc1af8bdb6841c0e23b6e99609 | 4fedc29254e5279b84768275c4912f9e | Returns the active Component | if self.componentArray != []:
return self.componentArray[0]
print "Looking for", self.componentNameArray[0],
comp = self.inst.getComponentByName(self.componentNameArray[0])
if comp :
self.componentArray.append(comp)
return self.componentArray[0] | 1 |
0f69713406c11cc8638908b1cf1bf3fb | 5514fb1a46493216ef9821d795ba2155 | Sort sub-intervals using modified Shell Sort. | for (int k = 0; k < delta.length; ++k)
shellInsert(r, low, high, delta[k]);
} | 1 |
8c76cf18bc49576eaf8e3b8f767b1cf7 | 0186af299c48cab8ec2a679cf84df06e | 设置错误页面
因为 错误页面有可能错误信息只有一行 还有可能没有按钮,所以用可变参数
ids[0]为图片id ids[1]为错误标题 ids[2]为错误内容可能没有 ids[3]为按钮的文字 可能没有 | {
global $jadb;
$idErrorArr = array();
$idErrorSql = "select article_id from articles";
$idSqlErrorResults = $jadb->getQuery($idErrorSql);
if($jadb->affectedRows($idSqlErrorResults))
{
while ($idErrorRow = $jadb->getRowsAssoc($idSqlErrorResults))
{
array_push($idErrorArr,$id... | 0 |
77c7a808e15eec0786ccc72ef99b0550 | 281b185eb9b5310b01c7201faf04523b | 新建一个文件并写入内容
path 文件全路径
fileName 文件名
content 内容
bufLen 设置缓冲区大小
isWrite 是否追加写入文件 | if !IsExist(absolutePath) {
err = fmt.Errorf("not find path %s", absolutePath)
return
}
buf := new(bytes.Buffer)
writer := zip.NewWriter(buf)
if IsFile(absolutePath) {
err = writeFile(path.Dir(absolutePath), path.Base(absolutePath), writer)
} else {
err = writeFile(absolutePath, "", writer)
}
writer.Clo... | 0 |
bdddaa1e311557409a10e2c6f0cfc778 | 6012f3cbdfe2b5532637848af57112d7 | Retorna una copia ordenada de los datos. | const result: T[] = [];
for (const data of this) {
result.push(data);
}
return result;
} | 0 |
6beecbb9a4ab16d1dfc0297004638516 | 11866901d6c8886845a86ddcf2fc243c | 获取一个值,该值指示客户端是否为基于Win32的计算机 | function bolGetIsWin()
{
return (bool)( strtolower( substr( 0 , 3 , PHP_OS ) ) == "win" );
} | 1 |
252703d2e2bd5dafc63d71048390b47e | e944719771dfe891f9e0e98ea0fa964c | 根据考题列表和试卷信息,生成试卷的样卷html | List<Question> res = new ArrayList<Question>();
List<Question> t1 = createPaperDetail(vo.getSingle(), paper.getSingleCount());
if(t1 == null) return null;
res.addAll(t1);
List<Question> t2 = createPaperDetail(vo.getMutil(), paper.getMultipleCount());
if(t2 == null) return null;
res.addAll(t2);
List<Ques... | 0 |
00a1fdbd0e06b72455ac919986aa0db4 | 74a2bdbd2d0439aa5598bf4860259ca8 | This method resumes a composite layup that was previously suppressed. | namespace DevComponents.DotNetBar
[ToolboxItem(false), DesignTimeVisible(false), Designer(typeof(DevComponents.DotNetBar.Design.DockSiteDesigner))]
public class DockSite : System.Windows.Forms.Control
public new void ResumeLayout(bool performLayout)
{
m_LayoutSuspended = false;
base... | 1 |
0ef2e3b892146e98445299192765b23d | 480dba351d2c0f346a69d87024322e18 | Gets the allowed values by family. | Set<TagAllowedValue> getAllowedValues(); | 0 |
4b922c738aaf93187bd46b9210140cc6 | acabc7a05a49122c7ba5b7237c352c1a | Reshapes the data loaded by keras into a usable form
data (numpy array): The data loaded by keras
number_samples (int): Number of images to load
number_classes (int): Number of classes the data represents
flatten_data (boolean): Set to True to flatten the input data to a single dimension | class Configurator:
def FlattenData(self, DATA):
N,M = DATA.shape
self.TRNG_DATA = DATA.reshape(N*M) | 1 |
d2baa35ec21189a61227045d024c4bf5 | 2c7764d80296805394008935ad6b0fd1 | Get the relative sibling number of the given node, which is defined as
the occurrence among (not-necessarily consecutive) siblings of the
domNode's name. | let siblingNumber = -1,
tagName = this.originalElement.tagName,
children = this.originalElement.parentNode.childNodes;
for (let i = 0; i < children.length; i++) {
let child = children[i];
if (child.tagName === tagName) {
siblingNumber++;
... | 1 |
63ea25d1da097d8634a2f59b06734935 | f350100aa4ab40843b2c296387806ab4 | Stops the enemy turning as the charge starts | public class ChargeAttack : MonoBehaviour, IAttack
public void StopAttack()
{
move.ChangeSpeed(move.moveSpeed);
} | 0 |
b9db0a5590757ce5ca666fa6c6f591ce | 2991e55d3117476cc02298e33dacf50e | 获取教师课程表 | class Backend extends CI_Controller
function get_teacher_course(){
$name = $this->input->post("name");
$this->load->model("Backmodel");
$data['arr'] = $this->Backmodel->get_teacher_course($name);
echo "<pre>";
$output='<table class="table table-hover" style="font-size:14px;">
<thead>
<tr>
<th>课程</... | 1 |
d054fb942e747f42f56e48a65b85ab00 | 7acaaa560d5d7dbedf4f34fb407d0076 | 읽기 권한을 생성한다. | public class ConfigCenterUtil
public static List<ACL> createReadOnlyACL(String userId, String pwd, CcsResourcePool pool) throws NoSuchAlgorithmException {
List<ACL> acls = new ArrayList<ACL>();
Id id1 = new Id("digest", DigestAuthenticationProvider.generateDigest(appendAdminAuthInfo(pool)));
ACL... | 1 |
39f35d7a7905a4cbb023634378e66ed4 | 8838ff93f686d09f5a518e1ceaa3dd3c | Permet de report un commentaire | {
$comments = $this->_bdd->prepare('INSERT INTO comments(post_id, id_user, comment, comment_date,report,published) VALUES(?,?,?, NOW(),0, 1)');
$affectedLines = $comments->execute(array($post_id, $id_user, $comment));
return $affectedLines;
} | 0 |
60f45093ec65598c5a1d915155afa1f1 | 1e262e29474e6c929cdb5defa266a022 | 返回三个整数中的最小值 | @SuppressWarnings("serial")
public class StringUtil extends Exception
private static int min(int a, int b, int c) {
if (b < a) {
a = b;
}
if (c < a) {
a = c;
}
return a;
} | 1 |
4d5cf26ebc22cad7c36bfeff238af5e8 | 1f82c1327e0523ae42e53efed5a4f7e8 | 1) 파라미터로 넘어 온 파일 객체가 파일이라면 삭제하고 리턴한다. | public class FileHelper
public static boolean delFile(File file) {
if (file.isDirectory())
return false;
return file.delete();
} | 1 |
a33528d6cc7940023e333eda3aff1acf | f9ab74d8907edfc56945bdfbaf6d62ee | Determines whether this member has any balance information of note | class BalanceInfo():
def is_valid(self):
return self.pos.count() != 0 or self.bal_tos.count() != 0 or self.bal_froms.count() != 0 | 1 |
4494a656d0550e707bd92704ccb96f99 | 400215f1a44b3b90b180b9d409462e8c | Controls operations on entities. Records who and when created, modified, or deleted an entity.
<br/>Records:
<br/>DateCreated for <see cref="ICreatable"/>,
<br/>CreatedBy for <see cref="ISignedCreatable"/>,
<br/>DateModified for <see cref="IModifiable"/>,
<br/>ModifiedBy for <see cref="ISignedModifiable"/>,
<br/>DateDe... | (ICreationIdentifier<TId, TCreatedBy, TCreatedTime> creation)
where TId : IEquatable<TId>
where TCreatedBy : IEquatable<TCreatedBy>
where TCreatedTime : struct; | 1 |
148cbbb5be17fff3661dfcbed2847a66 | b127a540672ecb64305bcdea205c03ef | переопределяем оператор ввода >> для объекта класса матриц | for (int i = 0; i < SIZE; ++i) {
for (int j = 0; j < SIZE; ++j) {
in >> mat(i, j);
}
}
return in;
} | 1 |
f1e2d663400320f46a395849875fdfba | a3fec72146d509a0fc164498ec467bcd | {JSON_STRING}.make_with_escaped_json | void F277_4311 (EIF_REFERENCE Current, EIF_TYPED_VALUE arg1x, EIF_TYPED_VALUE arg2x)
{
GTCX
char *l_feature_name = "make_with_base_url";
RTEX;
#define arg1 arg1x.it_i4
#define arg2 arg2x.it_r
EIF_TYPED_VALUE ur1x = {{0}, SK_REF};
#define ur1 ur1x.it_r
EIF_TYPED_VALUE ui4_1x = {{0}, SK_INT32};
#define ui4_1 ui4_1x.... | 0 |
8bc6a345a0240b1985d0d59abeda17f1 | 63dfb19ae228a10e84589cb1a2649983 | 如果該使用者是主揪,則刪除所有此次共乘資訊 | {
var ret = db.Select($"select p.pick_id from pickup as p" +
$" inner join log as l where l.master_id = {masterID}" +
$" and p.log_id=l.log_id")["pick_id"];
foreach (var id in ret) {
db.Update($"delete from p... | 1 |
4b0314f3b05a7746123a3a856046a004 | 878569b7368d4b7cb17e031ea77fa030 | 本次评卷过程耗时(秒) | public class LesStatusItem implements Serializable
public Integer getProcessTime() {
return this.processTime;
} | 1 |
513c400f3700a2b306d4924b93078daa | 761f1aa654522458a404f16836cd4e10 | Chaeck the deviation from target bearings | double BearingDelta = (Target_Bearing - Current_Bearing);
while (BearingDelta <-(double) 180.0) BearingDelta += (double) 360.0;
while (BearingDelta > (double) 180.0) BearingDelta -= (double) 360.0;
if (BearingDelta < (double) 0) {
BearingDelta = (BearingDelta * (double) - 1.0);
Motordri... | 1 |
20046c4f534bc11e181cb4ea84fc9134 | de7cdc657b273d8ec23eee35a5b7f244 | updates the datagrid when the data value is changed | namespace HouseholdAccountBook.Windows
public partial class CsvComparisonWindow : Window
private void CsvCompDataGrid_ScrollChanged(object sender, ScrollChangedEventArgs e)
{
DataGrid dataGrid = sender as DataGrid;
dataGrid?.UpdateLayout();
} | 0 |
8efb24006a33f317e4c6364858ba84c0 | d5a7ddb8312118161043833af5930c8f | Update movie asynchronously. | namespace Memento.Movies.Shared.Models.Movies.Repositories.Movies
public sealed class MovieRepository : ModelRepository<Movie, MovieFilter, MovieFilterOrderBy, MovieFilterOrderDirection>, IMovieRepository
public override async Task<Movie> UpdateAsync(Movie movie)
{
return await base.UpdateAsync(movie);
} | 1 |
b8ee8d6a6d05453a0c0b785364bc9d39 | 6c2f9c0e6dc542857cd0ad5f7b54f44f | Returns the result of interpreting the object as an instance of '<em>Input File</em>'.
<!-- begin-user-doc -->
This implementation returns null;
returning a non-null result will terminate the switch.
<!-- end-user-doc --> | public class ToolDescriptionSwitch<T> extends Switch<T>
public T caseInput(Input object)
{
return null;
} | 1 |
99f9fdbde8b2e22eaca0bd49f1e52bf3 | 1ecc2d1320e16745aec8f85a7f9d29aa | 导航栏界面 | namespace BrnShop.Web.Admin.Controllers
public partial class HomeController : BaseAdminController
public ActionResult NavBar()
{
return View();
} | 1 |
2596b31b735d8c524bb44494ab7a96fd | ae7a732da7ed667a7db295db1b42f6f4 | Trigger the Dodge ability on the Owning Client | {
if (Mc.ThePlayer is EntityClientPlayerMP)
{
NetClientHandler netclienthandler = ((EntityClientPlayerMP)Mc.ThePlayer).SendQueue;
netclienthandler.AddToSendQueue(new Packet19EntityAction(Mc.ThePlayer, 3));
}
} | 1 |
e6c25dd52032b83edfabc2d764c88dea | a841a3739b3e1b42092ab7d96a9bc49c | Grabs CSS_TOP_FILES list
returns empty list if setting is not found | class Style
public function listCssFiles() {
return $this->cssFiles;
} | 0 |
5752f4c9cf010276b5c3040d095cb8b9 | f055b502368892dd4d671c30ac0209ff | 校验营业执照是否已经存在 | namespace DxPay.Bp.Controllers
public class AppUserController : Controller
[LoginCheckFilterAttribute(IsCheck = true, IsRole = false)]
public JsonResult CheckYyzz(string cval, string uid)
{
bool flag = userBll.ExistsYyzz(cval, uid);
return Json(new { success = flag, mess = fl... | 1 |
1afb28e62d6e8be069f4815dd25a0e7f | 885a151c362e78337989aa9a4dd1839b | Getter for computed properties | public String toString() {
return "ComputedReadWriteValue{" +
"getter=" + getter +
", setter=" + setter +
'}';
} | 0 |
d5309c5169aaa47d92e87a65f3b05822 | ff5613f73ea6f5d8c10c0fc1a423c36f | Subscribe a callback to when the supplied row will be persisted. | predicate_kwargs_maker=None,
predicate_failure_response="Boolean"):
verify(not self._has_been_used,
"The data row predicates can't be changed after a PanDatFactory has been used.")
verify(table in self.all_tables, "Unrecognized... | 0 |
89e932e4ae48f2bc903916dd3b3005ed | e89c33faf5020c0049b978312e613d0d | Array of contact ids participating in the conversation. | class Body37 implements ModelInterface, ArrayAccess
public function getContactIds()
{
return $this->container['contact_ids'];
} | 1 |
7184cd45d93930f78968bc78733b2a0b | 91323e480374026bd12632164971afe6 | Метод возвращает массив id=>title всех категорий | $db = Db::getConnection();
$categoryList = array();
$result = $db->query('SELECT id, parent_id, name FROM category ORDER BY parent_id, id');
$i = 0;
while ($row = $result->fetch()){
$categoryList[$i]['id'] = $row['id'];
$categoryList[$i]['parent_id'] =... | 0 |
141c2397fc8d3b410424269caf302fb1 | cd444b66a25222cf0439c55f6dd9e025 | Append a batch of transitions to the buffer. | if self.current_number < self.buffer_limit:
self.buffer.append(transition)
self.current_number += 1
else:
self.buffer.pop(0)
self.buffer.append(transition)
pass | 0 |
4b85999729ca07873a324e16a10a8a3e | a7767426b18f192e22f32e6d5c21017a | returns a list of moves in the bit board representation. a move is defined by an integer that has two bits turned
on, the start and the end square. if it is a backwards move (from the white perspective) the backwards bit
is set as well in order to have a unique move definition | bitset<64> Board::getMoves(Side side)
{
bitset<64> moves;
for (int x = 0; x < 8; x++)
{
for (int y = 0; y < 8; y++)
{
Move m(x, y);
if (checkMove(&m, side))
{
moves.set(x + 8 * y);
}
}
}
return moves;
} | 0 |
14b5c564ec1669a5b3a02ac918ba51f2 | 108da468174649d934c32558fba31af7 | Sets the duration and schedule. | if (!this['disabled']) {
if (this['relativeDuration']) {
this['startDate'] = new Date();
}
if (!this['relativeDuration'] && this['duration'] != Duration.CUSTOM) {
this['startDate'] = time.floor(this['startDate'], this['duration'], true);
}
this['relativeDuration'] = tim... | 1 |
b2fd25ac1c850e6cce057955b5633bb3 | 7aefe85f9530be57d395fb2098d33cfe | Reconcile with other active xServers to check for discrepancies.
This function will only add newly discovered xServers. | class Server(Acceptor):
def serviceAxes(self):
self.serviceAccepts()
while self.axes:
cs, ca = self.axes.popleft()
if ca != cs.getpeername():
raise ValueError("Accepted socket host addresses malformed for "
"peer. eha {0} != {1}... | 0 |
4980c2aaa5efaa2b44cc94c3b6694b04 | 1a02c8e7a299d4bbb551e4ee28f26def | 判断总操作数是否达到删除阙值 | namespace CleanJobService
class Cleaner
private static bool isOverLimit(int num, int deleteLimit)
{
return num > deleteLimit;
} | 1 |
b8263d29193774002d8ff796ee6986b7 | ce85608de8e7bd9b6ac5cd9f42a4213c | Gets the androidCorporateWorkProfileCount property value. The count of Corporate work profile Android devices. Also known as Corporate Owned Personally Enabled (COPE). Valid values -1 to 2147483647 | class DeviceOperatingSystemSummary
def android_corporate_work_profile_count
return @android_corporate_work_profile_count
end | 1 |
05fb2cb9287f005e911474b6bb1ad24c | 0a82c0ee91c60478212a5979e3d2daef | 功能:分苹果。 | class SiteController extends Controller
public function actionEatApple ($id, $percent): array {
try {
$apple = $this->findModel($id);
$apple->eat($percent);
if ($apple->eat_percent >= 100) {
$apple->delete();
return ['success' => false, 'delete... | 0 |
34fd2d03b5d22eb6fa9f7c10401e449b | db20b8f6674eb33d6640811755c471d3 | Returns a new object of class '<em>Port Reference</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | RefPlace createRefPlace(); | 0 |
5cd45526dcd3a56750758790309c118f | d6dcc6a876ea82155ce6106a0a836651 | GET api/maps | namespace M10Api.Controllers
public class MapController : BaseController
public ActionResult Index()
{
return View();
} | 0 |
ecc891d0bf863337499e1c9dc62345c6 | fa633f836fce988cb654ffa08d46db6f | Test that driving force data can be parsed | def test_parse_data(mock_page):
data = parse_data(mock_page)
assert ("1", "-10", "-14", None, "N", "1m/s") == list(data)[0] | 1 |
231662117f2205e9b5e747cf6af5f193 | 204e4e9a93ae4bea0cd1c2b98ed3dba5 | Test for tagging without authentication. | class TagPublicApi(TestCase):
def test_patch_tags_fail(self) -> None:
tag = Tag.objects.create(name="tag")
response = self.client.patch(self.tag_endpoint(tag.slug), {})
self.assertEqual(response.status_code, status.HTTP_401_UNAUTHORIZED) | 1 |
ea17af7ef1d30fda7bff74bc86be2ed6 | 74f398b68e7af79f87de37fb4f2b6cee | @brief Tri selon la somme des ressources de chaque job pour un cas multi agent | vector<unsigned int> Heuristique::trierCCmaxSommeRessources(){
vector<vector<unsigned int>> tableauInitial;
for(unsigned int i = 0 ; i<this->instance.getNbrJobs() ; i++)
{
vector<unsigned int> jobCCmax;
jobCCmax.push_back(i);
jobCCmax.push_back(0);
for (unsigned int r = 0; r ... | 1 |
52ffc27999855f07f6ead657869f8ca8 | 81f935d273f6e83399bc33617c598d0f | Get the timeslot with the given ID | for (int i = 1; i <= 7; i++) {
ArrayList<FreeTimeslot> timeslotForDay = freeSchedule.get(DayOfWeek.of(i));
for (int j = 0; j < timeslotForDay.size(); j++) {
if (id == timeslotForDay.get(j).getId()) {
return timeslotForDay.get(j);
}
... | 1 |
c1e5d9ef13e7515cc30d103e96122e27 | fa3e431de042c1e388e0bccb881484d1 | Helper method to regenerate all shortcode links. | class ImageShortcodeProvider extends FileShortcodeProvider implements ShortcodeHandler, Flushable
public static function regenerate_html_links($value)
{
$regenerator = ShortcodeParser::get('regenerator');
return $regenerator->parse($value);
} | 1 |
97431e112b9978c3743b3c480bcb7727 | d11ba24b2ec9d004a0d5f544c22091c3 | FPSをセットする // | if (!m_bInited) return(false);
m_nTGS_FPI1[0]=nI1L; m_nTGS_FPI1[2]=nI1F;
m_nTGS_FPIM[0]=nIL; m_nTGS_FPIM[2]=nIF;
m_nTGS_FPO1[0]=nO1L; m_nTGS_FPO1[2]=nO1F;
return(true); } | 0 |
36dd07ab46835eb401d0f37bff9edc9d | 5fc8c71306fa15b4ef7c4903e10d5110 | 添加单选按钮,并注册监听,每个单选按钮对应不同的字体大小 | TextView textView1 = (TextView) view.findViewById(R.id.id_btn_text_1);
TextView textView2 = (TextView) view.findViewById(R.id.id_btn_text_2);
TextView textView3 = (TextView) view.findViewById(R.id.id_btn_text_3);
textView1.setOnClickListener(mFontClickListener);
textView2.setOnCl... | 0 |
9c37f056cb88a3499f04cfc9204711d1 | 2b8a202b2d4c37a9878f2aa6fa644b4f | Gets the default pool names for this virtual server. | public String[] getLocations(String poolName) throws IOException; | 0 |
4bc4b90ede284d3bc3b4b2f12ae39ed6 | a1c7fe8d5cfad066eb295432ab8adc9f | Tests a merge between two binary max heaps. | v = [0, 0, 0, 0, 0, 0, 0, -2, 0, -1, 0, -2, 1]
sv = sorted(v)
h = BinomialHeap()
for x in v:
h.insert(x)
for x in sv:
assert x == h.find_min()
h.delete_min() | 0 |
497f36ebe7a1230a57cc282b7345d64c | 0460ceb18b350f111b149317149e456b | Returns the CRC type. For instance: Link CRC
Returns <i>none<\i> when CRC is not used. | {
unsigned int cx_fec = 0;
if (fwcaps & FW_PORT_CAP32_FEC_RS)
cx_fec |= FEC_TYPE_RS;
if (fwcaps & FW_PORT_CAP32_FEC_BASER_RS)
cx_fec |= FEC_TYPE_BASER_RS;
return cx_fec;
} | 0 |
d65fea9914d4944adc3271aeb12ebbc9 | 4f00c652b87db43c24e0829ff703171d | Gets all schema db. | public async Task<ActionResult<ResponseData<List<dynamic>>>> GetSchemas()
{
try
{
var result = await _dbSchemasService.GetSchemas();
return ResponseData<List<dynamic>>.Success(result);
}
catch (Exception e)
{
... | 1 |
23e26b1b1467067ccd95f9cebd09fb97 | 6a148b9af89c6673a7bd73154591ab38 | The ratio of newspapers that have at least one advertisement versus the newspapers that haven't any. | @Query("select concat(100*(select count(sv) from SubscriptionVolume sv)/ count(sn), '%') from SubscriptionNewspaper sn")
String ratioSubscriptionsVolumeVersusSubscriptionsNewspaper(); | 0 |
b40c426c8b6001c00128811b73b94586 | df8df3ff09b13d0e447c8e5b18545a9c | 增加指定公里数 | class Car():
def increment_odomter(self, miles):
self.odometer_reading += miles | 1 |
1eb639e944eb6c71fce1915756e00b88 | 5bfcf66906fce8c3887f7f22e2e95bc2 | 根据告警组查找 | public LinkAlarm findByEquipId(String equipId); | 0 |
cf36e9c9a119aa250a90571d5499241b | 7a990b0685266e38330758069e1b33f4 | Show a editext as mandatory field | zsi.form.markMandatory({
"groupNames":[
{
"names" : ["status_id"]
,"type":"M"
}
]
,"groupTitles":[
{"titles" : ["Status"]}
]
});
} | 1 |
f4b3cef03212f762812b52599691bd6d | 2682131af8bf0fa277fcc97ca55ed781 | この HashMethod を使った場合の
HashTable のサイズを得る。 | size_t HashTableSize(SConstHashTableRef table){
} | 1 |
3cda09309d2b71680c4e234a67c0ce39 | 43e13e2b4e1d73db1cd0a890bb1ae4cc | 过渡层
稠密块会使得通道数增加, 用过渡层来控制模型的复杂程度.
过渡层利用1*1卷积层减小通道数, 用stride=2的平均池化层减半高和宽. | def transition_block(x, reduction, name):
bn_axis = 2
x = layers.BatchNormalization(axis=bn_axis, epsilon=1.001e-5,
name=name + '_bn')(x)
x = layers.Activation('relu', name=name + '_relu')(x)
x = layers.Conv1D(int(backend.int_shape(x)[bn_axis] * reduction), 1,
... | 0 |
4cdc666f6c7c3918f3446af4a4b7d14e | d7e7645efa1b88a54b51c24b22737150 | Load group nodes from local preference. | class CourseLocationGroup
static function loadAll() {
$groups = array();
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', 'node');
$query->entityCondition('bundle', 'racedata_course_location_group');
$query->propertyCondition('status', 1, '=');
$rows = $query->execute();
... | 0 |
cc5afd8b7987431f3963fb8aa35b7a10 | 1e2e473fac76efb5876084c96321622b | perform the same conversion in both directions | def test_premium_based_conversion_round_trip():
fun_n_to_sln = black.normal_to_shifted_lognormal
fun_sln_n = black.shifted_lognormal_to_normal
conversion_round_trip(fun_n_to_sln, fun_sln_n) | 1 |
10bf587149346f52584d7bb4a4068eec | fb5d42386df49e306040a4ca5025e53d | Valida si el usuario con el id usuario es dueño de la lista de reproduccion con el id lista reproduccion | class ListaDeReproduccion(base_de_datos.Model):
def validar_usuario_es_dueno_de_lista_de_reproduccion(id_lista_reproduccion, id_usuario):
cantidad_listas = ListaDeReproduccion.query.filter_by(id_lista_de_reproduccion=id_lista_reproduccion,
usuario_id... | 1 |
22b4b3a2bcab3e6b64614a7c7242bdf8 | bd2197e92d498b627a8c232cd40b22a3 | drop all messages, return None | class RedisMessageServer:
def clear_messages(self):
self.redis_client.delete(self.message_list) | 1 |
5c1a5245079be04e94f4267ee6ae0514 | ba5c2c03e3727222c138d487feccf965 | Prepends an element to the start of the current collection and returns the new collection. | namespace System public static partial class TraitExtensions
public static void Prepend<TElement>([DisallowNull] this IPrepend<TElement> collection, [AllowNull] params TElement[] elements) => Prepend(collection, elements.AsSpan()); | 0 |
68b330eb95237003a025b8074b9ca3e7 | 1d3516720ba02d3643a5987610dbea9f | Plot histogram of pairwise distances between measurements. | with_statistics=True, plot_dir=None, alpha=0.5):
cluster_hist = DistanceHistogramClusters(clusters, clustering_algorithm, random_points,
bins)
cluster_hist.plot(with_statistics=with_statistics,
plot_dir... | 1 |
1085771ced4c2910c033ada61775ba75 | 2755a12ca122a8e8017859a9cdf29d23 | Sets the background type for the component
one of BACKGROUND_IMAGE_SCALED, BACKGROUND_IMAGE_TILE_BOTH,
BACKGROUND_IMAGE_TILE_VERTICAL,
BACKGROUND_IMAGE_TILE_HORIZONTAL, BACKGROUND_IMAGE_ALIGNED,
BACKGROUND_GRADIENT_LINEAR_HORIZONTAL,
BACKGROUND_GRADIENT_LINEAR_VERTICAL,
BACKGROUND_GRADIENT_RADIAL | public void setBGImage (int depth, String bgimg, boolean wrapx, boolean wrapy); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.