query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8686fa065f97f02c9cff3a4b25ab503b | d5eb910ffd7b70726a00d6a5abc78c2c | Verifica si el vuelo existe. | namespace MyAirportWebAPI.Controllers
[Produces("application/json")]
[Route("api/[controller]")]
[ApiController]
public class VolsController : ControllerBase
private bool VolExists(int id)
{
return _context.Vols.Any(e => e.VoldID == id);
} | 1 |
10142b81705fd11ffcfcc8b79a7fb488 | cb4224dd804881f1d6be36e788c48b2f | Returns a offset of first node which includes the given property name and value. | public class RecordList extends BaseClass implements com.smartgwt.client.data.events.HasDataChangedHandlers
public native int findIndex(String propertyName, String value) ; | 1 |
0dde8a697f22802ed4d757850c6319db | e42f2d543384ba1809eb266a91ad376f | 获取DateHelper实例, 使用当前时间作为基准时间 | export default class AppL
public static get DateUtils() {
return DateUtils.getInstance();
} | 0 |
4500bcc88d26268d9e236ef1fe27096e | fe83420a3694ca3b6f015ff7be5d924d | コントロールカーブのデフォルト値を取得する | {
if (!IsInitialized(prop)) return null;
SerializedProperty valueTree = prop.FindPropertyRelative("valueTree");
return valueTree.GetArrayElementAtIndex(1).FindPropertyRelative("defaultValue").objectReferenceValue;
} | 1 |
fc2956e79497b2498d6b925d32a93cb8 | 1d62f584c6c6e7f0ced32ef3c88be9b5 | Gets the dailyPrintUsageByUser property value. Retrieve a list of daily print usage summaries, grouped by user. | class ReportRoot
def monthly_print_usage_by_user
return @monthly_print_usage_by_user
end | 0 |
7eaa58aff657f047858c922bf4184310 | e7d0bc34643f7669dc604939ce460eaf | Genererer opp veien ut av labyrinten fra inngangsposisjonen i labyrinten, samt veien
rundt og frem til inngangen av labyrinten igjen | public class Labyrint
@Override
public String toString() {
String labyrintStreng = "";
for(int y = 0; y < hoeyde; y++) {
for(int x = 0; x < lengde; x++) {
labyrintStreng += Character.toString(ruteArray[x][y].tilTegn());
}
labyrintStreng += "\n";
}
return labyrintStreng;
... | 0 |
b844c71dc52ecfdbc1ee16acc0e67bc3 | 3472711132bff9a379ec2b9249963a96 | collect a module and it's deps into a single string,
ordered to satisfy the deps as it's evalled in JS | function _calcFullDeps(pkg) {
var foundDeps = [];
foundDeps = _calcModuleDeps(_depToArr(pkg.deps), foundDeps);
return foundDeps;
} | 0 |
0ad99302af28b582f97881795dbbc34b | 0baf0e250f82b02a911d9cbfbb33e812 | Gets the value of the advBkUnitInd property.
possible object is
{@link String } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TKwotyPozycji", propOrder = {
"kwotaA",
"kwotaB",
"kwotaB1"
})
@XmlSeeAlso({
sprawozdania.v12.BilansJednostkaOp.Aktywa.AktywaA.class,
sprawozdania.v12.BilansJednostkaOp.Aktywa.AktywaB.class,
sprawozdania.v12.BilansJednostkaOp.Aktywa... | 0 |
22eb77049ac900464c33540cb18c380f | 4f0b393155e0b90c172598b170d7aaef | 展示主线关卡保存阵容的武将列表 | {
m_infoList.Clear ();
foreach (MemberInfo member in membersResp.memberInfo)
{
if (member.identity == 1)
{
m_infoList.Add (member);
}
}
if (m_infoList.Count != 0)
{
noFuLeaderDes.text = "";
for (int i = 0;i < m_infoList.Count - 1;i ++)
{
for (int j = 0;j < m_infoList.Count - i -1;... | 0 |
17657bfa1e0a3be5524c3d0b3f7febcf | b03f140987893a54d2b6e33f365802e7 | Add global step to ModelRegistry. | class ShowAndTellModel(object):
def setup_global_step(self):
print("setup_global_step")
global_step = tf.Variable(
initial_value=0,
name="global_step",
trainable=False,
collections=[tf.GraphKeys.GLOBAL_STEP, tf.GraphKeys.GLOBAL_VARIABLES])
self.global_step = global_step | 0 |
7611febbd87c6a726c989fa3e9bf880c | 136bd6168b214695e41663eb1a0f7377 | セリフ変更メソッド | public class Talk : MonoBehaviour
void ChangeVoice()
{
string name = _scenarioDataList[LineCount].voice;
SoundManager.Instance.PlayCriAtomVoice(name);
} | 0 |
841ecf4179643b83e2506aad18cb7e5b | 00703e6910eff379e37972859d14e5dd | 读取序列号文件,去除可能的重复序列号 | read_f = open(sPath,"rb")
original_list = read_f.readlines()
print(len(original_list))
read_f.close()
newlist=[]
for iline in original_list:
if not iline.decode("utf8","ignore") in newlist:
newlist.append(iline.decode("utf8","ignore"))
print(len(newlist))
newtxt="".... | 1 |
eecf68498d227a0cb8ec3116b6d4514f | fe4ed6a2e24b1df03ad755c155419077 | 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... | class language_env(object):
def mmi_norm(self, x, y, tuples):
P_ = {x: self.P(x, tuples), y: self.P(y, tuples)}
P_xy = self.condP(x, y, tuples)
return - P_[x] * log2(P_[x]) - P_[y] * (-P_xy * log2(P_xy)) | 0 |
4c748ae5d9d14a62a9e3af8df3b6b2ee | 47b607271e50fa4a3c1f8db4a5087cf3 | Gets the apcon approval type price by identifier. | bool isActiveOnly = true)
{
var result = (from d in db.ApconApprovalTypePrices
join e in db.ApconApprovalTypes on d.ApconApprovalTypeId equals e.ApconApprovalTypeId
select new Models.ApconApprovalTypePriceModel
... | 0 |
20598071ae10efa4e1330f7276fe8e37 | af6c017a7cd6efdfb8c08abe210913df | Given a valid size value, returns a new size value with room for a prefixing Header structure. | impl<H> HeaderWithLength<H>
pub fn new(header: H, length: usize) -> Self {
HeaderWithLength { header, length }
} | 0 |
00aab4b17dc7d664127d0ca89b8759a6 | 093967ba321c3fcad2e8f6347c0a48b1 | Converting ISO8601 formatted duration to normal readable time | def iso_8601_readable(original: str) -> str:
return re.sub(r"(\d+-\d+-\d+)T(\d+:\d+).+", r"\1 \2", original) | 0 |
1801ec5a7d8c03de913f3483362facb2 | 2068cf71c03a15266532e9601852d6fe | Builds the rendering passes.
Multi-pass rendering is not currently supported.
For now, just log the render passes described by this PFX resource. | namespace SpaceSimulator.Common
public sealed class RenderingPasses
public void Render(SharpDX.Direct3D11.DeviceContext deviceContext, SharpDX.Direct2D1.DeviceContext deviceContext2D)
{
foreach (var pass in this.renderingPasses)
{
pass.Render(deviceContext, deviceCont... | 0 |
b5dc9e32811ebad22f951d669ef65b08 | 450226e44ac1de2a2f4ec74504abb847 | Read a EnumDef-derived instance by it's primary key.
or null if no such key value exists. | ICFDbTestEnumDefObj readEnumDefByUNameIdx( long TenantId,
long ScopeId,
String Name ); | 0 |
f6d811586e7b6107497f581e0d60cbd8 | 5435c21b4bdb17f988b1e0a1de4bc09c | 获取最近半年时间段 | String str[] = new String[2];
SimpleDateFormat sdf = new SimpleDateFormat(DEFAULT_DATETIME_FORMAT);
Calendar date = Calendar.getInstance();
str[1] = sdf.format(date.getTime());
date.add(Calendar.MONTH, -3);
str[0] = sdf.format(date.getTime());
return str;
} | 0 |
42bbe49ff9bbd909a660b1fbae0cfce2 | 902ef1c4808d83eb5608d743ce00c157 | Notify observers whenever the camera of the Google map is idle | interface MapListenerDelegate
fun subscribeMapIdle(mapIdleCallback: MapIdleCallback): Cancelable | 1 |
96dfcb7b9699392d769e88ab1b2650f2 | 1de2e47740f0d532635452045c4227ff | Test that we properly get a hole with the TSTM. | cube_fname = self._generate_cube_stl()
h = 0.1
x, y, z = G.get_stl_surface(cube_fname, h, 1)
self._cube_assert(x, y, z, h) | 0 |
34e8f50e7a83c31113f42b81399b74e8 | a36851ed59fa9e13a22a60b2c6cb242e | function to verify reg.map filter setting | NIM *nim,
int idx)
{
static char *rvm_msg = "RegisterVerifyRegFilter()";
if ((demod_register_map[idx].regfilter&(REGF_COBRA|REGF_CAM_DEF|REGF_CAM_EXT|REGF_CAM_ONLY|REGF_CAM_RED|REGF_ZEROB6)) == 0)
{
DRIVER_SET_ERROR_MSG(nim,API_REG_VERFY_ID... | 1 |
bdb1af16d3720eb94e657a4ee68baa3e | 7bb34177a86254327056d1142560c1c3 | 删除该节点,而不删除该节点的子节点 | public class CreateSession2
private void delNode() {
zkClient.delete(path);
zkClient.deleteRecursive(path);
System.out.println("删除节点完成");
} | 0 |
90362a65627c8a174b828948f32f1d1b | 911937a2b840eaccb37d70f8d419081e | Gets rows related to one combination of EmployeeId columns in the dbo.HealthLoanDecisionFirstPaymentVw view. | namespace AA.HRMS.Interfaces
IList<IPayrollEmployeeLoan> GetPayrollEmployeeLoanByPayrollId(int payrollId); | 0 |
08b2942113fb513524b0636fcafbb842 | 4406e7dd70134976d410ba99684bde18 | helper to extract player name who is being reported | public abstract String getPlayerKilledName(String[] splitedLogLine); | 1 |
1f2c074d80dd4278788e42915ed17382 | 85432159a9f3f374fe134af161d8571c | Gets the percentage difference between two doubles. | namespace Aquality.Selenium.Core.Visualization
float PercentageDifference(SKImage thisOne, SKImage theOtherOne, float? threshold = null); | 0 |
90997e17bdd3052123954441a09f9777 | f13fda5edb3776fc30badb81850797ea | 将角色自身信息以及对应的菜单更新到数据库 | @Service
public class SysRoleServiceIImpl implements SysRoleServiceI
@Override
@Transactional(rollbackFor = Exception.class)
public int updateRole(SysRole role) {
roleMapper.updateRole(role);
Map<String, Object> columnMap = new HashedMap(1);
columnMap.put("ROLE_ID", role.getRoleId());
... | 1 |
80eb45f8ddb6a8a1c64d3cd778d7c3d0 | e55917d415cd01f3eff8246cfcbe5730 | 获取一笔交易,最先收到的交易,获取之后从内存池中移除 | if (transactionHashMap.size() > 0) {
Transaction transaction = transactionHashMap.get(0);
transactionHashMap.remove(0);
return transaction;
} else {
return null;
}
} | 1 |
9fb20a1d508f1c59c180bbdd5ae93ded | 77c0a64dd950e30aed212ac0ef7e209b | 测试试验区域中的试验区工位的增删改查 | try:
cli_add_zone_lzy(devname=dev1, username="admin", password="admin@139", port=22, num1=1, num2=1023)
sleep(2)
login_web(browser, url=dev1)
count1 = get_count_number_zone_lzy(browser)
print(count1)
n = 1
m = 1
while count1 < 1024:
cli_add... | 1 |
0d0ccda46ea6f80def61d674b6355098 | 6b46b105069ed60d2a7ca60af6cb7e83 | 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. | @Beta(Beta.SinceVersion.V1_7_0)
WithCreate withNewEventHub(String eventHubName, int partitionCount); | 0 |
6f2d3a366a58c4052c5c874812814ec0 | e4c9e8cfb66fb1b86869b3eb6542c587 | Computes the force of interest-continuos compounding | if current_value < 0 and interest_rate > 0:
return current_value * (interest_rate ** time_period_years)
elif current_value < 0 and interest_rate < 0:
return current_value * ((1 - interest_rate) ** time_period_years)
else:
return current_value * ((1 + interest_rate) ** time_period_yea... | 0 |
df84faba2b0c3c90c49bcccc6888105d | e66a096262149f541945dbec131e9d54 | 排序查询所有成绩 | public Result<Studentscore> listAll(Studentscore studentScore, int page, int row) {
return studentScoreDAO.listAll(studentScore,page, row);
} | 0 |
39e78d2fd349cf1370d001fc12f6fd3d | 5d43fb0569c654f4c36b06ce6eb3d845 | Always return true to prevent uplifted logs to be prematurely ignored | public class SaveLogSkipPolicy implements SkipPolicy
@Override
public boolean shouldSkip(Throwable t, int skipCount) throws SkipLimitExceededException {
LOGGER.error(t.getMessage(), t);
return true;
} | 1 |
8f80c72929f767081f602e57c2c94b1d | 6716fae44bada29b65abcbefd9c097e9 | 关闭公开招募 | $id = $this->objInput->getInt("id");
if(empty($id)){
$this->showError("参数丢失!");
}
$mDjq = ClsFactory::Create("Model.Notice.mDjq");
$dataa=array(
'is_hide'=>2,
);
$result = $mDjq->modifyDjqById($dataa, $id);
if(!empty($result)){
... | 1 |
b828f9d19ad9a104b3080df510ee3775 | e8b3d348c3dd9c881af29031a984d6ab | Pick features highly correlated with loss | def find_correlated_features(design_matrix):
corr_matrix = design_matrix.corr()
corr_matrix = corr_matrix['SalePrice']
corr_matrix = corr_matrix[corr_matrix >= 0.6]
return list(corr_matrix.index) | 0 |
5652328122718b04fca0ce12e53fd5da | 906e87a2a7a5ed6b3e008bdcd5e85282 | Enters specified query into Filter input field. | await this.click( '.filter-select' );
await this.page.select( '.filter-select', 'Excerpt' );
await this.click( '.filter-input' );
await this.type( value );
return this.click( '.input-group-btn .btn' );
} | 1 |
52bb2e419a10f61fa99fbb7b6357ed59 | 62b637fe4620f575e25256ae9591f764 | 出力ファイルのエンディアンフォーマット文字('<'or'>')を取得する | class DataWriter extends FilterWriter
protected function getEndianness()
{
return $this->endianness;
} | 1 |
d707dea50d2c1e4071b11d28f68698fa | fc3aa94e55222809e18781bb8a660e23 | 외부 메모리가 장착되어있는지 확인한다. | public class MainActivity extends AppCompatActivity
private boolean isExternalmemoryWritable() {
return Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState());
} | 1 |
c4e0210ff2e45d37f9e583b8632f90f8 | ff510d38271d2d230a3dc476abf73d43 | Paint事件,重绘椭圆 | void MainWindow_dds::paintEvent(QPaintEvent *event)
{
Q_UNUSED(event);
QPainter painter(this);
painter.setPen(Qt::NoPen);
painter.setRenderHint(QPainter::Antialiasing);
QPainterPath path;
QColor background;
QColor thumbColor;
qreal dOpacity;
if (isEnabled())
{ ... | 1 |
87de6f882982ae9ed2f4022276b6940e | 5b5ece378b5cd357ac888260299e9560 | 静态方法 该方法不会被实例继承,而是直接通过类来调用 | public abstract class Animal
public static void look(){
System.out.println("这是一个静态方法");
} | 1 |
28da98f0c14f47c2f0b9ae1a5d7f05f5 | d1dfba7f2a5df21e89a915e69b8be899 | 单个添加,传入一个 CommonEntity对象,并返回影响行数 | int insert = getBaseDao().insert(entity);
if (insert > 0) {
return entity;
} else {
return null;
}
} | 0 |
261457154a110b0a46fc3b4b0b9ddb03 | d71d54e70a09452c8cf8e2d565343714 | ミューテックスをロックする。
所有権が取得できない場合、取得できるまで待機する。 | const { db, config, logger } = ctx.state
while (true) {
const mutex = await db.get('mutex:' + name)
if (!mutex) {
break
}
const start = parseInt(mutex, 10)
if (start + config.mutexTimeout < Date.now()) {
logger.debug(`Mutex "${name}" timed out`)
break
}
logger.debug(`Wa... | 1 |
ada83f3df412e5dbd092d78d3fb47306 | d5e3d524453da4908bc7abf1a835e2c0 | Display telnet option negotiation information. | net_snap_options(void)
{
bool any = false;
int i;
static unsigned char ttype_str[] = {
IAC, DO, TELOPT_TTYPE,
IAC, SB, TELOPT_TTYPE, TELQUAL_SEND, IAC, SE
};
if (!CONNECTED) {
return false;
}
obptr = obuf;
if (myopts[TELOPT_TTYPE]) {
unsigned j;
space3270out(sizeof(ttype_str));
for... | 1 |
9cbb58aa65c6277b3b055330c3ee71c2 | ed5801a46c74658ba89c42d77ee033fd | 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 --> | PowerRange ratedPower(); | 0 |
1693f8e007e3921ff363abd065dec959 | bedf27babcdefde827e1c9a61ceef54b | --------------------------------------------------------------------------------------------- /Отркывает форму с актёрами | namespace KinoSoft.Forms
public partial class AddMovie : Form
private void Actors_Click(object sender, EventArgs e)
{
Forms.AddActor asd = new Forms.AddActor();
asd.Show();
} | 1 |
5d43eeb282079d174d3aaa1e934a6a84 | 4ac3d523642747685b97f6d9992ecffe | 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... | export class MCDebugSession extends DebugSession
protected async launchRequest(response: DebugProtocol.LaunchResponse, args: DebugProtocol.LaunchRequestArguments, request?: DebugProtocol.Request) {
} | 0 |
26f34a82d57a0f1a17c374f02f6fb658 | 70bdc0ece0f719bb0ccdd7fc4bcac02f | 요청 데이터와 결과데이터 비교하여 리스트 형성 | def comp():
REQ_DiR = '/T-friend_data/test_REQ/dev'
comp_DIR = '/T-friend_data/test_RES/dev'
file_name = []
comp_name = []
f_list = []
file_list = os.listdir(REQ_DiR)
comp_list = os.listdir(comp_DIR)
for file in file_list:
name = os.path.splitext(file)
file_name.append(na... | 1 |
22d2b5dc0aefdbc366b2920d7c40636d | 8f47ebe5e2363bf7a21ad10bb3f3ec88 | 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 | 71dd8ef344ce4433e24218e77e50f781 | listing linux directories | cmd = 'ls'
res = os.popen(cmd).read().strip("\n").split("\n")
for o in res:
print o | 1 |
ca25c2ee705c5d740040b7a268d8f7ca | 3c7e0b29ae21f24421a9df93430d542f | 取得开机时长 | if (phone == null) {
phone = "";
}
return preferences.getString("BootUpdateTime" + phone, "");
} | 0 |
3f93681516f2d5c4a42083261366a373 | e60740ec097d8c96143cd6a59a453977 | 缩放后部分显示不全,设置Padding解决 | {
int actualWidth = _viewWidth + _scaleDrawableWidth;
int actualHeight = _viewHeight + _scaleDrawableHeight;
int newPaddingLeft = (int) (_parentCenter.x - actualWidth /2);
int newPaddingTop = (int) (_parentCenter.y - actualHeight/2);
getCreateOffset();
if(_viewPadding... | 1 |
16d800b7523b064a9f4afec014ff677b | 9af3e8e683f9b9ae593eeea5d75c2bce | Retorna sfAction | class Mjoelnir_Site
public function getAction() {
return $this->_action;
} | 0 |
461a8fcb884c7f8e77635eda0458995f | e41ea70c51fb25e777c6460446d8657d | Reports the zero-based indexes of all the occurrences of the specified <paramref name="find" /> string in the current <see cref="String" /> object. | static class CodeFinding
public static int FindCode(this ReadOnlySpan<char> source, string codeToFind, int startIndex = 0)
{
return source.FindCode(codeToFind.AsSpan(), startIndex);
} | 0 |
97fa8f751f090073c2b528fe9d52e5af | 09f802bd8aa166b1250bacca644c8dc9 | CreateMigrationCommand constructor. | class MigrationsCommand extends DatabaseCommand
public function __construct()
{
parent::__construct();
} | 0 |
17f2648b1c7bc8d9286cba3f9938cb95 | 3e14d11eb2a9a980c9e25e75329ec719 | 清空已选的类型的全部书籍 | var type1 = document.getElementById("type1").value;
var type2 = document.getElementById("type2").value;
var t = document.getElementById("selectone");
var selectValue=t.options;
var value;
for(i=0;i<selectValue.length;i++){
if(selectValue[i].text==type1){
value = selectValue[i].value;
selectValue[... | 0 |
2f87bf012316834e947d8497f75588e4 | a0c4812b3fc1ee91accd1a60241b8892 | Check if MasterLocationsReceiptAcknowledged is current selection for choice. | {
Object oo = get_Value(COLUMNNAME_IsReceipt);
if (oo != null)
{
if (oo instanceof Boolean)
return ((Boolean)oo).booleanValue();
return "Y".equals(oo);
}
return false;
} | 0 |
9cc4931e08d47915ffff6682d6b70e61 | 0ff077e911b471b455dc9e54515c1eb6 | Enter 키가 눌렸을 경우 기본 이벤트 무시하고 특정 엘리먼트로 포커스 이동 | namespace CTOP.Base
public partial class AO_4 : UserControl
private void KeyEnterDown(object sender, KeyEventArgs e)
{
if (e.Key != Key.Enter)
{
return;
}
VText.Focus();
} | 1 |
a85b2a1580e7fbbed8d81c8aa6f285c9 | b29c7913a31f49f54d781c35f046b219 | Tests if the PDO class exists. | {
$pdoOci8 = new Pdo_Oci8(
$this->_dsn,
$this->_username,
$this->_password,
[PDO::ATTR_PERSISTENT => true]
);
$this->assertType('Pdo_Oci8', $pdoOci8);
$this->assertType('PDO', $pdoOci8);
} | 0 |
d4bc7a1303504b07eebcc104515dddf1 | 7e3bbbc4bb32f1cc2e2dc93d7c7ba004 | 全エントリーの平均レーティングを返す | q = self.master_ratings.all()
cnt = q.count()
if cnt != 0:
res = sum(el.value for el in q)
return round(res / cnt, 1)
return 5.0 | 1 |
699180c17fdfb12cb5028a2040a46868 | 95f454e64d687229e08a51fdacc000da | What is the next bit set?
(after a specified point) | public class BitSet
public int nextClearBit(int fromIndex) {
int offset = fromIndex >> 6;
long mask = 1L << fromIndex;
while (offset < _length) {
long h = bits[offset];
do {
if ((h & mask) == 0) {
return fromIndex;
}
... | 0 |
8372187ac2f2d10f32ce8d48cb8af4b5 | 33daad30b131d397702025bbb3cd58c3 | Test plotting (x, y1), (x, y2), ... at the same time. | def test_plot_markers_tuple_node_coords(coords):
plot_markers(
[1, 2, 3, 4], [tuple(coord) for coord in coords], display_mode="x"
)
plt.close() | 1 |
c1326d929e4a586b7ebec9ca582a4535 | 7f61448ad6da3ef0f9cb03f40c5be655 | Most Permissive Observer | cases like (1) | 0 |
b3a32575e51a39b8fc3ef530e8251eef | 143e1651feec62dc5b2b7f4b1201697c | 生成插件所需目录 | class Plugin
protected function package($name, $db, $request)
{
$dbName = $this->convertUnderline(rtrim($db['name'], 's'));
$dbNames = $this->convertUnderline(rtrim($db['name'], 's'), true);
$abbreviation = ucwords($name);
$this->copyProcessing('/api/app/Http/Controllers/v' . config(... | 1 |
2b04d34ad70e2015b121a68470efa0aa | d1aea003eb5034ded893dcd8ad343cd0 | Test function to compute perpendicular to vectors. | {
vec2 v, o;
v = { 3.0f, 5.0f };
o = { 7.0f, 11.0f };
ASSERT_FLOAT_EQ(6.2568741f, angle_to(v, o));
ASSERT_FLOAT_EQ(0.026311371f, angle_to(o, v));
} | 0 |
71041fa240ae60f8df460da045b51429 | 4d7ccabc42853c677d5d9f4fe7ff167e | 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. | namespace MDMazeGeneration
static class Initializer
static int[] InputMaxCellsAndGenCount()
{
int _cellCount = 1;
int _cellsLeft;
int _maxCells = 0;
int _maxSize;
int _minSize = 1;
while (_maxCells < 2)
{
try... | 0 |
2292891a47cda312512be7d72bfa78ae | c9a6736c1e3f0f45978f2f9184f9f7dd | Download CODH char shapes data if it doesn't exist in
processed_folder already. | regions = []
tc_code = telecom_circle['tc_code']
iso3 = telecom_circle['iso3']
path = os.path.join(DATA_INTERMEDIATE, iso3, tc_code)
if not os.path.exists(path):
print('Creating directory {}'.format(path))
os.makedirs(path)
regional_levels = [2, 3]
for regional_level in regio... | 0 |
6ba7b1f8c24469a1e6b03d119c1cccf2 | 2672bbe3130ebaf533e40b115633ddb4 | This function disables the AXI4S Bridge | {
out32(BRIDGE(LOCAL, CFGADDR), 0x50000080);
iobarrier_rw();
out32(BRIDGE(LOCAL, CFGDATA), 0x32000000);
iobarrier_rw();
out32(BRIDGE(CPCI, CFGADDR), 0x50000180);
iobarrier_rw();
out32(BRIDGE(CPCI, CFGDATA), 0x32000000);
iobarrier_rw();
} | 0 |
cdbda092103df92a63a9527e6f7d11b2 | 4db184b4b3b99fd11d1a3f91b711d9b8 | Delete a panel from a dashboard. | class DashboardService:
def delete(self, dashboard_id: str) -> Response:
return self.__http_client.make_request(f"/api/config/v1/dashboards/{dashboard_id}", method="DELETE") | 0 |
c354e0f628097af67b49fd5b4182a342 | 3c06774e5ad79005b4290e1f065f1599 | make User csv files for GETTIIS | year = datetime.date.today().year
start_date = datetime.date.today().isoformat()
cycle = 3
user_md = {"name": name,
"gup": gup,
"saf": saf,
"start_date": start_date}
user_md.update(md)
user_folder = make_user_folder(base_folder, year, cycle, gup)
... | 0 |
1586fbc4c397f7e267db60a204b81d9b | fdec7c6106ad864a3d1d288a412878a1 | 检查frame 是否存在,存在则切换进frame控件中 | frame_name = str(frame_path).split("/")
if frame_name[0] is '':
self.driver.switch_to.default_content()
frame_name.pop(0)
for f in frame_name:
self.driver.switch_to.frame(f) | 0 |
0b946f255586ddea8e10cfcb20c37d6e | 6017c44224e73abb7c3ef6351e0e1c6e | 设置可被多个进程共享的Boolean值 | public class ShareUtils
public static void put(String name, Boolean value, Context context) {
SharedPreferences settings = context.getSharedPreferences("OnstarSetting",
Context.MODE_PRIVATE);
settings.edit().putBoolean(name, value).commit();
} | 0 |
0c602e29d738c40d4bf0de3e83923a4c | 312aff048a6596875767f58c05cdf660 | 商品_優良設定詳細コード1を設定します。 | public class GoodsMasterSearchDto implements Serializable
public void setPrmSetDtlNo1(Integer prmSetDtlNo1) {
this.prmSetDtlNo1 = prmSetDtlNo1;
} | 1 |
cf3d942eb6cb9d9ff6abed9806892c4f | 3af0b439f121b7f0c0f215c9b429ad09 | Post 获取报价保险公司 | {
$params =$request->all();
$rules = [
'order_no' => 'required',
];
$validateParams = $this->validateParams($rules,$params);
if (empty($validateParams) || $validateParams['code']!=0) {
return apiResponse([],$validateParams['code']);
}
... | 1 |
5c8de5dfa241e457df4142c73e80106a | 13631c79dbeaf34ef45397f5f474cc02 | función para comprobar que el inicio de sesión sea correcto o incorrecto | try{
var request = new globals.sql.Request();
let USUCORREO = req.body.USUCORREO.toString();
let USUCLVLOG = req.body.USUCLVLOG.toString();
request.input('USUCORREO', globals.sql.VarChar, USUCORREO)
request.input('USUCLVLOG', globals.sql.VarChar, USUCLVLOG)
request.query('select EMPCODIGO, USU... | 1 |
83b27abc7d1d6d7d0f9d9e5b5bca805c | 17ab0f7aa466312b7531d7e5d071876d | go through every star and update their forces | {
foreach (GameObject f in flockers)
{
int index = flockers.IndexOf(f);
Vector3 posCOM = Vector3.zero;
Vector3 vCOM = Vector3.zero;
Vector3 fSeparate = Vector3.zero;
int posNum = 0;
int vNum = 0;
foreach (GameObject neighbor in flockers)
{
if (f == neighbor)
{
continue;
... | 1 |
da7d505ae8c194f3b958a43b5ebc2204 | a0d4e116b8ada26d3ca1c4721f52fc68 | Method to retrieve the value of a single field from the target component by name index. | class FieldsContainer(Collection):
def select_component(self, index):
comp_select = dpf.core.Operator("component_selector_fc")
comp_select.connect(0, self)
comp_select.connect(1, index)
return comp_select.outputs.fields_container.get_data() | 0 |
fb183de51e15c0f715e71bac3e40cf12 | 91de880031d59d1be82b0555c5e736d1 | Returns distance between two locations in feet | def get_distance_metres(aLocation1, aLocation2):
R = 6371000.0
dLat = math.radians(aLocation2.lat - aLocation1.lat)
dLon = math.radians(aLocation2.lon - aLocation1.lon)
lat1 = math.radians(aLocation1.lat)
lat2 = math.radians(aLocation2.lat)
a = math.sin(dLat/2) * math.sin(dLat/2) + math.sin(dLon... | 0 |
3a64851e3ab4015569a7a5c29423c30b | 208d172578c2a97cd3fbb4a389c3fd48 | Returns the number of rows in the matrix | class CVRO_GetSize : public ColumnVectorReadOperator
const unsigned int MatrixWriteOperator::getRows() const {return m_thisMatrix->getRows();} | 1 |
a9646982565976b19f8d5b75ecb079ea | 70f6740297f3057621f982ce80f86e4a | Node configuration (first node). | $types = array(
0 => 'Coordinator',
1 => 'Router',
2 => 'End device'
);
return array(
'cmd' => 'node',
'node' => array(
'addr16' => $this->addr16,
'addr64' => $this->addr64,
'parent16' => 'FFFE',
'role' => 1,
'roleStr' => $types[1],
... | 1 |
ad3816471161db19b8f3807dea5b5401 | b4ac4a3e25e2888b83a1de58c693f814 | 新規SetCommodityCompositionをデータベースに追加します。 | public void dbInsert(CompositionModel model) throws DAOSysException {
dbInsert(model, CompositionDAO.INSERT_STM);
} | 1 |
54740208a5a336dc5042118965795167 | 04fd0cea17e57b596b71189f7406e613 | 从http请求中获得字符串(并使用htmlspecialchars进行防xss处理) | function x($name) {
return htmlspecialchars(Request::shared()->param($name));
} | 1 |
7785c9a35a6776ffc707d0cbf979a224 | 2c262e43b93468a968009dc59731c5e6 | Sets the value of the {@code at} attribute. | @Deprecated
public class ConfigurationFactory
public static class AdditionalConfigurationData
public void setAt(String string)
{
at = string;
} | 1 |
026b93a00547398590f488d5a63774df | 06c6fb9cbc82dfd19fc21d987e5a35f7 | 断言value一定为true,如果不是会抛出相应的异常 | {
if ($value !== TRUE) {
throw new AssertException(self::message($msg, 'TRUE', $value));
}
} | 1 |
32d268c5b6c4976b13d4162f50fb17dd | b34531528819d31e710bca66930dbebf | Dimension object for matrix columns. | nullable: bool = True, is_array: bool = False):
self.name = name
self.type = type
self.nullable = nullable
self.is_array = is_array | 0 |
4d2d4a6fadcc40cdc77b1c55d2aa3696 | 30b0511505e9c1e15092380cf1e76d13 | Returns coarse grid resolution in Z direction | class SCSimulation(object):
def getFineResolution(self):
xmax = float(self._inputs['prob_hi_x'].replace('d','e'))
mlevs = int(self._inputs['max_levs'])
nx = int(self._inputs['n_cellx'])
dxf = xmax/float(nx*2**(mlevs-1))
return dxf | 0 |
40011d3888df3cb7ec20fc7fb9b9c304 | 28ecb73a0be4c4f52ed3f2be14d198cb | #returns the average value of a randomly sampled population. | boot_func <- function(dat) {
sample(dat, length(dat), replace = T)
return(mean(dat))
} | 1 |
74a53ff2caac7b52c6d789e5feafe1b7 | 14056fb938791f5d75976d83061b5684 | Prepare environment for metric generation. | class TestMetrics(TestCase):
def setUp(self):
self.make_bucket()
self.create_mock_metrics() | 1 |
134034cd83e9e9125907814355d0b866 | 6ad4376ea85175a2f29875d796b18f6d | 活动安排--最多个数 | {
int s[] = {1, 3, 0, 5, 8, 5};
int f[] = {2, 4, 6, 7, 9, 9};
int n = sizeof(s)/sizeof(s[0]);
printMaxActivities(s, f, n);
getchar();
return 0;
} | 1 |
7433519309418ac5487b34452584ed73 | 09f24c281a0af9e6b7029b7f95242a09 | Returns True if both decks have the same strength. | _deck_x = sort_cards(deck_x, method=BIG2_RANKS)
_deck_y = sort_cards(deck_y, method=BIG2_RANKS)
if _deck_x == _deck_y:
return True
return False | 1 |
a96e2a7e33abee40d3817b116e25c7df | 2a03d8b743fcdbc9a137171a419a356e | 计算直方图相关性 | srcMat.convertTo(srcMat, CvType.CV_32F);
desMat.convertTo(desMat, CvType.CV_32F);
double target = Imgproc.compareHist(srcMat, desMat, Imgproc.CV_COMP_CORREL);
Log.e(TAG, "相似度 : ==" + target);
Toast.makeText(this, "相似度 : ==" + target, Toast.LENGTH_SHORT).show();
} | 1 |
6a8944e5b9261781d2ae041d51a43436 | d07c0c96e114ce2823b1c3b12aab667a | calculates fibonacci sequence using the binet method | def binetsFib(n):
phi = (1 + 5**0.5)/2.0
return int(round((phi**n-(1-phi)**n)/5**0.5)) | 1 |
cc87dee701554542cb2ba25b593ac231 | f8a90b12a4d5080d2b9ad267da4e29f7 | 鼠标位于imagebox时改变样式 | {
if (this.Enable && e.LeftButton == MouseButtonState.Pressed)
{
this.IsMouseOn = true;
if (this.DisplayBinding != null && this.ImageMouseOn != null)
{
BitmapImage myBitmapImage = this.ImageMouseOn.SpriteBitmapImage;
... | 1 |
5c7872290387bdd2f363a9f443b3bfe7 | 3578ab8beb243f6a3e31321c41c0e985 | Nastaví zda se mají vykreslit pasovací čary pod obrázkem | class OFC_Charts_Pie extends OFC_Charts_Base
public function setAnimate($v = true)
{
$this->animate = $v;
return $this;
} | 0 |
4a575f52d90d517fae515e577c0a45d9 | 4f3829b94d3fa46c32d15b350f894741 | Short program to test usage of GSL functions | {
double xmax;
double xmin;
cout << "\n";
cout << "R8_GAML_TEST:\n";
cout << " R8_GAML returns bounds for the argument of the gamma function.\n";
r8_gaml ( xmin, xmax );
cout << "\n";
cout << " Lower limit XMIN = " << xmin << "\n";
cout << " Upper limit XMAX = " << xmax << "\n";
return;
} | 0 |
9b58d09c221e8b9b5c57d60a7d46f286 | c185d772dbbd5785241668bff5ff1c85 | =>노래와 앨범이 다시 제대로 매치시켜주는 함수 | if (entry.title.$t.toLowerCase() != album.toLowerCase()) { songdebug(2, album, entry.title.$t); return false; }
var author = entry.author;
var f = false;
$.each(author, function (i, m) {
var d = m.name.$t.toLowerCase();
var t = artist.toLowerCase();
i... | 1 |
7caf4e96e1857e2cc9de78bc901e438e | d56a3ba72c7897d7fd2031351b01a591 | Metodo che permette di verificare se un utente è gia presente in una prenotazione | boolean accept(Prenotazione prenotazione); | 0 |
dce54f4c21ba0021ee2477be0a0afcd7 | cd37de0e3ab6924c97db24f4b91392c8 | Calls a write action repeatedly while copying bytes from a source list through a buffer.
If the provided source is a byte array, no intermediate buffer is created. | for (int i = 0; i < source; i++) {
(action ?? emptyIndexAction)(i);
}
} | 0 |
0944305d6bac17a379c4cba264bd05a5 | 65c1cef2879d5e2a650d4ec4d4c4221e | 标准时间转化为HH:mm:ss格式 | public class DateUtil
public static String timeOfDayHHMMSS(Date date) {
return timerOfDayFormater.format(date);
} | 1 |
98975be4ffc6847009b999618c3946f3 | 3f4644f237c3595e72a053c7150662c4 | The list of parameters that are passed to the function. For example,
a concat function may have 7 parameters ('There', ' ', 'are', ' ', 10,
' ', 'bottles.') | class FunctionApplicationASTNode(TermASTNode):
def get_parameters(self):
return self.__parameters | 1 |
a739ca7dda3b4f028641a2a6926b79fb | 6d82dd5113c294c02a17e0c87e4e2d1e | 添加购物车内容进数据库 | public class CartService
public void addCart(Cart cart) {
CartMapper cartMapper = JdbcUtils.getMapper(CartMapper.class);
cartMapper.insert(cart);
JdbcUtils.commitAndClose();
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.