query_id
string
corpus_id
string
query
string
code
string
label
int64
26473f36278e425546f2e76bce6e86fe
001430aa0d4c9b159af540b5682a6702
Multidimensional Arrays not handled -- assumed to be UnknownValue
namespace Slant.Extensions.Configuration public static class Resources internal static string FormatError_UnsupportedMultidimensionalArray(object p0) { return string.Format(Error_UnsupportedMultidimensionalArray, p0); }
1
b3448e09f6dbd36dcac607a8a08de91e
e5da978581f004c586a7609ab86a5d3d
웹뷰 로그인 활성화
this.dataBinding.webView.getSettings().setJavaScriptEnabled(true); this.dataBinding.webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true); this.dataBinding.webView.setWebViewClient(new WebViewClient() { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { showLo...
0
644c9237797691043fb8ed450c0e229a
f25ebcc45a30dc46e51c1f01ea135f2e
returns the total nonzeroes in the jacobian
static size_t imp__get_nonzero_amount(const matrix_t *matrix) { size_t amount = 0; for (size_t row = 0; row < matrix->rows; row++) { for (size_t col = 0; col < matrix->cols; col++) { matrix_elem_t value; mat_get(matrix, row, col, &value); if (fabs(value) >...
1
b195db370de3466ea72399d8b40af709
69309faa0441bb450114ebb8d83c0ade
绘制顶部矩形和文字 以及垂直线
for (int i = 0; i < transverse.length; i++) { paint.setTextAlign(Paint.Align.CENTER); paint.setTextSize(40); int startX = xPoint + (i + 1) * xScale; canvas.drawText(transverse[i], startX, this.getHeight() - (float) margin / 6, paint); } for (int i ...
0
eedd81bad06cdef487c60611ccafdeed
72160c77ed3bea268184dfeffcfb7c83
Prints the selectors needed when writing or finding questions
@NotNull String[] getSelectors();
0
ea17862c6811179eb1356f996c97c8f9
7b05a1f5f80b76d9b0211f33cb5e37e0
Ensure the specified feed url is valid
if (!isValidBeeUrl(url)) { throw new BeeArgumentError('URL is not valid!', url) } }
1
093eba50ae9333659e06941b0739c0c3
9f1174cda7a59fc5b53fbeff21e18989
Check if the `Cache<K, V>` contains a specific key.
class Cache(ABC): def __contains__(self, key):
1
5ebff409a8d81c0f1c9151fd08b6921e
dd75e36b973d0b95e9878b8d56b9816b
Builds a map of indexing configuration names to tables to to index.
{ $monitoredTables = []; $indexingConfigurations = $this->getEnabledIndexQueueConfigurationNames(); foreach ($indexingConfigurations as $indexingConfigurationName) { $monitoredTable = $this->getIndexQueueTableNameOrFallbackToConfigurationName($indexingConfigurationName); ...
0
e95e6751946e3b864acb46863b74389b
c8c41c166113d20a216d08ab6fd98146
Вычисляет сумму четных чисел в заданном диапазоне.
public class Counter public static int sumByEven(int start, int finish) { int sum = 0; for (int i = start; i <= finish; i++) { if (i % 2 == 0) { sum = sum + i; } } return sum; }
1
2c1b3f3126997347de8f1abcbbc081bc
64365cfc2ae09449348c150c7d0aa179
! \brief returns the array of alert ranges to the requestor
uint8_t buffer_index = 0; _num_anchor_ranges = 0; for (uint8_t i=0; i<MAX_NUM_ANCHOR_RESPONSES; i++) { if (ranges_millimeters[i] != INT32_MAX) { memcpy(_anchor_ids_ranges+buffer_index, anchor_responses->anchor_addr, EUI_LEN); buffer_index += EUI_LEN; memcpy(_anchor_ids_ranges+buffer_index, &ranges_millime...
0
86134e123eb502cdcfa33712c0f89de7
4f8ea09ab9ff2cdeb157e474e953ced7
only send warnings between 7am and 10pm
def timewindower(dt): if (dt.isoweekday()>5): return False return (start_evening_rush<=dt.hour<=end_evening_rush)
0
d24b97e64d8f4671014b035cdb8cd9f0
9cb61508fe4a8b248a0e448178cfda17
二分法查找二维数组中的元素
public class FindInBiArray public boolean Find(int target, int [][] array) { int row = array.length; int column = array[0].length; if(column==0) return false; boolean flag = false; outer: for(int i=0 ; i<row ; i++){ if(target>=array[i][0] && target<array[i][column-1]) for(int j=0 ; j<column ; j++) ...
0
17fcd80d7c59d0bbdb9d1244300b0671
72189784906add10d03c54e4b31054e2
@brief Get volume for SquareBar Shape
static int GME_GetVolume(void *music_p) { GME_Music *music = (GME_Music*)music_p; double v = SDL_floor(((double)(music->volume) / music->gain) + 0.5); return (int)v; }
0
45a5ed4297c717868f25d9ba0ece8489
c7c6ff6f7ec7bfd787157112a1044d9d
Get ElasticSearch type
public function getEsTypeName() { return $this->esTypeName ?: $this->getTable(); }
1
d7257099dbb1b276a820081439a7abae
53f47a2b935201b756aef06f969b3ebf
Is the active text control agent still valid? Has it changed? Has it been disposed?
TCFContextState state_data = state.getData(); if (state_data != null) return state_data.isNotActive(); return false; }
0
29c5f12c1ab16f613c7212f81ad13ff7
aba5ab5cbb4f3497aaffe2b3b6d525b7
获取港口列表
postSunEntity(HttpConfig.AllPort, new RequestBaseEntity(), new MyStringCallback(PortSearchActivity.this) { @Override public void processResponseSuccessData(String successData) { CityListEntity cityListEntity = getEntity(new TypeToken<CityListEntity>() { },...
1
1ab3ca4cf374244a419d462ec3eed42e
a148817859182c30d430e49118413100
得到用户是否有权利验货
boolean flag=false; List list=getDataRightByCodeAndUser(code,userId); if(list!=null&&list.size()>0){ flag=true; } return flag; }
1
1dad1bb3d637ecaf190694deb9c88c84
1eb1b3c7304de6fe944f4161c7b89a5b
sets the meter multipliers and score combos based on increment or decrement passed through
{ if (!(StartPitch == 90)) { if ((80 <= StartPitch) && (StartPitch <= 100)) { this.DeductionScore +=30; } else if ((60 <= StartPitch) && (StartPitch < 80)) { this.Deduc...
0
32862ec5569cdeea08c40b6c08301a69
ea24cae7d3e2d305e88bf44b20e3d2b6
Handles the result of the latest iteration of solving the fixed NLP subproblem given a solution that is neither optimal nor infeasible.
SCIP_REOPT* reopt, int nimprovingsols ) { assert(reopt != NULL); reopt->nimprovingsols += nimprovingsols; }
0
79f99f9153748a27295d1faa8b6df3b7
8c66275fc32a6d24fe2b4a3f5879614b
Display a file chooser to select a filename to display
{ final String title = Utils.getLocalString(TITLE_SAVE_AS); return display(parent, title, null, JFileChooser.SAVE_DIALOG, JFileChooser.FILES_ONLY); }
1
0a1078f3725cad29fa1c12e512d2fbbd
83e020a22ebdc5a05a8d53a335eeed9d
Lists all reviews for a movie
namespace Repository public class ReviewRepoLogic public async Task<List<Review>> GetMovieReviews(string movieid) { return await _dbContext.Reviews.Where(r => r.ImdbId == movieid).ToListAsync(); }
1
2ae2d5454436340029159758aa567cd8
ee3544f3da801fa3d305803dff29b11e
拦截不可访问的客户端
HttpServletResponse response, FilterChain chain) throws ServletException, IOException { request.setAttribute("iplat_msgKey", "ES010"); request.setAttribute("iplat_msg", "对不起,访问被禁止!"); request.setAttribute("iplat_msgDetail", "该请求无法直接通过链接访问!"); ...
1
84bec56220b891f1288892143a0e4c68
29f610a100fb6e137121553e630bb618
Returns the full parquet path as an output for the Luigi Task (e.g. impc/dr15.2/parquet/impc_ontology_metadata_parquet)
class ForestTask(TimestampedModel): def forest_results_path(self): return os.path.join(self.data_output_path, f"{self.participant.patient_id}.csv")
0
d3723fa72e31bda1b55f4017d0b6208e
a054054d3c0de183b2bb955a5407caf4
Devuelve un link para volver a pedir un permiso.
class SponsorRequest extends Request public function forbiddenResponse() { session()->flash('message', 'No tienes permiso para realizar esta acción' ); session()->flash('type', 'danger'); return $this->redirector->route('admin.dashboard.show'); }
0
d4c65af05741c91ef0c9bf8f0c69c52d
4645eb5ce1ab79d4d96adbd53dfbd8e0
Read and return ENV variables starting with "NAGIOS
class BlueAcornInventory(object): ########################################################################### # Main execution path ########################################################################### def read_environment(self): if os.getenv("ANSIBLE_SSH_CONF_ENVARS"): self.envars_files = os...
0
e8d2ca8ec5b866a966366397cd3f86cb
92cfa200dafb41a409af84c789d904d6
Set up the clocks that use moment.js
const app = arguments[1] || arguments[0]; app.inject('controller', 'clock', 'service:clock'); app.inject('component', 'clock', 'service:clock'); }
0
d68adb257a53bcfdeafcce8883fb50fe
d0b59956b8e40a3edb31b48c5d011597
Invoked to allow some other return value to be converted into a Response.
public function handleReturn($rawResponse);
1
3548f741792110184f2b62a15b742310
8c32520c90c34d97c5adb9e57da99efb
保存缺货处罚订单
@Component public class PeizjhService extends BaseService<Peizjh>{ @Transactional public void savePeizjh(Peizjh bean,Map<String,String> param) throws ServiceException{ String peizdh = this.getPeizdh(param.get("usercenter"),String.valueOf( this.getSequence("seq_peizdh")),6,"P"); bean.setPeizdh(peizdh); param.put(...
1
d67292df97fcffed16d04e2f3dde69eb
11b8c4b8afd43679a0500e39930a3822
Optional, function that calculates the number of users that are on the bridge install, but not the local install.
public class LocalManager2 implements LocalManagerConfig, DynamicMBean public int getExpectedUserLoad() { return Integer.parseInt(localInfo.getProperty(EXPECTED_USERS)); }
0
5c95d924f29ade9e82e4e7e4c5b4bb32
900495496107ba5e22d50b3f44cc81b6
树型展示缓存策略
ImageLoaderContract diskCacheStrategy(int diskCacheStrategy);
0
9abf24b492f2a1a936a3756670e4752b
233e287f1c3b542d3f9c030009bb1964
Draws the background text box on top of given surface
text_width = size[0] text_height = size[1] textrect = pygame.Rect(textx, 140, text_width, text_height) pygame.draw.rect(self.main_surf, self.background_color, textrect)
1
6e810848ebfdab90f67766598e78cd29
fbc388c403b4abcd46792043fc3116a5
Gets the current Jibberwock user.
public final class GotyeAPI public GotyeUser getCurrentLoginUser() { return currentLoginUser == null ? currentLoginUser = GotyeUser .jsonToUser(getLoginuser()) : currentLoginUser; }
0
20a50dc44eb4f8848ee5e42f97b299dc
f6dc8e51e5bd9210c7cd639e7de13bab
Стохастический градиентный спуск
def SGD(data, epsilon=1e-2, maxstep=1000, alpha=0.1): w = np.ones(data.shape[1] - 1) i = 0 over = False while i < maxstep and not over: np.random.shuffle(data) for sample in data: Grad = (w * sample[:-1] - sample[-1]) * sample[-1] if norm(Grad) < epsilon: ...
1
1af9bdaf9d6ba08815d5f9517ea31472
79a4f345d283f1c649ffaec703d27a71
卖出信号识别器
linelog('%s:%s' % (up_in_hour3.__name__,stock.code)) t = stock.transaction climit = xfollow(limitup1(t[CLOSE]),t[VOLUME]) y12 = gor(stock.slup1,stock.slup2) yup = rollx(gand(stock.slup3,climit,bnot(y12)),1) pre = rollx(t[CLOSE],1) tup = np.sign(t[OPEN] * 10000 / pre >= xup + 10000) ...
0
0444741be84f769250dcdce8ea0031a6
a22afd0aa4ea965dcb2e0e5feac54821
显示网络图片 固定宽高
public class HttpLoader public void display(ImageView view, String requestUrl, int defaultImageResId, int errorImageResId) { display(view, requestUrl, defaultImageResId, errorImageResId, view.getWidth(), view.getHeight(), ImageView.ScaleType.FIT_XY); }
1
57130b2fec813ab65ebd6acecd7b7fde
995aee4246d2d5169c8942ca8614cac3
Checks if two 2D vectors are exactly equal
bool Vec_Equals_2d(const Vector2d_PTR p_left, const Vector2d_PTR p_right) { return Equals_double(&p_left->x, &p_right->x) && Equals_double(&p_left->y, &p_right->y); }
1
a7585edada6c2d22e4d6c836321df879
75f12aaf291b55cb56fe54f1315b98be
GET: SchoolClass
public ActionResult Index() { var service = CreateClassService(); var model = service.GetClasses(); return View(model); }
1
63eb473f47cbbe33a0ed9ea5afff14ca
0252c52e92811b530b8e0b2e8d228c36
Creates a new symbol information object.
this.symbol = symbol; this.matrix = matrix; this.name = name; this.description = description; }
1
a7795ca688a0848b5d714768a7ec0f9f
7bfbb6e153bc8ea005d152f09fada5eb
Calculate Pi based on a MC Approach
double MonteCarloPi(int n){ int count = 0; long long int Xseed0 = 2019; long long int Xseed1 = 11; const long long int M = 4294967296; long long int MMinus = M-1; const long long int a = 1664525; const long long int c = 101390423; for(int i=0;i<n;i++){ Xseed0 = (a*Xseed0+c)%M; Xseed1 = (a*Xseed1+c)%M; dou...
1
24dfca2b5fac91dced0733bb06944419
0a920fa81cc118f49a490e626a83d390
Adopted from gonum/blas64 - trmv
{ cblas_dcopy(N, b, 1, x, 1); cblas_dtrsv(CblasRowMajor, CblasUpper, CblasNoTrans, CblasNonUnit, N, A, N, x, 1); }
1
e838647c2d8bbbf7da742a5c3e385bbf
775eab6d0bdc17c7286cec82e1b2635d
对订单下所有菜品进行评分
public class EvaluateDao public List<Evaluate> getOrderAllEva(int order_id) { List<Evaluate> list = new ArrayList<Evaluate>(); try { DBconn.init(); ResultSet rs = DBconn.selectSql("select * from `evaluate` where order_id='"+order_id+"'"); while(rs.next()){ ...
0
9c41ef310da479862ce2de83d016670f
cc504fee2889360f39cdcdc42c8523e8
add a new genre to a Book .
try: if self.request.user.genres.get(pk=self.request.data['genre']): book = Book.objects.filter( user=self.request.user, title=request.data.get('title') ) if book: if Book.objects.get(pk=self....
0
6f9b239c1579083a4e084b922434e520
b69937c52ee794743775a04dd33662a3
국가, 지역코드, 배송방식, 무게 입력받아서 배대지별로 요금 출력해주는 기능
class Product extends Front function freight($weight){ if ($weight <= 0){return false;} $fee_krw = ($weight / 1000) * 10000; $rate = new rate(); return $rate -> krw_to_cny($fee_krw); }
0
938d0fa951db7f65f73049de91d2d06f
dd423cb2ad072627ff6e60814e500c41
Execute skills for events with two players.
int p1Action = p1.getActionPoints(p2); int p2Action = p2.getActionPoints(p1); applyAction(p1, p1Action, p2, p2Action); applyAction(p2, p2Action, p1, p1Action); }
1
3dfba03e6b88def6b2ef7666aed0e59f
1f5acdbb75c42c53592e95d082f4c97b
price of one token (in num euler)
def preico_token_allocation(token) -> int: return int(token.functions.totalSupply().call() * 0.1)
0
f1df761bc274ff4a21b3e4397852e618
6ad8f360380980e7fc16b4cf67f74942
Tests that writing invalid commands doesn't invoke the 'list local files action.
self.assertFalse(self._local.does_config_exist()) self.assertFalse(self._local.does_action_file_exist()) res = commit.commit(self._local.config, 'discovery-map', self._local.action_file) self.assertEqual(1, res) self.assertFalse(self._local.does_action_file_exist()) self....
0
ed0e9274d82cab4de69352d8c33030fc
9042d83fa380593d40825e084565220f
Called from AlarmManager when no alarms remain
public class AlarmNotificationActivity extends Activity public void stopAlarm() { ringtone.stop(); stopScan(); if (bluetoothDisabled) { bluetoothAdapter.disable(); } audioManager.setStreamVolume(STREAM_RING, currentVolume, 0); Intent intent = new Intent(this, ...
0
a36a9f4ce4d91118802793abd7a6edb2
ed03addfda04507640f2fc3e319c187f
Er administratoren også en kontaktperson for området?
{ $ergebnis = false; $sql = sprintf("SELECT gruppenid FROM %s WHERE userid='%d' AND gruppenid='1'", $this->cms->papoo_lookup_ug, $user_id ); $admin_yn = $this->db->get_var($sql); if(!empty($admin_yn)) { $ergebnis = true; } return $ergebnis; }
0
2a79a718161d3e1f7460db61e47512fd
14f45a6807615e57d4e4c1856ac87a1b
Finds a key by a specified IP Address
{ var route = await _serviceRouteProvider.SearchRoute(routePath); AddressModel result = new IpAddressModel(); if (route != null) { result = await _addressSelector.SelectAsync(new AddressSelectContext { Address = ...
0
a1d0c7fd6b6a95976ce280e58fe39b90
e2ee293159b18b8ff271ba6715b7a540
Function for single precision floating points. @brief fill_symetric : fill the lower part of the scatter matrix. Because X represents a square matrix.
void fillSMatrixSymWithCondNumber(Gaudi::SymMatrix5x5 &F, TRandom& r, double condNumber) { Gaudi::Matrix5x5 T; Gaudi::Matrix5x5 Q; bool processOk = false; do { fillRandomSMatrix(T, r); Q = orthogonalizeMatrix(T, processOk); } while (!processOk); Gaudi::Matrix5x5 tQ = ROOT::Ma...
0
6a91b5487aee25e7e1f3e461edd29f05
791b5b06d36d562d5689d90ab153b2a4
查询已经签到的人
@GET("/api/staffs/{staff_id}/users/checkin/records/") Observable<QcDataResponse<List<StudentWIthCount>>> qcGetNotSignStudent( @Path("staff_id") String staffId, @QueryMap HashMap<String, Object> params);
0
136ff2e862aef8d2a7f121a58a5799ec
ac6e8d8fb5fb9d8ce11115d0d3738749
Returns an iterator that gives zipped FASTQC result files.
class LiqBioPipeline(PypedreamPipeline): def run_fastq_qc(self, fastq_files): qc_files = [] for fq in fastq_files: basefn = stripsuffix(os.path.basename(fq), ".fastq.gz") fastqc = FastQC() fastqc.input = fq fastqc.outdir = "{}/qc/fastqc/".format(self.outdi...
0
80456aafddcbb66318d9d1d5e0266ae8
dae4001bb7d11ff3e3e2f1feaf7dbd6e
Returns whether the deal is almost completed based on the conditions it has
DealerDataAdapter dealer_data = new DealerDataAdapter(this); dealer_data.open(); GameState game_state = new GameState(dealer_data.getGameString()); dealer_data.close(); return (game_state.days_left_ > 0); }
0
7a698310066d3bc5fa686eb9bc3d5d42
e5ef0e27fc671fa4cc5f00be5e85f045
Hace in/visible los filtros de busqueda
document.getElementById("filtroProveedor").style.display = "none"; document.getElementById("filtroCodigo").style.display = "none"; document.getElementById("filtroEstado").style.display = "none"; document.getElementById("filtroRango").style.display = "none"; }
1
1231207fd1b7598fb67874c4a294d1c2
afe92cb160184354948bd2188c396984
Search with "Search ROM" command
owr_t ow_search_devices_raw(ow_t* ow, ow_rom_t* rom_arr, size_t rom_len, size_t* found) { return ow_search_devices_with_command_raw(ow, OW_CMD_SEARCHROM, rom_arr, rom_len, found); }
1
f216f213e0f36103c8878bfa67d4aae8
c134da3cb605935690e02bdc602f4549
Fit single peak to a spectrum
x_double, y_double = double_peak() s_double = Spectrum1D(flux=y_double*u.Jy, spectral_axis=x_double*u.um, rest_value=0*u.um) g1_init = models.Gaussian1D(amplitude=1.*u.Jy, mean=4.9*u.um, stddev=0.2*u.um) g1_fit = fit_lines(s_double, g1_init, exclude_regions=[SpectralRegion(5.2*u.um, 5.8*u.um)]) y1_d...
1
6007ab983a2b173ce9dba4040366fcf2
ec5b9449946757b0b326a9dc2b3c4bc5
Find all countries that can speak in a specified language
public function findByCountry(CountryInterface $country);
0
005264cbfaa6eddafdc18de66a13c8af
bbea238d14123304022b778b3b26946b
emailSendを設定します。
public void setSendemail(Integer value);
1
e5bdcf603d17150ae089ac9b7f60e7a2
f5d8d87e88ab585bb20ab0bc9f747e81
Links corresponding keys and doors together by their matching id
def parse_rdr(rdr_json: list, house: House) -> None: for from_room_id, hole_id, to_room_id in rdr_json: house.door_connected_room_pairs.append((from_room_id, hole_id, to_room_id))
1
126df4d449fb596f4e3fc61e0ed7ea6f
9187c41847683c07f6fb480c3929308d
@method 絶対パスか。 Returns: bool:
class FileSystem(object): def is_abs(path): return os.path.isabs(path)
1
6436f71f0316fce399effdea9e95a886
996164c818c8a4e9ee865141c2f8acb5
Parses a aws_server_config path into its component segments.
class Config private static function parsePath(string $path) { if (str_contains($path, '.')) { return explode('.', $path); } if (str_contains($path, '/')) { ErrorHandler::logWarning("Legacy config path: {$path}. Please use periods to seperate paths."); return ...
1
72766bcc0ea3f0a6a9cc501b90013ef8
7a2fb7fc4574e06d44b3e4d32db517be
Projects cannot be updated.
self.SignIn(user_id=self.admin_user.user_id) with self.assertRaises(exceptions.NoSuchProjectException): with self.work_env as we: we.UpdateProject(999, summary='new summary')
1
645579d16d2790866132be91c651bb65
60eb707cfce7a70c9cdf80b11686f7bf
toggle between DEC logo and special control panel
public class Menu : MonoBehaviour public void ControlsToggle() { if (controlsPanel.activeSelf == false) { controlsPanel.SetActive(true); creditsPanel.SetActive(false); } else { controlsPanel.SetActive(false); } }
0
e58cf3b3c762fc101aff11fe46f95216
da5236597e476c49f872d43954add390
WGS-84坐标转换成GCJ-02坐标,精度在0.000001度及1米内
public class MapDistanceUtils public static double[] wgs2gcj(double lat, double lon) { double dLat = transformLat(lon - 105.0, lat - 35.0); double dLon = transformLon(lon - 105.0, lat - 35.0); double radLat = lat / 180.0 * pi; double magic = Math.sin(radLat); magic = 1 - ee * magic * magic; double sqrtMagic...
1
6d7b03c18328fa0bde5a05e852b7c2d2
562ff5e89e999e7820e9892aad7a13f1
Loads the street view house numbers (SVHN) dataset This function is modified from load_data in http://deeplearning.net/tutorial/code/logistic_sgd.py
def read_SVHN(pt): data = loadmat(pjoin(pt, 'train_32x32.mat')) datat = loadmat(pjoin(pt, 'test_32x32.mat')) X, y = data['X'], data['y'] X = np.rollaxis(X, -1, 0) X2, y2 = datat['X'], datat['y'] X2 = np.rollaxis(X2, -1, 0) y, y2 = y - 1, y2 - 1 return (X, y), (X2, y2)
1
0a34af0ea8a0c25bb455aa37f9b006df
5d2da5d0d03b5e4687dc11b4e9eddba9
选择离 source 最近的目标
closelist = {subunit: subunit.base_pos.distance_to(self.base_pos) for subunit in subunitlist} closelist = dict(sorted(closelist.items(), key=lambda item: item[1])) maxrandom = 3 if len(closelist) < 4: maxrandom = len(closelist) - 1 if maxrandom < 0: ...
1
902669a1b91b57aaacb22eec4a4385c5
df1a61488181d2a92ba99507f91affa0
Setup return and parameter types
class MultiDomains extends CMSModule function InitializeFrontend() { $this->RestrictUnknownParams(); $this->SetParameterType('pageid',CLEAN_INT); $this->SetParameterType('pagealias',CLEAN_STRING); $this->SetParameterType('linkvalue',CLEAN_STRING); }
1
3361898d346deffef7bc48ec9730927e
efc6dc56cd78fb4bc7eae0c749ee8401
Get inactive users
$users = User::where('is_deleted', 1) ->whereNotIn('role_id', [2, 3, 4, 8]) ->orderBy('first_name', 'ASC') ->get(); return view('users.inactiveus')->with('users', $users); }
1
a77975f88ee839a743f74f63c75a681a
6735c8fe1fa3012f62cc82e8b585d408
检查表管理首页跳转
public ModelAndView toCheckTable(String key,HttpServletRequest request, HttpServletResponse response){ UserInfo user = Utils.getLoginUserInfo(request); EmpCheck empCheck = empCheckService.getByPrimaryKey(key); String mvstr = ""; int checkstanderd = 1; checkstanderd = empCheck.getCheckStanderd(); swit...
1
bde0ff00ce53efc24a6b83b15de8a2b1
cef90f67b90cd74533cca61a3394a743
设置动物ID
public class FosterDetailModel extends BaseDataModel implements Serializable{ public void setPigId(Long value) { set(D_PigId,value); }
1
726e64c5fb8b0b594286decc4ea40637
2349e84d967c7dd5f1bce184887774dd
@brief 检查窗口队列
{ return Q.front == Q.rear ? OK : ERROR; }
1
1c2c89135a11c34b064e938b9da604c6
c14257f4e2d61bb6c8e9e6a033372f88
Funcion que calcula las estadisticas de mutantes y humanos
@Component public class MutantController public Stats stats() { BigDecimal mutant = mutantRepository.countByHumanType(Human.MUTANT); BigDecimal humans = mutantRepository.countAllBy(); Stats stats = new Stats(mutant, humans); return stats; }
1
a0ab006b4a2f7b22572cd85264c70ec0
5e184344a84f9d60be37d2b7de6ace0b
sets the thread to be suspended
{ thread_ptr -> tx_thread_delayed_suspend = TX_FALSE; status = TX_SUSPEND_LIFTED; }
0
db77e90f07b64f015617d7bb023eb5d7
29f189beff21890f514760691ac081b2
HttpGet for admin panel portfolio assets page, shows all portfolio assets.
{ User userin = System.Web.HttpContext.Current.Session["user"] as User; if (userin == null || userin.UserTypeDescription != "Admin") { return RedirectToAction("Index", "Home"); } portfolios = new PortfolioList(); portfolios....
1
fc850df4ae7e58012ff448f14ef9bd4b
06245636f27850ae46935063389ed5c1
Sets the protection mode.
public void setProtected(boolean prot);
1
95f264741291ee96228184b7737ef79c
a919631f8d80022c1c43d4438ceee52e
Process episode data out of a filename matching ([.\w]+)S(\d+)E(\d+). Unlike pattern1 this process function does not assume any kind of pre-existing directory structure for pulling in additional information. However, it is important to note that the episode's title will not be returned by this method.
def key_for_episode_file(file): left, right = re.search(r"S\d{1,2}E\d{1,2}", file).span() return file[left:right]
1
1416a581fa0736a5b610e0a00ce0d070
8e1927be19174aa35a958a0bce12d7e2
A better check of mu-plugins to include subdirectories. This is a copy of core function with the ability to check subdirectories. For plugins that do not follow the standard naming convention of `WPMU_PLUGIN_DIR/PLUGIN/PLUGIN.php` the filter hook photonfill_mu_plugin_filter is available.
function optimizeform_core_is_module_installed( $slug ) { return is_dir( WP_PLUGIN_DIR . '/' . $slug ); }
0
865068b3427e0fd249ed81fbdd53082e
9498070a9fcf9187588293fc33ca362c
生成虚拟视点主函数
function addVPoint1() { if (handler) handler.destroy(); handler = new Cesium.ScreenSpaceEventHandler(viewer.scene.canvas); handler.setInputAction(function (e) { var position = scene.pickPosition(e.position); var cartographic = Cesium.Cartographic.fromCartesian(position); var ...
1
87b65fd3060cdba9a3f56448ffd8b4b0
0e56c07c6179d834e5f8dd04b0f18d4f
Retrieve the default summary for a given field.
public class Schema implements ImmutableSchema public SummaryField getExplicitSummaryField(String name) { for (DocumentSummary summary : summaries.values()) { SummaryField summaryField = summary.getSummaryField(name); if (summaryField != null && !summaryField.isImplicit()) ...
0
9c9bd2e6115bdae7ed5910a9b56d1680
b6a62cc61b20f34940b703a0f914b6f2
获得指定时间戳的那年的起始时间和结束时间
namespace Miracle.Common.Utility.DateTimeExtension public static class DateTimeExtension public static ValueTuple<DateTime, DateTime> YearStartEnd(this DateTime dateTime) => new(dateTime.YearStart(), dateTime.YearEnd());
1
b1d0be07f77321a087da9975ca859bbc
9f0fc44abf91e999fa910bc0bdb813c0
Gets the mapping function that maps list items to their search keys.
namespace Xenko.Core.Collections public abstract class KeyedSortedList<TKey, T> : ICollection<T>, ICollection protected abstract TKey GetKeyForItem(T item);
1
079d7517254e5ca6d0334c8e6ec8516c
e9ad516eca1808b2253f28685dc1d000
개설과정관리 시작메뉴입니다.
AdminUser user = adminUser; Scanner scan = new Scanner(System.in); String sel = ""; while (true) { System.out.println("\t\t\t〓〓〓〓〓〓〓〓〓 M E N U 〓〓〓〓〓〓〓〓〓〓"); System.out.println("\t\t\t1. 기초 정보 관리"); System.out.println("\t\t\t2. 교사 계정 관리"); System.out.println("\t\t\t3. 개설 과정 관리"); System.out.print...
1
909f1e67ad9d490d71cbe0a1e4b2304d
877e978cbcc9d88ae55ba53837d611e3
Base64解密(默认采用UTF8编码)
namespace Advantech.IFactory.CommonLibrary public class SharedManager public string Base64Decrypt(Encoding encoding, string input) { string result = SS.Base64Decrypt(encoding, input); return result; }
1
5d1e9ee820099067d642010c338350c4
f37d8c4a8f8fee266d3ef597caaf0e40
OSPPTokenInfoGetValidAfter() - returns valid after time
{ return new DateTimeImmutable( \sprintf( '@%d', $this->parse( false )['validTo_time_t'] ) ); }
0
21da231562b50e75fd47ac90f65ee712
02b655e4d85f5f71fed58712c4ab3c7c
<p>Title:addReserveBuy</p> <p>Description:添加预定车位购买信息</p>
int addReserve(Reserve reserve) throws SQLException;
1
d956fe86d81d68c35390a08556ec6851
d9cdffc1185e2e321b5c060d0a41e39e
change pygame coordiantes to the format used by the rest of our program
class Events(): # Initialize the pymunk physics engine details def to_pygame(self, position): return [int(position.x)+25, int(-position.y+625)]
0
ea272771409d3f7dbb21f3067362774c
99e13ae9986d5254c5460b7a80c969b5
Prepare the SOAP Envelope for sending.
doc = minidom.Document() envEl = doc.createElementNS(NS_S, "s:Envelope") envEl.setAttribute("xmlns:a", NS_A) envEl.setAttribute("xmlns:d", NS_D) envEl.setAttribute("xmlns:s", NS_S) doc.appendChild(envEl) headerEl = doc.createElementNS(NS_S, "s:Header") envEl.appendChild(headerEl) a...
1
a07f91d412b51042f9fb77e3d7fe58b5
3d05f1c6f8ed4128601b80b0c6d53099
Shutting down the helper (main thread).
class Manager(object): def clean_up_run(self): _log.debug("flushing stdout") sys.stdout.flush() _log.debug("flushing stderr") sys.stderr.flush() _log.debug("stopping helper") self._port.stop_helper()
1
08956ba7851177d18bd797593aca3ae7
d319c0daef1b8173fa3c429f8a25f242
Gets the last cps of the player.
class ClicksInfo public function getLastCPS(): int { return $this->lastCPS; }
1
d0e16aa705cdb31b66b59d0157c07df6
45ae6259f1f74c5ed158083f400e9b1d
Removes stock from specific portfolio
abstract class PortfolioDetailsManager abstract public function delete($id);
1
c8e3759628df70bad60714a595d17b83
da4193a7c3ff6ea4eaeb67aa7a2e9b77
the visible rectangle NOT overlapping the taskbar
BOOL isInTaskbar(HWND hwnd) { LONG_PTR exStyle; if (hwnd == NULL) return FALSE; if (!IsWindowVisible(hwnd)) return FALSE; if (GetWindow(hwnd, GW_OWNER) != NULL) return FALSE; exStyle = GetWindowLongPtr(hwnd, GWL_EXSTYLE); if (exStyle & WS_EX_TOOLWINDOW) return FALSE; return TRUE; }
0
d4dc6caec66fe472b079cceb49d5b8ee
d8bdbe30821753cefbac075f1b554c68
Iterates over the unused items.
{ return this.AdditionalData .Where(kvp => kvp.Value is PlannerChecklistItem) .Select(kvp => new KeyValuePair<string, PlannerChecklistItem>(kvp.Key, (PlannerChecklistItem)kvp.Value)) .GetEnumerator(); }
0
ab69ec2a0d6158f69a54a50839202c2a
3293c42db49cd0f171de7c9e7da13d1e
Create an instance of {@link com.cosmosource.webservice.pojo.media._096.ProductDesc.ReceivePublications.Product.Publication.PublicationNames }
@XmlRegistry public class ObjectFactory public GetProductIds createGetProductIds() { return new GetProductIds(); }
0
82416313ccfd0c03fdd82f76fcf02cd1
f52bae57a61b09aae299bba7c62aaccb
按忽略重复项的方式将源文件的属性追加到目标属性对象中
public class PropertiesUtils public static void appendIgnoreDuplicate(Properties dest, Properties src) { append(dest, src, true); }
1
741a0f84982fb95144725659a11a422d
1a9c51f235b78419e4a591eff3b797ed
pressure_test
void pulse_test() { hunMS = 0; failed = 0; SysTick_Initialize(1000000); old_count=TIM2->CCR1; while(!failed) { if(TIM2->SR&2){ new_count=TIM2->CCR1; measurement=new_count-old_count; if(measurement <= MAX_TIME){ successful_test(); return; } old_count=new_count; } } failed_test(); }
0
3263d18f6de9e3f629c6b14344e88d5d
ab00491b8636f831e43f8eb787e33081
AudioSourceを同時に再生する
{ while (audioSource.isPlaying) { yield return null; } audioSource.clip = BothSelected; audioSource.Play(); }
0
db2a05e1431cbb3b15df928dd25e8d2f
fe87088c979294335c2c1016399b7581
henkilön etusivulla näytettävä lista projekteista, joihin henkilö ei ole liittynyt
class ListProjectsView(LoginRequiredMixin, ListView): def get_queryset(self): queryset = Project.objects.exclude(status='Delete') if not self.request.user.is_superuser: project_ids = ProjectMembership.objects.filter(employee=self.request.user.employee).values_list('project', flat=False) ...
0
e458ca6223374f96ecf07dd7cfa2550f
231ecea26c3f268f7f36f60580ef13b5
Painel para Edição de Dados do Usuario
namespace DisciplineTeam.Area52.Web.Controllers public class UsuarioController : Controller [UsuarioFiltro] public ActionResult EditSecurity() { try { return View(); } catch (Exception ex) { Console.WriteLine...
1
815d342b36ea79e8faf19abd9ed9dbab
6edbc60abc7bb0071a549a1ef9b560bb
Tests the can rent book valid.
class BDDTests(unittest.TestCase): def test_can_borrow_in_valid_range(self): calculator = self._setup_market_1_calculator() quote = calculator.get_quote(loan_amount=1500) self.assertTrue(quote)
0
8abdf05495a60a516d167e9ff7c01ab4
5bbade2998fc29a4ec42ca317744aced
Convert getitem arguments into internal indexes
indexList=[] if args is None or len(args) == 0 : if wildcard: indexList.append(('%','%')) else: indexList.append(('global','global')) return indexList if len(args[0].split('=',1)) == 2: (category,index) = args[0].split('=',1) else: category = args[0] index=None if wildcard: inde...
1