query_id
string
corpus_id
string
query
string
code
string
label
int64
b4183743e9b7fa0d1ae47bf90ee09b62
8d695b8a66baa3bb491d75c5d39cf7d3
looks for users with valid shells/passwords, checks for SSH login ability, and populates the database info for the users.
def update_users_database(): print "Updating users' database" for new_user in find_new_colls_as_users(): print new_user user_dao.insert(create_user_profile(new_user))
0
dadc361edfe71e39f7e97784a3616d37
2f7055da35ea34b3c0019b964703f959
リストボックスのHTMLを作成し、文字列として返す
class HtmlRenderCallbacks static public function renderListBox(&$model, &$view) { if ($model->getVisible() === false) return; $tw = HtmlWriter::getInstance(); if ($model->getEventName() != '') { $tw->openInput(); $tw->addAttribute('...
1
3de9b4c70e064add79ffe951880b1030
b243a27aa633a65ed83e51725a311292
Duyet cay theo thu tu giua LNR
void DuyetNLR(Node *p) { if( p!= NULL) { cout<<p->info<<" "; DuyetNLR(p->left); DuyetNLR(p->right); } }
0
edeffc7d7e80ab190195335f2fc7b968
57892bb87d980c9c3518b4a45ad437b9
бонус не может быть больше, чем сила противоположной армии
{ int result; int objArmy; for (int i = 0; i < map.length(); i++) { if (map[i].name == object && map[i].army > 0) { objArmy = map[i].army; map[i].army = 0; } } for (int i = 0; i < map.length(); i++) { if (map[i].name == subject) ...
0
54dc99e080edc875ca9993c1882add11
e5e664839f0040eb469fbbde1b9e866c
-- Loop through each record and write it to the byte array
internal protected override void Write(byte[] rowData) { this.streamWriter.Write(rowData, 0, rowData.Length); this.size += rowData.Length; }
0
98bf4d7e2afe28829a5a2be9e6306fe4
f043100644239d530b3e00938b13ab56
パーサにトークンをポストします。
limit = values.size(); logger.fine("トークンサイズ"+limit); for ( Token token : values ) { logger.finest(token.getValue()); } this.values = new ArrayList<>(values); this.values.add(new Token(Control.EOT,null)); List<Token> rtn = new ArrayList<>(); while( hasNext() ) { logger.fine("Parser loop get()"); ...
0
fb4f17245401012da0a77fa46078923f
2ecad1af07b621c8db5a04243020f8ef
Za dano sezono nam vrne lestvico.
function GetSeason($subject);
0
106e2fb4147c1db60263e3c806b56b54
3f2f20df35927f8836c27963401b9e03
Enables the pass button
class MainForm(tk.Frame): def enable_test_buttons(self): self.enable_pass_button(); self.enable_fail_button();
1
3d952d83f8e852abc8ac7c70f16c1a22
316b2d7998e6e1bb5640004698ad99b0
void setMaxLineWidth(float maxLineWidth)
public void setFitLineWidth(float lineWidth);
0
804ba9a9880ce14895d116cca0c4f4b1
3581fc1a873080e32b09f44bc56c3ee6
根据jobname 获得job详细信息
jobName := params["jobName"] space := params["space"] var job structs.JobReq stmt, err := db.Prepare("select name,space,cmd,plan from jobs where name=$1 and space=$2") if err != nil { utils.ReportError(err, r) return } defer stmt.Close() rows, err := stmt.Query(jobName, space) defer rows.Close() for rows....
1
25e8f99832b4be7e7ef8a805592a680f
512a9ff07abb3791bec088d84bd82e53
Метод возвращает сумму всех элементов массива больше заданного
class ArrayTask public function task_09(array $data): int { $sum = 0; for ($i = 0; $i < count($data); $i+=2){ $value = $data[$i]; if(!is_int($value)){ throw new InvalidArgumentException(); } if($value > 0){ $sum += $valu...
0
1d4c5f970725a5af793954129e38de33
332cdfb6e8f202c7d4d56b8036a649a7
Returns an array of required fields.
class Optin_Monster_Lead_Datastore implements Optin_Monster_Datastore_Interface public function get_required_fields() { return $this->required_fields; }
1
7109c40cd7c2ff2f035842b1129b484c
0cee9b7acaaa7456c2f84f87a56ece67
Возвращает число различающихся символов. Не проверяет размерность. Не генерирует исключений.
{ int SumAll = 0; int SumOdd = 0; int Length = Text.Count; for (int I = 0; I < Length; I++) { for (int J = I + 1; J < Length; J++) { int N = 0; while (J + N < Length && Text[I + N]...
0
746ed29f70293a0e689be695a524041b
845f0eef036a50ba056fc7d762e48a40
一维数组转换为二位数组
{ for ($i=0;$i<count($two);$i++) { for ($j=0;$j<count($two[$i]);$j++) {$one[]=$two[$i][$j];} } return $one; }
0
4555e39fec31b68cc03c0e4704e07011
eb5ecb704f21c58d7e47620d8e435e28
获得一个redis对象.单例模式.
class RedisManager public static function getInstance($name, $pconnect) { if (empty(self::$instances[$name])) { if (empty(self::$configs[$name])) { return null; } $config = self::$configs[$name]; $redis = new Redis(); if ($pconnect) { ...
1
84f0045ba1fdf105dad8b35c10527010
b0252d839d1b710628f130d36098cd3c
Create a new `AWS::Route53RecoveryReadiness::ReadinessCheck`.
namespace Amazon.Route53RecoveryReadiness public partial class AmazonRoute53RecoveryReadinessClient : AmazonServiceClient, IAmazonRoute53RecoveryReadiness public virtual Task<DeleteReadinessCheckResponse> DeleteReadinessCheckAsync(DeleteReadinessCheckRequest request, System.Threading.CancellationToken cancellationT...
0
e77941e719cdcaa513132d57b38d4582
b98481b10e0bf844384e5cc8026ff9b0
Configures the task to be repeated in the specified recurring period.
namespace Kendo.Mvc.UI.Fluent public partial class SchedulerMessagesRecurrenceEditorYearlySettingsBuilder<T> where T : class, ISchedulerEvent public SchedulerMessagesRecurrenceEditorYearlySettingsBuilder<T> RepeatOn(string value) { Container.RepeatOn = value; return this; ...
1
511a2884b7bb48e92cea5e8444821b57
b7864bb38a652fdae146ccf52aa45ebc
Cancel staking request
class PocketClientService async nodeUnstakeRequest(address, passphrase) { try { const {chain_id: chainID, transaction_fee: transactionFee} = POCKET_NETWORK_CONFIGURATION; const transactionSender = await this._getTransactionSender(address, passphrase); return await transactionSender .nodeUn...
0
c4a84310eb0d80ce7628c353c658946b
78cb9fe08c5ddd6d005abbedc176cc2e
能否飞碰
class Majiang(): def if_can_bumping(self, player_loc, target): if self.hand_board[player_loc].count(target) >= 2: return 1 return 0
1
f713fc9aaed82df8c199a6d815c67598
9ae80806224739cd956246d8ffdb328b
获取(某天的)所有活动场地
ArrayList<Map<String, String>> list = new ArrayList<Map<String, String>>(); SQLiteDatabase db = this.getReadableDatabase(); Cursor cursor = db.query(TABLE_NAME, null, "day = ?", new String[] { String.valueOf(day) }, null, null, null); try { while (cursor.moveToNext()) { Map<String, String> map = new ...
1
167525acc990d0ec7b4601d51c5dd3ab
f5efaf0127b8a3134b7db12b1b320a79
获取预留手机号
@Table(name = "t_user_bank") public class TUserBank implements Serializable public String getReservedPhoneNumber() { return reservedPhoneNumber; }
1
e231b4d077bade862509e5b3376af00b
480eb606b52b486ced4cecc0aa079fa9
주어진 boardSeq에 해당하는 게시글 정보를 조회하는 메서드
public BoardDto getContents(Integer board_seq);
1
0fa3adb3603f48727c00057dae08fa99
4cd019fb376a6f5d6fcf472c5e23d305
#LIBERAR LUGAR EN LA TABLA COCHERA ----------------------------------------------------------------------------------------------------------
{ $cajero4=Cajero4::find($id); $cajero4->delete(); return redirect()->route('cola1.create')->with('datos','Se ha atendido alguient del ' .strtoupper('cajero 4')); }
0
8856922bc64212e614e234cc16407e42
af684316264f5d9fe3d3e2450dda6d43
把一个批次的标签编号都变成字符串
encodedLabelStrs = [[] for i in range(batchSize)] decoded=ctcOutput[0][0] idxDict = { b : [] for b in range(batchSize) } for (idx, idx2d) in enumerate(decoded.indices): label = decoded.values[idx] batchElement = idx2d[0] encodedLabelStrs[batchElement...
1
b3f06829bbe792381fc27460446e90e8
d1437aeb9f00de412690de42af52a0a2
Sets the module to the given API Mode
void setMode(uint8_t mode) { currentMode = mode; }
1
91345170820430630be970477c75065f
8de9f3dd15030c708cb45ea8b7e70cc5
Get all currently occupied slots.
class TicTacToeBoard: def get_empty_slots(self): slots = np.reshape(range(0, self.size * self.size), (self.size, self.size)) return slots[~self.tiles_taken]
0
eb757aa398764157c2368244e3c811a1
6274274cbc55a175ef8eb3a3eec52420
Redux action creator to clear the authentication token
return dispatch => { dispatch(removeToken()); return dispatch({type: types.LOGOUT}); }; }
1
d5fd316c057e000fe3633055d6a0a1b1
23665871e301f65c673ec437cfcf4b47
Get the memory size of the synapse blocks for a given set of atoms
class IFCurrentTargetExponentialPopulation(AbstractTargetExponentialVertex, AbstractIntegrateAndFireProperties, AbstractPopulationVertex): def get_cpu_usage_for_atoms(self, vertex_slice, graph): return 782 * ((vertex_slice.hi_atom...
0
4e59cef56d3a847d1fca7c80e9878adf
2854c4dab51f47765d511ca3336d7175
Lấy danh sách phim sắp chiếu
@GET("in_theaters") Call<MovieEntity> getInTheatersMovies();
1
62f86c14b1204d2cbcccf16e82938e19
5b48eec478b648c3da97a2e8b0a3be24
Testing scenario when server error on second page
public void secondPlayerConnection() throws AWTException, InterruptedException { try { driver.get(uiPath); driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); WebElement startGame = driver.findElement(By.id("startGame")); startGame.click(); WebElement gif = driver.findElement(By.id("loadi...
0
3745ec3cfae36294493891a3f62c1029
9af5235de2883fd22f8808e908fbe777
Displays all possible commands to choose a network error
printf("h[elp]\n" "d[ir]\n" "q[uit]\n" "hi[story]\n" "du[mp] [start, end]\n" "e[dit] address, value\n" "f[ill] start, end, value\n" "reset\n" "opcode mnemonic\n" "opcodelist\n" "assemble filename\n" "type filename\n" "symbol\n" "progaddr address\n" "loader fil...
0
944de7ec5739f502b2d86714831472ce
83d40c2968edd48441934121877b0768
Gets the parameter value to be passed to invoked method.
namespace Beyova public static partial class ReflectionExtension private static object GetParameterValueByParameterArray(ParameterInfo methodParameterInfo, int sequence, object[] parameters) { object result = null; if (methodParameterInfo?.IsIn ?? false) { ...
1
01d387b7484a1b7dba8fc7fa56e813b8
d072c21870385e3574252cfc12f6784d
Get expositions.
namespace RisquesExamensV2.Controllers public class expositionsController : Controller public ActionResult Index(int? id) { IdDeLEmploi = (int)id; var exposition = db.exposition.Where(exp => exp.idEmploi == id).Include(e => e.Risque); return View(exposition.ToList()); ...
1
a9114aaec3625e6bd8fc69f0cfbb27b4
bbe2575f9884f4d10825b7a91ddf5162
<PRE> 1. MethodName : getTreeGroupSummaryList 2. ClassName : AxisTreeBizComp 3. Commnet : 트리 조작 화면에서 보일 트리 그룹 리스트를 return 해 주는 method 4. 작성자 : Jack 5. 작성일 : 2011. 12. 6. 오후 4:35:32 </PRE>
@Override public List<TreeGroupSummaryDTO> getTreeGroupSummaryList() { SearchRow search = new SearchRow(SearchCommon.SEARCH_ALL); search.setSelfAlias("this"); search.addProjectionProperty("this.id", "id"); search.addProjectionProperty("this.name", "name"); search.addProjectionProperty("CREATE_DATETIME", "cr...
1
9616c19d8177a62b86728fb1ef7dc5e1
49f7654e6c1bb33d23819f0cb437858a
This routine parses all of the info out of the cal file. It calls the individual parse methods for each of the gauges based on the gauge flags. Each of the special gauge parse routines will return a dictionary with the cal info
class calEnergyXML(calXML.calXML): def read(self): doc = self.getDoc() engData = numarray.zeros((calConstant.NUM_TEM, calConstant.NUM_ROW, calConstant.NUM_END, calConstant.NUM_FE, 2), numarray.Float32) latList = doc.xpath('.//GLAT') latLen = len(latList) if l...
0
1d9a88b08c37c0f98cbeab141bf2b3f4
6f26c3a9ed2b46ba6f8e110a32e09634
保存条件リストより、検索条件の項目の再現
@Component(instance = InstanceType.SESSION) public class OutputRecommendListForm implements Serializable public void saveSearchCondition() { this.searchSupplierCode = this.supplierCode; this.searchSupplierName = this.supplierName; this.searchPOCategory = this.poCategory; this.searchPOCategoryName =...
1
ff96b2c15e8c8efa5d175769480544e3
ea6627cb63345b8b6077692a2508a92c
If {@link #showAllProps} is false, only standard descriptors are considered.
@Deprecated @ProviderType @Component(componentAbstract=true) public abstract class AbstractSlingRepository extends AbstractNamespaceMappingRepository implements SlingRepository, Runnable public boolean isStandardDescriptor(String key) { Repository repo = getRepository(); if (repo != null) { ...
0
e1cf628d1dee85948cedf52fbea1442d
4b2927bbbeec82e36571e0d65cc8ff73
thêm tên cho các phần tử chưa có tên
void them_daucach(string &s){ for(int i = 0; i <= s.length(); i++){ if((s[i] == ',' && s[i+1] != ' ') || ((s[i] == '.') && (s[i+1] != ' '))){ s.insert((i+1), " "); } } }
0
ed028aceffbb8f6f629b7b2ac3f9318c
648284d32d32b1e68db90fe0a118a3e8
刷新当前的位置
for (int i = 0; i < pointBeans.size(); i++) { if (pointBeans.get(i).isCurrent()) { pointBeans.remove(i); break; } } for (int i = 0; i < pointBeans.size(); i++) { pointBeans.get(i).setPosition(i + 1); } hadInterse...
1
205e72e4f3a6fa8d4dc014e73897ce3e
67efc9ee14d74e5494d72f8bdb527215
Checks to see if a move between two sets of coordinates can be made for a Rook piece.
{ int offsetX=Math.Abs(moveToCheck.To.X - moveToCheck.From.X); int offsetY=Math.Abs(moveToCheck.To.Y - moveToCheck.From.Y); if (boardBeforeMove[moveToCheck.From] == ChessPiece.Empty) { throw new Exception("No piece found."); } if((offsetX==1 ...
0
bf6da0986635d46287bdbd3591a09d4a
22720892823eaa7a35f03a032e0d3efe
Returns the footer metadata; used by the `<layer-standard-message-view-container />`
public function getFooter();
1
5098acec0e9c4cddd407f148e71bf7a6
b52ff97e06aa5176257f47cc5e477895
Tests that a state handle is replaced.
tempfile = "/tmp/__temp_state" self.tracker.scan() self.tracker._state.changed = [] self.tracker._state.deleted = [] del self.tracker._state.alerts self.tracker.save_state(tempfile) self.tracker._state = None self.tracker.try_load_state(tempfile) s...
1
0f58513053070941ee7a850787d10933
4a3f72d32d6173b14268296ad5bd6b15
Hook up collision events with their handlers
namespace UI.BattleSystem.Controls public class MapPlayer : MapBattler protected override void initializeCollFuncs() { base.initializeCollFuncs(); registerOnEnterFunc<MapEvent>(onEventCollEnter); registerOnExitFunc<MapEvent>(onEventCollExit); }
1
410516f163e036132a0d11a576278b65
d177d6cf820c707e7a5dbb2310d90756
Makes a KDE plot using the specified column in the dataframe.
def histPlot(dataframe, column): x[column].plot(kind='hist')
0
f347137d4fc761627b6a1555b75ce88f
9294a041043005b159467e97b0b3c4d1
检测创建房间状态
class Client(aiotfm.Client): async def check_room_state(self, timeout=1.0): check_id = (1 << 24) + 255 await self.send_callback(check_id, "room_state_check") try: id, text = await self.wait_for("on_lua_textarea", lambda id, text: id == check_id, timeout=timeout) except Exception: return False return map...
1
51b74a1ecd728845ba0dbc6dc11e2dc7
a85a890b1714e629aafb46ffeadd5b6b
重新设置显示教师详细信息表格大小
function _AutoSize(){ $("#tbinfo_group").bootstrapTable("resetView",{"height":$("#tbinfo_group_div").height()}); }
1
6a94202f969f0f188970650cefdfffcd
c5a7d47695650bf14aba5c0b4270d458
Override the group slug in permalinks with a group's full path
function _acf_apply_unique_field_group_slug( $slug, $post_ID, $post_status, $post_type, $post_parent, $original_slug ) { if ( $post_type === 'acf-field-group' ) { return $original_slug; } return $slug; }
0
86b013614e8a3481b43fde57363affcf
1da0356bdd723268df61f1b91a3fbd18
Schreiben des Indexes im Backend. (Limit von Seiten der Tabelle von Kontrasten + weitere Aufrufe)
{ $id = $this->checked->kontrast_id; $name = $this->checked->kontrast_name; $description = $this->checked->kontrast_description; $textColor = $this->checked->{'kontrast_text-color'}; $backgroundColor = $this->checked->{'kontrast_background-color'}; if ($name != "") { $this->writeContrastTable($id, $name...
0
1ceb2c95b6359c28d89318ad23a3e654
02fb31a80f776d51a91d60273075ce5a
Simulate the gamma ray according to Butcher & Messel: Nuc Phys 20(1960), 15
{ double nu = *(double *) params; double nu_c = (electron_charge * B) /(2. * M_PI * mass_electron * speed_light); double gamma_minus = ((n*nu_c)/nu - fabs(cos(obs_angle)) *sqrt((pow((n*nu_c)/nu, 2.)) - pow(sin(obs_angle), 2.))) /(pow(sin(obs_angle), 2)); doubl...
1
4494e5be705013eed59b0397653f4781
bc7238cc5889825fe20ce74e84439391
GET: Trademarks
{ UnitOfWork trademark = new UnitOfWork(); var data = trademark.TrademarkRepository.Select().ToList(); return data; }
1
3a7d89ba62c6e8eb06b1b5a51fea61d5
5d283d7c285edd31d8606f43ea6bbda7
Clears the error message set in the MPD.
public class MPD public void clearError() throws MPDServerException { mpdConnection.sendCommand(MPD_CMD_CLEARERROR); }
1
b1505103e5fc405568470cc87367de17
8ed27e4366f4eb3604331fcd9e9986ca
Check for an included file in the given include directories
class Configure(config.base.Configure): def checkInclude(self, includeDir): oldFlags = self.compilers.CPPFLAGS self.compilers.CPPFLAGS += ' '.join([self.headers.getIncludeArgument(inc) for inc in includeDir]) if self.otherIncludes: self.compilers.CPPFLAGS += ' '+self.otherIncludes self.pushLanguag...
1
2f777dbf55f136fc72ddd386c18f2e39
2ba4827302bbe304e0fef45abd6664f9
检测状态,如果是真则关闭手电筒,否则打开手电筒
if (isOpen) { if (mEasyCamera != null) { parameter = mEasyCamera.getParameters(); parameter.setFlashMode(Parameters.FLASH_MODE_TORCH); mEasyCamera.setParameters(parameter); } } else { if (mEasyCamera != null) { parameter = mEasyCamera.getParameters(); parameter.setFlashMode(Parameters.F...
0
c3805b8a6c368246e4c5c2cc67c317ee
d9f76364252076e8e702795422bcd526
ProvinceRepository constructor.
class ProvinceController extends ApiController public function __construct(ProvinceRepository $repo) { $this->repo = $repo; }
0
05b52042dd4195f2eb548b237ecd22b4
7f0d3f4f5c945ff045325d1bc2745909
Método que define o alcance da máquina (altura da árvore que poderá alcançar)
@SuppressWarnings("serial") public final class GraphicsTree extends Canvas private int setMaxTreeHeight(int size) { this.maxTreeHeight = size; return size; }
1
de491a337c472817dc3f09f9619ec375
c0a9a4416f707017cbe2dc3920021957
Some view mixins assume that the thing they're mixed with will define self.get_object. Therefore we provide a class that does only that, and which we can initialize to return whatever we need for the test.
class AMYCreateAndFetchObjectView(AMYCreateView): def __init__(self, *args, **kwargs): self.other_object = None super().__init__(*args, **kwargs)
0
b1570138cb4c4804bde87dbc3c4212f3
f7480d63e0b0addbef00bb9801f81d2e
To get freelancer project details (portfolio listing)
class HomeController extends Controller public function freelancer_list() { $freelancers = UserProfile::where('user_role_id', '2')->paginate(8); $total_freelancers = UserProfile::where('user_role_id', '2')->get(); return view('frontend.default.freelancers-listing', compact('freelancers', 'to...
0
10c5128f30eed119f1b9fbc339df98bf
79b644d022d9232eeec4604d1dcfad02
Retrieves a previously created assertion for a given request.
const { index, collection } = this.getIndexAndCollection(request); return this.kuzzle.internalIndex.get('validations', `${index}#${collection}`) .then(response => response._source) .catch(error => { if (error.status === 404) { errorsManager.throwFrom( error, ...
1
41170a143b95997061699cf806b7814e
2b9d3f47e18445d319d92c53dadb6548
Httpレスポンスステータス実行結果を取得
class HTTP_Parallel_Response public function getStatus() { return $this->_status; }
1
aa833de80fa582e4912b4ae0a497b9d6
6036986b37bb5af41d20658c370afb89
Return a list of user and setting pairs where the setting value matches the given wildcard string
public function getUsersWithSetting($name, $value);
0
afac46d057227a937e9c49c9eed3be09
eac36b1433bf5d9f5849d257ed4525f7
# Returns the Manhattan distance between two locations
dx <- abs(nodeA$x - nodeB$x) dy <- abs(nodeA$y - nodeB$y) return (dx + dy) }
1
63fc2c7e516d2e4feca0ebb0e3e33df2
40fbbdcf958512880039b8bac23f43c0
Handles the Elapsed event of the UntouchableTimer control.
{ _elapsedTime += _timer.Interval; if (Opacity < 0.1d) { _timer.Stop(); _timer.Dispose(); Close(); return; } if (_elapsedTime >= _displayDuration) { Opacity -= 0.1d; } }
1
afa957bc2dadd8cc3de923b7b0e7fdf6
6762168ff06da18780256fc7a5318b11
Return a position and velocity vector for a given date and time.
from .global_vars import _batoid_max_threads x = np.empty(len(self._x)) y = np.empty(len(self._x)) z = np.empty(len(self._x)) self._rv.positionAtTime( t, x.ctypes.data, y.ctypes.data, z.ctypes.data, _batoid_max_threads ) return ...
0
49179b7c27665aea52a90bb15ba97b86
1fa2b9adf199142f5ac7b1ae5690b6e7
Updates a single item by ID
{ string url = baseAddress + "/" + item_id; var json = JsonConvert.SerializeObject(update_info); var jsonstring = new Dictionary<object, object>(); jsonstring.Add("JSONString", json); var response = ZohoHttpClient.put(url, getQueryParameters(jsonstring...
1
e954320fce5fd89325eb35afa617de13
cfea0d6138d75eaa81c68cb3bc0e324c
Performs Basic LICMi
vtkSmartPointer<vtkImageData> LIC(int width, int height, int L, double h, std::vector<Vector3*>* data, int n, int m) { vtkSmartPointer<vtkImageData> image = vtkSmartPointer<vtkImageData>::New(); image->SetDimensions(width, height, 1); image->AllocateScalars(VTK_UNSIGNED_CHAR, 3); vtkSmartPointer<vtkImageData> noise...
1
2520315c0dca9aa315f8e236c0f25e71
e75acd5cf2d78183ffa5345a6b4f1a0a
load danh sách bàn trống
class GheController extends Controller function getDanhSachGhe(){ $ghe = DB::table('ghe')->distinct()->get(); return response($ghe) ->header('Access-Control-Allow-Origi', '*'); }
0
ddb3feeef7052ee81a9a527aea51d56d
1557a0bd94633afa92fd75371162fdbc
Only works with format like: 2021-05-29T09:00:00-04:00
class TestSlack: def test_parse_dt_returns_with_unexpected_format(self): dtstring = "2021-01-01 12:12:14" expected = datetime.datetime(2021, 1, 1, 12, 12, 14, tzinfo=pytz.utc) assert self.client.parse_dt(dtstring) == expected
0
ff6a8d63e418f30fd0903589c9b721db
ad5a87b5e0f710a9363f850d904fe44f
Glob route: '/path/*' - Rewritten to be a RegExp: ? becomes (.) * becomes (.*)
function makeRouteRegex(route) { route = route.replace(/(:[^\/]+)/g, '([^/]+)'); if (route.slice(-1) == '/') route = route.slice(0,-1); return new RegExp('^'+route+'/?$', 'i'); }
0
ddb14fd351a477c6337879dbb6ba1bbe
9ee4cd7c2cc5a9c3c4ab86e213413954
Error object for diagnostics
function ErrorHelper() {}
0
15fe072c47e1a75acd8ba03632878319
3e499e900777e779707be28593ba3148
State thread - periodical dump of the queues.
static void nbsp_periodic(void){ e_report_qstate(); }
1
9d9d4f762a413fcb2125a79f1ded289a
8d55d25a6df0426729437b5532ee9405
Terminar el controlador del raton.
if(this.control != null) { this.control.MouseDown -= new MouseButtonEventHandler(mouseDown); this.control.MouseUp -= new MouseButtonEventHandler(mouseUp); this.control.MouseMove -= new MouseEventHandler(mouseMove); this.control.KeyDown -= new KeyEventHandler(keyDown); this....
1
7351f65c23dd834990fc53b89971002a
3e4be9dad868433b5d5dcce2707c6b28
Tests the "community is inactive" fail condition
{ $communityId = 4; $presentationLetter = 'C'; $this->_testDeliverPresFailInactiveCommunity($communityId, $presentationLetter); }
1
5514daf7c375a2bcd41a61f8f39c5b77
f031bc338a0dab131cf62eeff4c496f2
更新B类BO等级
{ uint16_t sClanID, sCapeID; uint8_t byFlag; pkt >> sClanID >> byFlag >> sCapeID; g_DBAgent.UpdateClanGrade(sClanID, byFlag, sCapeID); }
0
01e264b16bb168b1e546ad24d30656af
8ea2c54ec89738f9490e1080306974c9
权限申请成功时打开摄像头
public class CameraLegacyFragment extends Fragment implements OnClickListener{ private void openCamera(SurfaceTexture surface,int width,int height){ if(ContextCompat.checkSelfPermission(getActivity(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){ FragmentCompat.requestPermission...
1
4fbe62fc9adcc2cdaf4f54c2588aebab
c0dda0ed5fd1bcf9a000e95aaaf0b6e8
Get source page file format such as "XLF", "XML".
public class DocumentMetaData extends MetaData public CodeValue getFormat() { return format; }
1
3224b0eef492ad16b626ab3d966e13c9
a0700e37aa04fc094452298bd7e81b8a
! Function that calls all the invkin modules and retrieves the computed joint velocities.
n = len(thetalist) dthetalist = np.zeros(n) ddthetalist = np.zeros(n) Ftip = np.zeros(6) return InverseDynamics(thetalist, dthetalist, ddthetalist, g, Ftip, Mlist, Glist, Slist)
0
53c33463e52db95428ff464e1ae4e866
4a710db5fb91d3300ccd8974a7ff84af
Gets the number of cores available in this device, across all processors. <p>
int getCoreCount();
1
a595820a4ae8a32b74161340ea96b9c8
1cd9faf50657c1f570e3ae9dda4ba17e
初始化参数配置(这些参数是配置在SDK服务器上的一些敏感数据)
public class Session extends Application private void initConfig(){ Global.context = session; Global.setAppId(Global.getString("appid")); Global.setOrgId(Global.getString("orgid")); Global.setAppSecret(Global.getString("appsecret")); Global.setStringSharedPre(Global.SYS_LOG_LEVAL, "D"); ...
1
229ad4c5dd865aea61f4af18371cf785
d616cc0b0ab8c41fb4bc9f8a8554caf6
Handler for GameObjectSelected event.
{ if (base.eventSystem.currentSelectedGameObject) { var go = base.eventSystem.currentSelectedGameObject; base.eventSystem.SetSelectedGameObject (null); } }
0
bae06f9de9f2804d9ca4b12960868e07
d863c03693154f3ce8ad7b75d0e4580c
进入货物信息Detail信息页面
function gotoInfoDetail4() { return API_BASE + '/gotoInfoDetail4.htm?'; }
1
0eaabcf1a8973ea8291a914e48a841e0
0c8be767d5c354969a7b991f2f11e9d8
рисуване на игрището
void game() { system("cls"); counters[0] = counters[1] = 20; init(); if (!align_ships()) { menu(); return; } while (GetAsyncKeyState(VK_RETURN)) Sleep(500); draw_right_field(); draw_scores(); text_xy(x0 + text_x, y0 + 7, info_color, "For move target use arrow keys"); text_xy(x0 + text_x, y0 + 8, inf...
1
98b4e36371ad818d4d6346c48dca4db3
769c0454a67dbab9a2edd50a5093a6e7
Constructs the holdings dictionary that is "as of now
order = client.get_account() for i in range(len(order["balances"])): accHoldings[order["balances"][i]["asset"]] = {"free": order["balances"][i]["free"], "locked": order["balances"][i]["locked"]} return accHoldings
1
9841398504c91dbeeba1c268e49b0d4a
d13ed56ec3bf3628996cdcaffc1b3d4b
Set ownership of a faked file.
class ContextualCommandRunner(object): def userfy_file(self, path): os.chown(path, self.uid, self.gid)
1
a303d99fcc1e46540738dcadb682b0b0
b0ce223f14dfde9323f465de19883c12
Normalize the arrayList, meaning divide each column by its standard deviation if that standard deviation is nonzero, and leave the column unmodified if it's standard deviation is zero.
_, centered = mean_center(arrList) centered_squared = multiply(centered, centered) stdevs = list(map(lambda x: x**0.5, columnwise_means(centered_squared))) nonzero_stdevs = list(map(lambda x: 1 if x == 0 else x, stdevs)) inverses = list(map(lambda x: 1/x, nonzero_stdevs)) return stdevs, scalarMu...
1
51d9bd4c3e9f8af2d48d9a6e543b4284
ddf5ba59103343a5b514e03b197713b3
선택된 캐릭터를 전/중/후방에 따라 배치
{ int RandNum = Random.Range(1, 4); switch (RandNum) { case 1: go.GetComponent<SpriteRenderer>().sortingLayerName = Far_Background_Layer; go.transform.position = new Vector3(go.transform.position.x, go.transform.position.y, Far_Background_Dist); ...
1
8333fd5af24e30bae9dd156df52a8fee
03d89e95bbfbfc820bded324623a9055
更新运营商非空字段
@Component public class HostService public Host updateIgnoreNull(Host paramObj) throws Exception{ hostDao.updateIgnoreNull(paramObj); return paramObj; }
1
2a21417cd1532fb70b8e9ed391857a16
fee52cfe6a202d35f3a7cd2c2a846073
Returns 1 if x is a power of 2 and 0 otherwise
int v1 = !(0x80000000 & x); int v2 = x & (x - 1); return !!x & !v2 & v1; }
1
d784064956f45ed8cab8f649cfff7319
281c5a547cd7c4303366e72c2f868b65
Получить список правил для провайдера
namespace NCR Task<List<Rule>> GetRules();
1
9864f321618d718b2f23d36d059286e7
3add5827d4add2cd949ca006fa071523
profileId를 받아 스케쥴러를 해제 시킴 (DB X)
@RestController public class LibrayRestController @Secured("ROLE_LIBRARIAN") @RequestMapping(value = "/librayscheduledelete", produces = "application/json;charset=UTF-8") public String scheduleDelete(HttpServletRequest req,Schedule schedule ) { int lb_code = Integer.parseInt(String.valueOf(req.getSession().getAtt...
0
7c529c9a72b2c61c58caa398cebfd594
128364ca10f1936e5e033106144a6aff
Append an item to the outline.
{ auto size = m_outlines.size(); m_outlines.resize(size+1); auto& outline = m_outlines.back(); outline.push_back(b0); }
1
7e2f346ae483951bb9cf7a7985ecf85c
2fe9ece1d3a18742b3a063ede0702f7a
Task to handle updating tinygl.
static void game_task(__unused__ void *data) { navswitch_update(); button_update(); if (button_push_event_p(0)) { reset(); } switch (game_state) { case STATE_SELECTING: if (navswitch_down_p(NAVSWITCH_NORTH)) { if (showing_status == 0) { ...
1
b67b30805832e091977ec099550a490b
be194de1aef0202a18229bb42f02958c
Retrieve supplied content image from within content image directory. @name: an image
if image_id not in self.images: self.images = self._get_images(self.db_info) if image_id in self.images: return self.images[image_id] return ""
0
ac888121d65f27f3d9138cb52b316418
6d8b432cf5e78667e7d2d06c6c3fcf02
Converts binary data into a hexadecimal representation.
{ if (data == null) { return string.Empty; } char[] content = new char[data.Length * 2]; int output = 0; byte d; for (int input = 0; input < data.Length; input++) { d = data[input]; ...
1
21cef32feef545428644740b843b41a4
45b31e6570baa5ab09e2b9b2a77a07f2
自动点击弹出确认或弹出提示
while True: ss = False try: element = self._find_element(method=method, message=message) element.click() ss = True config.case_log.info(f'click element success (method={method},message={message})') except: ...
1
e976da884a646405d01a5954703fc56e
f9b6589a90a0f08045d576c1a9a65e02
============================ METODO PARA COMPLEMENTO DO PERFIL ==================================
class UsuarioService extends VueService implements UsuarioServiceInterface public function BuscarPerfisParaAdicionar( string $userId ){ return $this->perfil->perfisParaAdicionarAoUsuario( $userId , Auth::user()->hasPerfil('Admin') ); }
1
5a0ccb2e8f6a32f893b343cd828a3836
bb2dd10f35d7385a1b595d00fe752597
LDAPディレクトリへのバインドを解除する
class LdapServer(object): def disconnect(self): self.ld.unbind_s()
1
bd95a049e8940c5236949e50814564b2
a9df03b67097e748f4302a5c4397580a
设置Z坐标(local)
public static class TransformExtensionOrigin public static void setLocalZ(this Transform transform, float z) { transform.localPosition = new Vector3(transform.localPosition.x, transform.localPosition.y, z); }
1
464f17532554ce3e000e2c282583b2a8
6fe358f5e4040ecf4f209729379eff99
Initializes the Bandfilling correction
star_ids = set(np.vstack(sampled_sci_params.index)[:,0]) bc_labels = ["BC_Hp", "BC_BT", "BC_VT", "BC_BP", "BC_RP"] mag_labels = ["Hpmag_dr", "BTmag_dr", "VTmag_dr", "BPmag_dr", "RPmag_dr"] fbol_labels = ["f_bol_Hp", "f_bol_BT", "f_bol_VT", "f_bol_BP", "f_bol_RP"] e_fbol_labels = ["e_f_bol_Hp", "e_f_...
0
2bebdf594392a7a2414464d298a661bf
8e3ddb3a34d06e9e97ef15e2f3b54fbe
쪽지조회 biz 요청 및 html생성
function returnMsgs(msgs, type){ var msg = ''; if(msgs == ''){ msg = '<p class="no_note">쪽지가 없습니다</p>'; }else{ $.each(msgs, function(index, entry){ if(type=="r"){ msg+= '<div class="noteWrap receiveNoteWrap">' +'<div class="noteWrap_hd">' +...
1
2aa90e7aac2bd1af9da6188367c40082
20dd90e319b4f09f7a3626c9933431a6
Test the HTTP response for the new review page
response = self.client.get(reverse('review-books')) self.assertEqual(response.status_code, 302) self.client.login(username="test",password="test") response = self.client.get(reverse('review-books')) self.assertEqual(response.status_code, 200) self.assertTemplateUsed(response,'list-to-review.ht...
1