query_id
string
corpus_id
string
query
string
code
string
label
int64
ebb5e73aa9eee9e0c70543ff61b4f43a
6d32eb92c7c4ca4814b8a564e6cdb508
Menu swipe disabled when it closes.
export class AppComponent implements OnInit ngOnInit() { this.menuCtrl.swipeGesture(false); }
1
dd372b8f5dafcbf09927e775c8c94285
cad9819df13187ecac24c6fd93f585ee
Test hour to degree conversion for a single value
def h2deg(hour): return (hour - 3) / 12 * 360
1
8d7b4ddaa907f252d0a16711f2a20d43
475557253334dc8f491f655f98d0819f
Sets the character ID of the video stream this frame belongs to.
@TargetApi(18) public class TextureMovieEncoder implements Runnable public void setTextureId(int id) { synchronized (mReadyFence) { if (!mReady) { return; } } mHandler.sendMessage(mHandler.obtainMessage(MSG_SET_TEXTURE_ID, id, 0, null)); }
0
dfdbd162a816c57e4870edb0cc4f8965
47ba28db886fb302323bd69384e795e3
Delete route tables in selected VCN by name prefix.
log = logger.create_logger() for _account, attribute in inventory.items(): for region in attribute['Regions']: for key, value in region.items(): region_name = key vpc = value['DefaultVpc'] if not value['NetworkInterfacesPresent'] and not value[...
0
1b691b5bcd2acec95335ac6465a6e4dc
89a2f755519c9f73ed82a40582d09aba
再生終了時にコールバックする関数の登録
void ebox::AudioPlayerForm::registerOnTrackEndedCallback(const ebox::AudioPlayerForm::func_audioplayertrack &cb) { m_callbackOnTrackEnded.emplace_back(cb); }
1
64d5cbd78a2ed6cb0ed087ca0d106357
4425adeaa7d642c78b4d09800aaf9e7f
4 second timer on answer screen
class KungKungDdaGamePresenter(view: KungKungDdaGameContract.View) : KungKungDdaGameContract.Presenter fun answerViewTimeSet() { view.answerGameView() Handler().postDelayed({ view.defaultGameView() }, 400) }
0
72ccef1f23c02e5bbbdd944dbdaa19cf
78e351791607a340e27680c3b4137e71
Take a pandas data frame, read from txt file, and make sure it fits expectations for these files. Flags files that deviate from expectations, and returns the adjusted df.
def _standardize_txt(csv_rootpath=os.path.join(config.settings.data_folder, 'gtfsfeed_text')): gtfsfiles_to_use = ['stops.txt', 'routes.txt', 'trips.txt', 'stop_times.txt', 'calendar.txt', 'agency.txt', 'calendar_dates.tx...
0
3ef7ee788b64496172d41f01184c118d
79b6607870847764de06824e81e289c3
PhoneGap is ready
function fIsPhonegap(){ return !!window.cordova; }
1
bd62bd77c7449c97430218963fbd7dcd
07aa282e23eb6ac0767ba79edd70aa81
An acquisition that minimises the expected minimum of the outputs. If used with a finite set of inputs on an infinite domain, this expectation will always be an upper bound on the true expected value of the function minimum. Since acquisitions are maximised, this returns -ve expected minimum.
class LogEI(AbstractAcquisitionFunction): def __init__(self, model: AbstractModel, par: float=0.0): super(LogEI, self).__init__(model) self.long_name = 'Expected Improvement' self.par = par self.eta = None
0
33a211b141adaae3e55e3c9c037c8ebc
12b0615e4b7e94833eb53c21e6c048c4
Insert a BTreeCell into a B-Tree The chidb_Btree_insert and chidb_Btree_insertNonFull functions are responsible for inserting new entries into a B-Tree, although chidb_Btree_insertNonFull is the one that actually does the insertion. chidb_Btree_insert, however, first checks if the root has to be split (a splitting oper...
{ BTreeNode *btn; int status = chidb_Btree_getNodeByPage(bt, npage, &btn); CHECK; BTreeNode *child_btn; npage_t child_num; int i; for (i = 0; i < btn->n_cells; ++i) { BTreeCell cell; status = chidb_Btree_getCell(btn, i, &cell); CHECK; if ((cell.key == btc->key) ...
1
176150f4627af9987ded640839897a17
0c7638437bf1067c901b96b885bb136e
Lấy hình trong folder chỉ định
class HinhanhRoomController extends Controller public function index($room_id) { $img = $this->imgr->where('room_id',$room_id)->get(); return view('admin::pages.imgroom.index')->with(compact('img','room_id')); }
0
bde733c5ad70337e8bf4c9f046333e22
45edef91e95d32a568a935f0f36e3001
Monta um array trocando as chaves numéricas das colunas pelos nomes de colunas em cada linha.
function sum_cols(array $data, string ...$colNames): array { $result = []; foreach ($colNames as $colName) { if (!in_array($colName, col_names($data))) { throw new Exception("A coluna $colName não é uma coluna válida."); } $result[$colName] = 0; foreach ($data as $lin...
0
cf1ff3942ba993234bfea8a84333a0e8
9589f8802c9155402d7ea6cb09b7fd36
Get post Method return full post data and number of comments for every post
{ $posts=Post::with(['user'=>function ($q){ $q->select('id','name'); }])->latest()->paginate(5); foreach ($posts as $post){ $post->numComments=$post->numComments(); } return response()->json($posts); }
1
b00419880fb0ce171264a98832633588
48eb60fa469b184e427248f0410f8cd5
根据proId和groupNo查询skuId
public SkuSetForProduct querySkuByProdId(String tenantId,String supplierId, String prodId);
0
1e1c4924cce51271c77fd4766a8dbb2d
856d620ccf0fe5c6f40663f70965028a
True if has "bagsTravelWith" element
boolean isSetBagsTravelWith();
1
7b17a1586daae4ad8049b79176f230bc
792b169adceb30fe4e80c1f0e4cfc6f1
Calls hold command of bakend for a selected job's id.
{ $request = $this->prepareHoldRequest($job, $until); $response = $this->client->sendRequest($request); $result = $this->parseResponse($response); $this->reloadAttributes($job); return ($result->getStatusCode() == 'successfull-ok'); }
1
b1cc4431094de7e9759574e1fdda6d6d
5fd0163643eda1587d2929f4fe37b1b7
Returns the list of manhattan distance between two corresponding points of two arrays
def manhattan_distance(x1, x2): return np.sum(np.abs(x1 - x2), axis=1)
1
47fc71b98105922936e82b73660d3366
159b97d8bf8ba890a9790118963c13f0
Compares two integers - use qsort to sort integers largest first
int cmp_integers (const void *e1, const void *e2) { int *n1, *n2; n1 = (int *) e1; n2 = (int *) e2; return *n1 - *n2; }
0
595a56684008dce921c239859a37a8da
8e1f47ff5a60286d1dced665309347e0
If psotivie, left is bigger than right, if it's negative right has more weight
if (lhs.processingTime/lhs.tardiWeight == rhs.processingTime/rhs.tardiWeight) return lhs.processingTime < rhs.processingTime; else return lhs.processingTime/lhs.tardiWeight < rhs.processingTime/rhs.tardiWeight; }
0
35a9509c4be2db95fa551803c70d64fb
69f8b798abdaf867248fa0c6b6b46765
Сворачивание программы в панель задач
namespace EPAM public partial class Form1 : Form private void Task_Main_Panel_Hide() { Task_Main_Panel.Visible = false; Task_Add_Panel_Hide(); Task_Data_Panel_Hide(); }
0
5977798aabd23ce78e5c5622183dcbc0
3f5de730c01ee9846d67c4cb0df52684
Fonction convertissant un automate non deterministe en un automate deterministe
if (automateADeterminiser != null && original != null){ int index= 0; while(index < original.etats.size() && !comparaisonEtat(original.etats.get(index).getNomEtat(), automateADeterminiser.etats.get(indice).getNomEtat())) { index++; } if (index == original.etats.size() && !comparaisonEtat(automateADet...
1
0561e496ab4d86707ad1460f3cacac60
7633b6a10c518319fadc1c1e9fc7278d
依分類名稱取得書本頁的連結
{ DBEnergy db = getDB0(); dynamic chk = null; string switchMode = string.Empty; if (actionName.StartsWith("Book")) switchMode = "B"; switch (switchMode) { case ("B"): chk = db.出版品主檔.Where(...
0
7da7401b609c33d734b7fd035796f3f6
6b6183913736873d6088352123cf58a2
Test count of ball generated.
class DatastoreMongoTestCase(DatastoreMongoTestCaseBase): def testCount(self): class Balloon(db.Model): color = db.StringProperty() Balloon(color='Red').put() self.assertEqual(1, Balloon.all().count()) Balloon(color='Blue').put() self.assertEqual(2, Balloon.all().coun...
1
20bff5789e7fa00cc8244dab04abd898
d029b5e6ce7d3717e5810d351fbe34dc
根据市id,查询市名
public abstract class B2b2cbackAction extends ActionSupport implements ModelDriven{ public String getCityNameByStr(String cityid) { City city=Server.getInstance().getHotelService().findCity(Long.parseLong(cityid)); return city != null && city.getName()!=null&& !"".equals(city.getName()) ? city.getName() : ""; ...
1
64fcc314fff10529b36cdc5131691954
f16039e059f3c636dcb96e4b8c26f911
根据路径和节点名称,获取XML文件中所有指定节点
{ XmlDocument xml = new XmlDocument(); xml.Load(Server.MapPath(xmlPath)); XmlNodeList nodeList = xml.GetElementsByTagName(tagName); if (nodeList != null && nodeList.Count != 0) { return nodeList[0]; } else ...
0
e10790f5f2be4c16e12c3921df36628c
0c68060c50deec9768f664b0e91d6c9c
Get weak power inputs to a location (the kind that will power a wire). This also seems to be the kind of power that turns off a torch, mysteriously. ???
double distance = 1; if (source_location.getWorld() != loc.getWorld()) { int x_distance = source_location.getBlockX() - loc.getBlockX(); int y_distance = source_location.getBlockY() - loc.getBlockY(); int z_distance = source_location.getBlockZ() - loc.getBlockZ(); distance = 256 + Math.sqrt(x_distance *...
0
198755ccba4ac4daca97e3ff9966187f
3dec5da38cd97120bf4d1bc918f72cd4
查询单词 (使用数据库)
public class DatabaseAdapter public Cursor getWord(String word) { Cursor mCursor = dbSQL.query(true, DATABASE_TABLE_USER_WORDS, new String[] {KEY_WORD}, KEY_WORD + "=?", new String[]{word}, null, null, null, null); if (mCursor != null) { ...
1
0ef081990ffc4f3504a718eb113d9b46
2b2857eeb89420b0919a5e238157e3fb
Compute an array of all MethodImpls that pertain to overriding virtual (non-interface methods) on this type. May be expensive.
@Finished("2014/07/12") public abstract class AbstractDeclaredType extends AbstractType implements IDeclaredType @Override public Collection<IMethod> getAllVisibleMethods() { final List<IDeclaredType> supertypes = Lists.newLinkedList(); supertypes.addAll(this.getAllSuperclasses()...
0
cb411d49e0a32e407d34c2921d9f66b6
3315625f92e9a1c7c31452bc33fc998a
执行修改PDF模版表单域
PdfReader reader; FileOutputStream out; ByteArrayOutputStream bos; PdfStamper stamper; BaseFont bf; try { out = new FileOutputStream(newPDFPath); reader = new PdfReader(templatePath); bos = new ByteArrayOutputStream(); stamp...
1
93a0c4226f4b7284f2c3d4fd0e443f21
c969b0afc4090fd9df5214893e1681cd
返回接收到该请求的时间
class Request public function time(){ return $this->server['REQUEST_TIME']; }
1
c82eeafb6ae51b3d5c6ae72b6f2a5de9
fe39a13ff784c22af73fc23a429076a4
Install a given page number in our bitmap (Actually, our hashtable).
{ DBJ_TRACE_ENTRY(); if (pageIndex >= DBJ_BM_NUM_PAGES) { DBJ_SET_ERROR(DBJ_PARAMETER_FAIL); goto cleanup; } #if !defined(DBJ_OPTIMIZE) for (Uint16 entry = hashArray[EMPTY_LIST_HEAD].next; entry != EMPTY_LIST_HEAD; entry = hashArray[entry].next) { if (entry == pageIndex || (entry >= FIRST_BUCKET ...
1
0ec31763ae62f38de99fe66dc1972740
1db2761c7de2c2c0c7f044e831116b80
Detect when scripts are reloaded and relink playmode detection
[InitializeOnLoad] public class ES3Postprocessor : UnityEditor.AssetModificationProcessor public static void PlaymodeStateChanged() { if (!EditorApplication.isPlaying) AddGameObjectsAndComponentsToManager(); }
0
35774209901ce11f855be4e52fe503ed
a86b4a6da2c738a744f9aee0ce271135
旧インターフェイスとの互換性テスト
func TestInterfaces(t *testing.T) { var _ assert.TestingT = sktest.TestingT(nil) var _ sktest.TestingT = (*testing.T)(nil) var _ sktest.TestingT = (*testing.B)(nil) }
1
7da3fd176de8834dc408f0ac284908d6
d7e1af9d6f8f0f038665203d7a21df2b
Método que sorteia o pokemón na lista de pokemóns
public class LutaPokemon extends Scene public void setPokemon2(int num){ switch (num) { case 0: this.setPokemonAdversaio(Pokemons.ARCANINE); this.pokemonInimigo = Pokemons.ARCANINE; break; case 1: this.setPokemonAdversaio(P...
0
eeb3a96d879ae406cf6362ff727eb4e4
90f0cf756540a6ad8e9ca60a72d8e4a9
# 절대값을 구해주는 사용자 정의 함수
if (abs(x) >= t){ x <- sign(x) * t } else { x <- x } return(x) }
0
2e9ac04f63d9df5a8aa6333010e6ea4f
2ff63f5d36f788e2e41507292d2095b5
Merges the points which stand on the one line
def merge(line): if (line == []): return line new_line = [] point_a = finder(line) while (True): if (point_a == -1): break else: point_b = finder(line[point_a + 1:]) if (point_b == -1): new_line.append(line[point_a]); ...
1
f133236d034688f860402c05bf4cc8a2
db01cb7ed62f083bc755c66af2bbd455
Parse an incoming message in the form "Friend +18005551212
try: username, jid, role = msg.strip().split(";") self.name = username self.jid = jid self.role = role return True except ValueError: return
0
063ecf413f643f1400925ad2b6302ee4
d746255a8d43a2c509121ea0c8626c34
Returns whether drop functionality is enabled or not
public class mxGraph extends mxEventSource public boolean isDropEnabled() { return dropEnabled; }
1
53bcb59e6ca102436434f01dbb41f896
adc120b0b5eb005e30aef90d6a053e0f
Get not after validity.
namespace Microsoft.Azure.Batch.SoftwareEntitlement public class JwtPropertyProvider : ITokenPropertyProvider public Result<DateTimeOffset, ErrorSet> NotAfter() => new DateTimeOffset(_jwt.ValidTo);
1
d5b07dcce3e1d15d1e7c940838fd974b
23cff1317c34f80457cd60421c2c20d4
Write this public key to 'filename
if (0 != ReadLoud(filename, pub_key, sizeof(*pub_key))) { return -1; } return 0; }
0
b466d6eb6ddf2f3a3bce66bcd41c998c
3085b67bfeafc11561225bf6930b1a9f
删除最后一个元素,返回删除元素
public class LinkList<E> public E remove() { return delete(size-1); }
1
7b2df2a44cd386e80b6ec08d814d0f1f
9b8c0cb94aa8e462eed3078352035fdb
Pairwise swap of elements in the linked list by changing the links
void pairWiseSwap(struct node **head) { if(*head==NULL && (*head)->next==NULL) return; struct node *dummy,*first,*second; dummy = (struct node *)malloc(sizeof(struct node)); dummy ->next = *head; *head = dummy; while(dummy->next!=NULL && dummy->next->next!=NULL) { first = dummy->next; second = dummy->next->n...
1
b899f3fb6024905b3d3d64ea039f7837
e909ab912393cb3debef11fbd63849ed
Ajout un noeud dans le réseau
{ Element *elem; elem = createElement(x, y, valuation, G->numberNode); G->tab[G->numberNode] = elem; G->numberNode++; }
1
6e13f1f979b8b4b26097cee108c52ba0
7bd66bad0966acb05574557f533f9c98
@brief Data collecting method. Gets instance of tagging system.
public class ObjectTagging private void getObjectTagging() { }
0
b69e0afbd63e3b4adbe467d52397b5ec
ff3429fd4eb0ceafd77b5b6a687a4f6e
Test to ensure data can be generated for custom schemas
list_of_uuids = [] initial_date_updated = self.customer.date_updated self.assertIsNotNone(initial_date_updated) with patch.object(ProviderAccessor, "cost_usage_source_ready", returns=True): serializer = ProviderSerializer( data=self.generic_providers[Provider....
0
e01d6be6d2f0bdfeac99cf3f21e90614
b5a56d31d1f2cd6c845c51eed1bc986d
retirando Símbolos inúteis
_palavra = ""; for char in palavra: if (char not in ".,:;!#)(}{]['?^"): _palavra += char; return _palavra;
1
8bc0502fd092ba51e574406f76166fa7
94f16d22bebfbe95d718ed131b8f2d7d
Test GET provjob is ok.
prov_job() resp.status = falcon.HTTP_202 app_logger.info('run prov job instead of waiting for scheduled run.')
0
4257ee9a650e46f43f5aea86c41821d5
3622bf0c3811374a36633563d3c49069
Do clustering of data on specified columns.
columnsToCluster = self._coordCols db = DBSCAN(min_samples=self._minSamples, eps=self._eps) db.fit(df[columnsToCluster]) clusterLabels = pd.Series(db.labels_, name='cluster_id') procdf = pd.concat([df, clusterLabels], axis=1) return procdf
1
027365f7bae93c08fab3a8fbab912053
757301314f04b9f929ae2453414eed28
To get Output Stream of the available clients from the hash table
public class Server class HandleAClient implements Runnable public ObjectOutputStream getOutputToClient() { return outputToClient; }
0
63520abed89276150a629f4357839a91
94b62792868204fdd644ce975f3bad27
Check to see if Certificate property is set
namespace Amazon.IdentityManagement.Model public class UploadServerCertificateRequest : AmazonWebServiceRequest internal bool IsSetCertificateBody() { return this.certificateBody != null; }
1
882db53227162c3cf60a06e228e2d039
85843d97c240b6ce953fae90cc117975
刷新主播员信息
var bankerlist = brnn_Data.getBankerList(true); for (var i = 0; i < this.bankerHeads.length; i++) { if (!bankerlist[i]) { this.bankerHeads[i].parent.parent.getChildByName('bling').active = false; this.bankerHeads[i].getComponent(cc.Sprite).spriteFrame = null; ...
1
2bb7737923221d93eef4d358c0ed7313
17e8411d80ffcefc653492e72cd6247c
When the display box is visible, it should probably activate the cropping (to follow the "what you see is what you get" pattern).
public class ShapewaysPanel : MonoBehaviour void OnDisplay() { gameObject.SetActive(true); }
0
680746b714c93a3e6ea349004ebbf2d5
e09670b529186f3396efb1a950f99f09
根据登陆天数刷新角色奖励
void RoleLoginDaysAwardMgr::ackRoleAwardState() { ack_role_award_state ack; ack.errorcode = CE_OK; ack.canget.clear(); ack.alreadyget.clear(); ack.days = 0; string cangets = ""; string havegets = ""; int days = 0; int i = 0; RoleAwardHash::iterator itr = mRoleAwardHash.begin(); ...
1
5eaf3f2870cfaf2835c5a3496c765319
454e81c46e5607623ec0a578df69eb8f
This method writes either a greyscale (comp=1) or rgb (comp=3) SGI RGB image file
void im_color::WriteJpg(char *filename) { FILE *fd = fopen(filename, "wb"); if (fd == NULL) printf("Error: Could not open file '%s'\n", filename); im_color in(*this); in.Greymap(0, 255); unsigned char *buffer = new unsigned char[R.NumPixels * 3]; for (int i = 0; i < R.NumPixels; i++) { ...
0
0682ac7205817bd93a9c9df5427cbd19
1c8052f51de9b3c3e8abec268806c0bc
do anything that needs to be done on scene load completion.
[CreateAssetMenu(menuName = "Manager/SceneReferences")] public class SceneReferences : GameService void OnEnable() { SceneManager.sceneLoaded += OnSceneFinishedLoading; }
1
d30922fea9b976ef79c9ede1aa9d160c
6ab7f20fa27da0887b8267fd1e4622d3
Return True if the blob with the given instance/digest exists.
class RegistryDataInterface(object): def get_cached_repo_blob(self, model_cache, namespace_name, repo_name, blob_digest):
0
7bc49c28162e735e0f98fb09ed2cb1a6
a4f1f5afde9b346659bfb78b918310da
Adapt the color of a swing Component
SwingUtilities.invokeLater(new Runnable() { @Override public void run() { pane.setBackground(color); } }); }
1
c7745f99f1414fd34897ef34159f10ee
d05d0bbf6b9ccd36a5f8a9481f3519d9
take datetime-object and return isoformat-string YYYY-MM-DD
def datetime_toString(dt): return dt.strftime("%Y-%m-%d")
1
2b263a1f51580a4a5109e16b412cc800
16d15776fd3ceb4d81227df2164afe4a
Locally Linear Embedding
X, lengths = self._reshape_local_features(X) starts = np.cumsum([0] + lengths).astype(int) ends = np.cumsum(lengths).astype(int) centroids = self._clusterer.cluster_centers_ distances = pairwise_distances(X, centroids) K = self.neighbors neighbors = np.argpartitio...
1
88919158d6afbd282f9cc1ef01f969ce
a68a50070b2414f47263bb0ce8d81634
將pop與childs放在一塊來比較適應度,留下適應度好的,並將適應度差的淘汰
sortedParent = sorted([[ind, Task_1.fitness_function(val, items), val] for ind, val in enumerate(parents)], key=lambda x: x[1], reverse=True) sortedChild = sorted([[ind, Task_1.fitness_function(val, items), val] for ind, val in enumerate(children)], key=lambda x: x[1], reverse=True) for i in range(int((len(...
1
5ba4b9d53680ade7ed8a638a561997b2
f6a454b587f726529841154a4c5812f9
Executes a SPARQL query with scalar result.
namespace Teva.Common.Data.Gremlin ResultDataType ExecuteScalar<ResultDataType>(string Script, Dictionary<string, object> Bindings = null, Guid? Session = null);
0
91c9a8d6e2d26b924c5661a2a886d03f
baffd1a1fda739631c20ac6758315cab
Create a full simulation with particle neutrinos.
def run_full_inj(n_flares_to_make, rng, band, binsize, max_flares_pervisit, trange, resolution, detection_threshold, quiescent_mag, distance): all_n_det = np.asarray([0] * n_flares_to_make) all_n_det_wrongenergy = np.asarray([0] * n_flares_to_make) all_n_miss = np.asarray([0] * n_flares_to_make) all_n_f...
0
1adc02c9f3a71fde9e951b97b34e696b
a68aeb5716012c6cd9a25de73ccad659
Getter da cor primária ativa.
String getActiveColor();
1
4fb9bfbe861a4a51a704018ff7d4f381
ff972010404ab69d73a89a6eeccb773d
从中序和后续重建二叉树
function rebuild(pre, mid) { if (pre.length == 0) return null if (pre.length == 1) return new Node(pre[0]) let root = pre[0] let index = mid.indexOf(root) let preLeft = pre.slice(1, index + 1) let preRight = pre.slice(index + 1) let midLeft = mid.slice(0, index) let midRight = mid.slice(index + 1) let...
0
9a5ee0a882b526ce230dc936d573f00c
4ef8ca2816aa2e3f097bc55215789544
if the Send is called from this thread, execute it directly.
void Reactor::RunInternally(const Task& task) { if (IsInThread()) task(); else RunInQueue(task); }
1
97aaf4c478998f3ffd0040481ffea4c2
7fb325d9c092d269d241d48a8e2bb933
添加频道导航-字段可选
global $CNOA_DB; $dblist = $CNOA_DB->db_select(array('id', 'name'), $this->table_select_item, "WHERE `mid`={$mid} AND `fieldId`={$fieldId} AND `status`=1 AND `type`=2"); !is_array($dblist) && $dblist=array(); $existItems = array(); foreach ($dblist as $v){ $existItems[$v['id']] = $v['name']; } $items =...
1
43ca5ed4b0e56a4a026338192c149193
88017066e09ce4bf4a506b7074943ff7
Deshabilita el menú Imprimir de acuerdo a los permisos del usuario
{ btnFacturacion.Enabled = false; btnProveedores.Enabled = false; btnCotizacion.Enabled = false; btnDevolucionVentas.Enabled = false; btnClientes.Enabled = false; btnInventario.Enabled = false; btnOrden.Enabled = false; ...
0
8da3793fad4736530a243bcb8a4191c5
82b74e6a15e2694bbcd777bdce486186
Translate matrix along vector
vec3 *vt = new vec3[n]; for (uint i = 0; i < n; i++) vt[i] = m * v[i]; return vt; }
0
2db22803ddf6dd1efa85928785700060
7504a5f0c3c166a704d63b120869cc47
anonymous(익명) 클래스는 기존에 존재하는 클래스나 인터페이스 등을 일회적으로 구현하거나 오버라이딩할 필요가 있을 때 쓰인다.
class AbsClassChild1 extends AbsClass1{ @Override void instanceMethod() { System.out.println("필요없다면 오버라이딩 하지 않아도 상관없다"); }
0
2c79ec85d06e0e08a5ca1e8e9c558de6
4492bdd6b756654fe62486aabe9acb4b
微信扫码支付模式一异步通知
class SiteController extends Controller public function actionNotify(){ $options = Yii::$app->params['wechat']; $app = new Application($options); $response = $app->payment->handleNotify(function($notify, $successful){ $order = Order::findOne(['trade_no'=>$notify->out_trade_no]); ...
1
ec0af97a9c3fc2779cf8b8acb522cf2c
d6189147053ad6024e292b9bdf3ae4ff
Sets the test expression mapping object dao.
public class RegisterServiceImpl extends BaseDataServiceImpl<Register, RegisterInfo> implements IRegisterService public void setExamDao(IExamDao examDao) { this.examDao = examDao; }
1
d97041ff4ceab10e4c7161a44ebf994d
cc630009d1ab4d2e21d25d2c2b7e98f4
Gets the IDs of Child entities by Entity Type
{ $result = $this->createQueryBuilder('r') ->select('r.entityId') ->where('r.tag = :tag and r.entityClass = :entity_class') ->setParameter('tag', $tag) ->setParameter('entity_class', $entityClass) ->getQuery() ->getScalarResult(); ...
1
d1b847774633ed6711058d6b38e2d545
a3062cb9018b13e5fdb86c668ac6cc8f
GET: ExternalLink
namespace Library.Web.Controllers public class HomeController : Controller [HttpGet("links")] public IActionResult Links() { return View(); }
0
d0ba2d6ec077edcad6e169f573cd19a0
a7b08e51e0db8e5b9edfbb490f49399b
Test whether attribute named 'name' is a cached attribute.
def testCachedPropertyClassAttributeAccess(): assert Base.description == Base.__dict__['description']
0
6fdc4190c476338b2c4a6fc44ac2b188
a99eb6a9ae4f2503655f00d010d5ef76
Set the signer id
namespace Dalion.HttpMessageSigning.Signing IHttpMessageSigningBuilder UseKeyId(KeyId keyId);
1
63d9eeff4c95a3edc42871fcb5c76b3b
988d399f2131f9af48f5231c862a215e
Sets all bar code reader parameters to their default values.
{ if (m_Scanner != null) { m_Scanner.Write("SET DECODER.REREAD-NEVER2X OFF"); m_Scanner.Write("SET TRIGGER.TYPE 4"); } }
0
e312c9581a41a41674e19193ae762702
4cd6f8e57cb18385575810f3e8266a11
Consume whatever is left in the buffer.
int bpf_consume_ringbuf(struct ring_buffer *rb) { return ring_buffer__consume(rb); }
1
625cb08a947d86bcf87a656b45a38400
6b41bfade75a51a6b4efe03398e6a721
获取登录人生日
public class SharedPreferencesUtil extends BaseSharedPreferencesUtil public String getBirthDay() { return userSp.getString(Constants.BIRTH_DAY, ""); }
1
c8617ae0426726d2fa46414a46cf2969
17814d330ee4f939736f3ed596bf954d
PUT /saved_searches/:id
class Client def saved_search_destroy(id, options={}) saved_search = delete("/1/saved_searches/destroy/#{id}.json", options) Twitter::SavedSearch.new(saved_search) end
0
93e67113cab411303d885c31c0720c0b
a099ac8e2a8999ab1c4c436a70d7d30b
Sets the long name of the new option. Leading dashes are stripped.
{ return (opt == null) ? longOpt : opt; }
0
c860bb2fa1b99ef8b2b4e561989c972e
de54e4f32e4ed08e721fc682abb9f7ff
Searches for all of the files which might be related to the app\n starting_path: Specifies the folder to start the recursion (the starting point of the search) (default to OPTIMIZEDPATH) no_warning: Wether you want or not to display warnings
starting_folder = None if self._data["import_path"]: starting_folder = os.path.join(self._data["import_path"]) elif self.current_filepath: starting_folder = os.path.dirname(self.current_filepath) from classes.app import get_app _ = get_app()._tr fr...
0
c9745f637b626be75e5928c29c09debf
f7d44f90baa28f42f5507c2e36788ef8
Adds move to specified positions. Moves are validated before adding.
static void addMovesInDirection(ArrayList* arr, ChessBoard* board, ChessPiecePosition pos, int vDirection, int hDirection) { int player = chessGameGetPieceByPosition(board, pos).player; ChessPiecePosition newPos = pos; do { newPos.row += vDirection; newPos.column += hDirection; if (chessGameIsValidPosition(n...
1
5f1bca6961131c1580838f9641789f6a
8791ee01ed2f90974b4eca48845a9924
BGRチャンネルそれぞれに異なった関数を適用するフィルタ VFuncFilterは一つの関数しか適用できなかったが、 このフィルタでは全体に適用する関数の他に BGRチャンネルそれぞれに適用する関数を使うことができる。
{ inRange(imghsv[0], Scalar(filter0[1], filter0[3], filter0[5]), Scalar(filter0[0], filter0[2], filter0[4]), imgbin[0]); inRange(imghsv[1], Scalar(filter1[1], filter1[3], filter1[5]), Scalar(filter1[0], filter1[2], filter1[4]), imgbin[1]); imshow("Hs0", imghsv[0]); imshow("Bn0",imgbin[0]); imshow("Tr0", img[0]...
0
203b3e9013a0def560f5eb7eb631fd74
f015adbec688a7bcfeb8765487f428c6
Verifie si le fichier scores.txt existe
if not os.path.isfile(chemin): print(os.path.isfile(chemin)) return "Error: not an existing file" return 0
1
1566f2573cd4d13393ae87b8c9529477
104f87e0ad51565e03e5524ca56f9592
compute the nearest station and display pertinent, formatted info
latitude,longitude= get_lat_long(place_name) stop_name, stop_distance = get_nearest_station(latitude,longitude) stop_distance = str(round(float(stop_distance),3)) print stop_name + " is " + stop_distance + " miles away from " + place_name pass
1
f76fdf052411ec80ebbbc1b6594eca8b
b4159e5cfd5858391f86285289bbd9d6
Initialize an L-system in bloxx.
LSystem.__init__(self, "01", "[]", "0", {"1": "11", "0": "1[0]0"}) self.recur_n(n) BuilderFR.__init__(self, self.l_string, ...
1
ac418001acbc0390f0e29408f482a1b1
bec8f6caa1585c4f2dc7dc4a9aa51375
巡检点关联巡检设备
HashMap<String, Object> map = new HashMap<String, Object>(); map.put("plcIdentificationCode", plcIdentificationCode); equipment = equipmentService.get(Equipment.class, id); operate("设备管理", "关联plc", equipment.getEquipmentCode()); return ajax(Status.success, equipmentDao.savePlc(id, map)); }
0
0669d89f27ad5c7206e6fc1e1e0d3019
a36f7b79d5b7bcbbc0e2462b1282e8de
拆出詞綴區塊
namespace WordSegmentation public static class WordTool private static IEnumerable<string> CutBlock(string block) { Dictionary<int, IList<int>> dag = GetDAG(block); int[] route = CalcRoute(block, dag); int length = block.Length; int i = 0; string b...
1
4eac378d12cf52a653251d5cc1242c19
1cbad3ce4cd4cd5a08db79111b9000ed
Returns the environment variables with CC, CXX, etc. set for clang.
v = conf.env v['AR'] = 'ar' v['CC'] = 'clang' v['CXX'] = 'clang++' v['LINK'] = v['LINK_CC'] = v['LINK_CXX'] = 'clang++' v['CFLAGS'] += [ '-m32' ] v['CXXFLAGS'] += [ '-m32' ]
1
0ec581ba8225adefc203c69471f8f717
807f0a6db1ba7760923cef5f66603f3b
Gets the max employees.
final int actualEmployeeCount = employeeService.getEmployeeCount(); return (int) Math.ceil(actualEmployeeCount * 1.2); }
1
464b0af35abfeca005cc60e52336a557
ae45f871a0563b52412005dbca154eb7
Radius of the bottom-left corner in pixels.
public class RadiusView extends FrameLayout public float getRadiusLeftBottom() { return mRadiusUtils.getRadiusLeftBottom(); }
1
a03472d5128acce8fbf2a7d92603612c
26e06fb44f753d1a285689683a9eb85b
Selecteert alle gegevens uit de rij van de gebruiker.
{ object item = Dg_Users.SelectedItem; if (item != null) { string ID = ((DataRowView)Dg_Users.SelectedItem).Row["ID"].ToString(); Txt_FirstName.Text = ((DataRowView)Dg_Users.SelectedItem).Row["FirstName"].ToString(); Txt_LastNam...
1
d20b26fa893dad0fe63ae9b7c77ef07a
e81481b1cc561bda08fb3ed62407537e
for showing friend request list using ajax
FirebaseRecyclerAdapter<Friends, fRequestViewHolder> firebaseRecyclerAdapter = new FirebaseRecyclerAdapter<Friends, fRequestViewHolder> ( Friends.class, R.layout.content_activity_friends_request, fRequestViewH...
0
c63f6aecd43f99a85e066389da9f3311
c73ac9307369f345b07dde65b360c3ec
根据标记获取所有条件
namespace LWLCX.Erds.Server.IModelManagers string GetMarkerByConditions(IEnumerable<BaseQueryCondition> conditions);
0
9053709f90834f0f2523e092c9a0b3ab
a1bd3d6c89cc8cb6918ea413bab7987d
Check to see if IpV6Cidr property is set
namespace Amazon.EC2.Model public partial class AssociateVpcCidrBlockRequest : AmazonEC2Request internal bool IsSetIpv6CidrBlock() { return this._ipv6CidrBlock != null; }
1
300a76ab08ac672af2417db261117f40
7bc3e7372e68682d967a087c04071627
Execute command to fly
class Tello: def execute(self, steps): if self.initialized: self.send_command('takeoff') go_cmds = self.handler.cacl_go_cmd(steps) for go_cmd in go_cmds: self.send_command(go_cmd) self.send_command('land') else: print('[ERROR] I...
1
9384a719b5b95f31e86b6c41198badee
d55e34abb1c57dc64800c6dd41934629
Sets extrinsic_decimal2
class WorkActivity implements ArrayAccess public function setExtrinsicNumber1($extrinsic_number1) { $this->extrinsic_number1 = $extrinsic_number1; return $this; }
0
972c5e2c5879fb471a4ebe51cbe2efbd
29ab8478563baa5c81eeb70b90250a6d
查找生日在两个时间段中的用户列表
{ var newRegistered = memberAll.Where(r => r.CreateTime >= bgnDate && r.CreateTime < endDate); return newRegistered; }
0
96c13ed1f4614719c98ac29f285ea869
83a27f3bc8e385b91e0558654972bb7c
验证最终排序中是否存在无效字段
/* package */ class PersistenceHelper static <T> void validatePageable(Pageable pageable, Class<T> klass) throws InvalidPropertiesException { final Sort sort = pageable.getSort(); if (sort == null) { return; } final Set<String> properties = Arrays.stream(klass.getDeclaredFiel...
1
a12e3dc71cc544d5c6f2ef866eef5466
12de30a85ad0e02888f7de7a54c6429f
选择洗衣模式的操作
public class GameActivity extends AppCompatActivity implements PuzzleGame.GameStateListener,View.OnClickListener{ private void mode(){ spinner1.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> parent, View view, int ...
0