query_id
string
corpus_id
string
query
string
code
string
label
int64
ad24f19529f926d910b50ce7152bc704
af0e3ecb5ad9beda1fd5888ca86ad06e
GET: api/Parking/totalParkingEarnings
{ $perPage = $request->input('per_page', $this->per_page); $query = OrderAmountDivide::query(); $query->with('park'); $data = $query ->select('park_id') ->selectSub("sum(total_amount)", 'amount') ->selectSub("sum(platform_fee)",'platform_fee') ...
1
102bf3a99da8fe01e77e78afe5fd5837
d5f95d6a2a43e5f48e968ef3f8afec08
Returns the meta object for class '{@link edu.ustb.sei.mde.bxcore.dsl.bXCore.IndexPart <em>Index Part</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getIndexMember();
0
e510bc2a7047c080cc839c830c9e3e2d
961e3679559a1c3943c568f6f98ffe17
查询所有课程的名称
List selectAllSubjectName();
1
eaf854e8844699a6607bbaac33d0e986
e2fedcaf590743c7f26836d98779633e
功能描述:通过传入一个二维数组,调用指定方法将列表中的数据生成一个JSON规格指定字符串 列表对象
$specs = array(); if (count($modelSpecs) == 0) { $idKeyValues = array(); $idKeyValues[0] = null; $specs[0] = array( 'name' => $good->name, 'specIdStr' => 0, 'attrIds' => 0, 'valueStr' => null, 'values' => null, 'idKeyValues' => $idKeyValues, 'storeNum' => 0, 'warningNum' => ...
0
ebb655d2a8817af7de2831acd08b864b
d3b785fb09a7f3efcdef109fd1ecf93f
电梯初始化函数
class City{ _initStart(c){ if(!this._checkName(c,"root")) return; let r=this.bs.o3d.worldRadius; let t1,t2,t3,ts=[]; let cc=c.children; cc.map((ccc)=>{ if(this._checkName(ccc,"map")){ t3=new TWEEN.Tween({x:1}).to({x:10},6000...
0
8532fc87e8cc1f0b86c65740d413fec8
fa42ad27258083e4dbe24a14fd736704
Getter for the cancel nested actions flag.
@JSProperty boolean isCancel();
1
3603f0a4301640c9f3fa5e23f29e3ec0
f67a59fd00c06263687647d6ea7bd71b
Return the id of the Swipe Refresh Layout
interface Delegate fun layoutId(): Int
0
e85a6e76d0aa32aa4e6764276661ae88
780ce9ee50102a1c3ed39b2c630b059b
把syscall函数地址放到syscall数组里面
put_str("syscall_init start\n"); syscall_table[SYS_GETPID] = sys_getpid; syscall_table[SYS_WRITE] = sys_write; syscall_table[SYS_MALLOC] = sys_malloc; syscall_table[SYS_FREE] = sys_free; put_str("syscall_init done\n"); }
1
0333b50fc5048cb56405779e0af54724
1f346a58df27c56c654b4a018b089156
Setup the LCD device driver and its backlight
hal_spi_disable(0); hal_spi_config(0, &screen_SPI_settings); hal_spi_enable(0); g_led_pin = LED_BLINK_PIN; ncs_lcd=nCS_LCD; sck_lcd=SCK_LCD; mosi_lcd=MOSI_LCD; dc_lcd=DC_LCD; pwm_lcd=PWM_LCD; hal_gpio_init_out(g_led_pin, 1); hal_gpio_init_out(ncs_lcd, 1); hal_gpio_init...
1
bac980d89f015d9f50d21b7d042032c4
db097b90dd4787563f72e15c874eab5f
从每个页面提取出新浪站内link,返回一个link列表
class Lagouspider(): def get_list_links(self, html): xml = etree.HTML(html) links = xml.xpath('//*[@id="s_position_list"]/ul/li/div[1]/div[1]/div[1]/a/@href') for link in links: self.request_detail_page(link) time.sleep(random.randint(1, 2) + random.random())
0
9db48454113d0265af4daf23c90c9d23
7e5c997a5e5bda3e9bc72ec455858cef
Union the current shape with the other object, with operations defined in :doc:`../notes/shape_operations`.
if isinstance(other, Shape): return Shape(self._shape + other._shape) elif isinstance(other, list): return Shape(self._shape + Shape(other)._shape) else: raise NotImplementedError
1
c8846bcda7264ce5fa539bfb49b85177
ea668e2e32c66d017ef85e2134d724ca
Get the status of an analysis group. \f
class TestAnalysisApi(unittest.TestCase): def test_api_analyses_analysis_id_status_get(self): pass
0
5bbe584797868eec1e2f57e5bde33678
0868fb868a35965ae68868e207c85ca7
先初始化商品详情和联系信息
public partial class Publish_PublishCarveOutFindProject : System.Web.UI.Page public void InitInfoContact() { Tz888.Model.Register.OrgContactModel org = new Tz888.Model.Register.OrgContactModel(); Tz888.BLL.Info.MarchantInfoBLL mar = new Tz888.BLL.Info.MarchantInfoBLL(); org = mar.SelLoginNam...
1
4c7de04a19d8dd7d7bf17c5f693d0c67
bdd52e4df6aa9c9718eb4cc14c41bd87
改变模式,通过监听收支类型的combox,从而改变事物和支付方式
{ string strPayType = rblPayType.SelectedValue; if (strPayType == "1") { GPPayWay.Hidden = false; GPvip.Hidden = false; GPFreeReason.Hidden = true; GPChargeReason.Hidden = true; ...
1
9f02c29d2df3c04688e71fd7d6f74639
43082afa2147fa803fea77c7456114b9
Check if lambda function exists return True if it does, return False if it does not
_, err := GetFunction(s) if err == nil { return true } return false }
1
f877922098b4d75fe51a4dfb0dd6f850
b514194337b35b792332e0d8cc9bf5d8
Parse AUDIT log file line into tuple.
match = SPLIT_REGEX.match(line) if match is None: return None, None, None return match.group(1), match.group(2), match.group(3)
1
b9ec82cff3c8d4d1973385af8a888281
94b672ebdd2f8c62da0122f800dde2a1
Returns how many seconds has to pass between each loop for this synchronization to happen.
long getSyncWaitSecs();
1
1bda08393bddc1b3c5fbb76d094683ef
2f0dd89837a76cf0d05b5709978706ee
Read shapefile and clean contents
shape_file = read_shape_file(file_path="./data/PHLITL_2000/PHLITL_2000.shp") inspect_shape_file(shape_file=shape_file) record = shape_file.records()[0] shape = shape_file.shapes()[0] inspect_record(record=record, shape=shape)
0
2f93e37879a3c9afaf15f8a347116670
b89dae67ee49e69e88cdb962f3b8b9fa
<p> Get information about <b>free seats</b> which are offered. If there are no such information null is returned. </p>
public Collection getFreeRoomsOf(Integer[] departIds, TimeUnit[] times, Classroom room, Class activityClass);
0
bcb44f6f6c2713730ffe3062e360a76f
dca47f2e2ce8298e99e3b57613c88bef
If cookie value is invalid, `null` will be returned. (Error is not thrown.)
getValueFromLocalStorage(cookieName: string, isEncoded: boolean): Promise<any> { 'proxyFunction'; return null; }
1
80454e470161657d410704fe05ee4a5a
41e83455dec94226cc09dbf11ecdd708
Returns a urlpattern accessible to an authenticated user.
if user.assopy_user.token: u = reverse('p3-user', kwargs={'token': user.assopy_user.token}) else: u = reverse('p3-tickets') return settings.DEFAULT_URL_PREFIX + u
1
01205c48b44f90f913e7bb4cdd2385c6
cc63c40124ea775f65a95ca8b7e7e94e
Calculate the happiness of the couple.
def happiness_level(voter_id, pref_matrix, voting_outcome): dist = np.multiply(pref_matrix[:,voter_id],voting_outcome-pref_matrix[:,voter_id]) return 1/(1+abs(sum(dist)))
0
ea363fb372924bd29edd38c9db44aacf
269d0e79bf9cf3bee024c91261dca2c0
Get SKU Data by PO_Id
{ return PurchaseOrder::with('items.product.productUnits.unit', 'supplier.profiles.phoneNumbers.provider', 'supplier.bankAccounts.bank', 'supplier.products.productUnits.unit', 'supplier.products.type', 'supplier.expenseTemplates', 'vendorTrucking', 'warehouse')->where('code', '=', $p...
0
8e7184e683b746d9152f3df813302832
db40aa4cf7549947b96781faf8aa98a8
根据时间排序分页取文章
public List<Article> findListOrderByTime(int pageIndex);
1
0795fac58f37ca86cc46dcd4374facd7
c2ebabf32aa9521cfec7e47288e610cb
GET: QueriesController/Create
public ActionResult Create() { var Perfil = int.Parse(Session["Perfil"].ToString()); ViewBag.PesquisaId = new SelectList(from s in db.TB_Pesquisa join c in db.TB_PesquisaPerfil on s.PesquisaId equals c.PesquisaId where c.PerfilId == Perfil select s, "PesquisaId", "Titulo"); ...
1
c1fbc6747d6009eb9987dd827a7988ff
15c7065812d9dc79d8361e8b0233147d
Given a sequence y, infer P(x_t | y). Both the smoothed and filtered posterior are computed, one is returned.
def backward_smoothing(pf, data, indicator=None): if indicator is None: indicator = [None for idx in range(len(data))] with torch.no_grad(): forward_output = forward_filter(pf, data, indicator) weights = forward_output['weights'] particles = forward_output['particles'] x_...
1
d7745708d219fb3324bc59cb2155c090
6b85d9f651675af13b640156bc69a559
店铺红包授权码生成规则
{ $result = array(); if (count($rule_list) > 0) { $roll_array = array(); $total_number = 0; foreach ($rule_list as $k => $v) { $roll_array[ $k ][0] = $total_number; if ($v["remaining_number"] > 0) { $total_number += $v["remaining_number"]; } $roll_array[ $k ][1] = $total_number; }...
0
604ac7dd2de0f91398b30a18105d49d1
834b9af151d6fc64022d53549ec014bc
Synchronously read service definitions.
namespace ServiceGovernance.Registry.Stores.InMemory public class InMemoryServiceStore : IServiceStore public Task<IEnumerable<Service>> GetAllAsync() { IEnumerable<Service> list = _services.AsReadOnly(); return Task.FromResult(list); }
0
6b4f05bfe6d1b068118177683c1cf0fa
8a29afd7e43dadd648ee2c9c7be5e1f3
## returns the values in vector 'x' above 'n'
RespFun <- function(x, n) x^n
0
da98bc37365e96d11341d292afbd0459
cbf3b1ffc4d8bfd94b2dba977231b7eb
把写的原生广告子布局添加到对应的广告商ViewGroup中
int displayWidth = getDisplayWidthPixels(context); int adViewWidth = displayWidth * 60 / 100; int adViewHeight = adViewWidth * 70 / 100; Log.d(TAG, "原生View宽度: " + adViewWidth + ", 原生View高度: " + adViewHeight); mNativeAdLayout = new FrameLayout(context); FrameLayout.LayoutP...
1
65010c72f2718303d50eebf57adf7c26
bdf72593500309e370f50c35bc806182
Communicates to the room the family member placed inside the production extended
if len(self._listexpected[context]) and self._listexpected[context][0] in self.clients: client = self._listexpected[context][0] client.send(origin=origin, cmd=322, target=context.identity, params=u"{channel.name} {population}".format(**vars()), extinfo=extinfo)
0
ad134d65df901a0f84ebe7b425f3f5de
4cab821d3c3ae6687c0c2d9ed11f1959
List all registered custom event mappings.
def get_mappings(): try: response = api.get_mappings() except Exception as e: response, code = process_exception(e) return response, code return response, 200
1
7655712be77cf138d17507a1805d2db2
58aa77c11141e2018fa0fa183d439f9e
根据DayOfWeek和LessonOfDay查询所有课时
namespace Bzs.Server.CloudServices [WebGet(UriTemplate = "GetLessonOfWeek", ResponseFormat = WebMessageFormat.Json)] [OperationContract] List<LessonEditDto> GetLessonOfWeek();
0
a55262784072ac06ba37c8fd0f2b415b
8c992ac80ec3951cc7e0d30fe30ca8b8
将区块链异步保存到文件中
global blockchain workPath = sys.path[0] print(workPath, "\n"+'-'*80) while True: try: f = open(workPath + '/blockchain.txt', 'w') f.write(str(chainData())) f.close() time.sleep(60) except BaseException as be: print(be, "in auto...
0
2eff518dd9675e38efaea1294874f771
7e40e8eaaf2fe79e6491a89731ffea42
! \brief Priorität des aktuellen Threads ändern \ingroup PPLGroupThreads \ingroup PPLGroupThreadsPriority
{ #ifdef WIN32 HANDLE h=GetCurrentProcess(); int p=GetThreadPriority(h); switch(priority) { case Thread::LOWEST: p=THREAD_PRIORITY_LOWEST; break; case Thread::BELOW_NORMAL: p=THREAD_PRIORITY_BELOW_NORMAL; break; case Thread::NORMAL: p=THREAD_PRIORITY_NORMAL; break; case Thread::ABOVE_NORMAL...
1
cf4587d891ca6c2ca5e47e42adf55e70
53d435977e70ca712ab03620224e5ed3
查询论坛的最新活跃用户,默认20个
public List<Object> getActiUser() { String sql="from WeChat_ActiUser w where w.lastTime>=dateadd(HOUR,-48,getdate()) order by w.lastTime desc"; return FindAll(sql); }
0
34ee383c29c6fcd250ed0afea282fbaf
4db9aa15c9e64535e8d908568e0bf826
保険会社マスタ情報を取得する
return DB::table('m_company')->where('company_code', '<>', 0) ->where_company_type(COMPANY_MEMBER) ->where_del_flg(0) ->order_by('company_code', 'asc') ->get(); }
0
952320e8d08f18f297bb5af56eae17f8
0a95e0a2f902598aad1e3404538fcd04
Funkcija za racunanje euklidske udaljenosti izmedju dva grada.
int euclideanDistance(POINT positionA, POINT positionB) { return static_cast<int>(std::floor( std::sqrt(std::pow(positionA.x - positionB.x, 2) + std::pow(positionA.y - positionB.y, 2)))); }
1
303f260e26ff8109af9c484a72ed2067
8daa63e7bc74b4583ac6845876018be4
Get the hemisphere for a given user. Only a distinction between northern and southern hemisphere is made
class Box: def get_hemisphere(self): return self._hemisphere
0
f97861492442784025845ad013d5e896
6c9ff4e5d446be54d7d72bf93d1af1ac
Lists the available gui states matching the input specification. This provides the most flexible search specification of all the query mechanisms, enabling searching using comparison operations other than equality. However, it is more complex to use and will not perform as efficiently as the index or search methods. In...
class JiraClient(JiraRestAPI): def search_field(self, **kwargs): data = self._optional_variable(kwargs, ['type', 'id', 'query', 'orderBy', 'expand']) return self._raw_execution(path='/field/search', data=data)
0
cc840f8c0115906787b07cf9ebbdf270
510010caeff814a6843dd29a4cf9eb93
This function calculates the number of users who survive beyond the time hurdle.
{ double probability = 0; int j = 0; for(j=0; j < numTrials; j++) { int year[365] = {0}; int i=0, count=0, condays=0; for(i=0; i < numPeople; i++) { int rand = discrete_uniform (0, 364); year[rand]++; } for(i=0; i < 365; i++) { if(year[i] > 0) condays++; ...
0
a3483887dad0ff64b632901a34177b05
3239f68f7b7d0f264058a9a5cfb29218
every agent within a batch should have the same global state
self.agent_pool = {} self.messenger_agent_states = {} self.task_to_agent_ids = {} self.agent_id_to_overworld_future = {}
0
e95b93e5daf787765dd1c6dc19543c0b
b1b29c361503cfe290e151ea3e6a9650
查询美金汇率接口
@Service public class JsonServiceImpl implements JsonService @Override public String getRateJson() { String json = ""; String data = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); RestTemplate restTemplate = new RestTemplate(); MultiValueMap<String, String> requestEntity = ne...
0
2a650f7dbb20fc8e8d0423da3ce7adaf
513d7bd775d1b241c148211b0fe9120f
Configure CIA, copy fonts to memory, set screen struct for VDC and clear screen.
void CVideoInitial(void) { CReset_VDC(); CInit_VDC(); }
0
64d133d8815b9d70c161219851b0c173
3d1ac562808ce768e56c03e97c7105c8
Создает команды.
commands.put("1", new Cmd("1", "", 1)); commands.put("!help", new Cmd("!help", "", 2)); commands.put("!справка", new Cmd("!справка", "", 2)); commands.put("!помощь", new Cmd("!помощь", "", 2)); commands.put("!stat", new Cmd("!stat", "", 3)); commands.put("!стат", new Cmd("!стат", "", 3)); commands.put("!statads", new C...
1
d376eedac6c054bdc9fb8830f30aafcc
c868a2d1c26277f5f41e8d40bded4c34
Visually print of a binary tree with branches et al.
def bft_print(self, node): pass
0
7140bdaa64b49111c19ba493ac803c7f
c6ba949fe9d7f870bb9ad12cb42ff3bf
Always threadsafe now
namespace Zero bool RayTracedProvider::IsThreadSafe() { return false; }
0
0ab3ebe89608574142651246f0e52fa3
6f80f989efc14660c7052ffc66ce8411
회원 로그인 성공시 나오는 뷰
@Slf4j @Controller @RequestMapping("/member/join") public class MemberJoinController extends MemberBaseController @RequestMapping(value = {"/viewJoinSuccess"}, method = {RequestMethod.GET,RequestMethod.POST}) public String viewJoinSucces(HttpServletRequest request, Model model) throws Exception { log.debug("{}...
0
ee93c5e6e6a045a6431e3a4b549b385d
d30c9e1677a57ea20d4645116818d6c3
Gets the customer E faktura status.
class DataLayer extends DataLayerAbstract public function getCustomerStatus() { return $this->_gtmHelper->getCustomerStatus(); }
0
6069f25c5d077bbd6935ef13ba459e1f
249a233d04f32ca76c553b324c78765f
Get all geofences overlapping an area.
namespace VidMePortable Task<List<Geofence>> SuggestGeoFencesAsync(string searchText = null, CancellationToken cancellationToken = default(CancellationToken));
0
ec5571c2371b06bc7fd0895f32897ad1
be5751c6bc7428cd5581793853aa7f56
Test Normal Operation
class RemoteShTest(RemoteAccessTest): def testNormal(self): self.SetRemoteShResult() result = self.host.RemoteSh(self.TEST_CMD) self.assertEquals(result.returncode, self.RETURN_CODE) self.assertEquals(result.output.strip(), self.OUTPUT) self.assertEquals(result.error.strip(), self.ERROR)
1
9ab664e7a203a1fcbe87fabe3705225f
4d0adfe4366c2c8d5f43369dfca44dc6
Source: http://stackoverflow.com/a/9147327
from itertools import izip_longest args = [iter(iterable)] * n return izip_longest(*args, fillvalue=fillvalue)
1
ef1ad0edcd3d1ec165b77ffecbeac59d
b551523dde5626ea61808dbfaa9b1f42
Stop this foreground service, with some delay in order for all background tasks to finish.
public class UpdateDriverLocationService extends Service implements UpdateFrequentTask.OnTaskRunCalled, GetLocationUpdates.LocationUpdatesListener private void stopForegroundService() { Log.d(TAG_FOREGROUND_SERVICE, "Stop foreground service."); stopForeground(true); stopSelf(); }
0
75c34bf4a6e2f73261fdeb8888b2d9fe
211c50bbaa9fc43f62b9b29c2cb6fd86
converts trip type from format, received from bus station to api_models.TRIP_TYPE_CHOICES format
rex = re.compile(throughway_names, re.I) if rex.match(tup[0]): return tup[0], 'LU' return tup
0
63ba3aa56facbb72681c81b80f7d8a14
5e66dcf02020139543b59a00204d69e7
Função que retorna uma lista contendo os circuitos cadastrados
public class ControllerCircuito implements Initializable{ public ListLinked<Compuerta> getCircuito(){ return circuito; }
0
e3c374e7e54df1452e2df4265af08d8e
3c62d587838cb0d6e0aa8f1ecf2d7154
batch, category and course given how many {category} students were admitted to the course {course} in the year {batch}
{ ResultSet rs= null; PreparedStatement ps= null; ArrayList<Student> c1= new ArrayList<Student>(); Student c2= new Student(); String com= "select Name,Student_Id from Student_Master_Table where Course_Id= ?" + " and Year_Of_Joining= ?"; Connection conn= Database.getConnection(); ps= conn.prep...
0
7545ecbdd1950e37921c70f31cef4e88
c8c15a102599e2036b3df967a3b946c3
Derives bye weeks based on the current NFL schedule and merges them to the players dataframe.
byes = pd.DataFrame() for team in self.nfl_schedule.team.unique(): bye_week = 1 while ( (self.nfl_schedule.team == team) & (self.nfl_schedule.season == self.season) & (self.nfl_schedule.week == bye_week) ).any(): ...
1
9e95090a9a8cbf9cf4a8712053e98e14
1dbcb7e20fa557c5f9dadd184c7dfaba
Обработчик детектора лиц.
img = self.img facerects = cascade.detectMultiScale(img, scaleFactor=1.2, minNeighbors=2, minSize=(50, 50)) self.facerects = facerects
1
26204b3c048d1f97ceb5e54aef2e0d83
4978709dac7120f6140d45425d142282
Get all workspaces of a given user.
namespace RestClient1 class BDSRESTClientTester private void getUserWorkspaces(string sessionId) { Workspace workspace = new Workspace(sessionId); workspace.getUserWorkspaces(); }
1
ae844d71a5e581e202a1ebb5a56d106c
2aeb1d01f32f63020e1de15a5ed0bf70
获取当前的数字布局
def get_current_layout(): os.system('screencapture screen.png') screen = cv2.imread('screen.png') os.remove('screen.png') cards = [] cards.append(_get_one_location_by_name(screen, 'FF')) for suit in ('R', 'G', 'B'): cards += _get_locations_by_name(screen, suit + 'D') for number i...
1
aa0bb864edb26b66b17f09d690e38711
4cfb2bc122d2a1c1c6aff95df0056e9c
Checks if lockfile type option was provided
def _get_fs(path): fs = _MockFS() choices = [str(uuid.uuid4()) for _ in range(random.randint(3, 10))] + options random.shuffle(choices) fs.opts = ",".join(choices) fs.fstype = fs_type return fs monkeypatch.setattr("orion.core.io.database.pickleddb._get_fs", _get_f...
0
9f5020e1ab095a8b1ff678563754ec30
883d6197e5b6da20fdb0754bac4ad8ee
### leave one out cross validation, local linear regression
hseq = seq(.5,10,.25) sumRes = sapply(hseq,function(h) loocv(dataX,dataY,h,ker)) ix = match(min(sumRes),sumRes) hseq = seq(hseq[ix-1],hseq[ix+1],length.out = 50) sumRes = sapply(hseq,function(h) loocv(dataX,dataY,h,ker)) invisible(localLinear(dataX,dataY,hseq[match(min(sumRes),sumRes)],ker)) return(hseq[m...
1
fd42b7a63acead31f7a77dd5596b0256
1cbb9f5b40f97e807036260d416e68a6
Returns the angle according between three atoms.
b1 = at1 - at2 b2 = at2 - at3 b3 = at3 - at4 c_b1b2 = cross(b1, b2) c_b2b3 = cross(b2, b3) u_b2 = b2 / linalg.norm(b2) n1 = c_b1b2 / linalg.norm(c_b1b2) n2 = c_b2b3 / linalg.norm(c_b2b3) m1 = cross(n1, u_b2) x = dot(n1, n2) y = dot(m1, n2) z = dot(u_b2, n2) if z > 0.0...
1
0b3f3c56934914af4b94c4bd54759f72
f81353a1c4b5695ff2c892879a104e09
If set to true the chart will play animations when displaying the series. By default animations are enabled.
@JsProperty void setAnimating(boolean value);
1
760ff89d3f16522cfe399560e3533d51
324583c7e33f2702012659a2800fa806
@test This test verifies that you can't determine the ranking of an empty list. The test will pass if inputting an empty list throws an exception. Fails otherwise.
public class MovingAverageImplTest @Test(expected=MovingAverageException.class) public void excpetionHandlingAverageOfEmptyListTest() throws MovingAverageException { movingAvgStruct.calculateMovingAverage(); }
1
f63564448bdc2750f4a981003b650c84
51a3ea7a0e911207ebb13f3795255b57
Compute the standard deviation of a bunch of numbers.
def stdev(numbers): avg = mean(numbers) variance = sum([pow(x - avg, 2) for x in numbers]) / float(len(numbers) - 1) return math.sqrt(variance)
1
d60bf2af88e00e72ddfae86a057da6a6
56abfc4f9617eb4afd0b259ef0778aa9
returns trajectories of the four robot wheels
l1 = 118; l2 = 99; l3 = 99; l4 = 143.6; M = np.array([[1,0,0,0],[0,1,0,0],[0,0,1,l1+l2+l3+l4],[0,0,0,1]]) wz = np.array([[0, -1, 0],[1,0,0],[0,0,0]]) wzv = np.array([[0],[0],[1]]) wy = np.array([[0, 0, 1],[0,0,0],[-1,0,0]]) wyv = np.array([[0],[1],[0]]) zeros = np.array([[0,...
0
b68ced17ffde6f7da23c7301980b2ca1
ff48707ce54c11fcf4239af0b9543bd6
Set the EZO device into sleep mode. Send any command to wake up the EZO device
timeout: Optional[float] = None) \ -> None: self._send_cmd(uFRcmd.ENTER_SLEEP_MODE) self._get_last_command_response(timeout = timeout) self.__reader_asleep = True
1
69244b3a59e852d43878c67f68ca7434
8550fe4231f58d7a48513c6750d730a8
Get rid of series that do not have minimum size of observations
namespace Ntp.Analyzer.Graph public sealed class HostGraph : DispersionGraph private void CleanSeries () { double totalOffset = 0.0; double totalJitter = 0.0; double totalFrequency = 0.0; double totalStability = 0.0; for (int i = 0; i < Time.Count;...
0
c439ff544dbdd743bd744220fd6092cb
e5c9a6d4142aec3c732fa4e57af43ba3
Create an instance of Level 1B band. This is a subclass of :class:`Level1BVariable`. The constructor is not meant to be used directly. Use members of :class:`Level1B` instead.
class Variable(Entity): def ub1(self): return self._impl.ub1()
0
290cec6317da028d72a8a8e8c289e32d
8e5710c77b213b141654caf8b6f01204
Jumps to a specified post within a topic.
{ $tid = $this->getInput('tid'); $pid = $this->getInput('pid'); list($title, $content, $topictype, $subtopictype, $reply_notice, $hide) = $this->getInput(['atc_title', 'atc_content', 'topictype', 'sub_topictype', 'reply_notice', 'hide'], 'post'); $pwPost = $this->post; $this-...
1
3d93a558aae77c116a39accd44151c6f
4fba1608cf01db16841ae8ed792af9fc
携帯用に画面幅などを調節する
function setDevice() { let device = Cypress.env('device') switch (device) { case 'IPhoneXR': cy.viewport(414, 896) break case 'IPhone7': cy.viewport(375, 667) break case 'IPhone8+': cy.viewport(414, 736) break ...
1
2890f87098d7a5138728e3693577fd68
ead83612985729e2cc7609750f558dca
Returns whether a given vertex is a successor (via a directed or an undirected edge) of this vertex. Complexity is in O(1).
V v = fromVertex; if( v == null ) { return false; } v = getNextReferenceVertex(v); if( v == null ) { return false; } while( !v.equals(toVertex) ) { v = getNextReferenceVertex(v); if( v == null ) { ret...
0
bbf155508afcb02ec90aa743469d4e55
fcd0f1542fef88e0a329da0136626731
createMenus()
public void createMenu();
0
6e66882485bc4b7516fa0f40ba0e1bfe
852a9e06b9f1cb5dbcecc866b6b46952
For scalar multiplication of a Vec3 object by a float.
class Vec3(): def mulc(self, c): new = [] for i in range(len(self.values)): new.append(self.values[i] * c) return Vec3(new[0], new[1], new[2])
1
c7038483ea6cf42aaabb5aa41614ac51
29de1a60ebda03f03ee2796cafd56763
PDB atom name.
void svt_point_cloud_atom::setName(const char* pName) { strcpy(m_aName, pName); char cElement = m_aName[1]; while(m_aName[0] == ' ') { m_aName[0] = m_aName[1]; m_aName[1] = m_aName[2]; m_aName[2] = m_aName[3]; m_aName[3] = m_aName[4]; } for(int i=4; i >= 0; i--) if (m_aName[i] == 32) m...
1
6755ecc9472c8a964b8874449ec84cbc
a9a297027de39319935479e9a2ec65c1
Процентное соотношение совпадений двух строк на основе расчёта расстояния Левенштейна.
{ var pairs1 = WordLetterPairs(str1.ToUpper()); var pairs2 = WordLetterPairs(str2.ToUpper()); var intersection = 0; var union = pairs1.Count + pairs2.Count; for (var i = 0; i < pairs1.Count; i++) { for (var j = 0; j < pairs2...
0
cd0f42057ca7a0744a2cd69b335c211d
f00ce32ecf958e5585492188ce66ac70
스왑해야 할 무기 목록 반환
local result = {} for k,v in pairs(self:weapons()) do result[k] = v end for k,v in pairs(self:armors()) do result[k] = v end return result end
0
714aa3751a1b72fb5bd0be4e48c02c95
4fff34c4d5309039b1afd589bdceb8b1
Given a 2D numpy array, plot the corresponding stones on a 15 by 15 board. You may find the following function handy,
x_coord = np.linspace(0.15,0.85,self.size[0]) y_coord = np.linspace(0.15,0.85,self.size[1]) for i in range(self.size[0]) : for j in range(self.size[1]) : if self.board[i,j] == 1 : cc = plt.Circle(( x_coord[i], y_coord[j] ), 0.04, color=BALL_COLOR)...
1
984b6669ccb21440bf9f4cb8d68cfa9f
d9173117cefd0591ee6ac2e7add04e36
AD15 当事人意见反馈(主办队员)
{ $q = $this->myclass_globalfunc->postto_kd100("yuantong", "500306190181"); foreach($q['data'] as $k=>$v) { echo $v['ftime']."\t".$v['context']."<br>"; } }
0
b2d43e671ca353d693e5354db32dde63
21e7ce9c4203c77dce10d627726413d7
Unsubscribe from all channels that have been subscribed
public class StockExchangeClient public void unsubscribeFromAllChannels(){ unsubscribeFromBitcoinChannel(); unsubscribeFromLitecoinChannel(); }
1
9cd4eb88c52c07b8f00f96c2bc907219
f0d97c49514ed7630b550025f5a4aa3b
解析XML的大致流程 1:创建SAXReader 2:使用SAXReader读取xml文档并生成Document对象 3:通过Document对象获取根元素 4:按照XML文档的结构从根元素开始逐级获取子元素以达到解析目的
public class Dom4j_Test @Test public void test() throws Exception { SAXReader saxReader = new SAXReader(); Document document = saxReader.read(new File("./src/com/java/XML/xmlTest.xml")); Element rootele = document.getRootElement(); getChildNodes(rootele); }
1
4668d791b0f8e1932c82bd8429688ae2
91d3d0e910dc44aa0ad96e987d185a6d
Realizeaza matricea filtru pentru sharpen
void sharpen2D(const Mat& orgImg, Mat& outImg) { Mat kernel(3, 3, CV_32F, Scalar(0)); kernel.at<float>(1, 1) = 5.0; kernel.at<float>(0, 1) = -1.0; kernel.at<float>(2, 1) = -1.0; kernel.at<float>(1, 0) = -1.0; kernel.at<float>(1, 2) = -1.0; filter2D(orgImg, outImg, orgImg.depth(), kernel); }
1
d935f77289eeb9be515176720a44eade
84cd44edbcd4d821f77af940440d9fb4
Devuelve un arreglo con los reportes que tiene asignados un empleado.
class EModerator extends EUser function getAssignedReports() { $reports = FPersistantManager::getInstance()->load(EReport::class, $this->id, FTarget::LOAD_MOD_REPORTS); return $reports; }
1
421bdff40958e0508f8df6be38fdb9e2
33920845583c13e084ed2a2878361e6e
Переключение режима отображения/использования констант
namespace HedgeModManager public partial class MainWindow : Window public void InvokeChangeCodesView(bool useTreeView = true) { if (!useTreeView) { IsCodesTreeView = false; CodesListContainer.Visibility = Visibility.Visible; CodesTreeCo...
1
5996369f69ae4e6a9bf40b7bae630962
09fcfc3bcf4a6d6249ff273cd965d1b1
3. 调用ExecutorService中的方法submit,传递线程任务(实现类),开启线程,执行run方法
public static void main(String[] args) { ExecutorService service= Executors.newCachedThreadPool(); Task task=new Task(); Future<Integer> result=service.submit(task); service.shutdown(); try { Thread.sleep(1100); } catch (InterruptedException e) { ...
1
076633df680b802e43efb710fb0d593a
07fdff94e76084ed1d36cb4ddd8db0eb
Compare the taken screenshot, to a reference screenshot stored in the test repo. Allows for the custom definition of a comparison threshold for allowing leniancy in the comparison.
Path path = Paths.get(fileName); OcularResult result = Ocular.snapshot() .from(path) .sample() .using(driver) .element(element) ...
0
0ba7b6c43cb370b177bb40a96fededa6
d140d6698177dfce466414c2e2aa6431
Display the list of all the franchises.
{ $title = 'FranchisePage'; $franchise = Franchise::all(); return view('content.Franchise.franchise', compact('title', 'franchise')); }
1
03ac4ef4e29eff12bea920f6a2470531
ddb433b7c8f93335f5a9e0181eac3de8
delete too distant entries
dmat = cdist(self.ep, self.positions) - self.radii too_close = dmat.min(1)<(self.PROBERAD-0.000001) self.ep = self.ep[~too_close]
0
dca928491d417e28c2cc05125f5aff6c
37368fc5d4ccdd3728e9a322bda44c7e
get the country name selected in the country field.
public class ContactForm implements Serializable{ public Integer getSelectedCountry() { return selectedCountry; }
0
c630f2d92863455ab5273431ba55afd7
e26ab16467d160096d1abe0d2631338e
Given a dictionary/counter of available counts. Generate the largest possible integer as a string.
class Solution: def generateNumString(self, d) -> str: res = '' for n in range(9, -1, -1): if n in d: res += str(n)*d[n] if not res: return '' else: return res if res[0] != '0' else '0'
1
083d5fc0ff309c6b603f9785fd216f27
cb6866534d5e2182dfd8b60edd7c15da
La fonction d'en dessous permet de rentrer le genre du film. Elle se fait sous la forme d'un cochage
function returnGenreSelect($onclick, $boxname, $width){ return returnSelect($onclick,$boxname,$width,"genre"); }
0
a7e480d43ce0d13e411846e0d59df70d
49589a32bca717e613e137cd53fbf5a2
根据设备品牌和类型显示设备型号
function showDevicesByType(devicetype){ mapchangeflag = false; if(devicetype == null || devicetype==""){ return; } var hasshow = false; for(var i = 0;i<selectedTypes.length;i++){ if(selectedTypes[i] == devicetype){ hasshow = true; break; } } if(!hasshow){ selectedTypes.pus...
0
2b1cf05304199d59f3a1198231365555
ec7dacd8faa14b10a9f6b6dfa8e154a6
Receive a sample, called in the source's thread. Uses a semaphore to avoid buffering infinitely.
AwsIotMqttCallbackParam_t * const pPublish ) { AwsIotSemaphore_t * pWaitSem = ( AwsIotSemaphore_t * ) pArgument; if( ( pPublish->message.info.payloadLength == _samplePayloadLength ) && ( strncmp( pPublish->message.info.pPayload, _pSamplePayload, ...
1
d2f4b033595f0da6822b4c545bc789c6
46288f0bfb125cc56f68e7f118ed5a7e
Prevent the OS from using it even if the hardware is available.
namespace DanielLib.TouchAppTemplate public partial class App : Application protected override void OnStartup(StartupEventArgs e) { SurfaceEnvironmentHelper.TrySuppressSurfaceInputOnNonSurfaceHardware(); base.OnStartup(e); }
1
cc32ce794c7a88b700c6bfcb0904cc52
6588fb6c082918658bbc6808aa95c980
Click handler for responsive subnav dropdown
export default class Navbar extends React.Component clickHandler() { $('.navbar-collapse').slideToggle(200); $('.menu-toggle-button').blur(); }
1
78bf8ca601d5f7bb571adc491bec39f9
3d6208c40e51b7be1597d1ab84c8a8a4
重新设置事项的显示位置。并重新设置行序号。 一般在LocationItems排序后使用。
namespace Fireasy.Windows.Forms public class TreeListItemCollection : ObservableCollection<TreeListItem> private void ResortIndex() { for (var i = 0; i < Items.Count; i++) { Items[i].Index = i; } }
1
c31bc308d75c9644e0e88ec398a422fd
5a8ba9170311fd1014f8ff8a0e997ecd
Test case for list_call
def test_list_featurestores_empty_call(): client = FeaturestoreServiceClient( credentials=ga_credentials.AnonymousCredentials(), transport="grpc", ) with mock.patch.object( type(client.transport.list_featurestores), "__call__" ) as call: client.list_featurestores() call.a...
1
4fb4f808047ca2590cea7af2b3e5efb3
7f62c69a7b6e959ca42ee44421f79410
Update the atom tracker, only called if moves are accepted.
self.dlp_conf.xxx[:] = new_xyz[:,0] self.dlp_conf.yyy[:] = new_xyz[:,1] self.dlp_conf.zzz[:] = new_xyz[:,2] self.set_atoms_moved() return
1
823c1d57459fc0f6eb0c270db9c741a8
6990aed3598ed1653da8d46016df82ea
根据模块路径获取uuid数据
results = [] for uuid , uuidData in uuidDatas.items(): relativePath = uuidData['relativePath'] if relativePath.startswith(modulePath): results.append(uuid) return results
1