query_id
string
corpus_id
string
query
string
code
string
label
int64
c6a9c730cccf0ac1b90874fe0770798c
2719426608a3f646540df533c0b74d7d
Injects the Sessions async service proxy.
[NotNull] this ContainerBuilder builder, [NotNull] SessionsServiceClientSettings settings, [CanBeNull] Func<HttpClientGeneratorBuilder, HttpClientGeneratorBuilder> builderConfigure = null) { if (builder == null) throw new ArgumentNullException(name...
1
d0023e4cf39e1d587241cda5aae12f33
bc63c47f8d84d73eb227fb9f59cbd845
点亮建筑,做管理标记
function MyCityScene:AddIndicateForBuilding(building_sprite, build_name,needTips) Sprite:PromiseOfFlash(unpack(self:CollectBuildings(building_sprite))):next(function() self:OpenUI(building_sprite, "upgrade", needTips == nil and true or needTips, build_name) end) end
1
b168a6b3340f2bccee3aced3956451ef
886fe4032a1d9ad9e0349d237b20e7d7
检测圈子是否存在此成员
$groupName = $this->getVar('groupName'); $model = M('community'); if ($model->where(" title ='$groupName'")->find()){ $this->responseJson(true); }else{ $this->responseFailMessage('圈子不存在'); } }
0
53142fda8192c02ac01ff031b016a193
c41fe7ac9c5218e0873ce9960b1dbe4b
Extracts File_name from a complete_file_path
class LoggerHelper: def __get_file_name(file_path): data = file_path.strip().strip("/").split("/") return data[-1]
1
1a256814093e4f7fd3c4bc3b4d457226
9044ee6e4301c6828f14fc57eda999b6
Handle an incoming download aborted request.
class FileManagement(ABC): def handle_file_upload_abort(self) -> None: raise NotImplementedError()
0
3fc807242d55863c5038b254ac5eb47d
7144669eb81cdb6834628e40ce15e049
Check if customer logged in, product id is set and this product is not yet viewed, update view number
$product_view = $this->db_name->product_view; $data = array( 'session_id' => $_SESSION['user_session'], 'product_id' => $product_id, 'timestamp' => date('Y-m-d H:i:s') ); $product_view->save($data); }
0
a35d4eba03368bd6c3b78ee92f58e518
03fdc83a172e1865deb4e9760051235b
Finds the closest ancestor anchor element (including the target itself).
let curr = elm; while ((!(curr instanceof HTMLAnchorElement) || !curr.href) && curr) { curr = curr.parentElement; } return curr; }
1
6e27e931d52244d096c4b15d4a92ca34
d45d1728ded6263c11fd2e35be8a3e9d
This method saves the SiteLabel into the database, performing add/update auto detect and without performing a cascade operation.
public void baseSave(Site site);
0
e6806634855dce198a53f6d9b98f791b
63399883c38ac2d0630526fcf9e047ef
List the available items and allows the user to pick one to load
class CatalogController(BaseController): def new_item(self): section_q = meta.Session.query(model.Section) available_sections = [(section.id, section.name) for section in section_q] c.available_sections = available_sections[1:] unit_q = meta.Session.query(model.Unit) c.available_...
0
9ab7591f559f69c4ddf3f43769c3ba7f
c81fc3765143e254dd8df508a9268c84
calculate forces from thrusts and accelerations
from numpy import cross Fp = mass*acm - Fd - [0, -9.8*mass] Mp = Icm*alpha - Md - cross(rd-rcm,Fd) - cross(rp-rcm,Fp) return Fp, Mp
1
92a12806656d780b0d440c732cb8f8d9
d846dd09c2b4d5d184315332cab1800b
This function fills the list box with the file directory for the specified topic.
void CFileDialogWidget::PopulateFileList() { this->pFileListBoxWidget->Clear(); UINT wCount = 0; vector<WSTRING> wstrFiles; CFiles::GetFileList(this->dirpath.c_str(), this->extensions[this->pExtensionListBoxWidget->GetSelectedItem()], wstrFiles, false, pShowHiddenOptionWidget->IsChecked()); vector<WSTRING>::...
1
de90f447a1df8bf5140ccb22694e5d9a
e15288658bfe98ab28465b6a425bce8d
Changes the sensor state.
class EnOceanSensor(enocean.EnOceanDevice, Entity): def value_changed(self, value): self.power = value self.update_ha_state()
1
ae0e9ec477dd38a09d0435e9c287c6e9
99a2e95944ab22eb07f31a9479534d7f
减去一个商品,如果数量为零则删除该商品
cutProduct(index){ this.productList[index].productNum--; if(this.productList[index].productNum <= 1){ this.productList[index].productNum=1 } }
0
fba13ba23772e05e67cf5a9495077e71
752fa0a16cbf0496dc42e1b827e24b07
Handles the Click event of the menuItemSmallIcons control.
namespace PointOfSale public partial class DrinkSelection : Page private void Click_Small(object sender, RoutedEventArgs e) { if (DataContext is Order) { if (_drink != null) _drink.Size = DinoDiner.Menu.Size.Small; } }
1
a005ad7a3beaed6f2f2c29af0e3e1936
466b0f18a5b058cba472c2b2a463f54c
Set the default period when the period is not set
public class BalanceCustomFragment extends Fragment implements View.OnClickListener private void storeDefaultPeriod() { switch (begDay) { case "1": begDay = "01"; break; case "2": begDay = "02"; break; case "3": ...
1
b110c39a73f8e2803d2173e4afbead3f
1964fa3f8b292abf5913c6ae55ea7e96
使用swfdump对flash文件进行分析,并提取真实的文件名
{ Directory.CreateDirectory("tempFiles"); if (!File.Exists(inFilePathName)) return string.Empty; FileStream inFileStream = new FileStream(inFilePathName, FileMode.Open, FileAccess.Read, FileShare.Read); if (inFileStream == null) ret...
0
402b8ad1740ad59bf43c177762f978d7
f556e10b1a0ca12f15e26ea4530df45b
Auditory sensory handler
self.gameWorld = GameWorld(sense) self.gameRenderer = GameRenderer(self.gameWorld) self.inputHandler = InputHandler(self.gameWorld) self.sense = sense
0
205a8b64abbe7acdc714b9e5b4b402fc
7fc21b239228cffd86fd0e0915097cbb
returns false if a turn cannot be taken, true otherwise and increments the number of turns taken
public function takeTurn();
0
58d245e8bad82de3e1469889cf265d57
198863ec329aa1e2344b9dca1b3abe8b
是否是数字(负数、小数)
{ if (obj.IsNull()) { return false; } return Regex.IsMatch(obj.ToString(), @"^-?([1-9]\d*\.\d*|0\.\d*|[1-9]\d*|\d{1})$"); }
1
6a0fd744e84010cfb9eb3a345c19ac6e
87848846a448d9a2d8f6f962cf94ec1a
Allows for clicks to be registered within the current state.
{ return Observable.FromEventPattern<EventHandler, EventArgs>( handler => instance.Click += handler, handler => instance.Click -= handler); }
1
e3b498e68e11ec87e5552149ce47de81
444fb32560cb522b70d0e63fda5deab3
动态创建Lov
void setLovFields(String value);
0
708e53259d51c272fb9b03b4878b22f5
786e06bb001c2fe9e9c4e3aeee69fcf4
GOOGLE CUSTOM SEARCH APIからキーワードで画像のURLを取得する
def get_image_urls(search_word): encoded_search_word = urlrequest.quote(search_word) url = URL_TEMPLATE.format(key=CUSTOM_SEARCH_API_KEY, cx=CUSTOM_ENGINE_ID, search_word=encoded_search_word) req = urlrequest.Request(url) res = urlrequest.build_opener(urlrequest.HTTPHandler()).open(req) data = json....
1
30a0782f3c4ce4976b09258a550ede60
3155fd58669dc3e2bbaa5c29c388e643
Handles a GET /users/<user_id>/images/<image_name> request by returning the user's image with the given name.
func getImage(ctx *fiber.Ctx) error { id := ctx.Params("id") if id == "" { return utilities.Response(utilities.ResponseParams{ Ctx: ctx, Info: configuration.ResponseMessages.MissingUserID, Status: fiber.StatusBadRequest, }) } parsedId, parsingError := primitive.ObjectIDFromHex(id) if parsingError...
0
022e517bb5fe129c8a2a05d2dbf8d26b
8f39396f37f543f2129bb901d97a79c3
Returns a vector, casted to integer values.
namespace Urho3DNet [MethodImpl(MethodImplOptions.AggressiveInlining)] public IntVector3 ToIntVector3() { return new IntVector3((int)X, (int)Y, 0); }
1
87240413186bf2f30480cfba91e423aa
1e9fe8900d5df8386a4f29d778c6d300
Convert all index columns to lower case.
def lower_keys(row): return {k.lower(): v for k, v in row.items()}
1
b40f3b1f3b96e463b1351f8bc3443ca9
de04ea432406eea7cc663e96d0a27749
Get the binding MySQL charset name for this collation.
public function getTableCharset();
0
8113fc4f74301d2af0921b3726113b78
7c64d3e82492a7a23157fb3328f6ed74
用户退押金信息审核
@Service public class RefundService extends BaseService private JSONObject checkUserOrders(Long userId) throws Exception { JSONObject jo = new JSONObject(); jo.put("result", "SUCCESS"); TripOrderFindCondition condition = new TripOrderFindCondition(); condition.setUserId(userId); ...
1
07d69de3f4a5fbb5ccf9de6b968bc505
fde836a4f268c27dd9710d2fe7216bef
将当前用户的游戏数据托管在微信后台
const self = this; if (self.wxEnv) { let obj = {}; Object.keys(opt.data).forEach(a => { obj[a] = opt.data[a]; }); obj.updateTime = self.db.serverDate(); self.collectionWhere({ collectionName: opt.collectionName, ...
1
e4443648e93025e6ae6d13b3c620b0be
1dfa0f41bbcf2325d1a3f4ea9795dcd0
Method that directs the users to an activity where they can see all the spots with information and status.
public class MainActivity extends AppCompatActivity public void onPlaceButtonClicked(View view) { Intent intent = new Intent(this, PlacesActivity.class); startActivity(intent); }
1
ae12128d3415e7b1291d6d338a9c2e2e
6a0f79d10171fbd923dcfdec2cee78ff
Get subscription statuses for a contact
{ var contactstatusRepo = new ContactStatusRepository(); var contactstatusList = contactstatusRepo.GetAllContactStatus(); if (contactstatusList == null || contactstatusList.Count == 0) { return NotFound(); } return Ok(contac...
0
0fe87645aef6d6ab17fc13d0b431da6b
22fc98ce639fa5a3992746d425968866
Gets rows from the datasource based on the primary key PersonCategoryAction_PK index.
{ int count = -1; return GetByPersonId(transactionManager, _personId, start, pageLength, out count); }
0
3f85d580a438431e98c10cb5b21d86ce
9a8b8592f13f781731485e9589bcd081
Called when the gameobject is destroyed.
public class DestroyThis : MonoBehaviour void Start () { }
0
12b507f4e95625694159f6f2dc867ecb
ef2281cf28dcbfc0541d28dbb63025eb
Overridable hashcode generation for invoice lines. Lines having the same hashcode will be grouped together if the journal has the 'group line' option. Of course a module can add fields to invoice lines that would need to be tested too before merging lines or not.
public int hashCode() { int value = 19; value = 303 * value + ((location == null) ? 1 : location.getId().hashCode()); value = 303 * value + getType().hashCode(); value = 303 * value + getAmount(); return value; }
1
8c333d3f87c763e256ca44add7926318
a5aba6a5750867926e71d19c10d1e145
账号数据是否变化
public class User public boolean changeUser(LoginBean.DataBean data){ if (user_id!=data.getUser_id()){ Log.e("position", "changeUser: user_id" ); return true; } if (sex != data.getSex()){ Log.e("position", "changeUser: sex" ); return true; ...
1
839df382cf66a75f17830957d05d179b
96140a83fcbd6e427dd3a31aad3103de
The list of resource IDs for the other Microsoft.NetworkCloud resources that have attached this network.
class GetExternalNetworkResult: def disabled_on_resources(self) -> Sequence[str]: return pulumi.get(self, "disabled_on_resources")
0
b02eafa490ad294e89a0ef6d793b227a
974a8d46a0bbeb97d390a4b25594847e
RegisterOpaque registers an opaque handler for a specific statement type.
if (target instanceof StatementHandler) { return Plugin.wrap(target, this); } else { return target; } }
0
b96f4fd62b35ea5a1690b0ddbf61e74d
505371ed3a16c89a2b8d73d6b06728ab
Make a ref point at another ref.
{ this->x += refA.x; this->y += refA.y; this->z += refA.z; this->w += refA.w; }
0
4e831d6bf15dd4ed45125a96ec09eaab
724bd66111dbf0d9e2e99bf633267629
Tests the <see cref="ICollection.CopyTo"/> method of the <see cref="IDictionary{TKey,TValue}.Keys"/> collection passing a one-dimensional destination array with a lower bound other than zero.
namespace GriffinPlus.Lib.Collections public abstract partial class GenericDictionaryTests_Base<TKey, TValue> [Theory] [MemberData(nameof(CopyTo_TestData_IndexOutOfBounds))] public void ValueCollection_ICollectionT_CopyTo_IndexOutOfRange(int count, int index) { IDictionary<TKey, TValue> data = GetTestData(cou...
0
f758ca7a0920681719a90fb66f24c798
f2dd0b5053f44d28df0b50c25d48f62d
Returns the number of bits left on the quota
class GUI: def progress_get_quota(self): return self.quota
0
21b9230736e57ebfca8ee25bf80690c7
441388792c824a40f99c343a7f2ff038
Reset light color to original light color
{ lightSprite = GetComponentInChildren<SpriteRenderer>(); originalColor = lightSprite.color; highlightColor = originalColor; highlightColor.a = 255; }
0
b3a293aa37c9e810f54990850591307c
0934ca8c440f199c1150b2bc29243b93
Tested ranges differ in both rows and columns
func TestUnit16RangesTwoValues(t *testing.T) { assertionNoErrTest("22,80", [][]uint16{{22}, {80}}, t) }
0
f9594787a1fa0f2f2e27175feddecec0
76a2c4468221870d071eb4d8c0bdfccb
Set callback function of WS on_message event
class MQTTWrapper: def setCallback(f): self.client.set_callback(_f)
0
47c7b608a89c8ca6099f365d34461f1b
42c27ca0e0a7fd747575e2de6bdf005d
checks every entity for collision with every entity in a given container, calling the given callback with the each entity as the arguments - note that this function assumes both containers only have entities with a valid _rect property
public class CollisionProcess private static void processBoundings(Collidable c1, Collidable c2, CollisionCallBack callBack) { boolean exitLoop = false; for (Bounding b1 : c1.getBoundings()) { for (Bounding b2 : c2.getBoundings()) { if (CollisionDetect.detect(b1, b2))...
0
acc33b2ae80330b4d701a6ba355de47a
843ee850cb1cd2d5ef9e1198bf1f9dc3
get array of all taxonomies with categories.
class App public function getTaxonomies() { return $this->getTaxonomy(); }
0
a10ee7b4fc73bb5e6cbc9dcd2acd547a
ae08da4bda8b4c3fe14b0bf08cfb231f
设置RadioButton文字颜色
public class HomeActivity extends SDKBaseActivity implements RadioGroup.OnCheckedChangeListener{ private void changeTextColor(RadioButton radioButton) { for (RadioButton element : radioButtons) { if (radioButton == element) { element.setTextColor(getResources().getColor(R.color.red))...
1
01e9d0041887a8d7dbcaa35f91da9ec3
d5000697febd7d15c1c7e5a9ceda8602
Convert binary UUIDs to text
switch (uuid->len) { case ESP_UUID_LEN_16: return MP_OBJ_NEW_SMALL_INT(uuid->uuid.uuid16); case ESP_UUID_LEN_128: return mp_bt_format_uuid_str(uuid->uuid.uuid128); default: return mp_const_none; } }
1
abae0a005115d52a9699b83b9589591d
ce1bf6725586dd38820a2dfec7a74cc5
Convert a list of results into an ordered dictionary.
def organize_results(result_dicts_list, config_fn): metric_id = config_fn.get_metric_fn_id()[1] organized_results = [] for results_list in result_dicts_list: for result_dict in results_list: dict_ = {} for key, value in result_dict.items(): dict_[key] = value ...
0
461879af0e2db66572210ba3d67d3772
dee5246d9a5057bd550bce1a23bc401c
Return the {@link NlComponent} matching the id of the <code><Constraint></code> tag.
class ConstraintEditorDialog extends Dialog implements IValidationStateListener public String getConstraint();
0
c38e88191a703e3d9097d7b5e7c85ac0
ed80e96ffe279d04ad1ced0c2b8102ff
Check is user turn on CardDAV synchronisation for entities(accounts, contacts or company etc.),
return ($foldertype == SYNC_FOLDER_TYPE_INBOX || $foldertype == SYNC_FOLDER_TYPE_DRAFTS || $foldertype == SYNC_FOLDER_TYPE_WASTEBASKET || $foldertype == SYNC_FOLDER_TYPE_SENTMAIL || $foldertype == SYNC_FOLDER_TYPE_OUTBOX || $foldertype == SYNC_FOLDER_TYPE_TASK || $foldertype == SYNC_FOLDER_TYPE_...
0
34f500031a10561913b2361967631f8b
e179bcad6702466bb304219657d54878
Returns true if the las file is of wrapped variant and false otherwise
public boolean isLof() { return lofType != null; }
0
20f05b7c295c7fae9b643fbb0eb6362a
30e7b031060fa8824eaf13cb69457af7
相应ajax的请求,发送json数据
function Ajax(url, data, result) { $.ajax({ url:url, data:data, type:"post", async:false, dataType:"json", success:function(data) { result(data); } }); }
1
38bfdd52bffa90bfeeb11ed72f3817d8
b363a8ead40e1a9570668266a47d5b47
sorts the dictionary using selection sort
def selection(alist): for fillsort in range(len(alist)-1,0,-1): maxpos=0 for location in range(1,fillsort+1): if alist[location]>alist[maxpos]: maxpos=location temp=alist[fillsort] alist[fillsort]=alist[maxpos] alist[maxpos]=temp
0
6c45dc356e5690ebcfc01df8c99ab224
185d31cfc23b51492f13a917c5700fec
导出系统配置数据
public String exportCustomSystem() throws Exception{ HttpServletResponse response = Struts2Utils.getResponse(); response.reset(); response.setCharacterEncoding("utf-8"); response.setContentType("application/x-download"); response.addHeader("Content-Disposition", "attachment;filename="+URLEncoder.encode("cust...
1
07e22fcfa85b1b295df452d83f678fdf
e3026122ef93c5d304cc1cdf3fd2fad6
Creates a ConfigSpace.ConfigurationSpace containing all fidelity parameters for the XGBoost Benchmark
seed = seed if seed is not None else np.random.randint(1, 100000) fidel_space = CS.ConfigurationSpace(seed=seed) fidel_space.add_hyperparameters([ CS.Constant("constant_fidelity", 1.0), ]) return fidel_space
0
d8d4fcbe298d04443bd5afbc77b0e5c1
05f62d57179b840157966e759aaa88fe
Set a custom {@link AmqpHeaderMapper} for mapping request and reply headers. Defaults to {@link DefaultAmqpHeaderMapper#outboundMapper()}.
public MessageComposer<D> setContextMapper(ContextMapper<D> contextMapper);
0
ef039a8d9d41a3f54ba0bfda4791daa3
cdedd8a594cf84ad3b9a832b4fb91213
function will prepare K, Q, V and M for attention layer.
len_question = len(question_tokens) filter_start = len_question - 4 filter_end = len_question - 1 find_end = filter_start - 1 find_start = 2 find_attention_vector = convert_start_end_to_attention_vector(len_question, find_start, find_end) filter_attention_vector = convert_start_end_t...
0
a7b8ae58d44ee0a8df1050346cf96beb
094985f6281b219a182ef891a241b060
Calls ``BeginTransaction`` on Datastore.
@javax.annotation.Generated( value = "by gRPC proto compiler (version 1.0.3)", comments = "Source: google/datastore/v1beta3/datastore.proto") public class DatastoreGrpc public static final class DatastoreStub extends io.grpc.stub.AbstractStub<DatastoreStub> public void beginTransaction(com.google.datastore.v1...
1
c1eb84aa573b32adce0032c5f763c785
d611d982a4435a2254e1cae90ecf38dc
释放链表和图像等占据的内存
void freeImage(AccurateImage *image){ free(image->data); free(image); }
1
b1931841085d913c48a9be614772ce25
76a707040c2f5f21a7325f72d5288cd9
Highlights the menu.
const index = this.highlightedItem ? this.menuItems.indexOf(this.highlightedItem) : -1; this.highlightHelper(index, 1); }
1
e4b72ca118700f1918dd6e836ce145bb
be1fa14cc2925de42ae4b1d8a959a357
Verifica daca userul cu tokenul tokenString este sau nu admin
public IActionResult IsAdmin([FromQuery] string username, [FromQuery] string password) { User user = new User { User_Name = username, Password = password }; Boolean IsAdmin; try { IsAd...
0
f0e365fdac63693e22c763e57a8f4e93
7ea49a66577bf800c2aa9da327f6ea6f
清除指定员工的所有授予的角色
namespace RuPengWang.BLL public partial class AdminUserRolesBLL public void ClearUserRole(long userId) { dal.ClearUserRole(userId); }
1
a25207f1613af5a8cf8d774b3388b01d
b4ba15becf731d1c68a632f1fbd85efd
每次被调用都新开事务,原有事务在新事物执行期间挂起(这个情况的使用是有可能出现死锁的,所以需要慎用)
export class TransactionAdvice{ async before(){ let tr:Transaction = await TransactionManager.get(true); if(!tr.connection){ tr.connection = await getConnection(); } tr.trIds.push(tr.id); if(tr.isBegin){ return; } tr.isBegin = true; ...
0
1c53ca5b323b5a01e1aef180bd52ab6e
85740da6655a102de9120214e9c940d1
skip next instruction if Vx = Vy
void Chip8::SE_VxByte(const uint16_t& op_code) { if (V[(op_code & 0x0F00) >> 8] == (op_code & 0x00FF)) pc += 4; else pc += 2; }
0
599ee667bc97e918fa585a38496add19
f43df8b1360636e55a5ad1f98e188063
Count the number of matches and filter by criteria
public class GrepCommand extends AbstractCommand private int matchCount(LineNumberReader reader) throws IOException { String line; int ret = 0; while ((ret < maxCount) && ((line = reader.readLine()) != null)) { if (((match(line) != null) ^ inverse)) { ret++; ...
1
29618a2a5adb0e72556f93d24bb3ddf3
7e01c76fca44817c6d9e4725ea6dbb53
读取子文件夹中的数据
@Path("readfolder/{path}/{readChild}") public String xtRead(@PathParam("path") String path, @PathParam("readChild")boolean readChild) throws Exception { path = URLDecoder.decode(path); log.debug("读取文件夹:" + path + "|" + readChild); try { return fileServer.read(path, readChild).toString(); } catch (Except...
1
c3e5ab0ea946aaee022514dae92df9aa
80abd04c662e9f47c6bdf52e74ec256d
Tests the downloadAction() method.
class Core_UploadDownloadControllerTest extends ControllerTestCase public function testDownloadAction() { $this->setupDatabase(array('default')); $usersFile = $this->loadData('User', 'default'); $userDao = $this->User->load($usersFile[0]->getKey()); $filename = 'search.png'; ...
1
246afcbfb7e76698b3bcc632ecb0665c
1f232ef4d9edd7dd1f41258ee81dfed7
Check if caster exists.
{ if (!serializablePlayer) serializablePlayer = caster.GetComponent<SerializablePlayer>(); if (!playerEnterExit) playerEnterExit = caster.GetComponent<PlayerEnterExit>(); if (!serializablePlayer || !playerEnterExit) { ...
0
91c317ae45b2407af5a85ab901d4350d
d7b78cba646eb3257733af19fb16f4e9
Compute the value of global GV, which is a symbolic value. Inputs: - Mem (controlling type variable): Any type that can be stored in memory - GV: A global value. Outputs: - a: Value loaded
w = aligned_word_addr(addr) v = mem_fetch(w) raise GMPForth::MemoryUninitializedError if v.nil? v end
0
d274bf9ccbe80180597233b397cfe4c1
56fbde9aaf42853034d0ee1d6b6b8bda
删除超出限制的节点
{ $node = $this->getNode($node); foreach (self::$tree as $k_b => $v_b) { if ($v_b['l_key'] >= $node->getLkey() AND $v_b['r_key'] <= $node->getRkey() AND $v_b['level'] >= $node->getLevel()) { unset(self::$tree[$k_b]); } } foreach (self::$tree as...
1
045272b882502f0ebe380ee8512ed1b1
1ce09333d97ff41d0e0e07e75bf46338
Function to initialise the node and subscribe to the keyboard topic
rospy.on_shutdown(self.shutdown) rospy.init_node("command_control") rospy.loginfo("Done initializing pocketsphinx") self.goal=MoveBaseGoal() self.msg=Odometry() rospy.Subscriber("grammar_data", String, self.handle_output) rospy.spin()
0
cbc2759caa4c32bae25ed4dfb10abe3d
cc59c94300fcbaabb3eed0255672eedd
Obtains an event for the component-wise pose error calculator.
class ComponentWisePoseErrorCalculator(object): def pose_2_cb(self, msg): self.pose_2 = msg
0
00a57b3e0433f284b64ee04c649e2ac2
2684e974df5581797d572bc93f6784de
Add a todo via the API and then adds it to the page. Displays an alert if there is an error in the request.
class TodoApp addTodo(){ return Router.addTodo({}) .then(() => { this.getTodos(); }); }
0
c6b2a391588f516aa82af05ae5e34281
77cd95240ecb59559843e58de972e6d9
Gets the facility structure ddl data.
namespace SuppliesDotCom.Bal.BusinessAccess public class FacilityStructureBal : BaseBal public List<FacilityStructureCustomModel> GetFacilityStructureParent(int facilityStructureId, string facilityid) { var _facilityStructureId = facilityStructureId; switch (facilityStructureId) ...
1
a47e9e322852530452b83c826dd2375e
919aee8b2748b2a9bc07559cef7fd74b
Provides the format used to save and load keybinding resources.
namespace EditorSettingsTestUtils static void ExportKeybindings(const FString& TargetFilename) { FInputBindingManager::Get().SaveInputBindings(); GConfig->Flush(false, GEditorKeyBindingsIni); IFileManager::Get().Copy(*TargetFilename, *GEditorKeyBindingsIni); }
0
1d51d8d7636e0934706f7b69534ee162
28315ccb7488f5f0bfc98f486109234a
(non-Javadoc) 根据服务员id 查询服务员
List<Map> getWaiter(Map map)throws CoronException;
0
3cc853b3e4890c34de37cb56aae71686
a1a4b17bfd2296ea44f5cd00585d6e61
Scales features to have a norm of 1
def scale_features(X): m, n = X.shape s = X.sum(axis=0) mu = s/float(m) Y = X - mu ymax = np.max(Y, axis=0) ymin = np.min(Y, axis=0) ydiff = ymax - ymin Y = Y/ydiff return Y
0
15fe356f025480c1932ad64505c0a0b4
be643079ff5b8dced1bfdc365ce42dd0
Chequea si el borrado funciona bien si se borra la unica clave del diccionario
L=LinkedList() insert(L,"hola",0) insert(L,"soy",1) insert(L,"harpo",2) insert(L,"vos?",3) delete(L,"hola") self.assertEqual([L.head.value, L.head.nextNode.value, L.head.nextNode.nextNode.value, ],["soy","harpo","vos...
0
bb2d85d28449b4a3192c260d6645d12f
9fd25e7abd1fd31c8e0d2125cb7bd9fa
Devuelve un string con el número en el formato de número predeterminado.
namespace Framework.Funciones public class Numeros public static String NumeroDecimalEnString(Decimal numero) { return numero.ToString("n", Cultura.ObtenerCultura()); }
1
82371b10cd722c1c85b0287668c79434
c9af80b4e9828a6f67b125365364cd37
Get an ArrayList with all search types from input.
class NearbyPlacesViewModel( private val placesRepository: PlacesRepository, private val tripRepository: TripRepository, private val userRepository: UserRepository, private val mapRepository: MapRepository ) : ViewModel() fun getPlacesSearchedTypes() = placesRepository.getSearchedTypes()
1
31da0079527963dd1a569a448c34f1e4
e44b34d238e1df528d886a2fb8ed2dcd
Use this to restore your parameters from this memory block, whose contents will have been created by the getStateInformation() call.
void ExtractorProcessor::getStateInformation(MemoryBlock& destData) { }
0
9fd4e661b91387cc3fbde66e5a921c4a
113de598ce0b3ae145144907a5fefd15
绑定详情链接的点击事件
bindViewDetail () { this.setData({ isMoreinfoActive: !this.data.isMoreinfoActive }) }
0
f91bce879d829db29966c5f8b75aee6f
898d129f5fb21c78afa2210935e16da5
Осуществляет поиск группы, к которой относится сотрудник, по Id группы.
{ EmployeeType res = employeeTypesTable.GetItem(employeeTypeId); if (res == null) throw new LogicalException("Группа сотрудников не найдена в базе"); return res; }
1
9a05dc47591af47689dcd3d9aefe65d9
64796d50b526c9b0a626811e48a72ec4
Returns a filtered list of MenuLinkGroup rows.
class MenuLink extends Base public function findActive($parameters = []) { return $this->get('findActive', $parameters); }
0
6a90c327d1f6b53a6d8970a925033a5d
9c4497a3f177b44ba9cb92794103b3d0
Get the names and other names which each license has.
namespace DAL.Interface public Task<List<LicenseName>> GetLicenseNames(int regattaId, int userId);
0
a2040c684a0910f1d0aa5ec5ef49a712
3529272c974f5d030387a40030cf9ad3
The method responsible for TCP reassembly on live traffic
unsigned int mss_now, int reinject) { struct tcp_sock *tp = tcp_sk(sk); struct sk_buff *buff; int nsize, old_factor; int nlen; u8 flags; int dsslen = MPTCP_SUB_LEN_DSS_ALIGN + MPTCP_SUB_LEN_ACK_ALIGN + MPTCP_SUB_LEN_SEQ_ALIGN; char *dss[dsslen]; if (WARN_ON(len > skb->len)) return -EINVAL; if (!i...
0
430881666057e034160adb2b52e6919a
55f7f9f9a747f6ab1bd0f1adf8fc344c
Actualiza el numero y tipo de documento de un cliente.
{ $person = Person::where('typeDoc', '=', $request['typeDoc']) ->where('numberDoc', '=', $request['numberDoc'])->first(); $data = Array ( "typeDoc" => $request['typeDoc'], 'numberDoc' => $request['numberDoc'], ); $doc = Array ( 0 =>...
0
0bebf00a0c7c964ed59c8167f425d3a4
37419ab782ac4227462b778a9c9f75f0
Metoda nechá nastavit článku, zda byl přijmut nebo zamítnut. Poté zavolá přesměrování zpět na administraci tohoto článku.
if($this->modelArticles == null) { $this->modelArticles = new ArticlesModel(); } if($this->modelUser == null) { $this->modelUser = new UserModel(); } if($this->modelUser->isAdmin()) { $this->modelArticles->setAllowOrDeny($_POST['allow'], $_POST...
1
4602bf55ba5e11e69646660ab7c7cad1
5a8dc0f79eba37cae76c02d45953c290
Event to signal that a measurement is ready
{ if (result == I2C::RESULT_SUCCESS) { sensor_present_ = true; new_data_ = true; last_callback_ms_ = millis(); ready_to_ping_ = true; } }
1
71384952ffec6f3ef6288fb067e6e366
00acf543dfbff6b063251535ef225e35
default minphys routine for siop based controllers
SK_AC *pAC, SK_IOC IoC, unsigned int LogPortIndex, unsigned int StatIndex, SK_U32 NetIndex) { unsigned int PhysPortIndex; unsigned int PhysPortMax; SK_U64 Val = 0; if (pAC->Pnmi.DualNetActiveFlag == SK_TRUE) { PhysPortIndex = NetIndex; Val = GetPhysStatVal(pAC, IoC, PhysPortIndex, StatIndex); ...
0
b2e2e517fb050cc4e23b24dbe7558728
ba53b95ff7740acd7add57a5fddbe10e
从阿里云API接口获得最新省市区信息
@GET("Currency/getProvincesAndCitiesInfoList") Observable<ProvincesAndCityBean> getLocalData();
1
2b2edc94efd7a862a6758873417298cf
daba356c5f651f94119ddbfd5046b5ee
判读str是否为数值型的字符串,包括正负、整数、小数
boolean sign = true; int point_bef = Integer.MAX_VALUE; int point_aft = Integer.MAX_VALUE; return isNumeric(str, sign, point_bef, point_aft); }
1
4f956bfd591b5741d92f8aa5aadcc6be
f179d80400b274cd27c2056aa05da772
Sets the polygon out tangent.
public class ConstraintToConvexRegion extends ICPInequalityInput public void setPolygon() { convexPolygon.update(); }
0
842fb8fe629720d35e64b9295dd73b91
bf2b796ce009078e91a13319eaf137e3
add a click event to each table row to bring up more information
function addTableEventListeners() { var row = document.getElementById("inventory_table").rows; var timer = null; for (var i = 0; i < row.length; i++) { for (var j = 0; j < row[i].cells.length; j++) { row[i].cells[j].addEventListener('touchstart', function(e) { if (timer =...
0
a1357d4286de486bd4010f39cb1c7a7b
35ebd40e4e7e163c0b4f46337c79cff6
Get information for a render model. <h5>C Specification</h5> <p>The {@link #xrGetRenderModelPropertiesFB GetRenderModelPropertiesFB} function is defined as:</p> <pre><code> XrResult xrGetRenderModelPropertiesFB( XrSession session, XrPath path, XrRen...
public static boolean VRRenderModels_RenderModelHasComponent(@NativeType("char const *") ByteBuffer pchRenderModelName, @NativeType("char const *") ByteBuffer pchComponentName) { if (CHECKS) { checkNT1(pchRenderModelName); checkNT1(pchComponentName); } return nVRRende...
0
7e6f48917a92f3bcdffab479c45f5384
80a923e21a787a085fc2f6313b63244e
检测账号在条码中是否存在
function checkBarcodeExists(data) { if (data == null) { return false; } var is_Exists = false; $(itemSkuData).each(function () { if (data.barcode == this.barcode) { is_Exists = true; return false; } }); return is_Exists; }
0
7001d9005e8735bca04403a47c0d2895
0bf0b86e625059c1739958323d4b0030
Function to sort the letters of the string in ALPHABETICAL order
function alphabet_order(str){ return str.split('').sort().join(''); }
1
564ce17f8ed691252893f118e3dc1ada
858222ded9dc8291cf7b73da011ffacc
Gets a open stream to the trace logs.
export class MorganLoggerHelper private accessLogStream(): any { return this.rotatingFileStream(this.accessLogs.filename, { interval: this.accessLogs.rotationInterval, path: this.accessLogs.directory }); }
0
aeed542680916df035a4374f0c3dc762
fbed97390499e9949a9ec66796f5e8b1
浅复制 如果输入为null,返回一个空的集合
if(null != raw){ return raw; } return new ArrayList<T>(); }
1
549503f0509da665430e0603cfbeb67d
a6666a7a4b9c3811f8ca95f056aca205
Método encargado de devolver información sobre una materia
class materiaController extends Controller public function show($id) { }
1
84d2166e2e6fff9946817d10b5d6969a
ba55bffc79b8c65d06db80fcc9a7f757
Returns the MetaType information for the given bundle symbolic name
function M.infoForBundlePath(bundlePath, ...) end
0