query_id
string
corpus_id
string
query
string
code
string
label
int64
d8e8548e9ee8562165c11b9033ae88ae
2f9d5ec9e167464cc4deb985bdfe5639
由编辑区的输入获得DomainObject
IEditingDomainProvider getEditingDomainProvider();
0
4b05c83eb1fc43a398f3ce77c13bb064
9a14ed31b7b27032ce6faaa0c27c3df8
Leaves a status range started by a call to <see cref="EnterStatusRange"/>.
{ var last = _stateStack.Count - 1; _stateStack[last].Leave(); _stateStack.RemoveAt(last); }
1
abaf02ef1e0e0635affe42ce6b9ca513
1d4659c9c13f02b9db04c2312adcac13
Syncs projection (toggle, settings)
public class CameraOptions implements Cloneable public void toggleProjection() { if (projectionMode == ProjectionMode.Parallel) { setMode(ProjectionMode.Perspective); } else { setMode(ProjectionMode.Parallel); } }
1
43b16000301175648fc1bf2d29c554d1
ddf0490777901cdb0d527b2589db349e
增加探险时长(探险类型[1-4], 元宝或礼券)
export class ChichenInfo public resetAddCoinExpTime(): void { if (RaceManager.instance.userInfo.jiashuDownTime > 0) { this.addCoinExpTime = 3 * 1000; } else { this.addCoinExpTime = (RaceManager.instance.addCoinExpMaxTime + this.attenuationTime) * 1000; } if (Main.app.is_wx) { wx.setStorageSync(M...
0
83bfbaa434bbe82e72cd65223e06705c
125f931f4bb7f9f1acba99f5c4776bab
Found at https://stackoverflow.com/a/32882220
function copyTextToClipboard(text) { var textArea = document.createElement('textarea'); textArea.style.position = 'fixed'; textArea.style.top = 0; textArea.style.left = 0; textArea.style.width = '2em'; textArea.style.height = '2em'; textArea.style.padding = 0; textArea.style.border = 'no...
1
9b117b3baf7a1a019006560d841abd22
87b7898bfabb66cc358c934ed892e5f7
fonction qui renvoie les feuilles de l'arbre
void affichage_feuille(noeud* arbre, int * compt) { if(!est_feuille(arbre)) { affichage_feuille(arbre->fils_gauche, compt); affichage_feuille(arbre->fils_droit, compt); } else { printf("FEUILLE %d\n",*compt); (*compt)++; printf("Precision: %lg %%\n",arbre->precision);...
0
3efb3fd4cb943fb64930dc191c4ece0a
68fbc3e4a4bab553a1495693b0af8238
清空编辑区按钮点击事件
namespace YidanEHRApplication.Views public partial class W_AdviceSuitCategory : Page private void btnClear_Click(object sender, RoutedEventArgs e) { try { m_funstate = EditState.None; BindBtnState(); } catch (Exception ex) ...
1
eb8c710c2f86c4764414a4e786eddab1
74a53ec1c246862dee6468faf4f4bf5b
ファイルからJavascriptオブジェクトを読み込む.
function loadJavaScriptFile() { $.getScript("js/javascriptFile.js"); }
1
7167b8df186ff8ca31f6bfac430368a8
8a959e59b64c3e619ef442f04756b4e2
Goes to Configuration screen.
public class MainActivity extends AppCompatActivity private void jumpToconfigActivity() { Intent intent = new Intent(this, ConfigActivity.class); startActivity(intent); }
1
9715c02a05b2b4f18591680554119ea9
60919a59c52be82eb6b8abc14ab42281
tests that the peer server handles a StreamDataRequest message properly
d = Deferred() d.addCallback( self.assertEqual, {"active": [("foo", 1234, 3)], "old": [("egg", 4321, 2)]}) self.proto.dumpRequest(d) self.assertEqual(self.transport.value(), "\x00\x01d") self.proto.dataReceived("\x00\x00\x00\x01") ...
1
dd1647e16aab636aa6202eb64019c313
f207722f4d6ba8d4a0b1a234bbfac7fa
Tests wille can not view protected
class TestWebserver(ZopeTestCase.ZopeTestCase): def testSecurityOfProtectedObject(self): try: self.folder.restrictedTraverse('secret_html') except Unauthorized: pass else: self.fail('Resource not protected')
1
b2de48d8401f76699e9175aaf5b9f78d
89a0518660409b2e39519f9a0cd5db4d
Initialize ServerWorker.
class ProvisionWorkerServer extends ProvisioningScript public function __construct(WorkerServer $server) { parent::__construct($server); $this->server = $server; }
0
0b993e3a4c620cf916c3c635c52d5bcb
d3f4483834c8f3d1a7760897aec0bc77
Recursively finds the very most top level parent of a Page
class PageRepository extends \TYPO3\CMS\Extbase\Persistence\Repository public function findWholeBranch(\DirectMailTeam\DirectMail\Domain\Model\Page $parent) { $result = $this->objectManager->get('TYPO3\CMS\Extbase\Persistence\ObjectStorage'); $result->attach($parent); $check = array($parent); while ($current = ...
0
2c4e700efb0b318c6bcd09c75a94fafc
3c1e8aa22da373d87a69d11c82eff879
设置透明状态栏,并且布局向上提,需要android版本再5.0之后
class SelectActivity : MvpActivity<SelectPresenter>(), SelectView override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) if (Build.VERSION.SDK_INT >= 21) { val decorView = window.decorView decorView.systemUiVisibility = View.SYSTEM_UI_FLAG_LAYOUT_...
1
143bddfb99b2a99a3ddb7b0e18f5bbfd
e05eaf1f8eef7a8a6b811f69fffb97fd
获取某个节点的所有子孙节点
class Region extends BaseActive function get_descendant($id) { $ids=array(); $ids[]=$id; $this->_get_descendant($id,$ids); return array_unique($ids); }
1
f7971a3445a0c152151b3981d847070e
37e3716ba3350dc38b9f13f02d86f477
Photo is smaller than both maximum dimensions, take it as-is
class ResponsiveImageEffect extends FocalPointScaleAndCropImageEffect public function transformDimensions(array &$dimensions, $uri) { if ($dimensions['width'] && $dimensions['height']) { Image::scaleDimensions($dimensions, $this->configuration['w'], $this->configuration['h']); } }
0
58f4776654a7bc02897597015770431b
b9542dc7416616ca120b1120cc7663ad
搜索租借的商品
if (empty($_POST)) { return false; } $where['user_id'] = $_SESSION['user_id']; if (!empty($_POST['goods_id'])) { $where['goods_id'] = I('post.goods_id'); } if (!empty($_POST['start_time'])) { $where['start_time'] = I('post.start_time');...
1
10faa483adb25b7f168c523e43e63574
31c1c493db0e8064c34ef27423de85df
根据货币的id获取货币的name
if(id==null) return null; for(CurrencyEnum enums:CurrencyEnum.values()){ if(enums.getId().intValue()==id.intValue()){ return enums; } } return null; }
0
6176830b521541e04b4d34d737ffbcb5
4a1843f1be26acd8957b58604577b9fb
pointer to the requested observation, or NULL if the observation index is out of bounds.
if (iRawIdx >= 0 && iRawIdx < m_qlPTPoiT.count()) { return m_qlPTPoiT.at(iRawIdx); } return NULL; }
1
8c6726f688f008601a5d762337d551a3
b4e6598adfc307c26a05a17235bfe3c9
GET /response-choices/:id : get the "id" responseChoice.
class ResponseController extends Controller public function show($id) { if (!$response = Response::find($id)) { return redirect()->back(); }; return view('response.show', [ 'response' => $response ]); }
0
8d7929c726fa8edd84dda7ada26e6b12
cc19b980bc197e932f434e90cd9faa78
returns the ambient temperature sensor value in Kelvin With enclosure on, the U6 is typically 3°C higher than ambient. The calibration constant have taken this into account and have therefore an offset of -3°C, so the returned calibration readings are nominally the same as ambient with the enclosure installed for refer...
int16_t ut = getRawTemperature(); int32_t b5 = computeB5(ut); float t = (b5+8) >> 4; return t / 10.0; }
0
f36de17fd859a5fac9a26ad8e9043749
64904cc6ba8cd2e9e6640ce42b0f5858
Function prints the edit distance between two words.
int editDistance(std::string a, std::string b, int x = -1, int y = -1, const int I = 1, const int D = 1, const int S = 1) { x = (x == -1 ? a.length() : x); y = (y == -1 ? b.length() : y); int table[x + 1][y + 1]; int diff; table[0][0] = 0; for (int i = 1; i < x + 1; i++) table[i][0] = i * D; ...
0
de2518eff761b9f04ae112e48db65d39
3eb34af2f8380cd39ce3989da94d6b2e
Returns the matrix $\mathbf{V}$ of the decomposition. <p> $\mathbf{V}$ is an orthogonal matrix, i.e. its transpose is also its inverse.
public class MatrixDecompositions public class LUDecompositionImpl implements LUDecomposition public DoubleMatrix getU() { return uMatrix; }
0
a99c6e8452af73dfec2eb400cd11beb0
a21124c346792ff9f033f92f68cde34b
Adds bat event listener and removes bowl event listeners, along with some additional necessary stuff
function addEventListeners() { events.addListener('BEAT', onBeat); drums.forEach(d => d.addEventListeners()); document.addEventListener('keyup', onDrumKeyUp); }
0
f2814c1709f11da6af1d6cfa418c04ff
99f381265f299ebab67b4c7701ac0788
Returns the synthetic division of this polynomial by other This method is adopted from the python code provided at https://en.wikipedia.org/wiki/Synthetic_division Synthetic division preserves the length of the vector. The beginning is the result, and the tail is the remainder. This value must be broken up to impleme...
out = list(dividend) normalizer = divisor[0] for i in range(len(dividend)-(len(divisor)-1)): out[i] /= normalizer coef = out[i] if coef != 0: for j in range(1, len(divisor)): if isinstance(divisor[j], int): ...
1
dbcee0b55ab46de7933af756196135d9
bc3aedc535477bb167bd5d0d75762818
gets the number of figures under pre-spcified conditions (fig type)
int ApplicationManager::GetSelectCount() const { return SelectFig; }
0
da5f785d0f36e3d7ed0f459908ea98a5
5688b2076ded3f1f8fc36a9b07b07b56
注意这里没有参数
class Car: # 类方法第一个参数是当前类本身,我们习惯使用self标识。 # 如果加入一个参数,报错TypeError: toot() takes 0 positional arguments but 1 was given def move(self): print('车在奔跑...')
1
0be16de3e52e7612e580d3999004de36
971ccb988903c93249aee8894da65160
This is called when quiz is finished.
isQuizCompleted = true; currentQuestionNumberEl.parentElement.style.display = "none"; finalScoreDisplayEl.textContent = currentScore; quizQuestionSectionEl.style.display = "none"; quizResultSectionEl.style.display = "block"; }
1
22e9b4c528238514442e312098080e36
f0be36f9c57494e6ee22148e748e5453
This is called when a mail merge encounters a MERGEFIELD in the document with an "Image:" tag in its name.
namespace CatalogModule.Services.Word public abstract class BaseWordService : IWordCatalogService private static void MergeField_ProductImage(object sender, MergeImageFieldEventArgs args) { if (args.FieldName == ProductImageFieldName) { string ProductFilePath = args.F...
1
e8da06dd66305e54a5d101e90b9ad044
1bfcaa51e705e14c87d7a00630ddd444
鼠标停留在某个元素上
class AppiumBaseClass(object): def mouseHover(self, element): actionChains = ActionChains(self.driver) actionChains.move_to_element(element) actionChains.perform()
1
d881216c2d9b7a7a8db1ba074e3376fb
1e9cb6ee12932e01c2ed0a56dc1e519d
Ends the asynchronous print.
JNIEXPORT void JNICALL WindowsPrintManager_METHOD(endPrinting) ( JNIEnv *env, jclass ) { int const result = gAbortedPrinting ? ::AbortDoc( gPD.hDC ) : ::EndDoc( gPD.hDC ); if ( result <= 0 ) LC_throwPrinterException( env ); }
1
3b1773f0cb189e1d911840d86e0358fb
1fedcc1faeadd4119a7ce86bd38be1b2
Rewards the user for installing the app.
function didInstall(): AppDidInstallAction { return { type: AppActionType.DidInstall }; }
0
d8bcacb3d3ba775bfa58dd644d976d62
8062e50e9f4ca717f513d07aa9a0cdc8
Test creating ingredients with no problems
url = '/api/ingredients/' client = APIClient() client.credentials(HTTP_AUTHORIZATION=self.test_user1_token) response = client.post(url, self.ingredient_data, format='json') self.assertEqual(response.status_code, status.HTTP_201_CREATED)
1
a7ec5af7ead84a262e617f5f7b138c64
834f90faa646b73a7025beb671015102
to show necessary conntrols on the click of logout button and hide irrelevant ones
function loginPageShow(){ $("#c_account").removeClass("d-block"); $("#about").removeClass("d-block"); $("#cs_account").removeClass("d-block"); $("#ct_account").removeClass("d-block"); $("#more_details").removeClass("d-block"); $("#carouselExampleControls").addClass("d-none"); $("#more_d...
0
66a4e7435aa1e29d02209cc600085204
09de3e4544a6af02d19b90e5786ff8f7
changing icon when hovered
public class ActorButton : MonoBehaviour void OnMouseOver() { buttonframe.sprite = buttonframestates[1]; }
1
fac789be31ed0ddcf5ab1f488f77ac6d
713ba3811e13364b093f14ec5c987f8f
Visualizes the average latency per timestep over all clients of the simulation
def plotData_oneProject_TAT(oneProject_TAT): return plotData_timeseries(oneProject_TAT, stages, 'Median')
0
41aab6f34f898c38e82c4f9a918060aa
32f4a1bbcc9e9a96972c4ac013474f1c
Method to generate the correct animation type for the Giant-Wasp
public Image getImage() { return animateTimer < 20 ? image[0] : image[1]; }
1
7ec1aad2371070571caa29cd3ac77ad2
95f0cdf1a95d90ca995abd8ce0af424a
Try to get the sup/inf of two functions by looking at the piecewise components.
if isinstance(expr, sp.Piecewise): cases = [p[0] for p in expr.args] cases_ghs = [rearrange_expr(c, var) for c in cases] conds = [e[1] for e in expr.args] def piecewise_branch(i): pieces_i = zip(map(lambda gh: gh[i], cases_g...
0
d7942dd254b4487073c4ddcad0ece19f
e734b9dab001b843261eccd46d55666d
获取存储过程7结束时间
@Generated( value = { "http://www.jooq.org", "jOOQ version:3.8.0" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class NbcProceduresHisRecord extends TableRecordImpl<NbcProceduresHisRecord> implements Record8<Long, Long, Long, L...
1
029c3b76814768540725d5941de7476f
76e8d327c825cf548cbf54082c29dcd4
通过jsoup方式爬取用户信息
if (MainContent != "") { userModule = new UserModule(); Document document = Jsoup.parse(MainContent); stuName = document.getElementById("xhxm").text().replace("同学", ""); String stuMinor = document.select("a[href*=xsfxbm.aspx]").attr("href"); String stu...
1
6f6d04f40c9af46a62bcbef5abae8775
166544b8de352f2c1b7d8ee0d6d2dadc
Sets the flag that indicates wether to show item detail or a list of items.
public class DisplayProductCatalogItemsTag extends TagSupport public boolean isViewOptionItemDetail() { return viewOptionItemDetail; }
0
10401a686f8323008965770ea737ab96
d7a105e8db1457c93502f3aaedf435a3
国际化浏览器头信息本地语言解析
{ $think_var = cookie('think_var'); if (!$think_var) { $think_var = cache('think_var'); if (!$think_var) { if (isset($_SERVER['HTTP_ACCEPT_LANGUAGE'])) { $think_var = $_SERVER['HTTP_ACCEPT_LANGUAGE']; } else { ...
1
eeacd3ac54487dcd55241f1ce25835ab
b5b496c57906c213719e06ef42501277
Dadas 3 coordenadas actualizamos la cámara para que se posicione en estas coordenadas. Una vez actualizada, volvemos a dibujar.
{ theta += (x - oldX) * 0.005; phi += (y - oldY) * 0.005; if (phi > 3.14) phi = 3.14; if (phi < 0.01) phi = 0.01; camera.direction = {sin(phi) * cos(theta), cos(phi), sin(phi) * sin(theta)}; camera.direction = glm::normalize(camera.direction); camera.right = glm::normalize(glm::cross(camera....
0
41159dfaf044b79de378ba96a8c60f8e
36c15ad0cb77d028c1a152e2fcbb9bae
Required for singleton
function Universe() { if (typeof Universe.instance === 'object'){ return Universe.instance; } this.start_time = 10; this.bang = 'Big'; Universe.instance = this; }
1
181445c02d5885bbcce343d8a3da8a94
393f4340e97a3c34b18e0565acce8df3
Called when user's guess is repeated
public class ReadingPuzzle1 : MonoBehaviour public void WrongButton() { wrongGuesses++; }
0
41ae74ef43eac1ac63056ebd08f395a5
ff2bdfa84f145f96e4e2eb11d5a03221
Sets the name of a mesh to use as a hat for all karts.
class Character(pygame.sprite.Sprite): def change_hat(self, hat_id): self.hat = int(hat_id)
0
33284abff8f0bae0fbb7fcc437cbc7b3
84d05f5174e7e457c1326b4545f0d987
传入数据源配置信息,根据password字段进行解密。格式修改成dict 一层关系
if self.data['encrypted']: KEY = encrypt.gen_key_from_pass(self.__password) length = len(self.data['usernames']) usernames = [ encrypt.decrypt_data( KEY, self.data['usernames'][pos] ).decode('utf-8') for pos in range(length) ] passwords = [ enc...
1
5ec575195f545322077a58ee9d2fa07a
ea9f9c745b49d222d617bc2dceb37d9d
Returns if initial focus is enabled/disabled for the editor.
get initialEditorState(): EditorState { return this.#initialEditorState; }
0
2c65ff47600386b384cbf9841117232b
3cfb86312c336ee0ab137e731a7b8f05
Load the Scene the User has selected
{ sceneToLoad = nameOfSceneToLoad; StartCoroutine(FadeCanvasGroup(uiElement, uiElement.alpha, 1)); storeSelcted = eventSystem.firstSelectedGameObject; }
0
9d8a2ba45d1daf3cf97e3a26c76e8152
f196cae9a9b3920b516a72ea4fd4e3d0
Creates an instance of IconRoundHeadsetMicElement.
class IconRoundSentimentVerySatisfiedElement extends AoflElement constructor() { super(); }
0
fb311ea46621f5f95f776c67624f675f
2f9f1c77935a064c8d13dac72739003c
Tests a notification can be set as notified
{ $historyCollection = $this->createPartialMock( \Magento\Sales\Model\ResourceModel\Order\Status\History\Collection::class, ['getUnnotifiedForInstance', 'save', 'setIsCustomerNotified'] ); $historyItem = $this->createPartialMock( \Magento\Sales\Model\Order...
1
2d42287926d90c52cc8a74c1c88de05d
eb862a1fb62968278b37b1ad41201305
Ajout d'un element en queue de la liste d'arc
LISTE_arc enfilArc(LISTE_arc A, int val, int dest) { LISTE_arc La = (LISTE_arc)malloc(sizeof(struct ELEMENT)); La -> poids = val; La -> destination = dest; La -> suivant = A; return La; }
0
faac0a9900da187657f9f2cd1b769adf
057cdb336fa080d29433ba634f2d2abc
通知前台更新页面
public class AppUpdateManager implements OnCheckUpdateListener public void appForeground() { isForeground = true; if (updateService != null) { updateService.cancelNotification(); } }
0
960802c2c7a2a1973b02b94d3f2554f8
ca0688b84572df01dc15e94ab56612e1
ExtendedConfigurationGet get the extended configuration accessible to authenticated users.
namespace Dynatrace.API.Api ExtensionMonitoringConfigurationsList ExtensionMonitoringConfigurations (string extensionName, string nextPageKey = null, long? pageSize = null, string version = null, bool? active = null);
0
845122784da99daca68f991858288cbf
9a440e39a89a763e83bc39ca1017d2c8
Removes Nickels from the Pocket
namespace Pos.UI public partial class CashUpdaterUI : Form, IDisposable private void picNickel_Click(object sender, EventArgs e) { m_numNickels.Value++; updateTotal(); }
0
6ab42423984e3927339036cc467bf757
9e33d04eb2dad6db19472c0ceaa46031
Get the focused target.
{ if( !IsVisible() || !GetFocus() ) return NULL; if( m_pCount->GetFocus() ) return m_pCount; if( m_pRune->GetFocus() ) return m_pRune; if( m_pLuna->GetFocus() ) return m_pLuna; if( m_pCron->GetFocus() ) return m_pCron; return NULL; }
1
f1f74469f2c6d73431bf6763f4b563c7
c9da3500fd89a61e008e6c2280ecc079
Agrega una ventana a la aplicación.
public class CConfiguracion implements ActionListener public void agregarWindowListener(WindowListener window) { vistaConfig.addWindowListener(window); }
0
1d86abfb328a006c2341836a9d4502ea
de63f6df80aacb5dd0fe8e931353fae2
重建所有資料
def initDB(): if prompt_bool("將失去所有資料,確定嗎?"): db.drop_all() db.create_all()
1
010b3f2a6cadeeccc1d291ee014d370b
d3d9c2572a45d186cfe15d6ddc89568f
Sets the v12_0 When TRUE, only Version 12.0 or later is supported. Default value is FALSE. Exactly one of the minimum operating system boolean values will be TRUE.
class MacOSMinimumOperatingSystem extends Entity public function getV12_0() { if (array_key_exists("v120", $this->_propDict)) { return $this->_propDict["v120"]; } else { return null; } }
0
8e8e85cc1fe237fec228bb2cc9f8cd91
2039864fb2cb97d637ea4561e74cb567
移除属性时的监听方法
void attributeRemoved(ServletRequestAttributeEvent event);
1
5313defb9b0af1b1186e5d41d70f8463
cf2cb88f83ee88de941c67bc959861c2
Get data from MPU6050 for KK2.1
msg_t mpu6050_get_data(I2CDriver *i2cp, MPU6050Driver *mpup) { int16_t temp = 0; int16_t x_accel = 0; int16_t y_accel = 0; int16_t z_accel = 0; int16_t x_gyro = 0; int16_t y_gyro = 0; int16_t z_gyro = 0; uint8_t mpuData[14]; msg_t msg; msg = mpu6050_read_all_sensors(i2cp, mpuData); if (msg...
1
cc29a28ebaf54cde5ff86722aae82f72
2a8a2b501782ea73273d48f7b2333e5d
Compress list of bytes array to a bytes array
int length = 0; for (byte[] b : list) { length += b.length; } byte[] bb = new byte[length]; int index = 0; for (byte[] b : list) { System.arraycopy(b, 0, bb, index, b.length); index += b.length; } return bb; }
0
85bda7b659ffca76c073f6de6e845bed
cb3efd0c1ba3eda7fbbf39b151aa6538
removes custom tables from DB. only for dev. this will be removed and only happen on plugin removal
class Setup public function uninstallDbTables() { $configs = new PluginEstimationConfigs; if(!$configs->getConfigs('save_tables_on_delete')) { foreach ($this->getTables(true) as $table) { if($this->db->tableExists($table)) { $sql = "drop table $table";...
1
1bace06d2c4ebd10b0bbd0014ee157f4
69ce8244be9aec66798c06191e1b40a6
все данные поставщик -> товар
class SuppliersController extends Controller public function index() { $suppliers = Suppliers::where(['KLIENT.POST' => 1, 'KLIENT.FDEL' => 0])-> join('ORG', 'KLIENT.ORG_ID', '=', 'ORG.ORG_ID')-> join('FSALER', 'KLIENT.FSALER_ID', '=', 'FSALER.FSALER_ID')-> select('KLIENT.*', 'ORG....
0
2a9ad4d696c1555b29c1722d21bc21ca
1adb1312e83a86ec698b6332b13507fc
Compare versions. (4.0.0 > 4.0.0-alpha1, 4.0.0 < 4.0.1)
if (a === b) { return 0; } if (semver.gt(a, b)) { return 1; } return -1; }
1
b2273c2be2c7b5619979abb8d1023656
14f004752389a6385cf3cf875ceb0e34
将文本分句
public class IKAnalysisUtils public static List<String> segment(String text) { StringReader reader = new StringReader(text); IKSegmenter ik = new IKSegmenter(reader, myCfg); Lexeme lex = null; List<String> list = new ArrayList<>(); try { while((lex=ik.next())!=null){ ...
0
037900cdaf41299c02d9e80f1e77f919
af00a2cb32897f54af07513d5ff461a4
t, tuple or list Each element of t is either an int, a tuple, or a list No tuple or list is empty Returns the maximum int in t or (recursively) in an element of t
def my_max(t): return - my_min([-v for v in t])
0
805255b8a8c8af6da306f51c53f8b96a
98783db8e41829da7a2264b33adeec30
change direction of all edges in a graph
for edge in self.edges: assert isinstance(edge, Edge) temp = edge.from_v edge.from_v = edge.to_v edge.to_v = temp
1
ef7f3266b5547870d5028dcc983415ec
d724acdc177385e5ed2fe287adcf9f4f
This function tests all arguments in a list of 2tuples to see if unit letters are SIBU 2tuple presumed to have structure: symbol, degree
String u = symbolToLetters(s, 'i'); String t = symbolToLetters(s, 'l'); if ( dlb.contains(u) || dlb.contains(t) ){ return true; } if ( dlb.contains(u.substring(0, 4)) || dlb.contains(t.substring(0, 4)) ){ return true; } if ( dlb.contains(u.substring(1, 5)) || dlb.contains(t.substring(1, 5)) ){ re...
0
f9369a4e2f7f00c0a57be6b8aad7bc77
d167f22ddea2238d6acc1fc3f3a6c982
FUNCTION TO CREATE DOUBLY LINKED LIST
node *n; node *head; node *tail; node *temp; n=new node; n->data=1; n->prev=NULL; head=n; tail=n; n=new node; n->data=2; n->prev=tail; tail->next=n; tail=n; n=new node; n->data=3; n->prev=tail; tail->next=n; tail=n; temp=head; ...
1
34577809ab8f5ed208c2a9a16f7ecee1
6aad62df7420eb08f755f8df6388eea2
通过检验模版名称获取检验模版数据
function getTemplateConfInfoByName(data) { return request({ url: '/L/autoanalysis/manage/getTemplateConfInfoByName', params: data }) }
1
2b6cbb809112b7e8768c3162ada6c181
1aa9661126dc88a0a095ec7a0d54bf2d
Retorna o número de puzzles.
public class ConstraintPuzzle implements Serializable public int getNumberOfElements() { return elements.length; }
0
537f5431090b2519fa5d7627b6e49fd6
225c687c1673f21ee7f0ed26838dea19
! \brief Prepare session layer communication \details Checks the following preconditions before setting up the session task:
{ BOOL opok = FALSE; if(mainGSM.HWReady != TRUE) return; if(sock->number != INVALID_SOCKET) return; while (!opok) { while (xSemaphoreTake(xSemFrontEnd,0) != pdTRUE); if (mainOpStatus.ExecStat != OP_EXECUTION) { mainOpStatus.ExecStat = OP_EXECUTION; mainOpStatus.Function = 20; mainOpStatus.Er...
1
b8616e653d0f72b05fdb2915b31a6cf4
2fe152154e0d639dc2757593ead940d2
Return 204 status code - staff user can delete other user account.
class UserViewSetPublicTests(APITestCase): def test_private_staff_user_delete_succeeds(self): self.client.force_authenticate(self.staff_user) url = self._get_user_url(self.base_user) res = self.client.delete(url) user_pk = self.base_user.pk self.assertEqual(res.status_code, statu...
1
a189f90099f9142a617c208c2eb71b57
39e1715e1ca16ae6d4c38688f1059099
组合框关闭,数据源恢复
namespace Client.Term public partial class PageTerm : Page private void Combobox_DropDownClosed(object sender, EventArgs e) { (sender as ComboBox).Background = Brushes.Transparent; }
0
7d4a1d94bf58460e575a3c47f3886d47
8485ca5cf724b28e39d9c04e90daba93
This function should compress paths and works as described in lecture. Returns the index of the root of the up-tree in which the parameter element resides.
path = Stack() while element != self.father_map.get(element): path.push(element) element = self.father_map.get(element) while not path.is_empty(): self.father_map[path.pop()] = element return element
1
164cecb61c54e4b6c99bfa7a0419f130
630d34770fcf118913f9bf79622e12bb
users can see the entity if they have the required permission on the specific entity instance
namespace Milkify.Controllers [Authorize] public abstract class BaseCrudController<TEntity, TDto, TService, TDatatableRequest> : Controller where TService : IBaseService<TEntity, TDto> where TEntity : class where TDto : class where TDatatableRequest : DefaultDataTablesRequest pro...
1
c945e8d21ef10b52b390bd4f44cb7a94
2debe573d95d092c4938e7aaa7197b76
跳转到定区关联客户的页面
@Controller @RequestMapping("/cus/cusorginfo") public class CusAscTrfQueryController @GetMapping("/custbase_inforel") public String inforel() throws Exception { return "/custbase/custbase_rel"; }
1
b14218e7432c61c2f4dd82c1050e2420
42836be32359ca25f7da489f33150c0c
Gets choose file script. Used for updating filename in from based on filepicker.
def update_date_dropdown(list_of_names): return dash_lib.get_uploaded_files()
0
66326b96fc1cb5f185e1a26e02fc3751
c87edbc36adc2b4eee654bac63ac153c
increase the length of this vector
public final class Vector<T> implements StackInterface<T> public void increaseCapacity() { checkInitialization(); int newLength = vector.length + 1; checkCapacity(newLength); vector = Arrays.copyOf(vector, newLength); }
1
0ce8ac074bf3ed3c2a627ac8a1c5544f
277c37199a6e15e0a12496b7973c7a7b
Cleans up after a print operation by unregistering for events and re-enabling buttons.
{ if (!_hasFinishedPrinting) { _targetParagraph.Events.OnFinishPrinting.Invoke(); _hasFinishedPrinting = true; } }
0
e591729c5a2d519d81d849ed7a3c1366
eb5b78ae7bdad5b9fb54f6bcda36fb8f
Test that two points are close to each other. (l^\infty norm)
let close = (a == b) || (a - b).norm() < tol; if !close { println!("{:?} != {:?}", a, b); } close }
0
9f32fb5b6953223cea4cc29d314c6fee
d811be3ef85636e656cdb934f1e749ce
@brief Handles timeout operations from ATTC/ATTS for upper layer.
{ client_t * p_client; APP_ERROR_CHECK_BOOL(p_ble_evt->evt.gattc_evt.params.timeout.src == BLE_GATT_TIMEOUT_SRC_PROTOCOL); p_client = client_find(p_ble_evt->evt.gattc_evt.conn_handle); if (p_client != NULL) { p_client->state = STATE_ERROR; } }
1
8cbe2b4139d07b024132b072f8d59d2e
40ccca7aeb234c55aa1fa6ae7f2f0bc4
For Microblaze we use an assembly loop that is roughly the same regardless of optimization level, although caches and memory access time can make the delay vary. Just keep in mind that after resetting or updating the PHY modes, the PHY typically needs time to recover.
void __delay(unsigned long loops) { int d0; asm volatile( " bra 1f \n" " .align 4 \n" "1: bra 2f \n" " .align 4 \n" "2: add -1,%0 \n" " bne 2b \n" : "=&d" (d0) : "0" (loops) : "cc"); }
1
e874d1284ad16824f3ed2fe8bef97f79
9912b74282c72b9db0b97dc37a2712e1
理解帮助:前端传一个生鲜食品(id=1)(一级类目)过来, 这里要返回商品类型为一级类目及其所包含的二,三级类目. 即: Goods.category = 1 [一级类目] Goods.category 的 parent_category = 1 [二级类目, 父类为一级类目] 或 Goods.category 的 parent_category 的 parent_category = 1 [三级类目,父类为一级类目下的二级类目]
List<Category> goodsCaListFirst = categoryMapper.goodsCategoryList(Long.parseLong("1")); List<Category> goodsCaListFirst2 = new ArrayList<>(); Category category = new Category(); category.setId(Long.parseLong("-1")); category.setCategoryName("请选择"); category.setSortOrder(...
1
6c08694ddfcf6d2afed4f8286dd8cbc8
0b68200a14fe16e7fb6c5557985d5e36
Converts an `osr.SpatialReference` instance to an EPSG code.
def epsg_to_wkt(epsg_code: int) -> str: srs = osr.SpatialReference() srs.ImportFromEPSG(epsg_code) return srs.ExportToWkt()
0
d07d8472bc0c3bc1274a8973f57c57f5
0f49887524750374757161950b13d11c
Stores the ingredient changes information with respect to that ingredient.
const metadata = JSON.parse( JSON.stringify( this._metadataStore.__variantMetadata(idServerId, entryId, revisionId, variantId), ), ); if (!metadata) { throw new BurritoError('VariantNotFound'); } const ingredientMetadata = { checksum: ingredientStats.checksum, s...
1
02b2732ed854e53535ad15effafba1f1
07415d17f97dcfe4e8a97d8af2a33933
双击查看文档.
public class DocumentTable extends JTable private void addMouseListener() { this.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent e) { super.mouseClicked(e); if (e.getClickCount() == 2) { DocumentTable tempTable = (DocumentTable) e.getSource(); int documentIn...
1
6f699e6b8868606f167cdd2c6035eace
34bbcdbfaac542ef7c4cb32c59938d11
Relate nugget to mod template.
class NewKamiModel(object): def nugget_instantiation_rule(self, nugget_id): ag_rule, ag_instance = self.action_graph_instantiation_rule() ( nugget_rule, nugget_instance, l_g_l, p_g_p ) = self.corpus._hierarchy._get_backward_propagation_rule( ...
0
32ffb1a60869808e5f9937ba9943fcd3
29e4eeae0164f6d6bbc3019900d13971
returns true if the block is powered
boolean isBlockPowered(Vector3i position);
1
331012a90cb921e55f71ccf6770ed199
d14438b4bbb62f71c163ca4b104c05b2
Call this function to make the strip BLUE
void strip_ASU() { strip_clear(); strip_fill(150, 0, 0, 0, NUM_LEDS/2); strip_fill(150, 75, 0, NUM_LEDS/2, NUM_LEDS); strip_show(); }
0
9bb17dc4b0887e83b3a264e225745ae7
de7bdf74f01747f78a957e95ac8a2aea
Gets the local interarrival jitter.
class RTPstat implements ModelInterface public function getLocalMinjitter(): ?float { return $this->localMinjitter; }
1
85b4979a484953cef5d7fcc9227fd317
485be5742077b2101e1067852b360c4a
Save latest pose as we're shutting down.
{ positions = lastPosePositions; orientations = lastPoseOrientations; return true; }
0
d439ad24f8db8a757dba5c2ee10096a2
c7d9df51909968f7b0f346edf96e7684
Get the plugin, if found, return the [PluginContainer] of plugin, otherwise return null
interface PluginManager fun <T : RSPlugin> getPlugin(name: String): T?
0
86330a1e0669ed292055a2e97d626bc7
d26ba7a8350da3a940464f2f3e85de77
Makes all neccassary input widgets needed for the Projectile Motion input screen
EMANwidget = QtGui.QWidget() Imagicwidget = QtGui.QWidget() Spiderwidget = QtGui.QWidget() MRCwidget = QtGui.QWidget() XYZwidget = QtGui.QWidget() spinwidget = QtGui.QWidget() sgirotwidget = QtGui.QWidget() quaternionwidget = QtGui.QWidget() emanbox = QtGui.QVBoxLayout() self.emanazslider = ValSlide...
0
af51873652235314153ba7a2018e80ad
45eff5c148a3cb40c61474c8a6c838c2
Add all players to the players table.
{ if(m_players.count() > 0) { foreach(Player* player, m_players) { if (player->tableId() == m_tableId) { TournamentTableRowWidget *row = new TournamentTableRowWidget; row->setPlayer(player); m_mainLayout->insertWidget(player->tablePosition(),row); ...
0
4f72e42f6088dfef0d834f40b0489879
e99ae7be75391f51185877eacc443767
Replace the properties on this Relationship with those provided.
assert replacement != null; this.setName(replacement.getName()); if (replacement.getDeadline().isPresent()) { this.deadline = Optional.of(replacement.getDeadline().get()); } else { this.deadline = Optional.empty(); } if (replacement.getStartEndDate...
1
9b6d5449c04f94c14d0e211f854036d4
833f0f470edb045711bf28c7159d4c3f
Indicates if the payload may be self signed, in which case the public key may not be available until after the payload is processed Only really useful is the payload contains an account-like object.
class EndpointSecurityAttributes public boolean isPayloadProtected() { return isPayloadProtected; }
0
1b46ee38e21fccfca0a0e74d50ad0a97
80918d69ac5d734e2f13e54e552f8a81
依据支付申请状态判断是否需要变更状态
if (PaymentNewConsts.TRANS_STATUS_INIT.equals(transNew.getStatus()) || PaymentNewConsts.TRANS_STATUS_PROCESS.equals(transNew.getStatus())) { return true; } return false; }
1
c2b798142dd65af76e80d1bcc9af05db
5c804a27578055fd2b75afe7628f4fb3
根据skuId或spuId查询资源
async function getSkuGoodsBySkuId(body: any) { return http('/emp-mall/retail/sku/getSkuGoodsBySkuId', { body, method: 'POST', }); }
1