query_id
string
corpus_id
string
query
string
code
string
label
int64
731563d251ef1b97c04a1f2b62745d83
652fc9887408d0b2113b01fee4f769be
Use this method to pin a message in a supergroup. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights. Returns True on success. Telegram documentation: https://core.telegram.org/bots/api#pinchatmessage
this Client client, long chatId = default, long messageId = default, bool disableNotification = default, bool onlyForSelf = default) { return client.ExecuteAsync(new PinChatMessage { ChatId = chatId, MessageId = messageId, DisableNotification = disableNotifica...
1
9f157eed101937a6d9863abee1d5f6f2
7c24521f94961b6403370d479981e35d
Searches for hotel in a given city. .. code-block:: python amadeus.reference_data.locations.hotels.by_city.get( cityCode='PAR')
class ETGHotelsClient(ETGClient): def search_by_region(self, region_id, checkin, checkout, guests, **kwargs): return self.search(region_id, checkin, checkout, guests, **kwargs)
0
32938d42c90acdc0d3f30ecdd7f934d2
4334fe61a572a43cc404365acb23085d
Добавляет одно блюдо в заказ.
class Cook public function addDishToOrder(Dish $dish) { $this->order[] = $dish; }
1
bdc8ea7683bac2f0b4c5dca74725661d
2ad964d445e1f49db0ebfb34cf221795
Selects a date and closes the modal.
class SelectBox extends React.Component handleChange(date) { this.setState({ open: false }); this.props.onChange(date) }
1
160c8c626b7c0855403c736e7ba89efd
1ccffb1255aadb86a0c812f8584470c9
执行父类的beforeAction
class BaseController extends \CController public function beforeAction($action) { if (!parent::beforeAction($action)) { return false; } $this->page = new Page($this); return true; }
1
be2b96ca0b002b70054fcc6231fc6c81
b7af579e5aeb24b26c9c7747482ba8eb
Tests the lookup of tokens of different case.
g = GRAMMAR(self.grammar, 'a') p = g.parser() o = p.parse_text('Abcade') self.assertEqual(o.tokens(), ['Abc', 'a']) g = GRAMMAR(self.grammar, 'A') p = g.parser() o = p.parse_text('Abcade') self.assertEqual(o.tokens(), ['', 'A'])
1
d19b6123de1cdaf1e292f3c336c73990
073ad32707c1b612f17845cd7ec7ed03
Unsave a link or comment asynchronously. This removes the thing from the user's saved listings as well. See also: /api/save.
try { return this.client.rpcStyle(this.client.getHost().getApi(), "2/files/save_url", arg, false, SaveUrlArg.Serializer.INSTANCE, ...
0
48189a44a7e75536cf0c7331230f91c7
84d05f5174e7e457c1326b4545f0d987
Dump/Restore decrypted savedata
if self.data['encrypted']: KEY = encrypt.gen_key_from_pass(self.__password) length = len(self.data['usernames']) usernames = [ encrypt.decrypt_data( KEY, self.data['usernames'][pos] ).decode('utf-8') for pos in range(length) ] passwords = [ enc...
1
7b0b59c4c3ae74d6c4d2a64d91d03c5b
7363c80baf8bdbe942eadf533c806224
statements_m : empty
def p_stmts_empty(p): p[0] = [ ]
1
7540d29e29ddc54655aefe84c80916c8
3e2117be43e2538870051cafa8b566aa
统计合格归档文件页数
Integer countArchiveFilePagerByCondition(QueryArchiveFileCondition queryArchiveFileCondition);
1
91cdc4004e94da82b331230814f59863
bd7d503e11a1e389b47e2ea0d572cb82
○ 背景の作成:中央寄せ
void GameSceneTitle::initBackground() { Size winSize = Director::getInstance()->getVisibleSize(); Point origin = Director::getInstance()->getVisibleOrigin(); Sprite *spBG = Sprite::create("background_t_1.png"); spBG->setPosition(Point(origin.x + winSize.width/2,origin.y + winSize.height/2)); spBG->s...
1
d16e6955b64c2097a573efdc2c298c3f
2c18625ae44f3ce763ed84a7c9b31ed9
Checks for a file accompanying the view telling us what view model to use.
orig_path = super unless File.file?(orig_path) self.opts[:additional_view_directories].each do |view_dir| path = super(opts.merge(:views=>view_dir)) return path if File.file?(path) end end orig_path end
0
555588020b2caf1f0fb9543d4e590f92
78bc3ca6b2bc53cbd69fb15b69675495
Add a muscle and its parameters so that it can be included in the metabolic analysis
class MusculoSkeletalSystem(object): def create_muscles(self): for muscle in self.muscle_parameters: self.sim_muscle_names.append(muscle) param = self.generate_muscle_parameters(muscle) self.sim_muscles[muscle] = biomuscle.Muscle(param) print(('Created muscle : ' ...
1
cd4aeec6e1a7432c002d9f9763868901
e7d145aaefd4886a248023f4f779ac7a
Converts the parsed segment to arrays
idxs.map do |it| if(is_number?(@profile[it])) idx = @profile[it].to_i @encodedSegments[idx] else @profile[it] end end end
0
f2ef3276fdead629165fd48f9d812373
4d0bb45f8695bc77fb5ef3ffab51ad2c
Выравнивание во вкладках
namespace PremiereCare_Application public partial class RequestLabTest : Form private void AlignItems() { buttonAdd.Location = new Point((this.ClientSize.Width - buttonAdd.Width) / 2, this.ClientSize.Height - 50); labelMain.Location = new Point((this.ClientSize.Width - labelMain.Widt...
0
4d23b4e1072380b7b52d6fb27fac2152
78d21593791fcff911f6aa9be804979d
Sends a test notification to an existing destination.
function sendTestNotification(appriseUrl: string) { return backend.sendTestNotification(appriseUrl); }
1
e6781a8d055872487f2b85d867797e86
3fc4806a9150a2bef0d68a5acaddc664
Sets the color matrix with the ColorMatrixFlag.Default.
namespace GreenshotPlugin.Core public static class ImageHelper public static void ApplyColorMatrix(Bitmap source, ColorMatrix colorMatrix) { ApplyColorMatrix(source, Rectangle.Empty, source, Rectangle.Empty, colorMatrix); }
0
d03b0353b31cf5cc6ad68404e54af4aa
af111d990167d7b3da72133b31af4c4f
是否在导航历史中,存在这个页面
if (mHistoryList == null || mHistoryList.size() == 0) { return false; } for (int i = 0; i < mHistoryList.size(); i++) { if (mHistoryList.get(i).getAddress().equals(content)) { position = i; return true; } } retur...
1
abe1ef5f7d698ecd6cd65ae635151335
33401e4808af8fdaa805bd3a9c2b5f01
\brief this is called when all temperatures are read and all telemetry strings have at least been scheduled for transmit. Since there is nothing else to do then this function simply does nothing.
void DoOne() { TelemetrySetUSBPollInterval(0); TelemetryAddInt16(42); TelemetrySend(); TelemetryDone(); }
0
3018c5e176e5d436e487ac1d3491f81a
3ec8971f75d47c23717ae80d6ceddfce
Assign respective lookup data list to respective fields
export class AppDatabaseLookupComponent ngOnInit() { this.setLookupProperties(); if (this.ngModel == undefined) { this.ngModel = ""; } }
0
01598e9251aecfe075da31bbfaf2a801
d1467bc1e72c10e81823115cc51d7a88
If enabled, add cookies for JSON requests.
class Request public function enableCookies() { $this->cookiesEnabled = TRUE; }
0
32afbe83acddf9bf1f5a92297432f6de
60aaf78d87b74a22fd7fbf1ead4458f5
<para/> 1. normal(법선), tangent(접선) 벡터를 정규화 <para/> 2. tangent 벡터가 normal 벡터에 직교하도록 변경 <para/> . <para/> * 법선 벡터 : 기준 벡터 <para/> * 접선 벡터 : 법선에 직교하는 벡터
namespace GPL.KC public class KinematicMovement : MonoBehaviour public Vector3 GetTangent(Vector3 direction, Vector3 normal, Vector3 up) { var right = Vector3.Cross(direction, up); Debug.DrawRay(transform.position, right * 100f, Color.yellow); Debug.DrawRay(transform.posi...
1
5a139b3cebc1ac42878379a207148503
e8c315adc40a021d5412da07458ac2b5
Imprime un reporte orden de Servicio
$this->SetFont('Arial','',9); $_db = new MySQL(); $_db->connect(); $_sql = "SELECT OrdId, OrdTurno, DATE_FORMAT(OrdFecha, '%d-%m-%Y') AS OrdFecha, CONCAT(PacNombre,' ',PacApellido) AS Paciente, PacIdentificacion, CONCAT(MedNombre,' ',MedApellido) AS Medico, EmpId, EmpDescripcion,...
1
175bfefdeaad12f1edabc65fb39a4772
845507470ee69d0cae201cb02c976873
Take a SparseTensor and create a LeafNodeTensor, no checks.
@functools.wraps(fun) def _wrapped(*args): args_flat, in_tree = tree_flatten(args, is_leaf=_is_sparse_obj) wrapped_fun, out_tree = flatten_fun_nokwargs(lu.wrap_init(fun), in_tree) out = sparsify_fun(wrapped_fun, args_flat) return tree_unflatten(out_tree(), out) return _wrapped
0
5b3e8101be1004c1c9cf4397caa464f4
e22824607ee2529d93ee343d2cc6d8d9
Creates rectangular (including square) antidots
class Simple(pygame.sprite.Sprite): def _dotted_rect(self, col=(255,255,255)): self.image.lock() for i in range(0, self.rect.w, 3): self.image.set_at((i, 0), col) self.image.set_at((i, self.rect.h-1), col) for i in range(0, self.rect.h, 2): self.image.set_at((...
0
71e4b82895e7e0a513513b2b2877b321
56828936a9674d173dada12465a87ec9
MP4文件转MP3音频
command = "ffmpeg -i "+file_name+".mp4 -vn -ar 44100 -ac 2 -ab 192 -f mp3 "+ file_name+".mp3" os.system(command) return
1
27c5fbd5db14bed58de1cf811132ed3c
fd36c459319c68b5ad16cfc00270caa5
Apply force to penguin.
for (int i=0; i<3; i++) { p->forceDet[i] += strength*f[i]; } return 0; }
1
c506f627f2452d17df7e2ea594259b73
0f24f6439a0a60e5ecf2c8a548d1d1bd
搜索外卖单
class CrestaurantAction extends BackAction{ function orderSearch111(){ $product_cart_model=M('product_cart'); $schkey=$_POST; if(empty($_POST)){ $p=0; } else{ $p=1; } $key=$_POST['searchkey']; $where['dining']=1; $where['token']=TOKEN; $where['orderid']=$key; $cnt=$product_cart_model->where(...
1
bae2855847f0fd23e49e89fbaefd3734
e926c3a3d197eef9d7b0d5efe069ef11
Set dockerfile images in the workflow.
class BuildResponse(dict): def images(self) -> Sequence[str]: return pulumi.get(self, "images")
0
3d32b9e297d70c7a1f1b5cc7f36dfb4d
8cc195ac0ff47732b5282d5425772e00
Convert an OpenLayers text style to Cesium.
@JsType(isNative = true, namespace = "olcs", name = "FeatureConverter") public class FeatureConverter @JsMethod public native LabelCollection olGeometry4326TextPartToCesium(Layer layer, Feature feature, Geometry geometry, Text style);
1
6e43d0204a386d21a9cb279ee3bd8838
476697b11037deb8635fc6bc820a9a1e
A function to display any error messages that openSSL might give :) Useful for troubleshooting.
{ char buf[256]; std::string strDestination = confinfo->stunnel->GetAddressAndPort(); X509_NAME_get_text_by_NID(X509_get_subject_name(confinfo->err_cert), NID_commonName, buf, sizeof(buf)); std::string strCommonName = buf; X509_NAME_oneline(X509_get_subject_name(confinfo->err_cert), buf, sizeof(buf)...
1
3ce69699b6254363e164985a3c96847c
5b0fe0ee87f4a8b8531666342d1dade1
Sets the brake value for each motor controller. 0 = EEPROM setting 1 = Coast 2 = Brake
motor[M_Drive] = value; motor[M_Crane] = value; motor[M_Steer] = value; }
0
b372f11005a22953c1c84e9f756f8aa6
0d3297a7a78fcc845dc4a7043510e74f
Updates attached files for a specific presentation and optionally deletes a pre-existing document
return new Promise((resolve, reject) => { service.setIsSession(this.is_SessionMeeting()); let ensureFolderCreation = Promise.resolve({}); if (!McsUtil.isDefined(this._documentFolderStructure) || this._documentList.length === 0) { const startdate = new Date(thi...
0
146724f38adc56efecd715d8d56d45e1
2b1553c0509ca2f556e2ef74c7c476d3
Initialize default alingnment based on current number of columns
namespace AutotaskCorporation.Autotask.Web.Mvc.GridFramework.Mediators.Basic public class CompositeColumnMediator<TDisplayRowModel> : IExportCapableDataColumnMediator<TDisplayRowModel>, IPersistenceDataColumnMediator where TDisplayRowModel : class public CellAlignmentPreference DetermineCellAlignmentPreference(Frame...
0
b33ee985b28777658396e5c05b1698db
74a400be62e811438dfc4bb494a08818
就诊历史列表
{ $user_id = $_SERVER['HTTP_USER_ID']; if(!$user_id){ return failLogin("您还未登录"); } $model = new visitModel(); $where['me_visit.status']= input('status'); $where['user_code'] = $_SERVER['HTTP_CODE']; $result = $this->validate( [ ...
1
806ef0a1546f4220cce3850f20651782
a019e4ed54239c0c4e5748e0e14b751e
A test to check whether the method returns the correct number of schools in the database
class TestDataApi(unittest.TestCase): def test_get_school(self): pass
0
c92d85663e399f08299c13fae3821e1e
47e7efc0d7adc2d7085b5d6ee7769b2a
static executeExample() - This method executes without an instance. Displays effects of using static variables.
System.out.println("instanceVar = "+ instanceVar); System.out.println("staticVar = "+ staticVar); staticMethod(); }
1
37d0fc07b2df0f4744db2e6addab60bc
b4a7796375f14324b79427722332e19d
La fonction retourne 1 si s1 et s2 sont adjacents, 0 sinon
int adjacent(Sommet *s1, Sommet *s2){ if(s1==s2) return 0; Cellule_som *l1=s1->sommet_adj; while(l1){ if(l1->sommet==s2) return 1; else l1=l1->suiv; } return 0; }
1
e00a933c2eb8286824cd577cd6bea090
53244df541c8d7839743d8ccc11ea412
Empty out the current Redis database to reset the pipeline.
global redis_ctx redis_ctx = redis.StrictRedis() log_msg('debug', 'init_data_gateway, flushing in-memory store') redis_ctx.flushdb()
1
2a66efa3eb4fe8b0628da0a7456af768
67149b02785c55e7f1d7564499caff84
收集原始Observable发射的所有数据到一个列表,然后返回这个列表
public class MergeOperatorActivity extends AppCompatActivity private void collect() { Single<List<Integer>> s = Flowable.just(1, 2, 3, 4).collect(() -> new ArrayList<>(), (list, integer) -> list.add(integer)); s.subscribe(new SingleObserver<List<Integer>>() { @Override ...
1
d80edc5ce3173af15c7ca199ac4bba2d
6527b60cc0e6ef6b8a750de83108aa6f
get a sorted list of unique token Ids in scws dataset
tmp = list1 for token0 in list0: if token0[0] not in tmp: tmp.append(token0[0]) if token0[1] not in tmp: tmp.append(token0[1]) return(tmp)
0
6691f18c38c6d3070b3188474af853d5
30306cb88c25022f3d637afbb43f02a2
into clipboard then prints the contents of the clipboard.
def clipboard_copy(): pass
0
4b5753569e17f51ece6b4171ff460973
d6e176b3008c709e4b6c1d53af4e76f2
Get the number of profiles. Returns
def count_profiles(profiles): if isinstance(profiles, pyspark.RDD): return profiles.count() else: return len(profiles)
1
2bb2cce236b0e1f4ffacfd5d18b1d48d
bf6b392a8f6b656a9ddd2ed2b40babb7
Compare two query strings by stripping away whitespace.
def is_equal(query_name_1, query_name_2): q1 = query_name_1 q2 = query_name_2 if q1[-1] in ['a', 'b']: q1 = q1[:-1] if q2[-1] in ['a', 'b']: q2 = q2[:-1] return q1 == q2
0
0449c9874fadefe692581059fe86a6b0
c6a3c18ebbf8ed9b87a70acf78f1f38a
# Checks for positive definiteness
ifelse( all(Re(eigen(matrix,only.values=T)$values)<0), stable <- TRUE, stable <- FALSE ) return(stable) }
0
76249db94d523d215b7b884a5ec759d7
2e1d82e096239ee300b92e170373bfd1
Removes the control at the described <paramref name="index" /> from this ui manager.
{ if (controlId == null) { throw new ArgumentNullException("controlId"); } for(int i = 0; i < List.Count; ++i) { if (this[i].ControlID == controlId) { RemoveAt(i); return true; } } return false; }
0
de5ccb2d3047847bb473c4376cbbb5a8
a9bdd7ecb5b0d17f4144870bb408444f
Adds the giving default database to the options.
parser.addoption( "--db_types", action="store", default="sqlite", help="List of comma separated database types: all, sqlite, or mssql" )
1
73f57177f848a61b4e44856d845d600b
624f7fbb68d2cdf59789a145a7a2a223
Create an instance of {@link TCallActivity }
@XmlRegistry public class ObjectFactory public WebReadCallList createWebReadCallList() { return new WebReadCallListImpl(); }
0
ef583772ec8770d4d53da65070b10d4f
3530485c6bb1a1e3cc59759092de5a68
gets all products from the database and sorts them by price in ascending order from lower to bigger
function loadproductsByOrder () { sortedProducts=[]; sortedProducts=allproducts.slice(0).sort((a, b) => a.price - b.price); renderproductsFromArray(sortedProducts); }
1
90499da942069688706c6276038c6ace
1ad7e9946a6ed0796209aa00b67eb037
Called when the current List is updated. If a `null` List is passed to [.submitList], or no List has been submitted, the current List is represented as an empty List. [.submitList].
public abstract class SubmissionManagerBase public abstract void updateList(onSuccess onSuccess, ClientRequestAsync.OnFailure onFailure);
0
db336e703ac40262dd70f12628969305
72557769891eca8e012da3eda339c690
当所有连接都完成,发送完成信号
class MultithreadQueue void finish() { _isFinished = true; pthread_cond_broadcast( &_cond ); pthread_cond_broadcast( &_cond_overflow ); }
1
18eeec87e6985bec5b84cc8d66534f87
ed38fd7809629aa716a31bda3f08a8db
Metoda zajistí provedení komprimace dodaných XML dat podle nastavení v parametru.
switch( $method ){ case self::METHOD_NONE: return $xml; case self::METHOD_BZIP: return bzcompress( $xml, 9 ); case self::METHOD_GZIP: return gzencode( $xml, 9 ); default: t...
1
911004a86fffc49521e130df901aed1a
6a79a0ab3e370a1dbc08ee22515eeac3
Zwraca listę wszystkich zawodników Kilo Wiejskiej
public class Druzyna implements Serializable public LinkedList<Zawodnik> getZawodnicy(){ return zawodnicy; }
0
9500396de5f8011936eb5080e59d74d5
cd7ede13206f66743977d3ca37f437b0
Return another Maze instance with a move made.
current_2d_pos = np.array(self._1d_to_2d_idx(start_position)).squeeze() new_pos = [current_2d_pos[0] + move[0], current_2d_pos[1] + move[1]] if self.walls is True: new_pos = np.clip(new_pos, [0, 0], self.size-1) else: if new_pos[0] >= self.size[0]: ...
0
55114d7e793118df16499c36d4a79e5d
eab093fb871b67dfd2ddaad424353e44
지정 Slave의 이동단위를 확인합니다. DLL에 적용되어있는 값이 확인됩니다.
{ uint32_t ret = 0; if (obj == NULL) { ret = CDN_EINVAL; } else { if (obj->slaveMode > (1U)) { ret = CDN_EINVAL; } } return ret; }
0
2c53aa282391460c51ee49f43cbcb750
8349bf9e0270b493d9ec7edbda1493da
Set up the tab bar
ActionBar actionBar = getSupportActionBar(); actionBar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS); actionBar.setDisplayShowTitleEnabled(false); ActionBar.Tab tab = actionBar.newTab() .setText("Build") .setTabListener(new TabListener( ...
1
33f164732dc5d89c68c97d9f0f075237
991e9f2860f2815ae0eebc08009f8047
选择反射脉冲(前一个)
_pin_output(); _pin(0); prec_wait_us(H); _pin_input(); prec_wait_us(I); unsigned result = _pin_read(); prec_wait_us(J); return result; }
0
43f08851e3a7c1a1add819767083520e
270a45ed8fa6add69c44f5fdca0c465a
Downloads a pdf with the ballot papet page definitions.
namespace TripletexAPILibrary.Api public partial class LedgervoucherApi : ILedgervoucherApi public byte[] DownloadPdf (int? voucherId) { ApiResponse<byte[]> localVarResponse = DownloadPdfWithHttpInfo(voucherId); return localVarResponse.Data; }
0
8f298f918cc9262f5a2604ec9421dd82
e611e733518131eb06c5d18bf901c187
perform all ship commands for an interval of time
ship_launcher(void *arg) { int i; int st; pthread_mutex_lock(&mx_r); ready += 1; pthread_mutex_unlock(&mx_r); while(load == 1) pthread_yield(); sleep(1); while(1){ for (i=0; i < MAXSHIP; i++){ if (ship_flag[i] == 0){ ship_flag[i] = 1; if ( sem_post(&sm_ship[i])) { err(1, "Sem post failed"...
0
87d4764812d69012d9f244076701eb11
5bd98235f5cda52715b5e5c0f6b1be68
Passed two nodes and determines if their character positions overlap
let minx1 = node1.rect[0].x let minx2 = node2.rect[0].x let maxx1 = node1.rect[1].x let maxx2 = node2.rect[1].x let miny1 = node1.rect[0].y let miny2 = node2.rect[0].y let maxy1 = node1.rect[1].y let maxy2 = node2.rect[1].y let xCollision = false; if ((minx2 >= minx1 && minx2 <= ...
1
c5cb21033b89577abbc396c3f8cd7117
af08fef5f5237916c8ca77f5bdcfac5c
Enter a parse tree produced by {@link BSVParser#memberbind}. @param ctx the parse tree
public class MxstarBaseListener implements MxstarListener @Override public void enterMemberExpr(MxstarParser.MemberExprContext ctx) { }
0
7ae763ca61259ff41c13c278da361724
d8bda71f88e3c732feec055a8ee3c682
Returns type of the local axis.
@Generated("org.rcsb.cif.schema.generator.SchemaGenerator") public class IhmGeometricObjectAxis extends DelegatingCategory public StrColumn getAxisType() { return delegate.getColumn("axis_type", DelegatingStrColumn::new); }
1
334ad0bf05f950497631107b12e2065f
bbed0bf3ea84a4f365e64725a3d7042e
Get favorites count by photo_id.
class LikeCount extends CCache public static function groupPhotoCount($photoId) { $category = 'group_photo'; $likeCount = self::instance(); $redis = $likeCount->getDatabase(); $key = $likeCount->key($category, $photoId); return $redis->get($key); }
1
1528f0c750411b2f2feb22081a9c6aca
5330545779ef0e85cfbf3e91cd88c948
Event firing method for the <see cref="DateChanged"/> event.
{ try { this.TimerImage_Click(this.EnteredDateTextBox, this.EnteredDateTimePicker); } catch (Exception ex) { ExceptionManager.ManageException(ex, ExceptionManager.ActionType.CloseCurrentForm, this.ParentForm); ...
0
beb38a5c8a77cfffc8287e9145493041
fb20be712e54a20394ea3ae296f927b3
Retourne la liste de rectangle à afficher
public class Detector public ArrayList<Rectangle> getRectangleUnitedList() { return rectanglesUnitedList; }
1
738104e03881ae7380369c22f0b434a9
f8ee58c3b71259763e61779cbcd80a5b
Set up our custom caption and window size
void ofApp::setup() { ofSetWindowTitle("Grid Cakes"); ofSetWindowShape(400, 500); }
1
9a3236616d300a04e9200aa64bfdbb0d
bbb7e18c1c4e8eb3eaa333fa7ba0b24d
保存文件信息表单(新增、修改)
namespace LeaRun.Application.Service.PublicInfoManage public class FileInfoService : RepositoryFactory<FileInfoEntity>, IFileInfoService public void SaveForm(string keyValue, FileInfoEntity fileInfoEntity) { if (!string.IsNullOrEmpty(keyValue)) { fileInfoEntity.Modify...
1
0c363b34afd07e6cdcd27345eccb061d
61d9b784ab13c5ab4e3aaf8409c596b7
LaTeX的な数式を普通の数式に変換
function getMathjaxExpr(expr) { return expr.replace(/\\var{(.?)}/mg, '$1').replace(/\\remain/mg, ' ......'); }
1
4ee48b340f3b56182276a12b33ad6280
dccd1786b8532265e11eb8f1d2c237ea
Replaces each element of the DistributedLongStream with values from the specified mapping function. An intermediate operation.
public LongStream map(LongUnaryOperator mapper) { return internalWrap(pipeline.append(MapLongToLongAction.create(pipeline, mapper)), parallel); }
1
5c5b6f772b5a158b674f8a6e5039b8c5
7405edf081340c9e6e8c63ac23819d06
Ensure that user can edit moneybox information
{ $money = $connect->prepare("SELECT * FROM moneybox_info WHERE moneybox_id =:moneybox_id"); $money->bindValue('moneybox_id', $user['moneybox_id']); $money->execute(); $money = $money->fetchAll(); if ($money){ http_response_code(200); $res = [ "status" => true, ...
0
623a97c4e40384e351b63b202f2202c1
958d8c77853c1cd9b48f2e257187a731
设置软件运行的次数,调用一次,自动加一
public class Service implements Serializable, Cloneable public void setRunningCount(Integer runningCount) { this.runningCount = runningCount; }
0
cfca5ddbdf10a340dc052015cb780ede
0b815946b83ee65f8ba41b68b1999b6c
对文本按照指定分句符进行分句
{ if (string.IsNullOrEmpty(text)) { return new List<string>(); } string[] sentences = StrUtility.SplitSentences(text, _filterList, false); List<string> resultList = new List<string>(); foreach (string sentence in sentences) ...
1
068486b1b0cb749873e8a2aa20ab979a
9a8e84a9bf797977c04a95fedadf4c23
sprawdza czy punkt z leży na lewo od odcinka [x,y]
public class Point public boolean isLeft(Point other) { return other.getX() > getX(); }
0
c33f99e05f2894d20a67cfdf5b06611e
e77f661bc9ba3b87373966edd2ced9fd
Allow enter press to trigger signup
public class MainActivity extends AppCompatActivity{ @Override protected void onCreate(Bundle savedInstanceState) @Override public boolean onKey(View v, int keyCode, KeyEvent event) { if(keyCode==KeyEvent.KEYCODE_ENTER && event.getAction() == KeyEvent.ACTION_DOWN) { ...
1
45c7293e045a925ed75ddc6d5265902f
53ec4d569003d5b7633979fae033a592
Allows us to drag any ui-bootstrap modal dialogs around
function dragAndDrop() { $elem.find(".modal-content").eq(0).draggable({ containment: "div.modal",handle: "div.header" }); }
1
17846a6b2840a8ba1830bcd804d922d7
aef535a00f00a62b4be6bfb0e4b0cfb1
Checks if there are any active NPCs of specified name
abstract class SR_City public function getNPC($name) { return isset($this->npcs[$name]) ? $this->npcs[$name] : false; }
1
dbffd0fcd1bc25eadcb59c475b5b08af
9132ca37f2f5f703062600b74d38c1f6
地名特徴量生成
class SkProc(JRASkProc): def _create_feature(self): self.base_df.loc[:, "継続騎乗"] = (self.base_df["騎手コード"] == self.base_df["騎手コード_1"]).astype(int) self.base_df.loc[:, "距離増減"] = self.base_df["距離"] - self.base_df["距離_1"] self.base_df.loc[:, "同根幹"] = (self.base_df["非根幹"] == self.base_df["非根幹_1"]).ast...
0
5c8871e159fa86339c4e5f469288f1d5
42cf30192861494c52616d7991350739
Calculate the maximum acceleration value on the three axis: x, y and z
public class VrController : MonoBehaviour private void CalculateAcceleration() { if(_surfingValue > 0) { _accelerationFactor = Mathf.Abs(_angularVelocity.y) * .25f; if (_accelerationFactor > MaxAcceleration) { _accelerationFactor = MaxAcceleration;...
0
79687e8fa12b63fa99f866a61386a1fc
0d394718e1f4746bd898e75f7c0370c0
Executes all the undo commands on the undo stack.
if(undoableCommands.Count > 0) { CommandSequence commandSequence = undoableCommands[undoableCommands.Count - 1]; restoreContext(commandSequence.ContextBefore); for(int i = commandSequence.Commands.Length - 1; i >= 0; --i) commandSequence.Commands[i].Undo(); undoableCommands.RemoveAt(undoableComm...
1
4c20dafbe8f3c14fd1a78e3aba6b8e8f
724b838aadaac6074f1fc7123c89a196
商品规格列表展示
class Goods extends AdminBase{ public function specList(){ $map=[]; if(input('type_id')!='')$map['type_id']=input('type_id'); $totalCount=Db::name('spec')->where($map)->count(); $pagecount=config('paginate.list_admin'); $data=Db::name('spec')->where($map)->order('type_id DESC')->paginate($pagecount,$tot...
1
fac29e90e0e0183f6c24a44a5950b509
e7f68881a838c0623c07b456dc33a747
OKR検索
class DepartmentController extends Controller public function listOKR(Request $request, Department $department) { $this->authorize('view', $department); $okrsWithPage = $department->getOkrsWithPage($request); $department['okrs'] = $okrsWithPage['okrs']; $data = [ 'user' =...
1
16d0388d4acc7e045a6f3f0018c96338
cc48ba34aed8a31de84cd90492a37006
Renvoie NULL si le joueur n'est pas connecté
{ if (ships.size() == 0) { return null; } return null; }
0
07d11624e9ec2974dd0caf65c431a52b
144d811b81cff85992eb6bb9e618db29
Store the file into Cloudinary.
{ $originalName = $request->original_name; $path = $request->path; $name = Arr::last(explode('/', $path)); return $this->saveFile( $request->user(), $originalName, $name, $path, 's3' ); }
0
7488712831827b9573348ec08ab72437
470e9db1b51b222e8d22878cac84f990
#' @return A list of rotation matrices, of length numSteps + 1. The first one is r and the last one is q.
numhyp <- length(parse_hyp$hyp_mat) RrE <- lapply(1:numhyp,function(h){ qE <- parse_hyp$n_constraints[h*2-1] if(qE==1){ RrE_h <- t(as.matrix(parse_hyp$hyp_mat[[h]][1:qE,])) }else if(qE>1){ RrE_h <- parse_hyp$hyp_mat[[h]][1:qE,] }else {RrE_h=NULL} RrE_h }) RrO <- lapply(1:numhyp,f...
0
58ab91a751fad6c3ec9a1a7fce708f11
222d6264f027694b151d0264700c1c85
產生新生校車用繳費單
if (this.checkValidatorCode(validatorCode)) { String yuyueGuid = DataUtils.getUUID(); this.wxYuyue.setYuyueGuid(yuyueGuid); this.wxYuyue.setYuyueType("3"); this.wxYuyue.setDealerGuid(dealerCode); this.wxYuyue.setYuyueField1(carNumberPfx); this.wxYuyue.setYuyueField2(carNumber); this.wxYuyue.setCr...
0
f05bf5cef2fe7e686a5475c09b117ebc
44930938452b2ecbe8ad74479fc6c9d1
Emits the order template data, when the form was valid.
if (this.quoteId || this.customerId) this.router.navigate(['/order/create']); if (this.emitStatusChangeForm) { this.emitStatusChangeForm.unsubscribe(); this.isInvalidForm = false; } this.resetSectionCusInforControl(); this.orderDateControl.setValue(new Date()); let defaultOrde...
0
47b206ffd197894d72806af6068cd677
938b4e6afc064001131f2e5bd0c3e818
Set the value of the onload event handler.
if($value instanceof IJavaScriptCallback || $value === null) { $this->onclick = $value; } else { throw new InvalidInstanceError('value', $value, 'IJavaScriptCallback'); } }
0
78b0eedb42107ebef2cccd283a97d7a4
83e28a5e6940b9219a4db08f3b388ff8
This function process top 1000 results for all the short and long trec queries and writes result to the file. similarity algoritm to be used algorithm name which used to devise the output file name
try { String index = params.getString("index"); String queryFile = params.getString("query_file"); String queryType = params.getString("query_type"); String out = params.getString("out"); QueryBuilder queryBuilder = new QueryBuilder(queryFile); if (queryType.equalsIgnoreCase("page")) { ArrayList...
0
1b3d9ba4d5d4f093955e55d83cb767b9
eb728c06d654343184fc74375adeb36a
DEPRECATED. Sends dashboard server expected position. All other fields are dummy data.
{ std_msgs::String obj; obj.data = "0" + SSTR (pos) + "00,,"; _hmiPublisher.publish (obj); }
1
abf0079101681c1800b7ce7f2212c2eb
7259305bb05a7ceeec7a34f2de89d25a
Define hook for other modules to add links in top right menu.
class Events public static function onTopMenuInit($event): void { $topMenuWidget = $event->sender; $topMenuWidget->addEntry(new MenuLink([ 'label' => Yii::t('ExampleBasicModule.base', 'Example'), 'icon' => 'anchor', 'url' => ['/example-basic/index'], '...
1
61695c2c58997e74b78c0786cf7aef3b
13011b18ea11999a418612ec82e6dde2
The third Euler angle (in degrees) by which the cuboid is rotated. Returns
if self.tf_set_: q = self.tf_wrt_map.transform.rotation return euler_from_quaternion( [q.x, q.y, q.z, q.w], 'rxyz')[2] else: return 0.0
1
57c684fc973145e44df7ae6f08e4b987
1f5403dc9676b2a0601128922f9f83c3
Converts a character to a Keys enum and a 'do we need to press shift'.
final boolean shift, final boolean altGraph, final boolean meta) { int modifiers = 0; if (control) { modifiers |= InputEvent.CTRL_DOWN_MASK; } if (alt) { mo...
0
5c42d0d33b5d09e6b675396919cacb31
b09836a405e9220893c7349faab56db9
关联方法,一个课程有且仅有一个老师
class Course extends Model public function teacher() { return $this->belongsTo('App\Teacher'); }
1
a8ea5b75f6c18e05b8a53768e10cd26c
056d41c76e9a0379f3cf29cb06ed066c
Removes a course from the loaded term
public class AMSFacade implements AMSModel @Override public void removeCourse(String courseId) throws ProgramException { uni.removeCourse(courseId); }
1
ddf6be5da3ad15957924d97673d703c7
96e5a1f5a036ec996bf06919e775e050
Returns index to point 3.
public class Triangle public Point2D getPoint3() { return point3; }
0
600392287693bc884a088f1317adec70
ae9d88860dd6cc8d6b41107a01c0f014
酒店点评列表
class HotelController extends BaseController public function commnets(){ $id = Auth::id(); $i = DB::table('merchants') -> where("user_id",$id) -> where("is_reg",1) -> first(); if(!empty($i)) { $data = DB::table('order_commnets') -> join('users','order_commnets.user_id...
1
5470917443b64b0986e02c8cbf948765
f41fefff7c5d0e4ab28372b9a212bf4c
メールアドレスとして正しいかどうかを最低限の判定する<br/> .+@.+\\..+
public class FieldVerifier public static boolean isValidEmail(String emailAdd) { RegExp p = RegExp.compile(".+@.+\\..+"); return p.test(emailAdd); }
1
11b62fcf882914cc2f71d5d8fc83b7c9
9b2e54d86654e3ed7fbb9ed78753dec7
This is a getter for 'trans' list.
class InvariantSSM(SSM): def get_transmat(self, *args): return self.transmat
0
522c3fac867c72cf31af0c8f8e493621
27a7afb88cc0bd252846519b26505667
Updates the distance matrix to include the distances of the old points to the new point.
public class Router public void incomingDistanceVector(Integer from, Integer[] distances) { for(int i = 0; i<distances.length;i++) { distanceMatrix[i][from] = distances[i]; } }
1
aa3eb3d4bfaae9d3436b8555bfd16835
afd5846b434a2918c939564cacf0363b
TimeDifference returns the time difference between the localhost and the given NTP server.
func TimeDifference(server string) (time.Duration, error) { output, err := exec.Command("/usr/sbin/ntpdate", "-q", server).CombinedOutput() if err != nil { return time.Duration(0), err } re, _ := regexp.Compile("offset (.*) sec") submatched := re.FindSubmatch(output) if len(submatched) != 2 { return time.Dura...
1