query_id
string
corpus_id
string
query
string
code
string
label
int64
df9860bdc612d0e5b007f584f16e6bf1
ea5f2d2035108b785aac5ea4ac3c86e2
ALLOWS USER TO SPECIFY WHETHER OR NOT THEY WISH TO SEE THE COORDINATES ON THE GRID IN PYTHON TERMS
if __name__ == "__main__": root = Tk() frame = Frame(root, bd=2, relief=SUNKEN) frame.grid_rowconfigure(0, weight=1) frame.grid_columnconfigure(0, weight=1) xscroll = Scrollbar(frame, orient=HORIZONTAL) xscroll.grid(row=1, column=0, sticky=E+W) yscroll = Scrol...
0
d0d8c6b9135ff83d85459bebba3b874b
5fd322283102b4590dde90cf46d37edd
removes all points strictly before the specified time
int deleteAllBefore(long date);
1
aa2d65de72aa2cda02bbb71fb5ac3b50
831c5fe39c5e6b65d45afc2a30b20eff
Returns a dictionary with more human readable date and time keys.
d = {} if instance: keys = instance.__dict__.keys() for key in keys: if key.startswith('_'): continue value = getattr(instance, key) d[key] = isinstance(value, datetime.datetime) and \ value.s...
1
951ff2451dec7c049d2267c5e5ca1f7f
f75792b3a3010d606adecd98d865e51b
Metode som legger til en hobby i hobbylista
namespace gr8Match.Controllers public class ProfileController : Controller public ActionResult AddInterestFromList(int Id) { try { var MyId = ThisUser(); var ctx = new Gr8DbContext(); var intresse = ctx.Database.SqlQuery<string>("Select...
1
e8df4245befdc5c5e148f49e7337dfd5
5eff57df446ced37c76ed765aea20da0
获取erc20代币余额
namespace Hope.Utils.Ethereum public sealed class EthUtils public static EthCallPromise<dynamic> GetEtherBalance(string address) { var promise = new EthCallPromise<dynamic>(); _AddressEthBalanceCoroutine(promise, address).StartCoroutine(); return promise; }
0
0997cdc7a8497dcca9ebd5d8e94934ba
f7c21655b2709c56e6e9b1fa12dc2d14
Removing all children *must* dirty a Yoga node.
if (node == null || !node.isValid) { mlog.warn("node removeAllChildren but null or not isValid!"); return; } node.removeAllChildren(cleanup); }
0
6f6958518a5a7260c6f5d5efd220e036
8a617a9a1d3f62c41c0521162ea849df
indicates if the max number of consecutive rbws has been reached or exceeded
class Role: def burst(self): return self.get_val('min') > 21
0
a458d8b20809da4d1c153dd186b76934
0bbeee2732af601e714d3810814bcbe8
Read ORC files into a DataFrame collection
jSession = spark._jsparkSession jdf = self._java_obj.readDataset(jSession, path, read_as) dataframe = self.getDataFrame(spark, jdf) return dataframe
1
6919e225c140e93b71549d21b604c76e
7b397925b034f32a6c3fbabcd91a783a
add new embs and labels to current matcher
img_embedding_numpy = self.convert_to_numpy(img_embedding_tensor) self.database = self.database.append({'label': name, 'embedding': img_embedding_numpy, 'threshold': 0}, ignore_index=True) self.update_embeddings() self.save_database() return 0
1
59200e3b79295216b8ae9a4263cc7175
9e3047e51d6c396be18ce715d0ed226a
Moving price options from product to a separate model
{ if ($this->parent_content_element_id) { if ($this->parentContentElement) { $offers = $this->parentContentElement->getTradeOffers()->all(); if ($offers) { $offer = array_shift($offers); if ($offer->shopProduct && $offer->sh...
0
9e5125d833d53b4cc614f1079ca040da
af6ad8eee4e56383dd153c75393fb63e
Runs a chi-squared test on the categorical data |count_data|, a 2D numpy array
def chisq_or_gsq_test(data, X, Y, conditioning_set, G_sq=False): categories_list = [np.unique(data[:, i]) for i in list(conditioning_set)] value_config_list = cartesian_product( categories_list) max_categories = int( np.max(data)) + 1 sum_of_chi_square = 0 ...
0
2fd8cd99073a0836e911a3fca72f870d
6991ed692299b087b3b792d48585d01a
Construct a query to retrieve all neighbors of a set of vertices
class commonNeighbors(basePredictor): def __init__(self, G): basePredictor.__init__(self, G)
0
d4fa43b0983c5e6ac0a7b03785470e4b
ed31ba0e739c6a2296ffc704be65f68c
取消往左挤,恢复正常显示方式(即往右显示字符)
public class MessageFragment extends TFragment implements ModuleProxy public void leftToRightAnim() { if (txAit.getVisibility() == View.GONE) { return; } ViewPropertyAnimator viewPropertyAnimator = txAit.animate(); viewPropertyAnimator.setDuration(600); viewPropertyAn...
0
8a4e42c5b178048510f58aa83af154d0
e4ca9cebd9a13dfccd93c0b34168bad6
Represents Supernote file structure.
self.name = name self.has_subfile = False self.root_nodes: List[RootNode] = [] self.root_names: Set[str] = set() self.node_names: Set[str] = set() self.subnode_names: Dict[str, Set[str]] = {}
1
92cfa4cbf4530498b8ff451286eb4e16
db1546b828c7de9c8516f887ae49d22f
Approximate the distance between two IP addresses
public function ipDelay($ipAddress);
0
2377a6830d7feac9d4233ebcff075ea6
273e5be5a638b2924c3ca5ad791c088a
Determine whether we're serving quotes for a given token pair
boolean getQuotePrefixed();
0
8daacb959e5a3d75b9a1608af9b8ce21
a72f87b7f5bb7ab1ba6ae0bc842d3264
GET: EducationDetails
{ var type = new List<EntityTypeForEducation>(); var Institutes = new EntityTypeForEducation(){ Name = "المعاهد والدور"}; type.Add(Institutes); var Colleges = new EntityTypeForEducation(){ Name = "الكليات"}; type.Add(Colleges); ViewData["Use...
1
c2e16271ccbd15bbc5369687899beadb
aa94d47e6eb11871e5b0b0daff468a4a
Get hotkey manager.
class EventHandlerBase(object): def shortcut(self): return _EventHandlerManager(self)
1
402e52a5c1af8aee7ea191c06903af8d
ff322c136f6edfccc2c0b18afdb43fad
验证费用类别ID是否与父级ID相同
namespace Yannyo.Data.SqlServer public partial class DataProvider : IDataProvider public bool ExistsFeesSubjectClassChild(int FeesSubjectClassID) { StringBuilder strSql = new StringBuilder(); strSql.Append("select count(1) from tbFeesSubjectClassInfo"); strSql.Append(" wh...
0
5baa728f3ba1304837001a552b200a5d
4f4bd9f94070776577d80570213508dd
Redirect to validation page of current item, used to hide URL of button
class Cminds_MultiUserAccounts_Block_Adminhtml_SubAccount_Edit extends Mage_Adminhtml_Block_Widget_Form_Container public function getValidationUrl() { return $this->getUrl('*/*/validate', array('_current'=>true)); }
1
eed2e7a459b023de2c57263e379e8d27
fada2f4c536b001d990551923585a000
Returns a function for fetching resources from a Github API endpoint.
def make_github_request(*args, **kwargs): token = get_token() kwargs.setdefault('headers', {}).update( {'Authorization': 'token %s' % token}) req = urllib2.Request(*args, **kwargs) return urllib2.urlopen(req)
1
9520155f013a4017e78aa82692930c8d
8c2d86bcbb13596a86e5ffa604318eab
<para> The <see cref="ShowScrollBar"/> function shows or hides the specified scroll bar. </para> <para> From: <see href="https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-showscrollbar"/> </para>
namespace Lsj.Util.Win32 public partial class User32 [Obsolete("The GetScrollRange function is provided for compatibility only. New applications should use the GetScrollInfo function.")] [DllImport("user32.dll", CharSet = CharSet.Unicode, EntryPoint = "GetScrollRange", ExactSpelling = true, SetLastError = t...
0
12a2738a7c947846667bbedbc2a14ebd
2729210bc3dfee2ebbea7e0fd4b9bf04
Set basic actions state.
class Location extends \Magento\Rule\Model\AbstractModel protected function _resetActions($actions = null) { if (null === $actions) { $actions = $this->getActionsInstance(); } $actions->setRule($this)->setId('1')->setPrefix('actions'); $this->setActions($actions); ...
1
7ad23047815fa93220c6f9edde4e1e7b
c5141c0b85bb622abfbf876e2a5db0da
Exports specified interval of data from trace to .csv file.
def export_trc(path, filename): pyautogui.moveTo(cord.EXPORT_DATA, duration=1) pyautogui.click(cord.EXPORT_DATA) pyautogui.moveTo(cord.EXPORT_TRC, duration=1) pyautogui.click(cord.EXPORT_TRC) time.sleep(2) pyautogui.moveTo(cord.EXPORT_TRC_EXPLORER, duration=1) pyautogui.click(cord.EXPORT_TRC...
0
4fe0f62372f79409b133828169875fe8
a40720148a7c5de7d4a75763fdf5b99d
Finds the symbolic form of cosine, if can For example, cos(9/14) is cos(1/2 + 1/7) which can be expanded as a cosine of sum and hence an analytical (symbolic) form.
def SinCos(*args, **kwargs): pass
0
ab4c50f13927690c4e59a26cb6849d35
447dd9ac3a45abc3af9502d9dfc40ebb
API for performing operations on Facebook ads accounts.
AccountsApi accountsApi();
0
b4c218db2900dd0d04ab37c59bc64710
4f00b0fa35d01542d2745f49cf0be7d9
Queries DB for answered notifications / invitations
DatastoreService datastore = DatastoreServiceFactory .getDatastoreService(); Query gaeQuery = new Query("Notifications"); PreparedQuery pq = datastore.prepare(gaeQuery); return pq.asList(FetchOptions.Builder.withDefaults()); }
0
d7c0f0806ec0df75f8b6b7cb0b58bc7f
7a864d4418e4c79b221eeee8be5a751c
* Création de la liste des quêtes
class QuestionSeeder extends Seeder public function run() { $faker = \Faker\Factory::create('fr_FR'); for ($i = 1; $i < 11; $i++) { $question = new Question; $question->question = $faker->Text; $question->answer_id = $i; $question->save(); } ...
0
f1c0180d7a9ea75f3498dcbff9a1fafa
96bd32f5f82da00a06ed30fc8bd12d69
Returns the meta object for the '{@link org.melanee.core.models.plm.PLM.Connection#getParticipantForMoniker(java.lang.String) <em>Get Participant For Moniker</em>}' operation. <!-- begin-user-doc --> <!-- end-user-doc -->
itemPropertyDescriptors.add (createItemPropertyDescriptor (((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(), getResourceLocator(), getString("_UI_Connect_fromPart_feature"), getString("_UI_PropertyDescriptor_description", "_UI_Connect_fromPart_feature", "_UI_Connect_type"), ...
0
a6ef963d7600d1d37cd851f882e3982f
6e2e65f855d54a732eb6bc1b257d5544
Adds x to set if x not in set. sz is the current size of set
add(const size_t x) { std::vector<size_t> positions(m_hasher(x)); for (std::vector<size_t>::const_iterator pos = positions.begin(); pos != positions.end(); ++pos) { m_table[*pos] = true; } }
0
10b15d7757e40d47fbe9e3c68941888c
037f8f57c221b44c68abcd9bd24eef33
Sets the threshold for the queue. When the threshold is met a worker is spawned to empty the sorted queue to the writer. number of items to queue before spawning worker
public class StuckThreadDetectionValve extends ValveBase public void setThreshold(int threshold) { this.threshold = threshold; }
1
6036a9cdd6f000abe60e5d5759f964f1
19201f64725c10d3e044fd7184cdd541
Returns true when the type should not be generated in client libraries
abstract class Generator implements GeneratorInterface protected function shouldIgnore(FieldInterface $field): bool { $fieldType = $this->container->get( (string) $field->getFieldType()->getFullyQualifiedClassName() ); $fieldTypeGeneratorConfig = $fieldType->getFieldTypeGenerator...
1
6ad2b4626dc53858b2ffd801c1b7a30f
755e7ff435b42810fe834b6e0619e698
Returns the meta object for the containment reference '{@link org.cirad.dsl.ecec.xtext.ecec.ParameterExpression#getEx <em>Ex</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
Expression getEx();
1
ef6878c6e1672f97231a0600609f8989
b3329586051ee135f2a5eb309bc5e4c4
番号を指定して外出時間を取得
class Stay public function getExitByTime() { return $this->exitByTime; }
0
61a6d8b4511edb388896e399692fda0c
2aaf224a7cf0c8dd02acafe683f4f52e
Adds an order by clause to the query using a table alias, where the order by clause will be in the default order (ascending). If no order by clauses are added to the query, the query will be ordered by the Id column in ascending order.
this.OrderByClause = new OrderByScript( OrderByScript, Parameters, throwExceptionIfParameterNotMatch ); return this; }
0
26076d44258419ded19b9193a18b9fe9
fce771806ffb3372157b22c75940eb4d
Calculates determinant recursively.
class MatrixMath public static function calculateDeterminant($matrix) : float { $determinant = 0; $rcCount = count($matrix); if ($rcCount !== count($matrix[0])) { throw new InvalidArgumentException( "Can only calculate determinant from square matrix (same amount o...
1
9c637992611fe5f741a2d56ee3e3d48f
cd6c74743aa99e103af494f7fb27184d
Connect to the wiimote so we can interface with it.
{ sendCommand(COMMAND_REPORTING, new byte[]{0x04, 0x37}); initWiimote(); writeToRegister(0xa40040, new byte[]{0x00}); }
1
54a32d91fff08a5d3a988de6c37fc4e2
6b297a3186b0f3b72a30477f0e4fdef4
Check dependent cases.
class CheckCommitMessageCqDepend(CommitMessageTestCase): def testInvalid(self): self.assertMessageRejected('\nCQ-DEPEND=CL=1234\n') self.assertMessageRejected('\nCQ-DEPEND=None\n')
1
635c244ae348aa3c9473a7637deb9260
835bb075e639a373e17d5f9cc9651099
@brief 実効値バッファをクリアする
{ u32 data_size = m_pImplementer->GetEffectiveDataSize(); gfl2::std::MemClear( m_effectiveDataBuffer, data_size ); }
1
c14ddd1004de6fff1eaf1101a7388d74
b24713b6516a8ec1a31648c6b677c879
更新赢钱的用户馀额 单子状态 0未结算 1已结算 2撤单 3已计算,未反钱 4已返钱,未返水
{ $data = $this->baseHongbaoType->execRedisCommad('incrbyfloat', $this->createPayload('userRefundMoney', $hongbaoId, $userId), $money); $this->baseHongbaoType->execRedisCommad('incrbyfloat', $this->createPayload('RefundMoney', $hongbaoId), $money); return $money; }
0
97910f84501dc37f00ae606b3c97eea0
999ec73b250427676bf04aadf1fcb48b
判断平年(28)/闰年(29)
int lyear(const int year) { if ((year % 4) > 0 || ((year % 100) == 0 && (year % 400) != 0)) { return 28; } else { return 29; } return 0; }
1
1b752804b49fd27d2839c2be3d2b006b
2a1a5499ca9277c59da95124411dc448
Extracts locations from specified epub and stores them in database.
{ var yelpBuilder = BuildYelpElements(); var scraper = new Scraper(); var locations = db.GetLocationsToSearchFor(); foreach (var state in locations) { Console.WriteLine("Starting to search location: {0}, {1}", state.Key, state.Value); ...
0
ddfd14958c0813297d6db1643b5a016b
978e8dd462cc2fe73d24c13c6bee29d5
Adds a line to the client's map.
public function addLine(): void;
1
e48714042a88f2f9d32c2773f79ceb4a
55d8b01f390617164650e66efd6a3741
登場人物の登場回数を計算する
def search(person) count = 0 @seat.size.times{|i| if @seat[i] == FREE then if (@seat[i - 1] != USED) && (@seat[i + 1] != USED) then @seat[i] = USED count += search(person + 1) @seat[i] = FREE end end } (count > 0) ? count : (1..@seat.count(FREE)).inject(:*) end
0
7acb1eb71dc85cba81c787711ea014e8
39f02ff0808cf3eca176f64e9c7c21f2
查询所有商户数量(传统POS)
public Integer getAllCountIsTrad()throws Exception;
1
3336a4ad12ce7fc4e3ea08a01c07f78d
7266ae5ec3cc5fe5ced282ef85ee98ee
Gets the states that indicate whether to perform any additional checks on the OCSP response signers certificate. If false, do not make any checks to see if the signers certificate is authorized to provide the necessary status information: as a result this option should only be used for testing purposes.
@ThreadSafe public class XMLSignatureSigningStage extends AbstractStage<Element> public final synchronized boolean isIncludeX509Crls() { return includeX509Crls; }
0
fe842e84e78ab6134c9a1739c1b79aee
ae16ee29170bb4ca51231016bb6736d7
Handles the Analyze_ click event.
namespace Microsoft.Samples.TabletPC.InkAnalysisScannedPaperForm public class ScannedPaperForm : System.Windows.Forms.Form private void AnalyzeButtonClick(object sender, System.EventArgs e) { this.tabControl.SelectedIndex = 1; }
1
e0a285a28b09749dcc1345774d2018a2
e2451f631ec31b24f9a6030a83ca907d
Change visibility of console
export default class LSLToolsConsole toggle(state) { if (state === undefined) return (myself.consolePanel.isVisible() ? myself.consolePanel.hide() : myself.consolePanel.show()); else return (state ? myself.consolePanel.show() : myself.consolePanel.hide()); }
1
cbd9fa72595ceb2092060fd44fe145e9
b2fc69d3813e5460335556b93e4ab041
Checks drift value, alarms if beyond threshold.
{ if (iExpiredTicks % KTimerCorrectionPeriod == 0) { TTime currentTime; currentTime.HomeTime(); const TTimeIntervalMicroSeconds KTimeCheckInterval(KTimerCorrectionPeriod * KTimerTick); iDriftCheckTime += KTimeCheckInterval; if ( currentTime > iDriftCheckTime ) { TInt64 t = currentTime.MicroSecondsFr...
1
7de4bd197bd5007b5a75a4fb7da7ec34
1051a2a2e87348df9e8d48a11728c71a
Retorna o m�s da data passada, come�ando por 0 (0=janeiro, 1=fevereiro, etc).
public class DateUtil @SuppressWarnings("deprecation") public static int getMonth(Date date) { if (date == null) return -1; return date.getMonth(); }
1
ee349fd6d94149b50498ab7969e7a497
33d3d20ed08dc0663aca623c1d75cfe1
Squared function: Takes numbers as input and squares each individual number. Uses list comprehension.
def map_square(): return list(map((lambda x: x**2),range(1,21)))
0
9612d3975dc12241911c09c0b22b7ffa
2ad263c12dc589b19f7d2d577d4f096c
Presents a Yes/No dialog option asking if the user is sure they want to discard chagnes.
AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setMessage(R.string.discard_changes); builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { ...
1
8dc74f75d48f86bee798de6a6e243be7
602ff72d6dba1ed39d30d1296a47ee7d
@brief Gets the selected ADC reset calibration registers status.
uint32_t am_hal_reset_status_get(void) { return AM_REG(RSTGEN, STAT); }
0
2e328eb693825424d0008420802ef758
6c9cbe583f064ced6e52f5c76eafc628
Function to run command to get the no. of CPU cores
public class NodeMessage public static int getNumCores() { class CpuFilter implements FileFilter { @Override public boolean accept(File pathname) { if(Pattern.matches("cpu[0-9]", pathname.getName())) { return true; } ret...
0
138e185fd1f988c464d44c0b9da2aeec
46de28b958066dc689d7dc26e17495b2
Add a class to an element without duplicating it.
function addClass(element, cssClass) { if (hasClass(element, cssClass)) return; var oldClasses = element.className; if (hasClass(element, cssClass)) return; var newClasses = oldClasses; if (/\S$/.test(oldClasses)) newClasses += " "; newClasses += cssClass; element...
1
fed3ef99e40e63c31947b59ffdbeb2d9
e4828875cdd0be03cee55c100f7e88c2
Returns the last time a local error occurred.
class TCCState(object): def last_error(self): return self.__last_error
0
36c8fd9d0c19aaee62e2cbd04b35a6d0
821331e4110b7084540dd1539ec76af9
utf-8 encodes a list of items
try: return urllib.urlencode(items) except UnicodeEncodeError: return urllib.urlencode([(k, smart_str(v)) for k, v in items])
1
9c9f22112cfab552f27d9a2c1c108125
2df1437de606de808d8faaa459042fe6
sends a homing command
def StartHoming(g_PyAuris): return g_PyAuris.SendIDMCommand(IntFromCmd("START_HOME"))
1
f60683331d63403136de7e4d7c14f6d4
a93b2a9d4c269d3361b14f4e6c4e0bbc
returns: component of v1 onto v2
namespace WindyPhysics.PhysicsObjects public class AristotelianPhysicsObject : IPhysicsObject protected static Vector2 ParallelComponent(Vector2 v, Vector2 dir) {return Vector2.Dot(v,dir) * dir / dir.LengthSquared();}
1
6eec2a7933ebd200451ad31c8fe744fe
9763104c6a3eee6f9341959f3f2a9966
Remove specified jobs.
class AbstractJob(abc.ABC): def remove_labels(self, keys: List[str]) -> 'AbstractJob':
0
3c2b376c9dbc036201bad12623f659b4
c410bb6c620677fc586fed27729d96f5
Функция для отображения загрузочного листа с составными компонентами
namespace SOLEntityGenerator public partial class MainForm : Form private void BtnComponentsClick(object sender, EventArgs e) { ComponentForm form = new ComponentForm(ComponentsElement); form.Show(); }
0
ab6f4a2261ae7bb74e584e1e3b7b007a
3f9c011d2eab38536e9a3ea0983a92a7
generates a random set of obstacles at top of screen for player to avoid
{ for (; ; ) { GameObject obstacle = Instantiate(obstaclePrefab); obstacle.GetComponent<Obstacle>().SetPosition(Random.Range(-6.5f, 6.5f), 6.5f); obstacle.GetComponent<Obstacle>().SetVelocity(0.0f+Random.Range(-1.5f,1.5f), -2.0f+Random.Range(-0.2f,0.2f)); ...
1
0b14f490c35a51d743b7275c63e7c279
d8d4250c20ca7b88f5fc542ad9f15832
mettre les datasources et supprimer les emails en fonction de chaque option qu'on a choisi dans le dropdownlist
namespace Email_Test public partial class Default : System.Web.UI.Page public void gvMailDeleteDataSource(string selecteoption,string mailadressespecial,string testmailid, string timefrom, string timeto) { if (selecteoption == "0") { if (EmailClass.getMailSendNomTo(m...
1
bad9f32285136f7b8b874eab8d415028
751339d2623b915e229dd8640f80a0f6
Returns the meta object for the containment reference '{@link org.xtext.example.pascal.pascal.set#getExp <em>Exp</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EClass getExp();
1
5f445f89956f3dd1404286982eb3705c
b7c3dc9c76ce7f1798d1cf293b0f4859
查询资源和角色
List<RoleAndResources> listRoleResources();
1
3dab22e028bd7bc47831f8e23177045c
d6a9127a31752826d222d6a79b3f9390
force ceil a double to long long
local function lu(long) return long<0 and long+0x80000000+0x80000000 or long end
0
b3dd4c5f0cb33206d73b5c132f137963
7aea0f57b49af6b8fc1a807add29f118
remove the symbols like [laughter] [NOISE] transform word to characters
special = list('@=+-#%&*[]{}()?/"\';.,') s = s.replace('-',' - '); lst = nltk.word_tokenize(s) return [w for w in lst if w not in special]
0
fdd52baffded254d197dddcc78b6fca8
0ff51490e02a506e8dbcfadbf3f9eefa
取消/停止惯性滑动
public class CustomViewPager extends ViewPager public void stopHandler(boolean stopHandler) { isAutoScroll = false; this.stopHandler = stopHandler; }
1
f582af599a7e844826755cf3cc4b2cf1
441341396cacaa28e117afcee4ee84b1
Initialize the ADHOC network HTTP server for device setup,
void start_HttpServer_in_STA_Mode(void) { }
0
846a4375530dab3ae879119d9baeeb0b
0855237d0df1512957c91b99568d9d10
Reset the adversarial patch.
self.source_patch_masks = { patch_center: self.get_patch_mask(patch_center) for patch_center in self.patch_centers if not np.bitwise_and(self.get_patch_mask(patch_center), self.unknown_mask).any() } self.patch_centers = tuple(list(self.source_patch_masks.keys(...
0
d2095b616dce0597409d0dbc5c3fccf3
9c957a298b32af812d8ab7a85642b826
Method for emptying the journal upon new day (maybe)
class JournaledList(list): def clear_jounal(self): del self._appends[:] del self._removes[:]
1
2a7c7bff7c747c6b15de69adb5d4ec38
634597022bd05e5f010aa095322d9ece
Set the list of distribution properties shown in column.
namespace Vanara.PInvoke public static partial class Shell32 void SetColumns([In, MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] PROPERTYKEY[] rgkeyOrder, uint cVisible);
1
6f8ac71e2d2f65ebfaad81ed8bb958f8
7f61448ad6da3ef0f9cb03f40c5be655
Expected format(s): Expected output
cases like (1)
0
7fa165a5d967aceccc81d8bd604e563c
99015ca66d043b98a3e8fd90482de939
Fix variables in solution to match their initial names
class SingularLimit: def sub_vars_in_ic(self): new_v_to_init = [] print("Variable Transformation: ", self.new_to_old) for i, e in enumerate(self.dae.dict['ic']['eqs']): old_init = sympify(e['eq']) new_init = sympify(self.new_var_list [i]).subs(self.new_to_old).subs(self.v...
1
9339ea86492df1915816be25bedc67fb
75be33bc3234feb79b0fd1263eec6179
returns [commmId]:[sentId] and escapes ":" in case "]:[" is in an ID
temp = list() for i in range(0,len(string),2): try: temp.append(string[i:i+2]) except: break; return ":".join(temp)
0
b270c89dde7e55ce929828c5dba3306a
d7f0aec5be5083036cd913cb4753a42b
Return's the repository to access store websites.
class ImportProcessor implements ImportProcessorInterface, EavAttributeAwareProcessorInterface public function setStoreWebsiteRepository(StoreWebsiteRepositoryInterface $storeWebsiteRepository) { $this->storeWebsiteRepository = $storeWebsiteRepository; }
0
8937b25bb2eaa1219eac92e6e44dd464
5f8417aab6efbe0b9e330f9b225fba21
Returns a Lecture object corresponding to the lecture taking place at the current time
if(!$date){ $date = Carbon::now(); } $school = $room->school; $schoolConfiguration = $school->configuration; $startDate = $schoolConfiguration->getTermStartDate(); $year = $startDate->year; $term = $schoolConfiguration->guessTerm($date->month); ...
1
dfb72f3cc547fddcb9ec5a9745d91970
ab0d8db17b18fa749522b0058a761c53
读取指定用户的演艺活动订阅情况
public class ActSubscribeDAOImpl extends SqlMapClientDaoSupport implements ActSubscribeDAO{ @Override public ActSubscribe findSubscribeIsExist(long userId, long resId) { ActSubscribe actSubscribe = new ActSubscribe(); Map<String, Object> map = new HashMap<String, Object>(); try{ map.put("userId", userId); ...
1
ebbf6dd731b81fb98eda64c8240156aa
8cc41854b2eddc8674b4b8e26e647528
Lists Recognizers.
@Generated("by gapic-generator-java") public class SpeechSettings extends ClientSettings<SpeechSettings> public PagedCallSettings< ListRecognizersRequest, ListRecognizersResponse, ListRecognizersPagedResponse> listRecognizersSettings() { return ((SpeechStubSettings) getStubSettings()).listRecognizer...
1
ea0cf4aa196d7d77a00d47f3b622c7be
744e0a27990d233437ade837c31d5469
Changes the results to show the top 4 candidates running in the current selected position
public class MainActivity extends AppCompatActivity{ void showFourManBracketResults (View view){ Button placeFinalist = (Button)findViewById(R.id.finalist); String championFourMan = placeFinalist.getText().toString(); if (championFourMan.equals("")){ Toast.makeText(this, "Please sele...
1
41068f3f97dc5bfbf2f2fa0c394e72e2
0b633326a2a157c80605c0a389470a6e
Finishes the asynchronous execution of the GetApplication operation.
namespace Amazon.AppFabric GetAppAuthorizationResponse EndGetAppAuthorization(IAsyncResult asyncResult);
0
90c234e2e60cb0b5c5b3f61079b0ed26
b8c2a9a461438e9cfa5891d72b2e67e3
获取创建业仓表格(空表)的sql
namespace A0802_Excel.Service string GetCreateTableSql();
1
49475a31e7c7a7e38ed45e7c91db4fb6
2e1e79084d2ee22ffd65b351072c541b
判断游标是否在控制台输入框的输入行
void MainWindow::plainTextEdit_cursorPositionChanged() { QTextCursor cursor; cursor=ui->plainTextEdit2->textCursor(); line=cursor.blockNumber(); qDebug()<<QString::number(line); }
0
a5403ede2b33670132c6e1ef5ed94a68
11f51d29ee3ae12cfafe2eb099d4fb83
obtener todos los usuarios de una sala
class Provider: def get_users_by_room(args): query = """ select distinct id_user from user_room where id_room = 1 """ return Sql.exec(query=query, args=args)
1
c4ecba32e977e73b64c30e4ccb8166f1
c6c5f7c2591d7b4d45c284a34abe053f
Unarchives a channel.
namespace SlackNet.WebApi public class ChannelsApi : IChannelsApi public Task Unarchive(string channelId, CancellationToken? cancellationToken = null) => _client.Post("channels.unarchive", new Args { { "channel", channelId } }, cancellationToken);
1
823869380676a03b4d45437376bf305a
4518f5cd20ca5c3be1f1674ba95a088c
Find all by package id.
{ $api = new WeFact_Api(); $parameters = array( 'searchat' => 'Package', 'searchfor' => $packageId, ); $response = $api->sendRequest(self::getModelName(), 'list', $parameters); $result = array(); $modelNames = self::getModelName()...
1
3de349f4e106b5458c3d5fb868afdd64
8534da72afd7a964738bb8a4f233405a
Load an activity when the user clicks on a step
var i, x = document.getElementsByClassName("step"); for (i = 0; i < x.length; i++) { x[i].className = x[i].className.replace(" active", ""); } x[n].className += " active"; }
0
ddf130246e51dd855da9cd84961808a3
63bbae7475e08212e218646e9bd633fc
Return the list of keys to be serialized To only serialize specific keys override this method in subclasses
class Base def serializable_attributes read_inheritable_attribute("serializable_attributes") end
1
77915564f03f9f9b27f6e806ba278ef0
5c1657a710bcbcded7d6fda9cc710949
利用参数返回JedisPoolConfig对象
@Data public class RedisPoolConfig JedisPoolConfig buildJedisPoolConfig() { JedisPoolConfig config = new JedisPoolConfig(); config.setMaxTotal(this.getMaxActive()); config.setMaxIdle(this.getMaxIdle()); config.setMinIdle(this.getMinIdle()); config.setMaxWaitMillis(this.getMaxWait...
1
57b789fbd9869b157064076421f49200
9ff17515cf6a65d5910261521db3338f
Get the stock model for retrieving product stock data.
class SKUIndex(indexes.SearchIndex, indexes.Indexable): def get_model(self): return SKU
0
10c152c1b75ff34564599010c5a3555e
e7679d67059ad721bb0b301d9fa2755f
Prepares the constructors for all types.
if (constructors.empty()) return; std::vector<llvm::Constant*> elements; llvm::Type *priority_type = llvm::Type::getInt32Ty(llvm_context()); llvm::Type *constructor_ptr_type = llvm::FunctionType::get(llvm::Type::getVoidTy(llvm_context()), false)->getPointerTo(); llvm::S...
1
a2711a4050a655bbe6136a1e80f66fce
96ef2eb785ca661bc041ef7c550653ca
Finds notifications based on the query.
namespace Regulus.Remote INotifier<T> QueryNotifier<T>();
0
1b1912a10c928c465588ae21c4b34240
c80e6030a059b7ab8f2d274f106f35fc
Adding Students to Tables
{ $this->createTable('{{%student}}', [ 'id' => $this->primaryKey(), 'academic_term_id' => $this->integer()->notNull(), 'father_name' => $this->string(50)->notNull(), 'address' => $this->string(50), 'contact_no' => $this->double(), 'fat...
0
930a1c8ec83779a64cd88d132148608d
5020380d1a286ab2f37ca92d30b7f118
The usage category of the UsageTriggers to read. Must be a supported [usage categories](https://www.twilio.com/docs/usage/api/usage-record#usage-categories).
public class UsageTrigger extends InstanceResource public UsageCategory getUsageCategory() { return UsageCategory.valueOf(getProperty("UsageCategory")); }
1
d349e2468fa81cd6a10a20a642c03fd5
bf840b9f26ccdb0caac444cdadbd30c1
Get all dispensers
{ $dispatchers = Dispatcher::with(['place']) ->whereStatus('pending')->paginate(20); $response['status'] = 'success'; $response['dispatchers'] = $dispatchers; return response()->json($response, Response::HTTP_OK); }
0
e434962fd80205b77aa884b5a5db2164
e6bda0c8168ddeaa6abeca23740e35ab
Determine which widget class should be used for the given signal.
class SignalEvent(QtHappeningProxy): def getChangeMethod(self): assert self.__class__.widgetSignalCorrespondingMethodName is not None result = eval( "self.widget." + self.__class__.widgetSignalCorrespondingMethodName) return result
0
09497745161cc0c471e41f6461ddf749
d97d0c77de01f24ea4ea141992add338
根据商品goods_id获取商品单条记录
{ $where = ['goods_commonid'=>$goodsCommonId]; $where = array_merge($where,self::$whereArr); $data = self::find()->where($where)->asarray()->one(); return $data; }
0
d5a2050e27819cf1b6697a79a1a0220d
43967b4cb93ab7f2a4a3c83eeab46092
<pre> 双曲正切函数的导数 </pre>
public class ModelTrainer public static double derivativeTanh (double a){ return 1 - Math.pow(a, 2); }
1
14f2f296973b1e9a5062df6c35e21ff6
09486daa5a49d20d92f360a55ee30fee
Gets the due_date of this TransactionTemplateItemItem. # noqa: E501 Due Date # noqa: E501
@JsonInclude(JsonInclude.Include.NON_NULL) public abstract class AbstractAccount extends AbstractModelComponent public String getDueDate() { return dueDate; }
0
7ad806f7b230de1f1e7eb5f963b42e00
e7140e78deda3b503c19ee98c66d808b
現時点の出力バッファを送信し、その内容を文字列として返し、出力バッファリングを終了します。
namespace Microsoft.Mex.DotNetDbg public class SimpleOutputHandler : IDebugOutputCallbacksWide, IDisposable string Flush();
1