query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
7388e4e796cf8ddc380d18946702fc52 | cb950da0e5548ff3867848490fd543fb | Gets the piped PrinterWriter which can be used to send output to the stream. | public class OutputStreamWithCSVWriter extends OutputStream
public CSVPrinter getCsvPrinter() {
return csvPrinter;
} | 0 |
c6072756d075a957775be43801922a1e | 92442a47eca1d08ac27a03c5b91e851a | Is file_get_contents() beschikbaar om van url te downloaden | {
if (@file_get_contents($url, 0, NULL, 0, 1)) {
return true;
} else {
return false;
}
} | 1 |
82fcfe49af2eaa96f3f5df83633fda77 | 91ea5a7fffe48782ee02e75945cbb32d | Empfehlungen in % | $percentage = 0;
if ($this->choice4_amount() > 0){
$percentage = round($this->choice4_amount() / $this->votes_amount() * 100);
}
return $percentage;
} | 1 |
0d5a82a2792a2122899cfff1c3af322b | b4c7d40af7b421f20516af677b02f764 | Detect the current ultimate status | namespace Mirror
[System.Serializable]
public abstract class Character : NetworkBehaviour
public abstract void Ultimate(); | 0 |
28eb208473dff5208c704d7c259687fb | e8207fc8a15c153211da0df9c75a67bd | 定义拷贝结构函数,使用深度拷贝的方法。 | if (that == NULL) return;
insert(that->data);
deepCpy(that->left);
deepCpy(that->rght);
return;
} | 1 |
0c2db4730b4ffe47db59d35475d86d4e | 41119a04db236dcb99c495655874c4c7 | 给老师和学生赋值的函数 | {
QString number(s->get_id());
QString name(s->get_name());
QString major(s->get_school_string());
int sex=s->get_sex();
QString class_num=QString::number(s->get_class_num());
ui->number->setText(number);
ui->name->setText(name);
ui->sex->setCurrentIndex(sex);
ui->class_2->setText(cl... | 0 |
73c287434dc790d81bf94fe0cbcbdcb6 | d353f528550ab64c10b6f85f47f28843 | Set the item's image to a opened folder. | image = QPixmap(":/Icons/Library/icons/library/1xpdf.png")
if self.devicePixelRatio() == 2:
image = QPixmap(":/Icons/Library/icons/library/2xpdf.png")
image.setDevicePixelRatio(self.devicePixelRatio())
self.contains_file = True
self.setText("")
self.setFix... | 0 |
5e2d116073517d488322d926f0897ee1 | 986890d9ae74706e2cba221a2fc1a454 | Renders the content to an html td-tag. | {
$options = [
'class' => 'cell-data',
];
return Html::tag('div', parent::renderDataCellContent($model, $key, $index), $options);
} | 0 |
d327543304418fe18ec6ac2288f85045 | 32b5837981aa134a434ad99e499afe01 | !
This function is used to stop the 16-bit Timer0. | void timer0_stop() {
TCCR0B = 0;
} | 1 |
81cbe66f6a8355c0fcf6361fc48c26c4 | 36dc6ba8d336b76f9a1021b5c7010b4d | a service for interacting with the users table. | function Users (db) {
this.db = db;
} | 1 |
c8e92fd99054f92f951c5ffd05111189 | 14055fc23b9870a55f31bf1eea23a3c7 | ## Simulate species data | mean.phi.juv = runif(1, 0.5, 0.9),
mean.p.ad = runif(2, 0.2, 1),
mean.p.juv = runif(2, 0, 1),
Ntot.breed= c(runif(1, 4950, 5050),rep(NA,n.years-1)),
JUV= c(rnorm(1, 246, 0.1),rep(NA,n.years-1)),
... | 1 |
9b1621ccab5812478c28a76ee15f2e85 | c9abe4353aacaadd6b919a23f3f04090 | Adiciona um produto a lista de compras sem informarmos a quantidade. A quantidade padrao e 1. | public class Facade
public void adicionaCompraALista(String descritorLista, int qnt, int id) {
controller.adicionaCompraALista(descritorLista, qnt, id);
} | 0 |
41dbac1627bcc50ffe5bf729a7661305 | a42f20127dacfbf483005d62b859cd09 | Convert '2021-06-26 05:33:00 UTC' to '2021177.053300' | def flatten_time(t):
return t.isot.replace('-', '').replace(':', '').split('.')[0] | 0 |
1d39b7958af0520938b881dccebed56f | 2a999d1f41baef52cd2a67e1c8d29926 | Determine whether a mutation of the given type exists. | impl<'w> EntityMut<'w>
pub fn contains_type_id(&self, type_id: TypeId) -> bool {
self.0.contains_type_id(type_id)
} | 1 |
1ec5695a9c8f8283f42e4cadb1f634da | e8e5c906149e8a1b697491cb1e462842 | Gives Nmc Montecarlo realizations, given Ncat, Nitems.
We need to multiply by factor to fill, on average,
Ncat by multinomial sampling.
tol is the relative uncertainty we allow on the number of categories. | numrepeat=10, seed=None):
if self.moc is None:
area = self.area
else:
area = self.moc
if numrepeat == 1:
r_min = r_min.to(u.arcsec).value
poserr_cols = self.poserr.components.colnames
with tempfile.NamedTemporaryFile()... | 0 |
318530c5fc4e6ba8d05bc54f15b3b12b | df0b412c18151d5e65c5e7d41b7a77ec | Enables IPC for the daemon. | {
if ($this->config['daemonize']) {
\umask(0);
$pid = \pcntl_fork();
if (-1 === $pid) {
exit("Error: Fork fail.\n");
} elseif ($pid > 0) {
exit(0);
}
if (-1 === \posix_setsid()) {
exit("Er... | 0 |
afdcd06aebb15e9f0bf78e84c7a56752 | 8f0749575b3f9685823edf07101ec0c7 | Returns the start time in format 9:00 AM | $date = get_field('djgigs_event_start_date');
list ($startdate, $starttime) = explode(' ', $date, 2);
return $starttime;
} | 0 |
7cce8ab609d995284d8dd3cc6b1b7bf8 | 0528897051169a63228434fdefdcd2e9 | 円と円の衝突判定を行う。 | var distx = (c1.x + c1.r) - (c2.x + c2.r);
var disty = (c1.y + c1.r) - (c2.y + c2.r);
var dist = Math.sqrt(distx * distx + disty * disty);
if (dis < (c1.r + c2.r))
return true;
return false;
} | 1 |
09a778c9898217ed5703e13d66686a4f | 20a0a01c4a6fba7f9963796fa436e626 | Populate a list with unique ids found in GraphML file | root = etree.fromstring(xml_string)
ret_ids = []
for idlist in root.findall('IdList'):
for id_entry in idlist.findall('Id'):
ret_ids.append(id_entry.text)
return ret_ids | 0 |
5b1d400a5d356ca6f243ba2000e66860 | fb155123b590e3f0160dffe84096aab6 | 比较本地修改的联系人和云端修改的联系人,得到冲突的修改联系人集合 | {
return (from kv in _remoteMd5Map
where !_localMd5Map.ContainsKey(kv.Key) || _remoteMd5Map[kv.Key] != _localMd5Map[kv.Key]
select kv.Key).ToList();
} | 1 |
1923fdccd903ae36d313a7941c4f8656 | a75830fa92d16b3e5fd16ef53bab18f2 | This function is used for debugging. | namespace shapes
void debugInfo(Line line,const char* name ){
printf("Name: %s Point one (%f,%f) Point two: (%f,%f)\n", name, line.one[0], line.one[1], line.two[0], line.two[1]);
} | 1 |
b56203cb62b4389deb6b6e62b5468ede | d207337d24be8596a85c3d355cc16a60 | Get the connection limit high-water mark. If the connection count hits this number, no new connections
will be accepted until the count drops below the low-water mark. | class Network extends HotspotGraphElement
public function getConnectionLimitWindow()
{
return $this->_row['connection_limit_window'];
} | 0 |
0fee31ad08e2528d14b0394695bfe10a | f4aa11607aceec778bd040947b70d998 | This method is called when a profilable object has been
removed by the IProfiler. | public void objectRemoved(ObjectChangeEvent event); | 1 |
e153e296f2bcd55315ce050b0272e837 | a9964401982b100c88530a34b8ed8afd | обновляет данные всех трех таблиц, скачивая архив из ресурса
Returns: | with self.open_old() as db:
cur = db.cursor()
old_categories = cur.execute("SELECT * FROM Category").fetchall()
old_subcategories = cur.execute("SELECT * FROM SubCategory").fetchall()
new_subcategories = database.get_all_subcategories()
category_id = 1... | 0 |
b5417453ddb52d325f7d5558aeae5ac7 | 2478abc3d39cf2b2714f37b1aa3811ae | Returns a new object of class '<em>MQ Base System</em>'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | MQBaseSystem createMQBaseSystem(); | 1 |
4c987c14a14857c6f948058b9632316d | 7d0477f2fdb4043408ddbcd2c030c844 | Create a ccdsInfo out of a comma separated string.
This will fill in ret if non-null, otherwise will
return a new ccdsInfo | String vals[] = csvSSNVals.split(";");
return new SSNInfo(vals[0], vals[1], recordID);
} | 0 |
fafa0b77c435b9c8c4006770c1436dfb | 597182773cc582afadabd7a78ace0ede | Decrements the parameter by one. | namespace More.Types
public Frequency Decrement()
{
return this++;
} | 0 |
b0da094f5b83a21816f55b9ef4d879b3 | 0feb6e0c18eb34bf5ef8691975eb9057 | Add Flask cache response headers based on expires in seconds.
If expires is None, caching will be disabled.
Otherwise, caching headers are set to expire in now + expires seconds | def noCachingResponseHandler(resp):
return flask.add_non_caching_response_headers(resp) | 0 |
6cbde76ba7eaaeb364f3503f20e3c0b9 | f5862defdd24e8694f152e4419f6a314 | Returns flow manager instance. | class Api(object):
def flow(self):
return FlowResource(self.auth) | 1 |
dbc86f6f031d0311e9d5ffbcd1533546 | d6cda3169cfcf83617917fe11d80b94c | Express middleware that validates Chainlink external adapter request.
Read more: https://docs.chain.link/docs/developers | log: ConsoleLike,
): JsonRpcMiddleware<unknown, unknown> {
return (req, res, next) => {
if (typeof req.method !== 'string' || !req.method) {
res.error = ethErrors.rpc.invalidRequest({
message: `The request 'method' must be a non-empty string.`,
data: req,
});
}
next((done) =>... | 0 |
83702b8182cd4f9a48ab115cd3ae4efc | 994bf1285dfafd123d20d180bf75c17c | Lists all Exportacion models. | class ExportController extends \BaseController
public function index()
{
} | 0 |
6ba4a7d4fa1d2d1672e97882609b1c4a | 7a25aa5ed1f48f3a03a1f313e332c5e8 | Gets the title of this SharedCloudCompliance. # noqa: E501
Compliance title. # noqa: E501 | return {
self.title: {
"Type": self.resource_type,
"Properties":
_resolve_parameterised_properties(
self.properties, self.title
)
}
} | 0 |
6dc36eafa23a2b8beb7cf70b78b53fb2 | e26219069bf0d707b228d769918cd3cd | 根据定制ID和城市id查询景点 | @InterceptorRef(value = "defaultStack", params = { "fileUpload.maximumSize",
"5242880", "fileUpload.allowedTypes", "image/jpeg,image/png",
"fileUpload.allowedExtensions", ".jpg,.jpeg,.jpe,.png" })
@Controller
@Namespace("/")
public class ScenicSpotAction extends ActionSupport implements SessionAware
@Action(va... | 0 |
fe06939701bb6784fa74cbdc95fae6c7 | 5dc1dcc8788600d56b65d6d3df4b7127 | Added WHERE CLAUSE to filter todoItems with category selected from spinner | StringBuffer buff = new StringBuffer();
if(criteria.isEmpty()){
return "";
}
for (String key : criteria.keySet()) {
String value = criteria.get(key);
if (value==null) value = " is null ";
if (key.equals("taskName") && value != null) {
... | 1 |
42f2bd478736d07cfac89a94728d3efd | 50d4737db911f6e91dbc8ed3770672ca | Уничтожение всех переменных зоны. | sealed class ZoneLayer
public void ResetZones()
{
var ids = zonesById.Keys.ToImmutableArray();
foreach (var id in ids)
{
zonesById.Remove(id);
}
foreach (var t in Tilemap.EnumerateTilemapWith(zonesByTile.Radius))
{
zonesByTile[t] = null;
... | 1 |
9e3bb61d8b7428a9fc2df4c5fe628497 | 77c6f629c0d364e10cb9899fb8ed6eb9 | RangeMetadataConstraint constructor. | {
$this->_coupler = is_null($coupler)
? new Horde_Constraint_And()
: $coupler;
} | 0 |
eb1ed17f92727503cd8217bf37e0b566 | 5ba5a7748ffdca76c4c57849ac82448e | recognizes and converts a character constant; | {
if (sym == symbol::ident)
{
this->enter(otype::charcon, ptx, lev, pdx);
if (-1 == getsym())return -1;
}
else
{
error(4);
}
return 0;
} | 1 |
e393bfd246eea8c06733658157dd4aaf | 573076ebb29cc984df4fb28410e99293 | Returns an enumerator that can be used to enumerate
all of the names of the dictionaries that have been
registered. To protect the registry from concurrent
read/write access, the method creates a snapshot of
the current registry instead of enumerating against
the live collection. | namespace Sage.Connector.DomainMediator.Core
public sealed class StorageDictionary<TKey, TValue> : IDictionary<TKey, TValue>, IDisposable
public IEnumerator<KeyValuePair<TKey, TValue>> GetEnumerator()
{
return GetSnapshot().GetEnumerator();
} | 1 |
4391f9bf071ec4badd7582afd3485fe5 | 7b9ed4b31dce97779dec98a0b9b16aa6 | Смена статуса библиотеки рабочей программы | namespace RusDictionary
public partial class MainForm : Form
void ChangeStatus()
{
if (StatusConnect == true)
{
tmpConnect = 0;
pbStatusConnect.BackgroundImage = Properties.Resources.StatusTrue;
ForcedConnect = false;
la... | 1 |
f91e6478f35f06a5df9fb8ff8fdb69a4 | 541f7f822105680f4254a26f43afc570 | xGy24 -> xGy16B | namespace Z0
partial class BitParts
public static void part16x4(uint src, Span<byte> dst)
{
dst[0] = project<byte>(select(src, Part16x4.Part0), Part16x4.First);
dst[1] = project<byte>(select(src, Part16x4.Part1), Part16x4.First);
dst[2] = project<byte>(select(src, Part16x... | 0 |
caf06f772168850282dfd6695979287f | 12049f40459a33fc12c9afa36b0ababd | Название ссылки - пустая строка | void test2_link_get_name(){
Link* link = NULL;
FUNCTION_IS_CORRECT(link_get_name(link) == NULL);
return;
} | 0 |
c4b643487fe8687d7ae03267f8ea1831 | e13f3014e36773ad64f5083e5c07add4 | Equality of two SDL_Colors | {
return R == other.R && G == other.G && B == other.B && A == other.A;
} | 1 |
a13453e093b65859fe5ac2c07bc94a19 | b476fad9e76be96e94392d2194116220 | 根据字典获取SaleOrderShopDetailsExt对象 | {
IList<SaleOrderShopDetails> list = null;
try
{
SqlParameter[] sp = SqlParameterHelper.CreateParameters(conditionDict);
StringBuilder where = new StringBuilder();
if (sp != null && sp.Length > 0 && sp[0] != null)
... | 0 |
8d1ed6d87c43974aefb0ff815be204d8 | cb05d18258564e7f7c5adbcc33f6262d | 等待添加用户按钮出现,并且查看是否可以点击 | namespace Pages.Message
public partial class AddNotice : System.Web.UI.Page
protected void checkUser()
{
this.lbToUser.Visible = this.ibntToUser.Visible = this.btnDelSelect.Visible = this.tvuser.Visible = !this.rbAll.Checked;
} | 0 |
78f9f4613d2e990fb90da969d30f94a9 | 0aa77b51014a81e1ef805be9f9056aaf | Print info for the smallest purchase | class PembelianWindow(BoxLayout):
#kelas utama yang menampilkan page pembelian
def infoPembelian(self):
arrQuantity = self.getArrQuantity()
count = 0
for i in range(10):
count+=arrQuantity[i]
if (count==0):
self.showMsg2()
return
self.showI... | 0 |
700a56d41c99bc5a837b4cf093087d1c | 7c428a747d230d40fd55aa72c2c10398 | 检查GPS点数是否足够 | {
if (Waypoints.Length < 2)
{
Debug.Log("PatrolPath: Unable to start GO Patrol (Not enough waypoints: need " + (2 - Waypoints.Length) + " more)");
Active = false;
return false;
}
return true;
} | 1 |
83ecc874cfc180428fbe17d31b2ccae9 | 1a8af1bc80b21887dc158baee15267a8 | Generates the sudoku dlx sparse matrix. | coords = _get_coords(n_voxel, ndim=ndim)
sq_radius = np.sum(coords**2, -1)
if radial_cutoff is not None:
in_range = sq_radius < (radial_cutoff * n_voxel/2.)**2
else:
in_range = np.ones(sq_radius.shape).astype(np.bool)
n_active_pixel = np.sum(in_range)
splil = sp.lil_matrix((n_vox... | 0 |
acda2b5d08ee645cd56db5dea2413cc0 | 33c7badc440ab805a433233198a80a94 | Check if a message is waiting to be sent. If so, send it to the client, otherwise do nothing. | function ws(i)
function sendMyMessage() {
if (connection.connected) {
connection.send(JSON.stringify(customJSON));
} else {
setTimeout(sendMyMessage, 1000);
}
} | 0 |
df6fd571cb6bb7ec26edcec6dcbe52ee | 6d931ff13ab3144f0c8964ebc33e8b94 | 根据优惠劵活动id查找可用的奖品列表 | List<LotteryPrizeInfo> getEffectivePrizeInfos(int activityId) throws Exception; | 1 |
bf6a9cdecd721cfaadae2d34888f124c | f29e413f8e518dd1bc0e9c06771b55b4 | 根据配置获得刷新的花费 | class PrayInfo(object):
def _get_refresh_max_num(self, type):
all_refresh_data = data_loader.PrayRefreshCostBasicInfo_dict
refresh_nums = []
for key in all_refresh_data:
if type == data_loader.PrayRefreshCostBasicInfo_dict[key].type:
refresh_nums.append(data_loader.Pr... | 0 |
b13716ca7206513ac114410c887f5927 | af747b7d29337b094ea757fe3f7508d2 | Exit GUI cleanly | class GUI:
# SCAN_INTERVAL = 10 * 60 * 1000 # 10 minutes in millis
def exit(self, *_):
if self.tray_icon:
self.tray_icon.RemoveIcon()
self.tray_icon.Destroy()
if self.auto_scan_interval:
self.auto_scan_interval.Stop()
self.app.Destroy()
sys.exit() | 1 |
6d3f1beea8d27654f4881ac68fc5e967 | 27282e611f3113afd7ebfd62e1ba3dbd | student.txt 파일을 읽어서 stdList에 데이터 가져오기 | reader = StudentFileReader( FILE_NAME )
reader.open()
studentList = reader.fetchAll()
reader.close() | 1 |
1aae8ae55a1dc7ac720e0153940aa914 | 299b9108b7828e203d14b90575df7e1b | Test case: not logged in user should redirect to login page on logout | with self.client:
self.client.post(
'/users/login',
data=dict(username="eschoppik", password="secret"),
follow_redirects=True
)
response = self.client.get('/users/logout', follow_redirects=True)
self.assertIn(b'Logge... | 0 |
a4321a1a82b47d86b14264d38c4a83db | 852c9c10beb5bcf5eecf0c77940b4619 | Ako korisnik nije prijavljen odmah se prosleđuje na stranicu za logovanje | namespace KAssets.Controllers
public class HomeController : BaseController
[HttpGet]
public ActionResult IndexLogIn()
{
if (User.Identity.IsAuthenticated)
{
return Redirect("/Home/Index");
}
return View();
} | 1 |
0955b70788e920bd6703920f7565fdd2 | 65cde0ca8e6171e6c713cbf91b182cc2 | Overriden. Updates the node's world data.
Calls all the chilren's Update methods. | namespace GUI.Types.Renderer
internal class WorldNodeRenderer : IMeshRenderer, IOctreeElement
public void Update(float frameTime)
{
} | 0 |
13faebbcf848135cae6a89e2f6ce3182 | 9fb6b8c5e4efd54e6c973bb6fc64769c | 設定部門名稱 | class Department
public function setName($name)
{
$this->name = $name;
} | 1 |
ac6c8da476643103f4ca2efd065db0a6 | aa6fa3d50e46f4907ba1f4924d441432 | Gets the commit the reference points to | $commits = $this->api('/:id/repository/commits/', array('ref_name' => $ref));
if ( is_wp_error($commits) || !is_array($commits) || !isset($commits[0]) ) {
return null;
}
return $commits[0]->committed_date;
} | 0 |
c01e90cd22760f6de5eb16f3137f7eb0 | a671a74daf7756596406ae9bd7eee19e | Метод который подготавливает и сортирует от родительськой категории до дочерней все катигории записанные в базе данных. | namespace Nop.Services.News
public static class NewsCategoryExtensions
public static IList<NewsCategory> SortCategoriesForTree(this IList<NewsCategory> source, int parentId = 0, bool ignoreCategoriesWithoutExistingParent = false)
{
if (source == null)
throw new ArgumentNullExcept... | 1 |
17a2451b9050d5b47542ff8bc181cebb | f83fbd297602f24b8fec7765fe5ad0da | Returns the md5-sum of the serialized version of the currently stored content. This can be used to avoid status
updates when the managed content hs not actually changed. | public byte[] getMetadataHash() throws MetadataSerializationException; | 1 |
b9769d653f9432ca3f230bfe1cd09edd | d0e9fab5c77592c437c6fa0e66bd9b49 | 保存时程数据(txt或csv格式) | export class AppComponent extends ZjsApp implements OnInit, AfterViewInit
saveFmted() {
if (this.formated) {
const svTime = this.getTimeStr();
this.sourcest = this.formated;
if (this.saveFmtTime !== svTime) {
this.saveFmtTime = svTime;
const fmtPre = this.formated.replace(/[\s\n]/m... | 0 |
fcba61159674d006b170c7f4b8ac7720 | 17c8f4acdce329e2bb616a73cd90217d | Vrací true, pokud půže být daná kolekce dané entity cachována.
Použito před invalidováním závislostí v cache - jinými slovy, to, zda má vůbec význam invalidovat v cache, se dozvíme z této metody. | public function containsCollection($className, $association, $ownerIdentifier); | 1 |
70103ff86b700c9d99f83725fd3d9ec7 | 048c57f4655ace83f03497f176e17947 | Write string to stream.
Returns the number of characters written (which is always equal to
the length of the string). | class Roda
class Stream
def write(data)
data = data.to_s
@out.call(data)
data.bytesize
end | 1 |
698bacfe7e151e547942e86f4b1b7dcd | 52b65592e71f0e64cd294a0e82208018 | Creates a new buffer copying the given vector into graphics memory and | const vbo = gl.createBuffer()
gl.bindBuffer(gl.ARRAY_BUFFER, vbo)
gl.bufferData(gl.ARRAY_BUFFER, new Float32Array(data), gl.STATIC_DRAW)
gl.bindBuffer(gl.ARRAY_BUFFER, null)
return vbo
} | 1 |
b07f4f4fbb970e21f6b203ecaa9ab144 | 65ddbc3387011f1d340e98b98f3d9d15 | Get the Digital innovation record associated with the product. | @Repository
public class MrsMerchandiseDigitalRepository extends BaseRepository
@SuppressWarnings("unchecked")
public List<MrsMerchandiseDigital> getMerchandiseDigital(String merchandiseId) {
Query query = entityManager.createNamedQuery("MrsMerchandiseDigital.findMerchandiseDigital", MrsMerchandiseDigital.c... | 1 |
a0ea91d0860f7d6be43f5f2c4d8bbd02 | e084c9bb011c2ad566f7bfe241ed1993 | 获取表示去年的时间区间。 | namespace Leelite.NetCore.Timing
public static class DateTimeRangeExtensions
public static DateTimeRange GetYesterday(this DateTimeRange range)
{
var now = Now;
return new DateTimeRange(now.Date.AddDays(-1), now.Date.AddMilliseconds(-1));
} | 0 |
e0a09e972dac986f87cef16ca3977bbe | a459a0f2de8b75d8290c8069d123cde7 | Creates a P# compilation process. | p4 = P4.P4()
p4.prog = p4gf_version.as_single_line()
if port:
p4.port = port
if user:
p4.user = user
if client:
p4.client = client
return p4 | 0 |
72a83c2cf08a8964ed03b328f3490773 | ac871d827eec14d1428476619561f9e8 | reiniciar número en pantalla | public class WinPunto extends javax.swing.JFrame
private void BtnCxActionPerformed(java.awt.event.ActionEvent evt) {
x=Integer.parseInt(TxtPantalla.getText());
TxtPantalla.setText(null);
TxtPantalla.requestFocus();
} | 1 |
600b195afa2d283fc00a1526b4808d70 | 0673802fdf7a85610486861d40508e8e | Save the last-seen neutrino power spectrum to disc | class Gaonep(Gao):
def save_nep(self, phase_nep_fname='phase_nep.dat'):
freq_nep = np.hstack((self.comb_freq_phase[:, 0].reshape(-1,1), self.nep.reshape(-1,1)))
np.savetxt(self.save_dir+phase_nep_fname, freq_nep, delimiter=' ', header='freq(Hz) NEP[W/Hz^1/2]') | 0 |
71cae4ed11e04e0bebbb0424eb224043 | 3d3aec390c538205c87b5cc441fd9779 | Returns a list of users active within a forum ordered by most comments made. | parameters: IForumsListMostActiveUsersParameters
): Promise<IGenericDisqusResponse> {
return this.client.request(
"forums/listMostActiveUsers",
parameters
) as Promise<IGenericDisqusResponse>
} | 1 |
81aa135e97909ea2f86d73a44a2d4dd2 | 6f80c5f6eb383fde7e535a1ad3be0ab9 | 处理交货期更改申请 | public OrderChangeGoodsApplyRsp saveChangeGoodsApply(OrderChangeGoodsApplyReq applyReq) {
validateSaveChangeGoodsApplyRequest(applyReq);
long source_order_code = applyReq.getOrder_code();
logger.info("SaveChangeGoodsApply for order {}, request is {}", source_order_code, JSONObject.toJSONStri... | 0 |
10843bd66eb84618752459be69982640 | 6c0fd5cbd5a21c2c70da0bbde46582ed | Function to register a raw input device. | BOOL SendReceiveData::registerRawDevice() {
UINT numberOfDevices;
RAWINPUTDEVICELIST *deviceList;
int result;
bool deviceFound;
numberOfDevices = 0;
deviceList = NULL;
deviceFound = false;
result = GetRawInputDeviceList(NULL,&numberOfDevices,sizeof(RAWINPUTDEVICELIST));
if(result<0) return false;
deviceLis... | 1 |
f11cf851f7c936ad9ff59c14642a7a41 | 0447e0717c2acfed34d0854456a7a163 | Debug probe enabling memory interface.
General memory interface enabling method (it should be called after open method) for SPSDK library
to support various DEBUG PROBES. The function is used to initialize the target memory interface
and enable using memory access of target over debug probe. | Int IpcMemMgrDrv_open(Void)
{
Int status = IpcMemMgr_S_SUCCESS;
return(status);
} | 0 |
dbabe42132f6699243f99f2940aecf25 | d722bb223799572bb972e37d7708dd18 | Create a bound line set from this line set, transform and material mapping | {
Point3 pt1 = StartPoint.Transform(t);
Point3 pt2 = EndPoint.Transform(t);
return new Line(pt1, pt2);
} | 0 |
9cd7c174328f53f056502d79118373bd | 519c59d53a68f38504f156ab0e530c65 | 赞回答 | class QuestionAction extends BaseAction
function agree() {
$this->tologin();
$data['aid'] = $this->post['aid'];
$data['uid'] = $this->post['auid'];
$data['qid'] = $this->post['qid'];
$data['actionid'] = $this->uid;
if ($this->setting['agree_self'] == 0 && $data['uid'] == ... | 1 |
50fa7b71a05152b4316528fba97c3144 | ca57bec6a00015d62116a84425b9e28d | 根据身份证Id和项目查询受益户 | @Component("rzPrjcontrChgService")
public class RzPrjcontrChgServiceImpl implements RzPrjcontrChgService{
private List<RzPrjcontrLessee> queryRzPrjcontrLessee(RzPrjcontr rzPrjcontr){
String pkPrjcontr = rzPrjcontr.getPkPrjcontr();
RzPrjcontrLesseeQuery rzPrjcontrLesseeQuery = new RzPrjcontrLesseeQuery();
rzPrjcon... | 0 |
1f952ee735552014f4a07551b7f099eb | 9a9c6486e0884427c5b08c6aae063ce8 | Read configuration from a file-like object. | path = path if path is not None else self.path
if path is not None:
config = configparser.ConfigParser()
try:
with open(path, 'r') as f:
config.read_file(f)
settings = config.items(self.connection)
except IOError:
... | 1 |
5f7be72872acec6c522a613de02ab58b | ac182dcb085c2bf302ef23fb019a743e | Create an instance of {@link TSearchLinkRequest } | {
$this
->setSearchQueries($searchQueries)
->setResultType($resultType)
->setPreviewItemResponseShape($previewItemResponseShape)
->setSortBy($sortBy)
->setLanguage($language)
->setDeduplication($deduplication)
->setPageSize(... | 0 |
cec702fc83638ec358eca4474baf202e | a8cd1d7d574dbdc4c43b76a80655a520 | 判断是否是正确答案 | class Question(object):
def is_correct(self, num):
return (num == self.correct_answer) | 1 |
5756f84bc5d56af78f99ca186f36d732 | 6031f0d5014321eaa6db0bc803f5f12c | 1. Arreglo con los ids de clientes ordenados por rut | class ClientsController extends Controller
public function index()
{
$clientes = Client::select(
DB::raw("CONCAT(nombre,' ',apellido) AS name"),'rut','created_at')
->orderBy('created_at','DESC')
->pluck('name', 'rut');
$cli = $clientes;
$causa = null;
try{
... | 0 |
eb16868e77e70505271a18545c8127e4 | cfb7639ea35206f3b1f0636fecfec40e | Allows access only to security users. | if not self.is_accessible():
if current_user.is_authenticated():
abort(403)
else:
return redirect(url_for('security.login', next=request.url)) | 1 |
7b248e37eb8ad46b14354ef0c7035d3c | 31bbda9fcb1630c2f3769b606eb1b024 | 验证指定父分类下是否有同名的子分类 | $where='';
if($id){
$where .= ' and fld_ID !='. $id ;
}
$sql = 'select 1 from tab_media_category_child where fld_category_child_name = "'. $val .'" AND fld_parent_ID = '. $parent_id . $where ;
$result = sqlHelper::ExecuteArray($sql);
if($result){
return false;
}else{... | 1 |
cb89249178a35f9e67ba37cfeebb4289 | 3b744c5a724f173844205dd1183cf14d | 설문문항를 등록한다. | public List<VoteDetailValue> doAddVoteQuestion(
VoteDetailForm voteDetailValue) throws Exception; | 1 |
ecb8d5a253288fca262e8b432b02d525 | 6b7e124c0a9b27bd26586500987b01f0 | Propiedad que devuelve : El indicativo si presenta el log en una ventana | @Entity
public class EstacionVcub extends Model{
public boolean haReportado() {
return reporte;
} | 0 |
3702bafad2d67396b64ec4627e0bb6f7 | ed59f7cf63cb7bf6491503bed5bd67a4 | Summary:
Verifies that the object that is passed in is not equal to null If the object
is null then an NUnit.Framework.AssertionException is thrown.
Parameters:
anObject:
The object that is to be tested
message:
The message to display in case of failure
args:
Array of objects to be used in formatting the message | namespace Lucene.Net.TestFramework
internal partial class Assert
[DebuggerStepThrough]
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void IsNotNull(object anObject, string message, params object[] args)
{
_NUnit.Assert.IsNotNull(anObject, message, args);
... | 1 |
1906bd8fe846a54dfa8fe40eabd0a7ad | 047017e17dc680fe44ce3d86c5ff8939 | Testuje, zda lze do prostoru vložit a i z něj odebírat věci | public void testKapacitaLodi()
{
Vec vec1 = new Vec("salat1", true);
Vec vec2 = new Vec("salat2", true);
Vec vec3 = new Vec("salat3", true);
Vec vec4 = new Vec("salat4", true);
Vec vec5 = new Vec("salat5", true);
Vec vec6 = new Vec("salat6", true);
assertE... | 0 |
2612cc83942e1cc56315ba327c61a064 | 326d8765cb5836a72abc5765d0f5d257 | Return whether the process is adaptive. | class AudioJitterBufferBehaviour
extends BasicJitterBufferBehaviour
@Override
public boolean isAdaptive()
{
return AJB_ENABLED;
} | 1 |
b8cfdf5362439f81dcecf1d249731529 | a1260bcadd7ceae75ea31f54e0c965c3 | Returns the common parent of the two given elements. | while (ele1) {
if (Util.contains(ele1, ele2) || ele1 === ele2) {
return ele1;
}
ele1 = ele1.parentNode;
}
return null;
} | 0 |
8cc4dc9744f0c3d8000fe33e1530869b | f3a82ca848a7184f53d3621151b75582 | Remove leading / and query string | url.gsub!(/\s/, '')
url.gsub!(/\?.*/, '') if options.strip_query?
url.gsub!(/\#.*/, '') if options.strip_anchor?
Addressable::URI.parse(url)
end | 0 |
b15078a704c3f7b323cd224b69499924 | 88a159470e3078cd7142b603b103f834 | 查看分页消息日志,并可关键字查询 | keepModel(Message.class);
Message message = getModel(Message.class);
String startTime = SqlParaUtils.startTime(getPara("startTime"), getPara("endTime"));
String endTime = SqlParaUtils.endTime(getPara("startTime"), getPara("endTime"));
int pageNumber = getParaToInt(Constant.DWZ_PAGE_NUMBER, 1);
int pageSize ... | 1 |
c40accc67f1b8307f201d02890b9caa2 | c3103dba69e64e5970b399a8dd1d58e2 | Creates a new instance of the <see cref="Lazy<T>" /> using the specified loader. | namespace GraphQL.DataLoader
public class DataLoaderContext
public IDataLoader<TKey, TValue> GetDataLoader<TKey, TValue>(object name,
Func<IEnumerable<TKey>, ILookup<TKey, TValue>> fetch)
{
return (IDataLoader<TKey, TValue>) _loaderCache.GetOrAdd(name, _ => new DataLoader<TKey, TValu... | 0 |
88fe2d9d81df655ac9de80f133dcc52a | b52a53cba0c9748635350d2d7e1c67b3 | Synchronous mkdir(2). | int mkdir(const char* pathname) {
return user_syscall(SYS_mkdir, pathname);
} | 1 |
206b2fcb00c29b3300c2e96af24b0322 | e976258080a596b3ca280f7e63da444a | Encodes a unitary CL value, i.e. a null. | def encode_unit(value: None):
return bytes([]) | 1 |
037dd3cc2fda13a87062cd9632aa541d | 8a90ba1ed1e61769dfbc313ecc1491ce | Read new properties from the device. | namespace CompanyNameCsLineScanner
class CPropertyGroup
protected void ReadProperties()
{
foreach( CPropertyBase property in m_properties )
{
property.GetFromCommand( m_host );
}
} | 1 |
a9e69a5be0fc001ccf5cf23c7e8a99a7 | ef6ec70ba6ded1232de053063a1ce4ed | @brief 辅助函数,将p所指向字符串转换为一个无符号整数double。plen用以输出读取的的字符数,pdlen用以输出已读有效位数 | {
tdp_int_t sign;
tdp_double_t value;
tdp_double_t power;
tdp_uint_t state;
tdp_char_t* s;
tdp_char_t ch;
tdp_bool_t loop;
if ( tdp_string_empty(p) )
{
return 0.0;
}
sign = 0;
value = 0.0;
power = 1.0;
state = 0u;
loop = TDP_TRUE;
for (s=p->begin; (s!=p->end) && (TDP_TRUE==loop); )
{
ch ... | 0 |
34f3ae7f6b4c72a54041bc23d7d3e4ce | c87b03aee0c558c3d06b64ab142468f0 | Build, start and test connectivity of all elements | NodeElementConnectivity_Fixture()
{
} | 0 |
b2a4c4da157ec79b91edca86d8216ca6 | 7fc7d16a2c8aee6959f7d7dfaa64c1bc | Returns the meta object for the containment reference list '{@link com.cloudsmith.publish.Publisher#getUsedPackages <em>Used Packages</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getMetaModel_PackagedElements(); | 0 |
09626b41dbd18c0852def076d8df8a16 | d31196a7ce86eb44f493e06e2d6f5832 | This is needed so your minion can properly spawn when summoned and replaced when other minions are summoned | public class MinerSpawn : MonoBehaviour
void Start () {
} | 0 |
4d8b37bc2628b4adec33621cf4e0fc9e | d6609bbaaca1539f4dcff4cda121040c | Metoda ktora nastavi predmet na obleceny. | {
if(jeMisto()){
seznamVeci.put(predmet.getNazev(),predmet);
notifyAllObservers();
return true;
}
else{
return false;
}
} | 0 |
897e42b01d8ddc950a16a65a3e6a74d1 | e7be9f1edad83d66dbdd3f9d1017aa3f | 创建vlc实例
创建媒体实例,需使用vlc实例
创建播放器实例,需使用媒体实例
设置播放器播放句柄
开始播放 | libvlc_instance_t *vlc_init=libvlc_new(0,NULL);
if(!vlc_init)
return 0;
libvlc_media_t *vlc_media_init=libvlc_media_new_path(vlc_init,media_fl);
if(!vlc_media_init){
libvlc_release(vlc_init);
return 0;
}
if(libvlc_media_parse_with_options(vlc_media_init,libvlc_media_parse_local,-1)){
libvlc_media_releas... | 1 |
956be1fc7d576a3e53d6168aa5a9dd95 | ced800a65877aa3c68f25e8556841cde | Extract the chosen seats from the page as a way of asserting | var seatingValue = [];
for (var i = 0; i < 12; i++) {
for (var j = 0; j < 10; j++) {
var seatingStyle = `<div class='seat available' data-row='${i}' data-col='${j}'></div>`;
seatingValue.push(seatingStyle);
if (j === 9) {
var seatingStyle = `<div clas... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.