query_id
string
corpus_id
string
query
string
code
string
label
int64
23369269170deb67e30ce252b6498058
061d54af21f6d3145f046c38181ffd62
从redis里查询配送中的订单列表
public List<QueryOrder> queryDeliveryOrderC(QueryOrderReq query) { PagedResponse<QueryOrder> result= getReadOnlySqlSessionUtil().selectPageList( "com.edaisong.api.dao.inter.IOrderDao.queryDeliveryOrderC", query); return result.getResultList(); }
0
ecdcc5c67f0a74c15a5a0bb97a56f57c
4de47fd5d8bccadc2fc2530980941ee5
This method searches the path "data/" + env_name for the folder which contains the model with the best results of the given environment. In this case best means the highest average trajectory reward.
checkpoint_dir = self.checkpoint_dir if best: checkpoint_dir = self.checkpoint_dir / "best" return checkpoint_dir / (self.env_name + '.pt')
0
6877f9e36f4d6b95a0819db4759ef33c
b5449da6e9e9af3fd1281cfabc6e9788
Decorator for drawing functions
name = func.__name__ @functools.wraps(func) def wrapper(self, *args, **kwargs): if getattr(self, 'name', '') == 'proplot_basemap': return getattr(self.projection, name)(*args, ax=self, **kwargs) else: return func(self, *args, **kwargs) wrapper.__doc__ = None r...
1
044339213fc7737bf1c9d6f6e57c6fb6
9ba3dbde3eee2d94e226a57a904cb884
根据entry的属性值Name,获取对应的dbus path
let path; switch (name) { case 'system': path = SYSTEM; break; case 'room': path = ROOM; break; case 'seat': path = SEAT; break; case 'media': path = MEDIA; break; case 'icon': path = ICON; break; } return path; }
1
e15a1dad0fea12cc6e8d9056d15df238
2d26cbb3cb5eb55049074630b2397690
Returns a list of keys that will expire within the specified threshold.
$current = time(); $results = array(); foreach ($keys as $key) { if (!isset($this->_items[$key])) continue; if ($this->_items[$key]->validUntil !== 0) { if ($this->_items[$key]->validUntil < $current) { unset($this->_items[$key]); continue; } if ($this...
0
bbf033d96cc8b0ab4f51c684946e3f54
876d29a3c5c83e1352bc6f36056728c0
Set the distance away from mouse clicks to search for interacting items. When clicking, the scene searches first for items that directly intersect the click position followed by any other items that are within a rectangle that extends r pixels away from the click position.
class GraphicsScene(QtGui.QGraphicsScene): def setClickRadius(self, r): self._clickRadius = r
1
89aa1b7381c638ab954a8c2009be5244
7343bab3a81e59418b70441d2d6b1ae5
Candidates reject votes from candidates in previous terms.
static MunitResult test_last_term_lower(const MunitParameter params[], void *data) { struct fixture *f = data; const struct raft_server *server; struct raft_request_vote_args args; struct test_io_request event; int rv; (void)params; test_bootstrap_and_...
1
289a249213dfe7a347d08a99cd5921eb
27ed96214ed9b8b233a78bdaa5ce45e5
Apero creation
class AperitifPage: def __init__(self, master): self.master = master self.frame = Frame(self.master) self.master.title('DYONISO - Apéritif') self.master.resizable(width="false", height="false") self.master.geometry("900x600+180+100") self.frame.pack() backgroundAp...
1
8f64106b4d168f7dcf5bacee775f52d1
9243742f02c8b4805435be78c7eb9f48
Взять из базы одну запись, извлечь названия всех колонок и вернуть словарь
descr = cursor_in.description rec = fetch_cur_in d = {} enu = enumerate(descr) for idx, colum in enu: d[colum[0]] = rec[idx] return d
1
f9ebe482b6bf2ce1452b22bb4eba6708
c0a43d28069c0bd1bad4474a33d3790c
根据conditionid获取condition信息
public DispatchCondition getDispatchConditionById(String conditionId);
1
d7e3b30d0dc10df8449a132a0cd29c15
8d79a0bac22f0cfd191dc41ad30d495c
Returns a list of suspected CLs.
def GetCLs(): cls = os.listdir(GetChangesDir()) if CODEREVIEW_SETTINGS_FILE in cls: cls.remove(CODEREVIEW_SETTINGS_FILE) return cls
1
8c7c98365bde82a086f30c08ce350886
288dcb80e7bd24d3470de124c0c7558f
For discrete distributions only
class ContinuousDistribution(IndependentDistribution): def get_values(self): return self.to_discrete().get_values()
0
df7cc5bd263fb07e93534f8999405645
dd81b80da04ed4ff091fb85fd7f03f52
通过实体名字和属性名字获取返回值
public partial class CRMAutoInfo : System.Web.Services.WebService public DataSet ObjectPropertyValueGetBySysName(string bd, long ObjectID, string SysName) { List<SqlParameter> p = new List<SqlParameter>(); p.Add(getParam(new SqlParameter("@ObjectID", SqlDbType.BigInt), ObjectID)); p.Add(getP...
1
906ae8166f31eb137a23f0fdcbb31626
57364a1bf29dd455963114eb90bc0d8d
将jsp中的alert替换成app中的对话框
public boolean onJsAlert(WebView view, String url, String message, final JsResult result) { AlertDialog.Builder builder = new AlertDialog.Builder(WebViewActivity.this) .setMessage(message).setPositiveButton("确定", ...
1
ef8dc80d422fb7c8e0178a07dcc6eac7
c5834a37dfb15d6492e77096f4424653
Called when clicking on the detector face.
class FaceView : UnityGuiView<FaceViewModel>{ private void OnClick() { if (BindingContext.OnClick != null) { BindingContext.OnClick(); } }
1
b8c999a41b328181d6f5545bdcb1ee2d
5f09784e6a37f008acde31ae6f5fa5e2
convert Cond to numeric
def convert2numeric(df, cols): df[cols] = df[cols].apply(lambda x: pd.to_numeric(x, errors='coerce')) return df
1
bf7febc893d726c1f98cd2f792ebef25
c8c0cbfb1d6a0bbd95456dce0d7cb01a
Build archive for a period
[Route("DeleteArchivePeriodic")] public IActionResult DeleteArchives(DateTime startDay, DateTime endDate) { logAnalyserService.DeleteArchiveFilesRecursive(startDay, endDate); return Ok(); }
0
0da3197524b49227316142c8ac74795e
5d4c96cb8f7800ff9fc409b0ec9404d1
Wait for a byte to be available from UART4 RX.
{ uint8_t input; while (app_uart_get(&input) == NRF_ERROR_NOT_FOUND) { } return input; }
1
37c5ebcea341649797d3d98e563a2e56
19519fdc0f8bfa80a1e9bb07c43c6073
获取短字符串,字符格式为:1字节(表示字符串长度)+内容字节
int size = byteBuf.readShort(); if (size <= 0) { return ""; } byte[] bytes = new byte[size]; byteBuf.readBytes(bytes); return new String(bytes, CHARSET); }
0
c8bb31a2ea066573bc81dae83f4efe9e
feb2572b42670b8f11bdeffbe989edc1
Helper function to dump a form within a request object
class RequestHandler(webapp2.RequestHandler): def form_error(self, **kwargs): response = self.response_dict() for key, value in kwargs.iteritems(): response.errors[key] = value
0
dba2d38247436285c924e7f8fce3ec49
6de4d31dad3e12f6ecd1aa4f4a2a1908
해당 영화 리뷰 조회
@RequiredArgsConstructor @Service public class MovieService @Transactional public MovieReviewDto getMovieReviewByReviewNo(int userId, long reviewNo) { MovieReview movieReview = movieReviewRepository.findById(reviewNo).get(); MovieReviewDto result = new MovieReviewDto(movieReview); MovieReviewLike like = movieRev...
1
8df77ab487dd53692e6d75cf3bb15a66
e23336dd4dfdcea3b8205f44e323f862
Check whether target register is symbolized
REQ_STRING_OR_VAR(1); if (!is_var(reg_term(CTXTc 1))) { string val(extern_ptoc_string(1)); return is_symbolic_impl(val) ? TRUE : FALSE; } return FALSE; }
1
14358d36c52a14c62bc3b05f6fbb27b1
a541d420ac2167b5ea3b241c88935595
Calculates apache specific md5 hash
{ return openssl_digest(php_uname() . "-" . $_SERVER["REMOTE_ADDR"], 'MD5', true); }
0
942d49752a89496af545b3e13651b2f1
4d7761b626348b863f489f2df081b3a2
Устанавливает изображение нормального состояния кнопки
{ const String DEFAULT_PICTURE_PATH = "../../Resources/notFound.jpg"; ((Button)button).Enabled = flag; ((Button)button).Visible = flag; if (flag == true) { try { ((Button)button).BackgroundImage = Ima...
1
90c56d7e9feadbd9059e5f8b1a870b1e
2004a6e6d86642de58de6592b4fc3b00
Format wraps global Gytes's Format function.
func Format() error { return sh.Run("go", "fmt") }
0
65e7b43497e3fd8d7f0aa47e2095bb25
44233323ae9bd65d5e7b9f50fd53762b
判断一个字符串是否为有效的java语言表达的数字. <p> 有效的数字包含16进制表示的经<code>0x</code>开头的或者指定某种类型的例如(123L). <p> <code>Null</code> and 空字符串会返回<code>false</code>.
public class StringUtil public static boolean isNumberic(String s) { if (StringUtils.isEmpty(s)) return false; boolean rtn = validByRegex("^[-+]{0,1}\\d*\\.{0,1}\\d+$", s); if (rtn) return true; return validByRegex("^0[x|X][\\da-eA-E]+$", s); }
1
6c5bd44eb659b52f0b7909bfaa6a4647
3503eefac4a7ee32752992cc5a3caec1
合同回款计划列表
class WrkTaskPlanController extends ComplexDataController public function taskListAction() { $contract_id = I('contract_id'); $agreementInfo = D('WrkAgreement')->alias('a') ->field('a.id,a.name,a.branch_id,a.company_id,a.product_options,c.name AS company_name,cu.name AS customer_name') ->join('INNER JOIN sys...
0
36be4fa5538d7aea939bb5c7180b5f04
d0bd4475b51cfdd23795081e51e930ee
Perform the Lucas probable prime test
{ if (((~val & 1) && val != 2) || (val < 2) || (!(val % 3) && val != 3)) return 0; if (val <= 3) return 1; if (val <= 1000) { int i; for (i = NUM_PRIMES - 1; i >= 0; --i) { if (val == prime_table[i]) return 1; if (val > prime_table[i]) ...
0
56ff0a09129cf712a137a306c934ef22
cc4adb02904eff80c4327243ab01d45c
Deep-copy the object pointed to by src into dst. It turns out we can't reuse readStructPointer(), etc. because they do type checking whereas here we want to accept any valid pointer.
func StructCopy(src, dst interface{}) { sval := reflect.ValueOf(src).Elem() dval := reflect.ValueOf(dst).Elem() for i := 0; i < sval.NumField(); i++ { value := sval.Field(i) name := sval.Type().Field(i).Name dvalue := dval.FieldByName(name) if dvalue.IsValid() == false { continue } dvalue...
1
0b041391eed860f1692b12a2021f6ffa
2567c024e439bf8ce694d622dc4a7883
impossible to implement against a Cursor. The child list would have to be backed by the same Cursor, but it would have no way of knowing when underlying data had changed through some other process.
public View newView(Context context, Cursor cursor, ViewGroup parent) { throw new RuntimeException("EventsCursorAdapter.newView is unsupported"); }
1
5dc1f8689334f36efbcebb31e51a32e4
e0eacf6b5496cda38f15aa90224bee3b
模拟扫描完成更新行状态(颜色等)
{ for(int i = 0;i < row;i++) { for(int j =0;j < col;j++) { if(grids[i][j]->getStatus() == Grid::BOOM) { emit finishedScan(false); return false; } } } emit finishedScan(true); return true; }
0
ae04a54d96ac59343979f43c92b5e0b0
3cfcba7f4778699a0e9b9c37daaa4ca5
This function implements the BubbleSort algorithm.
{ if(*head == NULL) { return; } if((*head)->next == NULL) { return; } else { for(struct node *iter1 = *head; iter1 != NULL; iter1 = iter1->next) { for(struct node *iter2 = iter1->next; iter2 != NULL; iter2 = iter2->next) { ...
0
767a0f92af6e46e8a799970736bf6a91
fa62495c5a02a6d5e3dff5962e876f29
Handle a change in the node or relationship domain selections, including regenerating the plot
availNodeDomain = []; availRelDomain = []; graph.nodes.forEach(function(node) { if (availNodeDomain.indexOf(node.domainKey) == -1) availNodeDomain.push(node.domainKey); }); graph.relationships.forEach(function(rel) { if (availRelDomain.indexOf(rel.domainKey) == -1) availRelDomain.push(rel.domainKey); }); }
0
4465b75c97533ecb91efc2a8a93dccf2
2281a3f1732e4caeacf33ed06476ad17
Creates an user report
public class MainFrame extends JFrame public void createReport(UserProfile user) throws MalformedURLException, IOException { Document document = new Document(); user.saveProfile(); user.sortEvents(); Event[] events = user.getEvents(new Date(BudgetPanel.tableYear - 1900, BudgetPanel.tableMonth - 1, 1...
1
61259f9c9b8cad26be6dccfed1562d3f
4330c8e5648e24ae5cbfd5c37c28f09a
Changes user on reservation
class Reservation extends \App\Entity\Reservation implements \Doctrine\ORM\Proxy\Proxy public function setUser(?\App\Entity\User $user): \App\Entity\Reservation { $this->__initializer__ && $this->__initializer__->__invoke($this, 'setUser', [$user]); return parent::setUser($user); }
1
f9571198c177c8b917ef66fc5cdc3f08
8080d0139999c11ed3b0afe96713e120
不借助乘法运算符实现2*16
public class Interview public static void test8(){ int result = 2 << 3; System.out.println(result); }
1
98171f888376ca05c385423928e17da4
6305d4d7d86ed3755e3f8063f74c2816
Get assessment questions
class ComplexDisplayComponent extends Manager implements LearningPathDisplaySupport, AssessmentDisplaySupport, ForumDisplaySupport, GlossaryDisplaySupport, BlogDisplaySupport, WikiDisplaySupport, DelegateComponent public function get_assessment_question_attempts() { return $this->retrieve_question_attem...
0
c981821d2d8751889226e89e02f20319
b640800037423dcb9ee362cd80df5972
Factory method that returns a unmodifiable attribute map with a single entry.
public final class Attributes public static AttributeMap unmodifiableAttributeMap(AttributeMap attributes) { return new ImmutableAttributeMap(attributes); }
0
e319ee10d2b6524b808ea94ea8cb44e2
b308078a9fc0158de44bef167e6815f5
删除队列最后一个元素
{ if(len) { head = (head + 1) % capacity; len--; } else printf("当前队列没有元素!"); traverQueue(); }
0
4b554e688b275c5217a6fdb784ec9b28
0e10bde52f60b92955a7a3fbc37a7fe1
变更实例规格 变更数据库实例的规格。 Please refer to HUAWEI cloud API Explorer for details.
all_params = ['instance_id', 'update_database_req', 'x_language'] local_var_params = {} for attr in request.attribute_map: if hasattr(request, attr): local_var_params[attr] = getattr(request, attr) collection_formats = {} path_params = {} if 'i...
0
8179f1c9274084adc96745714671395c
a50975d5d0d8ae7a6981a5cb473a6cb2
Forwards the contact.html page for the website.
def contact(): return render_template("contact.html")
1
2c0b91b8baf0b3a2efc61e45baf8a170
1ec89ca217e169c6a94a26ef3c94bd90
Get the speed dial 100 settings for a user. The response is either a UserSpeedDial100GetListResponse17sp1 or an ErrorResponse.
namespace BroadWorksConnector public static class OCISchemaServiceVoiceMessagingExtensions public static async Task<UserVoiceMessagingUserGetVoicePortalResponse20> UserVoiceMessagingUserGetVoicePortalRequest20Async(this OcipClient client, UserVoiceMessagingUserGetVoicePortalRequest20 request, CancellationToken canc...
0
2bca0ea6b331cd7fb709e33ac08bb6b0
1b7fddbdcbc32c06b873eb0058f521e1
Get new filter block
class Smile_ElasticSearch_Block_Catalog_Layer_Filter_Attribute_Suggest extends Mage_Catalog_Block_Layer_Filter_Abstract public function getFilterBlock() { $filterBlockName = $this->getSuggestAttributeName() . '_filter'; return $this->getLayout()->getBlock($filterBlockName); }
1
96d5d296626bb98d006ab8c4498def2f
0fbd5d94182e56793ca2d063ea3219d1
Returns a temporary hero with same stats as chosen hero for equip menu
{ character temp; srand(time(0)); cout << "Type your hero's name... \n"; cin >> temp.name; cout << '\n' << temp.name << "'s Randomized Stats:"; this_thread::sleep_for(chrono::milliseconds(300)); temp.health = 120 - (rand() % 40); cout << "\nHealth: " << temp.health; this_thread::sleep_for(chrono::milliseconds(...
0
be73608affa5bce95c7f712113916423
a60b55c129cdf4c675c6ec0ff4420d69
Yield sentences from raw ontonotes stream
def iter_sentences(tx, sent_idx): buf = u'' sent_iter = iter(sent_idx) end = sent_iter.next() len_ = end for line in tx: buf = buf + line while len(buf) >= len_: part = buf[:len_] yield part.replace(u'\n', u' ').replace(u'\t', u' ').strip() b...
1
a3cd22c6408aa2cdf5650da453655eba
2d42780ad792abf5f220031040945a37
Returns the number at the given position (0 being the rightmost)
class CalculationPresenter private getDigitAtPosition(num: number, position: number): number { let str = num.toString(); return position >= str.length ? 0 : parseInt(str[str.length - position - 1], 10); }
1
0a28ddc41f96bd4dfa65d3c004798e73
75e0722dd520cdb42703d646c0a0892d
Очистить поле поиска по классификатору
public void clearFieldSignalButton (ActionEvent event) throws SQLException { listViewFindKks.getItems().clear(); dbselect.SQLDeleteFrom("dbselect","findkks"); }
1
6f8bf8c8033314b4d1b1495d23e83197
f09c3026bc770a4cbbaae4550d72e95f
Sets the ID of the first post of the topic
public void setFirstPostId(int topicId, int postId) throws Exception;
1
2be3504942515c6114d6d03e560e5fe9
230e654968ae0ec4604fe87b2fd72238
projects the columns of the oldRelation that are found inthe prms2prjt. Matches their order as well.
public class Dbms public Table project(Vector<String> _heading, Table _table) { if(_heading.isEmpty() || _table == null) { System.out.println("Error:Dbms:project: one or more passed arguments is null, nothing done"); return null; } Vector<Integer> newHeadingIndex = new Ve...
1
bb926e65c6b33b05c6e4a4f06dfa2c3e
f47d863ab9195fa76340711a2b2dbcd1
Mark time entry as unfrozen
$bReturn = false; if (!self::isFreeze($this->status)) { goto END; } $this->status = self::STATUS_NORMAL; $this->unfreeze_time = date('Y-m-d H:i:s'); $this->setNoteInfo(array( 'unfreeze_reason' => $sReason, )); $bRetu...
1
57a5566f462369a3c3f3f50cfcca03f4
4ca7bbcc7fdf66f80477e240a5df1acd
插入用户名和密码 (非 Javadoc)
@Service @Transactional public class UserService public void insert(User user) { user.setPassword(passwordEncoder.encode(user.getPassword())); repository.insert(user); }
1
e44b7a6bf2db1a01a9f63525471130f4
a0090ae4306133f141e9dd2e3d1424a7
Sets the value of the 'dtmOfflineFrom' field.
public class X_FTA_SuggestedProduct extends PO implements I_FTA_SuggestedProduct, I_Persistent public void setDayFrom (BigDecimal DayFrom) { set_Value (COLUMNNAME_DayFrom, DayFrom); }
0
ac060cda1394f4f9899b01312c866dff
b90f2fb782579bef4cebc5db88fc3f54
Loads the file specified and returns a pandas dataframe
class TFFileHandler(base.BaseFileHandler): def load_data(cls, filename): return pd.read_csv(filename, index_col=0)
1
3e9da96959ea73a7f17eb317c69b1445
ccb05bd5a51c101924fb2e49270024a7
退社日は入社日以降
if self.joined_on.present? && self.resigned_on.present? && self.joined_on > self.resigned_on errors.add(:resigned_on, "は入社日以降にしてください") end end
1
0ec4c4345ef665108ef998cbe4cb4c79
c03f8b8fdfe0f3e8e47779151e7d77a6
シーンをロードする(パラメータ付き)
System.Action onStart = null, System.Action onComplete = null, System.Action<float> progressCallback = null, WaitSceneActivation waitSceneActivation = null) { StartCoroutine(LoadSceneAsyncCoroutine(SceneManager.LoadSceneAsync((int)scene), onStart, onComplete, progressCallback, waitSceneActiv...
1
80b74910c1503d157127243479869631
87c14dbb27ded8a45c1cf9657a57cca0
funcao de visao computacional simples para detecção de objetos cor verde, também pode-se alterar para a necessidade em especifico
def edge_detector(img): height, width = img.shape[0], img.shape[1] resultado = np.zeros_like(img, dtype=np.float) soma = np.zeros_like(img) GX = np.zeros_like(img) GY = np.zeros_like(img) hor = np.zeros((3, 3), int) hor[0,0] = -1 hor[0,1] = -2 hor[0,2] = -1 hor[1,0] = 0 hor[1...
0
775342701155567dc4d436e4ef4b8319
fcbc399b2e84d3b97d3e8690eec00fb7
Converts all strings occurences in list or dict into unicode.
if type(s) == bytes_type: return s.decode(UTF8) elif type(s) == list: return [_unicode_definite_object(v) for v in s] elif type(s) == tuple: return tuple([_unicode_definite_object(v) for v in s]) elif type(s) == dict: return {unicode_definite_object(k): _unicode_definite_...
1
dd56009612c93e7459ad7063c1b93085
da9623db8c714ac5ccb401a85755071a
依据空格分割切片
export default class Util static splitBySpace(str: string): string[] { return str.split(' ') }
1
ddb40ff5357ed2b2a3c50448d72b6ac1
e15c6fdd07d8fa934ef12c4810f25e7f
查询标签组的设备数量
public class BaiduPushHelper public QueryDeviceNumInTagResponse queryDeviceNumInTag(QueryDeviceNumInTagRequest request){ QueryDeviceNumInTagResponse response=null; try { int deviceType = request.getDevice(); if(Constants.BAIDU_DEVICE_TYPE_ANDROID == deviceType){ setAndroidChannelLogHandler(); response...
1
840af21548249947c2fe7c388418686d
b893bbb044ceb4063b7916e4e0bbd818
Gets the effective group membership of this user.
namespace TestADGroup [Serializable] public class UserAccessDetail private Collections.CaseIgnoringSortedSetType NetworkGroupsForUser(string userLdapPath, bool recursive) { Collections.CaseIgnoringSortedSetType groupMemberships = new Collections.CaseIgnoringSortedSetType(); retur...
1
1f1d950aad8a5f90135f93c006af6a0b
0e950da7f4b5494d928ecda0efa5bcc9
Returns deal end time.
namespace SunGard.Adaptiv.Analytics.Models [Serializable] public abstract class CommodityForwardDealBase : AssetDeal public override double EndDate() { return Maturity_Date; }
1
37cd0fd4f84bb8c586b2b3fc90913fa9
9ebdd0c6118c6db92af3ca63f13ae827
保存默认地址事件
if (state.addressList.length !==0) { if (content.isDefault){ let isDefault = state.addressList.find(item => item.isDefault === true) isDefault.isDefault = false } } state.addressList = [...state.addressList, content]; setLocalStore('addressList', state.addressList); }
0
a2f86d0f18812e3e1079de306ae3a0b5
037be96640d5d6815bbbefd13254bcd3
méthode qui retourne le lien concernant la page A propos
abstract class Skin extends ContextSource function aboutLink() { return $this->footerLink( 'aboutsite', 'aboutpage' ); }
1
cee532b8c80c3f1a66342fc40f4e77e9
a9fad77a139ad42f931a2b3edc904e83
定义旋转操作 - 前逆时针
rotateL(){ this.shape.rotateL() if(!this.canRotate()){ this.shape.rotateR() } }
1
231222baa93c32588bf904276c9b9de5
254890ba6b858dca81de80db1a287c4b
Fetches all the Policy Documents.
Connection con = null; PreparedStatement statement = null; ResultSet rs = null; List<Policy> policies = new ArrayList<Policy>(); try { con = ConnectionManager.getConnection(); String searchQuery = "SELECT * FROM policies"; statement = con.prepareStatement(searchQuery); rs = statement.executeQuery(...
1
4c62dc64bf6b27b9d38ec3632d36d336
06557bf004f8e48546b78a533c34d9d4
Clear filter value for given column.
class TableColumn(ApiComponent): def clear_filter(self): url = self.build_url(self._endpoints.get('clear_filter')) return bool(self.session.post(url))
1
c729f72547786653603b9988e9a7cb29
b79866443e5621045575f6d651757a84
現在のレベルから次のレベルまでの経験値達成率
if level_diff<=5 then return 1 else if level_diff<=10 then return 0.8 - (level_diff-5)*0.1 else return 0.2 end end end
1
962f83c4445c99e86680fe35e5f21553
1bfe935c103a2dd052083e3a304433fe
Sets the acct code.
public class OnPremiseEquipmentVO extends BaseVO public void setScacCode(String strScacCode) { m_strScacCode = strScacCode; }
0
4b598bc884154cc25ee6435f9e184493
e56c4e4266b49214828c7f8e7d4cb95f
Test POST with body
r = requests.post (self.base_url, json=self.body_data) result = r.json () print (result) self.assertEqual (result["code"], 0)
1
c6571f33bd43c6ad5dcdd971c18940bf
18305eb6d74eb2ea2a5edbb440d24a88
Description: The given invalid last name returns false in this test case.
class ExampleTest extends TestCase public function testFirstNameInvalid() { $firstname = $this->getRandomString(256); $this->tryInvalid('last_name', $firstname); }
0
a706ff21c45bbd43cc726b0f3d43c4d8
e2899e99cdd4c556b3eb88d3c3c913b9
Retrieves a name of the foreign function or the details on the referenced address.
class DisassemblerContextAPI(object): def get_function_name_at(self, address): pass
1
918955bb6e071232e31cdfe9aefbe938
41e7104b589592ad79975f690d76d5ca
Test, whether the next invocation of this base query, in the same direction, will yield any results.
boolean hasNextQuery();
1
7e28521fa8fbc417e0dcabdc5b7bf38f
7bc6caeb2f449303602814a53bf153ae
GET: ChiTietPhieuNhap
namespace WareHouseSystem.Controllers [Authorize] public class ChiTietPhieuXuatController : Controller public async Task<IActionResult> Index(int? id) { ViewData["id"] = id; var phieuxuat = (from N in _context.tb_WMS_PhieuXuat where N.ID == id select N).Include(s=>s.tb_WMS_NhanVien).Firs...
0
07c95377574334bf3c3d16b4ce428c4d
0b7d0d7e6961e1580e04c82b98e7f17c
Deletes FA and all its dependencies
{ if (!$filter) return false; $this->deleteParent($filter); $this->deleteDepends($filter, $subSdf); return parent::delete($filter); }
1
962b2f8bbcc5275d6d1c433924986cd7
062d24d5e43550a859523efd6f77dd23
Return true if the given text has been tweeted in the last 7 days.
function isTweetable(text) { return text.length <= 140; }
0
a10406c7fbb5dc1faf0cfd8301835633
ff18373694b8cc6b4972e5c6aa2193e5
Leave a Channel If you're no longer interested in being a member of an existing channel, you can leave the channel at any time. Use this API to leave a specific channel. After leaving the channel, you can no longer access information from that channel. <p style=\"background-color:#e1f5fe; color:#01579b; padding:8px\">...
all_params = ['channel_id', 'reason'] all_params.append('async_req') all_params.append('_return_http_data_only') all_params.append('_preload_content') all_params.append('_request_timeout') params = locals() for key, val in six.iteritems(params['kwargs']): ...
1
0cef6a8fd79b60532184330263f4b297
18dcc2cb35c90708ed655066ccd05e63
执行月分红发放操作
class Cron extends MY_Controller public function ly_fix_monthleader_bonus_3($uid,$commission){ $this->load->model('m_profit_sharing'); $this->m_profit_sharing->assignSharingCommission($uid, $commission,23); }
1
dd248e8a8a5f5c4acee4994cad1cd30a
65d3f70c45ddba45ef05304492d52585
Gets the page area from the given area.
{ area = this.rectangleArea.IntersectWith(area); if (area.IsValid()) { var result = new BoundingBox { Min = this.GetRegionAt(area.Min).Coordinate, Max = this.GetRegionAt(area.Max).Coordinate + this.tileSize, }; return result; } ...
1
a0b3a817a3376d20082051ffee7fb348
430c99aa33151973f123001cf30bfc33
根据options的设置,再次初始化日志系统。
const { level, levels, stream } = this.options; if (level === 'all') { this.level = -1; } else if (level === 'off') { this.level = Infinity; } else { this.level = levels.indexOf(level); } if (stream) { const opts = Object.assign({}, this.options, stream, { level: ...
1
24a288203005acc065f55c7ac5a88af7
99c18d922a27a8a9718095900c849276
Leitura do cabeçalho de um arquivo binário
{ BTCabecalho *c = (BTCabecalho *) malloc(sizeof(BTCabecalho)); if(c != NULL) { if(ftell(bt) != 0) fseek(bt, 0, SEEK_SET); fread(&c->status, 1, 1, bt); if(c->status != '1') { free(c); c = NULL; return NULL...
1
b8ab822773c5d0288d026f3ebaeba5b9
3a652f61a6339403b63e9d072c178135
返回当前锁定模式
QtLockedFile::LockMode QtLockedFile::lockMode() const { return m_lock_mode; }
1
42008314424b5360b00f4d944075bb57
7369a95c4f76488dac454127814d6d58
переход с экрана меню на игровой экран
{ myBF->hide(); myShips->hide(); ssMenu->hide(); gMenu->show(); myBF->reset(); ssMenu->reset(); if(isServer) stopServer(); QApplication::processEvents(); this->adjustSize(); }
0
e99d81d41eb88ff7ece224d02aab3d5f
8b506f095e284f6839c3c41c11cb5471
Writes two bytes to the internal stream.
namespace Renci.SshNet.Common public abstract class SshData protected void Write(uint data) { _stream.Write(data); }
0
31be2b829c23b0a3cceab458865f7430
371beb70c40eb63d32ac3c95b37f7700
## from DoE.base
att <- attributes(object) nspec <- att$nspec dimens <- att$dimens svar <- nspec*prod(dimens) if (is.null(nspec)) nspec <- 1 if (is.null(dimens)) dimens <- length(object$y)/nspec if (is.null(att$ynames)) if (is.null(dimens)) varnames <- colnames(object)[1:nspec] else var...
1
5053f7ad079c84e30abdb6e55a412c4b
15c0f175532ed5797b8222f95bfb57c9
datagridのセルをクリックしたかどうかを取得する
namespace Winform.UserControls.DataGridViewColumn public class DataGridViewOneButtonCell : DataGridViewButtonCell public static bool IsButtonClick(object sender, DataGridViewCellMouseEventArgs e) { if (e.RowIndex < 0) return false; var view = sender as DataGridView; var d...
1
3d74aacf335a9d50cf0af828d64f2287
4f3fff8766a134f38d1a450899ace7fd
Из черновика в опубликовано.
class CopyEditionToDraft(WebTest): def test_copy_edition_to_draft(self): self.assertEqual(Draft.objects.count(), 1) res = self.app.get(reverse('mcms:baseclib:edition', args=(self.edition.id,)), user=self.user) form = res.forms[0] ...
0
700955672a59d5cd6b9bc00b040608a7
0e6a8b39420d849ec3e7d22c94df405f
加载病虫害预警数据
function load_updata() { load_siwei() }
0
32da119b8f4d7916fbb9d66d8206b183
d46d4bad4841a1f9a2cb7fc2b022d5bb
Sends launch report to server
URL url = new URL(this.reportURL); HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); httpURLConnection.setRequestMethod("POST"); httpURLConnection.setRequestProperty("User-Agent", "PhoneMonitor"); httpURLConnection.setDoOutput(true); httpURLC...
1
37f47f3a5eb8b175345eaf819a0fab9d
e9158dfa880663072c8cba879b759b0b
Construct an RF2 Filter context
:RS_FilterInterface() , graphic(nullptr) { RS_DEBUG->print("Setting up DXF 1 filter..."); }
0
544c69c9351686b184c2a85ab147ac87
925e1f9d27ce3d9f1839c1fabe48ad18
导出Excel-EPPLUS
$xlsTitle = iconv('utf-8', 'gb2312', $fileName); $xlsName = $fileName.date("_Y.m.d_H.i.s"); $cellNum = count($expCellName); $dataNum = count($expTableData); Vendor('PHPExcel.Classes.PHPExcel'); Vendor('PHPExcel.Classes.PHPExcel.IOFactory'); Vendor('PHPExcel.Classes.PHPExcel.Reader.Excel5'); Vendor('PHP...
0
1363c5648ff4be1d60f087a155b60406
b50d0456c78e85ba8e4c014e4ccf5ab5
通过address地址判断资源是否已经下载
{ SetUpNetStep(UpResourceNetStep.GetServerAddrFromHttp); string serverAddr = GetArrayAddresData(assetsAddressData); downLoadCompletedCall = AddressDataCallBack; IEnumeratorManager.Instance.StartCoroutine(DownLoadData(serverAddr + "/" + mAddressFile)); }
0
2d88cfb3be0732829e5c708c5315f900
4f1718c4b13734fbec725b6a675ab5e7
?? Util.PrintTable(o: table) * Return a formatted string of the table
function tb.table_to_pretty_string(tbl, prefix) str_out = "" if prefix == nil then prefix = "" end for key, value in pairs(tbl) do str_out = str_out .. prefix .. tostring(key) .. ": " if type(value) == "table" then str_out = str_out .. "\n" .. tb.table_to_pretty_string(value, prefix.." ") else str_ou...
1
7a4cbad4320a059602894701ab21b503
6d252e6937c8d256427f332acce0103e
method to create session according to user defined Nepali Date
@Transactional SessionDTO createSession(String reqUserName, AppointmentDTO appointmentDTO);
0
c184639b45054d0f8fd6a8ffd3dc2ea8
0479e278350aa9a9100b3277355dfcf4
<p> Get all promotions in system. </p>
public @ResponseBody ModelMap index(HttpServletResponse response, HttpServletRequest request) { ModelMap model = null; try { model = new ModelMap(); ArrayList<HashMap<String, Object>> productList = new ArrayList<HashMap<String, Object>>(); if(promotionService.findAll().size() == 0) { model.put("promot...
1
5fc26f36f731d8df43bd119a69abea42
1c53e8f79237b822a691af48cc4b89d6
初始化协议内容
var result = protobuf.parse(filedata); var packageName = result.package; logger.debug("parse package:", packageName); var objects = result.root.lookup(packageName).toJSON(); Object.keys(objects.nested).forEach(function (protocolName) { var protocol = result.root.lookup(packageName + "." + pr...
1
1c8c1c12aed1207f7361023d488f0c78
29bc7cdfad41b7eb52f2e7edf2672b8d
Tests that a DAG with multiple nodes can run correctly.
dependencies = {'a': []} funcs = {'a': a} name = 'test-taskmap-name' graph = taskmap.create_graph(funcs, dependencies, name=name, logging_config={'write': True}) graph = taskmap.run(graph) assert any(name in f for f in os.listdir('./'))
0
1cb73bf68bd87304f9ebefd9282ea897
cb07000b412d46412799073194252180
UriNormalizer constructor.
class UriNormalizer public function __construct(UriInterface $uri, array $options = []) { $this->uri = $uri; }
1
6e9a37ff66ea12866e52dbf461f44446
ac79b74fb7baa108e7d8493735eec95f
Specifies how the width and height of an element should be calculated. See <a href="../../Documentation/HTML/Styling/Attributes/Display/box_sizing.html">Documentation</a>
@JsProperty String getWidth();
0
febb263c94086d456a7e8a00f06dd20c
1724145c5f49e0b541f9cf65bd0e9d64
Вернуть объект окружения данного токенизера
{ if (is_null(self::$environment) || $refresh) { self::$environment = new self(); } return self::$environment; }
1
cc203c62e317c111424c31170fe31831
876424e254e6e85164b52c5c7af9a4d3
Dado una ciudad y un rango de años obtiene la cantidad total de personas que van a apartamentos turisticos de esa ciudad Dado una ciudad y un rango de años obtiene la cantidad total de personas que van a apartamentos turisticos de esa ciudad
def obtener_cantidad_turistas_y_paises_en_pais_en_anio(PaisDestino, Anio): conversor = Conversor() repository = DBRepository() cursor, labels = repository.ObtenerPaisOrigenYNumeroTuristasAmadeusMensualmenteEnUnAnioTotalesDadoPaisDestinoAnio(PaisDestino, Anio) arrayTuplas = conversor.ConvertirCursorToT...
0