query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
818033ca75971ec0d449491f33cae032 | 7d54184ae1b7954b2406a8728e0e3a1c | Met à jour tous les champs de l'UI | qualityField.setText(String.format("%1$03d", noyau.getQuality()));
fpsField.setText(String.format("%1$02d", (int) noyau.getFps()));
linesField.setText(String.format("%1$02d", noyau.getLines()));
timeoutField.setText(String.format("%1$04d", noyau.getTimeout()));
mosaiqueTimeoutFie... | 1 |
e147e976e84a47f785401ce8bdd31b5f | cdeeb3fe6eda140fa6dfc239a312e2bc | Delete key-value pair with minimum key rooted at n | ZIX_PRIVATE void*
zix_btree_remove_min(ZixBTree* const t, ZixBTreeNode* n)
{
while (!n->is_leaf) {
if (zix_btree_node_is_minimal(n->children[0])) {
if (!zix_btree_node_is_minimal(n->children[1])) {
n = zix_btree_rotate_left(n, 0);
} else {
n = zix_btree_merge(t, n, 0);
}
} else {
n = n->childre... | 1 |
cd072d0c70cf0941393b944b91c6a231 | 100c5ba6fa3e7b06c3a6555b23da102f | Returns the JNDI name of the data source that will be used to obtain the
connection. | public class JndiDataSource
public String getJndiName() {
return jndiName;
} | 1 |
6369c950ecf8fb76b9ec3a1eaca1dada | 6be6edb4cc63354560392dfe7b6e57d0 | Permet de récupérer les cellules contenant des soldats | ArrayList<Building> troops = new ArrayList<>();
for (Card card : this.playerInMapCards) {
if (card.isBuilding()) {
troops.add((Building) card);
}
}
return troops;
} | 0 |
bcc23e166b430619173d09841230da5b | baa231226b3dec2f35405fc577741102 | Remove a collector from the exporting process | public class JSCollector extends ReactContextBaseJavaModule
@ReactMethod
public void undo(String collectorId, Promise promise) {
try {
Collector collector = mCollectorList.get(collectorId);
collector.undo();
promise.resolve(true);
} catch (Exception e) {
... | 0 |
e00c281efda1f7dcad5c55e42c241173 | ab5e93eb05e47a9623b7d2da2809c0ba | 改变截图窗口 | namespace Core{
void MainWindow::screenshotSettings()
{
QString saveName = QFileDialog::getSaveFileName(this,tr("save screenshot"),QDir::homePath(),QString("*.jpg"));
if(!saveName.isEmpty()){
QEventLoop eventloop;
QTimer::singleShot(50, &eventloop, SLOT(quit()));
eventloop.exec();
... | 0 |
3e91e69a14e181a89248ed2383fc48ed | 0f0d5fee9151ac66154744def14657b8 | moves the arm motor according to the joystick | {
if (joy1Btn(5))
motor[armMotor] = 40;
else if (joy1Btn(7))
motor[armMotor] = -30;
else
motor[armMotor] = 0;
} | 1 |
a49ca7f27e51e51d2869d34dd2755b74 | 351f108df69fbe5c9e2399e1e25bff5c | 按条件查询ExamStudent记录数量 | {
StringBuilder strSql = new StringBuilder();
strSql.Append("select count(1) FROM ExamStation ");
if (strWhere.Trim() != "")
{
strSql.Append(" where " + strWhere);
}
object obj = DbHelperSQL.GetSingle(strSql.ToString());
... | 0 |
aaee445e936ec1ecc3dc6fded151bf66 | 7431b3204495780a09241d0f1ae66712 | Tests that rule does not apply after unregistered aspect is added. | @RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration({"/spring/attendancesys/applicationContext_CXF_Client.xml"})
public class HolidayWSImplTest
@Test
public void testValidateAspect() throws Exception {
} | 0 |
34a16cbc6c720ad44edea20bd62fba94 | 766180e521615753ffe4a16918d84363 | Based on RFC 2131 Sec. 4.4.5, this defaults to (0.5 * duration_of_lease). | class _SecretBackendState:
def default_lease_ttl_seconds(self) -> Optional[pulumi.Input[int]]:
return pulumi.get(self, "default_lease_ttl_seconds") | 0 |
5db8b30d7701934e604c0c3c15e87ee0 | 59433bf4b2b518726ed9a98160b27d9d | Configures type variables of this property. | public abstract class ArType extends ArAbstractAnnotatedConstruct<TypeMirror>
R visitTypeVariable(ArTypeVariable typeVariable, P p); | 0 |
43bfab174a7e18939325fbfde41f89dc | fb061e183b79f5ee05ec7255902d87af | Остановить игру, очистить игровое поле | namespace Assets.Scripts.Game
public class Game : MonoBehaviour
public void FinishGame()
{
enabled = false;
ClearPressedKeys();
mainAudioTheme.Stop();
gridComponent.DestroyCells();
Destroy(gridGameObject);
nextFigure.Destroy();
... | 1 |
9a58e71cc83a69e15ec51705285bafd4 | 7d06b451c17ab785e8f6d26c4386ba22 | 画像の取得
カンマ区切りで保存されている画像のファイル名を配列に変換して取得する | $fileList = objSetArray($imageObj);
$imageArray = array();
foreach ($fileList as $k) {
$imageArray[] = $k["name"];
}
return json_encode($imageArray);
} | 1 |
0fe54ca5a65718f2d98ec7433e35f9dc | f24e26bdd7680a0871b02e9ea02bb446 | Return the relation alias name. | public static function relationName(): string
{
return static::class;
} | 0 |
0b3485b24151c93f11e582c1f45cb7e5 | b8ea7c4d5010742c8b6dbed7501f393d | prints a staircase that is right aligned that is n stairs high. | n=int(input())
x=n
for i in range(1,n+1):
print((x-1)*" "+i*"* "+(n-1)*" ")
x-=1 | 1 |
6c215ee554cd693570aba2046760f984 | 697b261b153c320318cf29667d851639 | This view should return a list of all the items
for the currently authenticated user. | class ItemController extends Controller
public function index()
{
$items = auth()->user()->items;
return view('items.index', compact('items'));
} | 1 |
49c2a6f34ea116c1385795a4c8153919 | af02916e489c698d962c639da8a554a4 | generates a 1 digit number | public class RandomGenerator
public static Integer generate1Digit() {
return (int)(Math.random() * 9);
} | 1 |
45583f9d3b4652341f8724781f745487 | c7f9f5227c07031bcf3662fd0f67aa0c | Mark the video as unplayed. | class MyPlexAccount(PlexObject):
def markUnplayed(self, item):
key = f'{self.METADATA}/actions/unscrobble'
ratingKey = item.guid.rsplit('/', 1)[-1]
params = {'key': ratingKey, 'identifier': 'com.plexapp.plugins.library'}
self.query(key, params=params)
return self | 1 |
ae11326d4deb414733689fa36601aef8 | 4da8df055e8193f55d19d88087331d35 | ## convert cartesian to polar | polar <- function(z = NULL, a = NULL, b = NULL)
{
if(is.null(z) && is.null(a) && is.null(b))
stop("\nProvide either z or a and b.\n")
if(is.null(z) && length(a) != length(b))
stop("\nThe lengths of a and b must be equal.\n")
if(is.null(z)) z <- complex(real = a, imaginary = b)
if(!is.complex(z)) z <- a... | 1 |
4d95ef7cbab1f83c10f936511dd01e6c | 12a5e97eefab40156378902936171de1 | (with prefix, to be clear) | class AnnexCustomRemote(SpecialRemote):
# default properties
def _get_custom_scheme(cls, prefix):
return "%s+%s" % (URI_PREFIX, prefix) | 1 |
68c065d06dff74dd73b53ba867e09e22 | 5c176e1658b5dce584527b51e7e0f8e8 | Запрос пользователя для выбора файла шаблона | {
string path = directory;
string[] files = null;
Console.WriteLine("Выберите нужный файл и впишите его номер");
files = Directory.GetFiles(path, "*.txt");
int i = 0;
int number;
foreach (var item in files)
{
... | 1 |
b8bab214cefc9fbd8df257e4a45b05c0 | 8671f8878142b859480b93d092a9b7ed | for instance: font-name -> fontName | {
std::string camelCase = str;
std::string str(1, tolower(camelCase[0]));
for (auto it = camelCase.begin() + 1; it != camelCase.end(); ++it) {
if (isupper(*it) && *(it-1) != '_' && islower(*(it-1))) {
str += "_";
}
str += *it;
}
std::transform(str.begin(), str.end(), str.begin(), ::... | 0 |
754d81256cbb1a9d8a44234ee91eb12c | d989e2e887acb360df729b60743c0d54 | Get Above50MillionFailOverChannel value | public class DfpField implements Field<Dfp>
public Dfp getLn5() {
return ln5;
} | 0 |
dde3c924bfebb74e7f91630152275a1c | f671c795537db9f5d122d4ec244ffbac | 获取按钮状态Selector样式 | StateListDrawable selector = new StateListDrawable();
selector.addState(new int[]{android.R.attr.state_pressed}, press);
selector.addState(new int[]{}, normal);
return selector;
} | 1 |
c80c80ddd88c305c89f0bf07cfc7e61e | 91a42d8e8e671fe82744bed198607bb1 | Этот метод расчитывает случайную длину свободного пробега
фотона | class TaxiAPI:
def get_length():
return random.randint(5, 50) | 0 |
52cb30535066a6034326369202a81a1e | 9b9e2f087693f77c255ebca31e885351 | Este reporte contiene el resumen por cada cuenta de tipo mayor | class AsientoContableController extends BaseController
public function libroMayorMostrarTodasLasCuentasAction($fechaInicio, $fechaFin)
{
$em = $this->getDoctrine()->getManager($this->getEntityManager());
$fechaInicio = \DateTime::createFromFormat('d-m-Y H:i:s', $fechaInicio . ' 00:00:00');
$fechaFin ... | 1 |
97d858bfc61f72b55acccefbf8a80f7b | 91fb9362f3f5d72dc12159be549d1d64 | Write a function to generate the generalized abbreviations of a word.
Note: The order of the output does not matter. | public List<String> generateAbbreviations(String word) {
List<String> ret = new ArrayList<>();
DFSBackTrack(ret, new StringBuilder(), word.toCharArray(), 0, 0);
return ret;
}
public void DFSBackTrack(List<String> ret, StringBuilder str, char[] cword, int pos, int num ){
int l... | 1 |
3eed8d72e23f9b5e0018c1b57629f927 | fec15636e03f3d0ec1d0718540f65a52 | Returns a formatted string for given money value in secondary currency. | final class LocaleFormatter implements MoneyFormatter
public function format(Money $money)
{
$amount = $money->amount();
$minor = $money->currency()->minor();
$digits = $money->currency()->digits();
$code = $money->currency()->code();
$float = round($amount / $minor, $digits)... | 0 |
f25e426a73aa7708a344f7d73f1f0f7c | c936792f121f096f7f358b589492803a | Тест получения сообщения действия по сущности (случай с удалением) | action = self.createActionAndActionTypeAndSetItOnApi("Person", "get")
self.tic()
action_list = self.web_site.api.ERP5Site_getAllActionListForAPIGet()
self.assertEqual(len(action_list), 1)
self.assertEqual(action, action_list[0].getObject()) | 0 |
5fb66e65072b5dc2ab2c7c2a0ef193f5 | da9ce05192cff4515f9e91910e480e39 | Converts operands from their string representation to their
numerical representation, resolving label names along the way. | class EquationParser
private fun parseOperand(operandString: String): Operand {
val operand: Operand
val intValue = operandString.toIntOrNull()
operand = if (intValue != null) {
Constant(intValue)
} else {
getEquation(operandString)
}
return operan... | 1 |
6c38c0f0268790523bb2a0f4300c212b | 546d3c4e4502ce2839f6ace6c75bfcee | Convert an ASCII representation of an EUI-64 to binary form. | eui64_aton(const char *a, struct eui64 *e)
{
int i;
unsigned int o0, o1, o2, o3, o4, o5, o6, o7;
i = sscanf(a, "%x-%x-%x-%x-%x-%x-%x-%x",
&o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
if (i == EUI64_LEN)
goto good;
i = sscanf(a, "%x:%x:%x:%x:%x:%x:%x:%x",
&o0, &o1, &o2, &o3, &o4, &o5, &o6, &o7);
if (i == E... | 1 |
a2bfc4242e604117bb0004ed4b24ff9e | ead0764dd9e175c2adf08824b1a5a702 | 更新安装上报临时表状态 | {
try
{
if (idList == null || idList.Count == 0)
return true;
string sql = string.Format("update {0} set fdap4jcUploadState=1 where id in({1})", _CarTableName, string.Join(",", idList));
return idList.Count == BaseServer... | 1 |
1708ab3b16059e1343edef5cde2f5cca | d726d2c6ac55f6453b9c033b491be534 | 根据集合name获取mongoose的model | @Service("mgTicketService")
public class MgTicketService
public DBCollection getCollByName(String name)
{
return this.mongoTemplate.getCollection(name);
} | 0 |
bfc4cd3a3eb305989f4db378edb40926 | 8a77081f51369f9516b3c723dff51df9 | Show text field instead of password field so that user can see the password uncensored. | class SimpleSAMLAuthenticator
function show_password_fields($show_password_fields) {
return false;
} | 0 |
77616d537c3835e7f295de9ee9b12619 | e90c4f4559ab3ea6df876da621b3a30b | ====================================================================
new timeout value
This function is called to modify the inactivity timeout for the TCP
socket.
======================================================================= | void pool_set_timeout(int timeoutval)
{
if (timeoutval > 0)
timeoutsec = timeoutval;
else
timeoutsec = 0;
} | 1 |
f835e17b2fb8ed253a174fb9b6291c50 | 093bc9c3835fb92d14b29ad6ac8d394c | 检查上传的文件名字是否存在 | function checkFile(){
var filename=$("#file_namess").val();
var name = filename.split('\\')
$.ajax({
url:server_context+'/checkPackageName',
type:'get',
data:{
'fileName':name[name.length-1]
},
success:function(data){
if (data.error_code==10008){
$("#file_namess").val("");
$.me... | 1 |
43eab7b21c8aaa868f618acc2b55d3aa | b33d6f0a5c88383fe5c0ba6775d001ef | Adds the tabs to the page before it renders | final class Module_Buzzerapp extends GDO_Module
public function onRenderTabs()
{
GDT_Page::$INSTANCE->topTabs->addField(
$this->templatePHP('tabs.php'));
} | 1 |
3bf9fa4d4859e706864d102fa13b0424 | 9f4cc9b818ceb9d0903389057af99833 | Writes the device configuration into a string (ends it with newline) | class DevicesController
def build_config
show
render plain: @device.build_config.delete("\r")
end | 0 |
1cdbefa3725f439a0f730d46eec4ccc8 | d896e93ad7c1883fc27cc926a315bad7 | GET: asset_location | namespace GridAjaxCRUDMVC.Controllers
public class AssetController : Controller
public ActionResult Index()
{
return View();
} | 0 |
ebf0e5c3a74591ac437a9e981ef1aef2 | 3b1399d3b9752809d192a4f311a56d9c | Find the intersections between a rectangle and a line segment. | Point res = s;
if (sgn((s - e) ^ (a.s - a.e)) == 0) {
if (sgn((s - a.e) ^ (a.s - a.e)) == 0)
return make_pair(0, res);
return make_pair(1, res);
}
double t = ((s - a.s) ^ (a.s - a.e)) / ((s - e) ^ (a.s - a.e));
res.x += (e.x - s.x) * t;
res.y += (e.y - s.y) * t;
return make_pair(2, res);
} | 0 |
691f38255ef24f79e564d66ef7dd84c9 | da7d421ffe5fed22c065b3f627e5d9b2 | El sonido se reproduce en la coordenada que contenga el script. | class Reproductor(object):
def reproducir(self):
assert(True)
pygame.mixer.music.play(0) | 0 |
218e8e3d2968d0e3596ddf242b7f7e92 | f7f25c47894b518146c212ce4268016a | Creates a new instance of the <see cref="Image{TPixel}"/> class from the given stream. | where TPixel : struct, IPixel<TPixel>
{
this.ParseStream(stream);
return this.PostProcessIntoImage<TPixel>();
} | 1 |
24b3ac57f4f78d715174c2524121ea3b | 6527bf6e52b2d6854266c3f3405d45cd | The id of the newly created draft share invite. | class DraftShareInviteApiKey extends BunqModel
public function getUserAliasCreated()
{
return $this->userAliasCreated;
} | 0 |
e7f99bb3d46c71c02f17a6eddbb1be53 | 5f480836ddc48c67fe5a4156c7d474e7 | Do something useful. Right now this function
is just present for algorithmic clarity. | local function dummy()
end | 1 |
7379c3567185e020229986ff4ef0f25f | dd1744d775860c5a746fa9968e844648 | #Log2 transform data prior to plotting. | {
minValue <- min(mtx[mtx > 0])
if(minValue == 0)
minValue <- .Machine$double.eps
mtx.1 <- mtx + minValue
mtx.2 <- log10(mtx.1)
mtx.3 <- t(scale(t(mtx.2)))
means <- apply(mtx.2, 2, mean)
mtx.3
} | 0 |
97e3392a771d8f15171aaf9705663d80 | 09c57588814d2a853fe895e146f898a2 | show the statistics fragment. | public class ExperimentActivity extends AppCompatActivity implements View.OnClickListener
public void show_outcome() {
outcomeFragment = new OutcomeFragment();
getSupportFragmentManager().beginTransaction().replace(binding.frame.getId(), outcomeFragment)
.addToBackStack(null).commit();
... | 0 |
bdd439b3e8f0e949a210df30694a51e6 | 2f2db287aae4cd861d3d2a434c3759c1 | 返回字段prodId 产品型号ID | {
if ($row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('ProdId', TableMap::TYPE_PHPNAME, $indexType)] === null) {
return null;
}
return null === $row[TableMap::TYPE_NUM == $indexType ? 0 + $offset : static::translateFieldName('ProdId', TableMap::TY... | 1 |
9f4f5567312adbb3df39326fd3345915 | edda838226d2bd360a6ef11d571666d5 | Check if the small bounding box is in the big bounding box.
The condition is determined by the intersection area over the area of the
small bounding box. This method is used to determine whether ROI is in a
tile or not. | class SVMDetector:
def intersects(self, roi1, roi2):
if roi1.x <= roi2.x + roi2.w and roi1.x + roi1.w >= roi2.x and roi1.y <= roi2.y + roi2.h and roi1.y + roi1.h >= roi2.y:
return True
return False | 0 |
9a9f51a5823a3b105f76aa87ff310e35 | afc27f683842f81d652d281ddad2cc10 | Initializes the data source and populates the DataGridView control. | {
DataSource = new DepartmentController().GetAllData().Tables[0];
Utility.SetDataSourceForDataGridView(grdList, DataSource, false, true,"", "Pos,Department_Name");
} | 1 |
b330db55117ac0fef727bd524f2fcbf0 | eb5d3df549c853d336c7741c9d3a0174 | 刷新加载数据回调的方法 | T OnRefreshData(); | 1 |
63134bf05af4f75fec318e399b7eb9ad | f411dd4d29f264ca6f2344bad53ac93c | recursively get the largest UI extents | RectInterface max = children.get(0);
for (int i = 1; i < children.size(); i++) {
if (normalize(children.get(i).getArea()) > normalize(max.getArea())) {
max = children.get(i);
}
}
return max;
} | 0 |
1274236d2af66307dde528755a2b1ebb | 07957a870d6e37ce8f85f6a1fe1229ff | Injects values from GUI objects to bound DTOs.<br/> | if (isNull(inDataSet)) return;
for (AbstractParameter parameter : parameters) {
if (parameter instanceof ObjectSimpleField) {
ObjectSimpleField simpleField = (ObjectSimpleField) parameter;
Object value = inDataSet.get(simpleField.getId());
if (... | 1 |
721b320443f104eaa6f14a1a11cc2632 | d36b791bbb5f1e640c4547202a9f4d61 | 将给定的img转换成html字符画 | let canvas = document.createElement('canvas');
let ctx = canvas.getContext('2d');
let width = img.width;
let height = img.height;
canvas.width = width;
canvas.height = height;
ctx.fillStyle = '#fff';
ctx.fillRect(0, 0, canvas.width, canvas.height);
ctx.drawImage(img... | 0 |
3b1381cc0a35fca82b7878904e94ca55 | 6e713d893abbcc2b167ae4de8c2c4557 | Display students in alphabetical order ------------------------------------ | void Student_SortByID(){
system("clear");
int i, j;
student tmp;
for(j = 0; j < num_of_students - 1; j++){
for(i = 0; i < num_of_students - 1; i++){
if(students[i].ID > students[i + 1].ID){
tmp = students[i];
students[i] = students[i + 1];
students[i + 1] = tmp;
}
}
}
St... | 0 |
c497490893015d3fa4c3f91603c9fa6e | 2e2797c2231f279421faa2072e64374a | Add anchor to url if provided in GET parameters. | class LC_Page_Admin_Order_View extends LC_Page_Admin_Order_Ex
function getAnchorKey(&$objFormParam) {
$ancor_key = $objFormParam->getValue('anchor_key');
if (!SC_Utils_Ex::isBlank($ancor_key)) {
return "location.hash='#" . htmlentities(urlencode($ancor_key), ENT_QUOTES) . "'";
}
... | 0 |
b2b2753e9ae3dfc17399f69387acbf92 | 5f023cd7f10bfab091c9cca2a7e3ffdc | 读取后台数据,将临时表单中的数据转换为json数组 | var arry = new Array()
var length = $("#applicant-table")[0].rows.length - 1;
var object = $("#applicant-table").children("tbody");
for (var i = 0; i < length; i++) {
var json = {};
json["id"] = object.children("tr:eq(" + (i + 1) + ")").children(
"td:eq(1)").find("input").val();
json["caseId"] = $('#caseI... | 1 |
c441ba00722161db6abd3bf74651275e | a5c21cf95c6ebba31899361e0f911d5d | 生成SELECT_FROM_MODEL类型控件HTML | {
global $_M;
$condi = array('modelid' => $modelid, 'available' => 1, 'infront' => 1);
if(!empty($_M['admin']['id'])) {
unset($condi['infront']);
}
$fields = (array) $this->fetchList($condi, '*', '', 'displayorder');
$formdata = new mop_formdata();
... | 1 |
f044b6a9c74d566a504000e8cdc4423a | ab05543e0f8bfcd7a9601c34da883a6e | Run a new node instance | domain_details = determine_domain_details(ip_hostname, os)
Puppet.info("#{log_prefix} node_create ip_hostname=#{ip_hostname}")
Puppet.info("#{log_prefix} node_create os=#{os}")
Puppet.info("#{log_prefix} node_create cm group=#{domain_details}")
node = {}
node[:node] = {}
node[:node][:name] =... | 1 |
1e5a0d644ec29de14d80e92fe0596a6c | af03f640d1f0b9a92a5f1324dee4e242 | 表示窓に表示された文字を文字列としてそのまま返す。 | namespace DotBrailleEditer.Base
public override string ToString()
{
return this.Character.ToString();
} | 1 |
ceabf33e68ea99ab67b4fcfa2840a499 | d3a9b0d06b607e7137cf90a133ff147a | cosine-weighted latitude | public final class ProjMath
public final static float geographicLatitude(float lat, float flat) {
float f = 1.0f - flat;
return (float) Math.atan((float) Math.tan(lat) / (f * f));
} | 0 |
d8ffc5c469701908351ec592a93e5f2d | 519ae2a8496a6129ace4bfba743dfb47 | 解析powerpoint2003,只能获取纯文本 | try {
OPCPackage opcPackage = POIXMLDocument.openPackage(fileName);
POIXMLTextExtractor ex = new XWPFWordExtractor(opcPackage);
return ex.getText();
} catch (Exception e) {
return "";
}
} | 0 |
5a549badf80f0e78eeab62b7e8a1022c | df56c46aaed8fdea483725cddb752ddf | Twiddle a dword of raw data out to the cm17a device | {
int i;
int cword_offset;
int cp_offset;
#if defined(__LITTLE_ENDIAN) || defined(CONFIG_SYS_WRITE_SWAPPED_DATA)
u32 cmd_le = cpu_to_le32(cmd);
#endif
uchar val;
uchar *cp = (uchar *) cmdbuf;
for (i = info->portwidth; i > 0; i--){
cword_offset = (info->portwidth-i)%info->chipwidth;
#if defined(__LITTLE_ENDIAN)... | 1 |
bb287531e71dc667641ce40128955b1b | 720a27fb7c7be36a590b5b76c3b2c98b | 描述:查询当前资源尚未拥有的操作 | if (rels != null) {
List<String> defNos = new ArrayList<String>();
List<String> nos = new ArrayList<String>();
for (int i = 0; i < rels.size(); i++) {
BioneAuthObjResRel rel = rels.get(i);
if (RES_PERMISSION_TYPE_OPER.equals(rel.getId()
.getPermissionType())
&& PERMISSION_ALL.equals(rel.g... | 1 |
bc777dcd0e969d4d2fc1317a2184aeaa | 3447c33acdfbb4f89d1ad70b074c4a5a | 重写抽象类Pet的抽象方法make_voice | class Animal(object):
def make_noise(self):
raise NotImplementedError | 0 |
220de6ec5a804a22457e95f053490a7c | d81f173171ac93ffffbe9e177c3cc334 | Returns whether a template exists within the classification matrix | namespace DocumentCloudApis_Templates.Controllers
public class TemplatesController : ApiController
[HttpGet]
[ResponseType(typeof(Boolean))]
public IHttpActionResult Exists(string templateName)
{
BusinessService bizService = new BusinessService(Client);
return Ok(bizS... | 1 |
d107bfcee291fc8ebdcbd30a4e6c2f8b | e51f3913fe6d8b299050c4560cec2e5b | @brief Solicita el nombre del struct en el que se está trabajando actualmente. | int get_struct_argument(char *label, char *argument)
{
STRUCT_TREE *now_struct_tree;
strcpy(argument, "");
now_struct_tree = struct_tree_top;
while(now_struct_tree != NULL){
if(!strcmp(now_struct_tree->label, label)){
strcpy(argument, now_struct_tree->argument);
break;
}
now_struct_tree = now_stru... | 0 |
815015ec5980fbe21fe842c2c2289fb4 | 5af5bec680533319a584c35df0182885 | Return discover data for *event*. | if not self.test_and_connect_to_device():
return None
return sle.get_epg_event_data(self.wd, logical_channel_number, event_date_time, key_press_delay) | 1 |
1b09a7a6f7538ae0f9ab2f0091c3b324 | ab32b5782d922ecc03986c5ce7b23b9f | 获取当前已添加人员表 | @Service
@Transactional
public class ProductionPlanServiceImpl implements ProductionPlanService
public List<User> getAddwho() {
List<User> list = poductionPlanDao.getAddwho();
return list;
} | 1 |
f554aa51c9b891c35ac5733d5ca7053c | 2c7c352a4580051025516c7dc3a63cb1 | creates and returns an array of letters as strings, starting with "a" | class MoLib
static getLetter () {
let _ch = 'A';
let letters = [];
for(let i=0;i<26;i++){
letters.push(String.fromCharCode(_ch.charCodeAt(0)+i));
}
return letters;
} | 0 |
f24f3d901d7d589dd83bf93bea568a36 | 2977cc13b5942b1a432a9c56a6471524 | Handles the Click event of the SaveNewBTN control. | namespace DeCurtis.Insight.MyCon
public partial class StartTask
private void SaveNew_OnClick(object sender, RoutedEventArgs e)
{
this.SaveWorkDetail(true);
} | 1 |
3d0f874c414301b30842ebbb26b3fb6a | c20036ce4b6fd4b797e70c2053b5c089 | Close an html page with standard stuff. | class htmlraw extends \octdoc\format
/**/
protected function pageFooter($fh)
{
fputs($fh, "</body>\n");
fputs($fh, "</html>\n");
} | 1 |
ffe8a376cf739e9f2671dda0b13fed76 | 5481888b3fac24d92e1a1cf08f26e46e | This method is called when one of the journeys has been clicked/tapped | {
if (e.CommandName.ToLower().Equals("select"))
{
int journeyId = ((IButtonControl)e.CommandSource).CommandArgument.Parse(1);
}
} | 1 |
1cdbaffb7144ab1f8add18e0372d7d90 | f753c03f4a8c082edd7d11f91aeaa117 | returns an array of all positions(integers) that are empty | let indexArr = []
let counter = 0
boardArr.forEach((position) => {
if(position === ''){
indexArr.push(counter)
}
counter++
})
return indexArr
} | 1 |
768bb368ae161a7d037d87d76d188586 | f2a851cfc3649ac49f5a3bbe4f39cf8e | Create a model with a given number of elements and time steps. | class SimulationObject:
def model_init(self):
self.model.initialize(0, self.final_time) | 0 |
195e5c68383fc08c53c36cdbea002262 | 39f0a28f6d6d252bb59bca387debcd68 | 反序获取扩展实现列表 | {
if (null === $this->sorted) {
krsort($this->extensions);
$this->sorted = !empty($this->extensions) ? \call_user_func_array('array_merge', $this->extensions) : [];
}
return $this->sorted;
} | 1 |
09a0ee52f631fae665782689cd28c148 | 5cdf49a412429b866732c4307f0a96cb | 如果滑动没有结束,则刷新显示 | public class ViewDragLayout extends LinearLayout
@Override
public void computeScroll() {
if (mViewDragHelper.continueSettling(true)) {
ViewCompat.postInvalidateOnAnimation(this);
}
} | 1 |
f6cdb63b541d3ac7d7f52a7b44b6cfda | b1c15db9e83414f2acb273d44f1523d9 | Should have the same hash code than an equal record value. | public class RelatedSpecimen implements Copyable
public int hashCode() {
return String.valueOf(this.getRecordid()).hashCode();
} | 1 |
4f9fb784620db399e231d0c204734472 | d45dbf5a7705660b072ae6803c848750 | Get list of chromosome ids and their lengths | def extract_chromosome_name_length(fasta_name):
chromosome_name_lst = []
chromosome_length_lst = []
with open(fasta_name, "r") as fasta_file:
print(f"Reading genome sequence in {fasta_name}")
for record in SeqIO.parse(fasta_file, "fasta"):
name = record.id
length = le... | 1 |
8e23e249952f0cb4c974b90cdb552e5e | 8f9fc3eddfe2c63d899675a585450ad3 | Tests if SO_OOBINLINE is enabled. | int jffs2_check_oob_empty(struct jffs2_sb_info *c,
struct jffs2_eraseblock *jeb, int mode)
{
int i, ret;
int cmlen = min_t(int, c->oobavail, OOB_CM_SIZE);
struct mtd_oob_ops ops;
ops.mode = MTD_OPS_AUTO_OOB;
ops.ooblen = NR_OOB_SCAN_PAGES * c->oobavail;
ops.oobbuf = c->oobbuf;
ops.len = ops.ooboffs = ops.re... | 0 |
cb3a09145c250f57d1b84dcdf1cd9fc8 | bbc17b6e4d3560fef5c865b75b9a1de3 | insert new broxus wallet or do nothing if exists | return this.get(uid, type).then(wallet => {
if(wallet) return wallet;
else return this.set(new models.walletModel.Wallet({uid, type}));
});
} | 1 |
472b4a59a74f27ddb0bc89943c89f344 | d3165c40c4a95b0d5a8506b6a4333801 | vrati aktualne vybrany index nastaveni delkovych jednotek | class Setting
public function getSettingsDecimal()
{
return $this->settingsDecimal;
} | 0 |
55648df929fdda48c196fba2f72140ed | da9ad7299aae074081f70e70626a0780 | 求交函数-圆 | double val1, val2, test,D;
D = sqrt((c1.a - c2.a) * (c1.a - c2.a) + (c1.b - c2.b) * (c1.b - c2.b));
if (((c1.r + c2.r) >= D) && (D >= fabs(c1.r - c2.r))) {
double a1 = D + c1.r + c2.r;
double a2 = D + c1.r - c2.r;
double a3 = D - c1.r + c2.r;
double a4 = -D + c1.r + c2.r;
... | 1 |
70055b8895374428ea9fe3d712fe5326 | 6b05d2c6fc14ff1c77af716ebd759e54 | Setups both the top and side navigation for mobile / desktop | function setUpPage() {
document.querySelector("nav ul li:first-of-type").addEventListener("click", loadSetup, false);
document.querySelector("nav ul li:last-of-type").addEventListener("click", loadDirections, false);
let movableItems = document.querySelectorAll("#room div");
zIndexCounter = movableIte... | 0 |
b799f2ce972aad04e6b7d6c1bc3ee060 | 2fe6567ec65da7fc8fb587e4486ff52f | getting notes from localStorage | class App{
loadNotesFromStorage() {
if (localStorage.getItem("saveNotesToStorage") !== null) {
let transformAllNotes = localStorage.getItem("saveNotesToStorage");
transformAllNotes = JSON.parse(transformAllNotes);
for (let addNote of transformAllNotes) {
let n... | 1 |
0e37aff353ed05a117656bf77c37040b | 27fc386d573773274aceee9ba1bb7b7f | The following interface is not scriptable and MUST NEVER BE MADE scriptable.
Native treeviews implement it, and we use this to check whether a treeview
is native (and therefore suitable for use by untrusted content). | public boolean isNative(); | 1 |
44472de518eb542b8a467b7a3edf6f9d | ee661e3306caf8bd94be425ee04ecd1d | Trains the neural network to cluster the data. | class Learner:
def train(self, features, labels):
features = self.scaler.fit_transform(features)
self.nbrs.fit(features, labels) | 0 |
4304f109980f1d8d2bb4a6be74c48cb5 | 6c2d1d0cfaca75e99d7c69fb3613e178 | Creates a right triangle from one side and the hypotenuse.
This side is treated as side B. | namespace DecimalMath
public static RightTriangleAbstract FromSideBHypotenuse(decimal lengthA, decimal hypotenuse)
{
return FromSideAHypotenuse(lengthA, hypotenuse).SwapSides();
} | 1 |
18b4d7930579dcf5d915589935ca6467 | 32aa7ef10d8c12868c32a4931779b97a | Rotate the hue around the grey axis, keeping luminance fixed. Greys are fixed,
all other colors change. | class ColorMatrix extends Array
_adjustHue(p_val) {
p_val = this.cleanValue(p_val, 180) / 180 * Math.PI;
if (p_val === 0 || isNaN(p_val))
{
return;
}
var cosVal = Math.cos(p_val);
var sinVal = Math.sin(p_val);
var lumR = 0.213;
var lumG = 0.715... | 1 |
7639f530bb39bc949bca9a9f5571d2a1 | 5f8db7f4a2af24332a8d233332da465f | retorna las calorias deseadas del cliente actual | {
$user = JWTAuth::parseToken()->authenticate();
$calories = Calory::where('user_id',$user->id)->orderBy('id','desc')->get();
return response()->json(['result' => 'success', 'data' => $calories]);
} | 1 |
503327b599e9a9eadc3d914cac315c5e | 780979805197ff7b9c0224579e091555 | converts criteria custom objects to explicit json object for firestore save | export class DgField extends Entity implements DgFieldType
toJSON(): { [key: string]: any } {
return { ...this, ...this._customFields };
} | 1 |
3a34fd4152e47585dee9b4dd220fe210 | f00f56a731ff4a8b348987395e588714 | 필요한 외부 데이터를 불러오는 함수 | self.codename_list = my_data.fileread("res/data/지점번호.txt")
self.name_list = my_data.fileread("res/data/지점명.txt")
self.month_list = my_data.fileread("res/data/월별.txt")
self.angle_list = my_data.fileread("res/data/각도별.txt")
self.name_select = False
self.month_select = F... | 1 |
2b62610c0cc66db08dd31121432a3c67 | 22fee1c015883e76ebe02cdc53448e28 | Set the elements which should be expanded. | public class CheckboxTreeViewer extends TreeViewer implements ICheckable
public void setCheckedElements(Object[] elements) {
assertElementsNotNull(elements);
CustomHashtable checkedElements = newHashtable(elements.length * 2 + 1);
for (int i = 0; i < elements.length; ++i) {
Objec... | 0 |
597c202ecb4f2234a017490f1c453910 | 59baef18c6f84e7caa1137019031dcc5 | selects random value between 0-999 | function RandomNumber() {
return Math.floor(Math.random() * 1000);
} | 1 |
b0449685297c4ec77523fff1613d27d9 | 8346d48ee4861b202f582033fd1af79b | # fill in the table with random values from 1-5 to simulate employee evaluation | table <- rand1(tableSize)
function(n) {
t <- 0
sapply(
X = trunc(rand2(n) * tableSize + 1),
FUN = function(s) {
t <<- table[s]
table[s] <<- rand1(1)
return(t)
}
)
}
} | 0 |
a4d8c46517b3a13d886a9609518396c6 | 16ea9fc44ea65fa80980b6f02d657e4c | Approximates the shape of each contour with a given accuracy and checks if that shape matches the wanted one by
the amount of vertices. If it does not, the contour is removed. | class Square:
def processContour(self, contour, index, contours, hierarchy, minWidth=30):
self.works = False
if isinstance(contour,Square):
return contour, 0
if isinstance(contour, bool):
return False, 0
if cv2.contourArea(contour) < 20*20:
contours[in... | 1 |
add19f5c8ddfab3c9802479bf60f7ca1 | 10c8e751f1b3d7af95893c4ac4812dd1 | Converts blktrace event to our test format. | class HDFDataFile(object):
def _pack_get_event(evt):
t = evt.traces
packed = np.zeros((len(t), 517), dtype='int16')
packed[:, 0] = t['cobo']
packed[:, 1] = t['asad']
packed[:, 2] = t['aget']
packed[:, 3] = t['channel']
packed[:, 4] = t['pad']
packed[:, 5:]... | 1 |
004cf040b0468a30b9e3204c125bd225 | 630e19296880ba0eab6904a1f87bbfb5 | Convert from osu!api status. | if (statuses) {
if (statuses.includes('error')) {
return 'error';
} else if (statuses.includes('partially-loaded')) {
return 'partially-loaded';
} else if (statuses.includes('loading')) {
if (statuses.includes('ready')) {
return 'partially-loaded';
}
return 'loading';... | 1 |
8fa11044e961f2d338542121c7d8fa38 | 235a5ad1dfb0c57f7a7d79d3aa50e0a0 | Returns a setting value. Tries the saved settings, then tries
the default settings. | if name in self.settings_dict:
return self.settings_dict[name]
if default is not None:
return default | 1 |
7de90ace42281ce164202738d61d6cd3 | 663800916e8459105decad98f3ba0680 | ===========================================================================
DESCRIPTION
This function starts the terminal response timer for the proactive command
that is just sent to the client
PARAMETERS
DEPENDENCIES
None
RETURN VALUE
None
COMMENTS
None
SIDE EFFECTS
None
SEE ALSO
None
================================... | {
#ifdef FEATURE_FACTORY_TESTMODE
if(ftm_mode == DMSS_MODE)
{
(void)rex_set_timer( temp_comp_timer_ptr, RF_CDMA_TEMP_START_TIME );
}
#else
(void)rex_set_timer( temp_comp_timer_ptr, RF_CDMA_TEMP_START_TIME );
#endif
} | 0 |
39be824473928974d11a0e28c113683b | 36e11bec221aa45f2c1e1a4aea93df5f | Static Constructor | class Cwwp_Init_Ajax
public function __construct() {
self::$instance = $this;
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.