query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b7af87a7107aaf8936cb559024a9dc88 | 5475b665221a5d79d3371a474ac66437 | 构建场景按钮 | {
GameObject go = new GameObject(name);
go.transform.position = pos;
return (UIBtnLoadScene)go.AddComponent(typeof(UIBtnLoadScene));
} | 1 |
d313f725ec34007e08d8e8eab08c5e08 | ec045069f3bd94fa94bbd257b3353322 | Update target velocities for the robot | class TelloDrone():
def update_drone_velocities(self):
self.tello.send_rc_control(self.left_right_velocity,
self.forward_backward_velocity,
self.up_down_velocity,
self.yaw_velocity) | 1 |
7a3e481745486752a9634fa9aebcd6a1 | aede00b13cc96d81b5ef533f7782292f | 立即停止播放相机效果 | public void stopShootPhoto(){
BaseProduct _product = DJISDKManager.getInstance().getProduct();
if (_product != null && _product.isConnected()) {
_product.getCamera()
.stopShootPhoto(new CommonCallbacks.CompletionCallback() {
@Override
... | 0 |
03a22ad97243d2dfdf5d8eae498c29bf | 4c388c2124d3a63687b7364b64e33edc | true if the pacman eats everything on the board, | class Game():
def AllFoodEaten(self):
return not self.food_blocks | 1 |
7b097ee725f0c933d0fc987efcdec9f3 | bb380953449fa2b93aa6713c2e917af6 | =============================================================
Insert Product Attributes
============================================================= | if (url_gard('integer', $tarm_id) === false) {
return abort(404);
}
if ($this->tarm->get_tarms($tarm_id) === false) {
return abort(404);
}
$current_user = $this->usermodel->current_user();
if ($this->permission->user_can('add_product', $current_use... | 1 |
36ec146d2888eeef4271eaf477d718e8 | a553cd507cb3e8a0b74599caa2775c58 | Returns array of only one chronometer from larger result array | function _firstMatch (result) {
return (result && result.length > 0) ? result[1] : null
} | 0 |
cb317f521f5089bbc2b03b54b69d574b | 371e450c8b203148e3b52e89430fc7b2 | Creates the path of Realms key file | public final class InstanceEnvironment
public String getBackupRealmsKeyFilePath() {
init();
return ( mRealmsKeyFilePath );
} | 0 |
598eebfe8d66e29008cd8050dc449888 | 28f4c1b75408db4ccdb851a8857cd0e1 | Pay this invoice, effectively registering the payment into permanent storage (DB, file, etc) and update this
invoice status. | impl Invoices
pub async fn post_pay(
&self,
invoice: &str,
) -> ClientResult<crate::Response<crate::types::Invoice>> {
let url = self.client.url(
&format!(
"/v1/invoices/{}/pay",
crate::progenitor_support::encode_path(invoice),
),
... | 1 |
d394b5cb6cfe588811a16262c0cb5ba5 | 1e643fb2a900b4eb76919b8540dce221 | 检测数组是否进行了排序 | {
if (!is_array($arr)) {
return false;
}
rsort($arr);
return isset($arr[0]) && is_array($arr[0]);
} | 0 |
23eb7375cd1f6a417bc93b2b97702d98 | 21cca2f68107bb2a73172b27547f37ff | Overwrite a stored file. This is essentially a two step process:
(1) Delete the current stored file
(2) Upload the updated file
This will generate a NEW file handle | assert isinstance(file_name, str), file_name
file_id, old_mtime, old_digest = self.find_file(file_name)
file_path = Path(file_name)
file_mtime = file_path.getmtime()
if old_mtime is not None:
if file_mtime == old_mtime and time.time() - file_mtime > 1.0:
... | 1 |
9ef795e50c47366c1b1dd4d53402ef4d | 972fc098763fec1adfb409f68de2fff3 | Lấy danh sách chứng từ chi tiết tiền gửi theo tháng | {
return $this->from('voucher_detail as d')
->leftJoin('voucher as v', 'd.voucherId', '=', 'v.id')
->leftJoin('proof_word as w', 'v.proofWordId', '=', 'w.id')
->leftJoin('subject as s', 'd.subjectId', '=', 's.id')
->whereYear('d.date', date('Y'))
-... | 1 |
524da53f78216aa718a5da096a15a175 | 063fd3d57305b9f25a567d3974474720 | Validates the proper behavior if the ray starts inside the box | x0, y0, h = 0, 0, 1
w = -1
self.assertRaises(ValueError, self.circle1.insideBox, x0, y0, h, w) | 0 |
0e1841075f52a78e24149a4a3a4e8ca5 | 7bddb9d9e20407f7866efdb5385e4b64 | Remove all pools in the system. | public static void ClearAllPools() => ConnectionPool.ClearPoolsAsync(IOBehavior.Synchronous, CancellationToken.None).GetAwaiter().GetResult(); | 1 |
a3342fe2b709d3a2c51c33c68c615cb3 | 7cb42f80e7648fc3b23e93a9a0ff499b | Refresh posts of user and his friends | DatabaseReference rootRef = FirebaseDatabase.getInstance().getReference();
DatabaseReference mRef = rootRef.child("users");
final ValueEventListener eventListener = new ValueEventListener() {
@Override
public void onDataChange(DataSnapshot dataSnapshot) {
... | 0 |
0e9c43df571d25bf0e83797a86a8c0d5 | 60fc7cf585d73dd0c2277efd7d2197ec | Updates a credit note comment | {
Ensure.ArgumentNotNullOrEmptyString(owner, nameof(owner));
Ensure.ArgumentNotNullOrEmptyString(name, nameof(name));
Ensure.ArgumentNotNull(commentUpdate, nameof(commentUpdate));
return _client.Update(owner, name, id, commentUpdate).ToObservable();
} | 1 |
81e75a2cfac34e779ad765af19ff3160 | 1703f252bdc6180396b4c45600ae13ac | Get benchmark info from database. | results = []
benchmarkName = bname
print benchmarkName
if benchmarkName is not None:
try:
benchmarkData = candle[benchmarkName]
results = list(benchmarkData.find({}, {'_id': 0}))
logger.info('number of records fetched: %s' % len(results))
except:
... | 1 |
768f68f1f241e705455567a45c632b51 | 260e0a8d9e144708b2a09a5bf3c31f6e | 讀取本地端完結動漫資料。 | def download_livedoor() -> pd.DataFrame:
FILEURL = 'https://www.rondhuit.com/download/ldcc-20140209.tar.gz'
FILEPATH = './data/ldcc-20140209.tar.gz'
EXTRACTDIR = './data/livedoor/'
urlretrieve(FILEURL, FILEPATH)
mode = "r:gz"
tar = tarfile.open(FILEPATH, mode)
tar.extractall(EXTRACTDIR)
... | 0 |
52f80144b764c92a862b21023e73539c | 1219fdfe1ed015c2d0eeb796f61b0fb9 | Sets the drive level for the left motor, from +1 (max) to -1 (min). | public class DriveSubsystem extends Subsystem
public void setL(double speed){
powerThread.setLeft(speed);
} | 1 |
d416cc45112b6adb0e06afe1c0b2c4fc | a42681584aad39c1576dcc82ddfadde9 | [LeetCode] 695. Max Area of Island_Medium tag: DFS/BFS | func maxAreaOfIsland(grid [][]int) int {
var r int
h := len(grid)
for i := 0; i < h; i++ {
w := len(grid[i])
for j := 0; j < w; j++ {
res := 0
help(grid, h, w, i, j, &res)
if res > r {
r = res
}
}
}
return r
} | 1 |
1b7283f9782dbe3c7e2e0c6b0da1d661 | b424f16371b22ad0f2c9eed511aeba24 | 送客先テナントIDを指定して、その送客元のテナント一覧を取得する
渡されたテナントIDのテナントは除く | log_message('DEBUG', __METHOD__.' start');
$info = '-->'.__METHOD__.'-->';
$info .= 'テナントID:'.$p_tenant_id;
$info .= '許可テナントタイプコード:'.$p_permit_cd;
$this->db->where('tenant_id =', $p_tenant_id);
if($p_permit_cd != '') {
$this->db->where('permit_tenant_type_cd =... | 0 |
34dbf68651625b3dccc1ecbb73476b55 | 07b290c9c1eef35a5c7221609d056246 | Parses XML files and generates code. | self._xml_roots = [self._get_xml_root(path) for path in file_paths]
self._src_gen = srcgen.SourceGenerator(self._types_map, self._templates)
self._parse_robins()
return self._src_gen.get_source() | 1 |
dd45baa5b419546e2d758d15236b263d | 7a5ae066d5c5ade9fc3b1a28baee1477 | Checks whether the Stunt Die checkbox is checked | function checkStressedFirst() {
var sFirst = document.getElementById("stressFirst");
return sFirst.checked;
} | 0 |
4fab64fdfb71074dee340ac7fd99b712 | 81993f4cf665d91fb5eff97aac8871ad | Distance to destination in m. | public class TelemetryMsg extends AbstractMessage
public double getDistance() {
return myDistance;
} | 1 |
3bdd9a2e213278d0a5dcec62a216e4fe | f0c7fa8b6af028a75ba997e03ca4c339 | Virtual to physical address translation.
Given the virtual address for a character buffer, this function returns
the physical (DMA) equivalent. | printk("Virt: %p, as size: %x, virt actual size: %x\n", virt, as->size, 262144);
if (virt < 0x1000) {
return ENOENT;
}
if (virt >= as->size) {
return ENOENT;
}
*phys = as->phys + virt;
return EOK;
} | 1 |
6e3fc332dc85bb11613ed6819373cc01 | 7ed463cdc861ae2d4fa589744f51a42a | Gets the tues start time2. | public class AddLocationForm implements AdminApptConstants{
public String getTuesStartTime(){
if(!tuesOpen) return null;
return AdminUtils.formatHHMMAMPM_to_HHMMSS(tuesStartTimeHr,tuesStartTimeMin,tuesStartTimeAmPm);
} | 1 |
a57f7c8227d1f7c0a07998f528c451d1 | 27b07035bc82a13e5ac83bf551338e3e | <Summary>Returns the issue identified by the given ref</Summary> | def query_issue(issue_ref, slow_data=False):
return cvdb._query_issue(issue_ref, slow_data) | 1 |
8773837143107d2344a8365665174e29 | 711592a212978200ab2239b4c097f272 | 显示已经认证的公司列表 | class AppCompanyController extends BaseController
public function comList() {
if ($this->client_type == 1 || $this->client_type == 2) {
$where[] = ' status=1';
$param = [];
$data = [];
$post = I('post.');
$minId = (int)($post['minId']);
$nu... | 1 |
4994eef6642843b9f5487dc8eb55f246 | 8df7f6867d1e4ccaea3578c1943dade5 | no passing arguments and returning no value | func WithParasButNoReturn(intPara1, intPara2 int, strPara string) {
fmt.Println("My parameters are: ", intPara1, intPara2, strPara)
} | 0 |
99232c0dfc25da2b4fdb51f3606ff293 | 0481804686d0a73fac8242cc564be22c | 根据类型和内容进行搜索 | public class linqSearchengine
public IQueryable<accordion_new> getContentBySearch(string _type)
{
news_accordionDataContext objse = new news_accordionDataContext();
var allresults = objse.accordion_news.Where(x => x.an_title.Contains(_type) || x.an_content.Contains(_type)).Select(x => ... | 1 |
ea4dd1ae7b9974b0239bc19bf555dec7 | f360a94a3ea389d9aeaf398fa6d81542 | update sample array for display | static void update_sample_display (VideoState* is, short *samples, int samples_size) {
int size = samples_size / sizeof(short);
while (size > 0) {
int len = SAMPLE_ARRAY_SIZE - is->sample_array_index;
if (len > size)
len = size;
memcpy (is->sample_array + is->sample_array_index, samples, len * siz... | 1 |
64f6117a527fd03cb91626e3d0bb3ae5 | fd680ada7156327c7366a4aaa4ee33ee | Starts the relay functionality.
Registered listeners will be informed with 100 Hz. | namespace TestClient.Instruments
void StartRx(); | 0 |
74526189dbf4bd8ca2704ef6c3e56b96 | 074b1635174f76149dc712c813a994a9 | Prints out the Induction Certificate for a completed induction: | {
try {
const WageInd* wageInd = (const WageInd*)piaCal.wageInd;
if (wageInd != (const WageInd*)0 && wageInd->getApplicable() > 0) {
const AverageWage& earnings = workerData.getTotalize() ?
piaData.earnTotalizedLimited : piaData.earnOasdiLimited;
pageTitle[0] = wageInd->getTitle();
o... | 0 |
de375ab348176dd4f05b508a00bbaf88 | e8c5ee88749f2e0515ce3b567a11f523 | Read the magic string to get the version of the file format. | {
CircularBuffer buffer = new CircularBuffer(reader.ReadBytes(3));
if (buffer.Capacity != 3)
return 0;
while (reader.BaseStream.Position < reader.BaseStream.Length)
{
if (buffer.Peek() == 0x49)
{
if (CheckHeader... | 1 |
72672abb0aa5b22ddb9e853b51ad5357 | 74037d2a9e1dc5c8dd44dad1d44bc8d7 | Retrieve all [Article]s for the specified section, then push results to [ArticleStore]. | public class KayakoClient
private List<Integer> getArticlesIdsBySection(Integer sectionId) throws ClientProtocolException, IOException {
String url = (ARTICLEID + sectionId);
HttpGet httpGet = new HttpGet(url);
httpGet.addHeader("Content-Type", "application/json");
return processIdListResponse(httpclient.execut... | 0 |
fa2d0a1ef32b69b3ef00263c286969b5 | d3388a16fa49f778866e0ebc913279a5 | CHANGED
gets in seconds the amount of time remaining of the current player's turn | class gameController():
def getSecondsRemaining(self):
return self.secondsRemaining | 1 |
8b61298e4e2bab352ce17977cee26570 | b3071e071790515cbcab8724cd157509 | Возвращает ModuleName, Action и массив параметров, необходимых для конструирования
родительского модуля. ModuleName обязателен, остальное зависит от конкретного модуля:
Action может быть null, Params может быть пустым массивом. | {
return [
'controller' => $this->getControllerClassName($params['controller']),
'action' => $this->getActionFunctionName($params['action'])
];
} | 0 |
141ae2e6dee8122fb1161f92b4020206 | 90633cba0e22d4abc705fd9a9a430522 | Print dashes for a full line. | def print_line(length):
print(length * '-') | 1 |
a3e6c6675c808a4691a74f8e92ce71bc | 2222f96b6e15f7097bfec144b6cd9d7b | Extract controls from cache_control string into a case-insensitive dict. | def get_default_cache_control_decorator():
cache_control_kwargs = get_default_cache_control_kwargs()
return cache_control(**cache_control_kwargs) | 0 |
acc1c89828fea46b646ffd06bb3d660c | f0a32afa71efaa2de8930a7ead88f61b | Removes the notification and stops tracking the music session | public final class OnsetDetPanel extends DetPanel
public void removeSong() {
simplePlayerPanel.setVisible(false);
mediaControlActive = false;
} | 1 |
08ddacd164641d0c983344b77d2a551c | 741888d0e8b70ec631ce9d6b2cea0739 | Creates a leg node element and populates the attributes for a LegBoard or LegAlight | leg_decorator = acm.FBusinessLogicDecorator.WrapObject(leg)
element = self._generate_element('LEG')
element.append(self._generate_element('PAYER', DocumentGeneral.get_leg_payer_name(trade, leg)))
element.append(self._generate_element('CURRENCY', leg.Currency().Name()))
nominal = ... | 1 |
1e3518c5a9bc4c5f893900066881e9a9 | 47b1bc9da9567f3a08ef70ff0361dbd2 | 在回收站t_recycled表中增加删除的文件记录 | {
try
{
string fName = GetFullName(fileName);
return ToDelete(fName, toRecycle, showDialog, showProgress, ref errorMsg);
}
catch (Exception ex)
{
errorMsg = ex.Message;
return -200;
... | 0 |
5815a4fda85b6e8d8817e9e4b75ba535 | a9f307e65f00dd706f3b4e9dbe5623f0 | Middleware for logging hits to the web server. | class UrlVerification(Middleware): # type: ignore
def __init__(self):
self.logger = get_bolt_logger(UrlVerification) | 0 |
2b2ab7d1c1f599f103ddf9fc32527b9e | 34d887574ac9f7cab748b19425aa5c5e | Retorna el listado de dimensiones territoriales precargadas de acuerdo al tipo | class SubdivisionRepository implements SubdivisionRepositoryInterface
public function getList($subdivisionType, $nameType, $locale = null)
{
$definitions = $this->loadDefinitions($subdivisionType);
if (empty($definitions)) {
return [];
}
$list = [];
foreach ($defi... | 1 |
283896293a943bd8c0239d757dc113aa | b8c725e9f9bb610a1e89578d4146859b | Given a MVector it returns a python list with the corresponding values. | def get_mvector_as_list(input_mvector):
out_list = [input_mvector.x, input_mvector.y, input_mvector.z]
return out_list | 1 |
ae2cf5bc29bba438859fa9d943297a28 | 45edbed1d713cf2e89258579194cf8af | Catch up with output queue by producing ready results | while 1:
try:
connId, out = resultQ.get_nowait()
for server in activeServers:
if connId in server.conns:
conn = server.conns[connId][1]
try:
conn.send(prepareDataForSending(out))
excep... | 1 |
3d90fda8ad1735dba0dbf2995cfba77f | 74ee4fb6e3d4f73e3ab0fcef0a9afce9 | Collapse an entire subtree into a clade object. | final Phylogeny t = tp.getPhylogeny();
if ( ( t != null ) && !t.isEmpty() ) {
for( final PhylogenyNodeIterator iter = t.iteratorPreorder(); iter.hasNext(); ) {
final PhylogenyNode node = iter.next();
node.setCollapse( false );
}
tp.rese... | 0 |
f17c7df3fdb219d6dd4172fda7ee68a6 | 8527910ba65d1a79a40cb0739c844c40 | initializes an instance of PermissionManager. | String[] readFileArrayForManager = { "BS13.enc", "FCR.enc", "SVS.enc", "TA.enc" };
List<String> readFiles = Arrays.asList(readFileArrayForManager);
permissions.add(new Permission("manager", "universal", readFiles, new ArrayList<String>()));
String[] readFileArrayForRookie = { "BS13.enc", "SVS.enc" };
String[]... | 0 |
9b87230e7a3b6087fb7c313d35a5e814 | 5f7a0e952faf2c70154333ec5ac28a1b | METODO RESET LIMPIAR DATOS DE TODOS LOS CAMPOS DEL FORMULARIO CURSOS | {
formApp.children[1].value ="";
formApp.children[2].value ="";
formApp.children[3].value ="";
formApp.children[4].value ="";
formApp.children[6].value="";
formApp.children[7].value="";
formApp.children[8].value="";
formApp.children[9].value="";
formApp.children[11].value="";
for... | 1 |
b6a1a00e354e94f3cb010147453dc177 | 27213935e71e6fd47cee5790d1a6be67 | 将ASCII转16进制 | namespace WebServiceManager
public class BaseApiHandler
public static string Str2AsciisFor16(string character)
{
StringBuilder resStr = new StringBuilder();
byte[] str16 = System.Text.ASCIIEncoding.Default.GetBytes(character);
foreach (byte str in str16)
{
... | 1 |
b83bce2a215d1c2711e3a4f79e4e0460 | 62d729cb5fb010f054c46227a4269708 | 获取操作功能面板信息 | export class GroupListDetailsComponent implements OnInit, OnDestroy
public getOperation(): void {
this.operationList = [
{
'name': '开',
'getDataUrl': null,
'submitUrl': null,
'id': 'TURN_ON',
'code': LightTableEnum.TURN_ON,
'method': null,
'type': 'butto... | 1 |
105abb634915eb7abf9ba9be908cc964 | 5fff947673660cfd8fce3baa8d946856 | Statusの追加(実行) | {
$now = new DateTime();
$sql = "INSERT INTO status(user_id, body, created_at)
VALUES (:user_id, :body, :created_at);";
$stmt = $this->execute($sql, array(
':user_id' => $user_id,
':body' => $body,
':created_at' => $now->format('Y-... | 1 |
ad284b3b144822746944b940619bdfa8 | e3fbe1451413a87987a5741e464da82a | 显示在首页,必需IsPublic的。根据页码,每页显示的条数返回请求页的未读链接 | public final class ThreadAction extends BaseAction
public ActionForward listUnread(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
throws Exception {
Date currentTime = new Date();
String forumsId = request.getParameter("forumsId");
String pageIndexName = ne... | 1 |
247b274d244fb6fc933389ff3d6678a0 | 58727bee2a2fc5f3d84a2f8cec9eb756 | https://edabit.com/challenge/Nz7ZmEeMFZ6GznPex | function bouncingBall(h, bounce, window) {
var rebounds = -1;
if (bounce > 0 && bounce < 1) while (h > window) rebounds+=2, h *= bounce;
return rebounds;
} | 1 |
7d9dafc3f84f7613876d5f976034c614 | dc612c7898138b89275774ff13c1da07 | 根据桌所在的区域返回page对象 | public class AreaInfoAction extends BaseAction{
public String officePage(){
request.setAttribute("theID", request.getParameter("theID"));
request.setAttribute("flag", request.getParameter("flag"));
return "officePage";
} | 0 |
b91117086954b16ce19d0646e82f2d90 | 39f8db78265b34299d9adfbc14025084 | Método que obtiene los estados de los artículos de forma asíncrona | {
try
{
List<ArticuloEstadoEntity> listEstado = new List<ArticuloEstadoEntity>();
using (SqlConnection conexion = ConexionDA.ObtenerConexion())
{
using (SqlCommand comando = new SqlCommand("BuscarArticuloEstado", conexio... | 0 |
8d164a0e076fb0374da07070d8635f65 | a24507ccb791b388e4b82578c468191f | Get video directory path from encode type | {
string dirTempPath = string.Empty;
switch (fileType)
{
case 1:
dirTempPath = OptionsUtil.VirtualImageDir;
break;
case 2:
dirTempPath = OptionsUtil.VirtualVideoDir;
... | 1 |
e7972d0c5502ba243762a94016f450ee | e79065632f7dc42fd50485b0fccfc838 | Test operations involving freezing and relaxing freezes down
to the timestamp level. | class SessionTests(RiveScriptTestCase):
def test_freeze_thaw(self):
self.new("""
+ my name is *
- <set name=<formal>>Nice to meet you, <get name>.
+ who am i
- Aren't you <get name>?
""")
self.reply("My name is Aiden", "Nice to meet you, Aiden.")
... | 0 |
315bd29ec97a07182eb30b3a99db0238 | 1a7b633f4232242e1a39987ff453abdd | 5. 死代码 (也叫僵尸代码,这里是未使用的变量). | fn test_unused_variables() {
let _unused_num: i16 = 4;
} | 1 |
62efe49ed0a8453edf021742c1a4d1c7 | a243c64990deff5193fa6faa00a56c92 | Tests that the expected extensions exist. | proc = subprocess.run(
["/opt/tljh/user/bin/jupyter-server", "extension", "list", "--sys-prefix"],
stderr=subprocess.PIPE,
)
extensions = [
"jupyterlab",
"nbgitpuller",
"jupyter_resource_usage",
]
for e in extensions:
assert e in proc.stderr.decode() | 1 |
0474c34647b81ae599b7bbd3f656335f | 0ab01dfdea647175ccb7451dc9d215a5 | Elimina todas las vistas o paneles añadidos | for (Node node : pane_container.getChildren()) {
try {
if (node.getId().contains("pane_")) {
pane_container.getChildren().remove(node);
return;
}
} catch (Exception e) {
}
}
} | 0 |
3974c372ae9ce41b7a25ae1e8ce7893d | 81bb23897e92d5144266fd61c25767a0 | Checks the output of ttmsolve using an example from Jaynes-Cumming model,
which can also be found in the qutip-notebooks repository. | r = 0.5
theta = 0.7
cutoff = 5
expected = np.array(
[
[0.94171062 + 0.0j, 0.0 + 0.0j, 0.23535661 - 0.19823814j, 0.0 + 0.0j, 0.02093159 - 0.12135894j,],
[0.0 + 0.0j, 0.83512676 + 0.0j, 0.0 + 0.0j, 0.36151137 - 0.30449682j, 0.0 + 0.0j],
[-0.23535661 - 0.19823814... | 0 |
b373a7142e399649b3046e33b99e9713 | 370f0506be87fa14d4bd7c40e1c907cf | Returns the value of the '<em><b>Derived Contribution</b></em>' reference.
It is bidirectional and its opposite is '{@link Contribution#getSourceContribution <em>Source Contribution</em>}'.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Derived Contribution</em>' reference list isn't clear,
there really should ... | namespace OclLibrary.iface.constraints
common.CoreAssociationEnd getDerivedAssocEnd(); | 0 |
9c1c877aea69b4397a066583eb41b81c | 9c79806ec28c3ead593f9c17f45cc917 | ! Output the contents of the goal table via debug logging. | System.out.println("Goal Url: " + destinationDetails.getUrl());
System.out.println("Case Sensitive: " + destinationDetails.getCaseSensitive());
System.out.println("Match Type: " + destinationDetails.getMatchType());
System.out.println("First Step Required: " + destinationDetails.getFirstStepRequired());... | 1 |
19f9f577a67f1cba6c0d1c77ca9c24d5 | c8667b95343e0b85830902b06abbe066 | get a list of photos from server with latest order. | class DisplayImage():
def photo_list(self):
self.orderOfPhotos = []
self.dir = "%s%s" % (self.path, self.photosPath)
self.dirlist = SF.sortFilesDateMod(self.dir)
self.listLength = len(self.dirlist)
self.check_for_recent_images()
self.create_photo_list() | 1 |
e91959f0ca246d94a1988b31006789c6 | ab2f2907c1475776674caca3d5519d05 | Get max_response value.
Notes:
Defines maximum results returned by the REST call (allowed max=5000).
This attribute is named `maxResponse` in VSD API. | try :
self._responsesize = responsesize
except Exception as e:
raise e | 0 |
c9c2fb86f5daf42773b81fdea285f7a1 | e6db66ede93e980c38af2d961ba87408 | Read a scan script from the specified text file.
Each entry in the file defines one scan to be emitted.
Entries are separated by semicolons ';'.
An entry contains one to four component indexes,
optionally followed by a colon ':' and four progressive-JPEG parameters.
The component indexes denote which component(s) are t... | filecp = codecs.open(fname, encoding='iso8859_15')
d = np.loadtxt(filecp, delimiter=';', skiprows=1)
Y = np.unique(d[:,0])
X = np.unique(d[:,1])
C = d[:,4].reshape( len(Y), len(X) )
return utlib.Cscan(C, X, Y) | 0 |
7bf6ab0c576863afb34e6f7d349f9f93 | c079474630b97a432b5699edec9128bc | 根据属性值返回属性名称 | public class PropertiesUtil
public String getKey(String value) {
String val = "";
Set<Object> keys = properties.keySet();
for (Object key : keys) {
val = getValue(key.toString());
if (val.equals(value)) {
val = key.toString();
break;
}
}
return val;
} | 1 |
d5a9900d9fe470d35a966ef56822afc9 | 197bf96eb155d5214503330230f56bad | Get a lookup cache for owned items. | {
if (!$this->cache) {
$this->cache = $this->getContainer()->get('oro_security.ownership_tree_provider.cache');
}
return $this->cache;
} | 1 |
e5b8667084676c09778acdfb974ab5b3 | 404ee6ae2c067be0cdb73a5a39cbc6aa | 获取同辈对象列表 | {
try
{
return BaseRepository("dm_data").FindList<dm_userEntity>("select * from dm_user where FIND_IN_SET(id,getChildList(" + user_id + ",2)) and id<>" + user_id + ";");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
... | 1 |
2626e71fa48e605a897dbc63ab769f9b | 356830ae15990fd9d62fc67a58152e63 | 歩行者種別取得 | namespace STBBusSystem.Server
public class Vehicle_User
public static string GetUserType()
{
using (var db = new VehicleEntities())
{
var rst = from hdr in db.T_UserMaster
select new
{
v... | 0 |
98e065519985472ef27ad70f5bd03b23 | e33e7428fa2a5433a620e38f1aa1674f | tim co ban theo ma hoc vien | namespace DAL
public class DAL_TV:BDConnect
public DataTable Get_NVH(string MATV)
{
try
{
string sqlstr = "";
sqlstr += "select NgayVaoHo from THANHVIEN where MATV='";
sqlstr += MATV;
sqlstr += "'";
SqlDa... | 0 |
b4fc61f7f6a48ca46af5dbe32aa30d3a | e2bfe9724b06b95d2c62ea9534070809 | Controlla l'aggiunta della sinergia al danno | namespace SagaMap.Skill
public partial class SkillHandler
public int CheckBuffForDamage(Actor dActor, int damage)
{
int d = damage;
if (dActor.Status.Additions.ContainsKey("Invincible"))
damage = 0;
return damage;
} | 0 |
7f03ddf3a193645a77566d6d888c17b8 | 90304e0d17cf8d74e2b41b9abc2fad07 | 判断是否是二进制字节数组 | def is_binary(value):
return isinstance(value, bytearray) | 1 |
626d23d73fd388975d31ce0ef04b7a90 | 43cbe4cbcae8d8696490668d63878210 | Format a date + time as an ISO string | class Core(xmlwriter.XMLwriter):
def _datetime_to_iso8601_date(self, date):
if not date:
date = datetime.now(timezone.utc)
return date.strftime("%Y-%m-%dT%H:%M:%SZ") | 1 |
08b3fc58df4182519f68138d01776457 | 57f05a75907221c345e393bf04ef1efb | Gets the commit options from a user response. | oc.print_title(self._initial_message)
sys.stdout.flush()
try:
user_choice = str(input())
if not self.empty_allowed and len(user_choice) == 0:
self.error('Commit message can\'t be empty!')
return user_choice
except:
self.error('Invalid choice!') | 1 |
d58524c2f77f8d69a5ca114fd15b3b98 | fc121ee63b1e1acbf65f1a3f36c3871e | Test scanning sep=<spaces>. | {
TEST_EQUAL(
std::string(" abc"),
jade::scanner(" abc").read_token("*"));
jade::scanner scanner (" abc");
scanner.skip_whitespace();
TEST_EQUAL(
std::string("abc"),
scanner.read_token("*"));
scanner.skip_whitespace();
} | 1 |
fe8154d793d831dd07328f2c1040ea81 | 35701be9575f3a083a0afffe1f1256af | Der Dateiname wird zurückgegeben. | public class SleepFile{
public String getFilename()
{
return this.filename;
} | 1 |
3758fce10e1308bedd5855fa7daa57a5 | 17e6a48e7a5515edd922ed4d147757d6 | 15.2.9.3.4 Float#- | class Float
def prev_float()
end | 0 |
bd9770f3ede3ffdd930db011244aa876 | fbd4728894849749d0b03ad8f67b5d21 | Устанавливает слушатель на удаление карточки из адаптера. | public class RestaurantViewHolder extends RecyclerView.ViewHolder
public RestaurantViewHolder setOnDeleteRestaurantListener(View.OnClickListener listener) {
this.deleteRestaurantBtn.setOnClickListener(listener);
return this;
} | 1 |
fc5d33aa98c4e7fe233d1675e6b265f7 | 9803c868308ae3e191f06788ce140f4b | Draw the potential energy surface corresponding to the loaded MEASURE
calculation. | assert(self.nma.shape!= (1,))
fig = plt.figure()
ax1 = fig.add_subplot(1, 2, 1)
energyPlot = ax1.contourf(self.nma, self.fma, self.E_total, levels=100)
contour = ax1.contour(self.nma, self.fma, self.E_total, np.arange(1, 30, 1), colors='w', linewidth=0)
ax1.set_xlabel(r'$... | 1 |
344f6f541ba6b581a244b42f97dd1a43 | 1681ddc13119f049d93d4b3530c4d7a0 | sorts the ships in the allShips buffer by how far away they are from the player -JNE | int compare(const void* element1, const void * element2){
int startTime1 = ((ship*)element1)->startTime;
int startTime2 = ((ship*)element2)->startTime;
return (startTime1>startTime2);
} | 0 |
01c6cf5ea3b14040d94f53fcc26e77f1 | c8c9e622e9045dbfd790c15989b0745a | Get the next payroll period to process | namespace BudgetExecution
[ SuppressMessage( "ReSharper", "MemberCanBePrivate.Global" ) ]
[ SuppressMessage( "ReSharper", "ClassNeverInstantiated.Global" ) ]
[ SuppressMessage( "ReSharper", "MemberCanBeInternal" ) ]
public class PayrollFactory : PayrollHours
public override IElement GetPayPeriod()
... | 0 |
a4c851770d4a045475f17272e37781fb | 6174abbf2d325165cb53ff62dc1fa92d | 숙소 한 개의 사진 여러 개를 가져오는 메서드입니다. | public List<RoomsImgVo> room_images(HashMap<String, Object> map) {
return sqlSessionTemplate.selectList(NAMESPACE+".room_images", map);
} | 1 |
f86fa10c5222d7ea4e434d434bdafaa3 | 72d47cc0d762bdea7db755da79066094 | handleMakeTable creates all tables necessary in db | void generateTable() {
std::string command;
int execStatus;
char * errorMsg = 0;
command = "DROP TABLE IF EXISTS FoodDescriptions;\
CREATE TABLE FoodDescriptions(\
NDB_No CHAR (5) NOT NULL,\
FdGrp_Cd CHAR (4) NOT NULL,\
Long_Desc VARCHAR (25) NOT NULL,\
Shrt_Desc VARCHAR (25) NOT NU... | 1 |
a761cda9529490205c8b0f4a1372b274 | 6ca2bcca485ee060efed40150944a2bf | ================================================================================
Initialisation
================================================================================ | {
global $_lib; $this->_lib = $_lib;
global $userdata; $this->userdata = $userdata;
global $currentlang; $this->currentlang = $currentlang;
global $page; $this->page = $page;
global $option; $this->option = $option;
global $userdata; $this->userdata = $userdata;
$this->Template = new apiTemplate... | 1 |
bdd3b3c7a41e7b123597c98f2b7c222d | 1cde014a6f4172eb1ae2e77464f5858d | 是否刷新BOSS | public class UIActMonsterComeController : RUIMonoBehaviour
public void RefreshBoss(SockLoginBossData data ){
if (data.buyTimes < 1) {
btnAddPowerDia.isEnabled = false;
btnAddPowerCoin.isEnabled = false;
} else {
btnAddPowerDia.isEnabled = true;
btnAddPower... | 1 |
05aa734313dd31313f495c82e64a13af | ade681a63fcff365b435139a9c8d43c0 | POST /spend_categories | class ExpenseCategoriesController
def create
@expense_category = ExpenseCategory.new(expense_category_params)
respond_to do |format|
if @expense_category.save
format.json { render json: {result: 'success', data: @expense_category} }
format.html { redirect_to expense_categories_path, notice... | 1 |
fabc5648ed0c2c5a9693565e5ba3f4fc | 461ba60cfcb07f5d5f07d180a1dbe2c4 | Confirms a given user registration request and creates the user | void confirmUserRegistration(String email, String password); | 1 |
a98d131c4386e14a9309615fc917e65a | 7711fd7f502cf3d840efbeffdeed79bf | change the order of the operators to match hierarchy | def adjust_input(ingredients, commands)
commands.each_pair do |command_name, options|
if ingredients[:operator] == options[0]
ingredients[:operator] = options[1]
end
end
components = []
components[0] = ingredients[:operator]
components[1] = ingredients[:first_num].to_f
components[2] = ingredie... | 0 |
fd09af487aeac10abc586b20869bf998 | 9b2e0de0b7c00c23384668d360a046a7 | 递归实现累加. | namespace BaseCSharp.PartyClass
class NewCSharp
private static int SumAdd(int n) => n == 0 ? 0 : n + SumAdd(n - 1); | 1 |
26577123ea0e741de0d1f74b4c739241 | ff304952f825cd4e4d0437cda724d17f | Положить объект в redis по указнному ключу на заданное время, если объект в redis уже существовал, он перезапишется | class RedisStore implements PersistingStoreInterface
public function save(Key $key)
{
$script = '
if redis.call("GET", KEYS[1]) == ARGV[1] then
return redis.call("PEXPIRE", KEYS[1], ARGV[2])
elseif redis.call("SET", KEYS[1], ARGV[1], "NX", "PX", ARGV[2]) then
... | 0 |
0311aada6496adf38033c9be0663c027 | 610143a5e852f53b7412d749bfba5266 | Counts the number of KitComponent objects for the current store. | public static KitComponentCollection LoadForStore(int maximumRows, int startRowIndex)
{
return LoadForStore(maximumRows, startRowIndex, string.Empty);
} | 0 |
a69c0dfc9ca34dc38a1368d64d32e833 | 7d214279bf2b30064c5351a6567935da | Returns all known cipher suites. | public class DefaultSSLSocketFactory extends SSLSocketFactory
@Override
public String[] getSupportedCipherSuites()
{
return sslContext.getSocketFactory().getSupportedCipherSuites();
} | 1 |
1e2bc237c8980e508bbc73dba8e92dbb | d3cec39ddd72bfb5562cc16cddfe1ee6 | 米迪广告 | class IndexController extends WapBaseController
public function mendian()
{
return view('wap/index/mendian', [
]);
} | 0 |
98457cec75bdff7675a0c9870c17b205 | 233da521698b3f62c2a46f2fc961a34f | Misura il tempo e lo stampa | class plxShow
public function chrono() {
echo round(plxDate::microtime()-$this->plxMotor->start,3).'s';
} | 1 |
4cf1f0c4a3e3a23a277212ef497a2b75 | b27fffc58c58268c32791cde748775c6 | Find by package id. | def get_package(package_id):
return db.session.query(Package).filter(Package.id == package_id) | 1 |
cd4c33b5631190f313fed2cd52df6fe0 | 55ee166170bbdba5d753d07de17d2d7b | Метод быстрой сортировки | namespace Task_12
class Program
static void SortSimple(int[] arr)
{
Stopwatch time = Stopwatch.StartNew();
int countChange = 0;
int countСompare = 0;
int length = arr.Length;
for (int i = 0; i < length - 1; i++)
{
... | 0 |
e92eae552e407443fbf7d1414e7ebe69 | c67c77af500e2e82f17c26fe5ca73437 | Smooths scrolling and fixes some refreshing issue. | public class WheelView extends View
void smoothScroll(ACTION action) {
cancelFuture();
if (action == ACTION.FLING || action == ACTION.DAGGLE) {
mOffset = (int) ((totalScrollY % itemHeight + itemHeight) % itemHeight);
if ((float) mOffset > itemHeight / 2.0f) {
... | 1 |
5169a1623e35d87f8c05d6d239c90b81 | e33eda8ae404047c1f3fdd93ade7ace1 | Display the specified Kecamatan. | class kabupatenCtrl extends Controller
public function show($id)
{
} | 0 |
109a83819a726c039f81ef4bbac4ee7c | 59bdfadc9153d358af98b9cf770a00f3 | Main function of the class that allows generating and saving the tfrecords
for labeled train, unlabeled train, validation and test datasets.
类的主要函数,允许产生和保存标记训练,无标记训练,验证,测试集的tf格式数据 | def run_training():
subdir = datetime.strftime(datetime.now(), '%Y%m%d-%H%M%S')
models_dir = os.path.join("saved_models", subdir, "models")
if not os.path.isdir(models_dir):
os.makedirs(models_dir)
logs_dir = os.path.join("saved_models", subdir, "logs")
if not os.path.isdir(logs_dir):
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.