query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
7d925332da028bb1980a4f0de4c044d0 | e6232b5961de844b9bd7b9b6a90b0111 | Подготовка модели к вставке в дерево в качестве последнего корня | {
string newParentId = data.Last().Id;
if (string.IsNullOrEmpty(newParentId))
throw new PlatformException("Последняя созданная строка не имеет идентификатора.");
parents.AddLast(data.Last().Id);
} | 1 |
000a766259d1b4ca0c0b9b0056968809 | d6eb037f20dcaebeb8f043d295795abd | Add complex/dynamic collisions to an object, 255 collisions at a time max | {
_check_connection();
_send_Line("Collisions");
int ncollisions = _recv_Int();
_check_status();
return ncollisions;
} | 0 |
aab0c2beca094f7b9936325a8758e36f | 8518502c5f51ca1eec67e862e9e54195 | VIP游戏记录 | @DataSourceType("update")
@Service
public class PlayerUpdate
@Dispather(value = "videoforvip")
public JSONObject videoforvip(MethodModel model) {
return model.getSession().getPlayerData().videoforvip();
} | 0 |
e0e7dbc69ef87e42b1ec5cc1237eed48 | f4669ca598aa39f6c6b13ebb3b8a2d04 | 发送查询员工的接口请求,并return返回结果 | class ApiEmployee(object):
# 初始化
def api_get_employee(self):
log.info("查询员工的url:{} 查询员工的请求头:{}".format(self.url_get.format(api.user_id), api.headers))
return requests.get(url=self.url_get.format(api.user_id), headers=api.headers) | 1 |
6850bbcc1ff01f5ce7a8ee4f0d142cb7 | f6f6d11a0841ca269f42ca8e3379b2a6 | fungsi Enkripsi Shift Cipher | int i = 0;
int lettervalue;
int temp;
int temp2;
char encrypted[100];
while(origtext[i]!= '\0'){
temp = origtext[i];
temp2 = origtext[i] - 65;
if(temp2 >= 0 && temp2 < 26 ){
lettervalue = (temp + key1 - 65)%26 + 65;
encrypted[i] = lettervalue;
... | 1 |
63b100e613adbfc06ab73ba2cbe3c1b0 | 8a016a65b4e0b877329ea8398686ce53 | This method is called by printer library if an error occurs at the end of the printing workflow | class PrinterListener
public function failed(PrinterTrigger $event, $exception)
{
echo "event failed";
} | 1 |
b1e8fe8f97eec84b92cc1163cc5aefcc | 081b11098f590c91cb5ef5c014703b33 | Returns the coefficients used for PID control on the indicated motor when in the indicated mode | void HiTechnicMotor::setPIDCoeffs(uint8_t kP, uint8_t kI, uint8_t kD)
{
controller->setMotorPIDCoeffs(port, kP, kI, kD);
} | 0 |
f19c63d32faa190820e684205abf7c43 | a95e311f593f2ab5301e6e603dc41b73 | 获取最近30天流量概览 | def v3_get_last_qps():
now_ts = int(time.time())
query = 'min(1 - uap_mix_streaming_appCenter_resourceIspUsage_usage{instance=~"120.131.12.101.*|120.24.80.42.*|47.111.233.232.*|101.133.175.161.*|101.200.232.192.*|47.115.148.104.*|47.114.52.104.*",isp=~"AP|CMCC|CUCC|CTEL|NA|VN|EU"}) by (isp)'
params = {
... | 0 |
548c0ae0edf9d2a8a76bdacd7f3a756f | 07e0b8c2cd7b5e59acbbfc986685d96a | Encode |_value| using SLEB128 encoding. | namespace debug_parser namespace
int64_t readSLEB(folly::StringPiece& sp) {
uint8_t shift;
uint8_t val;
uint64_t r = readULEB(sp, shift, val);
if (shift < 64 && (val & 0x40)) {
r |= -(1ULL << shift);
}
return r;
} | 0 |
a1b2b6ee91e8b67a5de85004d8ea2204 | 126318b1cf787caa0592440273c58b82 | Verifies that the copy constructor of the read only collection works | namespace
TEST_F(CopyConstructorTest, CheckForEquality) {
double nums[3] = { 43.342, 534.342, 7.324 };
LinkedList<double> list(*list_);
std::size_t i = 0;
for (LinkedListIterator<double> it = list.Begin(); it != list.End(); ++it) {
EXPECT_EQ(nums[i], *it);
i++;
}
} | 1 |
fb2d75238e38d5599cb5635141ccfdc5 | 2c415fa000a57688820b7ae57aae329e | get the sub-Notions related to the created Notion | {
Contract.Requires(binding != null);
Contract.Requires(binding.Name is NameSemantics, "The name the binding binds to has no notion");
Contract.Requires(((NameSemantics)binding.Name).Notion != null);
return ((NameSemantics)binding.Name).Notion;
} | 0 |
a839733151957549b5dd854b24950484 | 67f64a81e4074086bd720443eb56a7a8 | 得到教师任课记录数 | int getSearchCountByTeacher(Map<String, Object> searchParam); | 1 |
2670598fa10435eeea72cae1163c946e | b4d88faa1bd4a5e10f3a93738a908017 | 写入解锁序列. | key = this.normalizeKey(key);
if (!this.isUnlockable(key)) return false;
this.unlockInfo.set(key, this.makeUnlockData(key));
this.notify(key);
this.save();
return true;
} | 1 |
083a3bf74c87fb1e60aa9c1c8b9e3a33 | ab31f7a10d126a967d6650fa1c05a450 | Gets the link errors. | public class PageErrors
public String getLinkErrors() {
return linkErrors;
} | 1 |
ea95f6302610f3e117564be63551e4e6 | 30a6bb5d0d7e1357ac20389c166a35fc | 验证驾校详情页完整性 | function validateDetialDics () {
var InputDetailedLocationDiv = $("#InputDetailedLocationDiv");
var InputDetailedLocationFalseTip = $("#InputDetailedLocationFalseTip");
var InputDetailedLocationGlyFalse = $("#InputDetailedLocationGlyFalse");
var InputDetailedLocationGlyTrue = $("#InputDe... | 1 |
501a46a03e5a18972af223c5952650a7 | 59e95ae35c4d83a39b8c916cb36539a2 | Get the class for a result cell given the pass percent. | let statusClass = ''
switch (lastMIBResult) {
case "Pass":
statusClass = 'historicalTestGreen'
break;
case "Fail":
statusClass = 'historicalTestRed'
break;
case "Fail Unknown":
statusClass... | 0 |
1ef34c4d6702bbad18dd600aa772ebb4 | c3c60775e841115dfa5a84037cbfbff1 | After forward since the model output two values (logits, out_flattened_features), out_flattened_feature are taken,
and strategy.mb_output is set to only logits, to compute CE with avalanche. | class ValueNetworkMixin:
def extra_action_out(self, input_dict, state_batches, model, action_dist):
return {
SampleBatch.VF_PREDS: model.value_function(),
} | 0 |
439e32f62f18b6562deaad969d7df396 | 113536458fb3f7e7071a052b573ace29 | ## Calculate intensity function | sc <- 60000 * (im[,,"grey"] - im[,,"black"]) / (im[,,"white"] - im[,,"black"])
if (fix.inf) {
sc[is.infinite(sc)] <- NA
}
sc
} | 1 |
6e471a43cedd4096fea4890d97dfa570 | 398ecaafa5651135f9639bb09a277f01 | GET /slideshows
GET /slideshows.json | @slideshow = Slideshow.new(slideshow_params)
if @slideshow.save
render json: @slideshow, status: :created, location: api_v1_slideshow_url(@slideshow.id)
else
render json: @slideshow.errors, status: :unprocessable_entity
end
end | 0 |
7cfabd1c1530e37488dbbed0cc8a920e | 2e793ed2f855306e6dec97338c69779b | 获取该品牌下当前在线经纪人总数 | @Service("onlineUserService")
public class OnlineUserServiceImpl extends ServiceImpl<OnlineUserDao, OnlineUserEntity> implements OnlineUserService
@Override
public Integer getCompanyTotal(Integer companyId) {
return ouDao.getCompanyTotal(companyId);
} | 1 |
d5023a6ff0f7f6e1f96fa1874025d916 | 8141f3895790150168361e9ee5c43ddb | Creates a new stateful lexer instance based on the internal lexer definition. | class AsmLexer(object):
def build(self, **kwargs):
self.lexer = ply.lex.lex(object=self, **kwargs) | 1 |
44914916952e3f117df91f38fa8fc80c | 2d279a855dc4c55992ec838df1867968 | Process HTML data and print report to console. | class Html implements ReportInterface
public function process(CodeCoverage $coverage)
{
return $this->report->process(
$coverage,
$this->options['target']
);
} | 0 |
b4cf54d2f7fda36c817bfac232afb5cd | 50bbb9c597e1ebd6ff718b691705859d | 通过Mod名获得Mod的路径 | public class UtilsPublic
public static String getModulePath(final String moduleName) {
return Utils.getModulePath(moduleName);
} | 1 |
1a13c13ec730671acca3d98dc636afa0 | 2130f2ff2400554db2bbc5dad777ee5c | Update the serving status of the version. | if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
servingState_ = value.getNumber();
onChanged();
return this;
} | 1 |
bdc3b74750275be10f8138b87a028817 | 538da0eb2a36ba09bf4fb33254b52438 | Creates a module that can be used to enable asynchronous method and scheduling
support. | variant: AsyncBuildVariant = RELEASE_ASYNC
): Promise<QuickJSAsyncWASMModule> {
const [wasmModuleLoader, QuickJSAsyncFFI, { QuickJSAsyncWASMModule }] = await Promise.all([
variant.importModuleLoader(),
variant.importFFI(),
import("./module-asyncify.js").then(unwrapTypescript),
])
const wasmModule = ... | 1 |
c94c9473a45bbfb5a1c9b3f7142641ba | 3092f13a3af82eda5c6fb54b18688d8c | Peint la fenêtre. | class Vue():
def afficher(self):
self.r.mainloop()
self.k.mainloop() | 0 |
50c36a7677f0664addcc45e94c1393f9 | f53eeb19cd6393eff9302444121852a6 | (参考:https://cppx.hatenablog.com/entry/2017/08/06/104144) | static std::pair<std::array<ImVec2, 8>, std::size_t> convexHull(std::array<ImVec2, 8> points) noexcept
{
std::swap(points[0], *std::ranges::min_element(points, [](const auto& a, const auto& b) { return a.y < b.y || (a.y == b.y && a.x < b.x); }));
constexpr auto orientation = [](const ImVec2& a, const ImVec2& b,... | 1 |
bbe4ca2939b6d93493d5e18def541766 | af25f98aea848e33df5bf0bd64804377 | 根据给定的参数构造一个子Spliterator | class StreamSpliterators abstract static class UnorderedSliceSpliterator<T, T_SPLITR extends Spliterator<T>>
public final T_SPLITR trySplit() {
if(permits.get() == 0) {
return null;
}
@SuppressWarnings("unchecked")
T_SPLITR childSpliterator = (T_SPLITR... | 1 |
27e38dce3003cc8422672315010994f1 | 920d300092985208997800e013fc7ee1 | Sends a control signal to a group of processes attached to a common console | boolean GenerateConsoleCtrlEvent(int dwCtrlEvent, int dwProcessGroupId); | 1 |
4b4bb85b296410e8d506451ac3bb9b70 | d8431060b46d0f3126cefcd8bd009228 | get the HSIC statistic. | gram_x = center_gram(gram_x, unbiased=debiased)
gram_y = center_gram(gram_y, unbiased=debiased)
scaled_hsic = gram_x.ravel().dot(gram_y.ravel())
normalization_x = np.linalg.norm(gram_x)
normalization_y = np.linalg.norm(gram_y)
return scaled_hsic / (normalization_x * normalization_y) | 1 |
efb23cf8d5e5a0bbe1a041f176a8ffd6 | 34b5cdb5f2b362c3156a825f63cb38bf | vide cache des données éventuellement non sauvegardées. | if($this->caching && !empty($data)){
$page = (!empty($this->cache['page'])) ? $this->cache['page'] : FALSE;
$tags = (!empty($this->cache['tags'])) ? $this->cache['tags'] : FALSE;
$vars = (!empty($this->cache['vars'])) ? $this->cache['vars'] : FALSE;
$ignored_vars = (!empty($this->cache['no_vars'])) ? $thi... | 0 |
7fbbfff0767080c498784f041680c473 | fc40dc753d63af6aae10eacd81425b47 | Unit contains no data, but the CDR spec has no concept of types that carry no data.
We decide to serialize this as nothing. | namespace{
inline static void igbinary_serialize_null(struct igbinary_serialize_data *igsd) {
igbinary_serialize8(igsd, igbinary_type_null);
} | 0 |
c116cac26026c602705f50f8c002cdcf | 11e99ef2577d1558d0840e546a125ac0 | Get 视频内容审核 Ocr 文字敏感任务的查询结果,当任务类型为 Political.Ocr 时有效。
注意:此字段可能返回 null,表示取不到有效值。
注意:此字段可能返回 null,表示取不到有效值。 | public class AiContentReviewResult extends AbstractModel{
public AiReviewTaskPoliticalResult getPoliticalTask() {
return this.PoliticalTask;
} | 0 |
02265db530e2847d1e82f87e006d3d14 | 60e2dafda1c81adf8f03045c14ac319e | Apply this graphs's layout cleanly and display all changes. | for (int i=0; i<_graphList.size(); i++) {
Graph graph = (Graph)_graphList.get(i);
if (graph instanceof GraphComposite)
((GraphComposite)graph).layoutAll();
}
return true;
} | 1 |
240ea64652bf21c85368f6edb1fdf99b | 803d725b1d992dbaa7db5cde5ddc1330 | Snake.add_length() -> None
adds a new length to the snake | void snakelengthincrease()
{
snakerow.push_back(snakeendrow);
snakecol.push_back(snakeendcol);
} | 1 |
f0591418e66628113edf25e634af5ae7 | fcbc606a749fba7d140a6eaecafdf6c7 | Returns a unique identifier for this list. | class ReadingList extends Record
public function getId()
{
return (string) $this->json()->id;
} | 1 |
ee2fbb4c1f970f422885c83e1ff308e1 | 511df7eecdb423b57834d8ccdd7f2afb | Sets the payout | class PayoutItemDetails extends PayPalModel
public function setPayoutItem($payout_item)
{
$this->payout_item = $payout_item;
return $this;
} | 1 |
0a6779623dbb77ef7b5f441493a54b9e | e43f1f3f0206ce988e25d9f6570c4d5d | Indicates if the filter input is visible | export class GoogleMapsService
public getInputVisibility(): boolean {
return this.googleMapsInputVisibility;
} | 1 |
2f41994c4efb6b147b295e53957f2724 | 8641a8670f85f9d14850118c3f214cf7 | Perform Fermat's factorization. | t = clock()
ret = []
nn = n
while nn % 2 == 0 :
nn //= 2
ret = add_fact(2, ret)
maxFactor = int(nn**0.5)
maxI = (maxFactor-3) // 2
maxP = int(maxFactor**0.5)
sieve = [True for j in xrange(maxI+1)]
i = 0
for p in xrange(3, maxP+1,2) :
if p > maxP :
... | 0 |
2d8831f7f94faebf5f60646028e1a986 | c54d1e3f4538b44831f8b8ce804d6d86 | Add to the printer data stream the PCL commands to send the pixels of the
selected image. | cdj880_start_raster_mode(gx_device_printer * pdev, int paper_size,
FILE * prn_stream)
{
int xres, yres;
hp850_cmyk_init_t init;
init = hp850_cmyk_init;
init.a[13] = cdj850->intensities;
init.a[19] = cdj850->intensities;
init.a[25] = cdj850->intensities;
assign_d... | 1 |
2333046694672f30a64e1482619f3f30 | c793ef1a5a0e6f3996cb98c12f078bb8 | Normalized Gaussian plus a constant offset. | def gaussian1d_no_offset(height, x0, sig):
sig = float(sig)
return lambda x: height*np.exp(-0.5*((x-x0)/sig)**2) | 0 |
7cdccf9e7ee9d6b5903e344c414ddc80 | 869ad189cea82c18bb12f67dc0a0db9e | Create a VIP node and verify that it gets created with the correct configuration. | tempdir = testcase.useFixture(TempDir())
config = get_config(tempdir.join(b"node"), b"tub.port")
store = VoucherStore.from_node_config(
config,
get_now,
memory_connect,
)
return store | 0 |
17d082f48de3e23dadbf3e407720fd39 | ea5b18e064eacd574a7bc9b7914943e1 | # Wind Chill Formula | ifelse(x < 0, 0,
ifelse(1 < x, 1,
(1 / 3) * x ^ 4 * (5 - 2 * x)))
} | 0 |
8da37f38f284352fc7ec9764ccf6696c | d68a7840c4893aff59fce7443fbe6a22 | Producto::insert([
'nombre' =>'Bidon de agua Purificada 20 lts',
'precio_inicial' =>'2900',
'img1' =>'',
'path1' =>'https://i.imgur.com/zpXK6XG.png',
]); | class llenarproductos extends Seeder
public function run()
{
$pro=factory(App\Models\ModeloProducto::class,15)->create();
} | 0 |
9c0754269a9bf2f2b5516f0164f9cced | 65225f85fbed0eba176dbcda6caa12f4 | Retrieve information about a given term:
ontology, parent terms, and name as a tuple. | term = biosql.Term.all().filter('name =', term_name
).filter("ontology =", ontology).get()
if not term:
term = biosql.Term(name=term_name, ontology=ontology)
term.put()
return term | 0 |
cd79f4b649faaaef8e5d0600716bbf73 | af09ad33133f8ce554bd69d38f211656 | Draws a plane aligned with the X and Z axis, with its front face toward
positive Y. The plane is of unit width and height, and uses the current
OpenGL material settings for its appearance | {
var w = width / 2;
using (GLDraw.Begin(BeginMode.Quads))
{
GL.Normal3(0, 0, -w); GL.TexCoord2(1, 1); GL.Vertex3(w, w, -w);
GL.Normal3(0, 0, -w); GL.TexCoord2(1, 0); GL.Vertex3(w, -w, -w);
GL.Normal3(0, 0, -w); GL.TexCoord2(0, ... | 0 |
eaae450688611bd294eb646c8843f9b4 | 307074d54822a1cf4662f603d7016442 | Get all members for a group | {
$collection = new ComponentCollection ();
$this->Encryption = new EncryptionComponent($collection);
$groupMembers = $this->find('all', array('conditions' => array('BusinessOwner.group_id' => $this->Encryption->decode($groupId)), 'fields' => array('BusinessOwner.member_name', 'BusinessOwner... | 1 |
517cc35ad5de9717cc19d18060d80b07 | 2a7dd5b2811ad35bfe39e938d8f8a1b1 | Directly applies the filtering, ordering and paging to a queryable.
also returns the total count of the records. | namespace PayrollSystemDemo.Repo.Repository
IQueryable<T> Filter(Expression<Func<T, bool>> filter, out int total, int index = 0, int size = 50); | 1 |
2c76dd4c3f2aff56ab883d56df86c34c | ff8a6f3ad955361ad11f40f010bd46a4 | 根据优惠券的状态参数返回详细文本 | {
switch($status_bit){
case OrderConst::STATUS_BIT_CONFIRMED:
$diff = $is_set ? '酒店确认订单' : '确认订单状态取消';
break;
case OrderConst::STATUS_BIT_SMS_NOTIFIED:
$diff = $is_set ? '预定成功短信已发送' : '短信发送成功状态取消';
break;
cas... | 0 |
cb65ef435ea8b1d1982610e8f271e49b | d6e7b186a83e93f5959bd833a53f7b87 | 在iP所代表机器上执行redis安装脚本。 | public String getRedisStartScript(); | 0 |
47bd8030603ee351e3e5628809e021b3 | ccf768cbb55e898894fe3550afa1632b | NIRSpec transformation from GWA detector side to Science frame. | norm = const.c.to_value('cm/s') * nH.to_value('cm-3') * self._norm
norm_grid = (np.tile(norm, [len(Egamma),1])).T
spec = spec0 * norm_grid
return spec | 0 |
3f159c8d375c02e2fa063698effd12fa | b3ea8ecb031cdcdb2403781e75e590af | Initialize the timer counter so that it 's ready to use ,
specify the device ID that is generated in xparameters .h | uint32_t status;
u32 ctlsts;
status = XTmrCtr_Initialize(&AXITimerInst,AXI_TIMER_DEVICE_ID);
if (status != XST_SUCCESS) {
return XST_FAILURE;
}
status = XTmrCtr_SelfTest(&AXITimerInst, TmrCtrNumber);
if (status != XST_SUCCESS) {
return XST_FAILURE;
}
ctlsts = XTC_CSR_AUTO_RELOAD_MASK | XTC_CSR_EXT_G... | 1 |
440fd0cde8a8d9b548904301cd1c3325 | 2d1208211976e198554d5b874b1e5e5a | Duplicates obuf. | static void
gc_obuf_deinit (Sophon_VM *vm, Sophon_GCObjectBuf *obuf)
{
if (obuf->objs) {
sophon_mm_free(vm, obuf->objs, sizeof(Sophon_GCObject*) * obuf->cap);
}
} | 0 |
89512cecdc7e41b793260d9b4e0f6012 | bc685b155e2362482d82efe49960b00e | Apply independent channel coupling (applied after IMDCT). | me = "coilcomp.apply_gcc_weights"
if ks.shape[2] != cc_mat.shape[1]:
print("%s> ERROR! num channels does not match!" % me)
print("%s> ks: num channels = %d" % (me, ks.shape[2]))
print("%s> cc_mat: num channels = %d" % (me, cc_mat.shape[1]))
num_kx = ks.shape[0]
num_readout = ... | 1 |
a93678cc0ac52e6d599dcdfb5565d87a | 3fc0e72f9ec2ae22a25c09537ea63e1f | 定义获取到包含该歌曲的歌单的函数 | url=self.GetURL("song",0, self.channel)
response=urllib2.urlopen(url)
data=response.read()
moe=json.loads(data)
i=0
while i< len(moe['response']['playlist']):
self.list.append(moe['response']['playlist'][i]["url"])
self.piclist.append(moe['response... | 1 |
48a244062359d1611a195ec13526966e | f90be0a6e23a17f80b603ea6b7275e04 | 获取失业保险缴费记录 | @Service
public class ZyLcxxService extends BaseBO<ZyLcxxDao>{
public List<Map<String, Object>> getCcjl(String yhbh) {
return zyLcxxDao.getCcjl(yhbh);
} | 1 |
7aa11497949c6ddd6fa6e6268a7dda68 | 8c24c78aefd8a0202191d4dd975b6e49 | Method to get the Firebase key of the Application | String decryptedApplicationKey = AlPrefSettings.getInstance(context).getApplicationKey();
if (!TextUtils.isEmpty(decryptedApplicationKey)) {
return decryptedApplicationKey;
}
String existingAppKey = sharedPreferences.getString(APPLICATION_KEY, null);
if (!TextUtils.is... | 0 |
b123006c31ad3525efcbeaca03214146 | 3c6e01485fed0efec01312547ff3970f | Считываем предложение до знака .?! или до конца файла | {
if (Pos == 0)
return "";
else
{
int PosDelimiter = TextBox.Text.LastIndexOfAny(" \r\n(".ToCharArray(), Pos - 1);
return TextBox.Text.Substring(PosDelimiter + 1, Pos - PosDelimiter - 1).TrimEnd(".".ToCharArray());
}... | 0 |
2414149698be06a748c8d68e7dbbfa98 | 6b6534d925dd2c0ac67a1a6ad46a7199 | 这里是设置项目的根路径名为"base"。 | func init() {
BasePath, _ = os.Getwd()
} | 0 |
13a59dad1ed886494cd8ba6f4818e814 | edce1750ebd19c33e5ee9f8af2168c3d | 自动展开 | function expendMenu($ul) {
if ($ul.length) {
$ul.addClass("in").css("height", "auto");
}
} | 1 |
859e5fa337d3f14c3b7d5ad23eb50d4c | e6f1ef395f362d27b8086f70d7ff991a | Append two dictionaries. | def appendDicts(dictA,dictB):
if type(dictA) is list:
dictA=dictA[0]
if type(dictB) is list:
dictB=dictB[0]
dictC=dictB
for i in dictA.keys():
dictC[i]+=dictA[i]
return dictC | 1 |
e1974a3f5d24de9fc553f9161ba357e6 | c14a6e5b7f2df9f2a70e5648dc054530 | Enable special alignment options | align.derivativeType = 'Numerical'
align.alignmentLevel = 1
align.requireOverlap = False
self.setFullReco(True)
mualign.alignMDT = True
level1modules = []
if mualign.doEndcap() :
if mualign.endcapsToAlign=='A' or mualign.endcapsToA... | 1 |
ae6a74de517d9b4cc843c078086a9cf0 | 216378bae74249648942cdaa2ee64986 | 获取图片加载监听器 | const refresh = debounce(this.$refs.scroll.refresh)
this.itemImgListens = () => {
refresh()
}
this.$bus.$on('itemImgLoad', this.itemImgListens)
} | 1 |
345b1c7158d4905137837a4e7256889d | c3e8c5a6963fe7a1b13d1406217260cf | プルダウンのデータに対応した状態パネルのデータを返す | $state = [];
$key_column = $field['#key_column'];
if (empty($key_column)) {
return $state;
}
if (!empty($options['value_form'][0][$key_column]) && $options['field_cardinality'] == 1) {
$state[$options['state']][$options['selector']] = [
'value' => $options['value_form'][0][$key_c... | 1 |
31d932689e99e2077aca5f715d85b126 | aa5b45140acae6e9dbde7a691c8c66a3 | Create a link to open the file in an IDE | Intent intent = new Intent ( "android.intent.action.VIEW" );
intent.addCategory ( "android.intent.category.DEFAULT" );
intent.addFlags ( Intent.FLAG_ACTIVITY_NEW_TASK );
Uri uri = Uri.fromFile ( file );
intent.setDataAndType ( uri, "text/plain" );
return intent;
} | 0 |
1f62438d30cd2b9d26c816a7a05d7ab2 | 2a342ce0d5bc52258b8cd544a900df25 | Create the amendment tree node list that format as JSON. | namespace LiveAzure.Stage.Controllers
public class BaseController : Controller
public string CreateTree(List<LiveTreeNode> list)
{
string strTreeJson = "{\"id\": \"00000000-0000-0000-0000-000000000000\", \"name\":\"root\", \"progUrl\":\"\", \"icon\":\"\", \"iconClose\":\"\", \"iconOpen\":\"\", \... | 1 |
2301faa398ec33dcb279e6b4c300f4a0 | 701683b91020674f8b7c88f8d8077758 | Detects the media type of the given document. The type detection is
based on the first few bytes of a document. | require 'mime/types'
types = MIME::Types.type_for(filepath)
types.empty? ? 'application/octet-stream' : types.first
rescue LoadError
raise Github::Error::UnknownMedia.new(filepath)
end | 0 |
01e091f74f00e9b4470212783ae6afd5 | e0544738504dd6099c3a9a582bce3ba0 | Ritorna il parametro 'email' della richiesta HTTP POST | class VRegistrazione extends View
public function getEmail() {
if (isset($_REQUEST['email'])) {
return $_REQUEST['email'];
} else
return 0;
} | 1 |
2c879a52370ea21c42572a2562f2861b | 890cd96c25df9a7b91103fdb27ee487f | Convert a PyMySQL result value to a renderable format | result = None
if isinstance(result_proxy, ResultProxy):
result = result_proxy.first()
return {k: _format_item_value(str(v)) if k.endswith("id") else _format_item_value(v) for k, v in result.items()} if result else None | 1 |
9b3e0c817eb5d7a941bcbba566602a31 | 34f911af24d082ea246024bedc95790d | Возвращает количество всех заданий, которые нужно выполнить до определенного срока | namespace ScheduleCore
public class TaskList : BaseScheduleList, ICloneable
public int GetTaskCountByDeadLine(DateTime DeadLine)
{
int Result = 0;
foreach (TaskItem item in items)
{
if (item.UseDeadLine)
{
if (item.DeadL... | 1 |
ac45b085a00b73b94e3a21566bb3195b | 41d353158fb11b10114ff58a80f09a1d | # Find modal value of a vector | mode <- function(x) {
unique_x <- unique(x)
unique_x[which.max(tabulate(match(x, unique_x)))]
} | 1 |
4076af1398da6e9abd4ec93919d69d7b | be5afd036345c8cbb79e24f4289d28b7 | 求取初始估计的单应矩阵 | mat = mat.copy()
pre = initial.copy()
for i in range(iter_step):
after = mat @ pre
alpha = after[0]
after = after/alpha
pre = after
eigen_vector = after.copy()
eigen_vector = eigen_vector/eigen_vector[0, 0]
eigen_value = alpha
result = {'eigen_value': eigen_va... | 0 |
d2c268bc9ea5fde012dad6542ace4afd | 070d6d728e15625ef79b5bb50f3d84a9 | Finds the element with the highest value in a list of integers and returns it's index | class MnistNetwork(ArtificialNeuralNetwork.ArtificialNeuralNetwork):
def find_maximum_list_entry_index(number_list):
return max(enumerate(number_list), key=lambda x: x[1])[0] | 1 |
76eb27bf8b8b45e6c0bbe102debc1f7b | e22de703eba9e1caed951f699801ec4b | Sets the terrain scale | {
if (m_pTerrain != NULL)
{
this->m_pTerrain = m_pTerrain;
SetBoundary(this->m_pTerrain->GetMaxBoundary(), this->m_pTerrain->GetMinBoundary());
}
} | 0 |
c2b10d9f18a80037175257f019d20b45 | 8bc1f16e65583d0dff0887596cb6717e | 地球坐标系坐标转海拔高度 | export class ENgxCesiumComponent implements OnInit, OnDestroy
getElevation(cartographic: Cartographic, globe: Globe): number {
return globe.getHeight(cartographic)
} | 1 |
995fdf0f7c4a59e00576c739bb6059a2 | cfa112d538c0dfc740f9a6ebc8cfbb1b | 3D pose quaternion prediction graph | xb, yb, θb, θ1, θ2 = q
p = np.array([xb + self.l1*np.cos(θb+θ1) + self.l2*np.cos(θb+θ1+θ2),
yb + self.l1*np.sin(θb+θ1) + self.l2*np.sin(θb+θ1+θ2),
θb + θ1 + θ2])
return p[self.output_idx] | 0 |
0bb8e4230badfad5b676ea75be66d589 | d5809bc725103619dccf84ed163fc9cc | Checks whether each member has responded to the auctioned card | bool Trial::isValid()
{
bool found = false;
for (int i=0; i < responses.size(); i++)
{
if (responses[i] == 100)
found = true;
}
return found;
} | 0 |
b8bfba4003e0a8244efe99e0aa1c25dc | 6c1914d852a5da49de6869aab1e1e2ba | Convert an integer timestamp (specifying number of seconds or
miliseconds since UNIX epoch) to MediaWiki timestamp format. | timestamp_seconds = int(t)
timestamp_fraction_of_second = t - timestamp_seconds
timestamp_ms = int(1000 * timestamp_fraction_of_second)
return (timestamp_seconds, timestamp_ms) | 0 |
02f7cbeced47a99f3f306a418e7f09af | cc882c786155a1bbc54e42210c250104 | Implementation of qsufsort | int len = input.size();
for (int sz = 2; sz < len * 2; sz *= 2) {
for (int i = 0; i < (int)ceil((double)len / (double)sz); ++i) {
int lo = i * sz;
int hi = std::min(len - 1, lo + sz - 1);
int mid = lo + ((lo + sz - 1) - lo) / 2;
std::vector<int> aux(hi - l... | 0 |
252fc4184eedb184083217269368ecce | f12222439e2a1f892672a01077fc831f | -->函数:设置X轴绝对位置 | function hwAxislable_lableXChange(sender, value) {
myAxis.update({
labels: {
x: value
}
});
myAxisInfo.labels.x = value;
mychart.addAxisEventListener();
} | 0 |
9e078e36ea6faf90cb7dc0530d03b737 | 83b603fcca702bb6938d049b32db3749 | 批量发送带附件邮件 | @Service
public class EmailManagerImpl implements EmailManager{
@Async("mailAsync")
public void sendAttachmentsEmail(String[] toEmailName,String subject,String content,File[] files) throws MessagingException{
MimeMessage mimeMessage = mailSender.createMimeMessage();
MimeMessageHelper helper = new... | 1 |
f0c8f4dea71563c7fc2fbe6a63c965e2 | 9f1e0a590f34c31e77cce81cbba0f4d4 | Sets the pickup location for the booked item (usually blank if
deliveryType is 00). | public class StageBarcodeDetailsVO extends BaseVO
public void setFromLoc(String string)
{
strFromLoc = string;
} | 1 |
5db370e9637e2a248e98e444430f056b | 2d68a7c30d67e8e4d71664e757f13413 | Show a view in a Navigation Drawer, that displays an image of what is currently visible in the MPC-HC player. | void showVideoController(); | 0 |
7e6ab4bf51682e6c240d121be5424fd8 | 66715caead33a98435d5bfedd4a5eb6c | Put a gamma code. | namespace CNC
public class CNCWriter
public void GCode(object number)
{
_Write("G" + number.ToString());
} | 0 |
2294fbe6fe58a326180435a980e02593 | f4144a9c1eb796f0b9341827e93c1d3d | Checks to see if there is a command with the given key sequence as one of
its key bindings.
The key binding to look for; must not be <code>null</code>.
<code>false</code> otherwise. | public abstract class AbstractKeyManager extends AbstractIdleService implements KeyManager
protected abstract boolean hasKey(int id); | 0 |
3fc6badd16cbf693a00303803f96f707 | 1e1a826de9c7677ae50dba47cbe96ca5 | Read presets from system directory and then from user directory | presetFiles = fs.readdirSync(systemPresetDirectory);
for (var i = 0; i < presetFiles.length; i++) {
preset = readPresetFromFile(systemPresetDirectory+"/"+presetFiles[i], true);
if (preset.presetName && !compactPresetList[preset.presetName]) {
compactPresetList[preset.presetName] = preset.presetCompact;
... | 1 |
60147747d293f26d4fdfc85af6447dfd | ec99490bbcdfe170353944a0ed5bf1fd | Builds and returns the <i>tf-idf</i> vector for the the given term-frequency map. | public class NGramFeatureExtractor extends AbstractFeatureExtractor
private MFeature getFeaturesFromTermVec(String docID) {
MFeature result = new MFeature();
Map<String, Double> tfMap = new HashMap<String, Double>();
try{
tfMap = super.getTermFrequency(docID, textFieldName);
}catch(Exception e){}
for(Entry... | 0 |
55bfb1313d91ab93f0539d784074d593 | 3476ec6dac8b5f8feed7fc37db0bd0c9 | 查询商店已经存在的regionCode | public class BossAjax extends BaseLotteryAction
public String findShopsCode() {
shopsInfo = shopsLogic.findShopsCode(getRequest().getParameter("shopsCode"));
Map map=new HashMap();
String sCount;
if (shopsInfo==null){
sCount = "0";
}else{
sCount = "1";
}
map.put("count", sCount);
return this.ajaxJ... | 0 |
a33f6e9435461ab70e1167a0872c7709 | e110995086c49f2b0e2343a3ade1581a | 通过唯一标识获取对应的无参无返回的接口,并触发其里面的函数,实现回调的功能 | var Obj1 = { Type:obj.Type, Func:obj.Func, Param : obj.Param , SN: obj.SN} ;
this.protocol.RunFunction(Obj1,(data)=> { callback(data); });
} | 0 |
fb8dce226216e656f27ebb27ccb21c92 | f066fc2815d3b9a0bd8eea0d7d20c092 | 根据杀死的对象来添加分数 | public class Ctrl_HeroProperty : BaseControl
public void AddKillNumber()
{
PlayerExternalDataProxy.GetInstance().AddKillNumber();
} | 0 |
9b4c562279316b98fe761dd1edb8e86a | f038ea60b26537f2ca297d179280119d | Form转EForm | {
e.WsFormNo = this.txt_WSFormNo.Text.Trim();
e.PalletNo = this.txt_PalletNo.Text.Trim();
e.LocationNo = this.txt_LocationNo.Text.Trim();
e.VenderId = this.ddl_Vender.SelectedValue;
e.WsFormFromTime = this.txt_ActualStartTime.Value;
e.WsFor... | 1 |
9a156f617e3e520874d08fd5cf5dbdf8 | 30993e4080e731bdcdaa8f3313713263 | Vérificateur de numéro de téléphone mobile | function validateTel(tel) {
var telReg = new RegExp("(0|\\+33|0033)[1-9][0-9]{8}");
return telReg.test(tel);
} | 1 |
8325dc2c402db47b35a003504fc9c81c | 352e24c6ad8032e26a3d4a0e232ff5be | Performs the given operation, raising any events for changing. | namespace Smocks
object Raise(Action addExpression, Action removeExpression, EventArgs eventArgs); | 1 |
4d4734a2c77e18cf3359e0b4105df1aa | 2333a31e822be8216a9288e444b08d97 | Template tag: Is the special content an embeddable URL? | public class CandidateURIUtils
public boolean isEmbed() {
return (linkTrail.endsWith(PATH_EMBED));
} | 1 |
3fb9fe0543242a633548432e8164f9ec | dc1d577f9dc0954e3ead61c0097bb91b | Enable set limits button. | @Singleton
public class AddRemoteRepositoryViewImpl extends Window implements AddRemoteRepositoryView
@Override
public void setEnableOkButton(boolean enable) {
btnOk.setEnabled(enable);
} | 0 |
3ebb2d0e94d4369712e03b63a83da20f | 1ec115ed92aa6ca5c9e0a612b3f961e5 | 通过城市编码,获取城市商圈 | namespace Hmj.Business.ServiceImpl
public class HmjCommonService : IHmjCommonService
public List<BCJ_STORES_EX> GetStoresByCityCode(string code)
{
return _common.GetStoresByCityCode(code);
} | 1 |
71220cc0992db9a9b807ec0e6d68bee7 | f63c306a7232ce5f770e3d39074c1faa | 获取某个孩子的家长ID,不链表,一维数组 | class Rule extends Model{
public function getIds($id){
$ids=$this->sonIds($id);
$ids[]=$id;
return $ids;
} | 0 |
6537174bc9bdf51c53affcf32675b806 | 9d01ffd7e9f2dc0124e5e6946113d4e5 | Calculate NOT gate. | int NOTB(void)
{
GR[REG0]=~GR[REG1];
return 1;
} | 1 |
8a6b68f818dabfad78c5b0bfdb9caf46 | 0ba37d42af120a3fbe7a3805b3a3861a | Fetch gets a Document from a given URL. For usage, see the example of Overview. | func Fetcher(url string) ([]byte, error) {
log.Printf("Fetching url %s", url)
client := http.Client{}
req, err := http.NewRequest("GET", url, nil)
if err != nil {
return nil, err
}
req.Header.Add("user-agent", "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.41... | 1 |
d24e207352a20f3fd56f5344e1b5f643 | dbf796d88232245f5b97c395c43772b0 | This is a function that returns the first
digit of a number. | int first_digit(int num){
return (num % 10);
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.