query_id
string
corpus_id
string
query
string
code
string
label
int64
0a564bccafc704d1200ffcd463b8bc6f
93ed68a3e59ab60f4eff6c78709f8299
Sentinel nodes not included
class _TestNet(snt.AbstractModule): def modules(self): self._ensure_is_connected() return self._nodes_list[1:]
1
1a1d2a5880c17c1749288116c1d4a551
821d66f49aa4b3b39f93b19967daa971
Prints Bookcases list.
public List<Bookcase> getBookcaseList();
0
e91303d607778932635d61b4bc2eae83
bfae6cfe4017cfba7936b7d0a8d254b3
Save jury data
{ parse_str($post['cjHistoryRecordForm'], $cjHistoryRecordForm); parse_str($post['cjNamesForm'], $cjNamesForm); $type = $post['type']; $cjMainID = $post['cjMainID']; $proceedingDecCounselID = $post['proceedingDecCounselID']; $sql = new Sql($this->dbAdapter); $...
0
28c917f934535d4b65d69a1f7ad89661
1c3cb94517b49cb7913065565154d743
retorna o id do vertice alvo da aresta
public class Edge<Weight extends Number & Comparable<Weight>> implements Comparable<Edge<Weight>> public int v() { return a; }
1
7bdb0ae73e27a002d8710db8264c610b
59471bb216a82eb54804749b4461efdf
Gets the critical tasks.
List<CertificateOption> getCriticalOptions();
0
5344a75bdde4ab450743f437ddda053e
368df22f37a13a9ca16c09855cef5860
根据医生姓名模糊查询排班信息
namespace DAL public class DAO4Arrangement public DTO4Arrangement[] selectAllByDoctorJobTitle(string _doctorJobTitle) { string sql = "select * from arrangement where doctorJobTitle = '" + _doctorJobTitle + "'"; DataSet dt = DBOperater.selectSql(sql); if (dt != null && dt....
0
e34bcf4f7b2f4c0b8a803c1e7297f0ac
250bb51d595dfd8a4b9cfddf2d3c19a4
Обновить список кнопок-улучшений
class App(QMainWindow): def updateFermList(self): self.ui.FermList.clear() if self.cheme.fermList: for ferm in self.cheme.fermList: self.ui.FermList.addItem( "№поз.: <{0}>\tФерма тормозная".format( ferm.pointPositionFerm)) ...
0
d6d4f635481a431a20d4ba93a75b4a23
3e14472b4154e264d023cdb2892e2fd9
Generates a table of right-censored failure data with random censoring.
def kaplan_meier(duration, event_observed): non_censored = duration[event_observed.astype(np.bool)] ts = np.sort(non_censored) unq_ts = np.r_[[0], np.unique(ts)] ds = np.empty(len(unq_ts)) Ys = np.empty(len(unq_ts)) for i, t in enumerate(unq_ts): Ys[i] = np.sum(duration >= t) ds[i] = np.sum(ts == t)...
0
27701817265db1347a6b6f80d0064094
6086a9f3422d2200a7ded5cb1589bd57
Initialize the ordinary graph vector space.
class VectorSpace(object): def __init__(self): self.properties = VectorSpaceProperties()
0
762c9b3d1f77bd7f6b49033096b10bbe
6731fe29bee1dbcd6670d9d7682e73b9
@brief maintain max-heap by checking parent value with its child indexes and work our way down
void upHeapify(Heap* heap, int index) { int parent = (index - 1) / 2; if (parent < 0) return; if (*((heap->p) + index) > * ((heap->p) + parent)) { int temp = *((heap->p) + index); *((heap->p) + index) = *((heap->p) + parent); *((heap->p) + parent) = temp; upHeapify...
0
e1b668e5e7019a69c77dcb70d65af9c9
9ff083d2f8cc52b7e66722d0a36f44a8
adjustedRate is the current rate field rate, rounded down to a multiple of rateStep.
{ if ($price) { $rate = (string)$rate; $type = $type . $direction; $delta = isset($this->_roundingDeltas[$type][$rate]) ? $this->_roundingDeltas[$type][$rate] : 0.000001; $price += $delta; $this->_roundingDeltas[$type][$rate] = $price - $this->_cal...
0
ca66160fee92e8672cb74a326aa42407
fb60788050580af8187808368e8713b7
Delete payment method with its udfs and remove the added columns in employee_payment_methods table
class PaymentMethodController extends DashboardController public function destroy() { }
0
e63a4e6cc4bf245f964864efc581126a
c40c126dbf0867245b5c78c37beb8d91
월 별 매치 정보를 가져온다.
List<MatchItemPO> listMatchItems();
0
58e9c48c14aba80069cad6bc5f8f3b32
927067c0ddaddfc82329fed420879863
Delete the node with minimum key
Node* Fib::delete_minimum() { Node *nt = NULL; Node *t = pointer->ch; Node *t1= t->lsible(); while(t1 != NULL) { nt = t1->rsibling; t1->del(); pointer->sible(t1); t1 = nt; } t1 = pointer->lsible(); if(t1 =...
1
f09e3e7f9f8ece9aa12c9ee48b4c92f6
0d00d82168f68cfb7d4d6d28c78d0f32
Uint8 converts <i> to uint8.
if (i<0) return 0; if (i>255) return 255; return (u8) i; }
1
29a2643ab74b5f1eb384fae81d158e0c
a7ac9aea78e72607227d57ddfd4da857
Returns value of readCount
public int getReadCount();
1
0bf15a08386ab93a570b2e172020b497
9ba0210c1fccdb1dcc6c96947dc7a00e
Outputs the menu in HTML format.
class EMBMenu extends EMBBaseWidget public function renderOutput() { if (!isset($this->menuClass)) throw new CException('No widgetClass assigned'); $items = $this->getItems(); if (!empty($items) || !empty($this->menuOptions['items'])) { $this->menuOptions['ite...
1
d57c0c840e6d723eb71ff7a483280507
d912ec94214552a9f72cf5bd7978abb7
根据类名选择方法名
String methodName = null; while (methodName == null && !Object.class.equals(itemClass)) { if (s_res != null) { try { String key = "ClassUtil." + itemClass.getName() + ".getNameMethod"; methodName = s_res.getString(key); } catch (MissingResourceException ex) { itemClass = itemClass.getSuper...
1
fd9db95e2f4f6f2796502b314b0a6e02
2e9b2b563efcc1fcc80e4e02dae43637
Set true if the mouse lies over the resize picker
class RenderSelectionEditable(RenderSelectionHighlightable): def being_resized(self) -> bool: return self._being_resized
0
2e3f10418866645358feef808345cbf6
83a61d992dc1e73e7a0c032d7cf655b6
Mouse Up :: On mouse release the joint is release and is destroyed
{ if (GetComponent<FixedJoint>()) { GetComponent<FixedJoint>().connectedBody = null; Destroy(GetComponent<FixedJoint>()); objectInHand.GetComponent<Rigidbody>().velocity = Controller.velocity; objectInHand.GetComponent<Rigidbody>().angularVelocity = ...
1
a238112769eb86d78537087031efd1d6
a51678465f5c17b64b4263497e82d10e
Sets the maximum lifetime of the cookie represented in seconds until the cookie expires. A zero value causes the cookie to be deleted. expired; if zero or negative, the cookie should be discarded immediately; setting {@value #MAX_AGE_UNSPECIFIED} value means that Max-Age is not specified
public class SessionCookieOptions public static class Builder public Builder setExpiresIn(long expiresInMillis) { this.expiresIn = expiresInMillis; return this; }
0
341207a086758f1a22a5f066c5bf7933
a79b9904be90ec483391d64c4b097a40
异步创建bucket
namespace OBS public partial class ObsClient public IAsyncResult BeginCreateBucket(CreateBucketRequest request, AsyncCallback callback, object state) { return this.BeginDoRequest<CreateBucketRequest>(request, callback, state); }
1
31a466f8cb6688604a7dd70b310f93a5
96f596b316aea4cf0e715e47cae63a1f
Wrapper around mask rcnn parser to standardize its output to a dictionary.
if rois is None: return [] results = [] for image_id in image_ids: for i in range(rois.shape[0]): class_id = class_ids[i] score = scores[i] bbox = np.around(rois[i], 1) mask = masks[:, :, i] result = { "image_id": im...
1
bce4bc5bb8825094176072cddaea5f4d
3aa64de478cbed5ef3274cc10d353dfc
Gets the value of the tableName property. possible object is {@link String }
@XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "", propOrder = { "tableId", "goodbyeMsg" }) @XmlRootElement(name = "unsubscription") public class Unsubscription public String getTableId() { return tableId; }
0
48ddd6caf7a13e196955cf992ae142ce
e53d68506ec1c795aca32bb74283db22
Allows the module to register for DOM or application events.
namespace Bridge.Html5 [External] [Name("document")] public static class Document public static extern void AddEventListener(string type, Action<Event> listener, bool useCapture);
1
1ce6047aa71df631d7ab406f3bb99b01
3b842d926e03019b37d2e386cbf3f613
Extract 2x2 submatrix from covariance matrix for plotting
param_cov = self.covarianceMatrix() param_cov = np.frombuffer(param_cov.GetMatrixArray(), dtype='d', count=param_cov.GetNoElements()) param_cov = param_cov.reshape(int(np.sqrt(param_cov.size)), -1) return param_cov
0
334fd4f12f48201452b92281333cb267
0d7ebdcd888051f06741275edc63e5f3
Decorator that adds logging to attribute access
def with_logger(cls): attr_name = '_logger' cls_name = cls.__qualname__ module = cls.__module__ if module is not None: cls_name = module + '.' + cls_name else: raise AssertionError setattr(cls, attr_name, logging.getLogger(cls_name)) return cls
0
2ae726dff74dd48ae206df7ee7011bd5
c366e804dac337c290fe169c42cd3353
Returns whether the text include Japanese
function hasJapanese(str) { return some(str, isJapanese); }
1
c0d7d8af594349ab0a325283378f7126
d27ed3c7fe016ef762df88dd55e7e800
Обработка действий нажатия на кнопки предложки у админа
def buttons_handler(user_id, button_text): if button_text == "\U0001F4B4Оплата": open_dialogue("vk_id", user_id, state="PAY") keyboard = VkKeyboard(inline=True) keyboard.add_button("В рублях ₽ или в гривнах ₴") keyboard.add_line() keyboard.add_button("В юанях ¥") keyb...
0
463b57a6f3616426a3cf147af3907f02
5a4ad49cfba606a024dbf88a2c221425
获取标题栏标题文字的颜色
public class MCFStepView extends LinearLayout public int getTitleColor() { return mTitleColor; }
1
9a2b1a9f6948dd935ad55621922e71cc
cadc4b88a45ee11390d58961ec804b65
Sets the expected exception
{ if (method_exists($this, 'expectException')) { $this->expectException($exception); if ($exceptionMessage !== '') { $this->expectExceptionMessage($exceptionMessage); } if ($exceptionCode !== null) { $this->expectExceptionCode($...
1
2e231aa3cf95aa3f8f11361b62f6c2a0
037ba01a802a3895b269ef5e06c8f2a5
Creates an instance of {@link Operation} by operation class.
FactoryOperationService createOperation();
0
af8034b6a78621114318f768866b96bf
6172fd5a983138578252bb7f50b4ad12
Percent point function (inverse of cdf) at q of the given frozen RV. **Parameters** q : array_like lower tail probability **Returns** x : array_like quantile corresponding to the lower tail probability q.
cdf = np.cumsum(pdf) cdf /= cdf[-1] def ppf(q): icdf = np.interp(q, cdf, x) return icdf return ppf
1
3d517da2acfccc042a5dea306193030d
c28bfc66ff23ea1ab29ebc7570209c3a
Returns the meta object for the attribute '{@link de.htwg.zeta.xtext.calculatorForm.FieldInput#isRequired <em>Required</em>}'. <!-- begin-user-doc --> <!-- end-user-doc -->
EAttribute getField_Required();
1
2c29add612945106e522ec5ca6d79ef2
f2f394f5e6fb12cdc4f947c3ac1e512f
转换语言函数,支持多维数组
class ApiBase extends \web\common\controller\Controller private function _setDataLang($data) { if (is_array($data) || is_object($data)) { foreach ($data as &$val) { if (is_string($val)) { $val = is_string(lang($val)) ? lang($val) : $val; } elseif (...
1
c127bae0abfcc51bfa90e160ca3ea52c
b8627f0dd7452e3e0973e0f8cdc8a159
Create a single array consisting of all SQL queries from the migrations.
$configs = Dotz::config('migrations'); $code = []; foreach ($sql as $query) { if (stripos($query, $configs->tableName) !== false) { continue; } $code[] = sprintf('$this->addSql(%s);', var_export($query, true)); } return implode(...
0
a8ed29e10f27ca1e3749825c735fb4c5
1c4367f738ddb92869ffd1b022198b6a
Calculates the due fee for the account deletion service
if acct: bal = float(acct["due"]) - float(acct["paid"]) return f"{bal:.2f} USD" return None
0
79c0118f4a9cbdc2e0699882c796d0fc
48f61c393d43f898925907159245f2a4
Calculates the fire load index.
{ int FuelModel = fire.GetFuelModel(); string SpecificCondition = fire.GetSpecificCondition(); double factor = 1; switch (FuelModel) { case 103: case 104: case 105: case 106: case 121: case 122: case 123: case 141: case 142: case 146: case 161: case 181: case 182: case 183: case 186: case 188: ca...
1
03c45ff854e46f00229073ac838fa566
fc6741a18c31fb8f8e8f3502a963a86d
Forwards methods called on the manager to its query set.
class ItemManager(models.Manager): def get_queryset(self, *args, **kwargs): return ItemQuerySet(self.model, using=self._db)
1
a00e594c52ff8015f0209c1e8c0552bb
0f6c7212d3ce268bd8e8be1c5cb1d0a1
Removes tags by their names from the collection.
namespace LastFmApiJsNet.Services public class Album : Base, IHasImage, IEquatable<Album>, IHasURL, IShareable public void RemoveTags(TagCollection tags) { foreach ( Tag tag in tags ) RemoveTags(tag); }
0
80487ba17b7bfee00ea288ed929475a8
eff391dcb0325411d43976b7a036b7d9
standard deviation of angles
double sdp(arma::vec x){ return std::sqrt(arma::accu(arma::pow(x-arma::mean(x),2))/x.n_elem); }
0
60d6b1fbda3fdc4de75752e781b990e8
9c715671800c83969af2595822797f06
Executes a given transition within an on-going conversation of this conversational object. The reference state of the on-going conversation is updated depending on the executed transition. If the transition requires a message to be sent, the message is sent with the argument passed as parameter. If the new reference st...
ServiceResult<T> action(String nextState, StateContext<C> context) throws Exception;
1
02fc306bb981579853a91c12ad50328e
0a1871ab332bd63826cfd962d7dba6b4
移除图片路径的公共请求头地址
void removeHas_Image_URL(String oldHas_Image_URL);
0
fa0abb8d73b4288c8f6f6a7e397a6720
3c4fbeb18423b9d76c52f72d6a4a4c04
選択中のメニュー情報を iterにセット(MenuitemEditorからのコールバック用)
class MenuitemStore def _add_menuitem(iter, desc, type, acckey, content) iter[COLUMN_DESC] = desc iter[COLUMN_FG_COLOR] = "darkblue" iter[COLUMN_FONT_WEIGHT] = 400 iter[COLUMN_KIND] = "menuitem" iter[COLUMN_TYPE] = type iter[COLUMN_ACCKEY] = acckey iter[COLUMN_CO...
1
2ca9b69be9a4b59121aecba0f768ede0
c67f0070ac8797268285d3344514a82c
Access a copy of the miscellaneous configuration
namespace GoNorth.Data.ProjectConfig public class ProjectConfigMongoDbAccess : BaseMongoDbAccess, IProjectConfigDbAccess public async Task<MiscProjectConfig> GetMiscConfig(string projectId) { MiscProjectConfig configEntry = await _MiscConfigCollection.Find(p => p.ProjectId == projectId).FirstOrD...
1
c366e18c60fda7247150f07a0cf0936a
da2613dd64749cb85f273df5952cee20
Get cache key for get grade from gradebook WS calls.
export class CoreGradesProvider protected getCourseGradesPermissionsCacheKey(courseId: number): string { return this.getCourseGradesPrefixCacheKey(courseId) + ':canviewallgrades'; }
0
495a65336ba9f7bfca956c9ed5ab5520
a6db0df9d6254d0cbfe5d7cdf70f35ef
Checks whether the <paramref name="actual"/> is not in range of values provided.
namespace Testify [EditorBrowsable(EditorBrowsableState.Never)] public static class StandardAssertions public static void IsNotEqualTo<T>(this ActualValue<T> actualValue, object expected) { actualValue.IsNotEqualTo(expected, null, null); }
0
b2cc59d1a3b53bf201a30b90ea66e9fe
63d2244792661789f2f29f8a281340c4
should be UTF-8
def test_validate(): v = wsaccel.utf8validator.Utf8Validator() x = u"Hello-µ@ßöäüàá-UTF-8!!".encode('utf-8') assert v.validate(x) == (True, True, 29, 29)
1
ab4f878b8aea4dfac54faf70f1225eb2
8a4af2a1d51ab65259d13e4189067776
Update quantity automatically.
void updateQuantity();
1
a311cdfb439f5f5f9428923f82f46f47
c29415c8c57c89d2e5e68c1eb976b6ae
解析udxSchema
throws IOException { Udreport instance = new Udreport(); if (jp.getCurrentToken() != JsonToken.START_OBJECT) { jp.skipChildren(); return null; } while (jp.nextToken() != JsonToken.END_OBJECT) { String fieldName = jp.getCurrentName(); ...
0
21cc309aa1f8451fcfa1fc547a63f942
fefc73fa3f5338c7102da271622d28e4
Sets whether ZAP should prompt the user for proxy settings on start-up.
public class ProxySettings public void setEnabled(boolean enabled) { this.enabled = enabled; }
0
1cf701c040cc624711d01b0b544ef5cd
717509d74ddb53f13c092e3a9dd6acad
下载验证码,并通过打码平台返回识别结果
class Spider: def Verification_Code(self): html = self.driver.page_source image_Link = self.pattern.findall(html)[0] image = requests.get(image_Link).content with open('yzm.jpg', 'wb') as f: f.write(image) print("验证码获取成功") cid, result = yundama.decode(file...
1
abea665eda6f9e469d7c01e6590f6c3e
55954b3529e22abec1fd985df4a282ed
通过菜单UUID集合和权限类型获取 权限uuid集合
if(!VerificationUtil.paramIsNull(menuList)) { for(MenuCell m: menuList) { if(MenuType.PERMISSION.equals(m.getMenuType())) { return m.getChildren(); } } } return Lists.newArrayList(); }
0
3dad0a21ec66d42e9047a2f767d559b2
0914a699a6920d1bc6d952446053e2f0
Get data from an object that's part in mongo and part in mysql
self.mongodb = MongoDBserver() self.collection = self.mongodb.get_collection() self.mysql = Mysql_server() self.cursor =self.mysql.get_cursor()
0
2397a2add4dc58151f46fbdb06df44c1
24be45aea2ea3bd78d8f65ba06d6d439
是否可以转为收银
public class PayExtendInfo implements Serializable{ public boolean isSccanPay() { return ((CashierVersionEnum.PC.name().equals(this.getCashierVersion())) && (containsPayTool(PayTool.SCCANPAY))); }
0
77e5aba8d6d8778a6920d20679810da8
29d6e2ec156781786f8ce3b266e329c3
Returns the first line of the object's docstring
def docstring_signature(f): return f.__doc__.split('\n')[0]
1
f69b296322e0b5e4aeb168d18c955a35
f6ded081a890de0b40f5500834d49f19
获取员工相片路径
@Component public class BranAdminConfigService extends BranConfigService public String getCorpPhotoPath(String branId, String userId) { return getCorpUploadPath() + branId + File.separator + "emp" + File.separator + userId; }
1
f0175097d855a6f6719c247aef0b1ce9
2d74e4b0be3dcddd3c501c6610a8e17f
编辑设备名
modifyDeviceNameSure(e) { var that = this that.sendModifyDeviceNamerequest(e.detail) this.modifyEquipmentName.hide(); }
1
e7ff2a14c861c805a1955390d1d623d4
9f52b4d422759c136fbd90b1a8baf9dd
lukee tiedostosta kartan char taulukkoon
public class Kokoaja public static boolean asetaKartta(int id, Line2D.Float[] kartta) { if (roboKartta == null) { roboKartta = new TreeMap<Integer, Line2D.Float[]>(); } if (kartta != null) { roboKartta.put(id, kartta); onMuuttunut = true; } ret...
0
7c014c5f0c5b407ae960fbf2a8412b18
635b39c0a87908f2ad08ea5a21c7ef8d
Query boolean integer value.
def bool_query_param(key): value = request.args.get(key, None) if value in ['False', 'false', '0', 0]: return False elif value: return True
1
88a793c6ec6624e6ae03c488f3f70bbe
fe5b530e561f7a4d0a011e355b6313a0
(Re)Calculates the width of this junction
{ m_iWidth = (for_each (m_vStyles.begin (), m_vStyles.end (), fCalculateWidth ())).GetWidth (); }
1
843ad9a940179fac01ad96e0e7577309
beb6825fc1a0a3aa2b0394cdb904953d
读取内存流中的头4位并转换成整型
{ if (data.Length < 4) { return 0; } int num = 0; if (data.Length >= 4) { var tempBuffer = new byte[4]; Buffer.BlockCopy(data, 0, tempBuffer, 0, 4); num = BitConverter.ToInt32(...
1
b25daf3c1d9c7f97bc2e3e7d8c4fc789
7d6ff6de6bc86e58f0339ac4182f449c
사용자가 컨텍스트 액션 모드를 빠져나갈 때 호출
public class ProcessActivity extends ListActivity private void contextualActionBarSupport() @Override public void onDestroyActionMode(ActionMode mode) { }
1
c860631516ade21b0b660fd848f572b8
b866e361d509821ac7dfad3a82ddd4d1
Add a new entry to the table. Attempts to add a new table entry. Can fail if the specified comtree number is already in use, or if the table has run out of space.
public void create(String logicalEntry, String additionalArgs) throws PermissionDeniedException, BadParameterException, AlreadyExistsException, ParentDoesNotExist, TimeoutException, NoSuccessException;
1
456f1da4144e7bfe04a8bffa9c21828c
6de975a1059c3c37e3aa11e069360240
Add a CSS fragment to the CSS map (each view can have its own CSS fragment) Hash is shared across all views, so if 10 views all load the "My-Table-View" fragment, it will only be loaded once.
if (view == null) { return; } if (this._views[key]) { return; } this._views[key] = view; }
0
2d54bc1874d330a8ad55b3b2d048ea6c
2715676763bed461d470e94f91bd00fd
设置背景颜色变暗
public class AuctionDateFragment extends BaseFragment implements View.OnClickListener private void setScreenBgDarken() { WindowManager.LayoutParams lp = getActivity().getWindow().getAttributes(); lp.alpha = 0.5f; lp.dimAmount = 0.5f; getActivity().getWindow().setAttributes(lp); }
1
42dc1c72c59c0c9cdf463162257fbec5
3e46944fcdf0c75c2bd4a1bb7b973f03
icheck
function icheck(ac,op){ if(ac=='write'){ $("input[name='write_fields[]']").each(function(){ if(this.disabled !== true){ this.checked = op; } write_click(this); }) } else if(ac == 'secret') { $("input[name='secret_field...
1
ba980ffd2dd3b2ce5ff65f294755ae66
ae6e24f432099896de86b2b04d547c60
日付を月日時間整形
struct tm* tm = localtime(&t); printf("%d月 %2d %02d:%02d", tm->tm_mon + 1, tm->tm_mday, tm->tm_hour, tm->tm_min); }
1
75405ad0365b5c605b80acd3f1a278c3
63080e2474989a990c980fc3678a3356
Infects the neighbours
void infect_people(Board* b) { for (size_t i = 0; i < b->height; i++) { for (size_t j = 0; j < b->width; j++) { if (b->current[i][j].state != SUSCEPTIBLE_CELL) { int infected = random() % 100; if (infected < INFECTION_RATE) { b->current[i][j].state = INFECTED_CELL; } } } } }
0
e17ff7c33a954c8d40c2ba4160fbe768
ee434926d2445dfb000d0e8ede9d0234
Given a Google Maps URL, display the contents in a Dialog window
@Override public View getInfoContents(Marker arg0) { View v = getActivity().getLayoutInflater().inflate( R.layout.infowindow_googlemaps, null); LatLng latLng = arg0.getPosition(); String snippet = arg0.getSnippet(); String title = arg0.getTitle(); TextView tvBody = (TextView) v .fi...
0
037e8e6f691bd27200dc9f27b1114704
57825ea80a1b49616324096251c57c36
Метод обработки параметров для ЧПУ контента
{ $params = $this->strip_params_tags($params); $params = $this->format_params_pagename($params); return $params; }
1
4331d20f0b28f0d34cebe48c22afafcb
f5943340c02debd69ebcc5b769068ae6
初始化 TabControl 控件
{ QueryTabControlModel = new TransitionTabControlModel(); TreeListQueryView treeListQueryView = new TreeListQueryView(); m_origanizationTreeListViewVM = new OriganizationTreeListViewVM(); OnChangedNode(m_origanizationTreeListViewVM.SelectedNode); m_ori...
1
c0597d3d47140342b35e29eb876db794
719ce67ea1334432b8695f2c68f3f107
Cập nhật ẩn hoặc hiển thị trường tiền
{ if (cmbPayment.Text != "Cash") { tbxCash.Enabled = false; tbxCash.Text = orderTotal.ToString(); } else { tbxCash.Enabled = true; } }
1
67f0feba5696d1a89ea7a45c8634c3e8
641105e1b1a98372a748c998baccb393
Восстанавливает состояния всех АТМ
void saveAllAtmState();
0
3109714eaccd6cfa229c52449c567457
9e38e894522205e1f0ce84a91cfa34aa
Summe zweier r.Zahlen
def zusammensetzen(int1, int2): str1 = str(int1) str2 = str(int2) return int(str1 + str2)
0
9f6701a271aff3bbc1f829f8f170e295
7cbfe28a92645e9e7d63129dfc4d18e7
Should stop observing the connectivity
class OBDSensorManager private constructor() override fun onConnectionStopped(source: String) { clearListeners() }
1
c905593adc08d37d4fcaedfcebed4856
2624cddc0ff57d4830a7d08448308310
This operation retrieves the contents of the host Text widget
class WindowTextEdit(WindowServer): def get_input(self): return self.txt_edit.GetValue()
1
4e709af3a71b607e078dc49c80facaaa
a6b744c818b8a8f3be78579a8e5f65a0
给一层节点设置房间类型
$.ajax({ type: "GET", url: "/dict/selectDict.htm", data: { "dict.fsParentno": "fx", }, dataType: "json", success: function(data){ var html = ''; $.each(data,function(commentIndex,comment){ html += '<option value=' + comment['fsDictno'] + '>' + comment['fsDictname'] + '</option>'; ...
1
3af18d2b342ccc61cb67814e86956fd2
2a3f1dfbbe395af7c2023a31a9b60f24
Get the hostname based on a node ID
public class NameServer extends UnicastRemoteObject implements NameServerInterface public String getNode(int hostHash) { return nsRegistry.getNode(hostHash); }
0
2336c99d389a7281188bd64d159f9ed9
cefeb8fdb831624d07aa9e82fd1f8752
Shift jumping positions
def jump(): global shooting, px, py x = px y = py y_ = py x_ = px if shooting == False: if facing == "up": y-=2 y_-=1 elif facing == "down": y+=2 y_+=1 elif facing == "left": x-=2 x_-=1 elif facing == "right": x+=2 x_+=1 if isFree(x, y) and ground[x_][y_]!="black": px = x py =...
1
376188d6f6c18fa6de16762408a02b23
6e8aa4a373f61a58f1c7190566cd869e
Snippet for ListTagHoldsAsync
namespace GoogleCSharpSnippets public sealed class AllGeneratedTagKeysClientSnippets public async Task ListTagKeysRequestObjectAsync() { TagKeysClient tagKeysClient = await TagKeysClient.CreateAsync(); ListTagKeysRequest request = new ListTagKeysRequest { ...
0
ba86623100b123e6d8ea9e900bd2c95a
f4dd8ccbb86b76ea597f1020df2b93f0
If we have a running ScriptRunner, shutting down should stop it.
class AppSessionTest(unittest.TestCase): def test_shutdown_with_running_scriptrunner(self): session = _create_test_session() mock_scriptrunner = MagicMock(spec=ScriptRunner) session._scriptrunner = mock_scriptrunner session.shutdown() mock_scriptrunner.request_stop.assert_called_...
1
1f60bf9d39104ef982141941ed25445e
5f860e0df3f84f517935986cf960fa73
Load the hierarchy parsing the file set with set_m_hierarchyFile().
namespace FW void RayTracer::loadHierarchy(const char* filename, std::vector<Triangle>& triangles) { m_triangles = &triangles; }
0
7121f96d8bf19e0a0b723a28363a1e39
7fd5b479cb7eea5b2a14614deb623981
get name by Registration number
public List<Application> getApplicationByRegNo(@PathVariable("registrationNo") String registrationNo){ String regNo = registrationNo.replaceAll("_", "/"); return arService.getAllApplicationsByRegNo(regNo); }
0
9905ff20d76942ceabe639a8e07ed2d7
c101672e9e817d18018e5329e0f7f5af
Encrypt message and store result in vector.
std::vector<std::string> output_vector(smallest_size, ""); for (const auto &c : ciphertext_vector) { for (auto i = 0U; i < c.length(); ++i) { if (i == smallest_size) { break; } output_vector[i].push_back(c[i]); } } return output_vector;...
0
86e066384ff4d88cba0c2fa06f7db487
367ebd74dd0ec38679399c1793a26365
Расширенный алгоритм Евклида
void Evklid::extended_euclid(long a, long b, long *x, long *y, long *d) { long q, r, x1, x2, y1, y2; if (b == 0) { *d = a, *x = 1, *y = 0; return; } x2 = 1, x1 = 0, y2 = 0, y1 = 1; while (b > 0) { q = a / b, r = a - q * b; *x = x2 - q * x1, *y = y2 - q * y1; a = b, b = r; ...
1
5474b7ff30c36c62583aabd72630d468
45c785ec7a223bf187636c1ee2963f1a
This function computes the complex conductivity according to the BCS weak-coupling theory. The equations are from Mattis and Bardeen 1958. Evaluated with Kooi's PhD thesis. inputs
CT = GJ + EIw*n**2/R**2 mu = CT/EI A = 1 + mu*n**2 + k_bb*R**2/EI B = n**4 + mu*n**2 C = 2*n**2*(1 + mu) - k_ub*R**3/EI D = mu*n**2*(n**2 - 1)**2 f_T = n**2 / (n**2 - R/ls) T_c = 2*pi*EI/(ns*R**2*n**2*A) * f_T *\ (A*k_uu*R**4/EI + B*k_bb*R**2/E...
0
26929765caa43b2692aeb3dde65d3a05
0154277b55c9fad6da21f2688de56249
http://stackoverflow.com/a/24176022/5228524
def zip(*iterables): sentinel = object() iterators = [iter(it) for it in iterables] while iterators: result = [] for it in iterators: elem = next(it, sentinel) if elem is sentinel: return result.append(elem) yield tuple(result)
1
0b339a7abab034d1992bf5203c9c37ea
bfdd3881fa4f7cca04df62f7d88e52ba
是否为凑一色
jihai_num = sum(tehai[31:38]) if sum(tehai[1:10]) + jihai_num == 14 \ or sum(tehai[11:20]) + jihai_num == 14 \ or sum(tehai[21:30]) + jihai_num == 14: if debug_flg: print("混一色") return True else: return False
1
82e6763018aa6b3d781324305faa4059
d863d385b01745968814d913023f45d6
Returns the value of the '<em><b>Rationale Text</b></em>' attribute. The default value is <code>""</code>. <!-- begin-user-doc --> <p> If the meaning of the '<em>Rationale Text</em>' attribute isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
String getRationale();
1
596c5a8e8b66eb6663695851d2900369
c3ad2753470afda6d91b5b5c5f237fb0
Looks for city from submit text
let noMatch = true; for(i = 0; i < cityHistory.length; i++){ if(cityHistory[i].toUpperCase() === cityName.toUpperCase()){ noMatch = false; } } if(noMatch){ if(cityHistory.length >= 10){ cityHistory.splice(0, 1); } cityHistory.push(cityName....
1
3e494e3113ef5f0d814623c0641af1a3
0a2a1a122f9e2c74894e3e3bc777436e
Computes the sum of squares error value for two given observations.
def SSE(T, Y): return np.sum((T - Y)**2)
1
17681f9918561a7e3f1b1da234823197
2ca971c08fdb4e96d6fb751bc9a6be3a
更新本地企业信息
public void updateEnterprise(Enterprise enterprise);
1
d79542ecf2fc9211b761c767068148f5
1f2af5fb1c165f3b9b8526cb072d34ad
IP黑名单检测
{ $ip = $this->request->server('REMOTE_ADDR'); $checkIp = DB::name('ipban') ->where('ip', $ip) ->find(); }
1
3dd4e3497c7ea5ef436bf0008c7a6a67
bb65ecd44c30c35c92cefe9657697d16
Notifies the Proxy that it was removed from the simulation.
{ Box2DXDebug.Assert(0 <= proxyId && proxyId < _nodeCapacity); Box2DXDebug.Assert(_nodes[proxyId].IsLeaf()); RemoveLeaf(proxyId); FreeNode(proxyId); }
0
891392196e1f7c2dcb9207c09833a8e4
571f8a414673a5c1a1b513c0133c849d
Create base storage medium (virtual hard disk)
String vdiskDeviceCount, String vdiskDevgrpName, String vdiskPoolName, boolean vdiskDevgrpCreate) { if (vdiskDevgrpCreate) { executeCLI(appliHost, "vdisk pool create \"" + vdiskPoolName + "\" user sysadmin"); executeCLI(appliHost, "vdisk device-group create \"" + vdiskDevgrpName + "\" pool " + v...
1
b6cece4396352143afb6a9a7cc9cfbca
c7e782a52b1e5b269469d82aeb0efe26
Dump all tweets from the streaming API.
api = api_auth.app_access_token_api() assert len(args) == 1, "Expected screen name as an argument" screen_name = args.pop(0) cursor = get_timeline(api, screen_name=screen_name) lib.print_tweets(cursor.items())
0
717790323bf9edb2ccfa04dcf2575502
c7914fdba123337977f523a6a3d6304f
获取Step标注的节点,在整个链路的索引 如果没写Step,则返回0
public class NaviStep public int getStartIndex() { return this.startIndex; }
0
cb0b88c7801fe34eb2d4bf66bf28aa66
f8bdce169bd4d05eb83eec1f34e6b983
Loads default settings Returns: Dict
class JsonFilesSettingsDef(ModuleSettingsDef): def get_default_system_settings(self): return self._load_json_file_data(self.system_defaults_filepath)
1
721c8d9b7ceb2281779dad5f6ffef228
a400ccefb8d82ea9b84ffd84f54abe8e
Determines if an NuGetVersion meets the requirements using the given mode.
{ if (version == null) version = EmptyVersion; int minCheck = includeMin ? 0 : 1; int maxCheck = includeMax ? 0 : -1; return version.CompareTo(minVersion) >= minCheck && version.CompareTo(maxVersion) <= maxCheck; }
1