query_id
string
corpus_id
string
query
string
code
string
label
int64
7ccfab55a00acec8b885e9a69b4712a8
ff4fbbcf7745bbf603206653a5c6c4ba
if the data have not been inserted into the database, wait until it is done.
export class DatabaseService private async waitForSetup(): Promise<void> { while (this.inSetup) { await delay(100); } }
1
c8d6bb4f08d777e03224bcc59b3bdae9
728abb06422bafd5200772a8957d28e5
Returns string for active material based on electrode type
const { symbol = false } = opts; if (symbol) { return 'S'; } return 'siemens' }
0
2fbb4f7ecb82acd14819b0568512f0f1
216902c4bd3a475c086ce7e347f2f952
font_size_idが存在すればfont_size_idを、存在しなければ6を返すメソッド
var suffix = String(fontSize).replace(/[\.]/, '-').toUpperCase(); var key = FONT_SIZE_KEY + '_' + suffix; return styleMap[key] ? key : null; }
0
daef07e1669df0368d2a8e1742f499fc
c33dd7c6a6d335178e0ce0541d613290
Adds an IS EMPTY condition to the WHERE clause, ANDing it with any existing conditions if necessary.
public function _or(): DBQueryWhere;
0
3ddeab1cc45b3c95aeabf618ac87b2b0
244497ce58a787003ac979e975f4def2
保存上传的图片缩略图
public class ComicServiceImplement implements ComicServiceInterface private String saveThumbnailOf(FileItem imgData) { String fileName = imgData.getName(); String filePath = imagePath + File.separator + fileName; try { ImageHelper.handleImage(imgData, 200, 200, filePath); } catch (IOException e) { e.print...
1
b7e2166f87895eb3e646f8652722fca0
2b9c3542a0e67d0d06039834bd37e4db
Update multiple documents on MongoDB
class DatabaseManager: def update_multiple(self, collection, documents, upsert = False): operations = [] for document in documents: operations.append(UpdateOne({"_id": document["_id"]}, {"$set": document}, upsert = upsert)) if len(operations) == num_bulk_operations: collection.bulk_write(operations, order...
1
c49ae98df80399fb5edc8c0c87e90139
52b2734f905e0f4308d153b700d8823e
Method to upload audio file on server for speech to text conversion
val progressDialog = ProgressDialog(context) progressDialog.setTitle("Uploading to Google Drive") progressDialog.setMessage("Please wait...") progressDialog.show() val filePath = "/storage/emulated/0/recording.mp3" driveServiceHelper.createFile(filePath).addOnSuccessListe...
0
5db84ad2e4aa61ba92a1d0784064892e
d140f6685c40b04e8685c0ca19f3ac29
Move the Event Slider to the next event.
void NextGuideEvent(int svcType, int svcNum) { guideFormat = 0; if (currentIndex < eventCount-1) currentGuideIndex++; else return; }
1
144a273c7a9600372210988751211a74
31755b83948db48127735aba12506fbc
Підписатися на події списку аудіозаписів
namespace Moreniell.CourseWork public class TuringMachine private void SubscribeEvents() { tapes[0].CellChanged += tape_CellChanged; tapes[1].CellChanged += tape_CellChanged; }
0
f9efcb8f62525deedf06cfc4bedcdbc8
e33181654f7b0c780de23d470efe70a6
@brief Tells the PULP-SDK to initialize or reset performance counters
int perf_cntr_start(int which, int mode, int count_type) { perf_cntr_clear(which); PMCR_CTRL(which) = PMCR_RUN | mode | (count_type << PMCR_CLOCK_TYPE_SHIFT); return 0; }
1
d840c6f6d75c702b79a79e175a2fcb04
60f09864ceb9f8169081026a0c27bd0c
A reference to a domain or server that manages policies under which the document is accessed and/or made available.
export class DocumentReference extends DomainResource location () { return this.json['location'] }
0
8ac5f9dba619ed5ff6d1a302969b74a5
c217bb6beed139f5eb7d95d07c7a0f24
删除微信昵称里的Emoji图片
if (source == null) { return null; } Pattern emoji = Pattern.compile("[\ud83c\udc00-\ud83c\udfff]|[\ud83d\udc00-\ud83d\udfff]|[\u2600-\u27ff]", Pattern.UNICODE_CASE | Pattern.CASE_INSENSITIVE); Matcher emojiMatcher = emoji.matcher(source); return emojiMatcher.replaceAll(""); }
1
ee2d6611c6556da6083c9465002978c7
e6c855425d6973b080eee3bcbbc0b9e4
initializes this RestLogicNode with a json hash
self.modelType = sd.get("modelType", nodeModelTypes.MODEL_NONE) self.x = sd.get("x", 0) self.y = sd.get("y", 0) self.z = sd.get("z", 0) self.synced = sd.get("synced", False) self.modelName = sd.get("modelName", "") self.modelType = sd.get("modelType", nodeModelTyp...
1
9577b0532d1810027c881cb220536b28
d0acf86c212134d9cb4d568f86430c75
Gets the aimed step duration text field.
public class StepRouteMap public String getDurationText() { return durationText; }
1
b8a9bf26cbffd3d373e05f02731f1e23
389e458500373db16ff832cffbb6c304
合并重复的顶点、纹理坐标、法线
{ if (!ISFaceHasDrawData(face)) { face->SetRenderMeshData(NULL); return; } else { if (Merge(face)) { face->SetRenderMeshData(NULL); return; } } }
1
6d5574f360a1869441f609d09245ef9f
f0bb48bde94343e4a867ff2fea4d5754
GET: api/OrderReviews
namespace Assignment2.Controllers public class ReviewController : ApiController public IEnumerable<Review> Get() { return ReviewList.GetReviews(); }
0
2410a116b165e2561a0415412f639e37
ff3f7b6ca07af8b3ba98d56253f7930f
Handles the RowDataBound event of the gridPendingBills control.
{ if (e.Item is GridDataItem) { var item = (GridDataItem)e.Item; var data = (DataRowView)e.Item.DataItem; var lrlCompanyName = (Literal)item.FindControl("lrlCompanyName"); var lrlUserFullName = (Literal)item.FindControl("lrl...
1
c27ab6b1cf2a33c4c6a29e81c5310328
13e01131946876051d71d5db09329a9a
发起post请求,并返回字节
namespace HttpClientLib public class HttpClient public byte[] Post(string strUrl, string strPostData) => Post(strUrl, Encoding.UTF8.GetBytes(strPostData));
1
58f9af58e81af2dc860c937cb4407b90
e819afcea8b3ee739d44b2bcd50ebfc6
增加掠夺次数
function Fighter_Boss:AddAttackCount() self.m_attackCount = self.m_attackCount + 1; if self.m_attackCount == Configuration.MakeFrenzyCount then self.m_propertyData:InFrenzy(); end end
0
c741630e851bd05a80b29a74ebe05416
70e92ea439507b28fa68c9dbdf384431
Кэширование данных аутентификации
{ unset($params['oauth_nonce']); unset($params['oauth_signature']); unset($params['oauth_timestamp']); $hash = md5(serialize($params)); if ($this->_cache_enabled == self::CACHE_FILE) { $file = $this->_cache_dir.'/'.$hash.'.cache'; if (file_exists($file...
1
8b2985eb5b3f8a46749624c74bdb3d31
024166710dcc53e98a8c25f6c0277cb6
Compares cells based on number of live neighbours for sorting purposes
{ int liveCount = 0; for (int rowNeighbours = -1; rowNeighbours < 2; rowNeighbours++) { for (int colNeighbours = -1; colNeighbours < 2; colNeighbours++) { if ((row + rowNeighbours < 0 || col + colNeighbours < 0) || ...
0
2e5dc5052f312ab64ab42344f1ca9495
c0e6914f7cf3b205a26a34299c316cc7
Display a listing of the user for specified center.
class CenterUserController extends Controller public function index(ServiceCategory $serviceCategory) { $users = $serviceCategory->users()->latest()->paginate(10); return view('admin.service-categories.users.index', compact('serviceCategory', 'users')); }
1
b7ffa1a02e9d823d3688e5708776ac89
9a93ad9ae0a654f1e1d8ad8b68d4fc2f
Extra seed configuration objects to add to those given on the command line. Configuration objects (typically dictionaries) not database objects.
class PytestTestRunner: # pragma: no cover def add_arguments(cls, parser: ArgumentParser): parser.add_argument("--randomly-seed", type=int) parser.add_argument("--keepdb", action="store_true")
0
971064d8306ab7d9ad653fbb7be08f71
1c00b028dddf16c26524bc4595b7aab2
Iterate over all specified options objects and add all properties to the new options object
for (let opt in optionsObj) { if (this.hasOption(opt) && !this._optionDefs[opt].readOnly) { this.parent[opt] = optionsObj[opt]; } } }
0
24e4cc818a6accdf432bc944886013d1
eddfb7de130f248f40b8e57771abdaa5
original cartpole's calculation for acceleration of theta. For validation.
int CartPole::updateCartPole(float force) { float costheta = cos(theta); float sintheta = sin(theta); float temp = (force + POLEMASS_LENGTH * theta_dot * theta_dot * sintheta) / TOTAL_MASS; float thetaacc = (GRAVITY * sintheta - costheta * temp) / (LENGTH * (FOURTHIRDS - MASSPOLE * costheta * costheta / TOTAL_...
1
e83c2fc733fd254e72b643bf88325532
58f9b1828ffc61ac7b90d2737f234a5a
Gets the details of a specific batch job execution for a specific application.
namespace Microsoft.Hadoop.Client Task<ApplicationDetails> GetApplicationDetailsAsync(string applicationId);
1
dd4386ad7c8adff03cda93ce69782eb6
22d2bb194d3ef7b6d9a536ef8db8a59b
销售额排名报表-合同金额
mobDriver.get("http://v-mobile-at/K3Cloud/KDMobile/BusinessAnalysis/index.html#/SaleRanking") time.sleep(4) select_MobFilterScheme(mobDriver,allOrgName) time.sleep(5) salProReportVal=mobSaleRankingReport(mobDriver) time.sleep(2) mobDriver.find_element_by_css_selector(".head-org").click() ...
1
c951635b9833e15993111706f1198fe5
d8ce6df63fdceb5003e66e6f99f4db5d
Get the addresses for slaves based on :envvar:`MOCK_SSH_ROOTS`
def get_server_config(): return env.SSH_HOSTS
0
09cafd37be51471aac7383ae57d48a75
bc051747ea51718e1d114dc8c14a2f8a
Regression test for enthought/traits#1622.
a = A(t=3) b = B(t=4) a.sync_trait("t", b, mutual=False) self.assertEqual(b.t, 3) a.t = 5 self.assertEqual(b.t, a.t) with self.assertTraitDoesNotChange(a, "t"): b.t = 7 a.sync_trait("t", b, remove=True) with self.assertTraitDoesNotChang...
1
b12a98e3e3345e682a3de13bd9819a2c
7a698ed3f8f03937aeba3059e1fb33e6
This function extracts the emails from copied text.
input_str = ' ' + input_str + ' ' output_str = ' ' + output_str + ' ' emails = re.findall('[a-zA-Z0-9]\S*@\S*[a-zA-Z0-9]', input_str) if len(emails) > 0: print(emails) return input_str, output_str
1
48fc68fdbe5f44428b7e7c3f2d3baa75
b3031ac793d88d5c7cc884233b1fd681
刷新连线位置
{ for(GFXVector v: list) { int luid = v.load_uid; for(GFXVector v2: list) { if (v2.uid_end_connect == luid) v2.uid_end_connect = v.uid; if (v2.uid_start_connect == luid) v2.uid_start_connect = v.uid; } } ...
0
7974110ae090bcd81cdff7cbc1263cda
342921f03a34c991e5f377a1385003f9
to get shortest distance b/w every pair of vertices
void allPath() { for(int i=0;i<numNode;++i) for(int j=0;j<numNode;++j) dist[i][j]=arr[i][j]; for(int k=0;k<numNode;++k) for(int i=0;i<numNode;++i) for(int j=0;j<numNode;++j) if(dist[i][k]+dist[k][j]<dist[i][j]) dist[i][j]=dist[i][k]+dist[k][j]; }
1
468b21eae403ea000ea75b34c1453950
7f61448ad6da3ef0f9cb03f40c5be655
Delegate to inner implementation
cases like (1)
0
63a81233aa86e833cb0b398727ba1980
6deb57d9686869d197ece695eac9d28d
retorna verdadeiro se o campo obrigatorio for preenchido
class Ca_Model_Endereco_Crud_Table extends ZendT_Db_Table_Abstract public function isRequired($field) { return in_array($field, $this->_required); }
0
ed61f66e465cb89b635a32bac748c9c2
bc0d65caf540c5cefb58ff99ad1d88a8
Lance l'enregistrement des sorties HTML
Output(void) { FILE *fp=NULL; struct Node *n; struct Fode *f; WriteHeaders(gList); WriteHeaders(eList); WriteHeaders(sList); WriteHeaders(vList); WriteHeaders(fList); WriteHeaders(tList); RunString(htmlLeft); RunString(htmlRight); for (n=gList; n; n=n->next) { f=Setup(n, &fp, 0, NULL); if (n->desc) { ...
1
11163a8a0d0e1c9f48888f83a31e0649
9f681d0bbecba7c87b678120295c7486
Есть ли выставленный заказчиком счет
{ return (bool)Db::getInstance()->getValue('SELECT `id_cart` FROM `'._DB_PREFIX_.'orders` WHERE `id_cart` = '.(int)$this->id); }
0
227759feabc8c1b0b93609a333e83463
81dd1d292162ff8f840c2072006c76cc
A textual representation of the model root
public class AlternatingModelTree extends AbstractClassifier implements WeightedInstancesHandler, IterativeClassifier, Drawable, TechnicalInformationHandler, RevisionHandler public String toString() { if (m_PredictionNodes == null) { return "No model built yet."; } return m_PredictionNodes.get(0).t...
1
04d975e66542fadf04d1285b9eda4160
b93c97cd116b0d57b5cefc43700647e2
友盟自动更新
public class MeFragment extends Fragment implements android.view.View.OnClickListener private void downNewApp360() { UpdateHelper.getInstance().init(mContext, Color.parseColor("#0A93DB")); UpdateHelper.getInstance().setDebugMode(false); UpdateHelper.getInstance().manualUpdate("com.kalide"); ...
0
a0fde2c2638e0a2c949ad67815f90451
3a4cdab0dacf62d1463d2eb71ecd6109
DD/MM/YYYY to YYYY-MM-DD 格式转换
function dateParse($date){ var_dump($date); $dateArray = explode('/',$date); $dateArray = array_reverse($dateArray); return implode('-',$dateArray); }
1
8b6f742f19274ed0aa3986456bf5ac85
d4acb4e602b32c85930468d699391063
是否有在线预览的权限
if (this._isPublish && this._clinet.configLocalScreenPublish) { return true; } return false; }
0
5a83e2ab7282a306eb27cb04a3834c8b
3dd541148bd6468aed47b073a90a31e5
在group-by, order-by中允许使用alias
ISimpleGroupByTable GroupByWithAlias(String col, String alias);
1
da1bff754cb90c9cffaf936ebb6b4653
e3df885f278b70f8ae99f16bd0d20a38
从网页源代码中解析出重定向的地址信息 只有登录成功才会有值,否则为NULL
{ redict = ""; html = responseToString(res, encoding); int start = html.IndexOf("http://"); if (start < 0) return false; int end = html.IndexOf("\"", start); if (end < 0) end = html.IndexOf('\'', start); ...
1
efcedbda273e6d478ea5fbdcbbf7b2be
324af20236197ce9f85a50aa6f0540b7
function to get a list of ranges to be downloaded by each thread
ranges = [] offset = int(self.total/self.num) for i in range(self.num): if i == self.num-1: ranges.append((i*offset,'')) else: ranges.append((i*offset,(i+1)*offset)) return ranges
1
95aaabfe1ae9f2e85a6d55e75be92d2b
dd896e86ebbfbfacd4d2de525733f90b
retrieve removal sign of the rule
class HM_Rewrite_Rule public function get_regex() { if ( substr( $this->regex, 0, 1 ) !== substr( $this->regex, strlen( $this->regex ) - 1 ) ) return $this->regex; return $this->regex; }
0
b41905647dd42ceb5440885c1fffe1aa
592aca00ef8aa4b088b7d6282218e04b
Stores information about given node in the AST of SYGUS benchmark specification.
self.type = node_type self.data = data self.children = [] self.original_info = copy.deepcopy(self.data.get('info'))
1
57de7fb34c2eab0f871a76433718c842
447cf7e7e5b3e2bc9b84c3c17553cde6
Müşteri inceleme sayfasını derlemeye yarayan method
function seeProfile() { $profile = getProfile(); require("../../view/customer/profile_view.php"); }
1
b16c10538370fb6e13767492f46f5cb7
4b5d7edc3f5ecdd5674bbe1da97f5ec7
Verify Humidifier Drawer View Consumes Entire Screen on the WeMo App
w23 = 2 * self.device.display['width'] / 3 s = (w23, 0) e = (w23, self.device.display['height'] / 2) self.device.drag(s, e, 500, 20, -1) self.vc.sleep(1) if self.vc.getSdkVersion() >= 20: self.device.drag(s, e, 500, 20, -1) self.vc.sleep(1) ...
0
a7b249a27f12bcac1e044634fa4e3371
913c23ccbf374b4b99460d45acfd9a50
Checks if given parameter is a perfect square or not
{ var test1 = Math.Sqrt(5 * Math.Pow(value, 2) + 4); var test2 = Math.Sqrt(5 * Math.Pow(value, 2) - 4); return test1 % 1 == 0 || test2 % 1 == 0; }
0
f47a47f63b2da3af22e4d39fc7ac2cec
df5f80123da8b8bad92b2924c5d14446
认证商家降级
class Merchant extends Online public function audit(){ $up_role=input('up_role',2); if($up_role<2){ $up_role=2; } $role_data=Db::table('role') ->where('role_id','>','1') ->select(); $this->assign('up_role',$up_role); $this->assign('role...
0
db826e9edbfefdf9274635ff3242e01f
8300cd62b4438fd2ca2c28eb4577d9f8
Removes the rope.
public class GrapplingGun : NetworkBehaviour void StopGrapple() { lr.positionCount = 0; Destroy(joint); InitiateDestroyRopeServerRpc(clientId); isGrappling = false; }
1
a992a97b63ba8eb78a83a4299a4ddbdb
bee4b3a9a1c1e01ec2bbb4edb3d5be99
Función que realiza la búsqueda tabú y va actualizando la mejor solución del sistema
Estado* busquedaLocal(Estado* actual) { bool improve_flag=true; bool dlb[tam]; for(int i = 0; i < tam; i++) dlb[i] = 0; while (improve_flag){ improve_flag = false; for (int i = 0; i < tam && !improve_flag; i++){ if (dlb[i] == 0){ improve_flag = false; ...
0
dce695bb9c70cf71196be1459e1a21d1
f58b31dbe5e5a47c8788dbd58e9f918d
Validates the MaxLength constraint of '<em>SAFP Ttext Type Mandatory Max10 Car</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
int length = safpTtextTypeMandatoryMax20Car.length(); boolean result = length >= 1; if (!result && diagnostics != null) reportMinLengthViolation(Pt1_01Package.Literals.SAFP_TTEXT_TYPE_MANDATORY_MAX20_CAR, safpTtextTypeMandatoryMax20Car, length, 1, diagnostics, context); return result; }
0
f35240b9f746041d77cf89c568160525
15f5d82b6b12b9ae65dda1a3ac9ff8c8
いいね!がついていたshortcodeを登録する。
function responsive_slider_register_shortcode() { add_shortcode( 'responsive_slider', 'responsive_slider' ); }
0
e527870c4c3bd397a773874f6a74c550
3413594eff3ee0ea07ee4cb53d38efdd
@brief Release the per-context region list lock
void release_runq_lock(void) { ihk_mc_spinlock_unlock(&(cpu_local_var(runq_lock)), cpu_local_var(runq_irqstate)); }
0
59eaf7702f4cd0853036959f292c609d
fe2ad77c64120c77f706160861445303
This method is used to determine whether the bundle adjustment will solve for target body pole right ascension velocity.
namespace Isis bool BundleObservationSolveSettings::solvePositionOverHermite() const { return m_solvePositionOverHermiteSpline; }
0
07793ce01e2d355d0e0eb671a9c6b84e
f8f87f014b1c09fe4af33942cb119771
Sync room messages to the database.
message = event['message'] self.send(text_data=json.dumps({ 'message': message, 'sender': event['sender'], 'room_name': self.room_name, 'timestamp': datetime.now().strftime(DATETIME_FORMAT) }))
0
80420ce0e8e557d24ab342261f31b34c
c8851aea3dcc1aa6265dfce85c33fe59
Get a randomized three digit value used to play "the discover number game". - First, we create a 10 number list. - We randomize the list positions. - We get the 3 first values of randomized list and generates a string number list. - Finally we returns a number string concatenating all the digits.
one = randint(500, 778) two = randint(100, 999) three = randint(1000, 9999) return str(one) + "-" + str(two) + "-" + str(three)
0
404154f4df57ea6c2a677bff1ea699a0
eebf8e6b856527cfefa6abe783667b6f
Rate (/s) counter for ssltotsslv3sessions.
try : return self._sslbesslv3sessionsrate except Exception as e: raise e
1
58cdaee58663fc822fbd419798eb1eb6
411e00a1482de44b5826a8885d482c22
@brief 在内存池pool中申请大小为size的内存, 并把这段内存用0填充
{ VOID *AllocatedAddress; AllocatedAddress = AllocateZeroPool (size); if (AllocatedAddress == NULL) { return NULL; } AppendMemInfo (AllocatedAddress, size, AllocatedAddress, size); return AllocatedAddress; }
1
40d0ceac7accab7eebf3212ad7e83228
1ff44c999f217b2bee5744b76dd98170
Listener for the grid area's left button up event.
namespace Framework.UI.Controls public static class DataGridAttached private static void OnDataGridMouseLeftButtonUp(object sender, MouseButtonEventArgs e) { DataGrid dataGrid = (DataGrid)sender; UpdateColumnSettingsFromColumns(dataGrid); }
1
e7bf8ec6a8af9fd24bceaf403e03e938
39197acd82df2ba715091d1de3d5179e
Test all-pairs shortest paths sizes for a directed graph.
def test_shortest_path(): directed = True g = gt.Graph(directed=directed) N = 11 g.add_vertex(n=N) edges_list = [(0, 1), (0, 2), (0, 3), (0, 4), (0, 7), (0, 8), (7, 8), (7, 9), (7, 10), (4, 5), (5, 6), (1, 2), (1, 4), (8, 10), (0, 9), (9, 10)] g.add_edge_list(edge_list=edges_...
0
22f6947a77b16a8756483e4a92ca920b
5cbaddd527eb26510e3e73d1a0e18fd0
This function sets a flag to indicate end of a CapSense scan. cy_stc_active_scan_sns_t* : pointer to active sensor details.
void CapSense_ScanEnabledWidgets(void) { CapSense_csv = 0u; CapSense_sensorIndex = 0xFFu; #if (CapSense_DESIGN_TYPE == CapSense_ONE_CHANNEL_DESIGN) CapSense_sensorIndex = CapSense_FindNextSensor(CapSense_sensorIndex); if(CapSense_sensorIndex < CapSense_TOTAL_SENSOR_COUNT) { ...
0
abce581821711c3f14904b99ae15f736
9006e4bb29fc57b15abf32fc743d364a
Returns the step from the file format name of TensorFlow checkpoints.
def _prediction_file_to_ckpt(path): return int(path.split("_")[-2])
1
88d3c42f6350c055e6ac5297d14096b0
202d4c3041e1f11fa0a312e2a37474fa
copied from https://github.com/GoogleChromeLabs/web-push-codelab/blob/master/app/scripts/main.js#L31-L44
var padding = '='.repeat((4 - base64String.length % 4) % 4); var base64 = (base64String + padding) .replace(/\-/g, '+') .replace(/_/g, '/'); var rawData = window.atob(base64); var outputArray = new Uint8Array(rawData.length); for (var i = 0, max = rawData.length; i < max; ++i) { ...
1
adc72e95107e8af67bff0bbb01bee1d4
2bcb5970a903e9129e814d78e3035434
Get the zookeeper connection string
public class CuratorFrameworkFactoryBean extends AbstractFactoryBean<CuratorFramework> public String getConnectString() { return connectString; }
1
c6e42a72bdacf71574c9b11f73b341e8
0b2724af9f7126710bbbd7ba5ada5cfe
获取中间的分页显示
const { totalNumber, pageSize, middlePage } = this.props; const { currentPage, pageCount } = this.state; let fixPage = 0; let viewPageStart = 0; let viewPageEnd = 0; let ret = []; fixPage = middlePage % 2 == 0 ? 1 : 0; if(currentPage <= middlePage) { viewPageStart = 1; ...
1
6bf9ab6fdfbe38cc46b114a634a54417
a7f9656095de37ce3c2f57e7421b51fa
Enable clock for PORTE and allow time for clock to start
SYSCTL_RCGC2_R |= 0x10; delay = SYSCTL_RCGC2_R; GPIO_PORTE_AMSEL_R &= ~0x07; GPIO_PORTE_PCTL_R &= ~0x000000FF; GPIO_PORTE_DIR_R &= ~0x07; GPIO_PORTE_AFSEL_R &= ~0x07; GPIO_PORTE_DEN_R |= 0x07; }
1
ce190201b0d6da6e5512ef23d89ae64d
8f2ec611b28c846e91fbb79c9ace7d34
将其他额外文本参数和文件参数按multipart/form-data格式转换成HTTP Body中的字节数组流
public class ServletServerHttpRequest implements ServerHttpRequest private static InputStream getBodyFromServletRequestParameters(HttpServletRequest request) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(1024); Writer writer = new OutputStreamWriter(bos, FORM_CHARSET); Map<String, Str...
0
7946dc94ba2a9ee44d33c1da50719513
ec61f9ca59641ea4d4720baa52ad9629
return a list of the node id itself and the ids of all its ancenstors.
class Node(object): def getAncestors(self): retlist = [] if self.parent: retlist += [self.parent] + self.parent.getAncestors()
0
5536c4008686d56c7b9df63dc60e6cfa
fbf7f176ef2b4d6e1ba693d9f9a7c83d
Update variational parameters. Sets new values of all variational parameters by adding given values.
class Iteration: def update_params(self, ftildes): old = [] new = [] for tilde in ftildes: old.append(str(tilde['theta'])) new.append(str(tilde['tilde'])) self.N_minus_1.update_params(old, new)
0
0383f246ef1e3f2185cec3cafeb20164
d512c6fa0e6b92f00456d52cfe3322ad
通过 jbpm_node 的id 获取 自定义 流程节点信息
OaBpmConfForm getFormByNodeId(String node);
1
2062d62a710ea06cc5c78960c2bf516d
850a0e50eba85a8619396b32512d60f4
Returns a new object of class '<em>FX Existing Model</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
public abstract class ModelAccessor public abstract FxModel newModel(URL baseURL, List<ImportDecl> imports, List<FxNewInstance> defs);
0
50da7eda6fec51a95bf23b5ef841574d
659cc5f1582929fb4560a9a6846d2550
Closes the campaign system
int _Campaign::Close() { Campaigns.clear(); return 1; }
1
17231cd2796440c5fe3d6774dd6572a2
f823caf97cb51634be0d55cdce1fc5a9
Validazione dei campi del form di pagamento, ottenuta con Java Pattern
String errorMessage = ""; if (NumeroField.getText() == null || NumeroField.getText().length() == 0) { errorMessage += "\tParola non valida!\n\n"; } if (DataField.getValue() == null) { errorMessage += "\tData non valida!\n\n"; } if (errorMessage.l...
1
542e85ad7a66806449fc2e0d3b49fc80
c57ef765e8ca16887c27d4d02581487d
保存导入用户信息
{ $resArr = [ 'code' => 0, ]; $url = self::getReqUrl('import_user_account'); $importRes = self::sendPostReq($url, 'json', $userImport->getDetail(), [ CURLOPT_SSL_VERIFYPEER => false, CURLOPT_SSL_VERIFYHOST => false, ]); $importData ...
1
bd42cce73985ef85ff58cf4324dc1a55
15e0d5f32135be03fb30a9d58ff78c5d
默认基于dubbo协议提供服务
System.setProperty("dubbo.application.logger","slf4j"); ApplicationConfig application = new ApplicationConfig("api-echo-provider"); application.setLogger("slf4j"); RegistryConfig registry = new RegistryConfig(registryUri); ServiceConfig<EchoServiceImpl> service = new ServiceConfi...
1
105af60084c0a7b336f0e2c18e365115
0897a0184a8d01293dfecbce15ce5a23
Find the gini index of a set of data by counting the number of assams and the number of bhuttans
def gini_index(): pass
0
3187946454c13f8833dc8d32627df231
ff4da00c851695ebb6dd99ea66125571
Parsing the Output XML from SPARQL Query result using XML DOM Parser
DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); DocumentBuilder builder = factory.newDocumentBuilder(); InputSource is = new InputSource(new StringReader(EntityUtils.toString(httpResponse.getEntity()))); return builder.parse(is); }
1
e8e63474968d93944d353fabc6f5ff67
5d397de4898e4c40d842369488bf15fe
Returns a list of running tunnels with status and metrics information
class WorkerClient public function listTubes(): array { $this->connection->write('list-tubes-watched'); $status = strtok($this->connection->read(), ' '); if ($status === 'OK') { $data = $this->connection->read((integer) strtok(' ')); return $this->decoder->decode($dat...
0
6c1ee24813017306a718ff0107038312
9851d4244bd056360e5afb879cd1b691
A function (supporting the same basic protocol as :class:`.BSplineFunc`) which is given in terms of a user-defined callable.
class Function_CT_Signal(CT_Signal): def __init__(self, f): assert is_callable(f), 'f must be callable' self.f = f
1
d7550348bd85ea469ee7b594e34824a2
29e6594301e70ec056576168a06eae8e
Encodes a <see cref="string" /> to its equivalent ROT13 representation. This function either encodes a <see cref="string" /> or decodes an already encoded <see cref="string" />. <para>Example:"http://example.com/" is encoded to "uggc://rknzcyr.pbz/"</para>
namespace BinaryTreeProject.App.Models string Encode(string originalString);
0
09d8816dda612a3b5016f4057282402e
21300e63aec70b6366f24de1f1d17669
hàm thực hienj việc lấy thông tin của bác sỹ nội trú
try { const url = `${api.residentNurse.getNurseInfo}${convertPostToGet(payload)}` const res = await fetch.get(url, payload) return res } catch (e) { console.log(e) } }
0
a35e78982a3f14ef7a15ae454d9bbb47
28fee4cd51425063366cb8b00689ad9d
Gets all products on order.
class Order implements ArgumentInterface public function getProducts() { $products = []; $order = $this->checkoutSession->getLastRealOrder(); $items = $order->getAllVisibleItems(); foreach ($items as $item) { $product = $this->objectFactory->create(); $product...
1
75acebb7a3db3260d2154d1b75a9b861
8e99673ffaf8d5589039061eb34d73fc
获取发送协议函数名称
class ProtocolFunction: def send_protocol(self, arg_dic): flag, data = self.pt.make_def(self.socket, self.protocol_name, arg_dic) return flag, data
0
580264e4c952a2a3321d6ab3ae2100f4
f07d27b46ee9e7c19a9128d901a62276
获取最新的token,如果本地存在并且没有过期,则使用本地的,否则请求新的token
if not os.path.exists(os.path.join(os.path.dirname(os.path.abspath(__file__)), TOKEN_FILE)): access_token = save_token(TOKEN_FILE) with open(TOKEN_FILE,'r') as tf: line = tf.read() if line: access_token = line.split(',')[0] expires_in = line.split(',')[1] ...
1
f5b52c2672521f29ca014880c2a4577c
e17915dde69aa4b30f3707546e807671
このオブジェクトのCSVパラメータを、指定されたCSVパラメータにコピーする。
{ $arrCSVFrame = $this->lfSetParamDefaultValue($arrCSVFrame); foreach ($arrCSVFrame as $item) { if ($item['status'] == CSV_COLUMN_STATUS_FLG_DISABLE) continue; if (preg_match_all('/\(.+\) as (.+)$/i', $item['col'], $match, PREG_SET_ORDER)) { $col = $match[0][1...
0
3d78f5e9131a547f7d4b725e26dd339a
df8c75bfd339dc92fef0c93ac50f836a
Get the nursery based on the sector Id
{ return ((ino == CLSTART) ? fs->ff_rootcl : BNtoCN(ino / DEpSEC)); }
0
63923d3164636764f8a2dc49721c1147
4de949c21ada01f57c92b5063a86d7f0
获取诗的分页查询
namespace ZL.Poem.Application.Poems PagedResultDto<PoetDto> GetPagedPoets(PagedResultRequestDto dto);
0
6a14783cd1697565aca9f051c1173bc1
461909924aacfc1d30734d08e63f8a03
This function creates a virtual Saint
{ if (OBJECT_RANGE(lpLevel->SaintStatueIndex) != 0) { return; } int index = gObjAddMonster(lpLevel->Map); if (OBJECT_RANGE(index) == 0) { return; } LPOBJ lpObj = &gObj[index]; int px = 14; int py = 95; lpObj->PosNum = -1; lpObj->X = px; lpObj->Y = py; lpObj->TX = px; lpObj->TY = py; lpObj->OldX = px...
1
0695dbb7034a23afb21b50d9232e5cc9
2fe6c09547100ea21ab66e66c4788505
Set up new board for each test. Fresh piece position and default player turn to A
self.board = [['-' for _ in range(8)] for _ in range(8)] for square in [(0, 0), (7, 0), (7, 7), (0, 7)]: x, y = square self.board[y][x] = 'X' self.n_shrinks = 0 self.turns = 0 self.phase = 'placing'
0
f965a08a991808a7db78aaf3d17b36a9
4bab0b0529e517053c35deb743a5b496
Creates a new Sorteo entity.
class SorteoAccessControlHandler extends EntityAccessControlHandler implements EntityHandlerInterface public static function createInstance(ContainerInterface $container, EntityTypeInterface $entity_type) { return new static( $entity_type, $container->get('entity_type.manager') ...
0
880a3e0f558b1939229bb59ba8f46ba1
798c2b29d894a1d7a0a9cabcdb0da1f8
Given a dict of xy coords and vals, groups diagonal values together
y = x[1] inner = [] for indx in xrange(0, len(y), 20): tmp = [item for sublist in [[y[indx]], y[indx+1:indx+20]] for item in sublist] inner.append(tuple(tmp)) inner = sorted(inner, key=lambda x: x[0]) return (x[0], inner)
0
64ce18aca4a8038c241957530176ec67
0b39758558fcc1e4aafc5f847465c4aa
#DESCRIPTION: Scrape the previous day's game data and compile in a master file. For use with Chron job to automatically pull the previous day's results
def mp_scraping(mtchday, game_df): if not os.path.isfile(ppj('OUT_DATA_FOOTBALL_CSV', '{}.csv'.format(mtchday))): temp_urls = game_df[(game_df['mtchday_id'] == mtchday) & (game_df['doable'] == 1)][ 'game_url'].unique().tolist() dict_list = [] with mp.Pool() as pool: o...
1
6a98025fc595ff2580bf907a608f295b
1da771445c0999e159daf7aebec40a9f
Eval the right hand side node.
def eval_rhs(context, ast_node, expected_type): if isinstance(ast_node, ast.StringLit): return ast_node.inner_val() if isinstance(ast_node, ast.Ident): return context.get_variable(ast_node.inner_val()) if isinstance(ast_node, ast.JsonObj): return eval_object(context, ast_node, expect...
1
24a0a52cd9a404db765b922316045d1c
8c6360d4a56ef23ba075a0eac263b7ba
allows special messages to be sent for the three special cases of craps, though it's unclear what should count as "boxcars" for dice with more/less than 6 faces.
class Ticket(object): def add_three_way_box_combo(self, amount): self.add_bet(BetType.THREE_WAY_BOX, amount) self.add_bet(BetType.STRAIGHT, amount)
0
5a9e888ae0a5c383dbf9bfd18e8eacda
f639e820a2879b49708f6de7c189de6e
餐桌类型统计
List<Map> countByType();
1
36ba0a993334c6faf2ce664ec4c7fa2d
c9f8cb5c5a1284991545fc124de17ece
전달된 idTable에 근거하여 주문한 테이블에서 Bill를 삽입
public class OrderService public List<Order> getOrderByTable(long tableId) { List<Order> orderList = new ArrayList<>(); return orderList; }
0
f2bc692b3ceab4065aa592c15ab39df0
0b2f9cc3719182653169cb495641b50d
Delete Chars
DeleteChars( Entry *entryPtr, int index, int count) { char *string = entryPtr->entry.string; size_t byteIndex, byteCount, newByteCount; char *new; int code; if (index < 0) { index = 0; } if (count > entryPtr->entry.numChars - index) { count = entryPtr->entry.numChars - ...
1
45623b6cf52bd81b655c362b1cd29fa8
c1a3ed454ef5691474bca58b92fa21de
Pretty-print CSV file to stdout.
const csvStream = format({ headers: true, quoteColumns: { json: true }, quoteHeaders: false }); csvStream.pipe(process.stdout).on('end', () => process.exit(0)); rows.forEach(row => csvStream.write(row)); }
1
6f594c6dae5f7e96bc296be51d1f2b4c
aa3f06b1d14cf4166b4ce6d4ca702fe7
Sets the schema of the database function.
final class OrmDomain function setDbSchema($dbSchema = null) { Assert::isScalarOrNull($dbSchema); $this->dbSchema = $dbSchema; return $this; }
1