query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
3fedecdfe97c233772d64225eca73e2d | f7394d61035f6659df3c56e4a680dd6a | Gets the next event from the file. | namespace EH.ImsOpcBridge
IFsmEvent NextEventGet(); | 0 |
d0fd6938329df305e6108b1da505dd5d | 8daff68d25d075c2830a6c0ff633e145 | 归并排序-以长度平均左右分组递归合并 | func MargeSort(nums []int, left, right int) {
if left < right {
mid := (left + right) / 2
MargeSort(nums, left, mid)
MargeSort(nums, mid+1, right)
Marge(nums, left, mid, right)
}
} | 1 |
5ed6f3e9d7e64f9cb652d55439532b15 | d936ce559aad2b9a5d11b0204c91c6e3 | Test arrow down command (Cursor moves down). | let mut cursor = CursorPosition {
x: 10,
y: 1,
y_offset: 1,
};
let lines: Vec<String> = vec![String::from("first"), String::from("we are here")];
cursor.move_up(&lines);
assert_eq!(cursor.x, 6);
assert_eq!(cursor.y, 1);
assert_e... | 0 |
f0e2123e8f380bd50653eb89fff0b698 | 23cff1317c34f80457cd60421c2c20d4 | attempts to read the public key file and save the resulting
key object in a global variable. | if (0 != ReadLoud(filename, pub_key, sizeof(*pub_key))) {
return -1;
}
return 0;
} | 0 |
20f7e88346aabad99834bbea3f9796ae | 79689a71f79e18988566ad4596426eed | gives us an easy way to remove the default value from any returned array | def exclude_first(thing)
thing[1, thing.length]
end | 0 |
66c83217acaca17f51020149349b22ba | 3b7e9cffb9672b78da7817391c75561b | returns a random quaternion not necessarily uniformly sampled | static rv r(543534543);
vec result;
result[0] = r.uniform(-1.0,1.0);
result[1] = r.uniform(-1.0,1.0);
result[2] = r.uniform(-1.0,1.0);
return result/result.norm2();
} | 0 |
e4483025f2c6de6217f089dcb2cd5ab7 | 56e08e60c0c6d368c69accb8af8985f1 | Setter of the appointment title | public class Appointment
public void setTitle(String title) {
Title = title;
} | 1 |
df616188cbc1a396011d243b57b0d7f9 | 45ce2f934347a5ad86ec3274d104c859 | 根据yhm查询老师 | namespace ExaminationBLL
public class TbUserManager
public static TbUser GetUserInfoByYhID(int yhid)
{
return tbuserservice.GetUserInfoByYhID(yhid);
} | 0 |
2a997bb927b14ec6b2468152cef8ddd0 | 7ba45d8bb09656d7a444a7a0f927708f | 初始化Fragment,默认显示销售内容 | public class MyFincScheduSellActivity extends FincBaseActivity implements OnItemSelectedListener{
private void init() {
myFincView = mainInflater
.inflate(R.layout.finc_myfinc_schedusell, null);
tabcontent.addView(myFincView);
setTitle(getResources().getString(
R.string.finc_myfinc_scheduedsellFound));
... | 0 |
69d7413a3fb8f26eb1260659eaecf710 | cb4e66eb9399e35fc1999d51d21e889a | 下載圖片檔案至本機 | try {
URL url = new URL(sURL);
HttpURLConnection URLconn = null;
URLconn = (HttpURLConnection)url.openConnection();
URLconn.setRequestProperty("Accept", "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8");
URLconn.setRequestProperty("Accept-Language", "zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4... | 1 |
6a5099f1daeed020c745dc614f115773 | 166d084436c22bbcb40d49553c04e9e9 | Metodo dedicado a hacer instancia al boton dedicado a calcular la masa corporal
y se relaciona con el metodo que detecta "clic" al picarle al boton | public class EscuchaBoton implements View.OnClickListener
@Override
public void onClick(View v) {
Log.d(getClass().getCanonicalName(), Constantes.ACCION_BOTONIMC);
Activity activity=(Activity)context;
String nombreUsuarioLogeado=activity.getIntent().getStringExtra("nombreUsuarioLogeado");
... | 1 |
369f5f7171fdf9202ca52402c6456a8a | a2cc1a768f1358214796cee318b39928 | 先对字符串进行URL的UTF-8编码,然后再进行base64位编码 | $arr = fixedArr();
$str = base64_encode($str);
return encode($str, $arr);
} | 0 |
31f40e229a93e0644ba495a55e9d2d70 | ee93e02fcd90f36bb476dc7b7c6f4dcd | Enables I2C2 module and configure SDA2 and SCL2 as serial port pins | void StartI2C2( void )
{
SSP2CON2bits.SEN = 1;
} | 0 |
c895e1df6fa756de079ba762861c05cf | 4ea27d4eb11de6a469c0017b162d8d4c | get our most recent chunk of suggestions, and pick
someone from each slug to follow. For now, since
high level suggestions are big name celebrities and
the like, get the ones following the most others
within their category, with the hopes of introducing
the most diversity into our follow pool. | class Tweepy(object):
def get_suggested_users(self, screen_name, category):
print("[Twitter] Getting user suggested users...")
user = self.api.get_user(screen_name)
return user._api.suggested_users(slug=category) | 0 |
f365da966cedbb9e71b35e1b2f005a12 | c804e4bd7015995e53db9eecd2e41171 | loads the proper arguments,
reads a job,
and executes the search. | {
string indexName, queryName, outputName;
double restartProb = -1;
int stepNum = -1;
if(argc == 1)
{
ifstream config("config.txt");
if(!config)
{
throw invalid_argument("Please create a config.txt file!\n\n");
}
parseConfig(config, indexName, queryName, outputName, restartProb, stepNum);
if(indexNa... | 1 |
b1cc37daf96c99fccc5339f0e527d064 | eccdd9feed71c392e3d362f8647f7658 | This function is used for estimating memory usage of a given graph partition | shape = (4,)
dtype = F.int64
dtype = DTYPE_DICT[dtype]
data = empty_shared_mem(_get_ndata_path(graph_name, 'meta'), False, shape, dtype)
dlpack = data.to_dlpack()
meta = F.asnumpy(F.zerocopy_from_dlpack(dlpack))
num_nodes, num_edges, num_partitions, part_id = meta[0], meta[1], meta[2], meta[... | 0 |
651b1959c1474f9cbd7251d9810d2b09 | 2e0b928348090b7cf47e21fd964f0bda | Change the current password of user with password comparison. | boolean changePwd(String pUserName, String pPassw,
String pPasswOld) throws Exception; | 1 |
9d6c16adb86176d676eef58a1772f5dc | f12b511d537b7cefa43de732dcac07d3 | Check if a specific button pressed on the gamepad for a specific connected player | bool result = false;
if (this.acceptInput) {
if (this.previousGamePadStates[(int)playerIndex].IsButtonDown(button) && this.currentGamePadStates[(int)playerIndex].IsButtonUp(button)) {
result = true;
}
}
return result;
} | 0 |
4f54093bf6065609f25b8bd308a332cd | d188b89c71a51a9356df346902ea98ad | 创建确认模态框 | function confirmModal(content = '', options = {}) {
return modal(content, Object.assign({
'showCancel': false
}, options));
} | 1 |
fbe35fb37755adda540c7aeed91021ac | 94647bb87d8498927e6b9f245096fd89 | 关闭串口3 | {
if (serialPort.IsOpen)
{
try
{
serialPort.Close();
serialPort.Dispose();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message, "错误", MessageBoxButt... | 0 |
55d0969ac24e625bbdbfe6ff2ae78d9b | aad374cb87662c7f24fef4f94c028300 | 登记类型变化引起的表单验证切换 | function typeChange(){
if ($("#billType").val()=="1"){
$("#btn_import").attr("style","display:none");
$("input[name='billCntr.ecdsClearType']").addClass("required");
$("input[name='billCntr.ecdsConveyType']").addClass("required");
$("input[name='billCntr.transType']").addClass("required");
$("#btn_edit").att... | 1 |
122a4589960d68eed3e08c628d994042 | 88c86ec8a178647a88caba40d17887c5 | Clear all the raw-values, and update the strip. | class StripChart:
def clearstrip(self, p, color):
self.bg = color
self.data = None
self.x = 0
p.tk.call(p, 'put', color, '-to', 0, 0, p['width'], p['height']) | 1 |
cb4b05c4d5eb14c1a8aa9ad40ea66ad9 | 2adaab2ee427ac93c47252f8eed272d9 | Duplicates a poly struct. | handleError("WRONG POLY");
if (clean)
cleanMonos(monos, true, monosCount);
Poly *dummy = getDummy();
return *dummy;
} | 0 |
0bf4d6d14cade59388ae4af72afb35f6 | 0f7893cbd26492ba9f5c4ed4cc18cc54 | 统计注册人数,生成相应统计图表 | class Count extends Common
public function register_count ()
{
$param = $this -> params;
if ( isset($param[ 'start' ]) && isset($param[ 'end' ]) && !empty($param[ 'start' ]) && !empty($param[ 'end' ]) ) {
$day = $this -> getChaBetweenTwoDate ($param[ 'start' ] , $param[ 'end... | 1 |
9202c03be37148d8b8a83cff8b990931 | b1be26aab2ba57741ded03b099ce45af | 批量处理点评 | class userviewpointAction extends usercommonAction
public function comment_processor() {
if (!empty($_POST) && !empty($_SESSION['order_id'])) {
$ViewpointImpr = M("ViewpointImpr");
$ViewpointOrder = D("ViewpointOrder");
$order = $ViewpointOrder->get_order_by_id($_SESSION['order_id']);
$view_id = $order['v... | 0 |
d3e76fb470d3b11edecbcaabbbafafb9 | fe45197641b4ae6ab3ad0c6eb19aa3f0 | find maximum length string | return (text.match(/[a-zA-Z]+/g) || []).reduce((total,val) =>
total = total.length > val.length ? total : val
);
} | 1 |
2b04d605601636aed0ccc4576df0f722 | b9e73d569784e113b5c47d0c0ca09ad8 | @brief RELC decode is started.(Async) | {
Uint8 str[256];
sprintf ((char *)str, " DECODE OUT ");
Utils_bufExtPrintStatus(str, &pObj->outObj.bufOutQue);
return SYSTEM_LINK_STATUS_SOK;
} | 0 |
3526e0973e5b89adc6439b39f1e8903e | 7893838bb04b4226eb42f01fa4b667b6 | Draw the pattern of size given as ``height`` and return the text lines. | if type(height) != int:
self.logger.error("input is not an integer")
return
result_pattern = ""
if height >= 0:
line_length = (height * 2) - 1
centre = line_length // 2
for level in range(height):
result_pattern += self.... | 1 |
509be4a175345bb62946d4aad9c48e37 | 016c1856dc800aa4c46e6a9956e23919 | Returns the base string type, which depends on the major Python version. | class DecimalIntCodec(DecimalCodec):
def python_type(self): | 0 |
051cfb48ad8161646fec0dbd61eb3d20 | b0a8d6037703bf51cb372eb214516e73 | Adds a tenant network to VIM. Returns the network identifier | class IscsiNetworkportal(Base):
def add(self, adapter, nic, force=None):
return execute_soap(self._client, self._host, self.moid, 'vim.EsxCLI.iscsi.networkportal.Add',
adapter=adapter,
force=force,
nic=nic,
... | 0 |
1f48dcdf8c66254a9aa16ef0f994b31a | 094c476e7853a63dec14371b558457ce | Add property file content to the data model. | public class Generator extends AbstractAcceleoGenerator
@Override
public void addPropertiesFile(String propertiesFile) {
this.propertiesFiles.add(propertiesFile);
} | 0 |
0dde8a697f22802ed4d757850c6319db | 243173d0c7c193bef1971b492ee35c22 | 获取DateHelper实例, 使用当前时间作为基准时间 | namespace XUCore.Helpers
public static class Time
public static DateTime GetDateTime() => _dateTime ?? DateTime.Now; | 0 |
375f8ace73d687d00f7a02f7b48fa1b7 | ae4dd6df08c6885479c0928e404d29d1 | 检查是否在静态函数中 | {
if (s->scope() == cur_func && s->variant() == FUNCTION_NAME)
return 1;
else
return 0;
} | 0 |
fc2956e79497b2498d6b925d32a93cb8 | 39aaad54ba3ee15af77d56b772514ed0 | Gets the dailyPrintUsageByUser property value. Retrieve a list of daily print usage summaries, grouped by user. | class ReportsRequestBuilder
def monthly_print_usage_by_user()
return MicrosoftGraph::Reports::MonthlyPrintUsageByUser::MonthlyPrintUsageByUserRequestBuilder.new(@path_parameters, @request_adapter)
end | 0 |
7eaa58aff657f047858c922bf4184310 | 99c8dfa2e8a256930eec90e897828097 | Genererer opp veien ut av labyrinten fra inngangsposisjonen i labyrinten, samt veien
rundt og frem til inngangen av labyrinten igjen | xp = 1; yp = 1;
myWay = new Stack<PositionInMaze>();
PositionInMaze [] outOfMaze = solve();
PositionInMaze [] backToStart = roundAbout();
NextIteration = VirtualUser.concat(outOfMaze, backToStart);
} | 1 |
b844c71dc52ecfdbc1ee16acc0e67bc3 | a558583599fd76057d4c388241cf0752 | collect a module and it's deps into a single string,
ordered to satisfy the deps as it's evalled in JS | if (path.extname(p).toLowerCase() !== '.js') { return null; }
counter = counter || 0;
if (counter++ > 50) { return null; }
p = normalizePath(p);
if (modJSDepsCache.hasOwnProperty(p)) {
return modJSDepsCache[p];
}
const directDepsCache = modJSDirectDepsCache[p];
const mTime = getFileMTime(p);
let re... | 0 |
0ad99302af28b582f97881795dbbc34b | 58b9dc4602b297fcb861e31d04627777 | Gets the value of the advBkUnitInd property.
possible object is
{@link String } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"segNum",
"sellStatus",
"startDt",
"startTm",
"startAirV",
"startFltNum",
"airp",
"pickupLocn",
"locnCat",
"locnExpansion",
"locnNum",
"pickUpAddr",
"pickUpPhone",
"endDt",
"endTm",
"e... | 1 |
22eb77049ac900464c33540cb18c380f | 164e0ecbc303f8332a0f0077475e7b1b | 展示主线关卡保存阵容的武将列表 | function InterServicePvpModel:SetBossMemList(msgObj)
self.bossMemList = {}
for k,v in ipairs(msgObj.rankList) do
local rankVO = {}
rankVO.roleID = v.roleID
rankVO.roleName = v.roleName
table.push(self.bossMemList, rankVO)
end
Notifier:sendNotification(NotifyConsts.ISKuafuBossMemInfo);
end | 0 |
17657bfa1e0a3be5524c3d0b3f7febcf | f707165d924daa7238d8d9d9c09b5122 | Add global step to ModelRegistry. | global _models
assert(isclass(model))
if modelname is None:
modelname = model.__name__
assert(isinstance(modelname, str))
_models[modelname] = model | 0 |
7611febbd87c6a726c989fa3e9bf880c | 20a9546c6e439c7b51e07086cc166916 | セリフ変更メソッド | public class Sound : MonoBehaviour
public void SetSound(SE se) {
audioSource.clip = Resources.Load<AudioClip>("Audio/SE/" + se.ToString());
soundObject.name = se.ToString();
} | 0 |
841ecf4179643b83e2506aad18cb7e5b | 7c30acda82b7138d2c03de2e0f616eb9 | 读取序列号文件,去除可能的重复序列号 | with open(filename, 'r') as f:
s = f.readlines()
ss = list(set(s))
with open(result, 'a') as ff:
for i in range(1, len(ss)):
ff.write(ss[i] + '\n') | 1 |
eecf68498d227a0cb8ec3116b6d4514f | b640c985ab328bcf719e7b9dfad04415 | Estimate unconditional MI between discrete y and continuous x.
The calculation is based on Ross (2014): Mutual Information between
Discrete and Continuous Data Sets. PLoS ONE 9(2):e87357.
doi:10.1371/journal.pone.0087357
The only difference to basic estimation is that the distance metric
treats different y values as be... | def conditional_mutual_information(X, Y, Z, mi_estimator='auto', is_discrete='auto', force_non_negative=False,
**kwargs):
if np.size(Z) == 0:
return mutual_information(X, Y, mi_estimator, is_discrete, force_non_negative, **kwargs)
assert len(X) == len(Y) == len(Z), 'X,... | 0 |
4c748ae5d9d14a62a9e3af8df3b6b2ee | bf419c7a77f6dd965c4905df616ae75e | Gets the apcon approval type price by identifier. | namespace ADit.Interfaces
IApconApprovalTypePriceListView GetApconApprovalTypePriceViewModel(int selectedApconApprovalTypePriceId, int selectedApconApprovalId, string message); | 1 |
20598071ae10efa4e1330f7276fe8e37 | 9d6c4b98e804791167c5df4f1111bf3d | Given a valid size value, returns a new size value with room for a prefixing Header structure. | impl Header
pub fn for_cf(valuable_region_size: usize) -> Vec<u8> {
let mut data: Vec<u8> = Vec::new();
data.reserve(Header::size() as usize);
data.extend_from_slice(&BEGIN_HEADER_MARKER);
data.extend_from_slice(&conv::int32_to_hex_bytes(valuable_region_size as i32));
data.push(S... | 0 |
00aab4b17dc7d664127d0ca89b8759a6 | 59df7872ce5442547a6d1f796d3dae64 | Converting ISO8601 formatted duration to normal readable time | dur = [ int(str_duration.split(' ')[0]) , int(str_duration.split(' ')[2]) ]
time_d = datetime.timedelta(hours=dur[0], minutes=dur[1])
return time_d | 0 |
1801ec5a7d8c03de913f3483362facb2 | 26bd2e3ccabb5670f47b1c4316f9ac0f | Builds the rendering passes.
Multi-pass rendering is not currently supported.
For now, just log the render passes described by this PFX resource. | {
D3D12RENDERPASS d3dRenderPass = {};
if (clearColor)
d3dRenderPass.clearColor = true;
if (clearDepth || clearStencil)
d3dRenderPass.clearDepthStencil = true;
return static_cast<uint64_t>(d3dRenderPass.value);
} | 0 |
b5dc9e32811ebad22f951d669ef65b08 | 316c292a79aecfd231f2aa800a5108ff | Read a EnumDef-derived instance by it's primary key.
or null if no such key value exists. | public abstract class JpaGenericDao<T extends Comparable<T>, E extends Identifiable<T>> implements GenericDao<T, E>
@Override
public Optional<E> read(T pk) {
requireNonNull(pk);
return Optional.ofNullable(em.find(getClazz(), pk));
} | 1 |
f6d811586e7b6107497f581e0d60cbd8 | 0dfa342c209e1d651b20944a8c974899 | 获取最近半年时间段 | var now = new Date();
var Month = now.getMonth();
var quarterStartCurrent = Month >= 9 ? 9 : Month >= 6 ? 6 : Month >= 3 ? 3 : 0;
var quarterEndCurrent = quarterStartCurrent + 2;
var quarterStart = new Date(now.getFullYear(), quarterStartCurrent, 1);
var quarterEnd = new Date(new Date(now.getFu... | 0 |
b5a67472fb09a62571a4b26ad0645354 | 14bb1edd6840f1406f534d72a73a0613 | 是否有空闲采集器 | var Energy =textMatch("收集能量.*").getNodeInfo(3000);
if (Energy.length==0) {
return true;
}else {
return false;
}
} | 0 |
96dfcb7b9699392d769e88ab1b2650f2 | d0fe9217413a48abcae9308c2090edf9 | Test that we properly get a hole with the TSTM. | class TestH3Core(unittest.TestCase):
def test_h3_set_to_multi_polygon_hole(self):
h3_addresses = [
'892830828c7ffff',
'892830828d7ffff',
'8928308289bffff',
'89283082813ffff',
'8928308288fffff',
'89283082883ffff'
]
multi_poly... | 1 |
34e8f50e7a83c31113f42b81399b74e8 | da7680f9ad5174e4d24df1f3ee9f6032 | function to verify reg.map filter setting | soc_fe1600_drv_test_brdc_blk_filter(int unit, soc_reg_t reg, int *is_filtered)
{
SOCDNX_INIT_FUNC_DEFS;
*is_filtered = 0;
switch(reg)
{
case BRDC_FMACL_ASYNC_FIFO_CONFIGURATIONr:
case BRDC_FMACL_SBUS_BROADCAST_IDr:
case BRDC_FMACL_SBUS_LAST_IN_CHAINr:
case BRDC_FMACL_... | 1 |
bdb1af16d3720eb94e657a4ee68baa3e | 8cfbde97cd814f7490cfb3524e760d51 | 删除该节点,而不删除该节点的子节点 | public class ZookeeperCurator
public void deleteNode() throws Exception {
client.delete().deletingChildrenIfNeeded().forPath("/zk-demo-data");
} | 0 |
90362a65627c8a174b828948f32f1d1b | b64321ba4920466767952196f469bf77 | Gets rows related to one combination of EmployeeId columns in the dbo.HealthLoanDecisionFirstPaymentVw view. | {
if (db == null)
db = new Db(DbServices.ConnectionString);
return db.LoanVwGetByLoanDecisionIdFirstOrDefault(_loanDecisionId);
} | 0 |
79ef36da33bf5898ed1d3913b6dc0efa | ae956aa69d52279d01cf1471160d36d5 | Checks password against a list of common passwords | lower_str = string.ascii_lowercase
upper_str = string.ascii_uppercase
digits_str = string.digits
punct_str = string.punctuation
if lower_str in password:
return True
elif upper_str in password:
return True
elif digits_str in password:
return True
elif punct_str in... | 0 |
1f2c074d80dd4278788e42915ed17382 | cd9192848aa4f3c5733dd4416eebf357 | Gets the percentage difference between two doubles. | double getDifference(double value1, double value2); | 0 |
90997e17bdd3052123954441a09f9777 | bc2ca961aefcd98ae7a3f6a11ed428b4 | 将角色自身信息以及对应的菜单更新到数据库 | @Override
public int updateByPrimaryKey(Role record) {
roleMapper.updateByPrimaryKey(record);
if(record.getMenus()!=null){
roleMenuMapper.deleteRoleMenu(record.getId());
RoleMenu roleMenu = new RoleMenu();
for(Menu menu : record.getMenus()){
ro... | 1 |
80eb45f8ddb6a8a1c64d3cd778d7c3d0 | dd1ae976fa83c5e511323ce62216a8c1 | 获取一笔交易,最先收到的交易,获取之后从内存池中移除 | {
this.LastDequeue = this.CurrentModeling.Time;
this.Left++;
var memory = this.events.Dequeue();
memory.EndTime = this.CurrentModeling.Time;
return memory.Transaction;
} | 1 |
42b72a4a5e7864c39f04a291d105c957 | 90e10765ad50262683b86c273da9eb98 | 当name属性不存在时被调用 | public Object getAttribute(String attribute) throws AttributeNotFoundException, MBeanException, ReflectionException {
if (attribute == null) {
return null;
}
if ("name".equals(attribute)) {
return name;
}
if ("age".equals(attribute)) {
retu... | 0 |
0d0ccda46ea6f80def61d674b6355098 | bbd8fda111145707d48544528cee5f16 | Creates an event builder to capture additional data in an event. Note that the event builder holds a reference
to the client, so the event builder can be used to send the event directly. | public class PagerDutyEventsClient
public static PagerDutyEventsClient create(String eventApi, boolean doRetries) {
return new PagerDutyClientBuilder().withEventApi(eventApi).withDoRetries(doRetries).build();
} | 0 |
6f2d3a366a58c4052c5c874812814ec0 | 21418d5c0279fcee5361ed546acb150e | Computes the force of interest-continuos compounding | float
cmpd_interest(float prin, float rate, int freq, int years)
{
return prin * pow((1+rate/freq), freq*years);
} | 0 |
df84faba2b0c3c90c49bcccc6888105d | f9d5f6243d1af9a8946d30214e8ee86d | 排序查询所有成绩 | List<Scores> list = add.queryScores();
for (Scores s : list) {
ShowQueryScore showQueryScore = new ShowQueryScore();
showQueryScore.setStuId(String.valueOf(s.getStudent().getSno()));
showQueryScore.setStuName(s.getStudent().getSname());
showQueryScore.setC... | 0 |
39e78d2fd349cf1370d001fc12f6fd3d | 07a6618b6e1745958c65420eee7a2739 | Always return true to prevent uplifted logs to be prematurely ignored | namespace Logging.Loggers
public class DevNullLogger<T> : BaseLogger<T>
public override bool IsEnabled(LogLevel logLevel)
{
return true;
} | 1 |
8f80c72929f767081f602e57c2c94b1d | e3cc4b0293e301cfd317c1c91c404572 | 关闭公开招募 | var that = $(this);
if($('#j_invite_close').length > 0){
var self = $('#j_invite_close'),
pop = self.closest('.J_pop_popup'),
club_id = pop.siblings('#addDarenBtn').attr('club_id'),
time = $('#proc_invite_time').val();;
$.ajax({
type: 'get',
url: '/ClubsAjax/close_invite_pop',
dataType: 'json',
... | 1 |
b828f9d19ad9a104b3080df510ee3775 | 6aa9c55c97b2c8d18b6c618531e34d6a | Pick features highly correlated with loss | df_corr = data.corr(method='spearman')
mask = np.ones(df_corr.columns.size) - np.eye(df_corr.columns.size)
df_corr = mask * df_corr
drops = []
for col in df_corr.drop(target,axis=1).columns.values:
if np.isin([col], drops):
continue
corr = df_corr[abs(df_corr[col]) > 0.93... | 0 |
5652328122718b04fca0ce12e53fd5da | 75b82a99b78ca0b1bc654b663375a49a | Enters specified query into Filter input field. | boolean status=false;
if (driver.isElementDisplayed(AccountsScreen.get("TextboxFilter"))) {
driver.find(AccountsScreen.get("TextboxFilter")).sendKeys(textToEnter);
status = true;
}
return status;
} | 1 |
52bb2e419a10f61fa99fbb7b6357ed59 | 6246abec81bed96de8c6ed116106455c | 出力ファイルのエンディアンフォーマット文字('<'or'>')を取得する | class CCP4File():
def _get_endianness(self):
ccp4_file = self.source
with open(ccp4_file,'rb') as mapfile:
byte = mapfile.read(216)[212]
machst = hex( ord(byte) )
assert machst=='0x44' or machst=='0x11', 'MACHINE STAMP UNKNOWN'
if (machst == '0x44'):
... | 1 |
d707dea50d2c1e4071b11d28f68698fa | af6fd6a82e34435e82540c58af8f66e9 | 외부 메모리가 장착되어있는지 확인한다. | public class SystemManager
public static boolean isExternalMemoryAvailable() {
return Environment.getExternalStorageState().equalsIgnoreCase(
Environment.MEDIA_MOUNTED);
} | 1 |
c4e0210ff2e45d37f9e583b8632f90f8 | be91d79d75a4732fd113999b15701c07 | Paint事件,重绘椭圆 | {
base.OnPaint(pevent);
using (GraphicsPath gPath = new GraphicsPath())
{
gPath.AddEllipse(0, 0, ClientSize.Width, ClientSize.Height);
this.Region = new Region(gPath);
}
using (SolidBrush drawBrush = new SolidBrush(BtnCo... | 1 |
87de6f882982ae9ed2f4022276b6940e | 474311973f2b597979a0c16abe764439 | 静态方法 该方法不会被实例继承,而是直接通过类来调用 | class Parent{
static obj(){
console.log('obj')
} | 1 |
28da98f0c14f47c2f0b9ae1a5d7f05f5 | 0a58504a85f8c94e4b460e4a242ebcfe | 单个添加,传入一个 CommonEntity对象,并返回影响行数 | @Service
interface IService<T : Serializable>
fun insertSelective(entity: T): Int | 1 |
261457154a110b0a46fc3b4b0b9ddb03 | a6bb245865a91af1db84e46c47cd00a9 | ミューテックスをロックする。
所有権が取得できない場合、取得できるまで待機する。 | static void mutex_take()
{
rt_mutex_take(&s_misaka_soft_i2c1_mutex, RT_WAITING_FOREVER);
} | 1 |
ada83f3df412e5dbd092d78d3fb47306 | 4813ed8acae1dae8a9b603b497abf5fd | Display telnet option negotiation information. | namespace telnetpp
std::ostream &operator<<(std::ostream &out, negotiation const &neg)
{
out << "negotiation[";
switch (neg.request())
{
case telnetpp::will : out << "WILL"; break;
case telnetpp::wont : out << "WONT"; break;
case telnetpp::do_ : out << "DO"; break;
case teln... | 1 |
9cbb58aa65c6277b3b055330c3ee71c2 | 095523793eb4c658cf57b10b15f288a9 | Returns the value of the '<em><b>Rated Voltage</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Rated Voltage</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | double getBusVoltage(); | 0 |
1693f8e007e3921ff363abd065dec959 | 2d3af8f7ccfafae750e04d51dec1201d | --------------------------------------------------------------------------------------------- /Отркывает форму с актёрами | {
MovieInformation.form1 = this;
var formActors = new Actors("Form1");
MovieInformation.actors = formActors;
MovieInformation.actors.Show();
this.Hide();
} | 1 |
5d43eeb282079d174d3aaa1e934a6a84 | 285767db97fe1b3a8740c3c4eebcdc1d | This needs a bit of explanation -
The Session is reinstantiated for each session, but consumers need to configure their instance of
ChromeDebugSession. Consumers should call getSession with their config options, then call
DebugSession.run with the result. Alternatively they could subclass ChromeDebugSession and pass
th... | public class VsTestConsoleWrapper : IVsTestConsoleWrapper
[Obsolete("This API is not final yet and is subject to changes.", false)]
public async Task<ITestSession?> StartTestSessionAsync(
IList<string> sources,
string? runSettings,
TestPlatformOptions? options,
ITestSessionEventsHand... | 0 |
26f34a82d57a0f1a17c374f02f6fb658 | 961711f1036db8af371c77b203240a10 | 요청 데이터와 결과데이터 비교하여 리스트 형성 | class expect_actual_dataComparison:
def complaint_list_dataComparison(self):
result, self.dicti_str_returned = data_check(self.expect_value, self.actual__value).TheTwo_list()
if result:
self.dicti_str_returned = None
return result ,self.dicti_str_returned | 1 |
22d2b5dc0aefdbc366b2920d7c40636d | be14fb9c7266a624e136a013bd674473 | Sets the value of the ipaddrmobccardv property.
allowed object is
{@link IPADDRMOBCCARDV } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "soapFilter", propOrder = {
"activated",
"actionid",
"addresstype",
"additional",
"agentid",
"agrmid",
"archive",
"appid",
"asnum",
"autoassign",
"blocked",
"blocktype",
"catid",
"category",
"catidx",
"... | 0 |
c6cba95984db7d64908c01599d2dab98 | a65cabe008ad67809ca2f51a5493592e | listing linux directories | {
#ifdef _WIN32
system("dir");
#else
system("ls");
#endif
return 0;
} | 1 |
ca25c2ee705c5d740040b7a268d8f7ca | 9ef712e5d53a84839166f1a748149b7a | 取得开机时长 | fun getLeftTime(context: Context): Long {
val sharedPreferences = context
.getSharedPreferences(PARAM_SERVICE_SP_FILE_NAME, Context.MODE_PRIVATE)
return sharedPreferences.getLong(PARAM_SERVICE_SP_LEFT_TIME, -1)
} | 0 |
3f93681516f2d5c4a42083261366a373 | 1e1ac86f74f11b84f0f9b0748ab31104 | 缩放后部分显示不全,设置Padding解决 | public class TCDanmuView extends DanmakuView private class BackgroundCacheStuffer extends SpannedCacheStuffer
@Override
public void measure(BaseDanmaku danmaku, TextPaint paint, boolean fromWorkerThread) {
danmaku.padding = 10;
super.measure(danmaku, paint, fromWorkerThread);
... | 1 |
16d800b7523b064a9f4afec014ff677b | 6264786a79abf2e7f58f0a0079547dfb | Retorna sfAction | class Xtras
static public function getAction()
{
$instance = sfContext::getInstance();
return $instance->getController()->getAction( $instance->getModuleName(), $instance->getActionName() );
} | 1 |
461a8fcb884c7f8e77635eda0458995f | b54b96f29a69ae7fd64f7418c9b1d350 | Reports the zero-based indexes of all the occurrences of the specified <paramref name="find" /> string in the current <see cref="String" /> object. | [Docking(DockingBehavior.Ask)]
[Designer($"System.Windows.Forms.Design.RichTextBoxDesigner, {AssemblyRef.SystemDesign}")]
[SRDescription(nameof(SR.DescriptionRichTextBox))]
public partial class RichTextBox : TextBoxBase
public int Find(string str)
{
return Find(str, 0, 0, RichTextBoxFinds.None);
} | 0 |
97fa8f751f090073c2b528fe9d52e5af | 123ce5d584cc142807b115d1d1f69711 | CreateMigrationCommand constructor. | final class CreateMigrationCommand extends Command
public function __construct(Migrations\Migrator $migrator, DatabaseManager $dbal)
{
parent::__construct();
$this->migrator = $migrator;
$this->dbal = $dbal;
} | 1 |
17f2648b1c7bc8d9286cba3f9938cb95 | 511e70f3dcd58da8511a65430d52e162 | 清空已选的类型的全部书籍 | List<Book> ccc = null;
List<Book> temp = new ArrayList<Book>();
if (type == 0) {
ccc = all;
} else {
ccc = adapter.objects;
}
switch (checkedId) {
case R.id.rb_1:
adapter.setObjects(all);
break;
... | 0 |
2f87bf012316834e947d8497f75588e4 | c2e8816282de95bbe41f672295ae0efe | Check if MasterLocationsReceiptAcknowledged is current selection for choice. | Object oo = get_Value("IsMPS");
if (oo != null) {
if (oo instanceof Boolean)
return ((Boolean) oo).booleanValue();
return "Y".equals(oo);
}
return false;
} | 0 |
9cc4931e08d47915ffff6682d6b70e61 | b7dfe4a40aa74d5148c1ec7abacd095e | Enter 키가 눌렸을 경우 기본 이벤트 무시하고 특정 엘리먼트로 포커스 이동 | function enterGoto(nextObject) {
if (event.keyCode == 13) {
nextObject.focus();
}
} | 1 |
a85b2a1580e7fbbed8d81c8aa6f285c9 | e53fff5f0ffaa38c98550fb73ab59f66 | Tests if the PDO class exists. | class PDOConnector implements ConnectorInterface
public function validate($connection): bool
{
return $connection instanceof \PDO;
} | 0 |
d4bc7a1303504b07eebcc104515dddf1 | 0f755203a8388129ff0e11432954cfe4 | 全エントリーの平均レーティングを返す | $reviews = DB::select('select count(1) as count, SUM(global_rate) as sum from hon_honcuratorreview_reviews where app_id = ?', [$this->id]);
if (!$reviews[0]->count) {
return 0;
}
return $reviews[0]->sum / $reviews[0]->count;
} | 1 |
699180c17fdfb12cb5028a2040a46868 | 08c35c61ee8ddf7be438954350d231db | What is the next bit set?
(after a specified point) | if( fromIndex < 0 || fromIndex >= length() )
throw new IllegalArgumentException();
int result = impl.nextClearBit( fromIndex );
if( result == length )
result = -1;
return result;
} | 0 |
8372187ac2f2d10f32ce8d48cb8af4b5 | 39e8dc020b68feabae9bf42ccb7fe5e9 | Test plotting (x, y1), (x, y2), ... at the same time. | fig = plt.figure()
ax = fig.add_subplot(111)
x = np.arange(100)
ax.plot(x, 50 - x, 'o', label='y=1')
ax.plot(x, x - 50, 'o', label='y=-1')
ax.legend(loc='best') | 1 |
c1326d929e4a586b7ebec9ca582a4535 | af8261db80fc18f48cab231a44071a72 | Most Permissive Observer | namespace Bloaters
class Definition
void PrimitiveObsession()
{
} | 0 |
b3a32575e51a39b8fc3ef530e8251eef | 6023d64d86249e9b5d3fc7f66959ac8e | 生成插件所需目录 | let _ = path.join(this.basePath, '/plugins/');
!fs.existsSync(_) ? fs.mkdirSync(_) : null;
return _;
} | 1 |
2b04d34ad70e2015b121a68470efa0aa | b1879ccc61c25e159ca0506f891d7e41 | Test function to compute perpendicular to vectors. | class Test_1_Vector(TestCase):
def test_cross_product(self):
x = Vector(1.0, 0.0, 0.0)
y = Vector(0.0, 1.0, 0.0)
result = Vector(0.0, 0.0, 1.0)
self.assertEqual(x.cross(y), result)
self.assertEqual(y.cross(x), -result) | 1 |
71041fa240ae60f8df460da045b51429 | d729b394728a2c3599ccf6bd30486b46 | int[0] = the maximum number of topics any team can know and
int[1] = the number of teams that can be formed that know that maximum number of topics. | {
List<int[]> people = new List<int[]>();
for (int personIndex = 0; personIndex < numberOfPeople; personIndex++)
{
string topicKnowledgeString = Console.ReadLine();
int[] personTopicKnowledge = new int[topicKnowledgeString.Length];
... | 0 |
2292891a47cda312512be7d72bfa78ae | 475b3142440a0333e5878a9adf081ba9 | Download CODH char shapes data if it doesn't exist in
processed_folder already. | for _, dataset in SCHEMA.iterrows():
dataset_id = dataset["id"]
if is_downloadable(dataset_id):
download(dataset_id) | 0 |
6ba7b1f8c24469a1e6b03d119c1cccf2 | 3f42ef34ef4b89df65f86526cf585e60 | This function disables the AXI4S Bridge | {
u32 swsm;
swsm = rd32(E1000_SWSM);
swsm &= ~(E1000_SWSM_SMBI | E1000_SWSM_SWESMBI);
wr32(E1000_SWSM, swsm);
} | 0 |
cdbda092103df92a63a9527e6f7d11b2 | dfccdbc3340027a79d5185d55a3c876c | Delete a panel from a dashboard. | self, dashboard_id, custom_headers=None, raw=False, **operation_config):
url = self.delete_dashboard.metadata['url']
path_format_arguments = {
'dashboardId': self._serialize.url("dashboard_id", dashboard_id, 'int')
}
url = self._client.format_url(url, **path_forma... | 0 |
c354e0f628097af67b49fd5b4182a342 | 2d732ce11b62030dcfd8ca7c12de6b69 | make User csv files for GETTIIS | def main():
user = getpass.getuser()
if user == 'frenchd':
inFilename = '/usr/data/moosejaw/frenchd/GT_update2/FinalGalaxyTable2_group1.csv'
outFilename = '/usr/data/moosejaw/frenchd/GT_update2/FinalGalaxyTable4.dat'
outFilename2 = '/usr/data/moosejaw/frenchd/GT_update2/FinalGalaxyTable4... | 0 |
1586fbc4c397f7e267db60a204b81d9b | 0b36a5c7dc912832ebc726b507334294 | 检查frame 是否存在,存在则切换进frame控件中 | class BasePage:
def frame_in(self,frame_name=None,frame_xpath=None,wait_time=40,interval=0.5):
if frame_name==None and frame_xpath==None:
print("frame_name和frame_xpath,这2个参数不能同时为空,请重新输入")
return -1
elif frame_name!=None:
WebDriverWait(self.driver,wait_time,interval... | 1 |
0b946f255586ddea8e10cfcb20c37d6e | e2b4cef64e63853d8307581aced56aec | 设置可被多个进程共享的Boolean值 | public class SharePreUtil
public static Boolean putBoolean(String preName, Context context, String key, Boolean value) {
SharedPreferences pre = context.getSharedPreferences(preName, Context.MODE_PRIVATE);
Editor editor = pre.edit();
editor.putBoolean(key, value);
return editor.commit();
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.