query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
ecbe1a854fbc0aa01c87390214cdb02b | 7977af22982fec9c2fe23d569f9a59ea | If jObj[fieldName] is an array, return it. Else put it in an array and return that.
Helper function for different style JSON-LD.
Some versions of Virtuoso return single values of @type as-is, and other versions return an array of types, even if there's just one. | try:
val = obj[key]
except KeyError:
return []
if isinstance(val, list):
return val
else:
return [val] | 1 |
908e0fe6eba93bec2fcd9a73854bdc1b | fd826471bc1b26ce1841c23c08e721d5 | post请求:上传多文件(图片),场景1:使用MultiPartBody
一个file对应一个请求体,构建者添加全部请求体并构建MultiPartBody | int i = 0;
Map<String, RequestBody> bodyMap = new HashMap<>();
for (String filePath : filePaths) {
i++;
File file = new File(filePath);
RequestBody imageBody = RequestBody.create(null, file);
bodyMap.put("multipartFileList\";filename=\"" + file.get... | 0 |
b7698b928c60c1e633ec0626c82be063 | d34bdb99c46100864f8f6b458f33db0f | 初始化计划下拉框 | namespace FineUIPro.Web.ActionPlan
public partial class ActionPlanListEdit : PageBase
private void InitDropDownList()
{
BLL.UserService.InitUserDropDownList(this.drpCompileMan, this.ProjectId, true);
} | 1 |
77d5431f96652f36c6e686276626922d | 2ee826ae6ce935711557f4575dae4801 | Filters out deprecation information. | def _warn_deprecated(msg):
warnings.simplefilter('always', DeprecationWarning)
warnings.warn(msg, category=DeprecationWarning, stacklevel=2)
warnings.simplefilter('default', DeprecationWarning) | 0 |
dfdce97839d6204c153dfdd3a61de673 | 775a65ae74df5417eb4b50396d8bd8db | Setup bresenham's algorithm. | void bresenham_line(int x1, int y1, int x2, int y2, int stepSize) {
if(((y2 - y1)*(y2 - y1)) < ((x2 - x1)*(x2 - x1))) {
if(x1 > x2) {
myprintf("1\r\n");
bline_low(x2, y2, x1, y1, stepSize);
} else {
myprintf("2\r\n");
bline_low(x1, y1, x2, y2, stepSize);
}
} else {
if(y1 > y2) {
myprintf("3\r\n... | 1 |
96d8f26ac31e900988047bc7d666177b | 2d72b4538d5560f09932819f3014d400 | Метод добавляет победу игроку-серверу, и обновляет статистику | PlayerDto winner = getPlayerInDataBase(currentPlayer.getName());
getDatabase().updateDb(new PlayerDto(winner.getPseudo(), winner.getNbWin(), winner.getNbExAequo(), winner.getNbDefeat() + 1));
} | 0 |
9bc8c19b370c20fa8233e4970378994a | 94aa53ff0ea74b840bc56b8d43a1fecb | 得到YYYY-MM-DD HI24:MI:SS格式的字符串 | public final class DateUtil
public static String getTodayBegin2String() {
return DateFormatUtils.format(getTodayBegin(), yyyy_MM_dd_HH_mm_ss);
} | 1 |
c324d7acde5fd1c19b41cc9bad41a8a2 | 1b8b7efe86e4f1bdc7dbeed21bd63b33 | get the name of the tunnel packet type | const char *rte_get_ptype_tunnel_name(uint32_t ptype)
{
switch (ptype & RTE_PTYPE_TUNNEL_MASK) {
case RTE_PTYPE_TUNNEL_IP: return "TUNNEL_IP";
case RTE_PTYPE_TUNNEL_GRE: return "TUNNEL_GRE";
case RTE_PTYPE_TUNNEL_VXLAN: return "TUNNEL_VXLAN";
case RTE_PTYPE_TUNNEL_NVGRE: return "TUNNEL_NVGRE";
case RTE_PTYPE_TUNN... | 1 |
1ccac6ce234a6c28112146e31790686b | 7f221b65eb45beed9ce172341dd26e00 | Returns all devices that are accsessible via the connected bridge.
Returns a dict. | return {
aid: _get_accessory_diagnostics(hass, accessory)
for aid, accessory in bridge.accessories.items()
} | 1 |
48c741ed330fbb10c1ae2c87c6c5cf1e | 8a96f028d7a352984de5dfdca8ee6825 | Getter for the number of rows in the texture atlas. | export class SurfaceAtlasSet implements Destroyable
getAtlasNum(): number {
return this._surfaceAtlases.length;
} | 0 |
216dc93a29a0ed0b07d2c2b7bf59dbd2 | 1ce7029f0706206136022302d1681edf | Compiles a Jvs code source.
<div>The jdk <tt>tool.jar</tt> must be in the path.</div> | sources: List<Source>
): File {
val compilation = KotlinCompilation()
sources.forEach {
compilation.workingDir.resolve("sources")
.resolve(it.relativePath())
.parentFile
.mkdirs()
}
compilation.sources = sources.map {
it.toKotlinSourceFile()
}
... | 0 |
637aecec18c1089c61669bdb85058b97 | 4367aedfcc6d69cd6eb4219f34bc5e8f | 获取usecase目录下所有以xls结尾的excel表格; | fileList = os.listdir(workDir)
excelFiles =[]
for eachfile in fileList:
try:
suff = eachfile.split('.')[1]
if suff == 'xlsx':
excelFiles.append(eachfile)
except IndexError:
pass
return excelFiles | 0 |
b85de52fb6a794bcb1e5c40b13aef5b5 | 3ed64e84d89dfa985a12930a41ed81c5 | The name of the client machine. | public String getClientMachine(); | 1 |
46944496ed5445101099b2a4254e9ecc | 7f61448ad6da3ef0f9cb03f40c5be655 | the first dimension: number of examples | cases like (1) | 0 |
c30ee9e962d8cf9a14905f337ca3a809 | 1390f7e0180f3b970d36c3a326e58f5b | 既存のバトルオーダーをコンテナに詰めていく(データ登録の時の要領で) | namespace ExtraEditMod
public class OrderCreature
public void SetOrder(KeyValuePair<SefiraEnum, int> kv, List<long> order)
{
m_creatureOlderDic[kv] = new List<long>(order);
} | 1 |
d9d1df82fc70550e13b26585be25a47e | 4e6dc1c2f74d88c1b120b3d24caa0956 | 設定Clamp與Cabinet的最小間距 | class Furniture:
def set_gap_limit(self, ROOM_W, ROOM_H):
temp = [0]
for adj_level_in_furn in self.adj_graph(self.level_in, "level_in"):
temp.append(adj_level_in_furn.x)
self.min_gap_left = max(temp) - self.x
temp = [0]
for adj_vertical_in_furn in self.adj_graph(s... | 1 |
89fb976af62e6a63465d27c2e4e876a3 | 763ed5126b003a80ca9df5c00d4d1846 | Pour mettre à jour les magasins lorsqu'on supprime un objet. | class DatabaseUpdator:
def table_store_update(self):
for product in self.data:
for store_tag in product['stores_tags']:
try:
self.db.query('INSERT INTO store (MAG_nom) VALUES (:store)', store=store_tag.lower())
except:
pass | 0 |
0d9121969925a994512ab500905b8892 | e8f92d2f6f23b01de010c6c1e60c62c8 | Defaults to an "AND" over time - data only where all dates have data.
Override for "OR" functionality. | {
$query->with(['dates' => function ($subquery) use ($dateFrom, $dateTo) {
$subquery->where('value', '>=', $dateFrom ? $dateFrom : now()->getTimestamp())
->where('value', '<=', $dateTo ? $dateTo : (string) PHP_INT_MAX);
}]);
} | 0 |
4435c1c4202369c1d2edef88a5c3414c | f8c9b6c5643d41164b6310cb7163e3a8 | Change l'ordre des pages dans un site | {
using (var db = new CMSdb(_context))
{
using (var tr = db.BeginTransaction())
{
bool result = false;
var query = db.core_pages.Where(w => w.gid == id);
if (query.Any())
{
... | 1 |
2bd518225b27c285cdc8d6f75f3a5aea | 1f4b816d0497141e687453b82c9abb3b | Processes identity request body. | return objectAssign(
{
'@context': 'https://schema.identity.foundation/0.1',
'@type': this.requestType,
},
this.requestBody,
);
} | 1 |
3a24ba4f09d17a1338834c5e4d7a958b | 509d899c8508dac3a835c2decd51fdf8 | Writes a collection property. | namespace Spark.Content
void Write<T>(string name, T[] values) where T : struct, IPrimitiveValue; | 1 |
3397dea9c4ff93abec589a87530bd1fe | b4919ff2eec6e9fbb8aaa21e2bc51514 | An array of children UUIDs assigned to the segment (ordered). | def ids
raise NotImplemented.new("ids is not implemented")
end | 0 |
f18be95fd32c46607a05967bcc3df3eb | abfe95341b48622b28fefd5c85c58aec | 【杂项】检测系统中是否安装了指定输入法 | namespace NChinese.Imm
public static class ImmHelper
public static bool IsPhoneticImeInstalled()
{
return IsImeInstalled("注音");
} | 1 |
49bd04b2fd5171c81a72d0c78af4ff57 | e8413efa98ffc4ae7a0e5eb7a6035c50 | Returns Zipato thermostat data. | if (rfid is None) == (mac is None):
raise Exception('Either rfid or mac is required')
if mac is not None:
url = self.device_thermostat_lookup_url(mac)
else:
assert rfid is not None
url = self.device_thermostat_url(rfid)
r = requests.get(url... | 1 |
0b1b23102d38075e8b05856f034eedc8 | a2371061709e01f58393185e36115105 | Data associated to an edge in a Growing Neural Gas graph. | super(PairData, self).__init__()
self.edge_index_s = s_data.edge_index
self.x_s = s_data.x
self.pos_s = s_data.pos
self.edge_index_t = t_data.edge_index
self.x_t = t_data.x
self.pos_t = t_data.pos
self.y = y | 0 |
d14d292e0af731d9c3ca4c695557ee91 | 3df8a3fb7368655f45ba33e61dc20c18 | Converts a duration bucket into human-readable format for tooltips | const seconds = Math.floor(duration / SECOND) % 60;
if (duration < MINUTE) return seconds === 1 ? 'a second' : `${seconds} seconds`;
const minutes = Math.floor(duration / MINUTE) % 60;
let output = `${minutes.toString().padStart(2, '0')}:${seconds.toString().padStart(2, '0')}`;
if (duration >= HOUR) {
const hour... | 1 |
4262e227a1d8c3248894b02eddef7047 | 6d202b861786b6d577f02023d90e2942 | Steering force for EVADE behaviour.
Similar to FLEE, but try to get away from the predicted future position
of the predator. Predators far away are ignored, EVADE_PANIC_SQ is used
to control the panic distance passed to FLEE. | def force_evade(owner, predator):
predator_offset = predator.pos - owner.pos
ptime = predator_offset.norm()/(owner.maxspeed + predator.vel.norm())
return force_flee(owner, predator.vel.scm(ptime) + predator.pos, EVADE_PANIC_SQ) | 1 |
26a329e482fca6042a872664cb2c6181 | 50ec463252fb59e6ccb78cbbcb5afb93 | Юзер дал один из нужных ответов в одном из нужных опросов
в массиве $targetings
'targeting_topface_leaders' => array(
'votedCorrectAny' => array(15 => array(1,2), 24 => array(0,3)) //в опросе с id 15 (на проде) пользователь выбрал 1-й или 2-й вариант
в опросе 24 - выбрал 3-й вариант или закрыл опрос
), | class BrunoBanany
public function getTopLeadersForLeaderboard() {
if (!TargetingFactory::isSuitable(self::TARGET_TOP_LEADER, $this->IntegrationUser->getTopfaceUser())) {
return array();
}
$topUserIdsByGender = $this->getTopUserIds(self::LEADERS_COUNT);
$CurrentUser = $this->I... | 0 |
2267eda8ad63ee42765e16e038d735e6 | 79fdb9b2a1c793b60349f162ec929f4f | Set the error message should be shown to user if there is error accessing VM services. | public class LoginAuthenticationTokens extends AbstractAuthenticationToken
public void setErrorMsg(boolean errorMsg) {
this.errorMsg = errorMsg;
} | 0 |
dbabc1ead614c4049bb564b140b3c8d1 | 24d358ff1417e2d8cde6f76128d13563 | 根据SpuId查找评论 | @Service
@Transactional
public class LmUserAppraiseService extends BaseServiceImpl<LmUserAppraiseMapper,LmUserAppraise>
public List<AppraiseResponseDTO> selectSpuAllAppraise(Long spuId, Integer offset, Integer size){
return lmUserAppraiseMapper.selectSpuAllAppraise(spuId,offset,size);
} | 1 |
c4cc25191f45a0f152c425c5a700ccbd | 745c04d1bd7291f22bca58060c41e04b | Return the hash code.
The returned value will be cached until <see cref="OnChanged"/> is called. | [MethodImpl(MethodImplOptions.AggressiveInlining)]
public override int GetHashCode() => Value.GetHashCode(); | 0 |
06a4224979a33ebd480ea68a6b14744a | 90fd986b484834aee1b6819963aa51f8 | 描述:将pageBOS转成pageDTOS | List<SysLogDTO> list = new ArrayList<>(pageInfo.getSize());
for(SysLogDO sysLog : pageInfo.getList()){
SysLogDTO dto = this.produceDTO(sysLog);
list.add(dto);
}
return PageUtils.copyNewInfo(pageInfo,list);
} | 1 |
3b81c007d8aa0b4efafbb535cbbe73b5 | c15583c0024a212621ec45e1df98c67f | 分割时间段 | public abstract class ConsecutiveTimeBarBase extends TimeBarBase
public void divideBar() {
long currentPosition=getCurrentPosition();
if(currentPosition==0) return;
int accTime=0;
ArrayList<Integer> newTimeList=new ArrayList<Integer>();
for(Integer i : timeList) {
if(accTime+i<currentPosition || accTime>cu... | 1 |
a13b8896b58fa2323894b874d603442e | 394edb0c92dcd1052343a874959a29f7 | Test that messages created as drafts have the UNREAD, and DRAFT
statuses and no others. | thread = self.create_thread()
image = get_in_memory_image_instance(self.user)
thread.first_message.images.add(image)
for code, name in MESSAGE_STATUSES:
thread.first_message.status = code
thread.first_message.save()
view = AdminGalleryView()
... | 0 |
d7ea0d3e9c4c00f2d92f4f678c9359c7 | 1885c653e376c16dbe31fd502041ff1e | Find the sum of the only eleven primes that are both truncatable from left to right and right to left. | long challenge_10(void)
{
int max_num = 2000000;
long res = 2+3+5+7;
int i = 9;
while(1) {
if (i >= max_num)
return res;
res += is_prime(i) ? i:0;
i += 2;
}
return -1;
} | 0 |
699b2c27dfcec675edb1fa17b3ea1c0b | 8c2e4f3d0d34208c7865354e4eba3934 | 检测补丁服务器 | local function checkPatchServer(node, callback)
local host
if gfIsDebug() and cc.PLATFORM_OS_WINDOWS == cc.Application:getInstance():getTargetPlatform() then
host = "10.2.51.97"
else
host = "atmdl.leiting.com"
end
local addrInfo, _ = CheckNetMgr:getIpByHost(host)
if addrInfo then... | 1 |
451cfe59f60d6a03ba830bcfdfba9608 | 89df1c37927ace78275d1d1bbe98bb6d | Menginisialisasi tabel kasus harian pada database | {
$this->createTable('tb_m_kegiatan', [
'id_kegiatan' => $this->primaryKey(),
'nama_kegiatan' => $this->string(100)->notNull(),
'Rekening' => $this->string(100)->notNull(),
'Daerah' =>$this->string(100)->notNull()
]);
$source = Yii::getAlias('@a... | 0 |
30a519159555375fed37b20db30473d9 | 73b6b8d7d9c1c744965032eccd8dfc8a | 对字符串进行DES加密,返回BASE64编码的加密字符串 | byte[] src = null;
try {
src = str.getBytes(charset);
} catch (UnsupportedEncodingException e) {
throw new ApplicationException("90007","不支持字符集["+charset+"]",e);
}
int len = src.length;
byte[] ibyte = new byte[len + 8 - len % 8];
System.arraycopy(src, 0, iby... | 0 |
5c0aa9b6e96e36c5d8766ce4d601bdd9 | a4c12e3b0f876ddb2896cbd266c9b4c7 | Show/hide tabs depending on the TCPWM Mode | if self.stackedWidget.currentIndex()==1:
global mode
if self.comboBox.currentIndex()==0:
self.mode_table.setItem(0,0,QTableWidgetItem('Pumping'))
mode = 1
else:
self.mode_table.setItem(0,0,QTableWidgetItem('Filling'))
... | 0 |
021e6e0ebb277d73e7ae61302a0ec6db | 8dc83510eb0ba63f9fef6db60e312793 | ! Switches to selection by edges. | class Viewer:
def selection_mode_vertex(self):
self._display.SetSelectionMode(TopAbs_VERTEX) | 0 |
b5992221af030003e089f935048b47d7 | e3ca1c7a9ba60e1de16b288cc3be51c8 | 异步解禁网易云通信用户帐号。 | public class MeetingAsyncClient
public AsyncInvoker<BatchDeleteUsersRequest, BatchDeleteUsersResponse> batchDeleteUsersAsyncInvoker(
BatchDeleteUsersRequest request) {
return new AsyncInvoker<BatchDeleteUsersRequest, BatchDeleteUsersResponse>(request,
MeetingMeta.batchDeleteUsers, hcClient);... | 0 |
41fd98635c6dc663c870c11aa0198a5a | 89fe2004566662df45e0027c628cc49d | Set the type for the identity provider. | class ServerArgs:
def identity_provider_type(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "identity_provider_type") | 0 |
f3709c2eac64fc48bc02790dd66a7eea | 773caee6dccb7b0d28f93fe7ef19ab43 | trả về có lập được lịch hay không | namespace BusinessServices.QuanTriHeThong
public class BS_LichLamViec
public List<bool> LayDSNgayLamViec(int year, int month)
{
List<HT_LICH> listHTLich = (new DS_HT_LICH()).LayLich(year, month);
DateTime dt = LDateTime.GetFirstDateOfMonth(year, month);
List<bool> result... | 0 |
332fe1f917ac16fe760326af578e908e | a078a8e651c16baebb90e69c7fcd7865 | Function to get accuracy and cost of the model by genre, evaluated on a chosen dataset. It returns a dictionary of accuracies by genre and cost for the full evaluation dataset.
classifier: the model's classfier, it should return genres, logit values, and cost for a given minibatch of the evaluation dataset
eval_set: th... | def get_accuracy(data_loader, model, device, save=None, reduce_cm=True):
model.eval()
classifier_fn = model.classifier
n_labels = len(data_loader.dataset[0][1])
n_batches = len(data_loader.dataset[0][2])
labels = data_loader.dataset.labels
predictions_d, actuals_d, predictions_y, actuals_y = [],... | 0 |
468a4c080c52f0eaefa6d50021c2570c | 99b9b6cfbe6d5d6268ac18fa10472747 | Get Applicant Reference One | {
$scholarship = Scholarship::find($id);
$biodata = BioData::find($id);
$highinst = HigherInst::find($id);
$profQualification = ProfQualifications::find($id);
$singleApplicant = new stdClass();
$singleApplicant -> scholarship =... | 1 |
01a9cdd519ecfed69ff3503998582285 | 74c253a72fdb1f47db55c43a16fbbbc9 | konwertowanie tablicy charow na tablice intow | {
int* value;
int length=strlen(string);
if ((value = my_malloc (sizeof(int)*length))==NULL)
return (int*)1;
for (int x=0;x<length;x++)
value[x] = string[x];
return value;
} | 1 |
0321937d78c132e4805e1d6e58af2de4 | 7e5237e373414af332e02a33cf599d08 | -------------------------------
gameOverCheck()
-------------------------------
Checks to see if all the players in the game are dead, if so then it will move on to the game over scene.
Use this function whenever a player is reduced to 0 life and they die.
------------------------------- | {
if (GameOver)
return;
if (Players == null)
return;
if(GetPlayer(0).Character == null && GetPlayer(1).Character == null ||
GetPlayer(0).Character != null && !GetPlayer(0).Character.IsAlive &&
GetPlayer(1).Character != n... | 1 |
129c82607237a8010aace9c66d10df46 | 80fa91a07b749a26f9f5e70223406d1c | Check if any assessment is selected
Return true if there is one selected | {
return (_numberOfSelected != 0 ? true : false);
} | 1 |
e48f4e0872fa3e5fc7d805f97f0aaa65 | c786395117c572f8b4c2800604b9e57e | Trigger validating event of an element. | function registerElements(elements, wrapper)
function triggerBrowserValidation() {
var submit = document.createElement('input');
submit.type = 'submit';
submit.style.display = 'none';
form.appendChild(submit);
submit.click();
submit.remove();
... | 1 |
c49c8007000e84afdd7bc1677e62e6ff | 89c5dcebfc2e236c762ffb099ca261ae | Test whether a Range larger than the file returns 416 Range Not Satisfiable | void test_Http_AddRangeHeader_RangeType_LastNBytes( void )
{
setupBuffersWithPreexistingHeader( &testHeaders, testBuffer,
sizeof( testBuffer ),
&expectedHeaders,
PREEXISTING_HEADER_DATA );
testRa... | 0 |
0f4447e448cbf2f9f87c2895d50e19bd | 1d594a77ad87203ab1f09c6cdd0728bc | Tokenizes the textual input and prepares sequences by applying padding | class TextVectorizer(BaseEstimator, TransformerMixin):
def _text_tokenizer(self, corpus: List[List[str]], top=None, oov=None, maxlen=None):
if self.debug_messages:
print('--- tokenization ---')
if self.fitted_tokenizer is None:
tokenizer = kp.text.Tokenizer(num_words=top,
... | 1 |
6c565a90e14d6910ad366f1f0db81ac4 | 18c40dbb41af9125a6f3553255e76f30 | Gets or sets the content hash. | class GuestConfigurationNavigationResponse(dict):
def content_hash(self) -> Optional[str]:
return pulumi.get(self, "content_hash") | 1 |
11bb4cbdfbc3473fc83ff02001eafc99 | 1ac970ca9afd882897941366d2003f31 | Changes from How To Play Menu to Controller Layout Menu | startScreen.visible = false;
menuScreen.visible = false;
howToScreen.visible = true;
gameOverScreen.visible = false;
gameScreen.visible = false;
highScoreScreen.visible = false;
} | 0 |
f134a73726bbc1e6f8a15e8fba13ccd4 | 7f61448ad6da3ef0f9cb03f40c5be655 | wanted output | cases like (1) | 0 |
fa937a1ed6a8cc919ce302e6bbe4f96e | bbac8d44a7b0e671d01427ec98496299 | vertex color callback for floats | namespace pbrt
int rply_vertex_callback(p_ply_argument argument) {
Float *buffer;
long index, flags;
ply_get_argument_user_data(argument, (void **)&buffer, &flags);
ply_get_argument_element(argument, nullptr, &index);
int stride = (flags & 0x0F0) >> 4;
int offset = flags & 0x00F;
buffer[inde... | 1 |
d9dce089d2100efd935eaab845932526 | 9b9d60cb4d728637545f93d10af19f47 | 将x插入到下标为k的点的后面 | node *Insert(int x, int i, node *head)
{
node *p, *q;
q = new node(x, nullptr);
if (i == 1)
{
q->next = head;
return q;
}
else
{
p = Findkth(i - 1, head);
q->next = p->next;
p->next = q;
return head;
}
} | 0 |
363e2307f6a628796da05c5b77995467 | b0e5a9bee737c340be0973a00166261b | 如果参数context中的某变量在本上下文中也有定义,则将该变量的值覆盖到本上下文中 | class Env(dict):
# 想当前环境添加一个外部环境
def set(self, var, val):
if self.has_key(var):
self[var] = val
else:
self.outer.set(var, val) | 1 |
bf7c6fb6ea700923d6b669d44f974d56 | da57a7d192a930e97ec20fa0c8236d59 | ########################################################
## Função para abrir a pagina de Cadastro de Usuário ### | class Usuario{
public function criar(){
include HOME_DIR."view/paginas/usuarios/form_usuario.php";
} | 1 |
1985097c851ea2e8b1900baa5339df45 | 64234a6ff5e94e3af467e44ea9c798b8 | 签署结果异步通知接口 | public String xl(Model model,HttpServletRequest request, HttpServletResponse response,@RequestParam(required=true) String merOrderNo,
@RequestParam(required=true) String orderPrice,@RequestParam(required=true) String retCode,@RequestParam(required=true) String status,
@RequestParam(required=true) String sign) {
... | 1 |
8624d718384dbb5ceb413545828c41f3 | 6f54a47c5e27045df78337d2cafb74f6 | 查询指定日期的交易卖出成交单 | {
string sql = string.Format("DELETE FROM {0} WHERE {1} = '{2}'", T_TableName, OrderRow.C_trade_date, date);
return this.ExecuteNonQuery(sql);
} | 0 |
1bed26a03704f638105a0c6838be00d1 | 10d6c1e62370c93aded25dfc62d1ac89 | 获取客户扩展字段14表列元数据 | Attr attrDesc=new Attr("Def13", getDef13CDesc(tblDesc), this);
attrDesc.setJavaType(FType.String);
attrDesc.setLabel("客户扩展字段13");
attrDesc.setNullable(true);
attrDesc.setPersistence(true);
attrDesc.setSerializable(true);
attrDesc.setStatic(false);
attrDesc.setRefType(false);
return attrDesc;
} | 0 |
fe641b98c0faa828a8386e9f820510d5 | ffaf8c594f1959178b17830916fcace7 | Cálculo de la duración del desplazamiento del disparo | {
yield return new WaitForSeconds(0.1f);
realizandoDisparo = false;
yield return new WaitForSeconds(tiempoCooldown);
disparoDisponible = true;
} | 0 |
3ea0a717de0c7feffeefd2121a793609 | 3e7d5ea99e4a0ba3475b8fcb7823fb67 | Cette méthode montre comment obtenir une page de la liste des documents en cours. | class DocumentIndexPage(MainMenu):
def list_documents(self):
self.wait.until(EC.element_to_be_clickable((By.XPATH, self.show_all_option_xpath)))
self.SHOW_ALL_OPTION().click()
self.FILING_YEAR_GO_BUTTON().click() | 1 |
ca85b6c2b334d6c3d0738bfd12dc83b8 | debab18f174d5e8e7d8f78104e4c56b1 | Returns the columns whose names are given in the input array | {
if (names == null || names.Length < 1) return null;
return table.Columns.Where(c => names.Any(n => c.Is(n))).ToArray();
} | 1 |
f191b35f5e6861954fdb520ed1e4cd48 | 5b22bcf849147eaaaf14bf9eb8e01b87 | Возвращает префикс страницы в зависимости от языка. | class DisplayController extends MainController
protected function getLangPrefixUrl ($prefix) {
if ($prefix != DEFAULT_LANG) {
return $prefix;
}
} | 1 |
c34030b4d7479663001ce412bc69a6f6 | e191d711f8318df303487763767c197a | 根据模型id获取标签列表 | ArrayList<String> getTagById(Integer id) throws SQLException; | 1 |
29633e6ded09300fcc3b2e37325bde3f | 8c7c61c2fc31322c6c4a1264ceb75ca0 | Пересчет показателей реализации при отмене проводки накладной реализации | namespace Vodovoz.Domain.Logistic
[Appellative(Gender = GrammaticalGender.Masculine,
NominativePlural = "адреса маршрутного листа",
Nominative = "адрес маршрутного листа")]
[HistoryTrace]
public class RouteListItem : PropertyChangedBase, IDomainObject
public virtual void FillCountsOnCanceled()
{
foreach(var... | 1 |
cf959755be25ca27a23a0c6a2cf4d37b | 7fa6c0806bdccd3682cf989244edd346 | Fonction permettant de débloquer le dialogue ou l'explication suivante (sécurité pour ne pas spammer) | function dissove(h3_element)
{
setTimeout(function() {
h3_element.style.visibility = "hidden";
}, 3000);
} | 0 |
9e1ff4935e651c9b4c8ac706cf3d92df | f7b0774c9a5aa125eea5777554437d7c | At xor-assign expression node. | class HDLExpression(HDLValue):
def __xor__(self, other):
return self._new_binop("^", other, this_lhs=True) | 0 |
617e4320b0e62150fa5aa8069c26e3c1 | a50c5bf80208f3ddf4b9268806a8b7cc | Updates Avada's custom fields from specified array. | class Thrive_Dash_List_Connection_ActiveCampaign extends Thrive_Dash_List_Connection_Abstract
public function build_automation_custom_fields( $automation_data ) {
$mapped_data = array();
foreach ( $automation_data['api_fields'] as $pair ) {
$value = sanitize_text_field( $pair['value'] );
if ( $value ) {
$... | 0 |
2dcee02bdeba51e2548cd6d3aebb3e03 | 9d675be961cd1afa3d9784a78c3b66fc | Increase the time count every second. | void _ISRFAST _T1Interrupt (void) {
u16_seconds++;
_T1IF = 0;
} | 1 |
28748f4b03c33b24d78812c302beaa07 | d74fd3839a2ce35e7c84dbb4db167144 | Executor/heartbeat-sender thread | static void heartbeat(void)
{
uint8_t i=0,count=0,dummy='?',reply=0;
int32_t socket_desc=0,query=0,error=0;
struct sockaddr_in sock_heartbeat;
struct timespec timer;
timer.tv_sec=1;
setsockopt(query,SOL_SOCKET,SO_SNDTIMEO, (const char*)&timer,sizeof(timer));
sock_heartbeat.sin_addr.s_addr = INADDR_ANY;
... | 1 |
fbbf79e8c2deddd48eaa8d7e82c7a280 | 4d1a3f24888ef6a0c6e367a53aac328d | Get highest priority process for the package. | {
assert(pcb->GetSize() > 0);
int maxPriority = -1;
Process* maxProcess = NULL;
pcb->Start();
for (Process* p = NULL; !pcb->AtEnd(); pcb->Next())
{
p = pcb->CurrentProcess();
if (p->CheckState() == NEW && p->GetPriority() > maxPriority)
{
maxPriority = p->GetPriority();
maxProcess = p;
}
}
retur... | 1 |
b33006c300e64add49831a90749bb667 | 58cfbbc2ac6e63bb30b5051e8e1f017d | Create a review comment for a pull request | class EventReviewComment(models.GitHubCore):
def to_review_comment(self):
from . import pulls
comment = self._json(self._get(self._api), 200)
return pulls.ReviewComment(comment, self) | 0 |
72ecad8594748b1ea612b4eda3208082 | c7ba27b68c3d8fa006ac4a16a715c0fa | 這是累積年資達多少就有幾天慰休的函數 | var sd = new Date($( "#date_appointment" ).val());
var d = sd.getDate();
var m = sd.getMonth();
m += 1;
var y = sd.getFullYear();
var od = new Date($( "#date_specialbreak" ).val());
var ey = od.getFullYear();
var Howyouold = (ey - 1 - y) * 12 + 12 - m;
var rst = new Date($( "#date_j... | 1 |
a1bcc3909ca8a14104da4e34fc446669 | d0a01d50e82149b413076d7c324ea4fa | Return if cspf-paths matches spf-paths. | def provides_csp_features(response):
return ((len(retrieve_csp_policies(response))
+ len(retrieve_csp_policies(response, True))) > 0) | 0 |
1a89ff6c1b6bce192bdb3b16d7b9edff | 0387dc888fdb6dfa8dff8736b6e17d32 | 查询单个应用
调用此接口查询单个应用详情。
Please refer to HUAWEI cloud API Explorer for details. | public class ServiceStageClient
public SyncInvoker<ShowApplicationConfigurationRequest, ShowApplicationConfigurationResponse> showApplicationConfigurationInvoker(
ShowApplicationConfigurationRequest request) {
return new SyncInvoker<ShowApplicationConfigurationRequest, ShowApplicationConfigurationRespon... | 1 |
0f2338440d9f8f872f6099d68401321a | 44cb1d9ea55d48831dd673bbbc368f23 | obtiene la ruta de la carpeta publica | class Application
public function getPublicDirectory():string
{
return $this->publicDir;
} | 1 |
0a7b4462bb9a8e70858909156e6fb60f | 8ff158ace79e3558e33b3581ab92ad11 | only allow 2 mines to exist concurrently | count = 0
while(@mines > count)
a = self[rand(x), rand(y)]
unless a.mine?
a.instance_variable_set(:@mine, true)
count += 1
end
end
end | 0 |
bcc955e1562f8efc033277bbb6af4ff0 | ea2a714879b4ac6cbbd7ae13f45afb03 | Obtiene la información de saldos de las cuentas asociadas. | namespace DRMFSS.BLL.Interfaces
List<BLL.SIBalance> GetSIBalances(); | 1 |
3981832ffe2d04c4d368376281cc9a4f | faeff370bd7b5944f62ee180344635a7 | 房间timeline的消息实体 | function MyMessage(messageId,fromUserId,fromUserName,title,text,date){
this.messageId=messageId;
this.fromUserId=fromUserId;
this.fromUserName=fromUserName;
this.title=title;
this.text=text;
this.date=date;
} | 1 |
be0ca98d6d7edc6bb8493781eaf0a29e | 7997bba931b3be7cd4ecefe873bf3c8b | Checks if a nunmber is denormalized. | namespace Utf8Json.Internal.DoubleConversion
public bool IsDenormal()
{
return (d32 & KExponentMask) == 0;
} | 1 |
1a8ec1dc10fff96c78817c813bcaefc3 | 7bf1de4ba9361d702060028ca35220cd | 取得群組加成經驗倍率 | namespace AzurlaneCalculator.Stores
static class CalcExp
public static decimal StageExpBoost(
bool LeaderFlg, bool MvpFlg,
bool CondFlg, bool RankSFlg) {
decimal boost = 1.0M;
boost *= (LeaderFlg ? 1.5M : 1.0M);
boost *= (MvpFlg ? 2.0M : 1.0M);
boost *= (CondFlg ? 1.2M : 1.0M);
boost *= (RankSFlg ... | 1 |
579b83b86bae18419e601a38568d8e77 | e6500a2981879f2cfd78b15126b0c8b8 | sets the width and the height of the grid | if (Params.WORLD_HEIGHT >= Params.WORLD_WIDTH) {
size = 575/Params.WORLD_HEIGHT;
}
else {
size = 575/Params.WORLD_WIDTH;
}
for (int i = 0; i < Params.WORLD_WIDTH; i++) {
for (int j = 0; j < Params.WORLD_HEIGHT; j++) {
Shape s = new Rectangle(size, size);
s.setFill(null);
s.setStroke(Col... | 0 |
b7948a62eb44bd268694ccbf732257ee | f8f78c85a8ac102de376b92ebee5510e | Retrieves a production type by it's pixel notation. | public class DeviceTypeLoader
public DeviceType getDeviceType(String aProdKey) {
return (m_deviceTypes.get(aProdKey));
} | 0 |
84ccb9edd279f992b4ec82c2bccaec63 | 91af0df44aa8b00ac93e8d494307ec8d | Something may have changed with the objects bound to the PlayMovieScene node, which may require us to change
which actors are possessed, and thus create new puppets for different actors. | void FSequencer::NotifyBindingsChanged()
{
ISequencer::NotifyBindingsChanged();
OnMovieSceneBindingsChangedDelegate.Broadcast();
} | 1 |
1786390ff73c7000132e3589dd9fbdba | f8778b6966466dd4fdbe8b0fb2ad5819 | save module properties from edit module form to li node | $xpath = '//modules/' . $INFO['name'];
$regedit = Service::Registry();
$regedit->set($xpath, $INFO['name']);
if (is_array($INFO)) {
foreach ($INFO as $var => $module_param) {
$val = $module_param;
$regedit->set($xpath . '/' . $var, $val);
}
}
} | 1 |
7910766e07e80ec6720fa4ffecf2bf3e | b8c7ec664f389da6ec3efe45b4483a34 | İşletmenin plan bilgilerini getirir. | [HttpGet]
public List<PlanDetaylari> Get(int PlanID)
{
ClaimsIdentity claimsIdentity = HttpContext.Current.User.Identity as ClaimsIdentity;
int currentUser = Convert.ToInt32(claimsIdentity.FindFirst("ID").Value);
var IsletmeID = db.Planlars.Find(PlanID).Isletm... | 1 |
42b4b771d73dff904f82edd240a6c7d7 | 56cd1a08344bd92d1de33ab9cf0964a8 | Displays all appointments in main screen tableview. This button is selected as default. | public class MainScreen implements Initializable
@FXML
void onActionDisplayAll(ActionEvent event) {
clearTable();
MainScreenTable.setItems(Queries.getAllAppts());
} | 1 |
0d05d0b165137fdabd80f77e2e74c650 | 9d3b4a5a273c26d6dfcecb21f39b3bcf | 限制网速 | class Request
public function limitRate($download = 0, $upload = 0)
{
$this->downloadSpeed = $download;
$this->uploadSpeed = $upload;
return $this;
} | 1 |
f3ae642758c52c37972a343c847acc44 | e96abd5a45df88959982cdd6db39a9ba | Get required attributes for delete. | {
$deleted = [
'id' => $this->when(Http::isInternalRequest(), $this->id, $this->public_id),
'uuid' => $this->when(Http::isInternalRequest(), $this->uuid),
'public_id' => $this->when(Http::isInternalRequest(), $this->public_id),
'object' => $this->getObjectType... | 1 |
0e12a5b5ba6b874bb5271215fc0f7a2f | 30a2de7c17af8220ed48ad107fe5d6dd | Create a filter for use in an FFmpeg filter graph | func Avfilter_graph_alloc_filter(g *AVFilterGraph, f *AVFilter, n string) *AVFilterContext {
return (*AVFilterContext)(C.avfilter_graph_alloc_filter((*C.struct_AVFilterGraph)(g), (*C.struct_AVFilter)(f), C.CString(n)))
} | 1 |
ea57dfc0ea02f9a79c55c98f0cfeaba3 | cab58bcefb5bf8caf886900a747aae59 | It reads data from Kinect's capture interface and saves the frame as QImage. | void Camthread::readFrame( )
{
frame = cvQueryFrame(cam);
QImage image = QImage((const uchar*)frame->imageData, frame->width, frame->height,
QImage::Format_RGB888).rgbSwapped();
cvWriteFrame(writer,frame);
emit sig_GetOneFrame(image);
} | 1 |
4a19ffcd8d2eeb5138e9c436feb21140 | 0c7ca7982703df7ab1c93031179ad6d9 | Test extracting javascript functions. | def test_exposed_js_functions(js_code, expected_matches):
matches = eel.EXPOSED_JS_FUNCTIONS.parseString(js_code).asList()
assert matches == expected_matches, f'Expected {expected_matches} (found: {matches}) in: {js_code}' | 1 |
834870dbfd12c9faf5fbf5c0a3c2c372 | 738dd414f6555d5c24d7741c5bfecfb0 | Get the hql reference.
<p>
The hql reference. | public class Page
public String getHql() {
return hql;
} | 1 |
bbdc4b9f4b17067d49b11a50378278b5 | 7088e94b0fbb98eda4af093dc8636107 | 出差结果驗證 | function doResult(result) {
var code = result.Code;
var msg = result.Error_Msg;
if (code != "2000") {
alert(msg);
return false;
}
return true;
} | 1 |
f59930fd8478fdf4b8719b6baa021b31 | 4fc72f80771e6f691f7d32ac70681dc3 | Gets the data of this PipelineResponseV4. | {
if (this.Succeeded)
{
return SerializedPipeResponse.Success(this.CallId, serializer.Serialize(this.Data));
}
else
{
return SerializedPipeResponse.Failure(this.CallId, this.Error);
}
} | 0 |
462eb26939fba74102ebe61e82ddbfc3 | f55f7ce4fda9ccfaf4fcb8d2e67bf0a5 | pull out all the columns that have sorting set | class WP_List_Table_Helper extends WP_List_Table
function get_sortable_columns() {
if ( empty( $this->sortable ) ) {
$sortable_columns[ $this->primary_col ] = array( $this->primary_col,false );
} else {
foreach ( $this->sortable as $sortable ) {
$sortable_columns[ $sortable ] = array( $sortable,false... | 1 |
a798768e505b6bac9f998f83b0f4be50 | 52052e9f3497e22d6943bde8f27a7c95 | Returns the meta object for the attribute '{@link codegen.ViewModel#getID <em>ID</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public class MSVDockTripRowItemProvider extends MSVDatasetRowItemProvider
protected void addIDPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_MSVDoc... | 0 |
717771d2d28c421ed28732e359d93e96 | 5644580709a636f3f6d8b6b5de6bd0fb | Create a shape that represents a vector. | [System.Serializable]
/// <summary>
/// Vector point.
/// </summary>
public class PointShape : VectorShape
public static PointShape Create(Vector2 location)
{
PointShape shape = Create();
shape.position = location;
return shape;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.