query_id
string
corpus_id
string
query
string
code
string
label
int64
4ab8842a1d443a6e4e0b4f20fb292659
2804f213e1cfa663b78184dafafe976d
实体类转化dto的方法
@Slf4j public class DtoEntityVoUtils public static <T> T dto2entity(Object dto, Class<T> entityClazz) { try { if (null == dto || null == entityClazz) { return null; } T entity = entityClazz.newInstance(); if (entity == null) { retur...
0
d43999f9e95ef0b4ad4270809a82f8bb
bcc31cef01968d0e1366e26e2aa8ddcf
配膳状況を更新します
@Service public class FoodService public void update(FoodInfoDto dto) { FoodTblEntity foodEntity = new FoodTblEntity(); foodEntity.setRequestId(dto.getRequestId()); foodEntity.setFoodName(dto.getFoodName()); foodEntity.setRequestOutline(dto.getRequestOutline()); foodEntity.setEatFlag(dto.getEatFlag()); Genr...
1
c6b7ce30ad33a04e337ba780cb8077a7
aab0ce687cb28d6e67ba517e54bca300
Metoda służąca do wyliczenia prędkości na podstawie dwóch punktów i różnicy czasu.
{ double msecD = t1.Subtract(t2).Duration().TotalMilliseconds; return (msecD) / Math.Abs(x1 - x2); }
1
b36b056a1918968042fcb14af8b3d994
833e3a0ca1fb64c0fb92b14593d6c304
Initiate reader reset pin as output
inline void gpsInit(void) { DDR(GPS_RESET_PORT) |= 1<<GPS_RESET; PORT(GPS_RESET_PORT) &= ~(1<<GPS_RESET); }
1
c790f884197cdb330d35a6caa6f01d47
2e56639b72cacf20e5d7a56ed616da82
切换状态到已过期
class AdminOverAdHandler(tornado.web.RequestHandler): async def post(self, *args, **kwargs): AdminAdTool.change_ad_type(self.application.db, self.get_argument('id'), '过期')
1
4a223c12bc6a277bde30d9c8c93e0136
c7b2f3520380b6ceb04c5bfbb23cfd86
Get Bridge_Forward boolean value.
class yc_ipv4_network_Cisco_IOS_XR_ifmgr_cfg__interface_configurations_interface_configuration_ipv4_network(PybindBase): def _get_forwarding_enable(self): return self.__forwarding_enable
0
e506f80fdeb86b3c3c344a278d4b6138
35788533b318a2e705ee13434521aa69
Attach a file to a card
if (destCard.attachedCards == null) destCard.attachedCards = ArrayList() destCard.attachedCards!!.add(card) this.gameMode.cardBoard.attachedCards[card] = destCard gameMode.realPlayers.filter { it.allPlayedCard.contains(destCard) }.forEach(this::playerRefreshProperty) this.sendPla...
0
e5729e9463f94a404b4ddfa8283bcb1b
64f2490580719d6f6d23fbccbfe356f5
原文
var urlStr = window.location.origin + "/" var dirStr = GetQueryString("dir") urlStr = urlStr + "index/?type=txt" if (dirStr.substring(dirStr.length - 1) !== "/") { dirStr = dirStr + "/" } dirStr = dirStr + txtname var paramObj = { httpUrl: urlStr, type: 'post', ...
0
d379c9cd4581986fd0d46306586c7fda
fb076d32a73c4c184a7305dc5189e14d
双向链表头插法
void head_node(double_link head, double_link new) { double_link first = head->next; new->prev = head; new->next = first; first->prev = new; head->next = new; }
1
275d59891660c702519238c57ada084f
fdcdc7f57bd5ae9535413f1fd3715e9b
Attempts to add a decoration to the specified armor piece.
public abstract class ARMenuEntityComponent extends ARMenuComponent protected abstract void decorateArmorStand(ArmorStand armorStand);
1
19b2fb252af20f8853740e14b24a4aca
0af7adb55d51df4737db0cc6d84a8014
Checks whether or not an image has been rendered to the given path with the given dimensions
abstract public function checkImageLoaded($xpath);
0
2226073835d64b45b65d2c4fb2ee43bb
e4aee214c488fe04e072715f66486e01
콜백 받아서 콜백을 바로 실행한다
function doCallback(fn){ if(typeof(fn) == 'function') fn(); }
1
b83280b6a350d172db155ecf4ec38574
1398091f337e0dccdecf69f08dcc074b
PopupManager 弹窗管理自动调用
for (const p of popupList) { if (p.params) { await p.popupFn(p.params); } else { await p.popupFn(); } } }
1
0301cef514d0ff3ed2119f24012d4e56
a0a14bb2ee5938d26d2e4b5d1e9126ba
在画图编辑器中通过children中的最外层的titleModel来表示参数容器,如果该TitleModel有连接, 则表示该容器有连接,需要在映射文件中反应该连接
public class EChartsTitlePane extends BasicScrollPane<ECharts> @Override public void updateBean(ECharts ob) { if (ob == null) { ob = new ECharts(); } EChartsTitle title = new EChartsTitle(); ob.setTitle(title); title.setTitleVisible(showTitle.getSelectedItem()); ...
0
354c4e06729aa8ab620a302afe12edbe
23087573281ba8b11d50cdf57cfd94b8
Render a template using render_to_response with the given request context.
class CSVTemplateResponseMixin(TemplateResponseMixin): def render_to_response(self, context, **response_kwargs): response_kwargs.setdefault('content_type', self.content_type) return self.response_class( request=self.request, template=self.get_template_names(), context...
1
e030214237fa4d953411941a90683a0e
d7b1c70b3090adc7a9304a152cf21428
Perform UTF-8 self-test
int main() { static const uint8_t s8[] = { 0xe2, 0x88, 0x80, 0x78, 0x20, 0xe2, 0x88, 0x83, 0x79 }; static const uint32_t s32[] = { 0x00002200, 0x00000078, 0x00000020, 0x00002203, 0x00000079 }; assert(lex_utf8(s8) == 0); assert(lex_utf32(s32) == 0); return 0; }
1
e91af3d92c960277312c7a9907ed255e
ebc7c8df84a8a8d6bd63c247f26fa2d4
Verifies that an object is not exactly the given type.
public static class TestExtensions public static object ShouldNotBeOfType<TExpected>(this object actual) { Assert.IsNotAssignableFrom(typeof(TExpected), actual); return actual; }
1
892162593cbda1aa9e3f2cb08308f20a
6cca4492ffb37c13508974bc9ba712bc
Get the setter method for the given key.
class Model extends Fluent public function getSetMutator($key) { return 'set' . Str::studly($key) . 'Attribute'; }
1
14ea432935a5aa3cf2333f32aaa11ca8
eb8f369b5f5d8f0b71fa7a48dc9f6f40
更新插件的输出参数
class DeployService extends AppService private static function _update_parameter_table(string $svid, array $output): void { $service = new ParameterService($svid); $service->update(function ($body) use ($output) { if (array_key_exists(PARAMS_TAG_DEPLOY, $body)) { array_merge($body, $output); } else { ...
1
389fe0116ae7265f9a86c47894b0813e
3da3b95b250910956e526621400a7003
Gets all the listings for a specific user
return new Promise((resolve, reject) => { Listing.findListingsByHostID(hostID, (err, res) => { if (err) { reject(err); } resolve(res); }); }); }
1
ab8ff72151af7be07e392e696f67075f
4f92a5ff8db8b6f5890575d64347e2b3
Returns the tasklists that should be used for syncing.
function defaultTasks() { if (argv.sync) { return ['concurrent', 'browser-sync']; } else { return ['concurrent']; } }
1
3a63d6c2a6c2abc85baebc8017e9d907
7f0f54c0feeaa7bc7cf7d6579824f633
店家登入畫面
class LoginController extends Controller public function cashierLogin() { return view('cashier-login'); }
1
0538346c6fa4ed83a780bac374058bc8
2d4ef031a3cace65af4821fe7ee941b7
iTweenを使ってオブジェクトを前後に動かす
public class TEST1 : MonoBehaviour void Update() { if (Input.GetMouseButtonDown(0)) { iTween.MoveTo(TargetGameObject,iTween.Hash("looptype", "pingpong", "oncompletetarget", gameObject, "oncomplete", "onupdatefunction", "delay", 0.1,"x", 3, "time", 2, "easetype", ITweenType)); } if (Input.GetMouseButtonDown...
1
63624fda3bfe22aab361395a437a646e
1dd023f45d86a1e1fbcd888a0e61fc20
Creates an activation object that can be used to create the ASF media sink.
{ IMFActivate result; HResult hr = MFExtern.MFCreateTransformActivate(out result); hr.ThrowExceptionOnError(); return result; }
1
719bfaf5611b8e0ecba2470e0c4f5d63
21304d8fa182c134e502e59de1e62848
# Funcion que permite reportar un comentario
{ $q = explode("/", $_SERVER['REQUEST_URI']); $valuei = $q[3]; $valuec = $q[4]; $item = (int) $valuei; $comment = (int) $valuec; $sql = 'UPDATE comment...
1
9e1e274c5e71c8b13b1ba60ed4cff26c
493be919c73781265b3f70d3f7f62cd2
This function allows the user to upload images to train a new AI Model.
def image_entrypoint(request): f = request.files['myfile'] filename = secure_filename(f.filename) extension = filename.split(".")[-1] if extension not in app.config['ALLOWED_IMAGES']: error_msg = "Error: Invalid image. Should be one of: %s"\ % string.join(app.config['ALLOWED_IMAGES']...
0
4f71f35cbc9aa87284635f1258d3f1ff
b56f1d3e65171a7dbbe61ec5ac8c7b9b
Flips an image vertically.
public final class ImageUtils public static BufferedImage flipVertical(BufferedImage source) { BufferedImage out = new BufferedImage(source.getWidth(), source.getHeight(), BufferedImage.TYPE_INT_ARGB); Graphics2D g = out.createGraphics(); g.drawImage(source, 0, source.getHeight(), source.getWidth(), -source.getH...
1
5ad87b6dd6f48e01a6bb4a924c9a8b81
53a1953cf2e5e04c2621099e180bcaef
Tests if exception is thrown for wrong split values.
class TestUEAArrowHead: def test_invalid_split_size(self): with pytest.raises( AssertionError, match=re.escape("argument 'train_prop' must be in range (0, 1)"), ): UEA( dataset=DATASET, split="train", train_prop=-0.5, ...
1
66edc928d46e977a1ccc453ed9fbcfae
008a2c54cd2de9dbb43318942656cb98
POST should create a new object and redirect.
post_data = {"title": "a_post_title", "body": "a_post_body", "_addanother": ""} self.client.login(username='admin', password='password') response = self.client.post(reverse("admin2:blog_post_create"), post_data) ...
1
e4bce0f093577a2c0e3d837786367238
5108ff3998b9a4bd1ccd20b2ce332190
テンプレート一覧から選択された項目を取得する
namespace LightController.MyForm public class MainFormBase : Form, MainFormInterface public StepWrapper GetCurrentStepTemplate() { return getSelectedLightStepTemplate(selectedIndex); }
1
60c1766423dc3aba3154c403db8c5681
bdb0b0b206cfe6081001ecb30abdfd2e
通过表名,修改语句和条件语句来更新表中的一条记录,返回0则更新失败,返回1则更新成功。
{ if(!query->exec("update "+tableName+" set "+set+" where "+where)) { qDebug() << query->lastError().text(); return 0; } return 1; }
1
397e0a0b453254fec39629a573acceac
3d92c72fb1d75cb07963fea21ac410a4
Draw a line from (x0, y0) to (x1, y1) with value v in image im.
double x0, double y0, double x1, double y1, double value[2]) { unsigned long pixel_value; static char function_name[] = "canvas_draw_line"; VERIFY_CANVAS (canvas); if (canvas->cmap == NULL) { fprintf (stderr,"Canvas has no colourmap associated with it\n"); a_prog_bug (function_na...
1
adb60757892b8a9083af84a577ed72fc
4e79511dc85e21529798091c966fc1b2
Start observing a GameSubject.
namespace MLambda.Actors.Abstraction.Core IObservable<Unit> Start();
0
898540db2ceaf2fe3b257db6c77215b8
21c2e1207f412e8c71fc5bd42c0344a3
Takes some text and groups adjacent tokens into larger ones if they share the same entity tag. Returns a list of lists. Usage: tagged_text = tag(text) flattened_text = flat_tag(tagged_text) for paragraph in flattened_text: for sentence in paragraph: pass
class IPOSTagger(Interface): def tag(tokens):
0
fffbd360c9d77cf60b09dfff3003f612
31cb33135974592a4cdd47e133f911b8
辞書データをファイルに保存します。 正常にデータの保存が終了した場合は、データのバイト数を返します。
namespace LibOxfJpModKit.Localization public class UapLocalizationDao private static void WriteEntries(UapLocalizationFile localizeFile, BinaryWriter bw) { bw.Write(localizeFile.Items.Count); foreach (var entry in localizeFile.Items.Values) { WriteEntry(e...
0
ecc9e4d8b5d13e80c2e3c44f7eebca6a
83f6d5853b4964b0848b6624979085b1
Responds to a MSG_NOTIFYDELETE
static CONDITION ndeleteCallback(MSG_N_DELETE_REQ * deleteRequest, MSG_N_DELETE_RESP * deleteResponse, void *ctx) { printf("SCU : Received N-DELETE Response message\n"); if (deleteResponse->status == DCM_STATUS_SUCCESS) { if (strcmp(deleteResponse->classUID, DICOM_SOPCLASSBASICFILMSESSION) == 0) pr...
0
e37ed84a098022e2efe5a584158898ce
72158df963f9fcab5341a7f5fe408423
Get the attached PS.
public function psr(): \Psr\SimpleCache\CacheInterface;
0
ff081bb728c2e4837c5f31bfb3fb9d3d
93be18ececd565f9e7276f0e7c171c08
loop assign ratings to all 30 phones based on built in storage
numRows = len(self.ratings) numCols = 0 if numRows > 0: numCols = len(self.ratings[0]) for row in range(numRows): for col in range(numCols): rating = self.ratings[row][col] if rating >= 3: self.ratings[row][col] = 1 elif rating != 0: ...
0
bc7a937f82ccfc7b9b76f3e1ee095898
a9a7a48c8bfc55f5e76f0945ed40e535
write to command channel without blocking
fn spi_noblock_write(cmd: u8, data: &[u8]) -> MynewtResult<()> { let timeout = 30_000; unsafe { os::os_sem_pend(&mut SPI_THROTTLE_SEM, timeout * OS_TICKS_PER_SEC / 1000) }; let len = data.len() as u16 + 1; let mbuf = unsafe { os::os_msys_get_pkthdr(len, 0) }; if mbuf.is_null() { unsafe {...
1
3daab24095e42c0065d05d89d7890d13
74a0e63afbee10a44df2b95c8bda4e35
Populate a whole bunch of properties with default values. We only update properties if it already exists here
class DialogFlowAgent static skipDefaultEntityProps(jovoInput, dialogflowEntity) { if (_.get(dialogflowEntity, 'isOverridable') !== _.get(DEFAULT_ENTITY, 'isOverridable')) { _.set(jovoInput, 'dialogflow.isOverridable', _.get(dialogflowEntity, 'isOverridable')); } if (_.get(dialogflow...
0
d723339a10e5226e59dc35a8f2d6b2d9
78324bba1c0658a8e674a9728d55e723
Adds an output message to the console window
{ if (text != null && !text.Equals(string.Empty)) { string msg = string.Empty; if (text.ToUpper().Contains(UIMessageConstants.ErrorStringToCheck)) { msg = string.Format("{0}", text); } els...
0
24dd99b136d43c2fbaca95a63c7000ae
57af5f12a3a2455595d59298460a9c40
Get the answer expression
public function getAnswer(): string;
1
cf9c8ac0ef3e984ed63fe071520792bc
eb1ade369c26db479d2d8bc5d799e21e
Removes property keys for the property with the given id from this container.
class Container implements ArrayAccess, ContainerInterface public function offsetUnset($id) { return $this->remove($id); }
1
711506eed261ea663da2208613d651b4
321b1a4fe9988dae9f870eb9b452c343
Va chercher le fichier contenant le cache demandé
{ $hashKey = $this->calculateHash($fileName); return require $this->cachePath . '/' . $this->actualCaches[$hashKey]; }
1
6ac6d1795898b2f10cccefdfab0b621b
44f9b9adc9c14b044650b697ca843ee9
Список таблиц для миграции
class SpryDB extends Medoo public function getTables() { $sql = 'SHOW TABLES'; if ($results = $this->query($sql)) { $this->migrateCheckErrors($sql); return $results->fetchAll(PDO::FETCH_COLUMN); } $this->migrateCheckErrors($sql); return []; }
1
b14b0fa98cd810cb12b80f1a2b2ec9ad
5e40c90a4b8b980da181816fbce1cf88
Print the list of strings in a nice regular box
styles = {"double": "╔═╗║╚═╝", "single": "┌─┐│└─┘", "bold": "┏━┓┃┗━┛"} if style not in styles: style = "single" box_style = styles[style].decode("utf-8",) unwrapped_lines = string.decode("utf-8").split("\n") lines = [] for line in unwrapped_lines: wrapped = textwrap.wrap(line, wi...
1
ac4eccb73d89f25365613f8e08dd7448
2d8fd1335ab1e7602ef4ea6a4b293128
Show indices settings.
{ $nodes = []; return view('backend::settings.index', [ 'actions' => $this->actions, 'columns' => $this->columns, ]); }
0
524c77500aed6f47ee7b2755cf128f4d
899b58ed4347dcabdc27889d7ec401b5
A function which takes as input the index of control and target qubits, and updates the amplitudes of the quantum registers
public class QubitRegister public FieldVector<Complex> getAmps(int... qubits) { Set<QubitContainer> conts = getContainersHolding(qubits); QubitContainer qcTarget; if (conts.size() == 1) { qcTarget = conts.iterator().next(); qcTarget = conts.iterator().next(); if (qubits.length != qcTarget.getNumbits()) ...
0
75f13dc27a222bd414e683ea59ef412f
62fa3feb4d792cfd4b2314e45cb1b856
Launches the AddConsole wizard
{ bool? dialogResult = true; if (RAToolSetWPF.Properties.Settings.Default.Username == "" || RAToolSetWPF.Properties.Settings.Default.APIKey == "") { LoginView lw = new LoginView(); dialogResult = lw.ShowDialog(); } if (dialogResult.Value) _getConsolesWorker.RunW...
0
62d5ac07eadcfb07631c6045cd607035
8462cf56f35df9088ac09e3383c2bf11
Get the paginated products with filter parameters.
namespace ann_shop_server.Services public class CategoryPageService : Service<CategoryPageService> public List<ProductCardModel> getProducts(CategoryPageFilterModel filter, ref PaginationMetadataModel pagination) { return ProductService.Instance.getProducts(filter, ref pagination); }
1
9f11162265686dff49556c15d3a19d02
6d55275409d0e25cc752c398ca7022c8
[No.476] 数字的补数 给定一个正整数,输出它的补数。补数是对该数的二进制表示取反。 给定的整数保证在32位带符号整数的范围内。 你可以假定二进制数不包含前导零位。
int ans = 0; TrieNode cur = root; for (int i = 31; i >= 0; --i) { int a = (num >> i) & 1; int b = 1 - a; if (null != cur.children[b]) { ans |= (b << i); cur = cur.children[b]; } else { ...
1
6388375e515b34b3833f68f8996dc377
43277086d1f787a987b1f23f0e2256ab
获取用户在扇贝网添加的例句
class WordOperation(object): def get_user_sign(): result = WordModel.get_user_sign(db.spider) return Response(result=result)
0
8f2dc83436e3923bd39550edfb72b4d0
ed1f2efebdeb25c0c083f9a164170e87
Double-precision floating-point number type, compatible with Python `float` and C ``double``. Character code: ``'d'``. Canonical name: ``np.double``. Alias: ``np.float_``. Alias *on this platform*: ``np.float64``: 64-bit precision floating-point number type: sign bit, 11 bits exponent, 52 bits mantissa.
def _float(): return np.float64 if conf.double_precision else np.float32
1
e572d166fdf805be988f65a8a0928f67
cdc234fc8dcba10e8283e681f7fc2b5d
The issue time of the token, as number of seconds.
class TokenRequestPatchArgs: def expiration_seconds(self) -> Optional[pulumi.Input[int]]: return pulumi.get(self, "expiration_seconds")
0
6da4ef1a60e2e2d6993882d576c063c1
d89372ce6d8a1d212c3d6f73dee39ac5
This method just returns an empty string since the action will always immediately redirect back to its origin.
class ObjectTableView(ListView): def get_form_action(self): return None
0
41a7f4d438852852c70996bf15698905
6e18118482343bfe15313eb724ddf9c9
Returing the swc format of the neuron (neurite or any cutie to call) from skeleton
from ... import __version__ swc = """# ORIGINAL_SOURCE CloudVolume {} # CREATURE # REGION # FIELD/LAYER # TYPE # CONTRIBUTOR {} # REFERENCE # RAW # EXTRAS # SOMA_AREA # SHINKAGE_CORRECTION # VERSION_NUMBER # VERSION_DATE {} # SCALE 1.0 1.0 1.0 """.format( __version__, contributors, datet...
1
63ed18591bbe470f1dc8a9940b0a2e20
86c242f47b379c19c0243859d7bfbc37
Return the cumulative status of the reports.
public function getAggregatedStatus();
1
01bd2d728ccd0d520fabc1ae0f6ddac2
2a652a34506ff43ba6f7b42c7555b9d2
Convert an integer number of seconds into a HH:MM:SS, MM:SS, or SSs string
function secondsToHms(d) { d = Number(d); var h = Math.floor(d / 3600); var m = Math.floor(d % 3600 / 60); var s = Math.floor(d % 3600 % 60); var hDisplay = h > 0 ? h + (h == 1 ? " " + DATA.HOUR + ", " : " " + DATA.HOUR + ", ") : ""; var mDisplay = m > 0 ? m + (m == 1 ? " " + DATA.MINUTE + ", " ...
0
26587840184c899a0477358895a737db
0fb1be8b39ae23c6fd2a56b65c4fe04d
对任意功能函数实现函数柯里化
const fn = arguments[0] const arg1 = Array.prototype.slice.call(arguments, 1) if (typeof fn !== 'function') { throw new TypeError('`fn` must be a function') } if (arg1.length >= fn.length) { return fn.call(undefined, ...arg1) } return function (...arg2) { if (arg2.length === 0) { return ...
1
99e22d635b70ca578c17c4a4723014cc
d2c9c410b4218946650b8018ac5a8382
移除数组中的指定键的值并返回处理后的值的数组
Class Arr static function unsetElmsAndArrVals(array $arr, $keys):array{ $arr = self::unsetElms($arr, $keys); return array_values($arr); }
1
80133d031adf130464b76abb8ff4308b
3dea5c902ee8dcd44748352f33d50735
Get EntityType for Opportunity.
export class OpportunityUserService async getOpportunityEntityType(): Promise<EntityTypeEntity> { return (await this.entityTypeService.getEntityTypes({ where: { abbreviation: ENTITY_TYPES.IDEA, }, }))[0]; }
1
228c53094dac53140907eb7089fdf0d4
912f7979496b5f2907a8c6e8b4705a83
超时审批时间属性元数据
public class RevisionNoticeDODesc extends DODesc private IAttrDesc getDead_callback_reasonADesc(ITableDesc tblDesc){ Attr attrDesc=new Attr("Dead_callback_reason", getDead_callback_reasonCDesc(tblDesc), this); attrDesc.setJavaType(FType.String); attrDesc.setLabel("超时申请驳回原因"); attrDesc.setNullable(true); attr...
0
3b3a0c9be31ed82794745d864d117ecf
447814d349c343e2e2fe7b623cbfa692
添加新成员的回调
function addPjGrMem_callback(data) { if(data.success) { var rows = data.rows; var tableData = []; for(var i = 0; i < rows.length; i++) { var row = rows[i]; var memId = row.emp.id; var memName = row.emp.name; var memRole = row.role; var memDept = row.emp.dept; var d = { memId: memId, mem...
1
a7e2ffcbc3436bc19b355ef5a8386f9b
46a7b51927067230b5b51ef9c1dcb1e9
Adds the directed edge v→w to this digraph.
public void addEdge(int v, int w);
1
66daf73864a6c18436ac08126de8cde1
0afd551510fc39908574150e2403abf5
Get whether the Bomb is still active boolean True if Bomb is active, False otherwise
return ( False if self.__data.number == 0 else self.__broken <= 0)
1
8aca8de02b6aed8c61805a99d25b5911
b38a7d9c9d3ebe00c4c74046d0aa3d75
获取某一节点下的子元素key列表.
class ArrayMap implements \ArrayAccess public function getChildKeyList($key = null): array { return array_keys($this->get($key)); }
1
65a3833eadcf5e806d1b435817162f9a
58fdace65b3bb43a635cde8104154f4d
搜索商品并立即订购
class BaseFunctions(object): def search_and_view_goods(self, goods_name): self.bo.get_url(conf.CATE_URL) self.search_goods(goods_name) self.bo.id_click(mobile.ID_SEARCH_INPUT) self.bo.id_clean(mobile.ID_SEARCH_INPUT) goods_name = goods_name.split()[0] self.bo.p_text_click...
0
cb66c07c06b2f43938d6ccb8fc48585a
98716c38eacec0ecc2e27643ff6e2512
Return statement object with id `id` or raise a 404 error.
class ObjClient(abc.ABC): def get(self, id_: str) -> wrappers.Wrapper:
0
daefc9070eac2293d05b388b99c66609
e5396c11623c47a7359d0f0e5b341261
r""" Implement the loss function introduce in the paper: `Dynamic Task Prioritization for Multitask Learning`.
loc_data, conf_data = predictions priors = priors num = loc_data.size(0) num_priors = priors.size(0) num_classes = self.num_classes loc_t = torch.Tensor(num, num_priors, 4) conf_t = torch.LongTensor(num, num_priors) for idx in range(num): truth...
0
aa5a7ef4bde3d37667292c489f9fc172
5d1f4ff815f5b98e51a73edf6b56c2ed
Opens and forwards ports used by the robot (see configuration)
class eBot(): def port_open(self): self.connect()
0
808cc5dfcf87af1501ab28036bbbbd3c
157347f3169e751a46a50c9f88bd560b
根据条件分页查询视频参数列表
BaseListVO<VideoSubject> findPage(VideoSubjectDTO videoSubjectDTO);
1
3466529c054d38d52214d645ce699ccc
1fdf4ae2f1fdbe16434752fc3f61f0e9
判断是否可以取消预订
namespace UIForm public partial class OTS : Form private bool isOrder(JObject item,string train) { if (train == item["queryLeftNewDTO"]["station_train_code"].ToString()) { int count= 0; string yz = item["queryLeftNewDTO"][this.seatItem.Value].ToString(...
0
888d0a63004b978b1a893923aa1449f0
f6d364c2a572539a3fa369b171652aad
Checks that on write access the correct error is thrown
old_writeWhisperFile = copy(writer.writeWhisperFile) writer.writeWhisperFile = fakeWriteWhisperFile self.assertRaises(FakeWriteException, writer._flush) self.assertFalse(writer.write_lock.locked()) writer.writeWhisperFile = old_writeWhisperFile
1
388ec128e0f8ff686873d5029a1d2fb2
a00c63dbd7e4a42c6490083fbdf7d720
Return the CIM name space the principal is authenticated against.
public CIMNameSpace getNameSpace();
1
49a3b2b250cb4a7ba4a70d45603888e6
63234fbf39543e6384b8415d7c736574
获取所以二级模块对应的启动文件 code class
public List<Object> listRootModelClass();
0
67f0dd5bb658fd5938b3394f85cb4d1a
5908490221d26a44c28aadd0b426de9a
Gets filter for the cards that can 'react'.
public class ReactActionOption public Filterable getCardToReactFilter() { return _cardToReactFilter; }
1
696449355fb49c4c34c9426a46d3b776
7b840dd4e01f0c9c0a6fa3bace90516c
返回位置p右节点的位置实例
if not isinstance(p, self.Position): raise TypeError('p must be proper Position Type') if p._container is not self: raise ValueError('p does not belong to this container') if p._node._next is None: raise ValueError('p is no longer valid ') return p._no...
0
5dad0c5ffdbec2b1e3797dc2a0627551
a13ede6e6bf1fd8d28dadc4177027b63
controls how much joystick must move before activating platform move
{ dz = dz + Constants.MINUMUM_JOYSTICK_RETURN; var value = (Math.Pow(Math.Pow(2, 1 / (1 - dz)), Math.Abs(x) - dz) - 1) * Math.Sign(x); if (value > 1) return 1; if (value < -1) return -1; return value; }
1
2ed7c775896a83c4c6365c6d2769cf79
99c9956fceb787e0321bebf1ec9af404
This method returns all the event/causes as a collection
namespace vApus.Stresstest public partial class FastResultsControl : UserControl public List<EventPanelEvent> GetEvents() { return epnlMessages.GetEvents(); }
1
e41f09d5508d0f29a6a878e49b60b211
1825f94e7ccbf0eaa9cee074d99d24dc
The class RunResult contains the results of a single verification run.
function TestResult(rmp, bin) { this.rmp = rmp; this.bin = bin }
0
4196f6247a2f14187cc00e16cda6ba2a
bb524692146e1dce85e3f0fe90554a94
对弹性网络进行分析波士顿房价数据
boston = load_boston() print("特征数量:\n", boston.data.shape) x_train, x_test, y_train, y_test = train_test_split(boston.data, boston.target, random_state=22) transfer = StandardScaler() x_train = transfer.fit_transform(x_train) x_test = transfer.transform(x_test) estimator = SGDRegressor(learn...
0
fe5c144c7d3ab7cad05ac16814e4a7e3
f0333e75d7211a8e6ec2f9b331976948
Simple fragment shader: set the fragment to red
namespace glcts std::string GeometryShaderRenderingPointsCase::getFragmentShaderCode() { static std::string fs_code = "${VERSION}\n" "\n" "precision highp float;\n" "\n" "in vec4 gs_fs_color;\n" "out vec4 result;\n" "\n" "void main()\n" "{\n" ...
0
6025a3da16be28fd6d3a331f98e5ff89
5fb8bd5f8213c66f09e79b5715f34d69
Logloss, i.e. the score of the bioresponse competition.
if y == 1: return -log_s(y_pred) elif y == 0: return -log_s(1 - y_pred) else: return 0.0
1
0b08c6650d5aa524fe2945ef05e5f39a
655cedaedf4d2b66f208a4ddace2b429
Gets all of the users sent messages.
namespace WZCommon public class DBManager [Obsolete("Use \"GetAllSentMessagesForUserToOwner\" instead.")] public List<MessageDB> GetAllMessagesForUser(string userAccountGuid) { lock (this.dbLock) { using (SQLiteConnection sqlCon = new SQLiteConnection(this.DBP...
1
16c293311869628dc7a6afd7a84de09f
6537dc36f4830744d74283d9860c3632
验证装卸费规则
ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { voUser user = (voUser) request.getSession().getAttribute("userView"); if (user == null) { request.setAttribute("tip", "当前没有登录,操作失败!"); request.setAttribute("result", "failure"); return mapping.findForward(IC...
1
c69ce0cd317308404df33d474a5211f5
024ce6804877b536f68955a0a7b4ef6d
Cria uma partícula para cada posição vazia no grid.
function createParticle(context: Context, width: number, height: number): void { const entity = context.createEntity() entity.add(Position) entity.add(Velocity) entity.add(RigidBody) entity.add(ParticleAppearance) resetParticle(entity) }
0
79ecedb94c7161b8333b85d874cd4d4e
d7c64da02c14a0bb298a791d38529ce6
获取支付宝收款码链接
class UserMoney extends Model private function aliPay($arr) { $alipay = app('alipay.web'); $alipay->setOutTradeNo($arr['payNo']); $alipay->setTotalFee($arr['money']); $alipay->setSubject($arr['name']); $alipay->setBody($arr['body']); $alipay->setQrPayMode('2'); $alipay->setNotifyUrl(...
1
fa89e080c342773d21da2859764a4ca8
86b6adba1e114abc341311d2c1c9613f
Sets all writing systems in an Lcm multi string from a LanguageForge MultiText field. Destination is first parameter, like the order of an assignment statement.
public function setLanguages(string ...$value);
0
d38f36bb23cf69ee6ffe1185addf7e25
30439f4fc44180273946ce2d622e5d0e
Returns the theoretical expression found for petrosian radius, by Ferrari, F., Morfometryka, 2015.
self.PET = (0.408 * self.alphaP * (self.Rn - self.G) + self.gama * 900 / (self.Tmean + 273) * self.u2 * ( self.es - self.ea)) / (self.alphaP + self.gama * (1 + 0.34 * self.u2)) return self.PET
0
0c4299753972a22fabc276d6036d4b70
3964702ae8ab230f8b4f620b8dafdc0c
removes user with given id from database and returns the number of records changed
public class UserDAOImpl implements UserDAO, InitializingBean @Override public boolean deleteUserById(int userId) { int numOfRowsDel = this.hibernateTemplate.bulkUpdate("delete User user where user.userId=?", userId); if(numOfRowsDel==1) return true; else return false; }
0
7a2a3831451318c600dc8cb3f2add126
0ea3cd0053727721149b7e40fe3f971c
Generate the train, validation, and test dataset.
test_rate = 1 - self.train_rate - self.eval_rate num_samples = x.shape[0] num_test = round(num_samples * test_rate) num_train = round(num_samples * self.train_rate) num_val = num_samples - num_test - num_train x_train, x_val, x_test = x[:num_train], x[num_train: num_train...
1
9949ff2ca60bb5d679580f3d8975c6a9
d693e3b366cfb86e1c5580a525d15c99
设置行的数据,swoole_table使用key-value的方式来访问数据
class Table public function set ($index, $value) { $this->rows->set ($index, $value); }
0
94e4d04a538a7ce1f2771d46e7f74dac
00073d4e046aa2b80c9d54fbbabeb193
Returns the form field prefix to use for the given choice
class FieldChoiceType extends AbstractType public function getName() { return $this->getBlockPrefix(); }
1
257593b460f75605e104fd23ab6e3e99
8f09044539cc83344c3e46a47ac89fa2
Función para el botón de iniciar sesión con Facebook
function instagramIniciarSesion() { }
0
508d1ff8527cd61bd7de751dee76ffac
6255f8928ded0cdc6cf8fc7e3d6c7f59
Return True if ``sid`` can be assigned to the single object ``pid`` or to the chain to which ``pid`` belongs. - If the chain does not have a SID, the new SID must be previously unused. - If the chain already has a SID, the new SID must match the existing SID. All known PIDs are associated with a chain. Preconditions: -...
driver = get_driver(PG_DEFAULT_DRIVER) manager = driver.connection_manager(self.sid) if manager.sversion >= 120000: return False if default_conn is None: conn = manager.connection(did=self.did, conn_id=self.conn_id) else: conn = default_conn ...
0
39b563ed16014ea6f21afd05ffc2c0d5
925fc69b8c1d791e176dc805145443fa
Returns the absolute path to the uploaded file
public function getAbsolutePath(KernelInterface $kernel) { return $this->getUploadRootDir($kernel) . $this->getPdfPath(); }
1
d95554e2512cf4c9db9b7392e5d7779e
0e72ff1c0bf93b711166e4ecd78819f4
dfコマンドからHDDの使用量を取得
class dailyDownload(): def getUsePercentage(self): stdin, stdout, stderr = self.sshClient.exec_command('df -h') capacity = stdout.readlines() percentage = 0; for line in capacity: if line.startswith('rootfs'): information = line.rsplit(' ') for piece in information: if piece.endswith('%'): ...
1
01de4e2e1247da3adeffa332c7281f87
2e0dcf8a2a98d0801a63cd155bf98289
Delete interfaces with type.
{ return type.FindInterfaces((candidateIfc, allIfcs) => { foreach (Type ifc in (Type[])allIfcs) { if (candidateIfc != ifc && candidateIfc.IsAssignableFrom(ifc)) return false; } ret...
0
ad7dcd0ec48cd500746a3e9ef80c0a9b
2c0043d7d4394988f18dca02bb16d9c9
Removal
var coli = parseInt($(this).attr('data-dynTable-col')); $('.dynTable-tr').each(function(){ $(this).find('.dynTable-td').get(coli).remove(); }); dynTable_AddRemovers(); if(counter != 0) counter--; if($('.dynTable-td').length == 0) counter = 0; }
1
6a79bec3f159f0bbb30e8382ff6bdd4b
b00e207f88534f3eea6b378f264ac394
Whether or not to log details
public class IronAjax extends PolymerWidget public boolean getVerbose() { return getPolymerElement().getVerbose(); }
1