query_id
string
corpus_id
string
query
string
code
string
label
int64
6b65e05f00af9bcf569e8bb3e49a99cd
0d40ce16c078b52d0364666ba37dba07
Lists the Products the reseller is authorized to sell. Possible error codes: * INVALID_ARGUMENT: Required request parameters are missing or invalid.
Response<ProductList> listProductsWithResponse( String resourceGroup, String registrationName, String productName, DeviceConfiguration deviceConfiguration, Context context);
1
0df9c78d4fbe17bab390dc695ff92998
8e29360a9d8f6d2064af2f915b6a8b40
Creates a random <see langword="float"/> value using the specified distribution algorithm.
{ const Int32 floatSize = sizeof(System.Single) * 8; const Int32 precision = 23 + 1; const System.Single scale = (1.0f + FloatUtils.MachineEpsilonSingle) / (1u << precision); var random = rng.NextUInt32(); var value = random >> ...
1
64b7b8acd5ef0a56c627bc9e248a87bd
ed6c374c468fcd098f7d70757fa05e5a
获取文章的评论总数 @param cid 文章id
{ return $this->db->fetchObject($this->db->select(array('COUNT(coid)' => 'num')) ->from('table.comments') ->where('table.comments.cid = ?', $this->request->filter('int')->cid))->num; }
1
0d1475572ba8e2ef734680f64297658a
86041c69bd9beb529b0c69ed198b4143
蔵書データの一覧を表示する
class BooksController extends Controller public function index() { $books = Book::all()->sortBy('book_isbn'); return view('book.index', compact('books')); }
1
0f0d582101a7627bb311da809cb333ab
4c5dd0c35f40db33e32624c92b44d2b5
设置红包返回结果
class OrderController extends Controller public function hongbao() { $res = $this->redStatus::getSet(); return $res; }
0
94a07bb4151ce1ef490b5707ef544683
554f8d83decff352a97d5e1e2b28782f
Query for user email address using username
namespace MemoryGameService.Contracts [FaultContract(typeof(NonExistentUserFault))] [OperationContract] string GetUserEmailAddress(string username);
1
e50434364fc7b63351d2029f3f7330e7
f386677ab3d702ab1d3732ffafec289b
Exécution des listeners de nouvelle connexion
public class ControleurConnexion implements ActionListener{ private void enregistrerEcouteur(){ this.vue.getbConnecter().addActionListener(this); this.vue.getbAnnuler().addActionListener(this); }
0
a0f66cc3087cfab20c9b9ea7dea18fbc
c95eb5eb8140c7aa5004e0ee87f3a87f
The datetime for when the last reply was in the topic.
public java.util.Iterator getLast__reply__date() throws com.ibm.adtech.jastor.JastorException;
1
069cd0b8b286fa42b22cb6eb59f0d1f3
37da42e0a30ad84e3db143ee5daac193
Gets whether the database connection is read-only.
public class DbConnection implements Connection @Override public boolean isReadOnly() throws SQLException { return _child.isReadOnly(); }
1
8c1b890f73c5553e20e278c9fc801349
5fa9d735f498b175faab6c62337ab6ae
Add directory to serve static files. First argument ``prefix`` is a URL prefix for the ``path``. ``path`` must be a directory. If ``no_watch`` is True, any change of the files in the path do not trigger restart if ``--autoreload`` is enabled.
def main(argv=None): if argv is None: argv = sys.argv[1:] usage = '\n\n\n'.join(__doc__.split('\n\n\n')[1:]) version = 'Nosey ' + __version__ args = docopt(usage, argv=argv, version=version) return watch(args['<directory>'], args['--clear'])
0
d549835e29b7d9edf11f336b6089cff3
ce37a9eb2c5809949bc54cff3321cb30
Physics equation to find the current velocity.
class TrajectoryRetreiver(): def calculate_velocity(self, c, t): return 5 * c[0] * t**4 + 4 * c[1] * t**3 + 3 * c[2] * t**2 + 2 * c[3] * t + c[4]
1
54c9dd4f0bde0add95a6feff94a44f40
d4e06ac24fcee80b63414f0be1c2f7dd
转换到Boolean类型,不包含异常处理
namespace netMarketing.ConvertAbout public static class ConvertHelper public static bool ToBoolean<T>(T data, bool defValue) { if (data == null || Convert.IsDBNull(data)) { return defValue; } try { return Convert.ToB...
0
ffe260a25c3ee9ae11c714e1f4b7edc7
47914beb74cddd85fa594e9169f08a83
Download the mortality data.
class Main(FlyAI): def download_data(self): data_helper = DataHelper() data_helper.download_from_ids("MedicalClass")
0
c7c064ac96957f05c42529f57cc40535
277583dc5abf3b384cd0e4d76cdbeab4
confirms a strike. Also known as all pins are down with only one ball thrown.
private static boolean isStrike(Ball userBall, int userBallIndex, Ball computerBall, int computerBallIndex) { return userBall.equals(computerBall) && userBallIndex == computerBallIndex; }
0
c4c26df1c1e6d822b20b8f3db93de776
79154e99bb11a610ce06f3cb0b5aaadd
Verifies if the sales line is a pickup.
public class SalesInvoicingDetailController extends LinesController public boolean isDirect() throws ManagerBeanException{ return ((InvoiceDetail)this.getModel().getRowData()).getSource().equals(InvoiceSource.DIRECT_SALES); }
0
2a1a27476e830de76e68cf1ac162bea1
f354f375f8bec86290e56748150d313b
get list of acceptable CRS' for the layer
String getAvailableCRS();
0
82b64b319a8f068c34178a975e357d44
6670dfef2675ca1f6c01ed5814224942
Creates or returns a previously-created database.
public SQLiteDatabase openOrCreateDatabase(String name, int mode, SQLiteDatabase.CursorFactory factory) { return SQLiteDatabase.openOrCreateDatabase(getDatabasePath(name), null); }
1
ac4e415f61d292b86b6cd01ea3d76d57
c300e143db04f094343594d78da87a65
Standardizes each predictor variable in the design matrix with the statistics of that column.
def standardize(df, cols): df_new = df.copy() for col in cols: df_new[col] = (df_new[col] - np.mean(df_new[col]))/np.std(df_new[col]) return df_new
1
72566a041bcaa02dd4cf85d7f9dffc92
364edf859f0069e4a9413cfdd11bc320
펀드검색 열기/닫기
if ($("#divSearch").css("display") == "none") { $("#divSearch").css("display", "block"); $("#icon").removeClass("icon-caret-down"); $("#icon").addClass("icon-caret-up"); } else { $("#divSearch").css("display", "none"); $("#icon").removeClass("icon-caret-up"); $("#icon").addClass("icon-caret-down"); } }
1
1dc33ac436699c3116a2831589c729af
1d7f4a9e3c921605e43eeec61bfa76cd
Write trap entry address to stvec
{ if (shoe.suppress_exceptions) { shoe.abort = 1; return ; } const uint8_t fc = shoe.logical_fc; set_sr_s(1); set_sr_t0(0); set_sr_t1(0); const uint32_t vector_num = 2; const uint32_t vector_offset = vector_num * 4; const uint32_t vector_addr = lget(shoe.vbr + vector_...
0
6886e0021371ff7cec74a743d72c931b
24f846d9c12bffff9fbba74e7cbd3eba
Converts the given list into polynomial form
res = [] if type(poly) is not list or len(poly) == 0: return None if len(poly) == 1: return([0]) for i in range(1, len(poly)): if type(poly[i]) is not int: return None res.append(poly[i] * i) return(res)
0
5f0eff931d633df8fc5cc45e052c96ce
abf137e2136c0061bed28ada7ce8dfef
Make turtle t draw a Koch fractal of 'order' and 'size'. Leave the turtle facing the direction.
if x<10: t.fd(x) else: koch(t,x/4) t.lt(60) koch(t,x/4) t.rt(120) koch(t,x/4) t.lt(60) koch(t,x/4)
1
cf56b640cff65e930f15f991dcbed43f
9fec31d7f0b0d16c98904128752f3a9a
Adds stock to a product in the DB using the product ID
{ SqlCommand cmdSQL = new SqlCommand(); cmdSQL.Connection = cn; cmdSQL.Transaction = trnXIN; cmdSQL.CommandText = "UPDATE Product SET Stock = Stock + @Stock " + "WHERE ProductID = @ProductID "; cmdSQL.Parameters.AddWith...
1
d0b27bbd40a5b495508bc6755311bd58
b984509ae93056982d6b0761ae3ca1a6
指定サイズより長い値を指定した場合例外が送出されること。
{ $this->expectException(SlackException::class); $this->expectExceptionCode(SlackException::STRING_TOO_LONG); $actionOption = new ActionOption(); $actionOption->setValue(str_repeat(' ', 2001)); }
1
a0c24e03434ee1151a69dc7f7148e165
96aeb4181dcc81e9e0e244b871e2d5a2
退料清单列表行DoubleClick事件方法
namespace PRO.UI public partial class updown_record : System.Web.UI.Page protected void GridResult_tui_ItemDblClick1(object sender, DirectEventArgs e) { string s = e.ExtraParams["listRecordId"]; listRecoedID = Convert.ToInt32(s); waitNum_tui = Convert.ToInt32(e.ExtraParam...
1
5a03f53185efc96157a80def22103aff
be8640865d6f04a3557c524d4fc000b1
Read the entire contents of the file as raw data. Returns null if the file isn't found.
byte[] readFile(String filename);
1
9ba2185d31bca7f0ad1795fe61229e65
9497b50f45e72f52f3ca69fffe58de02
启动个人配置的Chrome浏览器,路径根据电脑和系统的不同而不同
def init_driver(): options = Options() options.add_argument("user-data-dir=C:\\Users\\linki\\AppData\\Local\\Google\\Chrome\\User Data") options.add_experimental_option("excludeSwitches", ["ignore-certificate-errors"]) options.headless = True return webdriver.Chrome(options=options)
1
847d850facca2bac46d274f06151c0a2
8b2c47b1a1aa30779f9554323108461f
Returns the meta object for the containment reference list '{@link com.github.icelyframework.service.Aggregate#getDomainobjects <em>Domainobjects</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EReference getGenDomainPackage_DomainPackage();
0
d737f723a49e4b210ec94cde0409e7b9
d556df1b1e487401c83c7103336b94eb
r"""Set stage id of Block in pipeline parallelism. Set different module's stage id to hint the graph preparing right num of buffers in pipeline.
class TaskContext: def stageId(self) -> int: return cast(int, self._stageId)
0
3078372b678ddc98d1b2c9d8905b3f06
b8d16e0ae78fff16a5eedbfde1f3f8c7
перевести текущий документ в режим правки
{ if (CurrentForm == null) return; this.CurrentForm.zyEditorControl1.EMRDoc.Info.DocumentModel = DocumentModel.Read; }
0
f863e790900c1258c285f8baedf876fc
d3ae4a66b33cec6166f2d29af03693cf
解法2:迭代遍历 用栈模拟递归。注意要先压右节点再压左节点,因为栈弹出的方向是相反的。
public class LC0094_BinaryTreeInorderTraversal public List<Integer> inorderTraversal2(TreeNode root) { List<Integer> list = new ArrayList<>(); Stack<TreeNode> stack = new Stack<>(); TreeNode cur = root; while (cur != null) { stack.push(cur); cur = cur.left; } while (!stack.isEmpty()) { cur = stack....
0
10bf1178b7b4e09a52351d120483c488
c22a8ca313a73657235e201697330268
Returns the inverse FFT of the specified complex array.
class SignalTool static ifft(real, imag) { const obj = fft_cache.get(real.length); return obj.ifft(real, imag); }
1
372e34a1a9a31409753289bf23242e8e
1d40111691b7ed20dbc9234ea5ac2eb9
Methode: ReceiveData Beschreibung: Empfängt die UDP-Packete des Smartphones über WLAN Parameter: keine Rückgabewert: keiner
long currentMillis = millis(); if (_radio->available()) { _lastMessageRceivedMillis = currentMillis; _radio->read(&_dataReceived, DATA_PACKET_SIZE); _setConnected(1); _setControlData_batteryLevel(((byte)_dataReceived[0]-48) * 10 + ((byte)_dataReceived[1]-48)); _setControlData_btnToggle((byte)_da...
0
6e927c8b13eb5f6ea07d8f3c6a6ec0e0
f038bf4e9543c9dd1af14412adb5137a
Vocation gets the vocation id from a given string
try { Occupation occupation = occupationMap.get(occupationId); if (occupation == null) return null; return occupation.getName(); } catch (NumberFormatException ex) { return null; } }
0
0d6dc56d075fa9378f409eef890676ac
a838b4afd37f5979214ea1b9deda830a
This function is used to format an unsigned number with the specified base into a string buffer. fill characters, if the number is not this long.
{ u8 *p; u8 *p1, *p2; unsigned long ud = d; int divisor = 10; u8 tmp_buf[32]; u32 offset; p = tmp_buf; if (base == 'd' && d < 0) { *p++ = '-'; buf++; ud = -d; } else if (base == 'x') divisor = 16; do { int remainder = ud % divi...
0
90f1f38feb712593957d906d9b20656c
9c330b4ce669eae97e7b2ebd3811855e
indicates whether or not a pair of nodes are adjacent
index_a, index_b = self.indices(node_a, node_b) if self.adj_matrix[index_a][index_b]: return True else: return False
1
83c7def9cc76c64025f6054e12bfffce
d653ec576aceb6e9d844dbd3b0148a67
Returns true if given target information is available for trials.
class project: def is_target_provided(self): return self.target_name() != ""
1
8a1525ffd1767b424df81b4286ca9221
de511810b1ea02f87627109015f5a155
Test getting a list of subsequences with a non-default seperator. Test getting a list of subsequences where elements of that subsequence are joined together by a non-standard seperator.
p = Parser(testfiles['parsesep'].split("\n"), "testsource", [":", "-"]) root = p.root self.assertFalse(root.isTerminal()) self.assertEqual(len(root), 3) self.assertEqual(root[0].token, "element") self.assert_(root[0].isTerminal()) self.assertFalse(root[1].isTermin...
1
b7bf311b47122de5904d7a67c9396a84
0e83b096f12c13d3aa2f19aaef7275cf
Menuliskan waktu ke layar (format: hh:mm:ss)
static void display_time(struct tm *t) { char textLine1[BUFFER_SIZE]; char textLine2[BUFFER_SIZE]; int ShowDie; ShowDie = time_to_2words(t->tm_hour, t->tm_min, textLine1, textLine2, BUFFER_SIZE); layer_set_hidden(bitmap_layer_get_layer(s_background_layer), ShowDie); if (needToUpdateLine(&line1, line1Str, textLi...
0
92c5dba226e4797a747ec57cab05e303
5a0e0f6cb37b025eea77dadc98e5e260
LMS 차적조회 기능(교통안전공단 전문 소켓통신 차적조회)
{ uint8 ui8PNValue,ui8PN, ui8TmpNoise,ui8IsSc,ui8SignalH, ui8SignalM, ui8SignalL,ui8NoiseH,ui8NoiseM, ui8NoiseL; int i32SignalPower,i32NoisePower; double dbSNR = 0; ATBMWrite(0x08, 0x4d, 1); ATBMRead(0x08, 0x2d,&ui8PNValue); ui8PN = (ui8PNValue&0x03); ATBMRead(0x14, 0xAF,&ui8TmpNoise...
0
c3d28d738de63dd524d77945e3cb18cd
e3d0ca1622bace5e25a38503e92cc9d3
This is intended for parsing default value passed with Topic form administration Where this default value may contain special notation such as +"TG"+ Where +TG+ stands for TagGroup so it means all tags from tag group "TG:<Group name>" ie. +TG:locations+ Will be taken as default value
let regex = tag_string.match(/\[(.*?)\]/g); if(!regex) return null; let resulting_tag_set = []; regex.forEach(tag => { let _tag = tag.toLowerCase().replace("[", "").replace("]", ""); const replacer = " "; _tag = _tag.split("+").join(replacer); _tag = _tag.split("/").join(replac...
0
9c1afa6db5d20f7948d8167533668a9e
11eeff08dc83fa813db950750545d048
Removes all result files but the most recent 3
{ var files = Directory.GetFiles(logDirectory, "log-*").ToList(); if (files.Count > 7) { var toBeDeleted = files.OrderByDescending(x => x).Skip(7); foreach (var file in toBeDeleted) File.Delete(file); } }
0
f99422fbc53236304bbe633289c7d535
9e3cb686b68352473128ce94e9248c84
=========================================================================== announce ===========================================================================
function WebDKP_AnnounceRollEnd(item, name, dkp, totalrolls) highest_roller, high_roll = WebDKP_Bid_GetHighestRoll(); local _,_,link = WebDKP_GetItemInfo(item); if(highest_roller == nil or highest_roller == "") then highest_roller = "No one"; high_roll = 0; end local _,_,link = WebDKP_GetItemInfo(item); local...
1
9c8b48e698cadc4d8f60cff4332fb8e5
478b00b96d953fc9e88d3652368b0920
Adds command post-handlers to the container.
{ Pipeline.AddMiddlewares(new PipelineMiddlewares.CommandHandlerLocatorMiddleware(assemblies)); Pipeline.AddMiddlewares(new PipelineMiddlewares.CommandHandlerResolverMiddleware()); Pipeline.AddMiddlewares(new PipelineMiddlewares.CommandHandlerExecutorMiddleware()); ...
0
2695266ed1d448a1ceebac367c134c36
457bac8a094b7103cf8012014cad5e91
DESTRUCTOR-----------------------------------------------------------------------------
{ SAFE_DELETE_ARRAY(materials_); if( textures_ ) { for(DWORD j0 = 0; j0 < num_materials_ ; j0++ ){ SAFE_RELEASE( textures_[j0] );} SAFE_DELETE_ARRAY( textures_ ); } SAFE_RELEASE( mesh_ ); }
1
610a1e53864dd9670e4fe4139581eb3e
fca409c13b24536f6c787778ac74220c
Check if any pieces come in the path of a rook, queen or bishop while making a move.
{ String kingLoc = getKingLocation(b, isWhite); char initFile, initRank; String initInput = ""; String testCheckInput = ""; for (int f = 0; f < 8; f++) { for (int r = 0; r < 8; r++) { initFile = (char) f; initFile += 'a'; initRank = (char) r; initRank += 49; initInput = initFile + "" +...
0
0e9519aa47f8b80aba6b7811ed52a161
acd9f72e855bc52c88c743301f164a1e
Returns the number of data points allocated for all four reference memory locations.
Object icp_buffer_ref_count_cons_memory_usage() { Object temp; x_note_fn_call(47,127); temp = FIXNUM_TIMES(Icp_buffer_ref_count_cons_counter, ltimes(FIX((SI_Long)2L),Bytes_per_rtl_ptr)); return VALUES_1(temp); }
0
211d593998d3798131331939697ed6ab
a571789c3652875771d49c79702791da
Emit a protocol buffer `message` source string, E.G. message User { required int64 id = 1; optional string name = 2; }
void ${proto.prefix}
0
44078a8706061d2ac405a56c4709d1d4
2b6eafad1aa98dd9e89d3c526a621c93
Fills the lists with the appropriate movies from a correctly formatted file
class MovieCommit: def load_file(self, filename): f = [line.rstrip() for line in open('data/'+ filename + '.txt')] return f
0
b3b10b8866048cf626f4c8e899f39085
98b412a9191dc69a4f7eb7c48e617334
Augments the array with a key, "_errors", if there are any errors, and lists the erroneous fields.
export class ValidationErrors _setErrorList (errorList) { this.errorList = [] _.toArray(errorList) .forEach(fieldSet => this._addErrorList(fieldSet)) }
0
7470a1818df91faecb28c917eddc199e
fe58ade5821626ee88e6513e82d9b8ee
Sets <code>value</code> as the attribute value for MailedFlag
public void setValue(final MailRecipient mailRecipient, final Object value) throws Throwable { IModelType.ValueHelper.setValue(mailRecipient, this, value); }
0
994e61b752cbfdb32d8ef508f6c6443f
480e353f0c2e4e10cc09b2d03df3d915
Returns the decimals option
class Field extends \DrSlump\Protobuf\Message public function getDecimals(){ return $this->_get(9); }
1
07629682b73481c3c240b58eef1e821c
8696ccd249ca637b95ddf0b46562b660
Loads the admin JS files. It loads the public and admin JS, and also the public custom JS. Also, it passes the PHP variables to the admin JS file.
final class Emertech_Theme public static function theme_admin_js() { $dir = EMERTECH_JS_DIR_URI; $theme_version = EMERTECH_THEME_VERSION; }
0
48361980709c9cfca741533e9fa31025
b20996d504d874189db8850c957d0256
Sell Item page handler
namespace SMSProject.Controllers public class InventoryController : Controller public ActionResult SellItem() => View();
1
81a0fc4a858408cbabe72451c0c6ec13
2fbde2e0dd77efc398e44a059d98b2d1
Check sanity of the superblock. This check is performed at mount time. Checks are described by one-line comments in the code.
{ if (superBlock[0].crc != computeCRC(-1, CRC_SB)) return -1; return 0; }
1
b20190f468578cc3ced8e574ac1a63e2
8767216fc45fadf2b28c60ff4510bc15
合并不同采样率得到的candidate
src_list=os.listdir(src_dir) target_list=os.listdir(target_dir) group_list=list() for group_index in range(21): group_src=filter(lambda x: int(x.split('_')[0])==group_index, src_list) group_src=map(lambda x: src_dir+x, group_src) group_target=filter(lambda x: int(x.split('_')[0])...
0
f5459ae4b05d0f475661dbcbf5f1386e
7e1938d2d1a9ec37d045a1a3b3d203b9
A tester program
int main(int argc, char *argv[]) { cout << "SETINT -- BEGIN TESTING!" << endl; cout << endl; SetInt s; basicTesting(s); iteratorTesting(s); copyConstructorTesting(s); assignmentOverloadTesting(s); unionIntersectionTesting(s); cout << "ALL TESTING IS COMPLETE!" << endl; return 0; }
1
235f749c1c0c74e9d2a6c39bf2d98c7e
a3e7c58137932dba8259c10569452e3f
Empty music buffers
{ MineSoundBuffers[0] = m_MineBuffer1; MineSoundBuffers[1] = m_MineBuffer2; MineSoundBuffers[2] = m_MineBuffer3; MineSoundBuffers[3] = m_MineBuffer4; PlayerHurtBuffers[0] = m_PlayerHurt1; PlayerHurtBuffers[1] = m_PlayerHurt2; PlayerHurtBuffers[2] = m_PlayerHurt3; SlimeHurtBuffers[0] = m_SlimeHurt1; SlimeHurtBu...
0
2ba35359ee4006e9ce4a0a8127c956ca
9ef6d178492698a198f7c51a8082f82b
ディレクトリ選択画面を開き、JTableに登録
public class Controller @FXML void OpenDirectory(ActionEvent event) { DirectoryChooser directorychooser = new DirectoryChooser(); File _dir = directorychooser.showDialog(null); FilenameFilter filter = new FilenameFilter() { @Override public boolean accept(File dir, St...
1
c65e9248c04e5f1ffa36bfdb39b3b13f
233f1f7f088e17904bb28d7c82b2fd4c
6、判断 输入的 课程编号 与 教师编号,判断该课程 是否 存在 用于创建班级用
@Controller @RequestMapping("/reg") public class teacherregister_message @RequestMapping("/cj_gh") public @ResponseBody String pz(HttpServletRequest request, @RequestParam("jssz") String params) { if(TeacherDao.isExistBySn(params)){ System.out.println("存在"); return "1"; ...
0
88cda72cb78cd05c09976cf1f2ab513d
4c7d5bab1bed1c52295d545e0fecac05
activity切换-> 左进右出
public class AnimUtils public static void inLeftOutRight(Context context) { ((Activity) context).overridePendingTransition(R.anim.in_from_left, R.anim.out_to_right); }
1
e6fdff6022573b6a9d55be27bf370ea9
4f4481f29fa6f93765fe4be648c17d82
Wrap the function with loss scaling. Returns a link.
loss = builder(*args, **kwargs) def drop_loss(output, target, params): return loss(output, target) return drop_loss
0
67dcef0d5e4bfa5b4854c753bac2541d
78ec0898e9e23a596f8e2dbfdf6c3686
This when a cross-server ping response is received. Its purpose is to compute the channel latency and send a message to that effect to the requesting player.
{ struct turnserver *turn = arg; struct channel *chan; int err = 0; ++turn->n_recv; chan = find_channel_peer(turn, src); if (chan) { uint16_t len = (uint16_t)mbuf_get_left(mb); size_t start; if (mb->pos < 4) { DEBUG_WARNING("relay_udp_recv: mb pos < 4\n"); return; } mb->pos -= 4; start = mb->pos...
0
d8f4b935cb2288fece3769242e8a66ca
a6d9c3e175826ed59e1a9d701871f9ba
Send standard command: "<cmd>\r\n" ==> "<expectedResponse>"
uint8_t QAPRSSi4463::radio_comm_SendCmdGetResp(uint8_t cmdByteCount, uint8_t* pCmdData, uint8_t respByteCount, uint8_t* pRespData) { radio_comm_SendCmd(cmdByteCount, pCmdData); return radio_comm_GetResp(respByteCount, pRespData); }
0
e827f2626a03df157c964d915b677825
d69361992bc11e4c4ff09ad6041f0624
Get the current and next network vehicle quality on server. The struct returned contains two fields CurrentValue and NextValue.
interface CarrisService @GET(Constants.GeneralTransitFeedSpecificationCurrentVehiclePositions) suspend fun getGeneralTransitFeedSpecificationsCurrentVehiclePositionsAsync(): Response<ResponseBody>
0
410c69733823cc714417413b224469f9
9bb263945422211b33dc0cfa4c790170
采用FIFO的形式(入队模式)将buf存入Buffer缓存池以待复用
int usb_queue_buf(struct fb_manager *pfrm_mgr, struct frm_buf *buf) { if (buf->index < MAX_FRAME_SIZE) { pfrm_mgr->frm_info[buf->index].state = FB_MEMORY_FREE; return 0; } return 1; }
0
d05b5402baa35757b09fd52e9c8a8092
61219887e009cb92199aa351b6bc4ea7
On touch end - stop dragging
handleTouchStart (event) { this.dragging = false; }
0
a8c448b9ddc5f44493597cd3cf2a6c2e
9ab031e7de0225cf0ab93bd8c19ba5f7
Naive algorithm.
class SuffixArray: def construct_naive(self, s: str): self.suffixarr = [i for i in range(len(s))] self.suffixarr.sort(key=lambda i: s[i:])
1
999fd373001c83e45e49f4b489ab54a0
80a59859e6e40bf8d7b22ceb7271df95
When given an expression using ==, ===, !==, !=, >, <, >=, <=, etc, rewrite both sides of the expression (it's safe, both sides get calculated.)
if type(expr) == b_or_t and \ type(expr.op1) == eq_t and type(expr.op2) in (lower_t, above_t) and \ expr.op1.op1 == expr.op2.op1 and expr.op1.op2 == expr.op2.op2: cls = {lower_t: leq_t, above_t: aeq_t}[type(expr.op2)] return cls(expr.op1.op1.pluck(), expr.op1.op2.pluck()) if type(expr) == b_or_...
1
f85ec619321bf46943d1d1aa5364192f
12b790a9bcb247582c625efcdd625858
=========================================================================== DESCRIPTION Demultiplexer callback from Layer 2 for downlink data blocks DEPENDENCIES None RETURN VALUE TRUE if the specified GAS ID wants the block on the specified ARFCN SIDE EFFECTS None =================================================...
ARFCN_T rr_gprs_get_scell_arfcn(const gas_id_t gas_id) { return rr_scell_arfcn(gas_id); }
0
1372b06b2819997219474cb5b276d0e9
4f8425700e08c1b271078eeb6eea473c
Sets the Apns certificate.
{ $this->curlOptions[CURLOPT_SSLCERT] = realpath($certPath); if ($passPhrase !== null && trim($passPhrase) !== '') { $this->curlOptions[CURLOPT_SSLCERTPASSWD] = $passPhrase; } }
1
f2bfce48f0debdcf79f1ba67ed07c0a9
6c1364879ebe6123822ff73f520f0d3e
Sum of absolute value for all elements.
def abs_sum_ts(timeseries, nodata=-9999): ts = fixseries(timeseries, nodata) return truncate(numpy.sum(numpy.abs(ts)))
1
faf5ffb5ab99595e22aa527d7a07cf63
7497595d1e3851f510e55a2d27352d47
This function replaces the getservbyname() call.
int socket_gethostbyname(const char *addr, hostent **hp) { hostent *v3; v3 = gethostbyname(addr); *hp = v3; if ( v3 ) return 0; else return WSAGetLastError(); }
0
71abe25b8c2c89dc4a92a479f5e57637
caca2e2be9ff630a526f363c0816cbbd
Gets a list of the roles that a specified user is in for the configured applicationName.
{ List<string> roles = new(); Guid targetNodeID = Guid.Parse(applicationId); DataSet securityContext; if (targetNodeID == DefaultNodeID) { try { using AdoDataConnection database = new(SettingsCategory...
1
66fae3862f8645add1d590823b56695d
82280fba3a317065d15d7379dcd6c0ba
PUT /comments/{id}
class CommentsController def update @comment.update(comment_params) head :no_content end
1
efd9b6f8f6af0fcf10660c05e34f06c7
abfdc3e40196d96bdec32fa1db2e8870
Convert GeoJSON object to GeoJSON text
export class JsonixService jsonToGeodesyML(jsonObj: Object): string { this.traverseJsonObject(jsonObj); return marshaller.marshalString(jsonObj); }
0
2520432ddeae854b86d47b87b0cdf405
bb62beb0deb7c3918e27378fbf3585c0
Recovery Tokens: Select the token type to add Shows an overview of the available token types for this Identity
class TokensController def index end
0
c8078c495f3313e8a368323cc8637f92
ecc1896a58c1ea5c25e2c5763f429a50
Returns all the rows from 0 to n in Pascal's triangle
def pascal_row(n): while len(rows) <= n: last_row = rows[-1] this_row = [1] while len(this_row) <= len(last_row) / 2.0: r = len(this_row) this_row.append(last_row[r - 1] + last_row[r]) if len(last_row) % 2: this_row.extend(reversed(this_row)) ...
0
f6543bb965a54c98413731e7434931b8
9b4cec90bfea95aec711128c2919961d
Retrieve the basic information about donors and their gifts. Returns a sequence of the form (<donor>*) where <donor> has the form (<name>, (<gift>*)). Names borrowed from Lectroid list. Gift values are random. HIST: 000/New
class DonorCollections(object): def donors(self): return tuple(d for d in self.donor_db)
0
1e4adad2c81e27999306257a8094b52f
1c947b798de3ea9d9ea01922130cc522
根据方法和实例对象返回方法全名
@Service public class Perf4jInterceptor implements MethodBeforeAdvice, AfterReturningAdvice private String getCompleteMethodName(Object target, Method method) { String className = ""; if (target != null) { className = target.toString(); int loc = className.indexOf("@"); if (loc >= 0) { className = cl...
1
41a9358e409d7d91518e314cc3f89000
cae68796afd9d387c4144a3599ae1bc7
Get the userDefinedResources property: Properties of the IoT Security solution's user defined resources.
@Fluent public final class IoTSecuritySolutionProperties public UserDefinedResourcesProperties userDefinedResources() { return this.userDefinedResources; }
1
d0e6bb8bbbafbc1e3affa50c2062c920
1874943bec1f39763367398a96851f1e
Getter for <code>WETRN.V_OFFR_ALL_WITH_BEST_COST.O_EST_STUS_CD</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VOffrAllWithBestCostRecord extends TableRecordImpl<VOffrAllWithBestCostRecord> public BigDecimal getOEstSrceId() { return (BigDe...
0
6477afccff01abaea80cb7a558e9aa81
1a38851904e81dbe413743b7b3da253c
Converts the meaningful parts of this decision variable into a dictionary for project summary reports
value = self.summary() if isinstance(value, dict): return value return {self.name: value}
1
dd589480c9ff93e5cfa2b8c602593f6d
4f99f7c02369d04915b98fee5e29870e
根据条件查询道路运输从业人员数据总个数
Integer selectCountByConditions(JlConditionsBean jlConditionsBean);
1
3b57e9d114709547edbd96b31e1c644d
a8444cb69ee9a9b71ba86f9382ba4137
根据传入的坐标,分析存在那一部分单元格内,返回它的首格坐标
x_index = min(int((x - left) // cellLength), celllineNum - 1) y_index = min(int((top - y) // cellLength), celllineNum - 1) return x_index,y_index
1
d9a96b1bfebfa0ff2bf126ddf961ae63
b24583570f0ff0a02ebd4386f7e1a6b7
Create an empty file cache as helper for some tests.
class LockFileCacheQueueTests(TestCase): def setUp(self): self.cq = get_cache_queue(name='LockFileCacheQueueTests') self.cq.reset()
0
2c1f1877141c7fe1d45edfa8d44e667d
3225f782be20546729b2cb30e06db1eb
Get size of output image as tuple
def get_output_size(input_size): output_size = (((((((np.floor((np.floor((np.floor((np.array(input_size)-4)/2)-4)/2)-4)/2)-4)*2)-4)*2)-4)*2)-4) return tuple(output_size.astype(int))
1
f7cd4a23540ac46b2501c32f86b7681e
13ad037f9116525f5322c6c2f8010e1f
返回有多少页和多少条回复
return domain.comment.findAndCount({ where:{scope,topicId,replyUnder}, limit:size, offset:(page-1)*size, order:[ ['createdAt','asc'], ], include:[ {model:domain.user,as:'author'} ], }).then(result=>{ const {rows,count}=resul...
0
de24f6f2cce14dc753cadbccdb952430
786196db3022884d6c793bda198bc586
Returns the singleton of the rest server
{ if (!self::$instance) { self::$instance = new self($restCli); } return self::$instance; }
1
8aabf605544c391066cf2f01563e5f56
0946d88d5c4cad48647dc0d8e01880ab
returns the index of the the first node to step outside a radius drawn from the tail. Returns Zero if radius is never breached
min_r = float("inf") for ii in range(0, len(trajectory[:, 1])): for i in range(len(self.barrierInfo)): ox = self.barrierInfo[i][0] oy = self.barrierInfo[i][1] dx = trajectory[ii, 0] - ox dy = trajectory[ii, 1] - oy ...
0
b537ac7fe9e01808d26e2249295b21b5
5ad37eda445c577723cb3be587995735
在指定View内现实Fragment,如果Fragment未创建,则新建
public abstract class MVPLazyFragment<P extends BasePresenter> extends BaseFragment @Override public void onViewCreated(View view, Bundle savedInstanceState) { if (isViewFirstCreate && getUserVisibleHint()) { if (isFirstVisible) { isFirstVisible = false; lazyLoad(...
0
134a0e4e5eaa1c3284e7bf94e0c86a34
5caeb758313ece095ac68cbb55999825
Avaa ohjeen selaimeen.
namespace Harjoitus_4 class Hissi private void AvaaOvet() { Console.WriteLine("Ovet ovat auki."); this._ovetAuki = true; }
0
e76eb50f8474da69eb35569d1432045c
b902aa4f5d8eb3ac31e381fb93cfc595
Returns an oscillation buffer - from the cache, or generated. Called by: perform() > _buildBuffers()
const samplesPerCycle = this.samplesPerBuffer / config.cyclesPerBuffer const f = Math.PI * 2 / samplesPerCycle const singleWaveformBuffer = this.audioContext.createBuffer( this.channelCount , samplesPerCycle , this.sampleRate ) ...
1
1952cc8d53776fceb87a1c8099349048
c0d321ca77a9dab620ced33c37123701
バネの減衰定数(揺れが収束までの早さ)を取得する。
{ return Simul.Young / (2 * (1 + Simul.Poisson)); }
0
c375dbcb9b34c177669809ac7c6d68f8
6df662788bba04c7ee01ede6ddae8b09
ru Возвращает id свойства элемента по индексу, с порядковым номером из INI.
{ auto property_pair = GetPair(index); if (!property_pair) { return nullptr; } return property_pair->_name.c_str(); }
0
2c3d2883e0139d7911d37fb65a327a0d
53593d2708b52bfa732c5ec81a15a190
Assert insert on non-empty list works.
class InsertManagerTestCase(TestCase): def test_insert_list_with_task(self): InsertManager().insert(tst_db.TEST_LIST_WITH_TASK) lst = List(tst_db.TEST_LIST_WITH_TASK[0]["title"]) self.assertEqual(tst_db.TEST_LIST_WITH_TASK, lst.get_as_list())
1
e03c73449a069e0737df8193c7d5060b
272ed179921a4b68d2f79ca6396dd038
Delete all clinicas.
def delete_clinica(apps, schema_editor): Clinica = apps.get_model('base', 'Clinica') clinica = Clinica.objects.get(pk=1) clinica.delete()
0
8b71f5ad8c6e623fdb19f34b3cbf551b
4dab8f746728d60a0a303f0c1bafb83f
IMPOSTA IL PERIODO DI INDISPONIBILITA' DI UN DOTTORE
class OCAmicusTemplateOperator{ public function getDisponibilitaLibro($codice_amicus){ $fileXML = $this->getDisponibilitaQueryUrl($codice_amicus); $xml = $this->xml_to_object($fileXML); $array = (array)$xml; $array2 = (array)$array['lst']['1']; $array3 = (array)$array2['lst']; ...
0
81171f230d4fcea9163e7ef5bf637baf
264c3747649a8f3ce7e7bde7d1207b18
Add a JavaScript listener function to a native event.
var cnt: number, len = args.length; for (cnt = 0; cnt < len; cnt += 1) { this.$njsEventListenerHandlers.push(args[cnt]); } }
0
7074d15e628ea8115ddab4f586784b28
c4c247ed29909c657743b303002bb688
A*X
const int Poly::operator()(int X)const { int total = 0; for (int i=0; i < size; i++) { total = total * X + coeff[order-i]; } return total; }
0