query_id
string
corpus_id
string
query
string
code
string
label
int64
a86cc147ac7eac36dcc5ca4207e25b90
84014614dfea94976a0d9a98e35ba682
验证字段.验证规则 => 所提示的汉字
function checkChinese(field,rules, i, options){ var reg="/^[\u4e00-\u9fa5]{2,4}$/"; var flag=/^[\u4e00-\u9fa5]{2,4}$/.test(field.val()); if(!flag){ return "请填写您的中文姓名、长度为到个中文字符"; } }
1
0780adc85962524df6c4c3b1210eceb5
97ee5d302f224702779cc25c0b7b136d
Interface for pickling the matcher.
self: _PhraseMatcher, ) -> Tuple[Any, Any]: data = ( self.__class__, self.vocab, self._patterns, self._callbacks, self.defaults, ) return (unpickle_matcher, data)
1
704e1b575c8d081670a2f4b9df078f74
72276c98e288a9f193c249f152416827
指定した数値が負の無限大と評価されるかどうかを示す値を返します。
public static bool IsInfinity(Half value) { return StripSign(value) == PositiveInfinityBits; }
0
9ccc3ecf6105cffc199ba677e84d3bdb
de4dedc955708076a89c63efe086a2fb
查询用户优惠券汇总详情
CouponDetailVo querySingleCouponDetail(Integer userId, int couponDetailId) throws CommonBizException;
0
303fa42c521e4853dfa783f30617e850
d61b315628cf23db530dc785773a2607
Get the vert text justification value
function FontInstance:GetJustifyH() end
0
1e8715856411a3aa3c133f74e8ce21d4
2a23915032732a3dd9855a43b71cbe14
Get the last element of back stack array
back () { return this.dataStore[this.getLength() - 1]; }
1
ef4fc9118ac906e67480fc1ed8a81eac
c29d55e30b7012f6df2e3b9c4c412d58
Create proxy table and meta table.
int CreateNamedClusterMetaTable(lua_State *L) { lua_newtable(L); lua_pushliteral(L, "__LVNC"); lua_pushliteral(L, ""); lua_settable(L,-3); lua_pushliteral(L, "__newindex"); lua_pushcfunction(L, NamedClusterNewIndex); lua_settable(L,-3); lua_pushliteral(L, "__metatable"); lua_pushliteral(L, "cluster"); lua_set...
1
2b888e606c5344532acc825f89ec69da
32c2a40dc30e262eaaea3570474c7239
Trigger lights to flicker.
void diagnose_lights() { char i; for(i = 0; i < 2; i++) { BLINK(TIME_1); BLINK(TIME_2); BLINK(TIME_3); BLINK(TIME_4); BLINK(TIME_5); } }
1
0477e02ae4bb35ca8bc664b4345788fe
b38d89b047700f62053e119232cdd5ab
This is the constructor for this class. It initializes the game so that x has the first move, and initializes the particular board to be used in the game.
{ cout << "Constructor board" << endl; xcellsize = xsize; ycellsize = ysize; pcolor = CHOCOLATE; bcolor = ORANGE_RED; gcolor = PINK; for (int i = 0; i < BOARD_Y; ++i) { for (int j = 0; j < BOARD_X; ++j) { board_array[i][j] = 0; } } gameStarted = 0; resetGame = 1; mainMenu = 0; mainMenuAnimationFra...
0
45eba2048b9054553a46f7794d8baa6f
0c93037ee44b30ef3c6a02bfdd75a76f
Structure for accessing stock data associated with a single CSV file.
try: stocks = pd.read_csv(csv_path, header=0, index_col=None, parse_dates=[0], converters={'IDs': lambda x: x[:6]}) except Exception as e: with open(csv_path) as f: stocks = pd.read_csv(f, header=0, index_col=None, parse_dates=[0],...
1
1252e4e0d45a64772a9bc48279f12a6a
1ded090635e605e2ea10a185964420d6
使用回溯跟踪模式获取调用当前方法的模块名
def FUNC(backStep=0): return sys._getframe(backStep + 1).f_code.co_name
0
29c03ea1af63b426cb8493cf5829d48f
fd772fab16c009a431078fcb57875a0d
把前台获取的json数据进行处理(处理心理测试界面传过来的数据问题,将其分开放入到数据库)
{ var failcount = 0; var countQuest = new Object(); countQuest.failQuest = new Array(); countQuest.responseArray = new Array(); var tFenshu = 0; var tDefen = 0; ...
1
e055f68425f9454dd93e798fada59858
919478adb689d6cced89e2b6cd380923
Gets array of all "exposure" elements
@exposures = Exposure.order('flag ASC') @elmtypes = Elmtype.all respond_to do |format| format.html { render xml: [ "elmtype_id" => @elmtypes , "exposure_id" => @exposures ] } end end
1
3cc091933d14cd66e2875388f6d01168
df516d5e48fbac746159571c99b62bb2
设置视频Canvas渲染模式
class Canvas extends EventEmit3 setGirdMode() {}
0
dae0e9c5e1a0f6b133627b3bb317a756
14e05d704d5002576933c7b179db8f75
MustFromID converts an id to objected id, panics on error.
idType, err := spiffeid.FromString(id) if err != nil { return nil, err } return &types.SPIFFEID{ TrustDomain: idType.TrustDomain().String(), Path: idType.Path(), }, nil }
0
c1fb2771d860780078645acf46f12b64
1f37500ccb9c204c11f7f29571114965
This method shows or hides the root tree node.
public class TabbedChangesComposite extends Composite implements ChangesComposite public void setShowRootNodes(boolean showRootNodes) { compactContentProvider.setShowRootNodes(showRootNodes); detailedContentProvider.setShowRootNodes(showRootNodes); }
1
032a1e875a125798fec026303e3177c4
ffc1faf86470f17395200c5a7c3c8d2d
証明書ストアハンドルを解放します
{ EnterCriticalSection(&m_Lock); for (tCertMap::iterator It = m_loadedCertificates.begin(); It != m_loadedCertificates.end(); It++) { for (tCertList::iterator certIt = It->second.begin(); certIt != It->second.end(); certIt++) { CertDeleteCertificateFromSt...
1
3def72e889fc7a0623c91889f602ebb8
7857b911cea890c876df864564bc8350
Un autor tiene muchos libros
class Favoritos extends \yii\db\ActiveRecord public function getLibro() { return $this->hasOne(Libros::className(), ['id' => 'libro_id']); }
0
753bdddd44b9469eae8bdb3835526624
1a2be0cf363c5dd6c42f1ce31a23cc01
更新菜单位置
class SetsController extends TopController public function ajupdate_psort(Request $req, $sid){ if (!$this->login_status)abort(401); if (!is_numeric($sid))abort(400); $sid = (int)$sid; if ($sid<=0)abort(400); $node = ($req->has('node') && !empty($req->input('node'))) ? json_decode...
1
c6366ad636686097974d40515af61e5d
33d08e9aa1dfa4b11fd9569c5c8d2e8c
NewMongoDatabase creates a new MongoDatabase instance.
func New(uri, db string) (mg *Mongo, err error) { m := Mongo{Uri: uri, Db: db, Colls: map[string]*mongo.Collection{}, IsConn: false} ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) m.Client, err = mongo.Connect(ctx, options.Client().ApplyURI(m.Uri)) if err != nil { return &m, err } ...
1
7f4a3113d79af140413c112a228049b1
54a4c175baa4e4530215d930c605e203
remove unused end line breaks. Should be called before a new block element. e.g.: <p>line one<br /> line two<br /> <--- remove this br-tag </p>
$html = preg_replace("/(<br>\s*)+/", "<br>", $html); $html = preg_replace("/<p>(\s|<br>)*/", "<p>", $html); $html = preg_replace("/(\s|<br>)*<\/p>/", "</p>", $html); $html = preg_replace("/<p><\/p>/", "", $html); return $html; }
1
0ed59f73318a78f9304db163bae06829
f318550660a6308d7b904e3d78fcac77
功能描述 :获取项目操作记录 按时间排序
class ExportDbModel extends BaseModel public function getOpList($limit = null) { $this->_table = 'op_record'; $this->_dbString = 'olddb'; return $this->getRows("aid > 0", array(), '`tm` ASC', $limit, $this->_table, $this->_dbString, true); }
1
83591c8c10907057d8c8b2bccb9e633d
00f3c989488436e57ecb3246f88843a8
Apaga os campos nova senha e confirma senha
namespace GerenciadorDeEstoque.Apresentação public partial class Cadastrar : Form private void txtb_reminderpassword_Click(object sender, EventArgs e) { txtb_reminderpassword.Clear(); }
0
ede497891149f980206dc70f456f8730
42828a4938fc8ddba21ab38ba0ef5995
层次遍历(非递归)
class Solution: #层次遍历,借助队列,若队列不空,则出队,并将其左右孩子入队 def generatorTraverse(self,root): if not root: return None stack = [] while root or stack: while root: stack.append(root.right) yield root.val root = root.left ...
0
1deae6ed669e39e60e02810b9c146abd
1ed8370459f981dbad20f4696bb7cfaf
Valida se é uma opção valida da modalidade.
$nome = $req->input("nome"); $ignore = $req->input("ignore", null); $check = Modalidade::where("nome", $nome); if (!is_null($ignore)) { $check->where("nome", "!=", $ignore); } return $this->defaultJsonResponse($check->exists()); }
1
a46ac2b084fb09ff43c7a25973e672c2
49c2e62fe561c459dbb2ac31a507b512
Move the cursor into the centre of the window. The event_t.mouseevent_t implementation would set robotMove flag for us to be able to distinguish the Robot-caused moves and not react on them (thus preventing look to be stuck or behave weird)
g.perspective(fov, (float) g.width / (float) g.height, 0.01f, viewDistance); robot.mouseMove((int) ((GLWindow) g.getSurface().getNative()).getX() + g.width / 2, (int) ((GLWindow) g.getSurface().getNative()).getY() + g.height / 2); }
1
e9f5b4236575af3989d70c644d6d2155
8c019b016914b493e079fa2bd2199e33
模糊查找方法
function fuzzyQuery(key) { var searchResult = []; allMapList.forEach(item => { if(item.map_name.search(key)!== -1) { searchResult.push(item); } }); searchResultList = searchResult; searchResult = []; showTemplate(filterResultList,searchResultList); }
1
bf2fa207165b85761fd74fb754b43d02
7750bde0bd8d6cd45b8ef605adb4a65c
Test NumPy's basic indexing.
if common.verbose: print('\n', '-=' * 30) print("Running %s.test01_index..." % self.__class__.__name__) r = np.arange(200, dtype='int32') r.shape = (100, 2) array1 = self.h5file.create_array( self.h5file.root, 'array1', r, "title array1") array...
1
0eb2eba2c2ecd711e176d78b34044ab3
035eb3e65b7b76da30a5b085ed0ac740
Creates car dto from car entity, initialized it with model and drivers
@Service public class MappingServiceImpl implements MappingService @Override @Transactional(propagation = Propagation.MANDATORY) public CarModelDTO getCarModelDTO(CarModelEntity carModelEntity) { CarModelDTO carModelDTO = new CarModelDTO(); carModelDTO.setId(carModelEntity.getId()); carM...
1
80d1bef6c8a7302ab186975b4e1a0c84
b14d10724ef57a26fbccc09968195930
Write part geometry to a STEP file. Returns the STEP file path.
line_3d = ( "co 3d {0[2]} {1[2]} {2} z".format(self.metas.pt_min, self.metas.pt_max, self.metas.grid_size - 1) if self.metas.ndim == 3 else "") hip_script = dedent("""\ ...
0
901ed9d9f276c21d40a1b4fec227c37b
de5ae0fb9e383415a167114ef4c3fead
Calculate the Sobol indices.
def calc_sensitivity_index(problem, model): param_values = saltelli.sample(problem, 16384, skip_values=32768, calc_second_order=False) y = model.predict(param_values) si = sobol.analyze(problem, y.flatten(), print_to_console=True, calc_second_order=False) return si
1
f2266b1309dc6f0dbe9c811daa304d52
2a6b9b057e8afbb83d6300887b8f539e
http://stackoverflow.com/a/14962496
string randomString(size_t length) { static auto& chrs = "0123456789" "abcdefghijklmnopqrstuvwxyz"; thread_local static std::mt19937 rg{ std::random_device{}() }; thread_local static std::uniform_int_distribution<std::string::size_type> pick(0, sizeof(chrs) - 2); std::string s; s.reserve(length); while (length...
1
37a97db8662f19f438d3a0b03aa868ca
578cda763d2510561a92408ba4054831
Set samlContactEmail.
public class SamlConfigurationData public String getSamlContactEmail() { return samlContactEmail; }
0
50dd42e7567d90d5fc9baacace91a7e3
4931c2b18503cca8728d9a45c359ecdf
Handles the Click event of the LinkedListButton control.
namespace BarnardosPuzzles.UI public partial class MainWindow : Window private void LinkedListButtonClick(object sender, RoutedEventArgs e) { var view = new LinkedListView(); view.ShowDialog(); }
1
3a08287e335a27b5d2415a7b41dfbfa4
e699cf99580082d279bb2fa6ee2c3e99
Returns the meta object for the attribute '{@link it.csi.mddtools.datagen.Erdesignerschema30.ItemType#getViewrefid <em>Viewrefid</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Category_views_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Category_views_feature", "_UI_Category_type"), ...
0
2817fccb2123c31ddf6d0e5d31583412
8b6dc9b260a664fc48ace912308047e9
Returns the primary key of this dish table.
public class Dish implements IBaseObject public int getID() { return this.ID; }
1
fd53e30cae36fc7ccfcd515bda09e340
3d5da65850ea1fcd7b67b723f2c32631
Event handler for when the user clicks Start Game from the File menu
namespace TriviaMaze public partial class MainWindow : Window private void btn_startGame_Click(object sender, RoutedEventArgs e) { StartGame(); }
0
f52a566ee10d3c0373669353cdd9bf38
6a39ef54adfa7f44be179afe06bb37d9
add sample widgets to database
abstract class DatabaseTestBase extends KernelTestBase public static function addSampleData() { $connection = Database::getConnection(); $john = $connection->insert('test') ->fields([ 'name' => 'John', 'age' => 25, 'job' => 'Singer', ]) ->execute(); $george = $conne...
0
2d0eafc1281b7398a69a0733d029d1c8
8e2a885fdc02387b9502ecebadabfbbc
根据labelNumber获取线路牌num
public class LineControllerView extends LinearLayout public String getNum() { TextView tvNum = (TextView) findViewById(R.id.tv_num); return tvNum.getText().toString(); }
0
f879818cd3fc2433976454adefffd43f
60b87b63e1d43c75068e88ba49862925
Retourne les bonus utilisés d'un joueur de la partie
public class Player public int getBonus() { return bonus; }
1
6c239d890ebf7ace68315fd0843b66fa
0f38d2f4a0903e1b737ad2508e1f1f4a
2つのEditTextに入力がされているかをチェックする
public class MyAppCompatActivity extends AppCompatActivity public Boolean checkET(Context context, EditText editText, String text) { if(TextUtils.isEmpty(editText.getText())){ Toast.makeText(context, text, Toast.LENGTH_SHORT).show(); return false; } else return true; ...
0
27fc331709be83a6cf26ebddadef5827
91470841a86a63f04a7a32fe2e75b79c
Returns a configured and ready to use d_filter_t_t struct with a first order low pass transfer function. dt is in units of seconds and time_constant is the number of seconds it takes to rise to 63.4% of a steady-state input.
class LowPassFilter: def make_from_cutoff(cutoff_frequency,time_between_samples): fc=cutoff_frequency*time_between_samples*2*pi alpha=fc/(fc+1) return LowPassFilter(alpha)
0
ead7fbbf80bef009f2bb3b628a949237
f653ef854c408635338720f613e86d01
create .task.json file if not exist
export class TaskCreator public static async createTask(workspaceFolder: WorkspaceFolder, projectFolder: string, quarkusBuildSupport: BuildSupport): Promise<void> { const taskCreator: TaskCreator = new TaskCreator(workspaceFolder, projectFolder, quarkusBuildSupport); await taskCreator.createTasksJsonIfMissing()...
1
a4aa9c0ceb5153c02cc485046c79d809
4a28bf2ef2f096727eb181cdb2591029
删除给定id的MC二次分类
$model = new yplyd_model(); $id = $request['Id']; $ret_mi = $model->delete_mi($id); $response = $ret_mi; $app['fmt'] = 'json'; }
1
7b157eaf301b323259e029ca63a5d7a1
05746168053f202601fb5d8c4e8fc5a1
Set the event-loop handlers for the netmap backend.
netmap_worker_thread_enable () { foreach_vlib_main (( { vlib_node_set_state (this_vlib_main, netmap_input_node.index, VLIB_NODE_STATE_POLLING); })); return 0; }
0
4fc4b53dded30cba62163c43ee32a076
ce828b94769f1bee0b39849990f41179
zoomToAllMarkers - zoom the map to show all the current markers
function getsssssssssssssss() { var markers = layer_markers.markers; if (markers != null && markers.length > 0) { var points = []; for (var i = 0; i < markers.length; i++) { var latlon = markers[i].lonlat; var point = new SuperMap.Geometry.Point(latlon.lon, latlon.lat); ...
1
b1cf4811b3ed53add696f2e637a6f515
4e8fe091b0272043bad54ed1f71cab8d
商城按钮点击事件
public class ShopButton : MonoBehaviour public void PushButton() { GameObject.Find("Canvas").GetComponent<ObjectMnager>().sceneMode = 2; }
1
3533f7fcb17bbe12f2ce7fba49663e4b
c9c013e45eadbf7a600c1a25be14b18e
PmPowerGetPerms() - Get permissions to control node's clocks for non-power children nodes of the target power node. If at least one child's clocks no one has permission to control, this stands for the power parent (this node) as well.
{ DEBUGMSG(ZONE_FUNC, (TEXT("+%s()\r\n"), __WFUNCTION__)); DEBUGMSG(ZONE_FUNC, (TEXT("-%s()\r\n"), __WFUNCTION__)); return PMIC_NOT_SUPPORTED; }
0
39f4dc5875070b75bebd1261053e94a1
e515f0ac41cd8660609ed5d942aa4646
@brief To hook a callback function to make OS do a context-switch while waiting.
void task_sleep (task_t f) { _task_sleep = f; }
1
06823eaa280d97f90c52b2661a0aff9f
93941724cf3fdea6851fa00b228eba92
proceed forward until next line (black) detected
def left_front_forwards_until_black(): print "Starting left_front_forwards_until_black()" m.av(c.LEFT_MOTOR, c.BASE_LM_POWER) while NotBlackFrontLeft(): pass m.deactivate_motors()
1
7618c2858d6741ea6fbe98eee47ca562
e5007674adc8f769e5523d40d3522a83
perform initialization of this class and its not-yet-initialized superclasses (top down), which includes calling clinit() methods This is overridden here to model a questionable yet consequential behavior of hotspot, which is holding derived class locks when initializing base classes. The generic implementation in Clas...
pVMClass self = (pVMClass)_self; va_list args; va_start(args, _self); SUPER(VMObject, self, init, va_arg(args, intptr_t)); va_end(args); }
0
179d656514aaba841ee302d23fff120e
b5ae2b2742d0bd3f26cad92d8c9196bc
Setter for <code>WETRN.V_OFFR_SLS_MS_GIFT.OPPP_SSNL_EVNT_ID</code>.
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.7.2" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VOffrWithMsGiftRecord extends TableRecordImpl<VOffrWithMsGiftRecord> public void setOpppSlsSrceId(BigDecimal value) { setValue(8...
0
5932824879927bcf0095dac2dfabbb1b
8797364cf052c92ee9bf41ad218da10a
Unique identifier of the user that executed the operation
export class EventSubExtensionBitsTransactionCreateEvent extends DataObject<EventSubExtensionBitsTransactionCreateEventData> get userId(): string { return this[rawDataSymbol].user_id; }
1
25d79e01d6560d3f0f99c56c99828bae
e5c3f381000e000584a5ab88dcb8b91d
Gets the dependency tree for the type of file of the given sourceFile
namespace TypeScript.Net.Types RoaringBitSet GetFileDependentsOf(ISourceFile sourceFile);
1
d2dc53b7e82b44ddc3f790e12fcdea60
065f02e3e5a08d86f9e25a587e9f6417
Решение СЛАУ методом Гаусса-Жордана
void zavaryuhinayuv::lab4() { int i, j, k; double **S = new double *[N]; double *D = new double[N]; for (i = 0; i < N; i++) { S[i] = new double[N]; } for (i = 0; i < N; i++) { for (k = 0; k < i; k++) { A[i][i] = A[i][i] - S[k][i] * D[k] * S[k][i]; } if...
0
de5d377781050822fa33f6996ecdda76
765d84581bb7e306f7befa0ef67b005c
set if LL stock can be minus ( more LL is taken by employee then earned )
boolean isTaken = PstLlStockTaken.existLlStockTaken(employeeId, takenDate); if(isTaken==false){ boolean isSuccess = takenLLApproved(employeeId, takenDate); LLAppMain llAppMain = new LLAppMain(); llAppMain = SessLLAppMain.getLLAppMain(employeeId, t...
0
71edb417f24427825196d48b8e93847b
f86f24919d14fd4b162f5c98da57dd33
推送给厂家和技工相关更新短信
namespace autosell_center.api public class Util public static void sendMsgWhenLDError(string mechineID, string ldNO) { string sqlT3 = "select * from asm_mechine where id=" + mechineID; DataTable dt3 = DbHelperSQL.Query(sqlT3).Tables[0]; if (dt3.Rows.Count > 0) ...
1
46fd35805047f82df3732e300ba4f708
013d9e5140a6e3527c3aafcde7cde184
Calculate the primal coefficients from the dual coefficients
def dualqp(K,yTr,C, weights=[]): if weights == []: weights = np.ones(N) weights = weights/sum(weights) y = yTr.flatten() y = y * weights N, _ = K.shape alpha = Variable(N) obj = 0.5 * quad_form(multiply(y, alpha), K) \ - atoms.affine.sum.sum(alpha) constraint = [alpha...
0
39d727c386896df9dd7b37316ffb63a6
c39570918666dc0d45d4e29e82d22971
Return a new array that contains all the items in the set. If the size of the set is 0, return an empty array. The objects in the set are unique (i.e., no duplicates), so the returned array cannot contain duplicates.
class RelativeSet def to_a @hash.keys end
1
ade472eb71f4c9a831f5eacac6c3aa91
d440c3ee93f7104131fcf9d0190f56b9
revoie vrai si l'ensemble d'etats donné en parametre contient au moins 1 etats final, faux sinon
for (StateNFA* state_nfa : ext) { if (state_nfa->isFinal()) { return true; } } return false; }
1
5eff24fe4d5dac820de47f95e4f56370
676f4a575250a23f0c5b546c9325bb6f
function to replace eacute with unicode
def replace(x): x = x.replace('\xc2\xa0',' ') x = x.replace('\xc2\xa1',' ') x = x.replace('\xc2\xa2',' ') x = x.replace('\xc2\xa3',' ') x = x.replace('\xc2\xa4',' ') x = x.replace('\xc2\xa5',' ') x = x.replace('\xc2\xa6',' ') x = x.replace('\xc2\xa7',' ') x = x.replace('\xc2\xa8',' '...
0
9b84d07016034193b035af57d80ae5ba
bc7c12f5747f9ea58acfe704b2f2aafb
获得OrderComeOut表记录总数
public long recordCountByCondtion(String outStoreOrderNo, Long storehouseId, String outStoreBeginDate, String outStoreEndDate, String outStoreTypeCodeId, String contactNo);
1
8ffc1b9d1eaf53bb3cf6d6efb7ea864f
e4033a6f3028d50e288dcd77c6631b8d
Asserts the seeker progress is greater (>) than a value.
{ if (expected.CompareTo(actual) > 0) { Helpers.HandleFail("Assert.IsGreater", message, parameters); } }
1
ac7eee41cb9fb5775da7beb7332347f4
b76274a6189d66113958eeb8121dfc76
@brief Remove a hardware watchpoint.
class RegiceClient: def delete_watchpoint(self, address): self.watchpoints[address].disable() self.watchpoints.pop(address)
1
156bc955d8ae5924042acd168dd77e5b
a69caa030d3d4b344518da5ea6bdc085
возвращает целочисленную пару координат вектора
def get_vect(x1, y1, x2, y2): return (x2 - x1), (y2 - y1)
1
ab7ef4c8f72de509bc5e040b522e4958
a8117776041dfcee1e4d6644e78fd71e
Takes a given yard line and converts it into a number useful in the coordinate system the project is using
namespace ProductionControlDailyExcelCreator.FileReader public class PMPF090BTextFileReader : TextFileReaderBase, IPMPF090BReader public string GetYard(int recordIndex) { try { return document.GetStringValue("Detail", recordIndex, "YardCode") + do...
0
bd4f4510239baa2865f2498d5b19179f
29e44965c1d5b9e1d17378a5eacb4eb6
Set search value for schedule number
namespace PilotTraining.TrainingManagement public partial class ViewSchedule : Form private void Search_Click(object sender, EventArgs e) { ScheduleHead(); }
0
ad9ba7d58cb185e744ad0113c3632afb
59f399af73c90e209b582ee5e53952b8
Get the maxfile handle of the configuration
namespace beagle std::string Configuration::handle() const { return _handle; }
0
5827fc2c82e199fff3911f85ea84ebd2
230c1d9615c76ed81fe6a23857d7a103
为角色name增加前缀
name = name.upper() if name.find(self.prefix) == -1: name = "%s%s" % (self.prefix, name) return name
1
4b1d67091eb0bf68347acc731e4f1e31
fa00268b069fa5ab901a4e74c5f71f86
ユーザーとフォルダーの関係性を記述
namespace GodaiQuestServer public class MongoMaster public EServerResult setUserFolder(int nUserID, String strComputerName, String strFolder) { var folderdb = this.mUserFolderCollection.FindOne(Query.And(Query.EQ("UserID", nUserID), Query.EQ("ComputerName", strComputerName))); if (fo...
1
5440365b90deb48773371084cd3f24be
8ab1343f0898bfdccc677ffd2df1e6b3
Returns True if the card status is 'Registered' or False otherwise
if not isinstance(isRegistered, bool): raise TypeError("Invalid Registered Status - should be bool.") self._registered = isRegistered
0
a9cb760cd12716d97d32141877b9e5b5
fa314a9b001ec7e2c9e71192ef55916f
Retorna Codigo del estado del item
{ int indentificadorEstado = -1; double disponibilidad = Referencias.ConsultarDisponibilidad(codI, codAlm, ano.ToString(), 0); int minimoDisponible = Referencias.CalcularMinimoDisponible(codI, mes, ano); if (disponibilidad == 0) { try ...
1
01dca88b9ca8ea322126d5689329d94f
e5ec27f8f53fd26edb819e968b2b4493
Check we can perform a super simple Clickhouse query. Returns `True` if so, `False` otherwise
from sqlalchemy import exc try: db.session.execute('SELECT 1') return True except exc.OperationalError: return False
0
cd06a41cde8fa8d06df0e4fe0f184273
d5963ef8d0d792ff0b4da36b30c576b1
MM 7-2-18 Adding function to add diet - four cases - "I, me" - process current Profile ID, single family member, retrieve proper profile id, "we" process for whole family, has "and" in name, split and process
str = self.in_medlish(pw) || "" str.gsub!(/\bp.?o.?\b/i, "by mouth ") str.gsub!(/\bs.?c.?\b/i, "subcutaneous ") str.gsub!(/\bs.?q.?\b/i, "subcutaneous ") str.gsub!(/\bq.?d.?\b/i, "daily ") str.gsub!(/\bb.?i.?d\b/i, "two times daily ") ...
0
d77332bd48dc9fc187ebb6b69191d1b1
40533a97b3a9c36d73a403e35c50e821
Return GraphViz notation for a callgraph.
nodeCount = 0; StringBuilder output = new StringBuilder(); output.append("digraph {"); output(node, null, output); output.append(SYSTEM_EOL + "}"); return output.toString(); }
1
1ad4f204cf47e8b1f5a2f039017ab205
1d21c368cbd58cf84df1cf551e8577b7
删除一个ShopGroup
$shop_group_id = isset($this->request_common_array['shop_group_id']) ? $this->request_common_array['shop_group_id'] : ''; $res = $this->service->delShopGroup($shop_group_id); $retval = AjaxReturn($res); if($retval['code'] > 0){ return $this->outMessage($retval['code']); ...
1
0299498aa0fc9b649d5fa3bbc6522e70
7f1f5f8d88eeb11a3a974a8bff26d943
初始化含有json文件表
class JsonTest: def __init__(self): print("Json初始化")
0
d7942108982a0123f67bc9e47dbcfa8d
95ec5b7f148c1412195f54fad97bdfa5
Route to recipe page.
class RecipeController extends Controller public function index() { return view('home'); }
0
2daf04086458c159fcc3ab3cfdbfb326
00106abe0ea6184a548e2e8e0342d6a9
Removed an item from the recycle bin.
[PluginController(Constants.Web.Mvc.BackOfficeApiArea)] [Authorize(Policy = AuthorizationPolicies.TreeAccessDocuments)] [ParameterSwapControllerActionSelector(nameof(GetById), "id", typeof(int), typeof(Guid), typeof(Udi))] [ParameterSwapControllerActionSelector(nameof(GetNiceUrl), "id", typeof(int), typeof(Guid), typeo...
0
7a1d5f1443a9548db66c635eea5b7281
a4635514a5c1cd5afab0e8330af17c3b
<condition> ::= <expression> [<relational-operator> <expression>] <relational-operator> ::= '<' | '<=' | '>' | '>=' | '!=' | '=='
def p_relational_expression_01(p): p[0] = p[1]
0
b7dcddd6021d40bc16725b89d9b6c5fc
1401711b1e07ea88e80bbbc1dc6e0200
downloads data required for bus journey progress
function getRestData(busSchedule2Use){ var url = "http://api.pugetsound.onebusaway.org/api/where/arrivals-and-departures-for-stop/1_" + busSchedule2Use + ".json?key=TEST&minutesAfter=30&minutesBefore=0"; var request = new XMLHttpRequest(); request.open("GET",url,false); request.send(); if(request.status...
1
6d37d661e8547a18f3d5a138ad8b75d9
03e2eee5a2eede3394e287d7fd673b8c
Computes the viscosity of interior regions.
IssmDouble viscosity; IssmDouble B,D=0.,E=1.,n; B=GetBbar(); _assert_(B>0.); n=GetN(); _assert_(n>0.); if(this->isdamaged){ D=GetDbar(); _assert_(D>=0. && D<1.); } if(this->isenhanced){ E=GetEbar(); _assert_(E>0.); } if (n==1.){ viscosity=(1.-D)*B/(2.*E); } else{ if(eps_eff==0.){ viscosity ...
1
97ca0e1d2d9c659b6c0823b6da041a60
2fe77d980ad2fcb4defad2360adc699a
Iterates over all usages for a given dataset. The returned wrapper does only include the usage and issues related to name and usage, but no further information.
class Usages extends AbstractApi public function getAllUsages(array $response = []): array { $uri = 'auth-modules/usages'; return $this->client->get($this->buildUrl($uri), $response); }
0
815b7908b48f95d9a1e494bb136032a3
893171a3c7f0d66e7972e486e08becf0
Elimina un registro de la base de datos según la matrícula que reciba
public int deleteVehiculo(VehiculoVO vehiculo) throws SQLException { int numFilas = 0; String sql = "delete from vehiculo where matricula = ?"; try (PreparedStatement prest = con.prepareStatement(sql)) { prest.setString(1, vehiculo.getMatricula()); numFilas = prest.ex...
1
2fbfadf5877b1d73f143480cf1151de1
55f826344f76fc2c12d04c9e0e0c644f
Make sure the small image list for this control has checkbox images (used for sub-item checkboxes).
class ObjectListView(wx.ListCtrl): def _InitializeCheckBoxImages(self): def _makeBitmap(state, size): bitmap = wx.EmptyBitmap(size, size) dc = wx.MemoryDC(bitmap) dc.Clear() if wx.Platform == "__WXGTK__": yOrigin = -1 else: ...
1
aa36f05ba1130fdf55636c4a3ea19fd1
a90a9265e294a444bd78d5126fb20bac
Выводит данные поля типа "Набор изображений" для построения формы редактирования
{ if (empty($value)) { return ''; } if (\array_key_exists('postData', $value)) { $value = [$value]; } $fieldValue = []; foreach ($value as $image) { if ($recordModel) { $mime = $image['type']; $src = $this->getImg($image, '', true); $fieldValue[] = ['key' => $image['postData']['key'], ...
1
f10c587222488d09a3c9f26415ee39d7
404913dbd8b190d8fa4619cfd47f4f02
reduce identical measurements to one feature
if self.n_signals != 1: self.signal = self.signal_array.mean(axis=0) else: self.signal = self.signal_array return
1
63ba4d44a0582603358c2c817e4b533f
59fbb5f68628ba4af73cb553eb5bd4ec
Thue-Morse Sequence
const sequenceList = '0'.repeat(n).split('').map(x => []); var lastAnswer = [], lastAns = 0; for(var query of queries){ var [a,x,y] = query; var sequence = (x^lastAns) % n; if(a == 2){ var index = y % sequenceList[sequence].length; lastAns = sequenceList[seque...
0
832fcb4289bc9638c8e7f8823c23f80c
ece4bb162338476b1dc9bbcc5e74f295
Tests for when the user tries to change to an invalid email(the email address contains 2 '.')
public void invalidEmailDomain() throws InterruptedException { driver.findElement(emailAddressField()).sendKeys(emailAddress); driver.findElement(firstName()).sendKeys(SignUpPatientCommonFunctions.profileFirstName()); driver.findElement(lastName()).sendKeys(SignUpPatientCommonFunctions.profileLastName()); driv...
0
b9c44df7771c2214cc54fd2aa7955027
fc8f2c8d15d16715e05854649ae0ae2c
Builds and returns the CREATE query
StringBuilder createQuery = new StringBuilder(); createQuery.append("CREATE TABLE IF NOT EXISTS "); createQuery.append(this.name); createQuery.append(" ("); for (Iterator<MySQLColumn> it = getColumns().iterator(); it.hasNext();) { MySQLColumn column = it.next(); ...
1
5db8410bbc555a02f9abc3cacb3da2de
2762e56f3969559a9507c966fe77a684
指挥者指挥工人进行搬入搬出操作
namespace BP.WF public class Dev2Interface public static string Node_Shift(Int64 workID, string toEmp, string msg) { GenerWorkFlow gwf = new GenerWorkFlow(workID); int nodeId = gwf.FK_Node; string dbStr=SystemConfig.AppCenterDBVarStr; Paras ps = new Paras(); ...
0
ec1799aa39d35694c98691efed0e94fc
8bab2a9bac302f297e0b54cb6475273c
Deletes an existing message sender.
public class AccountService public void deleteSender(String senderId) { apiClient.deleteSender(senderId); }
1
6b1007634ae1defecd35b001f2e84e13
031cced74ccc315435a38d4b457e5a14
旧版
@Controller @RequestMapping(value = "/v1/teacher") @Slf4j public class TeacherApiController extends AbstractTeacherApiController @RequestMapping(value = "/index.vpage", method = {RequestMethod.POST, RequestMethod.GET}) @ResponseBody public MapMessage oldVersionIndex() { return failMessage(RES_RESULT...
1
835269caf6a1a1715c7a715c7093da0e
a3b6d1ae01171b9d41403ef03dc30bf6
Spawn monkeys at locations.
{ Location loc; CreatureType mob; int ran, count; boolean slime = false; boolean wolf = false; switch (random.nextInt(5)) { case 0: mob = CreatureType.CREEPER; count = noOfPlayers * 3; ...
0
070b2a666ad5a679191a6cce40339b11
280ff16e1089c11c3290ef31c266dc93
Converts "CamelCase" to "camelCase".
namespace Grapevine.Util public static class InternalExtensions internal static string ConvertCamelCase(this string s) { return CamelCaseOuter.Replace(CamelCaseInner.Replace(s, "$1 $2"), "$1 $2"); }
0
cfd75c41e5608ea47771a927d8eb4485
cfb965a7d6a45ee9ecbd76b009d4e8d8
Test if a query covers any data. This test can be used to avoid running dump on a query that is empty, hence speeding up the dump process. Another oddity of influxdb: if no data points are found for the time range, instead of returning a count of 0 for each field, the server will return null...
cur = self.cursor() cur.execute(psycopg2.sql.SQL("SELECT * FROM {schema}.wastewater_structure LIMIT 1").format(schema=psycopg2.sql.Identifier('qgep_od'))) row = cur.fetchone() self.assertIsNotNone( row )
1
1a1d856fbac9c5f334151fc1b34ddbea
04d05923954a20910dc6c1bff427cb54
呼吸灯控制
public byte[] on(ControlParam param) { System.out.println("---Huati NB-lamp on---"); if(null == param.getMid()){ return null; } int value = 100; String mid = Utilty.intToHex2(param.getMid()); if(null != param.getValue()){ value = param.getValue...
0
51b44985f61202a3b957fc14698a2231
e7a228b14a9e6502c04bd5bacab52e8b
This program sorts a set of item by comparing their descriptions.
var Things = []Thing{ {"IronRod", 0.055, 0.4, 3000, -180}, {"SteelChair", 0.815, 0.7, 4000, -209}, {"CopperBowl", 1.0, 1.0, 60, -30}, {"BrassPot", 0.107, 1.5, 10000, -456}, } var name func(*Thing, *Thing) bool name = func(Thing1 *Thing, Thing2 *Thing) bool { return Thing1.name < Thing2.name } var mass f...
1
7e89100a7ba7ee4589c68bd1a74ce10b
fa0a2414e8564d235661f3a37ffb9122
차량소유여부의 정보를 리턴한다.
public @ResponseBody SearchResult selectHaveCar(@RequestBody VehicleMasterSearchVO searchVO) throws Exception { SearchResult result = new SearchResult(); result.setTotal(vehicleMasterService.selectVehicleCustomerInfoByConditionCnt(searchVO)); if (result.getTotal() != 0) { res...
1
7b7a28560c9c4720ba534576d13ca3e1
235a4c3c5e39eebaa14235b72a471587
<p> Updates the configuration parameters for the specified Lambda function by using the values provided in the request. You provide only the parameters you want to change. This operation must only be used on an existing Lambda function and cannot be used to update the function's code. </p> <p> If you are using the vers...
@javax.annotation.Generated( value = "by gRPC proto compiler (version 1.0.3)", comments = "Source: google/cloud/functions/v1beta2/functions.proto") public class CloudFunctionsServiceGrpc public static abstract class CloudFunctionsServiceImplBase implements io.grpc.BindableService public void updateFunction(co...
1