query_id
string
corpus_id
string
query
string
code
string
label
int64
45c437eb33394ca0bb2a0a06a1dcb50f
eb88c44d1d4f250f6399a2d174abc663
Sets the digital asset.
namespace Src.Smartworks.Api.Controllers public class ProductsController : BaseApiController [ResponseType(typeof(ProductDigitalAssetResponse))] public IHttpActionResult PutProductDigitalAsset(int productDigitalAssetId, [FromBody] ProductDigitalAssetModel productDigitalAssetModel) { ...
1
a66aeb57d123e3204d36697aeb10480f
e2c41813370bfd243e9c30d103727e8f
função criada para desconectar todos os terminais que estejam conectados ao roteador que será excluído
{ #ifdef __OS_WINDOWS__ DWORD dwCb = 0; DWORD dwConnections = 0; LPRASCONN lpRasConn = NULL; for (int iExist = 0; iExist < g_arrayHconn.GetSize(); iExist++) { RasHangUp(g_arrayHconn[iExist]); } if (g_arrayHconn.GetSize() > 0) { CPubFunc::NewSleep(5000); } DWORD dwRet = RasEnumConnections(lpRasConn, &dw...
1
1d27d071d1d187c46d41e8cabc6e038f
3c56859636e9750d316176ea0d8aaa86
Initializes the serial writer.
{ esp = uart; serial_initialize(esp, speed); serial_flush(esp); serial_enable(esp, true); }
1
41ad036a9bdc18700b47dbe30891c88c
15a3ca26374cb0acf26f3ed8ee18d536
https://docs.pro.coinbase.com/#get-products
namespace BitMax.Net public class BitMaxClient : RestClient, IRestClient, IBitMaxClient public virtual async Task<WebCallResult<IEnumerable<BitMaxProduct>>> GetProductsAsync(CancellationToken ct = default) { var result = await SendRequestAsync<BitMaxApiResponse<IEnumerable<BitMaxProduct>>>(GetUr...
0
bb9ecb9229819014a3773b40e6d68def
209103176a962f86d30ce23d4ddcabcf
The MINIMAL value for any of the version fields.
class VersionRange public static function getMinVersion() { return new AIS2Version(2, 3, 22, 52); }
0
ea0959766bf2346485aefcd29b6cbefc
1016a1af362e7c1331e1f517fcc0dda0
根据一个系统ID联动的查询出相应的Account
@Service public class AcctManagementService public List<SystemAccount> getSingleAccount(String userID){ return accDAO.findByuserID(userID); }
0
c21ab17b0544719929c264d12bcb6f71
57ad34d3c59830ea45daf2e6bf5be04e
A list of all pipe names
List<Pipe> getPipes();
0
c463454829cf264aaaa2267ad0c255e9
e3f728d580c1703004b65bb750d2b85e
获取是否业绩池(0:不计入,1:计入)
@Table(name = "cl_performance_pool_list") public class ClPerformancePoolList public void setIfPerformancePool(Integer ifPerformancePool) { this.ifPerformancePool = ifPerformancePool; }
0
5a50dff763d46ec660626795fd33a30d
9472e64ad83ff72faf9cd50dcc95147f
分页查询已办理的请假申请
List<Object> params = new ArrayList<Object>(); params.add(employeeId); params.add(DataConstant.EXIST); StringBuilder sb = new StringBuilder(); sb.append( "select a.absence_apply_id, a.absence_apply_num, a.employee_id, a.apply_type, a.apply_reason, a.apply_begin_time, a.apply_end_time, a.apply_duration, a....
1
f6c24b1255704ce81577365b78205664
170f3a4c95ce19441a13c226576278df
don't attempt to parse empty bodies
namespace Azure.Storage.Test.Shared public class StorageRecordMatcher : RecordMatcher private static object ParseBody(RecordEntry entry) { var body = entry.Response.Body ?? Array.Empty<byte>(); if (body.Length > 0 && entry.Response.Headers.TryGetValue("Content-Type", ...
1
e6a0f6c989933d419610084b1b858bfa
192e12f859c7f1827bca2760cd1242a9
function to add new evraklar
Id=int(input("Mehsul idsi: ")) ad=input("Mahsul adi: ") qiymet=float(input("Mehsul qiymeti: ")) say=int(input("Mehsulun sayi: ")) kateqoriyasi=input("Mehsulun kateqoriyasi: ") mehsul={ "mehsulId":Id, "mehsulName":ad, "mehsulQiymeti":qiymet, "mehsulSayi":say, ...
0
d5f365e323ff05f174f198c77bb68be3
e5ef529b10623a891d0a95ba3bb6adcb
Fetch a list of books that a user has rented on their account.
_result = [] for k,v in _rented.items(): if int(k) == userClass.GetCardNumber(): _result.append(v) return _result
1
3ea5d63811658528488ddc26bf7b2b83
c24e3215b615d7444e03b9541022e22f
配列からランダムに一つ返す
class Random def sample(array) return nil if array.empty? array[int(array.size)] end
0
362a2fbb9ac5efb17f26226d95a7d346
f5078a96f04b122aeb0005cb3c6eb133
打印数组的对象布局
{ int arr[4] = {1, 2, 3, 4}; printf("打印数组 arr : %#X \n", arr); printf("打印数组 &arr : %#X \n", &arr); SeqList seqList; printf("初始化前的结构体对象地址 seqList : %#X \n", seqList); printf("初始化前的结构体对象地址 &seqList : %#X \n", &seqList); InitList(&seqList); printf("初始化后的线性表的大小 : %d \n", seqList.length)...
1
09cc6ea3317107cb5be1ff5e616c62d6
1681cb807fc1a61f7be4877af9261cc5
ネストしたBeanの場合でも項目名が先頭に付加されること
Text text11 = (Text) this.chibaBean.getContainer().lookup("i-11"); Text text13 = (Text) this.chibaBean.getContainer().lookup("i-13"); assertValue("4", text11); assertValue("3", text13); }
0
00fd4ecc827c3b0b5f7705a04334f7af
e5d80ff893fab79879e81c4ddc3dafa1
Returns a new object of class '<em>REPRESENTATIONREFERENCETYPE Type</em>'. <!-- begin-user-doc --> <!-- end-user-doc -->
DOCUMENTSREFERENCEType createDOCUMENTSREFERENCEType();
0
45dfcb8e8069e62f5ae265fb76e4d20d
98d0d8607bf67fe5b6c4a7542e2bcd58
Takes in two pointers, each pointing to a string. Joins the two strings together into one long string. Returns a pointer to this new string.
char * StrJoin(char *s1, const char *s2) { StrCopy(&s1[StrGetLength(s1)], s2); return s1; }
0
5687e7b0d520ad21c0094ba289d6c7ec
9934135f1ea3dc6e00bc6f19b61c1f73
Runs prediction on a given entity and generates multiple role hypotheses and associated probabilities using the trained role classification model.
def get_ner_predictions(ehr_record: str, model_name: str = "biobert", record_id: str = "1") -> HealthRecord: if model_name.lower() == "biobert": test_ehr = HealthRecord(record_id=record_id, text=ehr_record, tokenizer=biobert_ner_tokenizer.token...
0
783e20a2692cf327fdb4b26d180f7451
c0fac5021a8c8a3f9b3a554b10c228c7
@brief 直连广播超时事件(启动后1.2s没有连接)
namespace SAEANetworking namespace SAEADiscovery public class SAEANetworkDiscovery private void TimeOutCallback(object state) { StopReceiveBroadcast(); OnTimeOut?.Invoke(); }
1
f12e2a11d942f04007e5f311f1e1d614
e51ecfc63a12d46c345e819c1ad90aa6
批量删除正在下载任务
namespace ZJY.Framework public class DownloadManager : ManagerBase public void RemoveAllDownload() { m_TaskPool.RemoveAllTasks(); }
1
8aa370455932752c4a398edf16b2924a
d81222fd679a4f2957dd151916db69e6
Sets the internal timestamp to beginning of the current hour
final class Temporal public function startOfHour() { return $this->withTime(null, 0, 0); }
1
8fea9fea5ca26310c69251c8a7456f34
74e8f7e5d96faeda39ead63a9ca0b574
checks a new business profile has been created upon submission of valid data
data = {"addresses-0-addy_type": "Mailing & Physical", "addresses-0-city": "testville", "addresses-0-state": "OR", "addresses-0-street": "123 test st.", "addresses-0-zipcode": "97777", "addresses-INITIAL_FORMS": "0", ...
1
da3cd06599162a55a14e5020ebf1cbc0
5f5bd92aefe526a0fcfa2c9faccf4263
Determines whether the mouse cursor is near the edge of the screen.
{ Vector3 __mouseOnPlane = MouseRelativeOnPlane; mouseLocalPosition = transform.InverseTransformPoint(__mouseOnPlane); localPositionTargetingScreen = new Vector3(mouseLocalPosition.x, 0, mouseLocalPosition.z); return (Vector3.Distance(a: Vector3.zero, b: mouseLocalPosition) <= radius); }
0
e01ba4674fa26d3242da4ee35a20693b
3cf20b5d95cd7c7569be599de8bc5c3e
Does 8x8 2D DCT on an image represented by pixel blocks.
def dctBlock(blockList): return [cv.dct(np.float32(block)) for block in blockList ]
1
6c9fd94f0fb1b7864cac1f774489e314
ad58d2e5c554a33b0d94abb701db3311
Performs this operation on the given input
T apply(T input);
1
a01c500e4b12a9ff79d2e097cce6eea3
1bc4e3f2fa9723fe0092b469d72a05f8
Adiciona partidas no contexto.
{ services.AddControllersWithViews(); services.AddDbContext<TennisContext>(opt => opt.UseInMemoryDatabase(databaseName: "Test")); services.AddTransient<IGameApplicationService, GameApplicationService>(); services.AddTransient<IGameService, GameService>(); ...
0
3802f2b00543968187ae1c44f67d9c9a
4173463a892a0bf1f7842da56f51c725
获取hashKey对应的hashMap
@Component public class RedisUtils public Map<String, String> hashMapGet(String key) { HashOperations<String, String, String> hash = redisTemplate.opsForHash(); return hash.entries(key); }
1
5eb96ec2011d0d177712f4ed4a07037a
a0a86d643684a81366df369635c17ffb
###################### CALLBACK: JOINT VELOCITY ######################################################################
class TeachWindow1(QMainWindow, Ui_TeachingForm1): def joint_callback(self, msg): qq = np.zeros(self.n) for i in range(self.n): qq[i] = msg.position[i] self.state_qq = np.copy(qq) self.state_t = self.state_t + self.T
0
9f55db3cf1b14050d4a0f7a4e395aef9
19303204d83bc5fa6ae6dcc3d72727b0
Updates the status of the buttons based on mouse movement.
public class NavigationActivity extends AppCompatActivity public void updateButtons() { int currentRow = mPlayer.getRowLocation(); int currentCol = mPlayer.getColLocation(); switch (currentRow) { case 0: mMoveWest.setEnabled(false); break; ...
0
3d575056a81de397dd37804f2404d079
42ae8a9e90fc7ced560921ad790bfdbc
make an aiming pointer on spawn
{ aimingMode = true; projectile = Instantiate(prefabProjectile) as GameObject; projectile.transform.position = launchPosition; projectile.GetComponent<Rigidbody>().isKinematic = true; }
0
7a88c804f55f3154745a93351ad652c0
41ddb1b16506938f411a4c38c097c8e4
Helper method to read the incremental part of the history file. Note: the call to this method should be guarded by the mutex that protects the history file.
public class FileOpster public int readHisData() { return jjHisQueueThread.getOne(); }
0
7b56074d1a27289becf2ee1b1d9aebb8
f20e61dca8161ddbca2d85cf5cd4327d
converts the tfrecords files to images and labels and returns the parsed dataset
class TFRecords(object): def process_dataset(self, name, directory, output_directory, num_shards, labels_file): filenames, texts, labels = self.find_image_files(directory, labels_file) self.process_image_files(name, filenames, texts, labels, num_shards, output_directory)
0
8d94107f054215c9a31d27d0e6c078bc
c47a454b952003f8b77b62dec392c4bb
Regresa el mapa de las pistas.
public class PaqueteAtacar extends Paquete implements Serializable, Cloneable public HashMap<String, Number> getMapEnemigo() { return mapEnemigo; }
0
755c6c07e53b9f039fd04985231c87e0
cb10b72c8be7be962b2ff10d68787694
Construct a categorical distances matrix.
n_samples, n_features = X.shape if y is None: n_nonzero_cross_dist = n_samples * (n_samples - 1) // 2 ij = np.zeros((n_nonzero_cross_dist, 2), dtype=np.int32) D = np.zeros((n_nonzero_cross_dist, n_features)) _cross_dist_mat(n_samples, ij, X, D) else: n_y, n_features =...
0
22a2a3eb21c58d097f0e44657b962114
936d3ad4572c9a855a76dd8f8ce1f2fc
关闭Android导航栏,实现全屏
public class LauncherActivity extends AppCompatActivity implements ITimerListener public void setFullScreen() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) { if (!DensityUtil.isNavigationBarExist(this)) { if (getWindow() != null) { WindowManager.LayoutPara...
1
7e11622d62f97c9c5357637e537a4677
1ee85163ff6e6cc98cbdbfd200fa68e4
自动装箱 基本数据类型->包装类型对象 自动拆箱 包装类对象->基本数据类型
public class TypeCastTest @Test public void autoTypeCast() { byte b1 = 10; byte b2 = 127; byte b3 = (byte) 128; float f1 = (float) 1.0; float f2 = 1.0f; int i1 = 15; Integer integer1 = i1; TestHelper.println("包厢结果: " + integer1); integer1 = nul...
1
825310e7b7fdb0cc2e1291016f5562ed
509fff43fba06dd876663358d28f4b75
Fills the contents of the details tree.
{ if (e.Node == null) { return; } if (DataContext?.SearchResults != null) { return; } e.Node.Nodes.Clear(); if (!_nodeLinks.TryGetValue((KryptonTreeNode)e.Node, out IFileExplorerNodeVm...
1
076efe5b9baf8aac23e04c6777cf94af
df702676f8b6ca01ee4f622b1fc0ced1
現在のサウンドのモード(再生/停止/一時停止中か)を取得 ※返り値: 再生中 = "playing" 停止中/再生終了 = "stopped" 一時停止中 = "paused" 失敗した場合 = ""
class AudioService : Service() inner class MyBinder : Binder(), IAudioService override fun getPlayMode(): Int { return mode }
0
1c96d18ea0d2b3503fbedc8e7be97a87
cb8ae98852e09504797f4f0e52d9c945
Aggiorna asincronamente una {@code ImageView} con l'immagine a cui questa istanza fa riferimento. L'utilizzo di questo metodo &egrave; il modo consigliato di aggiornare asincronamente delle {@code View} che possono essere soggette a riciclo (ad esempio per l'utilizzo in un {@code Adapter}), in quanto previene automatic...
fun changeImage(imageView: ImageView, s: String) { Platform.runLater { imageView.image = Image(javaClass.getResource(s).toString()) } }
1
f8a53a9d1fb67fe6c4d05c0a4eda5a21
d74605ea28a153937727caba9d466c84
Write a recursive function to find the minimum number in a list.
if l: minor_node = l[0] if l[0] < l[-1] else l[-1] next_search_list = l[:-1] if l[0] < l[-1] else l[1:] without_lowest_list = l[1:] if l[0] < l[-1] else l[:-1] recursive_answer = popLowest(next_search_list) if recursive_answer == None: return (minor_node, without_lowest_list) else: recursive_mini = r...
0
ac4322a8d660ec707e34488f9d57bcce
e83c0fd168298376f4695d7042778ba0
Creates the advertise data based on the current advertise data type and the given properties.
Map<String, byte[]> buildAdvertiseData(BluetoothLeClass sender, String ssid);
1
98a77ec9eccf67032f6948a83c7a3890
5d9a090d8a1b8bdb9d5d3a15c3ef06c7
Function: executes bash_file per patient_name (converts TSV to YAML and runs PyClone)
class genomic_coords_child_id: def backend_variant_execution(self): string_user_settings = ';'.join([':'.join([str(k),str(v)]) for k,v in self.var_user_settings.items()]) if (not self.direct_ssh_mode): build_expect_file(self.var_gui_abs_path, self.var_backend_dir, self.var_user_settings) if (not self.error_col...
0
62d7022173b540d824b98128c9f7b09b
ad682226dc623cc2bc295be7c5262467
Determines if an property has a new value.
isPropertyUpdated(...props) { return props.some(prop => this.getStoredPropertyState(prop) !== this[prop]); }
1
d32d2cc4894a0f1c92fd850e1237ed53
8c6bb807388b7274138eb05034838a02
역방향 그래프 생성
{ int n = srcGraph.vertexCount(); ArcGraph *destGraph = new ArcGraph(n); for (int i = 0; i < n; i++) { List<int>::ListItem *current = srcGraph.graph[i].first; while (current) { destGraph->addArc(i, current->item); current = current->next; } } ...
0
fb24ac3d8ae828a7f5033dc9502a0b03
97fee73b5b62e7a07e7b1244e844dd14
Gets VG error (ECU failure detected)
namespace target namespace flash namespace reg class PECR __attribute__((always_inline)) unsigned long getERRIE() volatile { return (raw & (0x1 << 17)) >> 17; }
0
c6c5b8d37e3f24607fe0f6558489b5e8
5c9f5e4782c7f2b537862c99fdfac8a1
Replaces UNIX-style wildcards with SQL-style wild cards
class SqlParam public static function escapeLikeWildcards(string $value) { return preg_replace('/(%|_)/', "\\\\$1", $value); }
0
6b926ee8edab94e697c2b1b721fcdd0b
a5f89bc3ce92b526549ef979a731c4d2
Check whether alternatives is nill
public final class Alternatives implements BnfType public boolean isAlternative() { return sequences.size() > 1; }
0
b6153ba381caa8dbe62eb70382a18b04
614c2de3b0dcc1dfb42067e6d9be14c7
Fetches and returns the request token from the session store.
@PersistenceCapable(identityType = IdentityType.APPLICATION, detachable = "true") public class OAuthUser public String getRequestToken() { return requestToken; }
0
dd27a622d3d8ca5c178617c599ef3a6c
5e88cc4c5ad3ea59920b858dd9fd5d44
recreate tree from a preorder array
void tree_reconstruct (TREE* tree, int preorder[], int inorder[], size_t size){ tree->root = reconstruct (preorder, inorder, size); }
1
b4364884b9eea214282b8b0e771ec0ff
80424a21c55170cdad8dae39e5dcb14b
https://stackoverflow.com/a/13731854/1406798
function copyTextToClipboard(text) { var textArea = document.createElement("textarea"); textArea.style.position = 'fixed'; textArea.style.top = 0; textArea.style.left = 0; textArea.style.width = '2em'; textArea.style.height = '2em'; textArea.style.padding = 0; ...
1
25fc7c44decf84b409b431791a4c6ca6
fa66c232cb789ee3a9656dd6fe21af81
Allows you to embed Python statements in a template: {% exec newvar = 1 + 2 %} ... {{ newvar }}
def do_exec(parser, token): return ExecNode(token)
1
88be28ba90a86f2be79b9ece0ce9f38d
bb46f26777d182534315a6fd630a7045
获得巷道分段面下的中心线的xh和id值
{ ExternalDataWrapper current = ExternalDataWrapper.Current; List<Curve> list = new List<Curve>(); List<XYZ> list2 = new List<XYZ>(); List<double> list3 = new List<double>(); List<double> list4 = new List<double>(); double wallThick = wall....
0
da18a5846c30035d779a573de86b8b95
350e4df944298404672feac7bfcf8be9
Get the label used for the Is Null checkbox.
{ $checkboxLabel = __('Use Default'); if ($element->getCanUseWebsiteValue()) { $checkboxLabel = __('Use Website'); } return $checkboxLabel; }
0
03a362585f522e4124ec94428fbc179b
c33b70d2fda78a7d9b79230a87a9cfe3
input: df - dataframe containing names of provinces in one column col - name of column containing province names output: datframe where same column contains primary key integers of region table instead of province names
def key_generation(df, province, country): return df.assign(key = df[province].str.cat(df[country], sep = ', '))
0
6391e10ab8c3df36ee89f63fe99368fa
28fa87f8e2fc8dcc23d04cad12af4c34
将repeatModeNames补充完整 例如每周变成每周(周四)这种类型.
for (List<NamedElementBean> neList : NamedElementList) { if(neList!=null&&neList.size()>=4){ NamedElementBean curElement; for(int i=0;i<neList.size();i++){ curElement = neList.get(i); if(i!=2&&curElement.getElement()!=null&&curElement.getElement().equals(element) &&"first".equals(curElemen...
0
43bb7bc9c7b2edcb4037dce33a2756f6
5da489f746d739af47d53de164a87b8a
计算一个数组的二维拉普拉斯算子
local h = table.getn(array); local w = table.getn(array[1]); local G = zeros(h, w); if sig==nil then sig = 1; end local wsize = 2 * math.ceil(2 * sig) + 1; local d = math.floor(wsize / 2); local u = math.ceil(wsize / 2); local g = GetGaussian(sig); local A = zeros(wsize, wsize); for i = 1 + d, h - d do f...
0
8b21e71b8d08dd1ecd60d950e8f3fa0f
7f61448ad6da3ef0f9cb03f40c5be655
Code that doesn't require creation of the expensive object.
cases like (1)
0
7a18c106d6347ea6c133242342b13fcb
98220d7df25adf49e562a63a12b87705
return the users name and groups they belong to in a pretty xml format
namespace BBC.Dna.Component public class ModeratorManagement : DnaInputComponent public void GenerateXml( string groupName, int foundUserid ) { XmlElement modList = AddElementTag(RootElement,"MODERATOR-LIST"); AddAttribute(modList, "GROUPNAME", groupName); XmlElement sit...
1
12061a854f5040a833db8ec5aa9b5c4f
dea14c0a2dfcbb8f285b9620a88fbabf
Return the selected state of the AbstractButton that has the given name. If a component is found with the given name and that component is not an AbstractButton, then false is returned.
namespace XMLib public class InputService public bool GetButton(string name) { return _input.GetButton(name); }
0
166b0e356a05a7081fc103e2446ee175
942fb31957b02f1d1c8a3088bf0743d3
根据group_id和uid修改用户排序
namespace EZNEW.Domain.Sys.Service Result ModifySort(long groupId, int newSort);
0
8a21e8373007c56b02ec987f2c06ee8b
4abe34a0f10f6626f3ea3d6bfe9596c3
This function serves the base login page. This view detects if the user is logged in. If so, redirects, else, serves them the login page. This function shouldn't be directly called, it's invocation is automatic
def index(request): logout(request) return render_to_response('planner/base_login.html', {}, context_instance=RequestContext(request))
0
b6e8e5d84275ce7baac52e03053d466c
0c9744ac3949e282afe70f36e32b5d8b
groups - A String set of digits. Examples => "12 34 56" => "+33.1.23.45.67.89" Returns the String formatted phone number.
def tel_to(text) groups = text.to_s.scan(/(?:^\+)?\d+/) link_to text, "tel:#{groups.join '-'}" end
0
d793bafe20d0ec142fcdb525117bba08
aed7ba119cc6ac4bac250b119fd051f2
Gets the image_to_image_map_editor_id of this ImageDTO. # noqa: E501
public class ImgImportadasWrapper implements ImgImportadas, ModelWrapper<ImgImportadas> public long getImageId() { return _imgImportadas.getImageId(); }
0
1664cda9e08611a40a1dec3bd278829d
d2b7c9258f8582e4851e1cba4e4b502c
查询未使用的优惠券(全用户)
@POST("mobile/listCouponCode") Observable<Request<DiscountBean>> DiscountCouponUnused(@Query("userId") int userId);
0
36e6c92dd1890fda8295e60acd8e7fa1
529409d0edb2792527f7306ea2e5e796
拼接QQ登录URL
class QQAuthURLLoginView(APIView): def get(self, request): next = request.query_params.get('next') if not next: next = "/" qq_oauth = OAuth_QQ(client_id=settings.QQ_CLIENT_ID, client_secret=settings.QQ_CLIENT_SECRET, redirect_ur...
1
9133a40b2fb659598f59358a2000cdc3
86d725aa862da84dd387e29c3cb5313a
Starts a synchronous download from specified URL and save it to specified file path. This method should not be called in the UI thread. It is suitable for {@link IntentService} where the download needs to happen sequentially. The specified user agent (browser or http client program) will be mimicked to download the fil...
void startDownloading(String url, FileSize fileSize, Callback callback);
0
10e802aa784025b16d050ac9d57c41c5
1b6b49c597733bb8359ab053f24f61f8
没有定位权限提示
AlertDialog.Builder builder = new AlertDialog.Builder(this, R.style.AppCompatAlertDialogStyle); builder.setTitle(getString(R.string.location_not_granted_title)); builder.setMessage(R.string.location_not_granted_message); builder.setPositiveButton(getString(R.string.pop_up_accept), new Di...
1
e7b6c2a903a68a9cad7f7ac7d62e7bbb
ebfcbf6b12ad82b61f6fbd767dd19955
判断传入内容是否为正整数
namespace tdx.memb.box public partial class OutRows : System.Web.UI.UserControl protected bool IsPositiveInteger(string ss) { Regex regex = new Regex(@"[1-9]\d*"); return regex.IsMatch(ss); }
1
0f02ec036e0d2e23b0362d9986082a12
6c87492d84aef5bceba6aeb422bc8230
Output the formular to create or edit content.
{ $content = new self; $content->isMultipleSelection = $form->hasValidData( 'ismultiple_value' ); $content->isRemovalForbidden = $form->hasValidData( 'donotallowremoval_value' ); $content->isNodePlacement = $form->hasValidData( 'isnodeplacement_value' ); $content->delimi...
0
2833d7ad8576b2df5bc36701529e6c0a
a145a78288259fea4cf2a7feeb28b36c
Calculates the final weights and values once names and utilities are known
self.ObjectiveVal = dict() self.ObjectiveVal['left'] = (self.weight * np.trace(self.finalCovariancesVmax['left']) / 2.0) + ((1-self.weight) * np.trace(self.finalCovariancesCTM['left']) / 40.0) self.ObjectiveVal['right'] = (self.weight * np.trace(self.finalCovariancesVmax['right']) / 2.0) + ((1-self.weight) ...
0
e4ade099b760860cfc466ec65e1a50bb
58b45f72bcbe21e47933b7384abfe251
Renvoie les Players liés aux Hqs de cette collection
class BatimentCollection extends BaseCollection public function getJoueurs() { if(is_null($this->cacheJoueurs)) { $this->cacheJoueurs = JoueurBusiness::getFromBatiments($this); $this->cacheJoueurs->store(); } return $this->cacheJoueurs; }
1
f70bdc686ccb72c3831c83cad469408e
9501b487e856b51161246b87c8b77b57
Problem : Print the elements of matrix in diagonal order Link:http://www.ideserve.co.in/learn/print-matrix-diagonally
public class PrintMatrixDiagonally public static void main(String[] args) { { int M[][] = { { 1, 2, 3, 4 }, { 5, 6, 7, 8 }, { 9, 10, 11, 12 }, { 13, 14, 15, 16 }, { 17, 18, 19, 20 }, }; System.out.println("Given matrix is \n"); printMatrix(M); System.out.println("\nDiagonal printing...
1
cb7f060fa0696e881fd8718aee3b1f95
df8d6f4e4ecbe34a9156c53a97dfa2a5
認証キーのPDFファイルを表示する
filename = params[:file] path = File.expand_path(File.join(print_path, filename)) raise SecurityError unless path.include?(File.expand_path(print_path)) send_file(path) end
0
d345f3fb28eccc02c08081145dd59d58
4b32551747d233bc9674b7da51f608f9
Returns all Items containing the given Field Value.
result = [] for item in self: tmp = self[item][self.header.index(field)] if tmp is not None and (tmp == value or value in tmp): result.append(item) return result
1
3abd098efb0b35f552e55a6e812721be
387501b511a7137e23ffa54e96a5f6d9
권한 상세 조회
@Controller("authorityController") public class AuthorityController @RequestMapping(value = { "/api/authority/selectAuthority.do" }, method = RequestMethod.POST, consumes = { MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_JSON_VALUE }) public @ResponseBody AuthorityVO selectAuthorityRest(@Reque...
1
88ada225a616e2cfd369008bab566fb9
ad8170448fb34c68ba8fe033a724f910
対象年度からフォーカスが離れるときの処理
function onBlurKingakunyuuryoku(selectedIdx){ hiritukeikeisan(selectedIdx); sankoukakakuKeisan(); shoukeikeisan(); goukeikeisan(); }
1
4f96e32e5836e687185f02d14c9dfe7d
32d52f657ab7c6f208ae5ab9304d15dd
Allows the aliens to start dropping bombs again.
{ Random rand = new Random(); int chosenAlien = rand.Next(0, aliens.Count); Arsenal.bombs.Add(new Bomb(aliens[chosenAlien]._pos)); }
1
0f94cf2f3668243e82283c5812cf60f0
26cbe6d62751047e0dfd17ed3687b619
商品圖垂直置中
var parentH = $parentObject.height(); var objectH = $object.height(); $object.css({ 'margin-top': ((parentH - objectH)/2)+'px', }); }
1
8f7a89de56d4520b0eec557dc51fe3aa
cde671bb070fbb533c0cfbae5e34684d
Add another point to the end of this stroke.
{ _pnts = Arrays.copyOf(_pnts, _pnts.length+2); _pnts[_pnts.length-2] = aX; _pnts[_pnts.length-1] = aY; shapeChanged(); }
1
7fb9c7e17a72658742f1ff648f3f6489
dfe0abc8666881a11fdcec6e9c66c066
Gets the style of this Footer. # noqa: E501
class SecurityTraceResultsLogs(NetAppObject): def security_style(self): return self._security_style
0
208fc7d60e7d0711fb76c1ce6ded2c7c
58d9c2bc409fc1155d023f3ace5a24e8
Implementations of this method should initialize static implementations of skill types in the SkillType class.
namespace SKILL public class GSkillStub : IDisposable static bool Init() { return GSkillInstance.Init(); }
0
b507d1792a7ce3fbd147b7eb3ed02ed6
ab022f2b7b267667b8234c0f17a81f75
RESOLVE PROVIDED HOSTNAME USING THE SUPPLIED DNS SERVER AND CALL THE USER PROVIDED DNS DONE CB FUNCTION WHEN DONE
namespace CallbackSample internal sealed class Resolver internal void Resolve(string host, IResolveCallback callbackInterface) { callbackInterface.HostResolved(Dns.Resolve(host)); }
0
15c4ad1858335c77a21855e2b66deb6b
57f6daee3f43fba1af98625e2161061f
build internal nodes bottom up after leaves were constructed.
madara::expression::ComponentNode* madara::expression::Sequence::build(void) { if (left_ && right_) { Sequence* next = dynamic_cast<Sequence*>(left_); Symbol* left = left_; for (; next; next = dynamic_cast<Sequence*>(left)) { if (next->right_) { nodes_.push_front(next->right_->bu...
1
571e350d76265716012fec3ad0fbaeeb
ad62e8ca5490b36acb0135e0953fae64
跳转我的理赔流程指南页面
public String GuidesReimbursement(){ String url = "voucher/GuidesReimbursement"; return url; }
1
8a69272b1dc33f99fe2e36dd76cf89ee
427bf63771a211bd807fee48d90c806d
Returns the HTMLElement that controls the state of the menu.
const viewController = this.getViewController(); if (viewController) { return viewController.getControl(this.getName() + '_tree'); } return undefined; }
0
d891d54f96f7c348866b778d9df7b86c
b9a882d509ba5a1ba8adf2e064827129
# Entrega nombre de la región según código # Entrada: código numérico de la región # Salida: nombre de la región
def region_name(region_code): region_code_name = { '020304': 'UK', '020321': 'scottish', '020322': 'Nothern Ireland', '020323': 'Guernsey & Jersey', '1315': 'Spain', '0218': 'ROI', '0708': 'NL' } return region_code_name[region_code]
1
ea37be7fe2553138ffd0474ea71e2b25
6914b4b9c55b1d03939aac01dfd026e5
Devuelve true si est� hipotecada, y false en otro caso
public abstract class Buyable_terrain extends Abstract_terrain public boolean is_mortgage() { return this.mortgage_mod; }
1
05bfb2ad0ff9c29fe8dbfadda1ce331a
51924797880f614adde73c4a07d15f1d
获取拼音相同但名字不同的用户信息.
PageResult<PmphUserManagerVO> getListByUsernameAndRealname(String name, int number, int size) throws CheckedServiceException;
0
181a40a3588c0947127175ccc737f1c6
a44cc3d310ffab73d4df2ab126f3306f
Get OriginAirport value
class RailJourney extends AbstractStructBase public function getOrigin() { return $this->Origin; }
0
78fe952342ab7a0aaeab41adbb7a0a90
cac8f21df17eb524caf20db2ac178678
Set the correct DST and offset when a city is created. Only for creation as we do not want to update the DST setting outside of tasks because it wouldn't send the email notifications.
bool Date::DST(const bool DST) { return this->tz = ((DST) ? 0x80 : 0x00) | (this->tz & 0x7F); }
1
b0ce9518fa5e1681f09d95093cf4f007
d9777dbd3d5884b5c01670f4c23d091d
GET: Automobili/Create
{ ViewData["Makes"] = new SelectList(_context.Makes, "MakeName", "MakeName"); ViewData["Conditions"] = new SelectList(_context.Conditions, "ConditionName", "ConditionName"); return View(); }
1
fd21d273e247d520202477d22acdfbe0
0e3e779fd4639561a596a239569d3207
Prints a laser reading to standard out
def zonkers_print_trigger(): val = zonkers_read_trigger() if zonk_verbose == 1: print "trigger=",format(val,'04x')
0
817fea5778e16ba3deb52ca093860242
1d1eda79e6e33ea471978dede5ae23ee
根据条件查询排行榜子榜单数量
class Dao_TopChannel extends Dao_Base public function getTopChannelCountByConds($conds) { return $this->selectCount(self::$TABLE,$conds); }
1
49bb99d20ab430a36a312941a22a2cbd
932d35703b3bc4cb4534c0227301abc7
Get the amazon item code from the web page address
def get_asin_from_url(url): if domain not in url: raise Exception('Invalid URL! It not contain domain https://www.amazon.com') parts = url.lstrip(domain).strip('/').split('/') if parts[1] != 'dp': raise Exception('Failed to parse URL, ASIN not found!') return parts[2]
1
10707b36be0ff7e37e96f76e2b4a6563
f8ee2336a82526a0c85083f77f923bc0
编辑开卡售卡提成
var time_type=0; $(".tanceng .zj_ct_lx_checked_state input").each(function(){ if($(this).is(":checked")){ time_type= $(this).data('id') } }) var task_type=0; $(".tanceng .zj_rw_ks_fs_state input").each(function(){ if($(this).is(...
1
d453d8f79e02abd2c68d69ac955a72cc
f42ea9b164deb267e9ca9ed902d71705
Layout volgens balansstyle.
Stablo balans_u (Stablo stb) { if (stb) { int k = vel (stb->levo) - vel (stb->desno); for (; k>1; k-=2) { stb->desno = dodaj_u (stb->desno, stb->broj); stb->broj = max_u (stb->levo ); stb->levo = izost_u (stb->levo , stb->broj); } for (; k<-1; k+=2) { stb->levo = do...
1
0ab8bb4d9f8768bd9f1a0881c7251c64
438c0a923d5fe49457d5d7afe48ca81d
Fetches daily revenues between the specified days (start and end days included)
namespace SalesReportWebAPI public class InMemoryDataStore : IDataStore public Task<IEnumerable<DailyRevenue>> GetRevenues(DateTime startDay, DateTime endDay) { Func<Article, bool> dayCondition; if (startDay.Day == endDay.Day) { dayCondition = article => article.SellTime.Date == startDay...
1
18f030ab772f83f6acc09c7fdc403f21
73e5b88e770a4e87129ff8341b3e3df1
给物理接口添加一个ip
class NetworkImporterInterface(NetworkImporterObjBase): def add_ip(self, ip): if ip.address in self.ips.keys(): return True self.ips[ip.address] = ip logger.debug(f"Intf {self.name}, added ip {ip.address}") return True
1
7912b3bd809fadbbd7cb3b932a50ac96
550ea48d4619a97aec487c622bf670ba
Handles Disabling/Enabling The Options of The Extenstion Based onUser Selection
function toggleExtensionAvailability() { isEnabled = !isEnabled; prefs.set('enabled', isEnabled); prefs.save(); CommandManager.get(COMMAND_ID).setChecked(isEnabled); Command...
1
6d7591fc19517370e8691121a8e714a0
29e3de520d24ce795b6d5199a5d0d4ec
Function that gets called from the algorithm module. Takes user inpt (one letter) and sends it through the enigma machine in three steps (illustrated in the following functions, respectively). Note: several print-statements are available to view the process of the coding.
if ( !this.ENIGMA_ROTOR_POSITION_ONE || !this.ENIGMA_ROTOR_POSITION_TWO || !this.ENIGMA_ROTOR_POSITION_THREE ) { return -1; } const stackRotors: Rotor[] = [ this.ENIGMA_ROTOR_POSITION_ONE, this.ENIGMA_ROTOR_POSITION_TWO, this.ENIGMA_ROTOR_POSITION_THREE ]; ...
1