query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
f1abe9dc9bcb68cadadc0f0ed4deccaa | fb95074a6eedc32dbcb551974c0e5bc6 | Methode zum Einlesen von Benutzereingaben, erweitert für die Bearbeitung von Werten (Setzen von bearbeitbaren Standardwerten),
die z.B. beim Editieren eines Gasts/Raums/... notwendig ist. | @SuppressWarnings("resource")
Scanner scanner = new Scanner(System.in);
String name, firstname, mat;
int stdgang;
while(true) {
try {
out.println();
do {
out.print("Nachname (\\p{Upper}\\p{Lower}*(['-]\\p{Upper})?\\p{Lower}): ");
name = scanner.next();
i... | 0 |
a3d563f1b4e95ee6efebaab49b97199b | 1c60da042637f85444cc4e74c4187636 | 通过页面名称获取页面类型 | if (TextUtils.isEmpty(url)) {
return null;
}
PageDYType[] pageDYTypes = PageDYType.values();
if (pageDYTypes == null) {
return null;
}
int size = pageDYTypes.length;
for (int i = 0; i < size; i++) {
PageDYType pageDYType = pageD... | 0 |
dc695021979ccf63d098e7fc8cba1ba9 | c75803488313d6989e5490b439f99c50 | Provides operations to call the completeMigration method. | return new MigrationConfiguration(
alterTableAddMultiple,
newAlterTableDropMultiple,
dropSchemaCascade,
dropTableCascade,
alterTableDropCascade,
createOrReplaceView,
respectColumnOrder
);
} | 0 |
e6944877d3a2c34830a5ae4ca1d834b3 | b02920d2857f0b926bbe3b4365242b6f | method for adding the 2 numbers entered by the user | String inputOne = inputFieldOne.getText();
String inputTwo = inputFieldTwo.getText();
int addedInput;
int testForNumberOne = testForBadInput(inputOne);
int testForNumberTwo = testForBadInput(inputTwo);
addedInput = testForNumberOne + testForNumberTwo;
if (addedInput != 0){
resultLabel.setText("... | 1 |
7f52a4070c506c097c8a1134529db067 | a45a73c1d2ca46ab2ddf2b82e9cd29fc | 用户是否同意权限 | public Boolean getAgree() {
return agree;
} | 1 |
a3af0c168c5ed3474453a9447e8e49fa | 034f3e0482b9a06389c09736337b34cc | Mostramos el formulario de edición de profesor | {
$modal = array(
'title' => 'Mensaje de confirmación',
'body' => '¿Está seguro de guardar el registro del profesor?'
);
return view('profesor.crear', compact('modal'));
} | 0 |
9eaacc5d3b4fcb49dcd776c2ee3c2402 | 2e16edf0bbf1da9ea232fb15dabbe32b | Get sample type given a sample index | if( (sType != null) && (sType.trim().length() > 0) ) {
for( int i = 0; i < SAMPLE_TYPES.length; i++ ) {
String st = sType.trim().toLowerCase();
if( st.indexOf(SAMPLE_TYPES[i]) >= 0 )
return SAMPLE_TYPES[i];
}
}
return SAMPLE_TYPES[0];
} | 0 |
636b4cf8a74efd7ad4af118e4fd658f2 | 24051c6b58e9fcda47de9962f1d75a88 | Find proveedores by id buzon. | {
include "mysql.php";
$sql = "SELECT * FROM proveidors WHERE id_client=$numClient;";
$result = $conn->query($sql);
$conn->close();
return $result;
} | 0 |
f4f2c7e2b78f691822939f2e207d33b1 | 77ea3725062921d619f0b16cdf7dff68 | Returns the meta object for the containment reference list '{@link vpml.organizationpackage.EMODiagram#getRoles <em>Roles</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getRoles(); | 1 |
09b792dd243b72bcaf14d9789108727a | 3806d8e18c0e8e1276b10dd82249d9b2 | sets Red, Green, Blue and Alpha values | m_fValue[0] = r;
m_fValue[1] = g;
m_fValue[2] = b;
m_fValue[3] = 1.0f;
} | 1 |
593c12c556d4c9a84a3d7f3eac8192c1 | b92ddb815cd1c4c06985abac5367c3f2 | Updates a version number in a version file. Also returns the new version | commit_type = get_commit_type(commit_message)
new_version_string = update_version_string(commit_type, old_version_string)
write_new_version(old_version_string, new_version_string)
return new_version_string | 1 |
fd65452d13da455d0c6f8c26174930bb | aff319a615f148ca4c1b0ea32c46e06a | 获取此控件的 IP 地址的文本形式。 | {
if (realAddress != null)
{
return realAddress;
}
else
{
return string.Empty;
}
} | 0 |
a3d518c4db9e1eb694b48e627d3fe075 | 15c798db47a9974df0945e488bcb427d | Устанавливает значение по умолчанию для input-поля | function clearInputDefault(selector,defaultValue)
{
selector.val(selector.val()===defaultValue? "": selector.val());
} | 0 |
fb14b85e39c20b832325ab3bf154595b | 8048784fa7c469c4e46e208b10fbb4cf | 获取未安装apk版本号 | var version: String? = null
try {
val pm = context.packageManager
val info = pm.getPackageArchiveInfo(apkPath, 0) ?: return null
version = info.versionName
} catch (e: Exception) {
}
return version
} | 1 |
781f61ef9e23b4e99a2b6e02e2e17d97 | 365479110cf5ca28281afd7db737be9c | Reset to the default inbox dir. | {
Outlook.MAPIFolder oFolder = Application.ActiveExplorer().CurrentFolder;
Application.ActiveExplorer().ClearSelection();
Application.ActiveExplorer().CurrentFolder = Application.Session.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderDrafts);
Application.Active... | 0 |
db874833721245dd18926256cc75f346 | 7a13373f9e20df71ee6b2b939d604c9e | Check wheter the given cloudwatch rule already exists in AWS account | def check_alb_exists(alb_name, access_key, secret_key, region):
return True if get_alb(alb_name, access_key, secret_key, region) else False | 0 |
e93044fa4bfe8e51d6126083b258461b | 196c305eef91ae9595103c07fead6a42 | forces update of the disabled attribute of my pager buttons | if(pageNoOfService <= 1){
jQuery("#previousPageButton").attr("disabled",true);
} else {
jQuery("#previousPageButton").attr("disabled",false);
}
if(pageNoOfService >= totalPageOfService){
jQuery("#nextPageButton").attr("disabled",true);
} else {
jQuery("#nextPageButton").attr("disabled",false);
}
} | 1 |
bce0c60aaddf9836a7b5fbd52fe635df | c61845e5587229266e848a9e6a358325 | If we pass a legitimate URL with a scheme not supported by requests,
we should fail. | def test_get_index_content_invalid_scheme(
caplog: pytest.LogCaptureFixture, url: str, vcs_scheme: str
) -> None:
with caplog.at_level(logging.WARNING):
page = _get_index_content(Link(url), session=mock.Mock(PipSession))
assert page is None
assert caplog.record_tuples == [
(
... | 1 |
70f5d14492bc6c53df3203775ece551a | 46f8c17e9a97d1f15c9e703a8065747c | Creates a mock Member. | from django.contrib.auth import get_user_model
from hackbureau.models import Member
user_model = get_user_model()
u = user_model.objects.create_user(USERNAME, settings.DEFAULT_FROM_EMAIL, PASSWORD)
u.save()
u2 = user_model.objects.create_user(USERNAME2, 'test@example.org', PASSWORD)
u2.save(... | 1 |
6096f2a93c8fb88998373fb9f96af180 | df66a8585a274606b831834f0a57e894 | Helper for getting all known MeemRegistries | public class Registry
public final Set<String> getForAlls() {
return myForAlls;
} | 0 |
6e755edd9f8775b098844a2fc816346a | e06b90e8d5d7abec39f4c6a99442d7e3 | 设置红绿灯的配置信息 | {
byte[] sendbuff = new byte[255];
int nsendbufflen = 255;
_LED_CONFIG_INFO ledConfig = new _LED_CONFIG_INFO();
ledConfig.disp_mode = (0x01 | 0x04 | 0x08 | 0x10);
if (!IsExitDevice) ledConfig.disp_mode |= 0x02;
if (IparkCore.PARKCAN_SET_LED... | 1 |
f72727c124d3f9f595d70ca227e5e93f | 962055b96a97815a64afa482d3500598 | Returns the product of three integers. | function sumAndProduct(x, y, z) {
} | 0 |
0834b87ed058c37aea3d0e72dd73e24a | 6889a7ab8410246f8d39e7ad83840357 | Convert the element to the appropriate storage form | class BaseRecord(ABC):
def _convert_element(self, value):
return getattr(value, "tolist", lambda: value)() | 1 |
dd118210ba5aa3476822e457e08c0afe | cb1c605e44939342214ac1290614e1b3 | Hack: set the More Data flag so we can detect injected frames (and so clients stay awake longer) | class MonitorSocket(L2Socket):
def send(self, p):
if self.detect_injected:
p.FCfield |= 0x20
L2Socket.send(self, RadioTap()/p) | 1 |
f0415017d50559b59ceb668c56110275 | 7c129eb4c16fb644b3717d7d5b08ee1f | Create the container for master tracks, which do not have an actor to attach to | function MasterTrack() {} | 1 |
f1e386711819a07065baf73a7d7bdab7 | 0a923b78f05508952a57592d67856fc1 | Gets the confidence for word recognization. | $stored = get_option( self::CONFIDENCE_NAMESPACE );
return ! empty( $stored ) ? $stored : self::$confidence;
} | 1 |
6c7e21c0e8168c89305e57915cf0b81c | 371090c68d64eb6513b10f693af2e477 | process pending DTMF events | namespace DotNetFreeSwitch.Handlers.inbound
public abstract class InboundSession : IInboundListener
public async Task StartDtmfAsync(bool eventLock)
{
await ExecuteAsync("start_dtmf",
eventLock);
} | 0 |
fb7af2d8cbdd89224098114c39da3a2f | 41d19fd8eec20e203840bfc3d94cb81a | # Adds annual data with interpolation. Interpolation can be modified with ... | yrs <- data$year[is.na(data[,x])==F]
if (custyr==T) {yrs=years}
fmla <- as.formula(paste0(x,"~ year"))
mod <- lm(fmla,data=data[data$year%in%yrs,])
print(summary(mod)$coefficients['year',4])
cf <- coef(mod)
yy=cf[1]+cf[2]*yrs
lines(yrs,yy,col="red",lty=lty)
} | 0 |
9e871e8dea8d501f12fe0bc5c5a544d4 | a7f52b7708f45c5c20fd4459bcf1c6c4 | 设置返回结果中包含的字段,多个字段之间用逗号隔开 | public class GetRequestBuilder extends ESHttpRequest<GetRequestBuilder,GetResponse>
public GetRequestBuilder setResultsSourceInclude(String... included) {
params.put("_source_include", StrUtils.join(included, ","));
return this;
} | 1 |
515a516489640d796740d9261eaf653f | ea4d39069daddd9f239502d1b031b004 | This method retrieves the math average | int avg = ((testScore1 + testScore2) / TWO);
return avg;
} | 1 |
03cf1db9cc7d468c36506e451e7ee3df | 7000addd39af1684657742875aa4bdc8 | Processa e escreve os grupos de decorators do formulario | {
$this->setDecorators(array(
'FormElements',
array('Form', array('class'=>'form'))));
$this->setElementDecorators(array(
array('ViewHelper'),
array('Description', array('tag' => 'p', 'class'=>'help-block')),
array('Errors', array('class'=>... | 1 |
3703b8e91fe7d86a66aa42462a7acec7 | e456877c73209f580736dc253d97f248 | Makes cube move left and right to test pause function | {
puzzle_solverIfaceInput_forward_mm(handle, 70);
puzzle_solverIfaceInput_break(handle, 255);
puzzle_solverIfaceInput_velocity(handle, 130, 130);
puzzle_solverIfaceInput_left_degrees(handle, 55);
handle->ifaceInput.left_sensed_line = bool_false;
puzzle_solverIfaceInput_left(handle);
} | 0 |
c594b1c5aaf3dfc695166e7dbb8ed2ab | 92bdf90c4484db9b0c4f83e2872704f1 | Ensures at least one node in the sections treeview control is checked. | {
if (_isTreeViewBusy) return;
_isTreeViewBusy = true;
try
{
CheckNodes(e.Node, e.Node.Checked);
}
finally
{
_isTreeViewBusy = false;
}
} | 0 |
2e658edd1e7c09cc22b40b055128830b | fbb4876b2ced4302dbb216940404e326 | カードを1枚引くメソッド | class Deck
def draw
@cards.shift
end | 1 |
76a34cce3fa66528080e0677df7fdbd8 | 42ffb2e846216d1c588e690e916eec4f | Setter for property idProfesor. | public abstract class BaseProfesseur implements Serializable
public void setIdUtilisateur (com.model.Utilisateur _idUtilisateur) {
this._idUtilisateur = _idUtilisateur;
} | 0 |
96c38295ef6171482c826ec25a1cc178 | 9ff9a6dcd9515bfcb6c311915ccefe3f | Set working distance to target working distance (in metres). | class Dexarm:
def set_workorigin1(self):
self._send_cmd1("G92 X0 Y300 Z0\r") | 0 |
c6e1a110f36eeb4731e17af421c28772 | e7b2056047165137c4ee2bbfda721716 | Equivalent of * operator | Vec3 operator * (const Vec3 &vec) const
{
return Vec3(
_00 * vec.x + _01 * vec.y + _02 * vec.z,
_10 * vec.x + _11 * vec.y + _12 * vec.z,
_20 * vec.x + _21 * vec.y + _22 * vec.z);
} | 1 |
5a0d6d777397ab89824698afd50e3b3e | 3096e6f28a2988d77fb0326aa591964a | Restarts the scrape every 6 hours | class ScrapeKeyword implements ShouldQueue
public function retryUntil()
{
return now()->addHours(2);
} | 0 |
771f6d33f19264cf7390e4a268a763d1 | 3144d511fa626bd8d3a6a36ccb1c54b9 | 获取线温2 | public class WireTemperatureSamplingAction extends BaseSamplingAction<WireTemperatureSampling>
public void setShowLineTemperature2(Boolean showLineTemperature2) {
this.showLineTemperature2 = showLineTemperature2;
} | 0 |
078b6764ae9d5c4371ff3416e79f55c8 | dafe4a0cb09fbcb945629504fca9e6eb | this returns an array of recipe card for the given recipe | {
$recipes = DB::table('recipes')
->join('meal','recipes.mealID','=','meal.id')
->where('recipes.id',$id)
->get(['recipes.*','meal.Name as MealTime']);
$recipes['Ingredients'] = DB::table('ingredients')
->where('RID',$id)
->get(['ingredients.id as ingredientID','ingredients.FID as... | 1 |
fb96cf85ebd401c9eefe10098b083a66 | f5eb4911572df060383ba59f8a932daf | 获取当月的最后一个交易日 | cursor=self.cursor
sql_max=f'select max("trade_date") from {self.Table_Name}'
cursor.execute(sql_max)
da=cursor.fetchall()
if da[0]!=(None,):
ds=datetime.datetime.strptime(str(da[0][0]),'%Y-%m-%d')+datetime.timedelta(days=1)
ddt=ds.strftime('%Y%m%d')
... | 0 |
5cadc2e2afa8907f8ad61b7cafa05742 | 6bb11995c1723b9106f75662ddaac98a | Get more memory from the system and put it on the heap | static Block* morecore(size_t nBlocks) {
void *memP;
Block *blockP;
if(__endHeap == 0) __endHeap = sbrk(0);
size_t nPages = (nBlocks*sizeof(Block) - 1)/getpagesize() + 1;
size_t nBytes = nPages * getpagesize();
memP = mmap(__endHeap, nBytes, PROT_READ | PROT_WRITE,
MAP_ANONYMOUS | MAP_SH... | 1 |
74ac95c1f1f6be263b9e87de23fc269a | cb0bef5923d555c41c875445985a26f2 | カーソル下の効果エディットをポップアップ表示させる | {
ListViewItem li = CreateEffectListItem(command);
effectListView.Items.Add(li);
int index = effectListView.Items.Count - 1;
effectListView.Items[index].Focused = true;
effectListView.Items[index].Selected = true;
effectListView.EnsureVisib... | 0 |
759d2494634cbd42400e0650355c5ef1 | 1fff17c000ad31cb4e4c2b2bacb46b1f | Lecture par identifiant de map | @Service
public class MapService
public ConcreteMap getMap(int id){
return mapRepository.getMap(id);
} | 1 |
09115db60469830c436da85835b0603e | 60181cc2af9ac2ed3ff673884a2235f7 | マネージャにストアしているシート名のリスト取得 | {
$sl = array();
foreach ( $this->sheet_list as $sheet )
{
$sl[] = $sheet->get_sheet_name();
}
return $sl;
} | 1 |
a17d6774bf2d4268149f0bfebdde0695 | 3b468e71f6df7afa30b27b0f85ef1a77 | Attempt to match the recognized word or phrase to the
keywords_to_command dictionary and return the appropriate
command | class CommandHandler:
def _get_commands_by_keywords(self) -> List[Command]:
commands = []
norm_list = MorphAnalyzer(logger=self.logger).analyze_list_normal_words(self._request.text)
self.logger.debug(f'norm_list: {norm_list}')
if norm_list:
commands = CommandRepository(self.d... | 0 |
31f6f9eea77ef43bae6ee289dc92e42c | f07cd76345aaed3d8921f8b39c635e3c | Testing if the vertices levels are in a topological ordering which rules out the possibility of creating a cycle. | {
queue<int> q;
int u;
for (int i=0; i< adj_list.size(); ++i)
{
if (indegree[i] == 0 )
{
q.push(i);
}
}
while (!q.empty())
{
u = q.front(); q.pop();
top_order.push_back(u);
removed[u] = true;
for (int k=0... | 1 |
09f1511225f86fbdd9d73b0a65003531 | 0fa38723b03fa431d2da3717ee347068 | Set (RS232) line characteristics.
and defaults to "off".
\retval 0: all fine
\retval -1: Setting line property failed | uint32_t ctrl, uint32_t val)
{
const struct uart_xec_device_config * const dev_cfg = dev->config;
struct uart_xec_dev_data *dev_data = dev->data;
struct uart_regs *regs = dev_cfg->regs;
uint32_t mdc, chg;
k_spinlock_key_t key;
switch (ctrl) {
case UART_LINE_CTRL_BAUD_RATE:
set_baud_rate(dev, val);
retu... | 1 |
5aba9ca96d804c48911788d36c96177f | ca70e4c6f638da432d2d4b504d555981 | Recursive condition validator | class Condition
public function isRecursive()
{
return ($this->_condition instanceof Condition);
} | 1 |
c5ba32bacbdbfa7dea3c357709984e56 | 177b9a8ad2d723f05cd78bf576c2d35d | Determines the specificity and coverage meta-data values. The specificity value is
calculated over the average of all annotations present in the study. The coverage
value is calculated taking into account all the annotated and non-annotated terms. | namespace Phanerozoic.Core.Services.Interfaces
string Collect(RepositoryCoverageEntity coverageEntity, IList<CoverageEntity> methodList); | 0 |
e64cecc50f7bda82c573da8b33f1ea7a | 2e7ebeba7ce4838dabed6fde8133a739 | Establece si se puede atravesar. | class Room(MazeObject):
def can_pass(self):
return True | 1 |
51260c06fbe8341d3dc5c2ee3daeaa64 | 9e66c435e295026d03945c4d1ea67f31 | Returns the value of the '<em><b>Current Status</b></em>' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc -->
<!-- begin-model-doc -->
Moved, Living, Investment, Deceased, etc..
<!-- end-model-doc -->
extendedMetaData="kind='attribute' name='CurrentStatus'" | Status currentStatus(); | 1 |
af55afe42e5e33ac3c3906642b9c12ff | 933dc7e2e26bb94d7fda8a21bfbad3db | Adds the process instance id, which may be necessary when interacting
with deployments that employ the {@link RuntimeStrategy#PER_PROCESS_INSTANCE}. | HistoricProcessInstanceQuery deploymentId(String deploymentId); | 0 |
46c94fbcc024ab552d570aa630dce1e6 | c38fee6a5a8b5a437cebf5d3de0a48ba | Gets as listingType
Specifies the listing type of items in the returned list. | export class ListingDescriptor
public getListingType() : string {
return 'Listing';
} | 1 |
5c7362edf0d5fedddbc2d35177639e29 | a1afec4e6b02dd44e84dd723668c864a | read n lines of file | read_lines (char *infile, char ***lines)
{
FILE *infp;
int lines_read = 0;
int lines_size = 1024;
char *line = NULL;
ssize_t read;
size_t len = 0;
*lines = malloc(lines_size * sizeof(char *));
if (*lines == NULL)
return -1;
infp = fopen(infile, "r");
if (infp == NULL)
return -1;
while ((re... | 0 |
04343e8341452193b15b291ad472da03 | c6cc9fb8fb3985a54905da8d2f3001dc | 将权重吧百分比数值转换成小数 | if (typeof percent == 'undefined' || percent == '') {
percent = '0%'
}
var str = percent.replace("%", "")
return str / 100
} | 1 |
f1c97447118d1d593184905cce4dd462 | a9f00c6645cd52bf0ab072450676f824 | 会员用户名重复性检测 | $u_name = $request->only('u_name');
$reuser = $this->userModel->where('u_name',$u_name)->first();
if($reuser) {
return '1';
}
} | 1 |
d977e3b6b53addc5f0cab007ae27d2e6 | 23b6e03df7e1c68cc767c608a43913bd | 获取某一天的开始时间 XXXX-XX-XX 00:00:00 | SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd");
Calendar calendar = Calendar.getInstance();
GregorianCalendar gcLast = (GregorianCalendar) Calendar.getInstance();
gcLast.setTime(date);
gcLast.set(Calendar.DAY_OF_YEAR, 1);
String day_first = df.format(gcLast.getT... | 1 |
ec754fee0bf454ca5a5a5cc572a87d07 | dfa9e01df05ae25f245d66bd99c5447d | test 1D-factor properties | BOOST_AUTO_TEST_CASE(DFGNode_1)
{
unsigned dim = 4;
DFGNode varNode(dim);
BOOST_CHECK( varNode.getDimension() == dim );
BOOST_CHECK( varNode.isFactor() == false );
BOOST_CHECK( varNode.getPotential().size1() == 0);
BOOST_CHECK( varNode.getPotential().size2() == 0);
} | 0 |
c81fe3babb41657443774516348c08fa | b8ebfedc064143cd1dea9e49e694c5b2 | function for checking if enough furniture inside the room | def check_for_space(booking_size, total_empties):
if booking_size <= total_empties:
return True
return False | 0 |
bfbc8ba3627402a8d36e0b73c65cd4b0 | 726a77fdf3a5bb5f34da2909b8af2812 | This the "header length", which is everything up to the
start of the records: header, fields descriptor array, terminator. | public class RecordHeader implements RecordFields, Serializable{
public int getRecordHeaderLength() {
return RECORD_HEADER_LEN;
} | 1 |
bd5c2ea6311790b466a0239521cd9d1f | 8709bdf80b078e0433ac0fa96d1b5904 | When the service is done, this method is called to commit the update dates to the shared preferences | String notificationsGsonString = new Gson().toJson(updatedNotifications);
SharedPreferences.Editor preferencesEditor = preferences.edit();
preferencesEditor.putString(getString(R.string.preference_notifications), notificationsGsonString);
preferencesEditor.apply();
AlarmManager.s... | 1 |
022d8faa425b92c2d9a397b9d49d24b6 | fd2ce517f97bcd0c53a7852bf139efd7 | takes a number and returns the given array value | int retNum = 0;
retNum = theNumberArray[place];
return retNum;
} | 1 |
a545900804d49527c6f8d2b063d82e2a | 5562dafe373f546d08734806ee63ef20 | checks the validity of input of strings on tab 2 | {
if (input.length() > 2)
{
return false;
}
else
return true;
} | 0 |
0a1c482bccb3ce82b5f94841b756c63a | 4415cd84ae15bd4842c9f1d1dc93c0da | 设置一个锁,在多少时间内不能发送此封包 | class HandSpeedService extends BaseService
public function setLock(){
return $this->redis->set($this->_lock , 1 , 3);
} | 1 |
52ea589b6a66a10fe41ad914211724ef | ac5934456e5a50ed2b2a13665ffbdc2e | determine the inc value to get to next instruction | int PID_GetIncCalc(PID_Hanlder_T *pid, int currentValue)
{
int incError, incVal;
incError = pid->TargetValue - currentValue;
if (incError > pid->LimitError)
{
incError = pid->LimitError;
}
if (incError < -pid->LimitError)
{
incError = -pid->LimitError;
}
incVal = pid->kP * i... | 1 |
24ad0d0686a101fc6fdee1e406b93327 | 8d5312786ad25aa422b50ce459c9378d | Returns True if the 'OK' button was clicked | class gameInfo():
def was_ok_clicked(self) -> bool:
return self._ok_clicked | 1 |
bc8eb244cb107dbde25278b86d97e9db | 2f948f889c6d594cd5409578d95a6ba0 | This code starts up the React app when it runs in a browser. It sets up the routing configuration
and injects the app into a DOM element. | const store = createStore(reducers)
const html = renderToString(
<Provider store={store}>
<App />
</Provider>
)
const finalState = store.getState()
res.send(renderFullPage(html, finalState))
} | 0 |
afe301073b7d6a0dd344eebfef4d8916 | d812f0c93797f6fa83724f8226215bbd | 是否开启JSONP | class httpProxyClass
public function global__enableJsonP() {
$this->enableJsonP = true;
} | 1 |
efc31aba0416c497097b3fff00e4aa9c | 2c735e695ec3d4ae0fdf964278d302b1 | Crea una nueva estructura para modelar los libros de un autor y su promedio de ratings | Serie::Serie(string nombre, string genero) : nombre(new string(nombre)), genero(new string(genero))
{
ratingTotal = 0.0;
} | 0 |
d206b1e1875a2169df1826607788ecee | 1d10d37b22a69bc6037aeaf4408e4cea | For handling notification callbacks from ActionScript. | class BroadcastStore extends Store
handleSwfLoad(ident, obj) {
thinflash.api.onSwfLoaded(obj);
} | 1 |
558645b5b926a8b56d972ca0cfd10c09 | 9bd69d9f2421eb9cd4bf3f566d30e5cb | Sets the error type returned by Paystack. | void setErrorType(byte value); | 1 |
fb066d3d4b17cc94b6f81101d5d4394f | d82c7f262665b1069e9869a41d59e038 | Getter of the the stereo SID model. | class Calculator
public function SDNN() {
return $this->SDNN;
} | 0 |
667ff7ae449b44ba9b63c0f55a94683c | aac7d3c28877dac18a6c3bb88964b990 | 删除备份
删除单个备份。
Please refer to HUAWEI cloud API Explorer for details. | export class CbrClient
public deleteBackup(deleteBackupRequest?: DeleteBackupRequest): Promise<DeleteBackupResponse> {
const options = ParamCreater().deleteBackup(deleteBackupRequest);
options['responseHeaders'] = [''];
return this.hcClient.sendRequest(options);
} | 1 |
92ae5a7a9dc8b84d4dd64e8b2dfdf115 | 1561f4be2aa83049a84e30149bd6219d | Check if conda is found on path. | class CondaAPI:
def conda_executable_path():
conda_path = distutils.spawn.find_executable("conda")
if not conda_path:
suggestion = "Please install conda and make sure it is added to your PATH."
raise KoniError("No conda installation found.", suggestion=suggestion)
return ... | 1 |
e8754443db4455fff1a48de8c16498c0 | fa5805e04b9f420013abf250bb3d32eb | Gets as grossWeightMeasure
BBIE
Shipment. Gross_ Weight. Measure
The total gross weight of a shipment; the weight of the goods plus packaging plus transport equipment.
0..1
Shipment
Gross
Weight
Measure
Measure. Type | class GoodsItemType
public function getNetWeightMeasure()
{
return $this->netWeightMeasure;
} | 0 |
eebb750fca84f58ba7821f4917f758dc | 806b7a5c944dfced54d20879751ac838 | 从JSON文件导入权限菜单测试 | Token token = new Token();
String tAccess_Token = token.geToken().getToken();
String tMenuJSON = JSONObject.toJSONString(getMenu());
String result = createMenubyHttps(tAccess_Token, tMenuJSON);
System.out.println(result);
return true;
} | 0 |
c511050671acc5dad55bfc1f7aae0a7e | ec95cd3f8e3fd4abeb6d6e83666ddfe6 | Get array of handles positions | class PanelHandler{
public function returnPositions(){
return $this->positions;
} | 1 |
31dbf22e09fb5799b2f52efdcde44e11 | 6efa2fbe6d1fc9fd423bb1bf76eb9583 | Converts the value from <c>Int16</c> to an equivalent <c>Byte[]</c> value. | namespace S7.Net.Types
public static class Int
public static byte[] ToByteArray(Int16[] value)
{
byte[] bytes = new byte[value.Length * 2];
int bytesPos = 0;
for(int i=0; i< value.Length; i++)
{
bytes[bytesPos++] = (byte)((value[i] >> 8) & 0xFF... | 1 |
9762b3449849943361bf0985532037e9 | 50b98f6fdb94bd76528cbc3de3e42973 | 한번도 선택하지 않은 유저 정보 가져와라 | public class AccountFragment extends Fragment
void getMatchedMember()
{
mMemberArrayList = new ArrayList<>();
mMatchedArrayList = new ArrayList<>();
myInterestArray = new ArrayList<>();
for (DataSnapshot child : mSnapMemberInfo.getChildren()) {
UserModel userMode... | 0 |
d5b4be85c58f7d0a3165350c98319d7e | fba9ba502d2d94eeae0c51ee290c104a | Метод вращения Якоби для нахождения
собственных значений матрицы и
собственных векторов с заданной точностью | List<Eigenvalue> eigenvalues = new ArrayList<>();
float[][] ev_matrix = new float[matrix.length][matrix[0].length];
for (int i = 0; i < ev_matrix.length; i++) {
for (int j = 0; j < ev_matrix[0].length; j++) {
ev_matrix[i][j] = (i == j) ? 1 : 0;
}
}
while (endCondition(matrix) > EPSiLON) {
float[]... | 1 |
ae4ce203375ea771ddabc1197ddc7fdc | e4bedcb116cfe81b7ab16f6b9a9a36aa | @brief Get status of all touch sensors via direct port read/write operations
This is a very fast AT90USB128x-specific pin polling routine. It's so fast
that I actually had to add manual delays after setting each pin low in order
for the logic to take effect when reading the connected pin states on the
following line of... | void GetKeyStatus(WORD *uiStatus)
{
BYTE idx, bitN, i;
*uiStatus = 0;
ENE358x_I2C_ReadByte(0xA1, &pData[0]);
ENE358x_I2C_ReadByte(0xA2, &pData[1]);
for (i=0; i < KEYNUMBER ; i++)
{
idx = ((sb358x_TouchKeyMapping[i] & 0x0F)>>3);
bitN = (0x01 << (sb358x_TouchKeyMapping[i]... | 0 |
c5c30602ff0948f7ad85b89be3d6c3c9 | 1085713cd2c0e1a570f6c4cd9a09cf0c | Joint minimum rotation angle. | a = pose_error[0, 0]
b = pose_error[1, 1]
c = pose_error[2, 2]
d = 0.5*(a+b+c-1.0)
rot_error = np.arccos(max(min(d, 1.0), -1.0))
return rot_error | 1 |
19ae7f82a6657c3e2c48987521d3b157 | d7ef38f285f5349552d2ad7e044b84c2 | Get UY_AsignaTransporteHdr_ID | public class X_UY_AllocDirectPayment extends PO implements I_UY_AllocDirectPayment, I_Persistent
public int getUY_AllocDirectPayment_ID ()
{
Integer ii = (Integer)get_Value(COLUMNNAME_UY_AllocDirectPayment_ID);
if (ii == null)
return 0;
return ii.intValue();
} | 0 |
3c2c9c5c6668fa5f33e8cef90b43f34e | fff1c8db9bcb78469cefb5a0c05bf0ac | D.walkfiles() -> iterator over files in D, recursively.
The optional argument `pattern` limits the results to files
with names that match the pattern. For example,
``mydir.walkfiles('*.tmp')`` yields only files with the ``.tmp``
extension. | class path(_base):
def walk(self, pattern=None):
for child in self.listdir():
if pattern is None or child.fnmatch(pattern):
yield child
if child.isdir():
for item in child.walk(pattern):
yield item | 1 |
7b6900ebf763997582ab290d6ec59f81 | 2eabdd4f62afd283ec15e6de03f716fb | Vrsi pomeranje lopte. Ispituje poziciji lopte. | public class Snake
public void move() {
if (this.jePohybujuci && !this.koniecHry) {
this.hlava = this.castiTela.get(0);
if (this.hlava.getX() == 880 && this.smerX == 1 && this.smerY == 0) {
this.hlava.setX(-20);
} else if (this.hlava.getX() == 0 && this.smerX ... | 0 |
44c0fab9c405f268beedae8f11c6486a | fccbee50241782262ab52d189d467889 | Vrátí pole cest k obrázkům pro uložení do databáze | namespace Tripous internal class IconsHelper
public string[] GetImageResourcePaths()
{
List<string> List = new List<string>();
foreach (var Item in Names)
List.Add(Item.Value);
return List.ToArray();
} | 1 |
eed0e4c230c812cf59638ac00dc82d38 | 78a6116935a867ecdc6ef272a661c550 | Create an instance of {@link DeleteCredentialResponse } | @XmlRegistry
public class ObjectFactory
public DeleteTheCertificateDictionaryResponse createDeleteTheCertificateDictionaryResponse() {
return new DeleteTheCertificateDictionaryResponse();
} | 0 |
668d3fc25fa1aac000d6db38fa0c91b9 | b7cead3546081299b9f81b446215a1c8 | Get generated xls as specified type | class ExportPHPExcel
public function genworkbook()
{
switch ($this->_format) {
case 'excel5':
header('Content-Type: application/vnd.ms-excel');
header('Content-Disposition: attachment; filename="'.$this->_filename.'.xls"');
$writer = $this->genExcel();
break;
case 'pdf':
... | 1 |
24dfb62d3cdbf631c715ffbecc7fafb9 | 70ef43cd5bbcef6103a3067117574586 | Creates a pending activity from current to the given activity. | ProcessInstanceEntity processInstance,
ActivityInstanceEntity fromActivityInstance,
string transitionGUID,
TransitionTypeEnum transitionType,
TransitionFlyingTypeEnum flyingType,
ActivityResource activityResource,
IDbSession session)
... | 1 |
586d9551bf1ca38c06a0db7f1c2c6d1a | 9b72613a388ec9f4818d7629f3c95b06 | Will move the unit around to let it idle and potentially unblock a path. | if not SkillAPI.CanBeForcedMove(unit) then
return
end
dir = unit:GetPosition() - target:GetPosition();
dir.y = 0
dir = dir.normalized;
local destination = unit:GetPosition() + dir * distance
destination = unit:GetCombatScene():GetNearestPolyOfPoint(destination)
distance = Vector3.Distance2D(desti... | 0 |
eceec4cacc01516d6e9f295af922e464 | c63d648306b5cd0cd32d2e47f21f12d3 | 单条新增角色APP权限 | function appAddRole (params) {
const url = urls.appAddRole
return vue.axios.post(url, {
reqdata: params
}).then((res) => {
return Promise.resolve(res.data)
})
} | 1 |
7b8ea484194f93b241c35e042474b768 | 470b2236d3b9c4a308d17bfa2fb1309c | Найти список работников по офису и фильтрам | List<User> getUserByFilter(Long officeId, String firstName, String secondName, String middleName, String position, String docCode, String citizenshipCode); | 1 |
fdbbe11454f91604b9c3ec5a5d14bf6c | ec39b0ddeffee7599dac36c3241f607a | getProductLineIDs creates a list of product line IDs | sql1 = "SELECT DISTINCT Line_ID FROM JPID_LineID_Start_End ORDER BY Line_ID + 0 DESC;"
rows = self.__conn.execute(sql1).fetchall()
self.disconnect()
return jsonify(lineids=[dict(row.items()) for row in rows]) | 1 |
ab71249acd74b94984352fece2ebc361 | 985d6c9ae3a4cfb9e5da3540a8889eb7 | Test case for editDocumentDocxCreateBlankDocument
Create a blank Word DOCX document. | public class EditDocumentApi
public ApiResponse<CreateBlankDocxResponse> editDocumentDocxCreateBlankDocumentWithHttpInfo(CreateBlankDocxRequest input) throws ApiException {
com.squareup.okhttp.Call call = editDocumentDocxCreateBlankDocumentValidateBeforeCall(input, null, null);
Type localVarReturnType =... | 1 |
a8ca6a8af1c8a1b7dd90a414b0da06ef | 5485711dcf2c7d3d56ed961b962142f6 | Metodo que busca los dias que pertenecen a un plan semanal | namespace GyCAP.BLL
public class DiasPlanSemanalBLL
public static void obtenerDias(DataTable dtDiasPS, int codigoPS)
{
DAL.DiasPlanSemanalDAL.ObtenerPS(dtDiasPS, codigoPS);
} | 1 |
44f74f1d8b1557a5425a05cb0ab8e6bc | 600cb4cf7f9814208e1076263dfb008e | Updates attributes and classes of all legend subsets to be deselected | public class LegendPanel extends JPanel
public void clearSelection() {
for (LegendItem item : legendItems) {
item.getState().setSelected(false);
item.getState().setHasFocus(false);
}
this.repaint();
} | 1 |
8e8dd1260684ad7cf5b23f15e372ac9d | b1b32c4abf1c714eeab1918085646529 | Gets the window handle for the shell window | namespace EyeGuard.BLL
public class APIWrapper
[DllImport("user32.dll")]
public static extern IntPtr GetShellWindow(); | 1 |
cb77831454f2faed5ad6923da76291a3 | cf8cf31f7226eabc657fe861b540f5b5 | Register a python function to be used for notification that the
transfer is ready, etc. | class TransferCoordinator(object):
def add_done_callback(self, function, *args, **kwargs):
with self._done_callbacks_lock:
self._done_callbacks.append(
FunctionContainer(function, *args, **kwargs)
) | 1 |
579750c96dfe0528d38186f5f62dbdd5 | 100af8e2bc1f927b6147a48afd3d334b | Set the mapping dictionary for homonym orthologs, making use of
it in subsequent calls to evaluate(). | self._HomologSet = HomologSet
self.Write = Write(self)
self.Read = Read(self)
self._alignments = {"latest": alignment} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.