query_id
string
corpus_id
string
query
string
code
string
label
int64
dac91a12daee68090e6d170fa39a70bd
21f1c2c966e1fbea752ed8c5da11973a
Verifica que a un GET lo redireccione a /login/.
url = reverse('quejaDetalle', kwargs={'queja_id': 1}) response = self.client.get(url) self.assertTrue(isinstance(response, HttpResponseRedirect)) self.assertEqual(response.status_code, 302) self.assertTrue(response._headers['location'][1] == '/login/?next=/quejas/1/')
1
6db32ca0c554a551c951d9cebdbfaedf
a004f30b9d9181bb21eb4ee6b6712620
Maps built-in parameter ids to the supported ids. In general, this is an identity mapping, except for special cases identified in the private function IsDuplicateParameter.
public class DatabaseManager public static synchronized void updateRemoteIdMappings() { PreparedStatement selectMappings = null; ResultSet mappingResults = null; Connection conn = null; try { conn = Web_MYSQL_Helper.getConnection(); String query = "select paramete...
1
9b7dd8af065dcc477bdce1bae3ff81bd
65039ec8ca855ec42211ec9d367823e9
1.通过preferences配置信息构建CordovaWebViewEngine 2.通过CordovaWebViewEngine构建CordovaWebView
public class PhonegapEnyoTest extends DroidGap @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); super.loadUrl("file:///android_asset/www/enyo/lib/onyx/examples/Settings/index.html"); }
0
e88c308f553fef350eb0dc2da4f51fe0
2ee6ba59d272327a1316c5a28d83c2c7
根据查询SQL语句与命名参数列表创建Query对象,SQL中参数按名称绑定 参数Map
public Query createQuery(final String queryString, final Map<String, ?> values) { Validate.hasText(queryString, "queryString不能为空"); Query query = entityManager.createQuery(queryString); for (Map.Entry<String, ?> kv : values.entrySet()) { query.setParameter(kv.getKey(), kv.getValu...
1
16d7a64dfd97967ba8e9ca933c7bc3a0
375fc8701f635d351e255406fa8393b4
Set the size of the scrubber.
class TimeControl(UI_Object.UI): def endScrub(self,value): self.edit(endScrub=value)
0
4aa2568ad9b4a54e2942407246a1e250
0c4bd4d2cb9c0c4b095266afe054395b
HTTPS connections are not verified if ``verify_peer`` is false, even if a ``verify_ca_path`` is provided.
class DefaultConnectionParameters def initialize super self[:verify_peer] = true end
1
d8f1c0933dcce13be67554ce1b497eaa
642aba9dabdc5f0b6303494d2a39df1c
Convert to Annual Effective Interest Rate.
class NetOperationalValue: def calc_annuity_factor(self): fx = pow(1.0 + self.discount_rate, self.lifetime) return self.discount_rate * fx / (fx - 1.0)
0
fe931e126a49d13ffc5791a65a890652
10e319a8127ee23b15f6b73c662fbd8f
Replaces define statements in options.rpy.
if re.search(r'\braise\b', line): return '' line = re.sub(r'#@.*$', '', line) comment = '' m = re.search(r'#.*$', line) if m: comment = m.group(0) line = re.sub(r'#.*$', '', line) line = re.sub(r'\bint\(', r'int_value(', line) line = re.sub(r'self\.', '', line) line = re....
0
d3b44724f3f5367a8de4a3258bee64ae
b98481b10e0bf844384e5cc8026ff9b0
Specifies the values for weekly recurrence pattern.
namespace Kendo.Mvc.UI.Fluent public partial class SchedulerMessagesRecurrenceEditorYearlySettingsBuilder<T> where T : class, ISchedulerEvent public SchedulerMessagesRecurrenceEditorYearlySettingsBuilder<T> RepeatOn(string value) { Container.RepeatOn = value; return this; ...
0
eaceb9a4f634a9804219bb0622a06c14
7b2fc2c683bdc74d5d075fac14f5e32e
Adds a single game state to the list of game states for this game.
class ChessGame def add_game_state @game_states_count[current_game_state] = 0 if @game_states_count[current_game_state].nil? @game_states_count[current_game_state] += 1 end
0
493394950ba7ff86fc19aa05697dd69d
b4d7ff77fb68c1c05bcdb854e68cca76
Check to see if StageId property is set
namespace Amazon.Athena.Model public partial class QueryStage internal bool IsSetStageId() { return this._stageId.HasValue; }
1
2bcbf553908f44dc2b84c2d92827bd66
efefc89117f21325dee437baa446cfc4
エラーコードに合わせたエラー内容をアラート表示
{ try { customShowError(errorMsg); } catch(e) { alerw(errorMsg); } }
0
2d41c8a0c978434e8d31bfb93a97ac23
bcb506af1e463edd1796eb444c1de6b3
Prints message for when Administrator is not logged in
return <<<HTML <p>No user is currently logged in.</p> HTML; }
0
b0a35ace472608542ddb0446f25cc854
cea4e80695ceefb84aa0d4b1ff0de362
Display the specified LeaveType. GET|HEAD /leaveTypes/{id}
class LeaveTypeController extends Controller public function show($id) { }
1
4776895b80388cd48c351d68c2c2f063
092cec7f2447e237a95edcae4ecfa309
@summary: Method to remove conditions bound to slice monitoring data (to be exported public)
metrics_run_root): curr_date = ctx.obj['CURR_DATE'] metadata.add_optional_job_metadata(metadata_conn, command, run_id, curr_date=curr_date.isoformat() if curr_date is not None else None, retention_months=confi...
0
63fdbf80d1a68f22080287f8ecfa1516
25f8902b2a1201008b6a097724e8ed7b
<Summary> Load the content of the character's abilites </Summary>
{ SO_Ability[] abilities = Resources.LoadAll("", typeof(SO_Ability)).Cast<SO_Ability>().ToArray(); foreach (SO_Ability ability in abilities) { if (ability.abilityVFX != null) { vfxGameObjects.Add(ability.name, ability.abilityVFX); } ...
1
a7d04c9904e2464833ca23ec37070887
f4e3f4173c96fbf91ab75528bb4fa6b1
Return the URLs of all the links on a page together with information about their "rel" attribute, for determining which ones to treat as downloads and which ones to queue for further scraping.
def get_links(link_header): links = {rel: url for url, rel in re_link_spec.findall(link_header)} return links
1
cca103d8d24b91d8d66ef6bf566ca8a7
ae1357bb9220b3590245324666f2300c
Pull gig data out of gig details page HTML soup Returns an dict of extracted data { "location": "Post Office Hotel, 229-231 Sydney Rd, Coburg VIC 3058", "date": "Sun 30 Jun 2019", "time": "4.30pm", "support": "Ekranoplans", "price": "FREE", "genre": "Electronic", },
address = response.get("address") addr_line = "\n".join( filter(None, (address.get("line1"), address.get("line2"), address.get("line3"))) ) dates_hours = response.get("pollingHours") if dates_hours: dates_hours = dates_hours.replace("<br>", "; ").strip() return { "locatio...
0
a2dfb48e21733bcceac69f01f97cc782
6c3ac318b3c050f70d722f9099312df0
function to check whether a stack is empty or not
if(top == -1){ return 1; } else{ return 0; } }
1
c3d26295634796423121e984d32af1c2
0754cbf3cc130b8a23e46a613fb49dec
根据销售单和库位查询退货信息信息
public Result getReturnAndWarehouse(BillPaymentReq billPayment) throws Exception { if (ObjectUtils.isEmpty(billPayment.getSupplierId())){ return Result.error("参数supplierId不能为空"); } PurchaseReturnBaseReq returnBaseReq = new PurchaseReturnBaseReq(); returnBaseReq.setSupplierId(billPayment.getSupplierId()); ...
0
d6d83647fd8ac3205adeaff122bf310c
1ef7b59cf7bcf767f77ac1b9f11cb7ca
Sets the AI position: win, block win, or random
{ if(_ai == 1) { BeginnerSelectPosition(); } else if (_ai == 2) { IntermediateSelectPosition(); } else if (_ai == 3) { ExpertSelectPosition(); } }
0
d6e32fa3c44a59d3239e37c30ccf5e45
a635f4c492446ad7309f2015d1930477
This information is used to create a new shoe.
class shoesController extends Controller public function create() { return view('shoes.create'); }
0
89f2fc793aba0866ec433397da710525
2959dce3fc951dc71791e5f374385a94
调用签权服务,判断用户是否有权限 { code:"000000" mesg:"请求成功" } </pre>
public String signed(Integer userId) { return eurekaUtil.remoteInvoke(Server.BEEBEE_USER_THRIFT_PROVIDER_CLIENT, Method.USER_SIGNED, userId); }
0
3e73321a78f79ef3b3329baf9face556
4b417fe2d9a499f62db52f5d85d140e8
Fetches specified change record from those that make up this transaction.
public abstract class AbstractChanges<T extends Change<T>, K, V, O extends Operation<T, K, V>> implements Changes<T, K, V, O> @Override public T get(@NotNull final K resource) { return changes.get(resource); }
1
49d5f014eda96f3db664d181fb35bcb7
4415114c64901c1b743b5777f811ca0b
A function that reads a text file (UTF8) and prints it to stdout
with open(filename, encoding="UTF-8") as f: for line in f: print(line, end='')
1
a44d1ee52a9ac8e5656f01bd523263fe
a98aa76b8e0a639586a2e6fbceffa21a
Удаление id товара из сравнения товаров :param id: ид товара
function drop_from_compare(id){ jQuery.ajax({ type: "GET", url: "/shop/compare/drop/", data: "product_id=" + id, success: function(result){ if(result['error']){ Notification("Произошла ошибка: " + result['error'], "error"); }else{ result['success'] += "<br><a href='/shop/co...
1
3c8d00d1e2712e5df0e69e8fb8317cf8
d59337b25a65a278715c592f8bc50945
得到未发货的订单信息
async function getUnpayOrders() { let result = []; for (let key of global.orderMap.keys()) { let data = await getGoodOrderDetail(key); result.push(...data); } if (result) { return new global.succ.SuccessModel({ data: result }); } else { return new global.errs.updateInfoFail(); } }
0
75eac9ac2678d837f2c4d5463e550978
31d194c0082d877802546e9b8a087637
获取 HTTPS证书路径
public class HoverflyConfig public String getSslCertificatePath() { return sslCertificatePath; }
1
ae455e00fda2554698b04eed752efe12
6dc3474ceef6bd96e5a3be7865a25f6d
function that returns the gaze points for an episode
return Rx.Observable.defer(function() { console.log(counter, 'init gaze', patterns); var gazer = new Gaze(patterns); return Rx.Observable.fromEvent(gazer, 'all', function (x) { return x[1]; }); }) .de...
1
58a0dcedd6b45994dc545047787eb1c2
3a38c27912a5a74555400898fbea5b82
App-specific constructor statements.
void CExampleAppUi::ConstructL() { BaseConstructL(); iAppView = CExampleAppView::NewL(ClientRect()); }
1
44b0d14731b33a7caf934cd0268a5fd4
4da0e4fa3d9ad15f7863f27e2a102590
Function: Calculating the scale of the first peak. Reference: Eq(25, 26) in arxiv:9709112v1
Z = self.get_scale_sample(image) add_temp = cv2.reduce(cv2.mulSpectrums(Z, self.A, 0, conjB=False), 0, cv2.REDUCE_SUM) scale_response = cv2.idft(complexDivisionReal(add_temp, (self.B + self.scale_lambda)), None, cv2.DFT_REAL_OUTPUT) _, pv, _, pi = cv2.minMaxLoc(scale_response) re...
1
63573960e53ad7d3254751fb54853d28
582ad2fddffcfccfaf467c7982191682
根据会员编号查询主题订单状态为已预约or进行中的数据
Page<Order> findOrderByMemberID(Long memberId, Integer status, String para, String beginDate, String endDate, int page, int size);
1
8543cc4de4d98130b81709f6eec3371a
fed6787c0e90c599da0af1569f086ba9
金额格式化,显示两位小数 如:0.00
DecimalFormat decimalFormat = new DecimalFormat("0.0"); String p = decimalFormat.format(money); return p; }
0
c4b95b8122224e711b9023d10bc4a8d5
1a9ac97e37a6fb1d31d54e31f4904604
エラーラベルを生成します
def verify_password_error_label() $tracer.trace(__method__) return ToolTag.new(span.className(create_ats_regex_string("ats-createverifypwderrorlbl")), __method__) end
1
68ef197d7352b7469c858f6312a3803f
05e2530e78c755d37ed3aafa6407ab65
根据CPS的id 获取CPS的信息
public class FlzyAction extends VisionetBaseAction public String getcpwsbyid() { this.getRequest().setAttribute("noReturn", noReturn); this.getRequest().setAttribute("divtype", divtype); boolean flag = flzyBiz.getcpwsbyid(this.getRequest(), this.getReponse(), cpwsgkBo); if (flag) { return "tocpwsxx"; }...
1
be148fa5a400465799e72c5084c75145
e204831e7026b4cd6d68edaad91861f2
根据新老CoreBaseEntity对象返回修改说明,未修改的字段不说明
if (newBaseEntity == null || StringUtils.isEmpty(newBaseEntity.getId())) { return; } BaseEntity oldBaseEntity = baseHibernateService.findEntityById(newBaseEntity.getClass(), newBaseEntity.getId()); if (oldBaseEntity == null) { return; } String[] ufArray = updateField.split(","); List<String> list = ...
1
e2c31cab8d638b9dc7118cd0c17814af
7f61448ad6da3ef0f9cb03f40c5be655
$HL
cases like (1)
0
528f70501a8ca3e5fc53e50991671f63
c30c1a593cbeb025091e3719aaee6b7b
idea 5: 查表
function _M:in_table(value, tbl) for k,v in ipairs(tbl) do if v == value then return true end end return false end
1
6ddfc8adfd9b0884d960b420dfa61d17
5e675d7dc447469ca233e828d71a31fb
Builds subscriber instances for the given classes or directories.
class BuildTopicMetaSubscribersPass implements CompilerPassInterface public function process(ContainerBuilder $container) { $processorTagName = 'enqueue.client.processor'; $topicsSubscribers = []; foreach ($container->findTaggedServiceIds($processorTagName) as $serviceId => $tagAttributes) {...
0
51e808d8df4fa94a46056dc0e3532580
ced78303e71b4215c23b8c3f1cfc28cf
FIRST LETTER TO UPPER CASE
class Contacts{ static String letterToUpperCase(String a){ String s1 = a.substring(0, 1); String s2 = a.substring(1, a.length()); s1 = s1.toUpperCase(); a = s1 + s2; return a; }
1
37b7d3c4ffe8192bd7deb3f924ac62ba
9f446e45339299dfde4866b4c696a62e
RPush append one or multiple values to a list
if (data is not None) and (type(data) is list): current_redis_data = None if self.keyExists(key): current_redis_data = self.redis.lrange(key, 0, -1) for value in data: if current_redis_data: if value not in current_redis_dat...
0
d09324df9425e5065e85042c114a8f7a
93378dcdbf782e189f3e831f6800c64c
修改成功后转到用户列表页面展示修改后的信息
employee = employeeService.findById(employee.getEid()); List<Department> list = departmentService.findAll(); ActionContext.getContext().getValueStack().set("list", list); return "editSuccess"; }
0
58e1fba444de81bb558a9203ecab5f34
148b6dd2bed76738170b5962f5407f85
Get Dhpay Args for passing to PP
function your_gateway_class_name_init() class WC_techprocess extends WC_Payment_Gateway function get_techprocess_args( $order ) { global $woocommerce; $order_id = $order->id; $data = array(); $data['customerReference'] = $order_id.'-'.$order->order_key; $data['description'] = "Payment for order id "...
0
c46e7cd10d554939b60a9fba2d1f7094
bb045c076e097772f32541929fac2af5
时间转时间戳方法
function s2t(s){ return new Date(s.split()).getTime() }
0
2918adb63273948629a2dde96b8bac6a
859a3d623757743b820416bfb8b7b9db
根据医院id和科室id,更新该科室设置的挂号量(max)
sql:="update tbl_medical_institution_department set num=? where medical_institution_id=? and department_id=?" res, err := db.Exec(sql,num,hospitalId,deptId) util.CheckErr(err) result, err := res.RowsAffected() return result, nil }
1
57df1e759f0b587386d99ec57558d6ce
4f87870ba88deacc835b6bfdbf9c4851
Sets the fixed width of the shimmer, in pixels.
public set width(value: number) { this.$setWidth(value); if(this.isFixed){ this.fixedWidth = value; this.checkFixedWidth(); } }
1
79d2d1bd17eb150a9d57667e9b223520
eb9252d286397ab67562fb12eba20fb8
changes the hasSoftwareTester value when it is changed in the ui.
namespace _WPFPL public partial class TesterPage : Page private void IfTesterListHasChanged() { this.Dispatcher.Invoke(() => { myTester = bl.GetTesterByID(myTester.ID); view = CollectionViewSource.GetDefaultView(myTester.TesterTest); th...
0
8d718be1ae041d47ce5095088bdc7a80
08ac5b50b0c396e044e12de4a1c58142
Parses response for Indy request with fees.
class FioBank(object): def _parse_import_response(self, xml): def parse_order(order): return { "id": int(order["@id"]), "code": int(order["messages"]["message"]["@errorCode"]), "message": order["messages"]["message"]["#text"] }
0
3135444f7944092e975887598891acf3
b0900d2607a9a29fe748f8d01508f270
Merge Positions from all_rank into hitters_stats and pitchers_stats dataframes
new_m_stat = m_stat.drop(['Rk', 'Arena'], axis=1) new_o_stat = o_stat.drop(['Rk', 'G', 'MP'], axis=1) new_t_stat = t_stat.drop(['Rk', 'G', 'MP'], axis=1) df_team_stats = pd.merge(new_m_stat, new_o_stat, how='left', on='Team') df_team_stats = pd.merge(df_team_stats, new_t_stat, how='left', on='Team')...
0
af4bebe5baa717339b151dd2e97318de
b81e9c3f33914c78355daa996412bcc3
0. Nhập thông tin một sinh viên
{ cout << "Enter your student ID: "; cin >> student_id; cout << endl << "Select your gender" << endl; cout << "------------------" << endl; cout << "A: Male" << endl << "B: Female" << endl; cin >> gender_choice; while (gender_choice != 'a' && gender_choice != 'A' && gender_choice != 'b' && g...
1
82a46d0a3f3561c399b97d5420031a04
c4e8df3d9f57145f0d4f456eacfe6b5b
Checks if a file name exists in Saves folder.
namespace Main._5ive.UI.Menus public class SaveMenu : Menu public bool DoesFileWithSameNameExist(string fileName) { return gameButtonCollection.Contains(fileName); }
0
b19c04a509d57ed85c1f64e627d9db44
7efb8a925065ebacdaa13eef79226dff
test for reading the typelist from locale expected array
class Zend_Locale_DataTest extends PHPUnit_Framework_TestCase public function testType() { $data = Zend_Locale_Data::getList('de_AT', 'type'); $this->assertEquals('Chinesischer Kalender', $data['chinese']); $this->assertEquals('Strichfolge', $data['stroke']); $data = Zend_L...
1
594ee2dc6a7592b79c440621eabd8daa
4effc7df9a731db97255b39aa1fdf473
.. "\n"
namespace BiblioSpec string Reportfile::optionsHeaderString(const ops::variables_map& options_table){ ostringstream strBuilder; time_t t=time(NULL); char* date=ctime(&t); string queryFileName = options_table["spectrum-file"].as<string>(); const vector<string>& libfiles = options_table[...
0
c91b6cb35b2f1e6d413bf1c6d9aaa1d7
813005dae51bb73f7a0ab5e0580b16dc
Determines maximum integer limit to prevent overflow.
if (value > Integer.MAX_VALUE) { return Integer.MAX_VALUE; } return Long.valueOf(value).intValue(); }
1
edc05dc32e4c28b973b7b8a95d0fdf28
1dd63ebab926bd0420861b2a1e74ea1a
Gets the user-visible description of the route. <p> The route description describes the kind of destination represented by the route. It may be a user-supplied string, a model number or brand of device. </p>
@Nullable String getDescription();
1
dbb1633f2ae902b333aa241fa50eabd3
a2e340ba0618ae584a52f35346cb780f
Adds caption to the thumbnail
class Image_Helper private function add_caption( $data, $attachment_id, $caption = '' ) { if ( $caption !== '' ) { $data['caption'] = $caption; return $data; } $caption = $this->image->get_caption( $attachment_id ); if ( ! empty( $caption ) ) { $data['caption'] = $this->html->smart_strip_tags( $caption...
1
25ed87ca3827225e3795aa8e6c7031de
6146e43ec495d0be8a37881f71fa562f
NewSender constructs a Sender
func NewSender(addr string) *Sender { return &Sender{ addr: addr, ch: make(chan *common.Metric, 1000), } }
1
0a1473bbd0cb6a89bfacc335830e2173
4ca1374fcd190b8de1b7f00c412fa750
把p_s所指向的栈出栈一次,并把出栈的元素存入P_val形参所指向的变量中,如果出栈失败返回false,否则返回true
bool pop (SqStack &S, char &x) { if(S.top == -1) { return false; } x = S.data[S.top]; S.top = S.top - 1; return true; }
1
7f994c40519f72bf424fa8486301bdcb
af078ed99311efa1921f3f73e9a1d6e4
Set the end position of the problem (inclusive), or -1 if unknown. Used for shifting problem positions.
public class DefaultProblem extends CategorizedProblem public void setSourceEnd(int sourceEnd) { this.endPosition = sourceEnd; }
1
16e6fe521148f486c8f362df4a241033
aee76825c86940ee8adeb5bc30a30f5e
Register a field to be spatially indexed
self.unsigned_integer('%s_id' % name) self.string('%s_type' % name) self.index(['%s_id' % name, '%s_type' % name], index_name)
0
8854e4a8783c5b602d90d1a11f13f478
92ac471d3579be2a43f5da9ec12a55ee
获取店铺转账周期结算分页列表
class Settlement extends BaseModel public function getStoreSettlementPageList($condition = [], $page = 1, $page_size = PAGE_LIST_ROWS, $order = '', $field = '*') { $list = model('store_settlement')->pageList($condition, $field, $order, $page, $page_size); return $this->success($list); }
1
fdb240528f9a85cca17a7203ff07730b
9d0130bd4f841690d7a26b3f7ed742cc
根据解析的报文中的功能码,组织报文并发送
void send_func(void) { uint16_t i = 0; UartPollingSenddata(OTA_UPDATE_PORT,Send_Box->msg_head); UartPollingSenddata(OTA_UPDATE_PORT,(Send_Box->msg_head)>>8); UartPollingSenddata(OTA_UPDATE_PORT,Send_Box->length); UartPollingSenddata(OTA_UPDATE_PORT,(Send_Box->length)>>8); UartPollingSenddata(OTA...
1
df4fc30bbe752b468820e38f23c4c8cb
13cbbb9c8c711d4a9ebd42ac0eff7cd1
output: dictionary that maps keylist[i] to L[i]
class BatchPolopt(RLAlgorithm): def ld2dl(self, LD): return dict(zip(LD[0], zip(*[d.values() for d in LD])))
1
77a1662d404de8f3525a08a959191fc7
65b4927b2a75d1d6fddc1b278238f43d
Enables/disables the rate limit (default is enabled)
class GFStripe extends GFPaymentAddOn public function is_rate_limits_enabled( $form_id ) { $this->_enable_rate_limits = apply_filters( 'gform_stripe_enable_rate_limits', $this->_enable_rate_limits, $form_id ); return $this->_enable_rate_limits; }
1
06bf54a107ae788f5a9f365f6c68fbbd
5547f3ac7d12636d126bbe603ee6cc03
Create a new instance using an OpenSSL cipher string.
export class Cipher extends BaseObject<native.PKI.Cipher> constructor() { super(); this.handle = new native.PKI.Cipher(); }
0
66b31926b40aae0ff27ea3de5b4b4106
6e37537acf0bab54ea2bd74c97069772
Get a list of files that need to be checked based on which files are managed by git.
def get_git_files(): output = run(['git', 'ls-files']) return add_directories(output.splitlines())
1
142c71bcacf39729b1734636ded5acc7
4cfa827b6377097e07964c54b719b0d9
Stores an integration ID
public class Settings public String getIntegrationId() { return integrationId; }
0
0b44848e58614d8cc8e81f4fe020b492
4ca26791b3cc38a32f4a63677990abd0
Since all instances are the same, the ID can be same for all instances.
public class UUIDTimeoutIdTest @Test public void hashCode_twoDifferentInstancesSameId_haveSameHashCode() { UUID uuid = UUID.randomUUID(); UUIDTimeoutId instance1 = new UUIDTimeoutId(uuid); UUIDTimeoutId instance2 = new UUIDTimeoutId(uuid); int hc1 = instance1.hashCode(); int ...
1
7954604190dda78c84eebcde87dabf28
917a01a756930e21d6b24f3e9b20e358
Desactiva la pausa del juego
public class UD4_2_ColFue extends Game implements InputProcessor public void pause() { Gdx.input.setInputProcessor(null); }
0
a36731b337ccdf59ab28c61f4d8025db
7561090b8987223b0592263ea85921c9
Gets the current title, which is not null. Can be an empty string.
public class Title<J extends Title> extends Component<NoChildren, NoAttributes, NoFeatures, NoEvents, J> implements NoIDTag, HeadChildren, OneValidTag, NoClassAttribute, NoNewLineForRawText, NoNewLineBeforeChildren, NoNewLineBeforeClosingTag public String getTitle() { return getText(0).toStr...
1
58f7624109fb015e363ead0cbb313a17
60f76c6718c596efa3d398332b05fada
获取上一次加载的时间
public class PullToRefreshRecyclerViewUtils public static long getLastRefreshTime(Context context){ @SuppressLint("WrongConstant") SharedPreferences s =context.getSharedPreferences(REFRESH_NAME, Context.MODE_APPEND); return s.getLong(REFRESH_TIME_KEY,new Date().getTime()); }
1
1f7ff8ccc06e7c546307b102714ce8ef
0d3f942cb65c73a3fdf535526a62a150
Helper function to visualize one channel grayscale images
plt.figure(figsize=(10, 10)) single_input = single_input.clone() / torch.max(single_input) image_width = len(single_input[0][0]) target_input = single_input.reshape(3, image_width, image_width).permute(1, 2, 0).cpu().detach().numpy() plt.axis('off') plt.imshow(target_input, alpha=1) plt.tight_layout() plt.show(...
0
019c820e589a80b9af2db9824550e8c6
09b1c0321ab3611a65e811ec96aa0229
Редактирование поля "Электронный адрес" для конфигурации модуля
class BConfigGeneral extends BConfigCategory{ protected function addgroup_emails(){ $this->registerGroup('Электронные адреса администраторов и модераторов','emails',array( new BConfigFieldString( 'EMAIL_ADDRESS_NEWSPAPER', 'Email редактора газеты (действия "отправить в газету")', 'admin@vidido.ua'), ...
1
6a22496d0a4d669c5f43a539d77b1946
26d431da573d14a3fab8df4a5d51586f
Clear the comments section for a specified content ID
int $itemid = null) { global $DB; $params = [ 'contextid' => $context->id, 'component' => $component ]; if (isset($commentarea)) { $params['commentarea'] = $commentarea; } if (isset($itemid)) { $params['itemid'] ...
1
52d1c7119da38286f10005256b16ca5e
1eb74aa432a39a585dc93d4ac32b3796
Função de ativação do tipo degrau
class Simple_Perceptron: # Construtor da classe, com valores padroes caso nao sejam setados def funcao_de_ativacao(self, u): return 1 if u >= self.limiar else 0
1
7b5387f6658cb1410beba6b7afd582d2
78ceb89d37192bc307831d069bcd8cf5
Renvoi la liste des cases pouvant être atteintes par un mouvement de type pion.
public class Pawn extends Figure<Hexagon> @Override public List<Hexagon> getAttackableFields(Chessboard chessboard) { List<Hexagon> output = new ArrayList<>(); attackableDirections.forEach(direction -> { Optional<Hexagon> optional = getPosition().getNeighbourByDirection(direction); ...
1
437ae935599c1d5a7a538ce061da1e1d
1ee9557e389cfc928a2f6a0a0ef3a3d0
Test d'une requete POST invalide pour la sauvegarde d'une configuration: utilisation d'un class_id inexistant. Doit renvoyer un code 400
TaxClass.objects.create(name="Books") id = "spanishinquisition" variables = { "countryCode": "PL", "updateTaxClassRates": [ {"taxClassId": id, "rate": 20}, ], } response = staff_api_client.post_graphql( MUTATION, variables, permissions=[permission_manage_t...
1
ff8cf1270575a3224ec71315c589bb6f
3cb6451bd790defa17090f7833d9f980
获取单位所在点
public class TriggerMethod public PosData func_GetUnitPos(SceneTriggerExecutor e,TriggerArg a,Unit unit) { return unit.pos.getPos(); }
1
511e8e499abfe59e50f71f5672488166
dbf9c7ee478e88ba17f44dc5e28fd058
Total bullets count.
{ $bulletCount = 0; foreach ($entityOut['divs'] as $key => $value1) { if (!empty($value1['is_content'])) { ++$bulletCount; } } return $bulletCount; }
1
09ef13bbd8034dfa4921770a3629dd02
107a0133adfa688cf7545f9768bf88d0
Returns the value of the '<em><b>Produces</b></em>' attribute list. The list contents are of type {@link java.lang.String}. <!-- begin-user-doc --> <p> If the meaning of the '<em>Produces</em>' attribute list isn't clear, there really should be more of a description here... </p> <!-- end-user-doc -->
if (mProduces == null) { mProduces = new ArrayList<>(); } mProduces.add(produce); }
0
f848defe177bda0cfe53d0778885d6eb
7325e2eb1b7af8a3cbe7859023923b6f
Calls inherited on destroy function
void AUICheckboxWidget::OnDestroy() { SuperWidget::OnDestroy(); }
1
1ab1b49350164f6af94987fe5e684394
b16bce10d1e120eef6b41f6e51f8a69f
retruns edit indices Requirements: - two images must be of the same size
pts_im1 = [kp1[m[0].queryIdx].pt for m in good] pts_im1 = np.array(pts_im1, dtype=int) pts_im2 = [kp2[m[0].trainIdx].pt for m in good] pts_im2 = np.array(pts_im2, dtype=int) return pts_im1, pts_im2
0
803d76afea014172b870ad6e7f67dbd6
0d18409e1b10d609ee07a83a4b7b753d
List and get all blobs matching both the provided container name and the optional blob name prefix.
print('Enumerating blobs from {}/{}'.format(account_name,container_name)) block_blob_service = BlockBlobService(account_name=account_name, sas_token=sas_token) generator = block_blob_service.list_blobs(container_name=container_name,prefix=prefix) matched_blobs = [] i_blob = 0 for blob in generat...
1
1a75ba3d0ae80aaed3bce7e10c6927bb
fd6aae2026200c623c9918e4b36ed5b1
<pre> Required. Mask of fields to update. At least one path must be supplied in this field. The elements of the repeated paths field can only include these fields from [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]: `description`. `azureClient`. `control_plane.version`. `control_plane.vm_size`. `annotations...
selectedFields_ = com.google.protobuf.LazyStringArrayList.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); ; onChanged(); return this; }
0
74da92b53698b39502fdacec26974841
53f47a2b935201b756aef06f969b3ebf
If the state is null, it cannot have currently-running tasks either, so consider it inactive
TCFContextState state_data = state.getData(); if (state_data != null) return state_data.isNotActive(); return false; }
1
c9cc1a9c8f4a722c9d2505ad1b0a495d
1062e5642095f6b3c86756f1b83a8042
Uses hash function of a square two dimensional array of bool.
{ int temp; bool check[SIZE]= {0}; for (int j=0; j<size ; j++){ for (int i=0 ;i<size ;i++){ temp = arr[i][j]; check[temp-1] = true; } if(checkBooleanArray(check, size) == 1) return 1; } return 0; }
0
043439e229d5595445151e9f6c4fb78a
36f29bfe11a8f92aaad0ea599ecbc05f
取得主場平均得分
class Team: def pointsavg_home(self): return np.mean(self.points_home)
1
cc192f1cc9b4ec3f359554c2f9d3e983
b1eb8ef85c4c03de7b8653799ba4e4cf
Method tests whether table exists on SQL Server DB.
try: self.query('select * from {0};'.format(tablename)) except SQLServerError as e: if e.errorcode == 'Msg 208': return False else: raise return True
1
2462e658086f8aa8f831788876074547
75b60eb9f2562b109f465a162ef26f95
存储打开app的时间,用于判断是否是每天第一次打开
public class Utilx public static boolean isFirstOpenApp(Activity act) { int versionCode = 0; try { versionCode = act.getPackageManager() .getPackageInfo(act.getPackageName(), 0) .versionCode; } catch (NameNotFoundException e) { e.printStackTrace(); } x.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...
0
1fd33693ef99666e4ba0cd1777164657
1cd8093ee7f425487803508536a6a267
Test that adding an invalid url data and then getting an error.
class TestShortener(unittest.TestCase): def test_invalid_data_url_shortener(self): payload = { 'long_url': 'httppp://www.google.com' } response = add_long_url(payload) self.assertEqual(400, response.status_code)
1
0ab5978067c4809592c3041bf4f51a54
94c8fae2c96bd30a2214b6e7a58ebdbc
跳转到修改售后管理
public Object editJM(HttpServletRequest request, HttpSession session){ Map<String, Object> map = new HashMap<String, Object>(); ModelAndView mv = new ModelAndView(); String jhId = request.getParameter("jhId"); mv.addObject("jhId", jhId); mv.setViewName("main/jiemu/index2"); return mv; ...
0
784a864eac5d2399b65940963c144223
61f41fde4cdea98abade88892fb1d485
Get fog color
export class EffectFogMethod extends MethodBase public get fogColor():number { return this._fogColor; }
1
1297663199911d9d378da941f926d401
ec1ffd305610de8bcd7d63d9e75337a3
Returns config for reference line capsule container.
{ return new cameraConfig(target, armLenght, targetOffset, offset, useTargetRotation, rotation, speed, rotationSpeed, doCollisionTest); }
0
864efff60a210f682e4b6a0517063d59
57076cc029c6d0e1165ce5bf5c6edc40
A flag to indicate if the modeling involves an ensemble ordered by time or other order.
class ProjectedLinearEstimator(LinearEstimator): def mode_proj_order(self) -> str: return self._mode_proj_order
0
f796a26d779b7824e449bf3f7cfec36f
cc517dd53e3859ae265b6927d0e92e32
extractSubArray(self,da) - rebin to 200x200 subarray if large dimension detected in da array
im_filt=copy(im) im_d = copy(im) if d>1: if av_en==1: siz = d+1-(d%2) mask = ones((siz,siz))/siz**2 if fft==1:im_filt = scisig.fftconvolve(im, mask, mode='same') else:im_filt = scisig.convolve(im, mask, mode='same') n1 = int(floor(im.shape[0]/d...
0
b6fb0e7c6968bc042987c19c06235c95
5ca224df5f39d0682710aa8bcab50d03
Handle root or redirect to captive portal
class usersController extends oktController protected function handleGuest() { if (!$this->okt->user->is_guest && !defined('OKT_DONT_REDIRECT_IF_LOGGED')) { $this->performRedirect(); } }
0
b129017b79e7559c15e5f24f9e271e76
2da0e82f51371b440ef920539029ac41
Generates the tree based on the postfix string. For example: generateTreeFromPostFix("2 3 4 * +") would create a tree that looks like this: "+" \ "2" "*" \ "3" "4" You may create any PRIVATE helper methods you feel are necessary.
class ExpressionTree public void constructPOSTFIX(char[] arr){ Node newNode; Stack newStack=new Stack(); for(int i=0; i<arr.length; i++){ newNode=new Node(arr[i]); if(newNode.type!=Node.NodeType.NUMBER || newNode.type!=Node.NodeType.VARIABLE){ newStack....
1
18987ff9e89bb6220c0cc82911a5be6b
afcd28fa3e565f9602693d725856a63a
Make sure that we've got the right sdks if we're on a linux host.
class FirestoreTests(sdk_test_base.BundledBase, cli_test_base.CliTestBase): def SetUp(self): with self.SkipTestIfRaises(java.JavaError): java.RequireJavaInstalled('test')
0
420ec5206f1c91fc2b49b72df66f0eac
726be1c73deda3c7fcb0d78aeb4574d5
通过订单数据获取桌台数据(此方法会阻塞调用线程)
function ChooseTable(title, vm) { $.ajax({ type: "get", url: "/Res/Checkout/GetOrderTablesByOrderId?orderId=" + vm.OrderId, data: "", contentType: "application/json; charset=utf-8", dataType: "json", async: false...
1
897b6f821c54c97db8cbc4c43e71e34c
f88952cdffb248f9246b1ef0267887f6
切换位置追踪服务到低频模式
void stopLoc();
0