query_id
string
corpus_id
string
query
string
code
string
label
int64
f652427e86c60e2f2b0b09ace1aced1f
f9cda0b24bd0f0b0e4206496e5ed66e7
Set Conekta as inactive on the entity.
if ((is_null($this->intId))) throw new QUndefinedPrimaryKeyException('Unable to call UnassociateInfraestructuraAsCordonCuneta on this unsaved OpcionesInfraestructura.'); $objDatabase = OpcionesInfraestructura::GetDatabase(); $objDatabase->NonQuery(' UPDATE "infraestructura" SET "cordon_cu...
0
fc76d8a425ea3b3028862b05f1d7876f
b99cac523ec2e4aca28ea582c85b1f8c
Creates an instance for updating an existing entity flow
class UpdateFlowEvent(Event): def __init__(self, timestamp, host, flowId, logMessage=None): super(self.__class__, self).__init__(timestamp, host, logMessage) self.flowId = flowId
1
720ee78c89ff9fe3c490d396cb0970fc
314ef655c244936d1a94d212bf5b913d
return the string foo
class Foo iAmSpartacus() { return "I AM SPARTACUS!!"; }
0
1861369c30c25c4d3fa5886cb9a1151c
2b37c435c22f2d5ab4d0ae6015fc9fa3
[cube] Test auto restoring beam with a bad edge channel
namespace SPECTRALCT{ int test2() { cublasHandle_t handle; cublasCreate(&handle); const double initx = 0; const double inity = 5.0; const double initz = -0.5; const double initdetcntx = 0; const double initdetcnty = -5.0; const double initdetcntz = -0.5; const double detustp = 0.008; const double detvstp = 0....
0
34c236aeb7a3bb8b46284caaf7b477e8
83d8a9a711949abafef0f5de92a8050e
리뷰 리스트를 받아 평균 별점을 구해 리턴
rvws = self.reviews.all() if rvws.exists(): self.rating = rvws.aggregate(models.Avg('rating'))['rating__avg'] self.save() return self.rating return 0
1
23a2fc672783ec678aad7d9b9ef3ebe6
444dda48c6b62eedf48beae4907f47b0
Gets array of 1-31.
public class Common public static ArrayList<Integer> getListDay() { ArrayList<Integer> listDay = new ArrayList<>(); for (int i = 1; i <= 31; i++) { listDay.add(i); } return listDay; }
1
0088be28d5d2f071e95f140834afcdb8
297be6ca3a56dadd3ddaad30d2fdc8d8
Solve a maze with algorithm of choice. Available algorithms: - Depth-first - Breadth-first
class Agent(object): def bfs(self, maze, goal):
1
93beca1a2c068d321ca99a035431ef12
9686c204f8733c0d9a2514aa36754add
Start Voice Wakeup Command Training Activity.
, @NonNull UUID serviceUUID , @NonNull Integer serviceInstanceId , @NonNull UUID characteristicUUID , @NonNull Integer characteristicInstanceId , @NonNull TrainingStatusAndroid trainingStatusAndroid);
0
4ed735141c213ec8ee89c964bf8ef8b3
5c62d9623cf02527ba93fd02c087d65d
Set an interceptor to be called before calling the record listener. Does not apply to batch listeners.
public class DatabaseRecordReader implements DataReader<SqlRow> @Published public DatabaseRecordReader setListener(DatabaseRecordListener listener) { this.listener = listener; return this; }
0
02f91d4db661b8d9d43586d1eebb4d01
aa5744e57f7499bd4386d1e96b6b9459
Whether or not counter reaches maximum value Returns
open abstract class Counter(size: Int, val base: Int = 18) open fun atMax(): Boolean { return counter.any { it >= base } || counter.all { it == this.base - 1 } }
1
6d26e588b84796964d6d417e5793250a
083342aff706138c1eba80fe68cd062f
新增明细弹出模态框
Modal_show(){ this.createFlag = true; this.resetForm(); this.$modal.show('add-modal'); }
1
f9be88f67695aeae6c356ab83fbe95b5
41a429f133111a81703209bdf31a6ab8
Check if hold commit action is possible depending on current commit mode
class Operator: def is_commit(self): return self.type == 'c'
0
312e9e572376071cec00affa472b62c3
5f2489cef994d7bec9be0f2c889b4e6b
分享至Twitter
var _url,_txt,_img,_this,imgHtml=''; if(option && option.obj){ _this=option.obj; _url=option.url||window.location.href; _txt=option.text||""; _img=option.image; _txt=encodeURIComponent(_txt); _url=encodeURIComponent(_url); if(_img && _img.length>0){ imgHtml="&pic="; if($.type(_img) === ...
0
f88ec5bcc6572d558f297a4a9032b20a
6ce2902a0e5fc14cb01aed5f5b60cf1b
Confirms the selection of a stack.
namespace Syncfusion.Windows.Forms.Diagram public class Global public static int SelectMatrixStack(int stackID) { int prevStack = -1; if (stackID < NumMatrixStacks) { prevStack = CurrentStack; CurrentStack = stackID; MatrixStack = MatrixStacks[CurrentStack]; } return prevStack; }
1
1c29aaae32b2467d9c5dfc5f9a0576ff
624ec2a1d630654b91dc38a6ff8c5c69
此函数判断x是否为完全数,是返回True,否者返回False
int sum = 0; String strNum = Integer.toString(x); for (int i = 0; i < strNum.length(); i++) { sum += Integer.parseInt(strNum.charAt(i)+""); } if(x%sum==0) return true; return false; }
0
5e39b0499d1399c4ad3ef6c1011b1572
bbd75a9186814b7252dbed4257914ab2
instance operation: selectBookable
Escher_ObjectSet_s * HotelComponent_BOOKINGSESSION_op_selectBookable( HotelComponent_BOOKINGSESSION * self, HotelComponent_FACILITYTYPE * p_facilityType ) { }
1
c9738563a1a080546f6a20651276ac65
9e9ac52710d3a42801a9b9c4641b1210
Get all related CFD.
class NotaCreditoDAO private function cfdiRelacionados() { $cfdiRelacionados = new cfdi33\Comprobante\CfdiRelacionados(); $cfdiRelacionado = new cfdi33\Comprobante\CfdiRelacionados\CfdiRelacionado(); $sql = " SELECT IFNULL(N.tiporelacion, '') TipoRelacion, IFNULL(R.uuid, '') UUID ...
1
caaa351efbb5f0fd3c92d360d38060f4
224ecd9330f837a43fe32be6ef8c6440
Called, if all voters were voting abstain.
public function allowIfAllAbstain($value);
1
81332088cf901abc38133ba5e289d618
132d5d894c5a343dfe5892805b0822ff
outputs whether or not there is black piece at a position
{ cmd.CheckNuArg(2); SgBlackWhite color = BlackWhiteArg(cmd, 0); SgPoint move = MoveArg(cmd, 1); cmd << SgWriteBoolAsInt(Board().IsLegal(move, color)); }
0
b93442b1f6c4bf93b5c1e2a10e3395ae
8b96ee23db01adb3c92c368cf29865e5
获取表名 默认使用类名和覆盖,如果类有一个Table属性
class Model protected function getTable() { if(!empty($this->table)) { return $this->prefix.$this->table; } $className = strtolower(get_class($this)); $className = explode('\\',$className); $className= array_pop($className); if(stripos($className, 'model') === false){ return $this->prefix.$classNam...
1
55c2cbe845969649d3872b402c646d88
f7f33ece7b77fe6b595d908b0ed2d7db
ルール更新イベント発行
{ if(IsGameOver) { Debug.WriteLine("ゲームオーバーしてます"); return; } lock(_updateLock) { if(Updating) { Debug.WriteLine("================================\n更新中に次の更新が呼ばれた=============================="); ...
1
4733245a5fe6633ee92904bb0fbc90dc
d7491c92b8bd9eed557227dcd43c680b
Click event handler for Pan De Campo Button
namespace Netron.Diagramming.Win public class DiagramMainToolStrip : DiagramBaseToolStrip protected virtual void HandlePanButtonClick( object sender, EventArgs e) { this.diagramControl.ActivateTool(Controller.PanToolName); }
1
fc6d3b230892ca1574603d697a2b2c9e
2b641f77f217ebe63237587866c8ba13
Test if you can pass in the axis kwarg
data = [ [0.0, 0.0], [1.0, 1.0], [2.0, 2.0] ] paxfig = paxplot.pax_parallel(n_axes=len(data[0])) paxfig.plot(data) self.assertEqual( paxfig._pax_lims, [[0.0, 2.0], [0.0, 2.0]] ) self.assertTrue( ...
0
4f5192811a233823a356f01fccfecb09
0ce5b31ffb2cd25b65310de9e595f056
Compare two strings, taking constant time
function cmp_slow_equals($a, $b) { $diff = strlen($a) ^ strlen($b); for($i = 0; $i < strlen($a) && $i < strlen($b); $i++) { $diff |= ord($a[$i]) ^ ord($b[$i]); } return $diff === 0; }
1
17744fc58c8ab7dce359b4c3ab157f2c
09f713e36634aa7a34e13e8abb6623f7
Set IPv4 host address
UpdateARecordSet withIPv4Address(String ipv4Address);
1
7f8751ee16e5da7b3fedc062c802c47e
6d192f5330c7173c543b7035690bb8e6
サークルの更新ページにアクセスするための関数
function goCircle(cid){ window.location.href = root+"/circle/yqCircle.jsp?cid="+cid; }
1
24c0d71b54db0fe9c7476a573b9e022c
d0816532feb8008a82bcb0ff851aed0b
按照组织机构ID(生产线)获取按日的甲乙丙煤耗
namespace ERCHTMS.Busines.HseToolManage public class HseObserveBLL public DataTable GetDeptCYL(string year, string organizeCode) { return service.GetDeptCYL(year, organizeCode); }
0
15a0692b11e6af9e146583d9fc997423
7298e7fc61d69f79ca0c685177d2de52
Set preferred survey preview field.
def previewrange_set(): pass
0
8c473fa9b292726f1fa2ed3053e3cdf2
f284141bb55f956007ff092ed31dc5a1
Main write procedure of /proc/bled
static ssize_t device_write(struct file *filep, const char *buffer, size_t len, loff_t *offset) { int i=0; char *letter; char* space = " "; while(buffer[i]!='\0') { if(!(buffer[i] == space[0])) { letter = mcodestring(buffer[i]); int j=0; while(letter[j]!='\0') { switch(letter[0]) { ...
1
3a711766e2235a299aa1a5d825b55fe1
38d982c096f1f6eb90b443c52c0c6aac
ROS service: shows a letter on the LED matrix and waits for the specified amount of seconds.
{ int length = strlen(msg); int i; int s = 5; char buffer[6] = " "; for (i=0; i<length+7; i++) { int t; for (t=0; t<6; t++) buffer[t] = ' '; int j; for (j=0; j<length; j++) { if (((s+j) >= 0) && ((s+j) < 6)) buf...
0
d1e9de4989caf022807de00d46d6caa0
c096dd1d088a6d90edcb0ee0b0bc4ac2
获取模块待办总数
public class PendingAction @SuppressWarnings("unchecked") private String getPendingNumFromGW(String userId,String name)throws Exception{ AccessToken token = new AccessToken(); String jsonString = gwPendingService.getTaskCount(null, "10006419", null,GW_PENDING_TYPE); Map<String,Object> params = StringUtil.json2Ob...
1
15342a7ce3c9c2c26156e232d641de84
570b4cf75a93d9c6a23cc76612404fdf
Returns the Least Squares(L2 Norm) between two vectors
if (v.empty()) return 0; if (v2.empty()) return 0; float dif = 0; for (int i =0; i < v.size(); i++) { dif += powf(float(v[i]) -float(v2[i]), 2); } return sqrtf(dif); }
1
c0207ccbd8aa27895f3e7ac989197c2b
7e915e3f8db6edaa4917f6918a42bfca
Creates a dict from training_id to a list of game states.
col_names = [x.strip().lower() for x in raw[1].split(',')] return transform_to_numbers([ dict(zip(col_names, extract_game_info(i))) for i in raw[2:] if 'TOTAL' not in i ])
0
ba9e3300ebbeb7f78cc247c0bf575af0
4bd0e4763b800a9bfd525e3a41d95e32
把微信用户头像保存到本地
def wechatLogin(): itchat.login() friends = itchat.get_friends(update=True) base_folder = 'wechat' folder = os.path.exists(base_folder) if folder == False: os.mkdir(base_folder) for item in friends: img = itchat.get_head_img(item['UserName']) path = os.path.join(base_f...
1
512602c7266619aa934329419e4e9f63
e55f703591107aeea4e4179eec2dcef8
Calculates the normalized city block distance between two data points.
class DRRGPostprocessor(BaseTextDetPostProcessor): def _norm2(self, point1: List[int], point2: List[int]) -> float: return ((point1[0] - point2[0])**2 + (point1[1] - point2[1])**2)**0.5
0
8d34222516bdde879f7eb14102d37851
d79925408451840bc472d894b0ae49fd
Make sure there is a pdbs directory, creating it if needed
class PipelineProtein: def setup(self, outdir): if not os.path.exists(outdir): os.mkdir(outdir) fields = self.seqfile.split('/') if fields[-1] == '': fields.pop() self.basename = fields[-1].replace('.seq','') self.modelPDBout = os.path.join(outdir,(self.ba...
1
ef47139bc92a16bfb8d7305d1cba070e
a8f9b1e1fefcffa4a523e16dfabd38a8
Representacion en string de los id's a los actores y sus historias
string fechahistorica::recorrerAcontecimientos()const{ string aux; for(auto it=(contenedor_fh.second).begin(); it != (contenedor_fh.second).end(); ++it){ aux+=(*it); aux+="#"; } aux.erase(aux.end()-1); return aux; }
0
d61563ed6d2a67e114e85ee055f176c3
9f946c32da5dc9036cba4e0f86b35673
Тест массового удаления категории. Доступно только админу
class core_customfield_category_controller_testcase extends advanced_testcase public function test_delete_category() { $lpg = $this->get_generator(); $category0 = $lpg->create_category(); $id0 = $category0->get('id'); $category1 = $lpg->create_category(); $id1 = $category1->get('...
0
27695d1915ca2c5d5131fede545e25dc
ac420acac235ba0f237dbae3ce81177e
Record a user's conversion in a test along with a given variation
class Dao public function registerConverion($testId, $testVersionId) { $sql = 'INSERT INTO conversions (conversion_time, test_id, test_variation_label) VALUES (NOW(), ?, ?)'; $stmt = $this->connection->prepare($sql); $params = array( $testId, $testVersionId ...
1
2cc723f10544bef7afc45747c7c469e5
3fa707f512d06e127213ed00657d1e20
Returns whether the value of the '{@link org.opengda.detector.electronanalyser.model.regiondefinition.api.Region#getLastYChannel <em>Last YChannel</em>}' attribute is set. <!-- begin-user-doc --> <!-- end-user-doc -->
boolean isSetLast();
1
b4a436b473ce2fc77f7a9531997257f1
0cc8e6181136f5f0f730b703e92fccdf
Determine if array of ballot inst's has text by testing first.
if (empty($x) || count($x) == 0) { return true; } $first = $x[array_keys($x)[0]]; $is = count($x) > 1 && is_string($first); return $is; }
1
2e2254ab9ff57e08159813aa7cdf23e2
31609ed61354c4c9ee1131685aa3a6aa
Multiple two GF(2)[x] elements together.
int gf_mult(int x, int y, int prim = 0, int field_charac_full=256) { int res = 0; while (y) { if ((y & 1) == 1) { res = res ^ x; } y = y >> 1; x = x << 1; if ((prim > 0) && (x & field_charac_full)) { x = x ^ prim; } } return res; }
1
22d01ada505f12405715eca2eca4bf0c
a349a60a1d0e4b05ae4d0a2c823f3853
Sets the mode to No Tool
public class Operations public static void setNoMove() { moveMode = NO_MOVE; }
0
e3a7cbb485024b6bb26a7fd6a696d728
8665b30e77c8e751e4d92eeb70730362
根据任务id查询任务名称
public String selectTaskName(String taskId);
1
1af6228bf9eca5ee8736b2f25f3cb27d
bb2de4faa377ae8f7c3b8cd4ad3dde24
Confirma con un 1 si el numero esta dentro del array, y un 0 si no
int facturaValida(int valor) { int i,j,enco=0; for (i=0; i<f; i++) { if (valor == matriz[i][0]) { enco=1; break; } } return enco; }
1
7efadd9d23f0e3efc1e36e8449609ed7
33348e5d56326f4c50b1091e450354f9
英雄殿堂技能等级更新
local bean = i3k_sbean.eightdiagram_change_uplevel_req.new() bean.skillID = id i3k_game_send_str_cmd(bean, "eightdiagram_change_uplevel_res") end
1
710307fed40609a12405ad9551cc4f00
39c631147e0bbc22b39451b201c00c0e
Creates a new cobrand session
{ return $request = (new RequestBuilder()) ->withBaseUrl($this->baseUrl) ->withPemString($this->pem) ->withEndpoint('/sessions') ->withPayload(new Payload($payload_data)) ->withMethod('POST') ->withQueryParam(self::SDK_KEY, $this->sdkId) ->build() ...
1
a493de4692d5b061a6883e45e7e8e3dc
7e35495e94706846818184eb3ba3ff94
test that verifies if the customer can access a specific purchase
class ContractorTests(TestCase): def test_cart_puchase(self): result = self.client.get('/store_cart/purchase') self.assertEqual(result.status, '200 OK')
1
2263e13243c024e172e94d6fd6b7a3e1
c77758cfe1e03a00facbad45db15f2b7
Print the ability modifiers if any.
{ int pos = 1; System.out.println("Feats: "); for (feat f: feats) { System.out.println(pos + " - " + f); pos++; } }
0
7843528d36e0001d358cb34aa48e1fd2
cfe825f582307e176ac8443fe719dd20
得到客户酒店房间订单的总原价
public class Order{ public int getTotal() throws SQLException{ PromotionInfoForOrder promotionService=new PromotionToolForOrder(); HotelInfoForOrder hotelService=new HotelToolForOrder(); double HotelDiscount=promotionService.getApproriateHotelPromotion(vo); double WebDiscount=promotionService.getAppropriateWebP...
0
125b2ec502297513ea3aa1698862a148
793067117dd3c3d86d6012cb9be86639
接收物品使用成功消息
class UserBag extends BaseSystem private static _DispatchHasItemCanUse(hasItemCanUse) { MessageCenter.ins().dispatch(MessageDef.BAG_HAS_ITEM_CAN_USE, hasItemCanUse) }
0
0e5cae6fda1c2a1d85af7212b6dc3e46
7fcda836bf5130b79124be76734803c4
获取当前日期的20年后的日期
public class DateUtils public static String getParamDateAfterNYearDate(String currentDate, int N) { Calendar calender = Calendar.getInstance(); Date date = formatStringToDate(currentDate); calender.setTime(date); calender.add(Calendar.YEAR, N); return formatDate(calender.getTime(...
1
d0bd6117e13ba2366d57f669e49e1798
f3544f5d4798a469990c4e3ba8303b53
将指定收费项目参加的活动转化为dto
public ActivityEntity toActivityEntity(ActivityDTO activityDTO);
0
c53864f3fa1993284c9cbf13d1caa555
214d8c0c3e4ac5ac2e0f66e4f79594e5
Get the potential question types that would be required for a given quiz.
namespace Quiz.Model public class QuestionRepository public List<string> GetQuestionTypes() { var QuestionTypes = new List<string>(); QuestionTypes.Add("8-11 years"); QuestionTypes.Add("12-15 years"); QuestionTypes.Add("adults"); return QuestionTyp...
1
84b79a043d21d0ef19eb5f3a0178cd1d
9bed70946dc8d25df1fe0d823aec4d6a
Whether to show the file size column
namespace Nest public partial class IndicesStatsDescriptor : RequestDescriptorBase<IndicesStatsDescriptor,IndicesStatsRequestParameters, IIndicesStatsRequest>, IIndicesStatsRequest public IndicesStatsDescriptor IncludeSegmentFileSizes(bool? includeSegmentFileSizes = true) => Qs("include_segment_file_sizes", includeSe...
1
c387e9fd4277fa0283823038666bbd27
0588b30eb24ac52d4566f6b2b46d9e8c
Отозвать подписку на IMAP почтовый ящик.
if not hasattr(request.user, "mailbox"): return try: m = lib.IMAPconnector(user=request.user.username, password=request.session["password"]) except Exception: return try: m.logout() except exceptions.ImapError: pass
0
aebccaabb1d2dcfaef88f52d7b341e95
ae4db4424117bdd6cdcde6adf563d25f
收缩压属性元数据
$mmd_path = implode('/', array($sql, $module, "$name.mmd.json")); if (is_file($mmd_path)) { $mmd = json_decode(file_get_contents($mmd_path), true); foreach ($mmd as $code => $attr) { $attr_update = array(); $current_mmd = array(); $...
0
6f02d6ce8b12d926a209080ff3799c97
c591495c4e91aebf0dbd972942d6efe7
Verifica se o caracter é novo
public class ManipuladorDeArquivo public boolean hasNextCaractere() throws IOException, ModoException { if (this.modo.getModo().equalsIgnoreCase("escrita")) { throw new ModoException("Esse método só pode ser usado em modo de leitura"); } return this.scanner.ready(); }
0
2e293270d294c0e01b6051d2f07ff41f
7f61448ad6da3ef0f9cb03f40c5be655
Based on https://gist.github.com/leimao/37ff6e990b3226c2c9670a2cd1e4a6f5
cases like (1)
0
0055b86eb3c695a3c54e35b20c8acfa4
31f2ed31956d97155b7d2efc8b562d4a
Compose the variables for create/edit pages
$values = array(); $post = $this->post; switch ($this->catalog_type) { case 'goods': $values['code'] = ''; $values['title'] = ''; $values['price'] = ''; $values['suppliers'] = $this->getSelectValues('suppliers'); break; case 'suppliers': case 'custom...
1
98cd97ab40911b4be48342aa80cb8cdc
a577d37a1c394c7e5d75930fce7f16cb
genera lista con link a locations per un file
class move_content{ private function make_content_file_list($from, $to){ if(preg_match('/\/$/s', $from)){ $from = $from.$this->directory_index_primary; } if(preg_match('/\/$/s', $to )){ $to = $to .$this->directory_index_primary; } $pathsFromTo = array(); $dirname = dirname($from); if( !is_dir($this->realp...
1
503f2bbae7819a3da141447fb326aeab
82a93428d514ec3bae982d12080c91a5
Set the colormap to use for images
class Visualizer(object): def set_cmap(self, cmap): if cmap is None: self._cmap = plt.cm.get_cmap('Blues')
1
f2192ee3506249da53e709138ec1df4b
7f61448ad6da3ef0f9cb03f40c5be655
avoid super long strings
cases like (1)
0
cec94374f92e3e5c948f27418d6a4029
dfca14d47b8392ca3c10257137814a7c
将其他格式转换为ust文件对象的函数
with open(filename,'rb') as f: file=f.read() if(b"Charset=UTF-8" in file): encoding="utf-8" else: encoding="shift-JIS" blocks=[] block=[] for line in file.split(b"\n"): line=line.strip(b"\r") try: linestr=str(line,encoding=encoding) exc...
1
1bb90b316d3798cc8b88f68b5da9c192
a067b650c6cc150930ef25147342ad21
Read KITTI 3D Object label as Pandas DataFrame
def read_obj_data1(LABEL_PATH, calib=None, im_shape=None): objects = [] detection_data = open(LABEL_PATH, 'r') detections = detection_data.readlines() for object_index in range(len(detections)): data_str = detections[object_index] data_list = data_str.split() if data_list[0] =='D...
0
412f73ad9a5706325a5271f5f39ec173
e0398516e5fb8af74596109e03d27218
Sets the minimum size of character content chunks that will be indexed.
void setMinMemoryMappedContentLength(int minMemoryMappedFileSize) { _minMemoryMappedContentLength = minMemoryMappedFileSize; }
0
94c88af09067f84f4919bf276a3104c5
d0b0ab58eb9cd7100f2f1dce9ea7d342
Test the shortProd function
class SeriesTestCase(unittest.TestCase): ######################################################## ### Test functions that take 1D arrays of type SHORT ### def testShortProd(self): self.assertEquals(Series.shortProd([1,2,3,4]), 24)
1
b28ea6de4bddd0d5494708cc52af588b
698394f3b3eab40c8ceb9ab38c2d4e53
Create debugging information entry for a C++ static data member.
@CInfo( fileName = "DebugInfo.c", include = { "<llvm-c/DebugInfo.h>", "llvm-java.h" } ) public final class DebugInfo extends LLVMLoader public static native @LLVMMetadataRef long LLVMDIBuilderCreateTypedef( @LLVMDIBuilderRef long Builder, @LLVMMetadata...
0
beb7e8822664825cf45c8d2020e30cb4
950e46d0e80e665aed19f1b09d833085
Positions eyes on leftward gaze depending on lesion site
function UpRight(){ var reye = document.getElementById("rpupil"); var leye = document.getElementById("lpupil"); var lesionlocus = document.getElementById("lesionlocus").value; Center(); if (lesionlocus=='rsuprect' || lesionlocus=='lcniiinuc') { document.getElementById("riris").cx.baseVal.value = 130; ...
1
cbec390c5b28a459f3e45cd44cdb25ac
b15c65cd4672e3d54bee3dcc88b84a66
拼接滚动截图文件
int h = 0; Bitmap bitmap = null; for (int i = 0; i < scrollView.getChildCount(); i++) h += scrollView.getChildAt(i).getHeight(); try { bitmap = Bitmap.createBitmap(scrollView.getChildAt(0).getWidth(), h, Bitmap.Config.RGB_565); }catch (...
1
01f53e3307fbec8b9115809edc69a814
4979c11303cfe5b08c17f42c478da7bb
Pass the loom op a flattened version of our input type because we don't want it to be unflattened when we call tf_concat.
in_shape = x.data.shape op_in_shape = self.op_func.operator.domain.shape op_out_shape = self.op_func.operator.range.shape extra_shape = in_shape[:-len(op_in_shape)] if in_shape[-len(op_in_shape):] != op_in_shape or not extra_shape: shp_str = str(op_in_shape).strip('()...
1
2def0813182a0f1988fc1d2490781046
5fdbdd1a3230258f799650c87676b865
called ONCE. Initializes the ADC module on the MSP432.
{ PM->APBCMASK.bit.ADC_ = 1; GCLK->CLKCTRL.reg = (GCLK_CLKCTRL_ID_ADC | GCLK_CLKCTRL_CLKEN | GCLK_CLKCTRL_GEN_GCLK0); ADC->CTRLA.bit.ENABLE = 1; while (ADC->STATUS.bit.SYNCBUSY); ADC->REFCTRL.bit.REFSEL = 0x2; while (ADC->STATUS.bit.SYNCBUSY); ADC->INPUTCTRL.bit.GAIN = 0x0; while (ADC->STATUS.bit.SYNCBUSY); ...
1
4850280925a95576efebb3dfb17f54bf
fde127b04a373e26e589d2fdcd624319
empty dictionary
class Parser: def p_expr_empty(self, p): p[0] = {}
1
97a383eff58e670c4516f898083e78ce
a8117cbea5d432ce3f4740cfeefb74d2
获得输入变量的最后一阶的形状描述
class Autotracer(object): def Xshape(self): return {l.name:l.shape[1:] for l in self.layer_in}
1
cb15753e38732cc06dab301b0f8bbd65
a646c2156dd4e7cb495649c85036ea4b
Returns which character literal styles are supported.
class LineMixIn(ItemMixInBase): def getSupportedLineStyles(cls): return cls._SUPPORTED_LINESTYLE
0
821b48d8b88930c41b813259bb7fb128
6c0bde5d4f885d5311273413c71e0c33
从缓存中读取邮箱验证码
Cache cache = CacheBuild.build(CacheBuild.CacheType.MAIL_VERIFICATION_CODE_TYPE); Map<String,Object> value = cache.getMapValue(mailPrefix+loginMail); return value; }
1
6d65852a5157c0723145d56aaf180d19
69b065a5e678c6c60d0fb2f2db1d4f05
查询店铺的基础设置,例如:Wi-Fi,纸巾,停车位,包厢等列表
@POST("store/getStoreDetail") Observable<RespStoreSetting> getStoreDetail(@Body RequestBody requestBody);
1
2ef0af1de04fc1700f7afab8bd61e41c
4f031e151ec684ddf28df90624d69a42
根据开始时间 结束时间计算除周末外的可请假天 排除周六周日和节假日 examples:输入(2010-06-25,5,''),得到2010-07-02
public class OPM_BL public static double GetLeaveQty(System.Nullable<DateTime> txtStartDate, System.Nullable<DateTime> txtEndDate, ASPxComboBox cmbStartDateFlag, ASPxComboBox cmbEndDateFlag) { double ret = 0; try { if (txtStartDate.Value == null) { ret...
0
609e3f46bf522e10a524b9f69b32ba49
2ce67335c38927ad0a025c4dc03df296
Gets or sets the list of PTR records in the RecordSet.
class DnsClient(Client): def list_ptr_records(self, request): return self._list_ptr_records_with_http_info(request)
1
af4961228a2dfb257a1c3d6228ae05e7
71a9bc0d6e8109e0e07e10d27996c1e8
#' Single-stage SNV effect size analysis (gets called by effect_size_SNV)
I = (X %*% tS) == l; ss = as.matrix(colSums(I)); se = as.matrix(t(t(e) %*% I)); sm = as.matrix(colMaxs(I * e%*%matrix(1,1,ncol(I)))); sc = score(ss, se, eAvg, alpha, nrow(X)); R = as.matrix(cbind(sc, se, sm, ss)); return (R) }
1
3ae71fc1fda2404d67d8b60d49c13e1d
1ad8162bb45ab9bb8f097c96d73767b4
@brief 添加专属用户
namespace Senparc.Weixin.MP.AdvancedAPIs [NcApiBind(NeuChar.PlatformType.WeChat_OfficialAccount,true)] public static class CustomServiceApi public static WxJsonResult AddCustom(string accessTokenOrAppId, string kfAccount, string nickName, string passWord, int timeOut = Config.TIME_OUT) { ret...
1
e79a2902ca95b47afa31707c5b9495d3
397d1f71de0c90dfd51b898ede7a6fbd
the value of inventory on a per item basis
namespace uk.ac.dundee.arpond.longRoadHome.Model public class ModelFacade public double GetValueOfInventory(GameState gs) { PCModel pcm = gs.GetPCM(); return pcm.GetInventoryValue(); }
0
584ed758268396ac55669dab77ef01fe
ccf0902040f679f2e8856dbfbea764e2
Прверяваме дали подадения масив е геометрична прогресия (до където сме го запълнили, разбира се)
namespace Task4_DeterminitingProgression class ChangeProgression public static bool ArithmeticProgression(int[] progression) { bool result = true; if (progression.Length > 2) { int step = progression[1] - progression[0]; for (int i = 2; i <...
0
b5431b50e3de0f8e8d7e8249cf127818
b0cad8aa51e6735679ca11e7afdfca78
Returns the total number of content saved as favorite.
int count = 0; for (FavoritesRsp.Favorite item : getData()) { if (item.isSelected) count++; } return count; }
1
2d9bf9772b94f533c2991083b6ff7579
6496161d31c5b361f7883ebeec6b44d7
function that can be called which talks to gpio expander and adjusts the screen brightness.
{ FILE *usr; char buf[20]; char buf2[50] = "/sys/class/leds/beaglebone:green:"; sprintf(buf,"%s",led); strcat(buf2,strcat(buf,"/brightness")); usr = fopen(buf2, "w"); if(usr == NULL) printf("USR Led failed to open\n"); fseek(usr,0,SEEK_SET); fprintf(usr,"%d",value); fflush(usr); fclose(usr); return 0; }
0
87f616999a8f99862eb5ae76bd39cb86
4a6bdbdbd3717477e357f22d64e16d1d
二分法求方程f(x)=0的近似解
{ double x2, x1 ; int num = 0 ; x1 = 0.5 ; while(1) { x2 = x1 - f(x1)/df(x1) ; if (fabs(x2-x1) <1e-12 ) break ; printf(" x1 : %f\t, x2 : %f\t, f(x1) : %f\t, f(x2) : %f\t, num : %d\n",x1,x2,f(x1),f(x2),num); x1 = x2 ; num++ ; } printf(" x2 : %f\t, x1 : %f\t, f(x2) : %f\t, f(x1) : %f\t, num : %d\n",x2,x...
0
64024c061c2ff8f23cdc4eb3bd8eaa6d
bf84412daa80ef466f001bef14239fa1
@desc : 修改所有扩展问题明细的idf/weight(使用多进程,未成功) @author Pings @date 2018/05/15
from apps.subway.models_keyword import Keyword update_list = [] for keyword_id, qscore in qscore_dict.items(): update_list.append(({'_id':keyword_id, 'adgroup_id': self.adgroup_id, 'shop_id': self.shop_id}, {'$set': {'qscore_dict': qscore}})) updated_num = Keyword.bulk_update...
0
53b4d7729faec85a524755b0e1b22901
fd0fdbf94eb483e398c968aa3ff3beac
Si la fenêtre de log est instanciée, nous lui renvoyons directement tous les messages sans filtrage
{ if (request()->ajax()) { return $builder->ajax(); } $table = $builder->html(); return view('app::log.index') ->nest('table', 'dashboard::datatables.html-table', compact('table')) ->withLogs($this->repository->get()->loa...
0
c2d32189364fef9eb89ce8cd5b07c062
d939bd61600b3c9547c8336ebfddba99
Gets the task_id of this TimeEntry. # noqa: E501 Identifier of the task that time entry is logged against. # noqa: E501
class ExternalTaskQueryDto(object): def external_task_id(self, external_task_id): self._external_task_id = external_task_id
0
78ed285281e833fd6df0f4db304f6e05
787653c0acd7b191b10e169dabf40917
Set up the built object to a replace a regular expression.
{ if ($this->regex === $regex) { return $this; } $instance = clone $this; $instance->regex = $regex; return $instance; }
1
a9d4533585eee02ddf0ffa582b3b0304
66ff2e9529461f0fb57a77824c42e60f
摘要: Specifies the time in milliseconds that the system should allow for responses before concluding that the socket is unhealthy (defaults to SyncTimeout)
public class LoadBalancerPoolHealthMonitorPatch extends GenericModel public Long timeout() { return timeout; }
1
800317fc10ef005c165b2e97a2c033ac
17f8744b9f98313e9337bdb6a6c12546
расчет дисперсии относительно среднего, остаточной дисперсии
namespace NthDimension.Rendering.Utilities public class BitmapUtils public static double GetDispersion(Bitmap bmp, RGB channel) { double d = 0; double e = GetMeanValue(bmp, channel); for (int i = 0; i < bmp.Width; i++) { for (int j = 0; j < bmp...
1
82c31d224679cd8f5d95fe8903e6077d
3283105fefec897726e3cdfd1da05e44
Проверка правильности заполнения заголовоков и ключевых фраз перед сохранением
class Content extends ContentBase private function isValid($post) { if (is_array($post) && count($post) > 0) { $isValid = true; foreach ($post as $name => $val) { switch (trim($name)) { case 'title' : if (strlen($post['title']) < 1) { \helpers\Msg::error('no_title'); $isValid = fals...
1
6b3567b120c0cfa0b57b52bced09f48d
7db9bc98d6a3bafe9088dd361a018902
Search for a server that has the capacity to hold a user.
for (int k = 0; k < N; k++) { if (isDouble == 1 && server[k].cores >= cores && server[k].memories >= memories) { currentServers.push_back(server[k]); currentServers.back().a_memories -= memories / 2; currentServers.back().b_memories -= memories / 2; currentServers.back().a_cores -= cores / 2; currentS...
1
aa9ed2ba95cef0a97d00d56c189b9c7d
14926badbd0c06fa502b038172807950
カスタムテンプレートファイルの文字コードを設定する。
public class GenerateNamesCommand extends AbstractCommand public void setTemplateFileEncoding(String templateFileEncoding) { this.templateFileEncoding = templateFileEncoding; }
1
b091bcfb5aaa88e5002bc7a54fc4ce3f
76c1545963f042bff91eecb02f669004
Returns the gradient of a DLine
Vector2D gradient; float obsDst = voronoi.getDistance(xi.getX(), xi.getY()); int x = (int)xi.getX(); int y = (int)xi.getY(); if (x < width && x >= 0 && y < height && y >= 0) { Vector2D obsVct(xi.getX() - voronoi.data[(int)xi.getX()][(int)xi.getY()].obstX, xi.getY() - voronoi.data[(int)...
0
a8dd31d1dd49d80dc54c886e65131f6c
3b268269e187be32806a982c436d8f5a
convert CsrGroupFunctionObjectKeyFilter to a Map.
@NonNull Map<String, String> toMap();
1
c1fa1b748555a30d3b967b07d40bc77e
c13e815039709ef764189b35c7c27392
搜索棋子在图片中的位置,并计算出棋子最底部中点的X坐标
wight, hight = image.size scan_y_start = 0 piece_y_max = 0 img = image.load() for i in range(hight // 3, hight * 2 // 3): first_pixel = img[0, i] for j in range(1, wight): pixel = img[j, i] if first_pixel[:-1] != pixel[:-1]: scan_y_start = i ...
1
34511c4b6d0a0d9c4615e7c6a5353071
44b54d46bc9e7d68c7689bdac3a92216
Adds a required context type.
class Metadata: def _register_context_type_if_not_exist( self, context_type_name: str, properties: Dict[str, 'metadata_store_pb2.PropertyType']) -> int: context_type = metadata_store_pb2.ContextType(name=context_type_name) for k, t in properties.items(): context_type.properties[k] = t cont...
1
48a8c5c95ead49eb7040c24949770066
fbc7c9dd8bfd4530ebd572ebab4a3e28
Resets specific heuristic
namespace CPF_experiment class CbsHeuristic : HeuristicCalculator public void ClearStatistics() { this.totalImprovement = 0; this.totalRuntime = 0; this.nodesSolved = 0; this.nCalls = 0; }
1