query_id
string
corpus_id
string
query
string
code
string
label
int64
6a6f98e05fb43c5aa156fac38801b90f
8899f80dd0960e84c8cadacffc615cb9
Obtiene la informacion de un proceso de seleccion
final Proceso proceso = getTablaProcesoSeleccionado(); posicionProcesoEnTabla = listaProcesos.indexOf(proceso); if (proceso != null) { textFieldNombreProceso.setText(proceso.getNombreProceso()); } }
1
aae37f2e61149f707acfc8cb5d610ebd
ecd069b5f30181fd84f4ce2b0498b5a1
this function returns 1 if the year is leap, 0 otherwise
{ int i = 0; if (((year % 4) == 0 && (year % 100) != 0) || (year % 400 == 0)) i = 1; return (i); }
1
df6961f9190e2b78c6d948fd4e7ea37f
84a401c3bcb11219e6a2d7a22ac17194
function to display structure summary
{ string str; str = "Name"; cout << "| " << "\033[33m" << str << "\033[0m"; printSpace(cur[0], str.length()); str = "Type"; cout << " | " << "\033[33m" << str << "\033[0m"; printSpace(cur[1], str.length()); str = "sz."; cout << " | " << "\033[33m" << str << "\033[0m"; printSpace(cur[2], str.length()); str = ...
1
c4d8c149df85fd66b054f7987f0ea4a6
6d507e9ffcc3800d6d2e98baf47e431f
日時種別を変更した日時を返す
now = DateTime.now case type when :year return now.year when :month return now.month when :day return now.day else return now end end
0
d0d09f3b5d16861ee2bbd4938f75944d
cf4314d60d17f6322e8c0042e011c64f
四元数法求解旋转矩阵
Sa = sin(r[0]); Ca = cos(r[0]); Sb = sin(r[1]); Cb = cos(r[1]); Sc = sin(r[2]); Cc = cos(r[2]); M = eye(3); M[0][0] = Ca*Cb; M[0][1] = Ca*Sb*Sc - Sa*Cc; M[0][2] = Ca*Sb*Cc + Sa*Sc; M[1][0] = Sa*Cb; M[1][1] = Sa*Sb*Sc + Ca*Cc; M[1][2] = Sa*Sb*Cc - Ca*Sc; M[2][0] = ...
0
1bb3dfcda83ff0cf6c111d0b3e373908
424ef08e03c81d46aadd9c7ea692bd60
只针对x,y为中心的所有赢法,能否赢
class Chess{ public boolean isWin(int x, int y, int owner){ int sum = 0,k=1; for(int i=0;i<6;i++)iswinxy[i]=0; iswinxy[0]=x*100+y; for(int i = x - 1; i >= 0; i--)if(chessboard[i][y] == owner){ sum++;iswinxy[k++]=i*100+y;}else break; for(int i = x + 1; i < CHESSBOARD_SIZE; i++)if(chessboard[i][y] == owner){sum+...
1
9babd1196abfa907b7d813e5979f7231
2194164070546c7943911b9040c4c48e
No of Non - Leaf
int count_notLeaf(node *root) { if( root == NULL || ( root->left == NULL && root->right == NULL)) { return 0; } else { int ld = count_notLeaf(root->left); int rd = count_notLeaf(root->right); return 1 + ld + rd; } return count_1; }
1
c89738688cb8d85a8423a98e5a9ebecc
8bb66f6336b30b0f78dbafe0036879c5
Return a context manager which retrieves a buffer from the pool on enter, and set it back in the pool on exit.
class HammerLoggingCaptureContext: def __enter__(self) -> "HammerLoggingCaptureContext": self.old_enable_buffering = HammerVLSILogging.enable_buffering self.old_enable_colour = HammerVLSILogging.enable_colour HammerVLSILogging.enable_buffering = True HammerVLSILogging.enable_colour = Fal...
0
cd57dec938dc809ccfa62b6a574c4511
a3e271d123a25d041c8c135e69f7c78e
This routine is called when a diagnostic has been completely constructed. The message is formatted into text strings and is output.
class SimpleDiagnosticsComponent : public rcomponent::RComponent void diagnosticUpdate(diagnostic_updater::DiagnosticStatusWrapper& stat) { stat.summary(diagnostic_msgs::DiagnosticStatus::OK, "Everything OK!"); stat.add("State", getStateString()); }
0
979498afd5c414865af784508f318eaa
ec6bc0d8808669cf6bae2c424859afcc
Kontrollerar att postnummer är korrekt format.
{ $bool = preg_match(self::$regularExpressions['postcode'], $value); if (!$bool) { return FALSE; } return TRUE; }
1
350849e5a391051155ba48c6f54a4813
e4c05027431e91edc7ce5d168c2cf30a
Sets the first_name of this GlobalLeadCaptureContactResourceModel.
class DeceasedContactSearchRequest implements ArrayAccess public function setFirstName($first_name) { $this->container['first_name'] = $first_name; return $this; }
0
d3d1b6411386d7d63969f1162b8c1cb6
d8c210eb552dee70551d18dcf6245678
Return to Window 1
class ShowFinder: def info2Return(self): self.info2Win.destroy() self.rootwin.deiconify()
1
111155346c9e44c249797fbddf0a0972
d461b54f4f848c30c1d07eba0e3dd02f
Create message files directory
public class MaildirMessageEngine extends AbstractMessageEngine protected File createMessageFile(String name) throws IOException { return new File(msgdir + File.separator + name); }
0
970606d19e50de1e03cb8e4e39a863f9
5442c008d4d5edd475798eb8601caec2
Returns whether this shape is being edited in an editor.
public class RMViewerShape extends RMParentShape public boolean isEditing() { return _viewer.isEditing(); }
1
9459c1866ab39a747919ddd47c9982b6
1730a525ba613968c52f200ce68ed05e
Replaces an entry by it's name
{ assert(name && value); for(Entry& entry : entries) { if(entry.name == name) { if(entry.value != value) { entry.value = value; changes = true; } return; } } Entry& e = Add1(entries); e.name = name; e.value = value; e.haveCmdValue = false; changes = true; }
1
1443386cdd74f236fd6c4791d8cee2f1
6cce9689ee462c2d44786c42188ecb26
Get height of the texture which would be presented to HMD (single eye).
public abstract class TextureResource extends NoHandleNotifier<GlobalActionId> implements Resource, ColorAttachment, DepthAttachment public abstract int getHeight();
1
de3c6c85af3404500b320ad074347d65
059470174ef606c2f6af2f8665e3e7b3
Returns the maximum number of requests that get enqueued if no connection is available.
public final class ClientFactoryOptions extends AbstractOptions<ClientFactoryOption<Object>, ClientFactoryOptionValue<Object>> public int maxNumRequestsPerConnection() { return get(MAX_NUM_REQUESTS_PER_CONNECTION); }
0
45d730e32a2d489eacddb8b24ddf8491
490c2d82217cbcb0c5cb833480ac6ae0
Affecte des coordonnées aux pions
void deplacerPions(SDL_Event event, images_jeu *ImagesJeu, plateau **Plateau, plateau **PlateauSuivant, jeu *Jeu) { int i,j,w,h,k,l; if(!cherchePionSelectionne(&k, &l, Plateau)) printf("[!] Erreur: impossible de trouver le pion sélectionné\n"); else { for(i=0, w = OFFSET_DEBUTPLATEAU_Y; ...
1
d779b29458c4327f53f52f168539d141
6cdd1213a9af3689c316d5ab8b10a677
Очищает хранилище для объектов с указанным в параметре классом.
class Factory public function clearStore($types = null) { return $this->container->clearStore($types); }
1
2581169e5f40c58f398dec96aff6329b
7e80569f1f22cb7374ba7c4bae77ecde
This method was generated by MyBatis Generator. This method returns the value of the database column t_course_homework.create_id
public class EduCourseMajor extends MybatisObject public String getCreateUserFlow() { return createUserFlow; }
0
fb63a829bf5eea116c87bd9485fb8d72
e9e871366b4be3f68206d8108c9ee307
metodo che permette di settare i vincoli del formGroup a seconda dei casi
export class CustomersComponent implements OnInit setNotification(notifyVia: string): void { const phoneControl = this.customerForm.get('phone'); if (notifyVia === 'text') { phoneControl.setValidators(Validators.required); } else { phoneControl.clearValidators(); } phoneControl.updateVa...
1
df13f459b9e3687ed16a70b37ac943d6
ebaa6e6f4a21591c413f6def1e75640b
RGB颜色转16进制代码
{ return (Color.R * 65536 + Color.G * 256 + Color.B).ToString("X").PadLeft(6, '0'); }
1
c3011cb9c8eb05a8c336d61d3f27aa2d
eb6e545222404150531412c90deb5931
Gets deployments with a supplied status
namespace Octokit.Reactive IObservable<DeploymentStatus> GetAll(string owner, string name, int deploymentId);
0
8806babd68aff5b6b8ab6765b72c5496
183b2edc5ce9bf4d3eb6ccfaebd55718
Return the HTTP verb for posting this request. this is useful if you need to override the HTTP verb based on the request being made. (e.g. Marmotta 3.3.0 requires GET for DELETE requests, but can accept POST for INSERT)
public function getVerb(): string;
0
ee58a55973563a44d79180927648d773
567263c042a9bf371addb6fe421ee92c
获取邮箱对应的服务商的SMTP服务器地址
if (false ===filter_var($email, FILTER_VALIDATE_EMAIL)) return false; if (empty($email_arr)) { $email_arr = cache('email_smtp'); if (empty($email_arr)) { $email_arr=Db::name('email_smtp')->select(); cache('email_smtp',$email_arr); } } $host = explode('@',$...
1
f7581361faad35cd172cb4502f3a86aa
ecbfaef7f813a66727c9db34a3607f77
Convert from geodetic to local cartesian coordinates
func GeodeticToCartesian(latitude, longitude, h float64, proj Projection)(float64, float64, float64){ f := 1/proj.Invf e2 := 2*f-f*f latitude_radians := Radians(Dms2dec(latitude)) longitude_radians := Radians(Dms2dec(longitude)) part := math.Pow(math.Sin(latitude_radians),2) v := proj.A/(math....
1
257a0ca476af732e09259364df9d02ae
f4cf312a453b04deec72c2d29a5741c4
Adds a meta box to the Testimonial editing screen
function add_events_metaboxes() { add_meta_box('wpt_events_location', 'Event Location', 'wpt_events_location', 'testimonial', 'normal', 'high'); }
1
751881538384fc8730ab74dcaf85c4c3
e98a49aa195c8aada717b8b21d10e951
创建一个分页码点击函数
function pageClickListener(pageNow,totalPage,showSizeSide,getData){ $(".pagination li a").click(function(){ var page; if($(this).hasClass("page")){ page = $(this).attr("page"); pagination(pageNow,page,totalPage,showSizeSide,getData); getData(page,showSizeSide); } if($(this).hasClass("pre")){ if(page...
1
f5e90fcd27950fdd7bcf963bbbc3f99e
c3f7268c6b5c840b8e83cedf4fa0be83
Retrieve set of tags for a given appearance
public class FaceSDK extends BaseSDK public FaceTag getFaceTags(String faceId) throws SnowSenseSdkException { ensureStringParameterNotEmpty("faceId", faceId); return RetrofitResponseHandler.getResponse(getFaceService().getFaceTags(faceId)); }
1
ae922e0d664b2d603423e7db3a6f2f8d
5c7c112f8466261d3691d10a5bd11b08
Function looping through all beams, extracting the first local maximum bin in each beam over a certain threshold
extrema = [] dz=100 std = self.array.std() max=self.array.max() min=self.array.min() diff=max-abs(min) if(option==False): z=min step=-float(diff/dz) else: z=max step=float(diff/dz) endz=int(dz*.6) zper = 1.0 for k in range(dz): if(k<=endz): for i in range(self.width): for ...
0
c7055cbe92e3bc9a2cf5feb040fdb78a
9b1699dee681285ba820975738d46b2e
Gets the component context line separator.
public class AT_Context implements IsTableContext public String getLineSeparator(){ return this.lineSeparator; }
1
613441d2f4a5eec52b902ddc423722e2
0c47b543b0a23d86ea99eafab67455a2
Returns the next token, or @see undefined if there is none.
private getNextTokenIfDefined(offset = 0): Token | undefined { return this.program[this.position + offset]; }
1
16189f6529428ac09711311aac58ebf5
ee089d0f2becdd8ada4fce815e7e9480
Translate copy group to level.
class App extends React.Component copySortLevel() { this.state.sortManager.copySortLevel(); this.forceUpdate(); }
0
a0b586d0fd3581da08d492cc096a6279
0008a94b85d06bef7d950f461c6ae9e8
Returns the list of possible values for histological type.
return { "bg": 0, "neoplastic": 1, "inflammatory": 2, "connective": 3, "dead": 4, "epithelial": 5, }
1
0395164cf5fa102b4d5c9a697d229c9c
3532a8ee1818e4ed0b81edef2d82f162
Display list of all folders in the current folder along with their date-time of creation.
path = @client.folder_from_path(@user_folder_name) @folder_items = @client.folder_items(path) @folder_items.each {|i| puts i.name} end
0
24130d06e2fb3a4588b425bb16ccca9d
8630d4cfa733388ac2be5e6c3e415f28
Total de Cierres en un rango de fecha.
{ $cierreDiario = new CierreDiarioCustom(); $desgloses = array( 'extraido' => array(), 'insertado' => array(), ); $casosCajero = $this->getCasosCajeroByFecha($date); if ($casosCajero != null) { foreach ($casosCajero as $caso) { ...
0
d69ba62a4f6a75eea1abed474d3f94fe
a51ccd43bf914a3bf805ebee66cc5e6b
Whether the template is the default template provided by API Management or has been edited.
class GetEmailCustomizationResult: def is_default(self) -> bool: return pulumi.get(self, "is_default")
1
13b739ff51b2db7bd689c003ae92332d
107372754e8de0905c098cf80a59c2dd
Является ли этот сегмент прямым
namespace com.epl.geometry [System.Serializable] public abstract class Geometry public static bool IsSegment(int type) { return (type & unchecked((int)(0x100))) != 0; }
0
2798c6def5f427634c0bf11bd400aeab
a9deb45b3601fc8f9f9a94352b86ac1b
Finds any nearby sheep and possibly eats one of them. Called by the Field after this Predator Object has been moved.
public class Beast public void step() { Vector<Beast> seen = field.beastListInSector(this); if (seen.size() > 0) { int totalSpeed = 0; float totalBearing = 0.0f; float distanceToNearest = 1000000.0f; Beast nearestBeast = seen.elementAt(0); Iterator<Beast> enumBeasts = seen.iterator(); while (enum...
0
0e6fa869f8aa3f86594a17da0724f593
2afc864ea7b9b286f7a9b632f735f81a
Handles the Click event of the simpleButtonCancel control.
{ try { this.EnableSaveCancelButton(); } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); } }
0
f060b24b48557880dedcc87536af4843
40ce944a1037d290498c088998f185bd
on textfield losing focus, convert to header html element
var $textfield = $('.placeholder-textfield'); $textfield.focus(function(srcc){ if ($(this).val() == $(this)[0].title){ $(this).removeClass("placeholder-textfield-active"); $(this).val(""); } }); $textfield.blur(function(){ if ($(this).val() == ""){ ...
0
f7787b470c9136083d183643c7405b67
87743fafd01ec54a46bbd6dd67f462d4
<p>Retrieves the amount of experience left that the player needs to reach the next level</p> <p>This is a simple calculation of (requiredExp - currentExp)</p>
public class ExperienceManager public long calculateOneLevelLeftExp(int currentLevel, long currentExp) { if (currentLevel >= maxLevel) return 0; long exp = currentExp; if (exp >= maxExpOfLevel[currentLevel]) { exp -= maxExpOfLevel[currentLevel]; if (currentLevel >= maxLevel) return 0; } return exp; }
0
c59c68fa63f158573f8a5b84389997a7
e384d058d75ee6ac6ddcb176196ecf4b
mysqlのエラーを取得(文字化けするので変換処理)
const char* SQL::getErr() { return mysql_error(conn); }
0
c1528a8d3100bf08ec207ef3429e5098
603f19e10f44151183185c6d98030c9a
Check if given type is Simple C# type (int, char, double,....)
namespace NetworkSocket.Http internal class DefaultModelBinder : IModelBinder private class ModelProperty : Property private static bool IsSimpleType(Type type) { if (typeof(IConvertible).IsAssignableFrom(type) == true) { return true; ...
1
f88c5ed0b5296dc44b64765694e89987
214c3b8e89355741d98b53559231da6c
对一个Map里的entry按照值进行排序,结果存入list返回
List<Map.Entry<K, Double>> ret = new ArrayList<Map.Entry<K,Double>>(); ret.addAll(map.entrySet()); Collections.sort(ret, new Comparator<Map.Entry<K,Double>>() { @Override public int compare(Entry<K, Double> arg0, Entry<K, Double> arg1) { return arg1.getValue().compareTo(arg0.getValue()); }}); retur...
1
f427978b0f1ce1cf74288790e3bcff9b
6e1192a4fda86be9d55e1e63b8a9b958
returns the query of the columns based on the parameters on the list srv and a constant query
{ return new string[]{ "Id_emsdi", "Id_grp", "Id_org", "Id_dep_or", "Id_emp_or", "Emsappmode", "Id_pat", "Id_en", "Code_entp", "Fg_long", "Name_or", "Id_srv", "Id_srvtp", "Sd_srvtp", "Fg_set", "Id_srvca", "Id_freq", "Name_freq", "Id_route", "Name_route", "Id_routedes", "Name_routedes", "Id_boil", "N...
0
1018f4b78cd589a77c06408f30b7c482
28b66fe48d8efc652cfd18d3dc6654d8
セッションから認証タイプなどを取得
class LoginRedirectPHP extends LoginRedirect{ public function getClientType(){ return isset($_SESSION[$this->prefix]['setClientType']) ? $_SESSION[$this->prefix]['setClientType'] : null; }
1
abcd19532b68e58c27976033dfa2fe02
2c3f8fbc2a72c4ae32a18041d739b46e
不传递对象,直接执行规则的例子
class HeadlineRule:#标题规则伪代码 def action(self, block, handler):
0
9e48e561d48c57ade1b21600683c2d8a
2e1a7d81daeeed21c50a15c725485e3c
Тест ограничений
{ $validator = new Limits([ 'min' => 5, 'max' => 10, 'message' => 'Общее сообщение на ошибки', ]); $this->assertFalse($validator->validate(3)); $this->assertEquals('Общее сообщение на ошибки', $validator->error); $this->assertFalse(...
1
e7bb07fbb01c569ffae2117cb0dc90da
e5efb02dcc247f7c5418ef78a3af7685
Returns a recorder to a recording state if it was paused.
public final class ServerCallAsync @ServiceMethod(returns = ReturnType.SINGLE) public Mono<Response<Void>> resumeRecordingWithResponse(String recordingId) { return resumeRecordingWithResponse(recordingId, null); }
1
8237d460d52594028d5cf12254c08424
91d6f27eccfb67043a86c24623bfaafc
获取某个节点的右孩子
{ if ((NULL == p_tree) || (NULL == p_node)){ return NULL; } return p_node->p_right; }
1
60dcacb22de0900a6c27d85e5a5682bf
910caad3500e7b7cef99ce3a7bf670a2
计算行显示信息
{ this.toolStripStatusLabelRow.Text = "第" + (TextBoxUtil.GetNowLineIndex() + 1) + "行"; this.toolStripStatusLabelColumn.Text = "第" + (TextBoxUtil.GetColumnIndex() + 1) + "列"; if (this.textBoxMain.SelectionLength == 0) this.toolStripStatusLabelTextLength.Text = ...
1
5c8c1bde4167aba21a3c755f78c4fec0
0f5ef19376b07184443d4bf8d21dfaa1
After de-serialize, re-setup the runtime orchestrator.
{ Check.NotNull(context, nameof(context)); Check.NotNull(next, nameof(next)); TaskOrchestration taskOrchestration = context.GetProperty<TaskOrchestration>(); if (taskOrchestration is WrapperOrchestration wrapper) { wrapper.InnerOrchestr...
1
72c0f7ad219b71d4bd7c055fa9961478
8b8a53b410c34d3379db74a901eb5a97
没有手牌就不用执行
public class BuGangOperation extends BaseOperation @Override protected void createCanExecuteOperations() { if(!desk.getSetting().getBool(CardGameSetting.NO_QIANG_GANG)) { for (GamePlayer other : desk.getAllPlayers()) { if (other.equals(player)) continue; HuOperation.check((MahjongPlayer)other, this); }...
0
b940ead9c61117e9395a9ee7dc615e62
340aff06bb8fcd62fab79a4fb140174f
Store user last access times - called when use enters a course or site cycles here and there. They are simple operations not needing any of the postprocessing performed by dmllib.php
function fnc_acces_usersys($param1){ $accessDate=date('Y-m-d H:i:s',time() - 3600); $_SESSION['data_access']=$accessDate; $accessIp=getRealIP(); $qryINS=sprintf('INSERT INTO db_user_access (usr_id, access_datet, access_ip) VALUES (%s, %s, %s)', SSQL($param1,'int'), SSQL($accessDate,'text'), SSQL($accessIp,'text'...
1
c45c7aaaf612cb4623184a37b2924055
df69297fbe87a5e7c23ea694bf0c004c
회원를 찾을 수 없습니다.
public class ErrorMessages public static String userNotFound() { return holder.format("userNotFound"); }
1
2ea33d65b06630a630459b5437f466ef
c0564850badac99759636b4235498f3f
Метод, который считывает поисковый запрос и ищет его по всем столбцам таблицы в БД
void searchElements() { currentData = (List)allData.stream().filter(f -> f.toString().toLowerCase().contains(searchTextField.getText().toLowerCase())).collect(Collectors.toList()); fillTable(); }
0
0f51d750fcc0bbb4b7a977b7982d0d95
be5b79351fca4d21f074846fca912ea8
Gets the value of the second guessed number.
public class GuessNumber public int getThirdRandNum() { return correctNum3; }
0
9870031566442876d11bdb1fc7931866
2d289779fab55b5a45da56138c68be7d
Оконная процедура диалога добавления визита к врачу
INT_PTR CALLBACK AddVisitProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { UINT ctrlID = 0; switch (uMsg) { case WM_COMMAND: ctrlID = LOWORD(wParam); switch (ctrlID) { case IDCANCEL: EndDialog(hDlg, FALSE); break; case IDOK: GetDlgItemText(hDlg, txtPatient, szText, textBufSize); newPat...
1
20ee4ed45e884e1bd3188cb07c06b548
29c451c7e6264bfc32df12c1133da2e7
根据缓存服务器名group获取指定的缓存服务器集
List<KongServerDTO> getGroupServerList(String groupName);
1
e90b758694579cce9932ea72cc70a50d
c9e8e195d573a800d358e07a6aa553d5
Handles the MouseDoubleClick event of the tailThumb control.
{ if (!moThumbMouseDown) return; if (moThumbMouseDown == true) { this.moThumbMouseDragging = true; } if (this.moThumbMouseDragging) { MoveThumb(e.X); } if (ValueChanged...
0
b43028eb261b7f9dd540104af9dd1bcc
76dda73ad2475b88676e7172c670339d
Retourne une commande du fournisseur
class LigneProduit public function getRefCommandeFournisseur() { return $this->refCommandeFournisseur; }
1
20b0d7c0ba0a82da9d3fdd5ee4bc009a
7d5fbb3a18ecb8a08e4121d191c87ba2
usuwa wszystkie wydarzenia
public class EventDBModel{ public void deleteAllEvents() { CreateDB.database.delete(CreateDB.TABLE_EVENTS, null, null); }
1
15983d255eb1f4b6f9bb0975454e3295
833c9ea643b3b911d29f1132004c4d19
Метод возвращает пользователя по логину. Перед операцией выполняется проверка. Если данные не проходят проверку - выбрасывается исключение.
public class UserStore public User findByLogin(String login) { this.checkTable(); String query = this.settings.getSettings("SQL_FIND_BY_LOGIN"); Object[] fields = new Object[] {login}; List<User> result = this.getUsers(query, fields); if (!result.isEmpty()) { return r...
0
e069b91d5baeaa942811e2debd7ce5c5
c18d6f2c116d5d6f0351a49b498f39ed
用来批量生成测试数据包括集中器,栋,楼层,房间,水表房间,水表
public void createBatchFlow() { List<CloudProject> prjList = netTestGeneratorService.getTestPrj(); if(!prjList.isEmpty()){ for(CloudProject pro:prjList){ Date now = new Date(); now = DateUtil.dateRemoveSec(now); for(int i = 0;i < 120;i++){ JSONObject obj = new JSONObject(); obj.put("resour...
0
4ed6071bae20dbe6e6f8eab8c2785589
16ab6bc107d71a8f57ea0a765ee1df35
Метод приводящий сисмплекс таблицу к опорному плану
{ int ResultCol; int ResultRow; while (!IsItEnd()) { ResultCol = findResultCol(); ResultRow = findResultRow(ResultCol); ListBasisP[ResultRow] = ResultCol; double[,] new_SimplexTable = new double[m, ...
1
cb9fc404142522f0c385e2e378fe644d
ce1b717d14487e887f5ba87a3c0cab40
Return an adjugated copy of the matrix.
namespace SoundLibrary.Mathematics.ThreeDimension public class Matrix public Matrix Adjugate() { double ax = this.by * this.cz - this.bz * this.cy; double ay = this.bz * this.cx - this.bx * this.cz; double az = this.bx * this.cy - this.by * this.cx; double bx = this.cy * this.az - this.cz * this.ay; d...
1
b0eb13f9b993bd56666805a4fdae676c
e551f4dcbdf0c43faa4b961fc14f2d33
Obtem a cor relativa à uma classificação de multa. Usado somente na interface.
if (!taxa) { return '#000000'; } if (taxa.taxasSaoIguais && taxa.taxasSaoIguais === 'igual') { return '#000000'; } if (taxa.taxasSaoIguais && taxa.taxasSaoIguais === 'diferente') { return '#FF0000'; }...
1
fe741591a043bc7451a5ce30cbe7eb27
6799a800454a1276d48112cb5acf9482
Devuelve el minimo numero de un array recursivamente
$numMenor = 12; foreach ($arrayNumeros as $valor){ if($valor < $numMenor){ $numMenor = $valor; } } return $numMenor; }
0
08cb515314669360eb1358812d2da7fd
c26af9b3dbafc4610e31c3b2f1167996
点击步进+
{ if (ch_comboBox.SelectedIndex < 0) { MessageBox.Show("请选择步进通道!", "错误提示", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (step_textBox.Text.Length == 0) { MessageBox.Show("请输入步进值!", "错误提示", Me...
1
543774cd41f044ca071234493fae256c
fba8b1a1c781d88561f317d2d8eea6ed
When the form is closed The data for the current session is serialised by these methods More detail below...
namespace Presentation public partial class MainWindow : Window private void Window_Closed(object sender, EventArgs e) { facade.SerializeCustomers(); }
1
e7aa31ec6b104739b7680ffe1a40b53e
ea83737692279b5f88b3905beeeb0de0
Adds the given image to given frame at position (x,y)
{ int currFrameX = currentFrame * frameWidth; int currFrameY = 0; Rectangle drawRect = Rectangle(currFrameX, currFrameY, frameWidth, frameHeight); canvas->DrawImage(spriteSheet,xPos,yPos,drawRect,GraphicsUnit::Pixel); }
1
746dc42f82a7099f729cbbfa4e4e05d5
48de6e976792c59ca61caab31a5752a3
将返回的searchResult转为SearchResponse
@Slf4j @Component public class EsRestUtil public static List<Map<String, Object>> setSearchResponse(SearchResponse searchResponse, String highlightField){ return EsTransportUtil.setSearchResponse(searchResponse, highlightField); }
0
7ebdee18ea0b57c35027ec960a5a46ce
65512280dccf5b4494f782b52b35cb73
Функция принимает целочисленный параметр, обозначающий номер удаляемого элемента
function deleteElem(arg) { var i = Number(arg.id.substring(4)); console.log(arg.id); list1.splice(i,1); redrawList(list1); }
0
31fc1dc54cda911910a40e3302fec478
1cff363c7b11c599b4c0f9cab0043028
Makes sure the snapshot is scheduled.
DatasetInstance::fetch($datasetInstanceId); $profile = DatasetInstanceSnapshotProfile::fetch($snapshotProfileId); $task = $profile->getScheduledTask(); $task->setNextStartTime(new \DateTime()); $task->setStatus(ScheduledTask::STATUS_PENDING); $preDisabled = ScheduledTaskI...
1
bdf47bf6601cd35b37350b25010608ea
b0ee2228779377adc83ca7a2555db2d9
Set the internal ray set flag
public class VoxelsGrid public void setRayID() { useRayID = true; }
1
a863f77b87ff9518157a2da869e07b55
1f73c1718a34ac3bca91c98adcb6e88f
功能:检验指定文本框输入是否在指定数值范围内;
function checkInt(obj, intLow, intUpper){ var sValue=obj.value; if (sValue=="") return true; if(!isNumber(sValue) || !intRange(sValue,intLow,intUpper)){ obj.value=""; return false; }else{ this.document.all(obj.id).value=obj.value; return true; } }
1
69f725745ccfe216b0d9eeadf1e4a7e9
d55899ee5ddccf4a8beb5624aef14609
Retrieves and returns PCIe Clocks Policy. After 1st call the result is cached to speed up following requests.
class Service def memory_clock clock_from_pp_file "#{base_card_dir}/pp_dpm_mclk" end
0
1b5e11b5d8c97e39b372fd9931854064
ff341e1e3869597c50ec6cb80b27d713
未登陆的用户无法提交订单,所以不需要此方法的实现 此处直接抛出异常,编程时如果抛出了该异常,说明你的业务逻辑可能有误——因为原则上是不会调用到本方法的。
@Slf4j @RestController @RequestMapping("/orders") public class OrderController @PostMapping("/createOrder") public OrderInfo createOrder(@RequestBody OrderInfo info) { try (Entry entry= SphU.entry("createOrder")){ return info; } catch (BlockException e) { log.info("block"); ...
0
c91b6ee044a4695e626fd5a35ffe873c
660fe67977d79f81a0c41a3f8a6c8c80
Convenience function that fetches the files and updates the scope.
var fullPaths = []; return Async.doInParallel(entries, function (entry) { var addedFiles = [], addedFilePaths = [], deferred = new $.Deferred(); var visitor = function (child) { if (ProjectManager.shouldS...
1
e1c979ef7a833251fb359ec7d78573cd
2619c8498ae2814c0f18df72d0963137
A "private" method for defining the menubar in the GUI.
self._menubar = tk.Menu(self._master) self._filemenu = tk.Menu(self._menubar, tearoff=0) self._filemenu.add_command(label="Open", command="") self._filemenu.add_command(label="Save", command="") self._filemenu.add_separator() self._filemenu.add_command(label="Exit", comma...
1
c7306ca3d03d9475bc5aeadb4eb3ab7d
c1a589fa961b9cc115807daecf8908e9
Valida si las pregunta de seguridad es correcta
class ForgotPasswordController def security_ok? matching_password? && @user.correct_answer?(params[:user][:security_answer]) end
1
aacdc1716e5d4113acb4f8a4833e2d96
6958650264cffb69782ab248931e8684
利用马青公式计算n位的pi
func pi(n int) float64 { f := 0.0 for k := 0; k <= n; k++ { f += term(float64(k)) } return f }
0
9642c54b937fe9f4b79882e118de7d08
65595b3c026055b6e84503c2c5c2ad38
跳转到批量创建学生页面
@Controller @RequestMapping("/cmStudent") public class CmStudentController extends BaseController @RequestMapping("/cmStudent_batchUpload") public String cmStudentBatchUpload() { return PREFIX + "cmStudent_batchUpload.html"; }
1
71fecf66d9f06db58df81530c9c1292b
3c15fb9c250509815b2b177fce88ac8d
: Get Truck Master By Truck Number
GetTruckDto getDetailByTruckNumber(@Param("truckNumber") String truckNumber);
1
957b79052c0204d9d33507fa3db99a87
1702fcffbf35f0b0e0ef7a3366bfc961
定义函数,返回整数的某2位的值
def div2(a): return a // 2
0
2f04e68b8a595c4cb9bf7d16bc7240c5
0aba08ae342954a23acece3de109373b
Zwraca adres drugiego konca polaczenia
public function getEndAddress();
1
d79fd12baec5709d3fef6a8d4566c072
3f85ddaa45b43547f04224d3d611930a
thay đổi thời lượng vào học phí trên form theo chuyên đề đc chọn ở combobox
{ int select; select = comboBox1.SelectedIndex; if (select == 0) { tc.setPer1(0); } else if (select == 1) { tc.setPer1(0.06); } else if (select == 2) { ...
1
c668fa012cddb073ad667bf01bc3c882
8be3aec9631e55bd98eaad99047e71f7
Display a dialog box to select the encrypted file.
namespace Enc_Dec public partial class MainWindow : Window private void selectFileToDec_Click(object sender, RoutedEventArgs e) { OpenFileDialog fileBrowser = new OpenFileDialog(); if (fileBrowser.ShowDialog() == true) { filename = fileBrowser.FileName; ...
1
c420a283cbc3dbc11a87405ce81bb254
50a79d1945614b7001b701adc6a42234
Plot filled contours overlayed with contours and vectors Input
ax = fig.add_subplot(s1,s2,s3) if title != "None": plt.title(title) if isLim: plt.xlim(lim[0],lim[1]) plt.ylim(lim[2], lim[3]) X,Y = np.meshgrid(x,y) plt.contourf(X,Y,z,num,alpha=0.75,cmap=cmap) C = plt.contour(X,Y,z,num,color='k',linewidth=0.5) plt.clabel(C,inline=Tr...
0
4907fcc30d31135a0bac7c7ac84fef12
fcd159ae09f97bfe1fa963cabb53f12f
This tests that if a ship is hit but not sunk, it reports that correctly.
namespace Flare.Battleship.Test.GameComponents [TestClass] public class ShipTests [TestMethod] public void Test_Battleship_IsSunkFalseWhenPartiallyDestroyed() { var ship = new Ship(2); ship.SetOnSunkListener(() => { }); ship.Cells.First().Attack(); ...
1
8ba95dfbaa43121e06400728c62ea75b
308dfecdb57d4cdafd0fab4feb6a4bad
Возвращает значение домена или красивое (синхронизированное) значение, если это спец. домен
function getObjDir($id_obj=""){ global $con_data,$con_user,$obj,$site_name; if(!empty($id_obj)){ $obj = $id_obj; } $q = mysqli_query($con_data,"SELECT id_site,subdomain,sub_convert_name,main,type FROM p_object WHERE id = $obj"); $res = mysqli_fetch_assoc($q); if($res['type']==1){ if($res['main']==1){ retur...
1
85b11230017895bbc7c356ac4052c274
2c6e760402008edff196d57d23681f93
Bind the instruction pointer to the given register number.
def seti(registers, opcodes): return opcodes[1]
0
aeb506c69493f9761b014f2d9b74395c
05991ec341389a5bc3541c08998f9d07
Sets correct page header background.
if page_part in [1, 2, 11, 'single']: return 'green' elif page_part in [3, 4, 12]: return 'blue' elif page_part in [10]: return 'darkblue' elif page_part in [5, 6]: return 'pink' elif page_part in [7]: return 'purple' elif page_part in [8, 9]: retu...
1
2a76dc12fef5b5a252b23e5425816855
4f413e4118b3dfb24556fddda81b869f
description: Stop torrent download
dirty = self._dirty_fields() args = {} for key in dirty: args[key] = self._fields[key].value self._fields[key] = self._fields[key]._replace(dirty=False) if len(args) > 0: self._client.change_torrent(self.id, **args)
0
0dee8396eefc2468ea9b5f27542b20c1
5f5f4af28e16ed8fbe89005996a78a7c
Gets P&L as a cumulative time series of portfolio Returns
class PortfolioReport(object): def _get_profit_and_loss(self): profit_and_loss = self._get_dollar_values().sum(1) dates = sorted(self._config['dates']) first_date = np.argmax( profit_and_loss.index >= pd.to_datetime(str(dates[0]))) profit_and_loss.ix[first_date:] -= profit_an...
1
1cc53d1e7f4dad68a74438e4eb8a45bf
7e12ae3141eeb39e22d34ecdf0c21ffe
Waits for a poison pill.
lock.lock(); try { while (!waxOn){ c.await(); } }finally { lock.unlock(); } }
0
2e2a599bf1ef1d80ab93f2c8840e4353
f176fd27d91c14e4daa6cb924a2c582c
Get 短信内容 注意:此字段可能返回 null,表示取不到有效值。 注意:此字段可能返回 null,表示取不到有效值。
@Alias("mesgRecord") @Table(name = "tp_mesg_record") public class MesgRecord implements Serializable public String getSmscontent() { return smscontent; }
1
a420876ad21ac36d18adda76fa980761
f77664f718b179c70c679cd566fac0a0
用例-2016 : 列表页-限时条目已存在5条,点击“新增”,有错误提示 限时列表中存在5条限时条目 限时列表中已存在5条,列表页点击“新增”按钮,看是否提示:已经达到上限。《trans0060》 : 是
page = CreateCompPage( self.driver ) publicPage = PublicPage( self.driver ) readExcel = ReadExcel( self.create_comp_data_dir ) excel_date = readExcel.get_value_by_row( '创建帐套测试数据' , 5 ) for comp_data in excel_date: page.set_comp_base_info( comp_data ) page....
0
9557c7e7e2054e30fbf8af9f75b6d321
ba9ac7c4eb64900bf8d15aef1d93e497
根据当前字段填写的内容,设置当前行的行高。
if (columnDefine.length == null || columnDefine.length == 0) return ; var row = posi[0]; var column = posi[1]; var trObj = null; var ableCharNum = 0; var charLength = cellVal.length; var heightNum = 0; var firstTD = "" ,tdInnerHTML = ""; var tdContent = null; for (var i = 0 ,n = columnDefine.length ;i < n ...
1