query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
24638c9c448bb4742dec6458e891358b | b18cd81b8fe2a23cdcf72b0e9c49db80 | ## int Date.getUTCMonth(); | PUBLIC byte XKY_RTC_Month()
{
return RTC_Month();
} | 0 |
de0ae5306182e8a1c543c27a325e3856 | 4b475c13b3bc71db89235c79ccaa8686 | Tests the <c>DistanceGenerationException()</c> constructor.
An instance is expected to be created with the standard message and a null inner exception. | public class CoverageCalculationExceptionUnitTests extends TestCase
public void test_Ctor1_WithEmptyMessage() {
new CoverageCalculationException("");
} | 0 |
0b4c9ee4d7e2680db458c834552b2be6 | 5614f15c1cd9c2cfea86dc8bf0c4c0f5 | Returns a TimeSpan representing the specified number of hours. | namespace Testing.Commons.Time
public static class SpanExtensions
public static TimeSpan Hours(this int value)
{
return TimeSpan.FromHours(value);
} | 1 |
1b7ebcdd0bd4d912c53bed0878b67ac6 | c3a7e9f65c621e41da35eb0560b87c5b | Expecting invalid output when evaluation is invalid (empty array) | class IntegerTest extends TestCase
public function testValidateEmptyArray(): void
{
$this->assertFalse($this->validate([]));
} | 1 |
f00a155a9fdae1b0ab60ef72231dd0cd | f7f8be608484f873c16c958c095bc18b | 应用指定预设.<p/>Applies this preset to this ruleset. | IpFirewallRuleInfo apply(); | 1 |
e425ea5fa4c6b56dcb52f6cc66988fd5 | 7848eb40776f83609054903eb12ef9df | Get the az59 code. | class CriteresClient
public function getCodeRef5(): ?string {
return $this->codeRef5;
} | 0 |
306010c087051a0ac56fa75d30c9afe9 | c8548843cffaca7c5fea8837778592e8 | Test for getting cookie path | originalPath := "/"
store := NewCookieStore()
store.Options.Path = originalPath
ctx := &fasthttp.RequestCtx{}
session, err := store.New(ctx, "hello")
if err != nil {
t.Fatal("failed to create session", err)
}
store.Options.Path = "/foo"
if session.Options.Path != originalPath {
t.Fatalf("bad session path: ... | 1 |
2250c9a6a8f5fd532f8ea62b5aecee9f | 1a3f3690c09f4b2a497ba4fecf3e71f7 | Reset all the word lists. | self.word_counter.clear()
self.word2idx = None
self.idx2word = None
self.rebuild = True
self.reset() | 1 |
40cc8149a6091a1fa3d61a2f03b718a2 | dd6ea920ec1c43a4b21f4e75b9abb718 | Create Departments Table | {
Schema::create('rooms', function (Blueprint $table) {
$table->increments('id');
$table->string('department_id');
$table->string('name');
$table->string('status');
$table->string('description');
$table->string('x_bed');
$ta... | 0 |
a1c9b23b62f8d1a973b7a442af13e0ba | 48c6290a56a41d121ec62fa498263074 | 发送 GET 请求(HTTP / HTTPS),不带输入数据 | public function sendGet($url, $data, $options = array(), $source = 'UNKNOWN' ); | 0 |
bfa35f2740635d1fb98056266928578e | 3c10398c80288e32cdd8bf22452acbf2 | Returns all contracts concluded in program. | List<ContractDto> getAllContracts(); | 1 |
7241afd1542f933de11b2aed92182c65 | 1cb478a54d483fe595c9cd42fdbabfc8 | Gets the friend invite view. | public final class FriendView
public Stage getFriendStage() {
return friendStage;
} | 0 |
61da4752e32171d74425cdaba1a4f5e6 | 2cabfd005959394d2d983c09ce03b28f | 新增ASIN码 | {
HttpWebRequest wr = WebRequest.Create(baseUrl + ASIN) as HttpWebRequest;
wr.CookieContainer = new CookieContainer();
if (wr.SupportsCookieContainer == false)
{
return null;
}
var response = wr.GetResponse() as HttpWebRespo... | 0 |
bf879160be2893c1ea0d988dbdeb1486 | e0e5a16bc02f8f093273944a107311e9 | Sets the Watermark property. This dependency property
indicates an arbitrary content to use as a Watermark. | namespace AttachedBehaviours
public static class WatermarkBehavior
public static string GetWatermarkProperty(DependencyObject obj)
{
return (string)obj.GetValue(WatermarkPropertyProperty);
} | 0 |
d7cf1dcfc8f6a8d5a68f37cce210ef93 | a3e49432e16a7f863547d983509150c2 | Returns the byte offset and bit offset of the given slot in the bitvector. | suspend fun RedisClient.bitposFromAwait(key : String, bit : Int, start : Int) : Long {
return awaitResult{
this.bitposFrom(key, bit, start, it)
}
} | 0 |
1ae55e243fed028d1c859459c42ebb95 | 817172cfe45ae979ee0a81f14df97464 | インデックス付きフィールドで発生したエラーの一覧を取得します。 | abstract class Gs2Exception extends RuntimeException
function getErrors(): array {
return $this->errors;
} | 0 |
92d4b613464a826afb21eba09cbfb24c | c27d89cd66ebff43d17cd3e30f384587 | Randomly pick a rgb color. | def rc():
r = randint(0,256)
g = 5
b = randint(0,256)
return (r,g,b) | 1 |
16484ab0de46bdce3062b764e4d43385 | 6055611950e637d9586e1f6468db5eb7 | iterate over all of the node elements,
and turn on their ability to receive flow. | {
LOCK(cs_vNodes);
for (CNode * pnode : vNodes)
{
relayTo(pnode);
}
return true;
} | 0 |
d71915597ecc6b977e72faa41f117687 | af9fdbf086ab872185e3720022a9791c | Sets the en name of this working unit. | public class ApplicationState
public void setNameEN(String nameEN) {
this.nameEN = nameEN;
} | 1 |
ec34ce5ca6095f1be74075b89b432416 | c8a4cfe0fdc8adf59f55b882d5c04f2e | 有商品的商户集合 | if ($ajax_flag) {
$criteria = new CDbCriteria();
$criteria->addCondition('merchant_id=:merchant_id and flag=:flag');
$criteria->params = array(':merchant_id' => $merchant_id, ':flag' => FLAG_NO);
$criteria->order = 'create_time desc';
$stores = Store::... | 0 |
3db6b2436a92a34be52fa34dcb6692f7 | 660377af087afb4086d6c808b6ab06f3 | Adds components to this vector. | public class VectorTileData
public native void addComponentObjects(ComponentObject[] compObjs); | 1 |
4e58e36d4f04181ba78d4333e059ebf8 | b1fa7b4f55a9398474597f3780524ee1 | Método que da la vuelta a un mensaje. | public class puertoRF{
public static void darseVuelta(){
Motor.A.rotate(-1450,true);
Motor.C.rotate(1450);
} | 0 |
83c117eb0b397526040c0a351c36b395 | 6a5251c734fbf819a6acc1fca1ec33a3 | tests instantiation of a backup controller | def check_init(*args, **kwargs):
assert kwargs == TEST_SETTINGS["connections"]["backup"]
with mock.patch.object(Elasticsearch, "__init__", check_init):
_ = get_client("backup") | 1 |
471ae77d8dd48726b8cb18579d811e29 | 8d244d458ccde7fd02f4562eccf3a319 | Return a list of variants within a gene. | for variant in self._bgen.iter_variant_info():
yield Variant(
variant.name,
CHROM_STR_ENCODE.get(variant.chrom, variant.chrom),
variant.pos, [variant.a1, variant.a2],
) | 0 |
8b97e1f789c45ffd9157679ff7d8f77b | 01854682d5c2a43d5ebecba911dcc9c0 | Display transcripts from database | $db = new SQLite3('/var/Databases/testdb.db');
$results = $db->prepare('SELECT * FROM Video');
$result = $results->execute();
while($row = $result->fetchArray()) {
echo "<tr><td><img class='thumbnail' src='https://i.ytimg.com/vi/".$row[3]."/mqdefault.jpg' onclick=changeVideo('".$row[3]."')></td>
<td>
... | 0 |
9e06a7a7e8c4e2e368714beb62476ab3 | 03e5d2545a0afc412b959c25907b7c57 | 重设下拉列表提示内容 | public class DialogSelector extends android.support.v7.widget.AppCompatTextView implements View.OnClickListener, SelectListDialog.OnSelectedListener
public void refreshSelectList(String[] data) {
if (mSelectListDialog != null) {
mSelectListDialog.refreshSelectList(data);
}
selectInde... | 1 |
8b9be13284ca455c593ed3bfc383795f | 7fd0ad563114f30af2ca803f50f5d314 | Aux method to paint rivet-like decorations. | public class WebDecorationPainter<E extends JComponent> extends AbstractPainter<E> implements PainterShapeProvider<E>, PartialDecoration
@SuppressWarnings ( "UnusedParameters" )
protected void paintBorder ( final Graphics2D g2d, final Rectangle bounds, final E c, final Shape borderShape )
{
final Stroke... | 0 |
c324e0a28c912463c8041ae8a754e9d9 | 2fee7b7de4bc931e40ac4a3c8b54be4c | Returns a draw buffer that can be used by Slate windows to draw window elements | XMesaCreateWindowBuffer(XMesaVisual v, Window w)
{
XWindowAttributes attr;
XMesaBuffer b;
Colormap cmap;
int depth;
assert(v);
assert(w);
XGetWindowAttributes( v->display, w, &attr );
depth = attr.depth;
if (v->visinfo->depth != depth) {
_mesa_warning(NULL, "XMesaCreateWindowBuffer: dep... | 1 |
a45060700542e7c86ad449bb3c144f30 | 8b65ae38cf41221e60cce8ed44ab062b | 操作私有方法(暴力反射) | public class ReflectClass
public static void reflectPrivateMethod() {
try {
Class<?> classBook = Class.forName("com.com.kc345ws.reflectdemo.Book");
Method methodBook = classBook.getDeclaredMethod("declaredMethod",int.class);
methodBook.setAccessible(true);
Object ... | 1 |
d328bcb8bbd9b7de396848f689454d8b | 047379139460e6e57a0091c52eeae60b | Decorator that registers a function that will be called any time Jeev sees a message. | class Bot(object):
def register(self, event_name):
def method_decorator(method):
self.on(event_name, method)
return method
return method_decorator | 1 |
ae09a67230ca869c5ad0622b891ecb27 | 499b48f8ae5a1bd1394404072ddc8591 | Gets price of selected bread type | namespace SBL
public class OrderBL : IOrderBL
public Bread GetBread(string breadType)
{
return _storage.GetBread(breadType);
} | 0 |
c38d1a054cca045aa4d6a83c7daa8ea5 | 86267f94f75d4159e5e94b0aedfea5ad | Uses the Michaelis menten equation and the current concentration of lactose
to determine the rate or the amount of lactose reduced | def Rev_Michaelis_Menten_3reg (Ser, OAS, S, cys, Vf, Vr, Km_S, Km_P, ki, ka, n):
return((1+S**n/(S**n + ka**n))*(ki/(ki+OAS))*((Vf*Km_P*Ser - Vr*Km_S*OAS) / ((1+cys/ki)*(Km_S*Km_P + Km_S*OAS + Km_P*Ser)))) | 0 |
42b532fb997fee92bc1f485cd6e14d76 | 1242e05f17c663ee157c6151d5606b23 | Returns the trackingId of this TbShippingOrderMain. The trackingId field
corresponds to the database column
apollo_query.apollo_query.tb_shipping_order_main.tracking_id. | public function getTrackingId(); | 1 |
b9ccb3a632c164a0222758f9387273d8 | ab0031f27e3ac7aab90425f35729955e | Gets the candidate values of a cell. | {
LinkedList<int> cellValues = new LinkedList<int>();
int k = 1;
while (k <= dimension)
{
if (isValid(row, column, k))
{
cellValues.AddLast(k);
}
k++;
}
ret... | 1 |
f88e4916a4b04f64e2ad80737bdda086 | df0746ee3ebaaba632e0fb368647fcfa | Create initial hidden state for the decoder based on the hidden vectors z | class Seq2SeqLSTMAttention(nn.Module):
def init_decoder_state(self, enc_h, enc_c):
decoder_init_hidden = nn.Tanh()(self.encoder2decoder_hidden(enc_h)).unsqueeze(0)
decoder_init_cell = nn.Tanh()(self.encoder2decoder_cell(enc_c)).unsqueeze(0)
return decoder_init_hidden, decoder_init_cell | 1 |
4894a25468e9c91334ff881c5fa2982d | 6797b156857b311ce9f33ea1d4ebb401 | 获取运营商设备号 | class DeviceService extends BaseService
public function getDeviceNo($id)
{
$model = PsDevice::find()->select(['device_no'])->where(['id' => $id])->asArray()->one();
return $model['device_no'];
} | 1 |
0c06e69a348fdecfa76e00362b4b6278 | 00a8f09166fed473c9f2286774f9f976 | Verify that L{url.URL.cloneURL} doesn't change any of the arguments it
is passed. | class TestURL(TestCase):
def test_cloneUnchanged(self):
urlpath = url.URL.fromString('https://x:1/y?z=1#A')
self.assertEqual(
urlpath.cloneURL(urlpath.scheme,
urlpath.netloc,
urlpath._qpathlist,
urlpath._q... | 1 |
adea658ffa5c7d9af18f139bdc578ddc | c5e15a663330140f5705ba12bc91d08d | Tamanho médio de frase é a soma do número de caracteres em cada frase dividida pelo número de frases no
texto (os caracteres que separam uma frase da outra não devem ser contabilizados como parte da frase) | def _tamanho_medpalavras(x):
media = _contcaracteres(x)/_contpalavras(x)
return media | 0 |
eab7f7e828639983310735fbce3f47b8 | d52d320f8c18d62d394020c68675a53f | 직원 수정 화면 | @Controller
public class EmployeeHandler
@RequestMapping(value = "/emp/{id}", method = RequestMethod.GET)
public String input(@PathVariable("id") Integer id, Map<String, Object> map) {
map.put("employee", employeeDao.get(id));
map.put("departments", departmentDao.getDepartments());
return "input";
} | 1 |
2efb3aca4c363401c1876dbfea6f9f12 | 01ab406d3a34cfb625ac5fdb6ad1159d | 设置用户名到 paramMap参数中 | public HashMap<String, Object> setUserName(HashMap<String, Object> param) throws Exception ; | 1 |
b62a0fbede5d8daa23b213e7e4b75ca8 | a7d9e12b4f78103321fef49639f1b255 | 处理实际回款
根据 id 编号判断是否是添加还是更新,然后调用相应的方法进行处理 | class FinanceVue extends Action{
public function edit(){
if ($this->isPost()) {
$id = $_POST['id'] ? intval($_POST['id']) : '';
if ($id == 0) {
$this->ajaxReturn('','参数错误!',0);
}
switch ($this->type) {
case 'receivables' :
$m_receivables = M('Receivables');
$info = $m_receivables->where(... | 1 |
eb18bd3c45ba2e55f8c4c7238bc2d579 | e1f75affc080f8598dffd26a1d50184a | Returns true if labels are enabled | class OptionHelper extends \Magento\Framework\App\Helper\AbstractHelper
public function isShowingLabels ()
{
return $this->_getGeneralOption("show_label");
} | 1 |
baa4e66125282949b235ace1203f9efc | d870619ae6215889b959bc38a5568ce6 | Iterates over all articles.
Returns:
generator: A generator of Articles according to the text articles. | class Embedding:
def generate_raw_articles(self):
for category, article in self.text_generator():
if len(article) > 0:
tokenizer = Tokenizer(article)
tokenizer.remove_stop_words()
vectors = np.empty(
[len(tokenizer.tokens), self.pro... | 1 |
f4c7cc25ca468028ae0bc73425263c2f | 91d370b77c310b3837d4f2a7628470a4 | Creates the embed sent to the user when an open thread was disabled for a certain time period. | {
EmbedValue(string.Format(@"\![open,dateinput,年月日入力,{0},{1},{2},{3}]", timeout, year, month, day));
return new DeferredEventTalkBuilder(this);
} | 0 |
6b643f81a3bb5dfbd0b1c01b06167a89 | f49ebf7d8fc6019e0c032830344c5958 | ● Cancel Actor Command scene | if Input.trigger?(Input::B)
Sound.play_cancel
prior_actor
elsif Input.trigger?(Input::C)
case @actor_command_window.index
when 0
Sound.play_decision
@active_battler.action.set_attack
start_target_enemy_selection
when 1
Sound.play_decision
... | 1 |
c75510a466f8c33e54a1a589ca9900f7 | db4323670bb2b9d4042184fa2c160e59 | 기획전 아이디로 기획전 종류 아이디 받기 (버튼형, 상품형) | public class SlotService implements InitializeRequired,AfterInitializeRequired{
public int getTypeById(int id){
if(slotsListTemplateMap.containsKey(id)){
return slotsListTemplateMap.get(id).getType();
}
return 0;
} | 1 |
79394df5488a1f817ea84eb1e76ddaac | 63c1e83a761d4feb64c540fdf8685321 | 指定轴在指定方向移动设定距离 | namespace netMarketing.automation.hardware.MotonCard.dmc2210
class ServiceDMC
public bool PMove(ushort axisNumber, float distance, ushort positionMode, ref int encoderValue, int VerificationEncoderOffset)
{
if (!ButtonStatusEMG)
{
DMC2210.d2210_reset_clear_flag(0);
... | 1 |
aed0c16568b3d49bdccf849cb1168dba | 91c6cd122bdab267ae98a2a9c1d33c39 | Get the IMAP capabilities | class NNTP(asynchat.async_chat):
def capabilities(self, callback=None):
self.addrequest(Request(self, "CAPABILITIES",
callbacks=(callback, "on_capabilities"))) | 0 |
50adb0c3c1fc51ac376fe3fbbfa1f7b0 | f591231190e36087d3c86573cd8f8dc4 | Returns th current itme as a string in the format
<YEAR>_<MONTH>_<DAY>_<HOUR>_<MINUTE>_<SECOND> | return sprintf("%04d-%02d-%02d %02d:%02d:%02d",
$this->year, $this->month, $this->day, $this->hour, $this->minute, $this->second);
} | 0 |
f462365a855749d60e92ec3f6a3ab319 | f50d59af446a14322152e77171152453 | creates a string that lists all the background jobs | class MyShell:
def builtin_jobs(self, pipe="", args=[]):
log.debug("Trying to get all jobs")
log.info(f"Content of jobs {COLOR.BOLD(self.jobs)}")
log.info(f"Content of status_dict {COLOR.BOLD(self.status_dict)}")
result = [self.job_status(key) for key in self.jobs.keys()]
return ... | 1 |
fd327358f4aa2fb7f7bddba5483e849e | ae92f3fa65ccda465fd2d19f86f68a8b | Делит кривую Безье пополам до тех пор, пока её части не станут удовлетворять условию | void QuinticSpline::runOptimizationIteration(vector<QuinticSpline> &splines)
{
if (splines.size() <= 1)
{
return;
}
vector<ControlPoint*> controlPoints = vector<ControlPoint*>(splines.size() - 1);
double magnitude = 0;
for (int i = 0; i < splines.size() - 1; ++i)
{
if (splines[i].getStartPose().isColinear(sp... | 0 |
3b2ca41cf0154b856ead020e84450db7 | 1d23b6988bccedbb1c7dd9e08896ec44 | Gets the role of this UserEntity. | public UserRole getUserRole(); | 1 |
01965c8bdaa078576b4d3628c4f32c74 | ffea4a80ec8fa3415e5de200e8fab329 | 書籍是否銷售完 | public class Book
public boolean isBarrowStatus() {
return barrowStatus;
} | 0 |
97fc505f7f3b57c5e40a610cd5e0dd1d | ab7240fb09f113ea091ac24817f19fab | 初始化go精品、go主题和gowidget图标 | public void initIcons(); | 1 |
fa2a3d32f61fa81e6f07dcd1330c1a8d | 89282ed83589cb6e12d40d7d895f9610 | 开放平台静态文件目录 | class TencentCloudHelper
public static function staticUrl($path = '') {
return TencentCloudHelper::siteUrl().'/source/plugin/tencentcloud_center/static'.$path;
} | 1 |
1a82aafb9f804044cb60f25a4ae91f3a | 4a058fff253bfc0f4ed46cd05827042b | 设置单选框的选中状态(单选框ID,匹配值) | var name = id.toLowerCase();
if (document.getElementById(baseId + ':' + name)) {
if (typeof document.getElementById(baseId + ':' + name).length != 'undefined') {
if (value == "0") {
setSelect(name, "none");
} else if (typeof value == 'numbe... | 1 |
2f2fe7273af84169acc5b8e9f4de0291 | 4c8bbca831ef4b56bf43d7850ee5265b | 複数の初期値を用いて勾配を用いた非線形最適化を実行する | n, d = x_.shape
w_ = np.zeros(d)
loss = 1
iter_count = 0
gen_x = batch_gen(x_, batch_size)
gen_t = batch_gen(t_, batch_size)
while loss > 0.001 and iter_count < max_iter_count:
batch_x = next(gen_x)
batch_t = next(gen_t)
y_ = np.dot(batch_x, w_)
w_ = w_ - step... | 0 |
45a841776907f3091dd6299cb9734c25 | d2fa326bb80d4eb297c8bf777079d7de | !
@brief Set actuation PWM
convert a 8 bit actuation value to a pwm signal and send it to the pwm board.
The value gets scaled to a duration that suits the servos (approximately
1 to 2 milli seconds).
To avoid servo jitter at neutral a small dead zone exists around 0. | {
double adjusted = 0.0;
if (is_armed())
{
m_level = percentage;
if (m_level < 0.0)
{
m_level = 0.0;
}
else if (m_level > 1.0)
{
m_level = 1.0;
}
adjusted = 0.2 + (0.8 * m_level);
}
return rc_servo_send_esc_pulse_normalized(m_channel, adjusted);
} | 0 |
1c93ba7ebcabd048f252e3f6bcd9fdc1 | 49baff412384a424004c1a814cec3d87 | Because setup options can only be read after second boot; this
function includes default values for all the mrc inputs that
will later be read from system setup options | class RootWidget(ScreenManager):
def programDefaults(self):
self.setup = self.micronas.read_setup()
self.setup['tc'] = int(self.productInfo[11])
self.setup['tcsq'] = int(self.productInfo[12])
self.setup['offset'] = 0
self.setup['sensitivity'] = 64
self.setup['mrange'] = 3... | 1 |
c2d036fcbc7bddb21042c18f1c067e8c | 1727c6b2579ea113fb9b8e834bd4710d | 分批次插入数据库 | class Base extends Model
public function chunkInsertOrUpdate($data, $size = 1000){
$chunk_data = array_chunk($data, $size);
$ret = [];
foreach ($chunk_data as $item){
$ret[] = $this->batchInsertOrUpdate($item);
}
return $ret;
} | 1 |
033f7aadb938b8661617b936ed66c629 | ff6d368368d9ffeeb818536b3f9a3baa | Creates an error thrown when the user closes a popup. | {
console.error(header + '\n' + content);
new Iridium.Popup({
header: header,
content: content,
windowClass: 'window-error',
closeButton: true,
closeButtonContent: getLoadedIcon('cross')
}).show();
} | 0 |
522dd2139d5de85c1b12c5c29e7e4139 | 838e0838846584a32693d9e0bc5db378 | Return if this MeshManger is animated and so should render each mesh on a new frame. | public abstract class AbstractCube3D implements Cube3D, CubeListener, PropertyChangeListener,
ChangeListener
@Override
public boolean isAnimated() {
return isAnimated;
} | 0 |
0c4323ffd95ea9fef3769d9a9f6acae5 | 6542e0fe67fcde4c9fc82585a31da1fb | 认证的方法,在这里需要查询数据库返回认证数据 | protected AuthenticationInfo doGetAuthenticationInfo(AuthenticationToken authenticationToken) throws AuthenticationException {
return new SimpleAuthenticationInfo(null, null, null, "MerchantRealm");
} | 0 |
411681e368596c291ba42e509ee67990 | fc39af14987c2e5265ba848c00393308 | Show PBWrapper, PKGBUILDer, pacman and pyalpm versions. | def print_versions():
import sys, platform
print("-=" * 38)
print("Bokeh version: %s" % __version__)
print("Python version: %s" % sys.version)
(sysname, nodename, release, version, machine, processor) = \
platform.uname()
print("Platform: %s-%s-%s (%s)" % (sysname, release, machine, vers... | 0 |
51fb89575168f65e3573153ca906ffcb | a3f214a005b2aac0c999f39aab081605 | saves data in textboxes to a new contact | {
StreamWriter writer = System.IO.File.CreateText($"wwwroot/{newinfo.FirstName}{newinfo.LastName}.txt");
writer.WriteLine($"First Name: {newinfo.FirstName}\nLast Name: {newinfo.LastName}\nEmail: {newinfo.Email}\nMessage: \n{newinfo.Message}");
writer.Close();
... | 1 |
a9bfb4177ab4b25ac6baef8f080cbb64 | b17a39315d31b323fc00464e2ebf20ff | 获取ztext4属性的值。
possible object is
{@link String } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"pacedetectleads",
"pacepulses",
"pacemode",
"pacemalf",
"pacemisc",
"ectopicrhythm",
"qtintdispersion",
"numberofcomplexes",
"numberofgroups",
"beatclassification",
"qamessagecodes",
"qaactioncode",
... | 0 |
145680cfe879106bdec5221016502702 | dec1f8dc644866e53fa9c97dd51d5901 | Returns to url after logout. | class LogoutView(View):
def get(self, request):
logout(request)
return HttpResponseRedirect(app_url) | 1 |
8229ae2616657fbcc52836aa8cb48eca | 754062420f8dea3a1b00bcbd0b952dfc | get user by mac address. | class UserController extends \App\Http\Controllers\Admin\BasicController
public function getUser( $id )
{
$mac_obj = UserMaster::find($id);
if (!$mac_obj) {
return response()->json(['code' => 100001, 'message' => '未查到该MAC信息']);
}
return response()->json(['code' => 200, 'm... | 0 |
8b84bbb8afce22e7ac71e3adcc1c699e | 228f05449396fe69fa0084948a01a467 | Binding构造函数 | export class Binding
constructor(path: string) {
this.path = path;
} | 1 |
66c66aac98291d0dc798f63f2fdac0b3 | cc6516b14847e5aad98ff5d4048dc00f | Delete selected objects.
Implements the \a delOb scripting interface command.
Also implements the \a candelOb scripting interface command.
See also the corresponding section in the \ayd{scdelob}.
See also the corresponding section in the \ayd{sccandelob}. | void cmd_osdelob(CMDObjectSet objects, Handle id, int *iret)
{
int location;
CMDObjectContainer *to_delete;
CMDObjectSetContainer *o;
if (!objects) {
*iret = -1;
return;
}
o = (CMDObjectSetContainer *)objects;
location = cmd_osfindob(o, ... | 1 |
d4f33cf149af2419814a080cf36bdf0a | 5167fde56d2660f83ab0b47a2389db9b | Sets if Original import address table (IAT) will be rebuilt | function setImportTable(options: Options, importTable: bool): void {
options.importTable = importTable;
} | 1 |
baa61a42382f81b01b37d4af7b3c1eea | 34160211cc37b8f80b4d8a9373730d35 | Main method of post transforms.
Subclasses should override this method instead of ``apply()``. | class PrePost(object):
def post_process(self, request):
raise NotImplementedError() | 1 |
3a89ef295f90c7f552dd803286a966f8 | dddefb3f23d23de8703b6091566ff447 | GetRemoteAttributes --
Retrieves the attributes of a file or directory from the sftp server. | if remote_dir is None:
remote_dir = self.remote_dir
fileattrs = None
try:
fileattrs = self.ftp.nlst(remote_dir)
except Exception, e:
self.lg.error("Failed to get list of files in remote directory %s : %s" % (remote_dir, str(e)))
self.lg.d... | 0 |
bece040598224bc51698ad516effd9c1 | b93f4b200c4856f07ece2abf50442567 | ask the customer whether they want to read again,
since customer may prefer to read both the comment and description | async repromptDialog(context, instance) {
let reservationFromState = await this.ticketBuyAccessor.get(context);
let newTicketBuy;
if (reservationFromState === undefined) {
newTicketBuy = new TicketBuyProperty();
} else {
newTicketBuy = TicketBuyProperty.fromJSON(reservationFromSt... | 0 |
1ceb80d5b11b57fb310cbf86e11e99da | 5f6aee31640a61b205de7d3f613f82e7 | Gets the name of the set as parsed from the price site. | {
for(int partNumber = 1; partNumber < 5; partNumber++)
{
name = name.Replace(partNumber.ToString(), "0");
}
name = name.ToUpperInvariant();
if (setList.ContainsKey(name))
return setList[name];
setList.Add(name, setNumber);
setNumber++;
return setList[... | 0 |
2ab99dbbc27c2b54ba1603104aafb424 | 90bd63528ccf8e9e3bea0aea3b36dc46 | This function deals with the messages directed to the solenoid valve
state. | def on_message(client, userdata, msg):
print("Payload " + str(msg.payload))
command: dict = json.loads(msg.payload)
if "open" in command:
print("Opening valve")
relais.activate()
elif "close" in command:
print("Closing valve")
relais.deactivate()
else:
print("... | 1 |
91b6926dd730a2699604a8bfafd16705 | 9e9f80fbc44a683a2189cff6cfeae112 | Add an "call method" rule for the specified parameters. | if (func_num_args() >= 2) {
$args = func_get_args();
$field = array_shift($args);
$method = array_shift($args);
$rule = array('method' => $method, 'options' => $args);
$this->rule[$field][] = $rule;
}
} | 1 |
01fd5793ce087a84f922c5481c4f117a | 59d7aa9c26e0f176988f25fefc8d0aa4 | Tell if the given RSS field name is known to map to an image property.
Used as an optimization in RSS mapping -- does not need to be exact. | public abstract class S60ModelUtils extends SymbianModelUtils
public static boolean isImageRssMemberNameImpl(String memberName) {
return memberName.equals("bmpfile");
} | 1 |
eceda41e8ab9e596b03c3b21f2074e9a | 5c8791b1b02d553342416a6127a37a91 | 获取所有在段整备中机车 | public List<Train> getAllTrain(Integer start,Integer end); | 0 |
dc0607e6bb527d5aa6a3539b06aa2de7 | 3f55c9c1575e1f339c80841cc4d58113 | Restore a backup from the input stream to the restore_location | public abstract class Container extends Object implements Serializable
public abstract boolean restore(Path outFilePath) throws IOException; | 0 |
843f90c1768d67832f60bd56c0e6b4fb | c4aa7a2ac8454d56a775e42eaa173645 | Determine whether the virtual network adapter is enabled or disabled. | response = self.device.request(self.interface_name + "." + "AafIsEnabled")
self.device.handleError(response)
return response['result'][1] | 1 |
4051aa005407e630ced9c05ab0381c8e | cc1040e97f22f5fa1ad55bc2689514cb | 質問の投稿画面を表示します | {
$questions = Question::all();
return view('privateViews.questionSelect', ['list' => $questions]);
} | 0 |
1695eda06b68e84c3c10b481b1b92bc0 | 20b15d902444c8bb9b298c3f81b8acd8 | 获取exchangeCode 检查code能否在这家门店使用 | async function auditExchange({ exchangeCode }) {
return request(`/api/goods-ext/exchange/access`, {
method: 'POST',
body: {
exchangeCode,
},
});
} | 1 |
12155349ad5f196037690102b77811d0 | 6c053251844e46b53da4fd6066964c3c | # by StackOverflow user 'BondedDust' : http://stackoverflow.com/a/28160474 | function array_merge_recursive_new() {
$arrays = func_get_args();
$base = array_shift($arrays);
foreach($arrays as $array) {
reset($base);
while(list($key, $value) = @each($array)) {
if(is_array($value) && @is_array($base[$key])) {
$base[$key] = array_merge_recursive_new($base[$key], $value)... | 1 |
6a72596d29f23c573c6924996a3dd44b | 9e41574b0884626ac285a068b532ea8b | 签到线程 | public class Signin extends BaseActivity
private void signIn(final Barcode barcode) {
if (!ac.isNetworkConnected()) {
UIHelper.ToastMessage(Signin.this, "当前网络不可用,请检查网络设置", Toast.LENGTH_LONG);
finish();
return;
}
mProgress = ProgressDialog.show(Signin.this, null, "正在签到,请稍候...", true, true);
final Handle... | 1 |
3d27f5061e1785d52e100ceaae4423ff | 727dc6601be0f9309d939dd7282994d7 | Adds a left join.
The following placeholders should be used in $join and $condition:
'{root}' for a root entity
'{entity}' for a current joined entity
'{property path}' for another join | ?string $joinType,
string $join,
string $joinAlias,
?string $joinConditionType,
?string $joinCondition
): void {
if (self::LEFT_JOIN === $joinType) {
$this->context()->addLeftJoin($join, $joinAlias, $joinConditionType, $joinCondition);
} else {
... | 1 |
48bdb24e025587dec059fb5101bdd8cd | 2b4e0cac0ddabbf5430888cd5ec15aa4 | Return's an array with the root categories with the store code as key. | {
$storeId = $this->_storeManager->getStore()->getId();
$parent = $this->_storeManager->getStore()->getRootCategoryId();
$cacheKey = sprintf('category-%d-store-%d', $parent, $storeId);
if (isset($this->_storeSourceCategories[$cacheKey])) {
return $this->_storeSourceCatego... | 0 |
f83b7ecf9caa460092e6f87354ac1142 | 33cf0dedfc5a00eb6c3c7a0fe6adf185 | Get futures candlesticks # noqa: E501
Return specified contract candlesticks. If prefix `contract` with `mark_`, the contract's mark price candlesticks are returned; if prefix with `index_`, index price candlesticks will be returned. Maximum of 2000 points are returned in one query. Be sure not to exceed the limit wh... | class OKCoinFuture:
def future_kline(self, symbol, contractType, type, size=0, since=0):
FUTURE_USERINFO = "/api/v1/future_kline.do"
params = ''
if symbol:
params += '&symbol=' + symbol if params else 'symbol=' + symbol
if contractType:
params += '&contract_type='... | 1 |
15df7fef536ab53cbd1c820c4bc7a231 | 36344d748f45eccd2ebcf7930fc45f55 | @brief all_sources: [get] Read all the interrupt/status flag of
the device.
6D_SRC, FUNC_CK_GATE, FUNC_SRC. | ais3624dq_int2_src_t *val)
{
return ais3624dq_read_reg(ctx, AIS3624DQ_INT2_SRC, (uint8_t*) val, 1);
} | 0 |
41a22bfd3030ce75112ed1f337691c9a | 178aa143c7b16e07d6825cc00c5dc1b3 | 设置默认用户 | $userinfo = login();
$cond = array(
'member_id' => $userinfo['id'],
);
$this->where($cond)->setField('is_default', 0);
} | 0 |
862cab502660f09dfad022134656c4f8 | 932a9735968f69a1ff2a6e9e474bcc9a | 添加客服表单数据 | class CustomerAction extends Action
public function add(){
if($this->isPost()){
$m_customer = D('Customer');
$m_customer_data = D('CustomerData');
$field_list = M('Fields')->where(array('model'=>'customer','in_add'=>1))->order('order_id')->select();
foreach ($field_list as $v){
switch($v['form_type'])... | 1 |
47b866e6d88b26093d41bf5c5838e829 | d26e8172f4db4f0f7fb9f8effffebb3a | Adds/updates league stats to the DB. This should automatically happen at the end of the war, unless you didn't wait 10-15min and the API didn't catch
the end of the war. This affects the `lhr` command. | async function updateLeague(arg) {
await tablesUpdater.update(arg);
await resultsUpdater.update(arg);
await scorersUpdater.updateLeagues(arg);
await assistsUpdater.updateLeagues(arg);
} | 1 |
bfa6768561d1f94568c0e1117cd3f4e2 | f41a94ee0b7efcbee089aa71a34a5b20 | Used internally to run the queries all at once and possibly perform caching.
If set the caching parameter is set to False, caching never occurs. | class Query(base.Query):
def __call__(self):
return self._results() | 0 |
d5509455c8b49fca8281b36d97e6d0b8 | 31d5ff4ae9c7005d8b31466f7a5f050b | Returns whether the app has been excluded from battery optimization. | try {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
var isIgnoring = false
val powerManager =
CallApplication.getContext().getSystemService(Context.POWER_SERVICE) as PowerManager
if (powerManager != null) {
isIgnoring =
... | 1 |
93930170a59250ada7f0a63ff6aede33 | bf61176376188c5da043614b4d545628 | Randomly sets the position of the treasure within the mountain. | boolean treasurePlaced = false;
int treasurePos = -1;
while (treasurePlaced == false) {
treasurePos = r.nextInt(MAX - MIN) + MIN;
if (treasureMap.containsKey(treasurePos) && treasurePos != topCave) {
treasureMap.get(treasurePos).setHasScales(true);
treasureMap.get(treasurePos).getParent().setAdjacen... | 1 |
f78943ca5cbd5aceeab44dbfcd1cff82 | d792826f6f4661bdf361d010802e64cd | Computes encoded object locations and corresponding confidences. | overlaps = jaccard(truths, point_form(priors))
best_prior_overlap, best_prior_idx = overlaps.max(1, keepdim=True)
best_truth_overlap, best_truth_idx = overlaps.max(0, keepdim=True)
best_truth_idx.squeeze_(0)
best_truth_overlap.squeeze_(0)
best_prior_idx.squeeze_(1)
best_prior_overlap.squeeze... | 1 |
c709cee33ed08064afd70a9b65345309 | 6b3bb26fd92c2778e7f610bf82ad7469 | returns node with id n | try:
n = self._nodes[nid]
except KeyError:
n = Node()
n['id'] = nid
self._nodes[nid]=n
return n | 1 |
51554d5886096c869b4bfca3f3085518 | 2e6d0db2fd8a4916fd92aff180cb6f2f | Not ready yet | def lint():
print('not ready...') | 1 |
9018c2aa73d6fb6d2999e05c3bcbe866 | 8f16dfa0581fc2e6c513d765f87a4515 | Друзья такого же знака | global $MYSQL;
$GLOBALS['PHP_FILE'] = __FILE__;
$GLOBALS['FUNCTION'] = __FUNCTION__;
$friend_wp = varr_int($friend_wp);
$tbcircles = "pfx_krugi";
$tbfriends = "pfx_users_friends";
$tbfriendscircle = "pfx_users_krugi";
if($this->IsFriend($friend_wp)){
$circle = $MYSQL->query("SELE... | 0 |
bd16320a98fcc20ec7b287d93cfec1c0 | da4b179542b1e0f14f8ea4f23d3f527d | Calculates the inflection index of a certain point in the reachability diagram. | if set_endpoints == None:
y = y - np.nanmin(y)
y = y/np.nanmax(y)
my_slope = (y[-1]-y[0])/(x[-1]-x[0])
else:
my_slope = (set_endpoints[-1]-set_endpoints[0])/(x[-1]-x[0])
x_differences = x-x[0]
straight_line_ys = my_slope*x_differences + y[0]
inflection = np.mean(y - straight_line_ys)
return inflection | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.