query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
cf632dd7fb83bf5d83353025f63f496e | e0255966000a3a14e059ba7c9187403c | 改變耳環輸入模式 | var autoRingResult;
var value = blind.width;
if (26 <= value && value <= 70.99) {
autoRingResult = 2;
} else if (71 <= value && value <= 104.99) {
autoRingResult = 3;
} else if (105 <= value && value <= 149.99) {
autoRingResult = 4;
} else if (150 <= value && value <= 179... | 0 |
07c96ff94423b026fa49fa24b22b4727 | 603335485a9850c929902874548464e2 | Adds a customer to the customer group. | namespace Square.Apis
Task<Models.AddGroupToCustomerResponse> AddGroupToCustomerAsync(string customerId, string groupId, CancellationToken cancellationToken = default); | 0 |
0905373453e3d3dab9c5307c37b41ecb | 5f2bb29411304894f9362071fafd394e | 获取指定父订单号和订单详细中商品编号的订单信息 | public OrderDetailByOrderNoAndProNoDTO selectOrderDetailByOrderNoAndProNo(OrdersRequestDTO pageOrderInfoDTO); | 1 |
d29f4a5c5c3843270c886523dde01920 | fb8217d63c8c2c14d9e18f04bbbd6003 | Gets the logon user server variable | function CurrentWindowsUser()
{
return ServerVar("AUTH_USER");
} | 1 |
6d01868ddebbcd3db87d642f5fe4b980 | d057d4974794c1cb71ee17b8d40487aa | Remove all terms with near zero scalar values | def sparse(v, cutoff=0.00001):
return {f: w for f, w in v.items() if w > cutoff} | 1 |
a5af3a2b9bfa5bb404f2e4cb34b72ae3 | 526c70d8ba45a3530415702a69895cc2 | GIVEN a pre-existing user
WHEN a post request is made to the `/auth` endpoint with the correct credentials for that user
THEN the response should have a 200 status code and include an access token | user = userhelper.given_a_user_exists()
data = {
'username': user.email,
'password': 'test_pass_1!'
}
response = self.client.post(reverse('auth_token_resource_obtain'),
json.dumps(data),
conte... | 1 |
da602f978116c945a46067f8861b247d | a41cdd331183c296c6a0a33888571468 | Returns whether this object should be hidden in the startup sequence | class Responder
def hidden?
params[:hidden] == true
end | 1 |
f02f195c33406a37060518b67955f765 | b5ae8eec0a6658841973b5e59376d66d | Finishes the asynchronous execution of the GetBackupVaultNotifications operation. | namespace Amazon.Backup
GetBackupVaultNotificationsResponse EndGetBackupVaultNotifications(IAsyncResult asyncResult); | 1 |
0090bb28671a4f767cc5650bc00d6283 | 087173c48f285f24887f40cf721100c9 | 校验表单的数据是否发生改变 | var objForm = formPanel.getForm().getValues();
objForm['isAllocatableWhs'] = chkIsAllocatableWhs.getValue();
objForm['isCost'] = chkIsCost.getValue();
objForm['isInspect'] = chkIsInspect.getValue();
for(var prop in objFormDatas){
if(objForm[prop] != objFormDatas[prop]... | 1 |
b18aade43bb34ac22d6bbfc129e2750e | 55c36f1b95aa5bf1b5b31abe0377d6df | Adds a JOIN clause to the query using the Patient relation | {
$tableMap = $this->getTableMap();
$relationMap = $tableMap->getRelation('TrialPainRatingAssociation');
$join = new ModelJoin();
$join->setJoinType($joinType);
$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);
... | 0 |
550f3768e25f5e58b0de03f50fd35442 | 398d0f259ae26903515fcc1849917ff3 | 从DMM上找到的,把小图的url转成大图的~~ | public class Myadapter extends BaseAdapter implements OnClickListener{
private ArrayList<String> ReplaceUrl(ArrayList<String> thumbnail_url){
ArrayList<String> lage_url = null ;
if(thumbnail_url !=null){
for(int i=0;i<thumbnail_url.size();i++){
String url = thumbnail_url.get(i);
String url1 = url.replace... | 1 |
eeb570a80d35495ae13f798ff05e225f | 933c5e33c2a076320d083137e594691d | 将抓取框在图片中标记出来,其中I是前一张图片,h和w是根据CNN推测出的抓取点所在的详细的位置,t是抓取框与x轴的角度
gsize的抓取框的大小的参数 | info.Lx1=200
info.Ly1=200
info.Lx2=200
info.Ly2=200
info.theta=200
info.rho=200
for l in img.find_lines(threshold = 1000, theta_margin = 25, rho_margin = 25):
if (min_degree <= l.theta()) and (l.theta() <= max_degree):
info.Lx1=l.x1()
info.Ly1=l.y1()
... | 0 |
65e9b15a1008348dcf598c9462d22a34 | 0d17fbe57a3212ea2f5af0c3a3e5e22c | Find local config file, if not set explicitly, it will look for config file
with the same name as current NODE_ENV value | async function findConfig(): Promise<string | undefined> {
let file: string | undefined
for (const ext of EXTS) {
const name = NAME + ext
try {
await fp.access(name, fs.constants.F_OK)
file = name
break
} catch {
continue
}
}
return file
} | 0 |
5cac472f0e7ab6ead7249020c8cf2db2 | 2c4f63d08484924274db90d7dcd02678 | Are we on BuddyPlug user settings page ? | function init_woocommerce_shipping_local_pickup_plus() class WC_Local_Pickup_Plus extends SV_WC_Plugin
public function is_plugin_settings() {
return
isset( $_GET['page'] ) && 'wc-settings' === $_GET['page'] &&
isset( $_GET['tab'] ) && 'shipping' === $_GET['tab'] &&
isset( $_GET['section'] ) && strtolo... | 0 |
278c42b2774b91f4f0f8e57d65dd4eb6 | 920740b988063992481ec9690a184850 | Takes an amplitude A, frequency f, time t, and phase phi as
input. Outputs Asin(2*pi*f*t + phi). | res = pl.arange(phi, phi + L)
res *= (f * tau / sr)
res = pl.sin(res)
return res | 0 |
ee01f9ec7ee89d98dc5b6d1d715ec424 | 78c6b4b4a672ee01453713921a5c63f0 | Gets the desired output array values of a specific rule number. | {
if ($which == 'segment')
{
$total_segments = 'total_segments';
$segment_array = 'segment_array';
}
else
{
$total_segments = 'total_rsegments';
$segment_array = 'rsegment_array';
}
if ( ! is_numeric($n))
{
return $default;
}
if (isset($this->keyval[$n]))
{
return $this->keyval[... | 1 |
f2466e27cf2d03a247f57391926619c3 | 88d823b0e5cdbfc063ddd0ea65c3733c | TLG集合に含まれるMTGのリスト作成 | {
if (mentsu is Toitsu)
{
toitsuList.Add((Toitsu)mentsu);
}
else if (mentsu is Shuntsu)
{
shuntsuList.Add((Shuntsu)mentsu);
}
else if (mentsu is Kotsu)
{
kotsuList.Add(... | 0 |
6f26d1736f41557c33e5a6cac705bfef | 95901a1eeb004f6b727145eb3a13756e | 根据制定的判断方法,将元素集合从嵌套状态转变为平铺 | {
if (source != null)
{
foreach (var item in source)
{
yield return item;
foreach (var child in childrenSelector(item).Flatten(childrenSelector))
{
yield return child;
... | 1 |
0314b63aa0b08df34b66049a03162131 | 8217689cb7467b3e7f4198053a7ca55f | ROS wrapper for close_gripper | namespace RoboGO.ViewModels
public class ViewModelManualSteering
public void closeGripper()
{
mcManualControl.moveAxisGripper(enumCloseOpen.MANUAL_CLOSE);
} | 0 |
7d22556e75b23870f27554883d3f15b4 | cfa7c622f41eec5532def1d22c3cf630 | returns true if the given name is a nested type name | class Select
protected function isNested(string $name, string $relation): bool
{
return str_contains($name, '.') && str_starts_with($name, $relation.'.');
} | 1 |
062891587cd8d57eb96d2de0495f9a25 | 8e0496600e027c8392713676309c6dd7 | Count the number of trial reservations meeting the requirements. | if ((session.safe.arrival_date is not None) &
(session.safe.arrival_date is not None)):
existing_res = db((db.bed_reservations_safe.departure_date > session.safe.arrival_date) &
(db.bed_reservations_safe.arrival_date < session.safe.departure_date))
session.safe.... | 0 |
c252d339caf175d30881189a04a34173 | f46423ac0c0bbd61da146de9cdea6cb2 | tuple: The x/y scaling factors applied to all drawing coordinates
before rendering, in the format ``(scale_x, scale_y)``. These can be
used to facilitate resolution-independent drawing. | class HitBox:
def scale(self) -> Tuple[float, float]:
return self._scale | 1 |
180580bbfde72f6bc46487cc64cff336 | 6b7f3ce805926ab425301109e9fc20f4 | Returns True if the expression is self-evaluating. | def isexpr(*args, **kwargs):
pass | 0 |
15b70be8b943bd30034f2b1869325960 | 9b18f1c5d781c88744e7a88a3fe61cdb | 获取表单正文中非隐藏的附件数据 | namespace Movit.Application.IService.BaseManage
List<T_AttachmentEntity> GetFormList(string KeyValue, string ObjectType); | 1 |
872a16d29beefd144e85d8d9bf0cd0f5 | b46d7586667cf28b2047cf8af103813b | Retrieves information about a terms of service by ID. | def get_terms_of_service():
terms_of_service_query = TermsOfService.query.filter(
TermsOfService.status == TermsOfService.STATUS_ENABLED)
order_by = TermsOfService.version.desc()
terms_of_services = list(
terms_of_service_query.order_by(order_by).limit(1))
if len(terms_of_services) > 0:
... | 0 |
7a7f005ce8f74e1657a2e2b8dd540244 | c2d3832cdeda70eb22903c2ce1c0ecb4 | Inputs: None
Outputs: a list containing a gene's attributes
in the order detailed in __repr__ | gene_name = 'gene_name'
miso_event = 'miso_event'
reading_frame = 'reading_frame'
nucleotide_seq = 'nucleotide_sequence'
amino_acid_seq = 'amino_acid_sequence'
gene_id = 'gene_id'
transcript_id = 'transcript_id'
exon_number = 'exon_number'
return gene_name, miso_event, reading_frame,... | 1 |
3bfc66cc6f6be848161d17a49c739c72 | 44f049ed6ded710fc85789b66a00ff2e | Does everything publish would do except actually publishing to the registry. Reports the details of what would have been published. | class PublishHook(Hook):
def _publish_renders(self, item, publish_template, fields, comment, sg_task, primary_publish_path, progress_cb,
thumbnail_path):
errors = []
progress_cb(10, "Determining publish details")
secondary_publish_path = publish_template.apply_fields(fiel... | 0 |
d01037beaa9f46aa80559387b12ec7e0 | 979c73372ebb3001e893072966b563a9 | 获取同房间在线人员信息 | {
$live = Live::find($args['room_id']);
$json = Redis::get($live->redis_key);
if (!$json) {
return null;
}
$userIds = json_decode($json, true);
$online_user_ids = array_diff($userIds, array($live->user_id));
return User::whereIn('id', $online_user_... | 1 |
5f6648c3799da84bd5fe080ac6c5cf4c | c2aae2c36b23ecb773a4ce14999b6874 | Sets message on text area. | public class GraphicalDetector extends JFrame
public void setText(String str) {
textArea.setText(str);
} | 1 |
ebbbd563b1587aea7f06ef9193233a92 | df4f3d54749af9c3ac8f0f09f9976ba7 | Paginate a query and render the requested page | function _page (options) {
_query(options);
} | 0 |
462aee2e9aa11cfc3dc413b07d0f2ac3 | f9e6b9d4ae6abb716bded98180399d55 | Function Name : InitView
Returns : true if no error occured
Description : Code in InitView() will be called by the Shell upon a change
in the rendering context.
Used to initialize variables that are dependant on the rendering
context (e.g. textures, vertex buffers, etc.) | bool OGLES2Shaders::InitView()
{
bool bRotate = PVRShellGet(prefIsRotated) && PVRShellGet(prefFullScreen);
if (m_Print3D.SetTextures(0,PVRShellGet(prefWidth),PVRShellGet(prefHeight), bRotate) != PVR_SUCCESS)
{
PVRShellOutputDebug("ERROR: Cannot initialise Print3D\n");
return false;
}
glClearColor(0.6f, 0.8f, 1... | 1 |
bb60f026481cc99606a573ae5e653b03 | efa634f6357e70cf8634ad60f9238f62 | registers the currently logged in user to the desired program | def do_login(user):
session[CURR_USER_KEY] = user.id | 0 |
a69c8fa9f6390c0187c713cb04999373 | 565749fca1c92a5b8189f38668d750eb | この車の現在の回転を四元数で取得します。 | export class Node
public get rotation(): Quaternion {
return this._rotation;
} | 1 |
43a0c7af94b1ae2b5dd6ba80a45241d9 | b56a5035edeec5c0837da0f8f7a5cbbb | 点击直接登录跳转到登录页面 | linkLogin() {
wx.navigateTo({
url: '../login/login',
});
} | 1 |
ad89de51be0a7e47b8a226b668083ef6 | c842e65d160d88858f9cc554ab72b205 | Retrieves the Parameter that is associated with the Identifier. | final public class TransformationParameter implements Serializable
public static TransformationParameter getByIdentifier(int id) {
return getByIdentifier(new Integer(id));
} | 1 |
17f870e93fd6cdb1d55f9aa590480e39 | 2341da580c3905f75b43b5095f565393 | String을 입력하여 float으로 변환후 더하기
기본 소수점 자릿수로 계산 | function getSumFloat(strVal1, strVal2){
var sumval = floatSum(parseFloat(strVal1), parseFloat(strVal2), TP_TRM2);
return sumval;
} | 1 |
fec95f9a3328045db44d6981a84b71c6 | ba202744c2028282a43f4a2e63c08443 | Check whether numberOfFaultyServiceGroups is nill | adb_SystemStatistics_is_services_nil(
adb_SystemStatistics_t* _SystemStatistics,
const axutil_env_t *env)
{
AXIS2_ENV_CHECK(env, AXIS2_TRUE);
AXIS2_PARAM_CHECK(env->error, _SystemStatistics, AXIS2_TRUE);
return !_Sy... | 0 |
513886c1c02228d7cb0c5f084957fc29 | 82cb015598d11763aaa7f1c27673d46b | Производит фиксацию изменений между двумя версиями заказов. | {
$tmp = [];
foreach ($purchasesBeforeUpdate as $key => $purchase) {
$tmp[$purchase->id] = $purchase;
}
$purchasesBeforeUpdate = $tmp;
$managersEntity = $this->entityFactory->get(ManagersEntity::class);
$purchasesEntity = $this->entityFactory->get(Purchase... | 1 |
cf8d8e127877cc40a9650c484f7486b3 | 15e99597c10a73e2a14e868c21000d33 | Gets the isSchedulingEnabled property value. If true, the Lifecycle Workflow engine executes the workflow based on the schedule defined by tenant settings. Cannot be true for a disabled workflow (where isEnabled is false). | public class ScheduleManagerFactory implements ApplicationContextAware, ScheduleFactory
public boolean isEnableSchedule() {
return enableSchedule;
} | 1 |
a2b283df3164603e112b9166d68a0ca6 | b1589118a427c238b6c91520b0a536cf | 设置当前地图 当前关卡的星星数 | {
for (int i =0; i<5; i++)
{
star[i]->setVisible(false);
}
if (isCurrentLevel && currentLevelStarNumber !=0)
{
for (int j = 0; j<currentLevelStarNumber; j++)
{
star[j]->setVisible(true);
}
}
} | 1 |
7891e0fa29e547f2bed0ecb82975a299 | 1169171174683294ec3c70ab523035f9 | Metoda pomoću koje pohranjujemo komentar u BP
za određenu hranu(onu koja je prosljeđena kod instanciranja). | public function setComments(int $step=NULL)
{
if(self::USE_COMMENTS)
{
if($step === NULL)
$step = 'default';
$bofComment='/* bof '.self::NAME_SPLASH.'-step-'.$step.' */';
$eofComment='/* /eof '.self::NAME_SPLASH.'-step-'.$step.' */';
return array($bofComment,$eofComment);
}
} | 0 |
465af950edc7d3fe3b6066d6c182123f | 732c94779f58df766195e8459df53415 | Draws a single week header element. | {
for (int i = dayStart; i <= dayEnd; i++)
{
if (_DayColumns[i].Date.Date.Equals(DateTime.Now.Date))
{
Rectangle r = _DayColumns[i].Bounds;
using (Pen pen = new Pen(
_ViewColor.GetColor((int)e... | 0 |
6ce4e903516dc10d333c4befdd448410 | 7e7edd6a46f04b4b1311afca0ffd0ef8 | 开始批处理,默认10条sql组合 | function batchInsert100() {
var keyWord=$('#searchName').val();
if(keyWord==""){
layer.msg("名称前缀不可为空");return;
}
insertcount = 0;
for(var i=0;i<100;i++){
batchInsert();
}
} | 0 |
756ce5eeef40d1e17cc770a83d3414e7 | 0cb1346cd520fad84e254b0db88c1893 | Sends the map add request to the provider application. | public class MapsRepository extends BeanRepository<MapDTO>
public void requestMapSitesSave() {
logger.trace(TextColors.PURPLE.colorThis("requestMapSitesSave") + " was just invoked!");
sendInquiry(Inquiry.MAP_ADD_SITE);
} | 1 |
77e3842a239778e44ac3d839b6435b28 | 598cf85323c1efeb1b0a9a8b6f02b85b | Remove the gravity source from the list. | {
if (gravitySource != null) GetComponent<Rigidbody>().useGravity = false;
else GetComponent<Rigidbody>().useGravity = true;
timeSinceSourceChange = sourceChangeDuration;
} | 0 |
bc4c6c0af4bfd9c9df811c82d72937c1 | ffea71271cb85acb50302277338223e5 | Checks for interrupts, possibly sets the cause bit. | {
uint status;
mInterruptStatus &= 0x0000F000;
mInterruptStatus |= ((mIrqs.Value << 4) & 0x00000FF0);
if (mInterruptStatus != 0)
{
uint cctrl = mSpRegisters[RegisterFile.SpRegister.cctrl];
uint mask = cctrl | 0x0000F000;... | 1 |
a691b41a5c5d055c563d9909c643d2dc | ef1c1b36c7f16d0a3732eb7a2f7d78cd | Handles LCM commands from the client. | switch(command){
case Command.COMMAND_SECRETBLK: {
if(payload.length != 336){
System.err.format("Got command 0x02 with len %d, expected 336!\n", payload.length);
}
byte[] rsaPublicKey = RSA.keyToBytes(this.session.getRSAPublicKey());
for(int i = 0; i < 128; i++){
if(payload[16 + i] != rsa... | 0 |
fd8462d1a1e66920ace7775457085e6b | 99c9b6b3eddcc086981d65360a04dc27 | Método que ativa/desativa as armadilhas | {
if(activo==true)
{
this.gameObject.GetComponent<Renderer>().enabled = true;
this.gameObject.GetComponent<BoxCollider>().enabled = true;
}
else if(activo==false)
{
this.gameObject.GetComponent<Renderer>().enabled = false;
this.... | 1 |
b6bec0ef7a0e1fd94231fbf79b4a32b3 | cc0662acd8c268968330fe3998a120af | Kommentare für Bild erstellen | class Kommentar
public function __construct(int $id, string $kommentartext, string $erstelldatum, int $user_id, int $bild_id)
{
$this->id = $id;
$this->kommentartext = $kommentartext;
$this->erstelldatum = $erstelldatum;
$this->user_id = $user_id;
$this->bild_id = $bild_id;
... | 1 |
7fdc5443ef9d98d606f009d4952a5d20 | a95d06588b2e4db614f9f83970da151e | 超过五天算过期 | long t = System.currentTimeMillis() - twq.getCreateDate().getTime();
return (t/1000)>60 ? true:false;
} | 0 |
bcf2469c60ff9794704defe297411e5c | 1f3ded0d99a37bb23cab7e95e7c8949b | 单个或批量恢复在回收站的部门 | namespace HaikanSmartTownCockpit.Api.Controllers.Api.V1.Rbac
[Route("api/v1/rbac/[controller]/[action]")]
[ApiController]
[CustomAuthorize]
public class DepartmentController : ControllerBase
[HttpGet("{ids}")]
[ProducesResponseType(200)]
public IActionResult Recover(string ids)
{... | 1 |
7690f35d998ba57c1633e98f2cd5ad89 | e5619deefc314fe3d666a5e21a259585 | 根据提单号查找提单List | public class DeliveryPackingListDaoImpl extends BaseDaoImpl<DeliveryPackingList>implements DeliveryPackingListDao
@Override
public List<DeliveryPackingList> getDeliveryPackingListByTransportNoteNo(String transportNoteNo) {
String sql = "select * from delivery_packing_list where TRANSPORT_NOTE_NO=?";
if (null != co... | 1 |
b272a9785545c34185e6f71211d7838f | d0786d434836e050e63fedc33cfbd568 | Exit a parse tree produced by {@link CypherParser#oC_LabelName}.
@param ctx the parse tree | public class CypherBaseListener implements CypherListener
@Override public void exitOC_LabelName(CypherParser.OC_LabelNameContext ctx) { } | 1 |
7e178a75a7468ff595ea6aec46148137 | 7ab243870fa4ba94e719db7bb3dbe54e | Sort notes in the note list. | class MyInteractive (cmd.Cmd):
def do_list(self, arg):
self.note.retrieve_notes() | 0 |
73bd66a4d440e23001f68f6f73920c70 | 333e1f96a22b69ee44ba8a81092f8dcb | returns a reference to the lease. | fn acquire_reference(&self)
{
self.reference_counter().fetch_add(1, SeqCst);
} | 0 |
91eb527766c6e1765ca27d60e4eb8d54 | 5a897107024905e73f4cca9c5f881dc9 | Sets the text in the text field for loose price | public class SalesFrame extends JInternalFrame
public void setTaxAmountTextField(BigDecimal taxAmount) {
taxAmountTextField.setText(taxAmount.toString());
} | 0 |
6707d064404eda30e77662e715333fea | 2659e43769c0fb6b9969e1318f977f69 | 30天内没有操作过的临时已提交订单 | class DingshiController extends Controller
public function jieshu(){
$temp=M("dingdan")->where("ster=0 and tuikuan=0")->select();
$time=strtotime(date('Y-m-d H:i:s',time()));
foreach($temp as $k=>$v){
$endtime=strtotime($v['time'])+24*60*60;
if($endtime<$time){
$res=M("dingdan")->where("id='".... | 0 |
dcd68c7f5c0571782cff48c53bb5cb96 | 51cc07370434ccf4b5563bc9c91d82bb | Show the form for creating a new test. | class TestController extends \BaseController
public function create() {
return View::make('tests.create');
} | 1 |
aae3bd6d2d4f2b8188ccfa8896cf6610 | b37f35f0cf97a355b14b6437f15f7bbd | Report a media link. | data_type = 'media'
if is_valid_url(uri):
media = MetaData(data_type=data_type, xform=xform,
data_value=uri)
media.save() | 1 |
76f65e168ddab40a4fb5554a377d4180 | 594ed1e1573ef6f78ac881a47691b378 | 마커 평균으로 중심 좌표를 설정합니다, | export class MarkerClusterer extends OverlayViewSafe
getAverageCenter(): boolean {
return this.averageCenter_;
} | 0 |
7478b248851718ba97f26f71fb1192c7 | fd47cf5b252e8b6894c002413b2e4112 | Constructor method for SetDataRequestType | {
$this->requestName = $requestName;
$this->json = $json;
$this->lead_id = $lead_id;
} | 0 |
158c4893a47b133a51c00c70c042dbd4 | 16556006d9ef45dab8bc02db1ece1eee | Конфиг хранилищ | class Config
public static function get(){
return [
'TMPDIR' => __DIR__."/tmp",
'TXTDIR' => __DIR__."/txt"
];
} | 1 |
c3c5d0f6bf8583be2ae706e3ca05fe20 | e26503b45dac36a0e6f82ef3964db986 | Summary:
Occurs when the managed objects that are associated with the request have been
released. | namespace Wiki_WebApplication
public class MvcApplication : System.Web.HttpApplication
protected void Application_ReleaseRequestState(object sender, EventArgs e)
{
} | 1 |
b12f5916671ef2480eb3f7c19863a216 | 2e0c021e0a68b775d947e0c35ef81007 | Returns a list of nodes we want to search
on like paragraphs and tables. | class CSSSearch(object):
def process(self, page, nodelist, config):
nodelist.extend(page.cssselect(config) or [])
return nodelist | 1 |
3c78be12699e21363ef100a90e3d4acb | a27d3654927dee8512f533711be0810a | Проходит по всем элементам DOM и ставит выбранную локаль | namespace WeatherCollectorDesktop
public partial class settings : Form
private void GetSetLanguage()
{
string curLang = Properties.Settings.Default.weatherLanguage;
for (int i = 0; i < chkListLang.Items.Count; i++)
{
var chkItem = chkListLang.Items[i].ToSt... | 0 |
73ac3074b912a1eb3c34632a60ddaab1 | d5625c04c7c940eaa275f991a4368956 | すべての分配描画用のSurfaceを指定した色で塗りつぶす | {
DDBLTFX ddbltfx;
HRESULT hr;
if(NULL == m_lpSurf){
PbgError("CGrpSurface::Cls() : 内部エラー(NULL == Surface)");
return FALSE;
}
if(m_pDIB){
m_pDIB->Clear(Color);
}
ZEROMEM(ddbltfx);
ddbltfx.dwSize = sizeof(ddbltfx);
ddbltfx.dwFillColor = Color;
for(;;){
hr = m_lpSurf->Blt(Target, NU... | 1 |
0b5d7403707f7087de44cb16ce9b7dcc | 57933e062b1fca9b080166f85a1af16f | Path to UniProt target outputs. | class IgBLASTN:
def aux_path(self) -> IgBLASTArgument:
return self._aux_path | 0 |
719b79f9f3d0ce7d4a55836152080d66 | 8fc29c9d20f68782fe907df8119b1f78 | Adds node with given value to given binary tree.
Makes decition to put bigger values to right and
smaller values to left.
first is binary tree that value will be added
value is the integer added to tree | public class UniqueNumbers
public static TreeNode addNode(TreeNode node, int value) {
if (node == null) {
TreeNode newNode = new TreeNode();
newNode.left = null;
newNode.right = null;
newNode.value = value;
return newNode;
} else if (value < node.value) {
node.left = addNode(node.left, value);
}... | 1 |
85390fd471f77f9622b30435e207c38a | 39c4b54e6c412f5fb035e144f0297c80 | Prend en param?tre l'id d'un utilisateur et l'id d'un ue pour cr?er le couple correspondant dans la table de jointure | try {
Connection conn = cf.getConnection();
String sql = "select new_joint_account(?,?)";
PreparedStatement ps = conn.prepareStatement(sql);
ps.setInt(1, userId);
ps.setInt(2, jointId);
ps.execute();
} catch (SQLException e) {
System.out.println("Database connection failed. Pleae check your int... | 1 |
0d0ce6d7aa50b75b76a750d437bd9d29 | 7ac5d2a0a355ef45e46773ab970c9122 | Посчитать строку. | namespace StrCalculator
public class Calculator
public string GetStr()
{
return formul.s;
} | 0 |
408dbbfc08c19801b85c202f970a9c87 | 81a747236a7c6c5876825b06a854fd87 | Checks if group has read-only permissions for the file.
Therefore, write and execute bits for group must be unset and read bit must be set.
Returns:
bool: True if group can only read the file. | def test_permission_safety_group_writable():
with tempfile.NamedTemporaryFile() as tmpfile:
orig = os.stat(tmpfile.name).st_mode
os.chmod(tmpfile.name, stat.S_IWGRP | orig)
assert not check_permission_safety(tmpfile.name) | 0 |
3fc721befec38a0ad04c2c8a76dd865f | 1de555510de3f01ba20180f12f859d6d | 根据过滤器,清除配对 | Iterator<T> iterator = list.iterator();
while (iterator.hasNext()) {
T t = iterator.next();
for (T filter : mFilterList) {
if (mListImplement.getListItemId(filter)
== mListImplement.getListItemId(t)) {
iterator.remove();
break;
}
}
}
} | 1 |
978dfb1b251d68d51628178850d60b3d | 334674bf13fa5b00d19b71be0de8ea15 | 执行不带参数的存储过程 | namespace Tiexue.Framework.Data
public sealed class DefaultDataFacade : MarshalByRefObject, IDataFacade
public void ExecuteStoredProdedure(string storedProdedureName, params SqlParameter[] parameters)
{
ExecuteNonOutputStoredProdedureInternal(_connectstring, storedProdedureName, parameters);
... | 0 |
17d302b4a689b89fc9928e3067d31717 | 5306729be06c105f6ffe3d2bb59d80b7 | Programa que solicita al usuario la longitud de un radio y escribe en la
pantalla el área del círculo corresondiente. | Scanner scanner = new Scanner(System.in);
double radius = scanner.nextDouble();
System.out.println(Math.PI * Math.pow(radius, 2));
} | 1 |
f398fdb2b7e5f9452b04051b4838926e | 561312cdaa164f8927f7848e8919212a | # for rotating the input matrix clockwise by 90 | rotateMatrix180 = function(mat)
{
mat90 = rotateMatrix90(mat)
rotateMatrix90(mat90)
} | 0 |
eacae5c3d5a84f6fb860c0fb9fff8bd0 | 015c44524c4c531c3910963fd9f37c5b | Set the version of OSX to be run | try {
Runtime.getRuntime().exec(osxPath);
} catch (IOException e) {
e.printStackTrace();
}
} | 0 |
3c1b8cfae2e1f0deeec541033bfc32f0 | ba8cccb930f33d660e376a03957411a5 | !
@brief This function gets the demodulation margin from the module | uint16_t fskDem = 0;
uint8_t config;
AX5043ReadShortAddress(interfaceID, TRKFSKDEMOD0, &config, 1);
fskDem = (config & TRKFSKDEMOD0_MASK);
AX5043ReadShortAddress(interfaceID, TRKFSKDEMOD1, &config, 1);
fskDem += (config & TRKFSKDEMOD1_MASK) << 8;
return fskDem;
} | 1 |
7f7bc68688f06479bc028ff76ba265e4 | 920467e06c325a283ac4df727c1b8688 | The enchantability of a wand is determined by its components | int total = 0;
string type;
foreach (type : wc) {
switch (type) {
case "edged":
case "piercing":
total += wc[type]; break;
case "fire":
total += wc[type]/2; break;
case "ice":
case "electricity":
case "blunt":
total += 0; break;
default:
... | 1 |
d6798cd0a130821eaa77f27d02aead6c | 2c09bc252e81179b89692251706f4cad | Gets the parts of the message configuration options that override the defaults. Options:
hasParentDiscussion (false)
changeUserMessageCount (true) | public class MessageDefinitionImpl extends com.gensym.classes.ClassDefinitionImpl implements MessageDefinition
@Override
public com.gensym.util.Structure getDefaultMessageProperties() throws G2AccessException {
java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.DEFAULT_MESSAGE_PROPERTIES_);
... | 0 |
771913be350b59f749822cead1da2286 | 74fc21c253dcd923d2de78bd3e6fc6f6 | Pushes all ids | def push_id(ids):
for author_id in ids:
id_q.put(author_id) | 1 |
a264c643169cb21ca3649108b5a339ed | 3fb7d67ab722346d4310d2eb2782bf01 | Creates a user with given mail and role | namespace PVDevelop.UCoach.AuthenticationApp.Application
void CreateUser(string email, string password); | 0 |
f28b3aad7d43b371527fde69de8d93ff | 8548761c90889e230df8cf0c9028c7c9 | EXEC | Eat(TokenKind.KeywordExec);
var execWhiteSpace = _tokenWhiteSpace;
var start = GetStart();
Expression code, locals = null, globals = null;
code = ParseExpr();
string inWhiteSpace = null, commaWhiteSpace = null;
if (MaybeEat(TokenKind.Ke... | 1 |
3d7138f8f65eec2ca314fe50127a435e | 1dd0bda319a4c208df0ad63cf3ce8687 | <p><em>Sets <see cref="AzureGroupDeploymentCreateSettings.RollbackOnError"/></em></p>
<p>The name of a deployment to roll back to on error, or use as a flag to roll back to the last successful deployment.</p> | namespace Nuke.Azure
[PublicAPI]
[ExcludeFromCodeCoverage]
public static partial class AzureGroupDeploymentValidateSettingsExtensions
[Pure]
public static AzureGroupDeploymentValidateSettings SetRollbackOnError(this AzureGroupDeploymentValidateSettings toolSettings, string rollbackOnError)
{... | 1 |
d8ce20d9bad55c68ab2d0b1c848b97e0 | 556e5db5b9b3f2d3f9ab6ea6566fdd5e | Check whether the move is a pawn moving 2 squares | return piece->getId() == 'p' &&
((piece->getColor() == WHITE && piece->getLocation().row + piece->getLocation().lvl == 8) ||
(piece->getColor() == BLACK && piece->getLocation().row + piece->getLocation().lvl == 0));
} | 0 |
c384c8a932c5c6cd717c5ac728ab534a | f0e30ae83590b0e966471fda867d9e98 | Suggests a filename extension for a filesystem node.
The IFSConnection may use this information to store the file
with an automatically appended filename extension. | NodeDetails tempDetails = (NodeDetails) resultsList.getSelectedValue();
if(tempDetails.getRoot() == null || tempDetails.getBatchId() != null) {
return null;
}
return (tempDetails.getParentPageName() != null ? tempDetails.getParentPageName() : tempDetails.getNodeName()) + Cont... | 1 |
ef64bf2d3ba7069ee0745704eebdb16e | a57f717237fa81bb4984d345f8039447 | Эта функция находит строку в нашей базе данных, соответствующую имени класса
и выводит её номер | public class ClassManager
public String getClassIdByName(String name) {
String id = "";
try {
PreparedStatement q = con.prepareStatement("SELECT `ID_class` FROM classes WHERE `name` = ? LIMIT 1");
q.setString(1, name);
ResultSet results = q.executeQuery();
... | 1 |
d46fd5dae8b4bfb46aaf350f8db119bc | a351dfd73d8643c466bbd4b674c99186 | does the flow exist in the priority queue? | return(next((True for (pred, cur, data) in G.in_edges_iter([n], data=True) \
if data.get("type", "flow") == "flow"), False) or \
next((True for (cur, succ, data) in G.out_edges_iter([n], data=True) \
if data.get("type", "flow") == "flow"), False)); | 0 |
61a09ee427d87106fcfb7e0c08edf2f9 | 6673af968b23384aa6d067d9dadab246 | Normalement, vous n'avez pas besoin de toucher la fonction suivante.
Elle demande à la réserve d'ajouter ou d'enlever une pièce. | static void affiche_reserve(struct reserve *o)
{
struct piece *p ;
int i, j ;
p = FILS(o, 0) ;
if ( p == NULL )
{
glRasterPos3f(o->position.x, o->position.y, o->position.z) ;
t_chaine( "C'est une réserve de quoi ?" ) ;
return ;
}
glPushMatrix() ;
glTranslatef(o->position.x, o->posi... | 0 |
e6dea8cb8af4883c85795fe621d89028 | f1bbb119dd0b97797c0e643153500bce | Display birds to sell | namespace PetStore.UI
public partial class MainWindow : Window
private void Button_Click_4(object sender, RoutedEventArgs e)
{
AnimalList.Children.Clear();
selectedAnimal = "bird";
List<Bird> cats = new List<Bird>();
for (int i = 0; i < store.Pets.Count; i++)
... | 1 |
64f51cf2624e132da7a2728bd4394988 | 18984ce6f9edcb48a8114b320b042f12 | 爬取股票财报数据 | try:
url = 'http://news.stockdata.cs.com.cn/hqcenter/htmls/qcenter/index.html'
driver = webdriver.PhantomJS(PHANTOMJS_PATH)
driver.get(url)
time.sleep(7)
driver.switch_to.frame('main')
time.sleep(5)
tmp = driver.find_element_by_id('tab_body_rise').text.split('... | 0 |
50169a65c82cb78377b9ff6254baebf6 | 22ab77c7c3dadfc7d2b3c87dcd3a9fc5 | Check decoding and unfolding of more geometries. | unfolded = [con.Stack(bdft.get_FeatureInput(Geo)).unfolded for Geo in Geos_simple]
actual = unfolded
expected = [
[(0.0, 'outer')[::-1],
(0.0, 'inner')[::-1],
(2000.0, 'middle')[::-1],
(0.0, 'inner')[::-1],
(0.0, 'outer')[::-1]],
[(1000.0, 'outer')[::-1],
... | 1 |
8587759c353a4dc610e3f03e808fc710 | 72c6805189c4ff0ee8f49b4714a9f692 | 다이얼로그를 관리맵에 추가 | class FusActivity : AppCompatActivity()
private fun addDah() {
viewController.viewDataBinding.layoutContainer.addView(DahLayout(this))
} | 0 |
65576dbb1e24397b71075768fa927be6 | aa1a3a029c8d4d9ac7731af7a56b4d38 | 根据标签找到根成员 | {
String strResourceTag = RootTagType[iType];
TreeNode tnRoot = null;
foreach (TreeNode tnTemp in this.tvProjectResource.Nodes[0].Nodes)
{
if ((tnTemp.Tag as String) == strResourceTag)
{
tnRoot = tnTemp;
... | 1 |
f25d69dc3605289541ed2cf4f4644e06 | 497c866cfd3c28d2e0f29534ecf10851 | For the storing and reading of contacts between a protein and ligand | class ContactList:
def __init__(self):
self._contacts = []
self._contact_dict_first_name = {}
self._contact_dict_last_name = {} | 0 |
e3ca3bd35aada1aec7adae163adf2580 | ba1d407a969c5bb368bc650a8f52e355 | <pre>
[Output Only] Google reference ID to be used when raising support tickets with Google or otherwise to debug backend connectivity issues.
</pre>
<code>optional string google_reference_id = 534944469;</code> | java.lang.Object ref = vmId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
vmId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
} | 0 |
02c7b8ae4774ae8824316635f7c43ad7 | a569da5d4912134a8cdb0a422486f698 | computes the point where three camPlanes intersect
returns whether or not the point exists. | const double p1=PlanePoint(pla1,pt);
const double p2=PlanePoint(pla2,pt);
const double p3=PlanePoint(pla3,pt);
return((p1<=0 && p2<=0 && p3<=0) || (p1>=0 && p2>=0 && p3>=0));
} | 0 |
34b86cb89433dfd44c5e948a3de47b8f | 56ac101ff961d66812acb2cd3f30e5c6 | Отправляет приветсвие с разными кнопками. | if message.chat.type == 'private':
if message.text == 'Рандомное число':
bot.send_message(message.chat.id, str(random.randint(0,100)))
elif message.text == 'Как дела?':
markup = types.InlineKeyboardMarkup(row_width=1)
item1 = types.InlineKeyboardButton("Хорошо", c... | 0 |
e52d3715ca2092c595b2fb4f15cb1b37 | ebc093f77190b1edc25b030978fded95 | Viewing the invite of a user should return a list of them. | InvitationFactory(to_team=self.team_a, made_by=self.team_a_admin)
InvitationFactory(to_team=self.team_a, made_by=self.team_a_admin)
InvitationFactory(to_team=self.team_b, made_by=self.team_b_admin)
InvitationFactory(to_team=self.team_b, made_by=self.team_b_admin)
self.client.forc... | 1 |
e0d2fd44cfe3ffcede933ef7d9982649 | 21f2a193e5e870378e23b758b7b4fa90 | 以栏目ID显示文章栏目的第一条文章 | global $db,$type,$func;
$moduleid=$func->getmodelid($tid);
$ispage=$type->GetClassPageType($tid);
if ($ispage==0){
$sql="select * from `".PRE."article` where `cid`=".intval($tid)." and `is_show`=1 and `ischeck`=1 and `ischeck`=1 order by `time` desc limit 0,1";
$rs=mysql_query($sql) or die ("SQL execut... | 1 |
453423ee6df8ad41124665eb81171284 | abb6efca52f9cd11ce5fbf4759620e72 | Fixture statement which returns the name of the pyang plugin which will
be used
during the test session | def pywemo_model_fixture():
return "LightSwitch" | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.