query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8cd935282f7ae902fd7b75b20e402f5c | 2d1638d083518a54075f6f26876137ba | Принимает произвольно целое число и возвращает сумму всех его цифр | public class HomeTask1
public static long calculateSum(long number) {
long numberLocal = Math.abs(number);
long sum = 0;
while (numberLocal > 0) {
sum += numberLocal % 10;
numberLocal /= 10;
}
return (sum);
} | 1 |
a4ef4b325094675ce8704c939e272bdc | 07f4fb00ff93b1cf4d50dbcd42c972dc | Obtiene los empleados por el país de la oficina a la que están asociados | namespace EmployeeRegistration.Domain.Contracts.Services
IEnumerable<EmployeeViewModel> GetEmployeesByPosition(int id); | 0 |
fc6ee4f75f10e4c6be4fcf7069b883e5 | 934f7a77479e30d3b884c0e8b6ba6112 | Return list of graph names. | public class ISGCIGraphCanvas extends
GraphCanvas<Set<GraphClass>, DefaultEdge>
public List<String> getNames() {
List<String> result = new ArrayList<String>();
for (GraphView<Set<GraphClass>,DefaultEdge> gv : graphs) {
for (NodeView<Set<GraphClass>,DefaultEdge> nv : gv.getNodeViews()... | 0 |
921287af2f72ed6628fb5898428e5a1a | 844d4da572e55a2a31d9ef212073a682 | puts all of the text file lines into a LinkedList | try {
BufferedReader reader = new BufferedReader(new FileReader(inputFile));
while (reader.ready()) {
parseLineAndAddToMap(reader.readLine());
}
} catch (IOException e) {
System.out.println("Unfortunately some bad stuff happened");
... | 0 |
c046137e4922a5fbf257cfad1c4403a0 | 62fb45c59528c5ad0174952a53637bc9 | Funkcja zwracająca cenę minimalną | class AbsTarif extends \Abi\RoutineBundle\Entity\AbsTarif implements \Doctrine\ORM\Proxy\Proxy
public function getTarifMin()
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getTarifMin', array());
return parent::getTarifMin();
} | 1 |
0f6b0cde7e23b78ef1c15338c8c5074e | c8a1f50199a04e83fe32c4266bbfd969 | @brief Método para recargar los argumentos del componente.
@param args Argumentos que tendrá el componente. | function BaseUI:ResetArgs( ... )
self.args = nil;
self.args = {...};
end | 1 |
539561b1ffbf5d141a9413b21143fe08 | 475b4832f70fef212fb55fe786ea65e9 | Performs invoice line specific validations for the transaction. | {
var webValidationErrors = new List<WebValidationError>();
var samplingFormCGuid = samplingFormCId.ToGuid();
var samplingFromC = SamplingFormCRepository.Single(sfc => sfc.Id == samplingFormCGuid);
var validationErrorsInDb = ValidationErrorManager.GetValidationErrors(samplingFormCId);
... | 1 |
3ca8beb509e72a131a1c7010e7b31e6a | 75017e699fad791fccde91951a5002b9 | Unpack dictionary of lists of numbers into dictionary of numbers.
Ex: turn {'a': [0, 1], 'b':[2, 3]} into [{'a': 0, 'b': 2}, {'a': 1, 'b': 3}] | def zipdict(dct):
dlen = len(dct[list(dct.keys())[0]])
return [{k: dct[k][i] for k in dct.keys()} for i in range(dlen)] | 1 |
e7d63a7f160f22771ca34b37d5642491 | ed14e22c3809d4a97158f8a04783ae1c | Generate random parameter logs. | parameter_list = []
for key, value in self.parameterlist.items():
if isinstance(value, tuple):
if len(value) == 3:
parameter_list.append({key:random.randrange(value[0], value[1], value[2])})
elif len(value) == 2:
paramet... | 1 |
69c2844663f671698154a8bbf6048e3b | 9ef45c8fd8539722e3dfa63e9b16ae79 | returns the current brightness based on the actual value of the first strip | int brightness = Constants.INVALID_VALUE;
Context context = com.batterymentor.settings.Settings.getInstance().getContext();
if (context != null) {
try {
brightness = Settings.System.getInt(context.getContentResolver(), Settings.System.SCREEN_BRIGHTNESS);
}... | 0 |
ec049791a512164f39740afce7588939 | 3bf8f9bc0829267b865426ef5f651066 | <para>Saves the given LexisNexis item to the database.</para> | namespace LNF.DataAccess
void SaveOrUpdate(IDataItem item); | 1 |
5ed96b231af20ea8adaa79bb04579dc6 | ab89095fe4cea1422db244dc57f3befa | function that display goals that scored for team b | public class MainActivity extends AppCompatActivity
public void displayGoalsForTeamA(int score) {
TextView scoreView = (TextView) findViewById(R.id.team_a_goals);
scoreView.setText(String.valueOf(score));
} | 0 |
92341adbeed6c7b30b3f9dde5c31d827 | 0c64f1c26dd6e3404a0ef1cf315ee46a | Choose random variable from constraint. | min = 10000000000
return_v = None
for v in range(len(self.vars)):
if v not in assignments:
if self.checking:
count = len(self.checking[v])
if count<=min:
min = count
return_v = v
... | 0 |
3fbb36f2153a58041d602786c773639c | c3f953fd2dfb511f1f12fc6221320da5 | 跳转到添加电影管理 | @Controller
@RequestMapping("/manager")
public class ManageController
@GetMapping("/add")
String add(){
return "/manager/add";
} | 1 |
64f905fd58e82de7710cfe19cd8d7ee7 | cd9d01dd066e83cc9da0a00416cdf97a | Sends notification email upon denial of a license request. | {
outputContent = string.Empty;
var reseller = _resellerService.GetResellerById(resellerId);
if (reseller == null) return false;
var token = EmailSecurityHelper.GenerateEncryptedToken(reseller);
if (resellerId == _localResellerId)
{
... | 1 |
9b9cd6cef3c065c52e78ff941db5bf48 | 3f0e9366c1b9680c0ff843716b6ba7f7 | calculate what needs to happen to correct for disturbance on each axis | class Simulator(object):
def start(self):
while True:
self.plane.angle = self.plane.angle - self.plane.adjust() + self.plane.std_error(0,1)
print("Current angle: " + str(self.plane.angle))
print("Applied correction: " + str(self.plane.adjust()))
time.sleep(1) | 0 |
a6bece92dbdcc92e3fd9f53af3eb75d1 | 55e50430b2608fa41026d87b83438356 | Getter for <code>NBC_PATIENTS_LONG_LST.CASE_HISTORY_NUM</code>. | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.8.0"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class NbcPatientsLongLstRecord extends TableRecordImpl<NbcPatientsLongLstRecord> implements Record16<Long, Long, Lo... | 1 |
57799d622e7c2b878db627e29b488d36 | fe852e205e3e90b74971469ed233579e | Calculates the offset and the size of gems to fit the screen properly | {
float scaleG = graphics.Y / graphics.X;
float scaleS = screen.Y / screen.X;
offset = new VECTOR2();
if (scaleG > scaleS)
{
scale = screen.Y / graphics.Y;
offset.X = (screen.X - ((graphics.X / graphics.Y) / (screen.X / screen.Y)) * screen.X) / 2f;
}
else
{
scale = screen.X / grap... | 1 |
dc981e1c530925d59043aa364689638c | 182b3397c97781e0950976e8f217a01b | Returns the value of the '<em><b>Max Battery Capacity</b></em>' attribute.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Max Battery Capacity</em>' attribute isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | double getMaxBPS(); | 0 |
051f00ea64453f4d7bead5ccd41cdf5b | 408f97822717865a31d9fd39cb3e8b57 | 获取怪物的金钱(前后缀加成后) | {
$money = 0;
if (!empty($data['ShunMen_equal']))
{
$money = $money + $data['ShunMen_equal'];
}
if (!empty($data['ShunMen_Super_Double']))
{
$money = $money + $data['ShunMen_Super_Double'] * 10;
}
if (!empty($data['TianMen_equal... | 1 |
b2fd6881ec09bd5d78eb39cd60b78553 | fc2825deb0982e933171c16ddf0683c6 | 读dmc2210的输入IO | di = bin(dic['digital_ioInput'][1][0])[2:].zfill(64)
do = bin(dic['digital_ioOutput'][1][0])[2:].zfill(64)
d_input = [self.LB_DI04,self.LB_DI05,self.LB_DI06,self.LB_DI07,
self.LB_DI08,self.LB_DI09,self.LB_DI10,self.LB_DI11,
self.LB_DI12,self.LB_DI13,self.LB_... | 1 |
f8c9531efb77d77968d214c3c0c1d80c | 1240c06ad9c9dd10b505607bc08dd37c | 查询城市主图片 | List<ImageUrl> getCityImageUrl(String cityname, HttpServletRequest request); | 1 |
efd61893a203a39778fe0cac03b75978 | ed68639f320093f97296dc7ed854dc67 | Creates a new api client instance | export default class DefaultApi
constructor(apiClient) {
this.apiClient = apiClient || ApiClient.instance;
} | 0 |
8567718e4c0115c99e0e341ea55f2a73 | 75de8219ab128fccd4ad5ec1fa6c1629 | Returns the URL to the Zendesk user profile given the user ID. | public function getProfileUrl($email, $secure = null); | 0 |
e786993fb30e9e18f025ce14877a0b8e | 22bbe29693814d72af73830118b799d4 | Return a list of community objects given list of uuids | class DAPPr(object):
def get_communities(self):
endpoint = "/RESTapi/communities"
response = self._get(endpoint)
return response.json() | 0 |
2ff7c718306e49a849ddeb206b01da12 | 663c999a9289b1483d615197e939989a | Gets the popup height. | public class Pop_Up extends CenterPopupView
protected int getPopupHeight() {
return 0;
} | 1 |
dd1289d5c07c9dea82b393e236fd3e7a | d7414d44e21df9cb5fedeb045720ca06 | Obtem o valor de uma variavel temporaria, removendo-a em seguida | class jPhpjs
private function T_VARIABLE($value) {
return str_replace('$', '', $value);
} | 0 |
a578f0991fe20066121df1fefe3caf88 | 6289d47425ad986754be8bbe437e8db2 | Set the backlight colour of all the buttons.
The colour is set as an RGB model, with each component having a range from 0 to 255 | for (int i = 0; i < m_ledBuffer.getLength(); i++) {
m_ledBuffer.setRGB(i, colorVals[0], colorVals[1], colorVals[2]);
}
m_adressableLed.setData(m_ledBuffer);
} | 1 |
ccc6df0bf332bedca3b01be80437462b | f7ecd72b23d39b7b905ceb4132bdbea8 | @brief This API is used to set the bandwidth of gyro from
the register 0x42 bit 4 to 5 | asm330lhh_bdr_gy_t val)
{
asm330lhh_fifo_ctrl3_t fifo_ctrl3;
int32_t ret;
ret = asm330lhh_read_reg(ctx, ASM330LHH_FIFO_CTRL3,
(uint8_t *)&fifo_ctrl3, 1);
if (ret == 0)
{
fifo_ctrl3.bdr_gy = (uint8_t)val;
ret = asm330lhh_write_reg(ctx, ASM3... | 1 |
7a842338d5d3ba87ce80c56fc87c7b03 | 2702806808dea5997f098eea8e8e16a0 | Преподаватели в классе. | class ScheduleLessons extends \yii\db\ActiveRecord
public function getTeachers()
{
return $this->hasMany(Teacher::className(), ['id' => 'teacher_id'])->viaTable('schedule_lessons_teacher', ['schedule_lessons_id' => 'id']);
} | 1 |
97a9af8463f87f226804cfe726476ba4 | 035a54883c0ce23f919cf204f640807e | JNITCMSCNT을 수정한다. | @Service("jnitcmshistService")
public class JnitcmshistServiceImpl extends EgovAbstractServiceImpl implements
JnitcmshistService
public void updateJnitcmshist(JnitcmshistVO vo) throws Exception {
jnitcmshistDAO.updateJnitcmshist(vo);
} | 0 |
db0be89459e8d8eed26a9088e146cd93 | 68ad2b1021b47726123ccb69ccf462fc | Wyrzucenie najgorszego osobnika z populacji | class GeneticAlgorythm:
def best_from_population(self, population):
population_loss = [self.fitness(x, self.target) for x in population]
best_index = population_loss.index(min(population_loss))
return (population[best_index], population_loss[best_index]) | 0 |
709cfb621b7c5abf0958126a58720f63 | 309790ffb7efa1d214639b749a3ca8e2 | Apaga la recepcion RF y modulos asociados | static void rf_off(void)
{
if(rf_flags_check(RFF_ON))
{
rf_if_lock();
rf_cca_abort();
uint16_t while_counter = 0;
while(rf_if_read_trx_state() == BUSY_RX_AACK)
{
while_counter++;
if(while_counter == 0xffff)
break;
}
... | 1 |
cf5a9faa7c60029417d22cf63afc83a3 | 272aa6f2d3825f983aabe49299fdb619 | Apply the organizations accesses to all users. | class ResetPermissionsBehavior extends Behavior
public function run(): void
{
(new Access(['userId' => $this->owner->id]))->resetPermissions($this->getCompanies());
} | 0 |
f8739093e3e778e69d56b4ea97ef6f25 | 67f85054180563442bdd6fd99cf3016d | Begin a query for the TableDataStore. This method may
be called again later to requery. | public class AgoBusinessObjectEvent extends EventObject implements TableDataStoreUser
public void tableDataStoreQuery(String queryString, String orderby) throws
AgoSecurityException,
AgoTransientSystemException,
AgoUnrecoverableSystemException
{
} | 1 |
784fe7712f129cc0c31d4f39a66d806d | a917bd36959b4e3a5341bb8ea121633a | Setzt das Property process auf den übergebenen Wert <code>process</code>. | void setProcess(IProcess process); | 1 |
0fcd4459e441ed18721c70d7095680e2 | b3ff4a9604b33fe4822007cf6f29fdd1 | Test a parallel optimization: All inputs are a list of the same length. | TEST_F(GraphOptz, ParallelizeGraph_Convolution_Model_Axis3) {
auto *input1 = mod_.createPlaceholder(ElemKind::Int8QTy, {3, 5, 5, 8}, 1.0, 0,
"input1", false);
bindings_.allocate(input1)->getHandle<int8_t>().randomize(-4, 4,
... | 0 |
4e4efb2dc386cac5a6a0abc2a3a28232 | b91a64260212fed17d88c186da4f1ecb | Calculate stress tensor component xx | => (stresses[0] * stresses[1] * stresses[2]) + (2 * stresses[5] * stresses[3] * stresses[4])
- (Math.Pow(stresses[5], 2) * stresses[2]) -(Math.Pow(stresses[3], 2) * stresses[0])
- (Math.Pow(stresses[4], 2) * stresses[1]); | 0 |
b07be79d1655bf16343ae24c24882af5 | 7e042b2799ed833fe92f71849876d97d | Swap controls by fading out the original and fading in the new control.. | {
StartCoroutine(FadeOut());
while (isFading)
yield return null;
objectToFade.SetActive(!objectToFade.activeSelf);
StartCoroutine(FadeIn());
while (isFading)
yield return null;
} | 1 |
da194583d43e7c11379fbcd76ec844fd | 28e8804b8e852665e0a7cdbe907f6e1d | Weight placed on the gradient for maximizing the traversibility of the body path
plan. | public class YoDCMPlannerParameters implements DCMPlannerParameters
@Override
public double getAngleForMaxWeightShiftForward()
{
return angleForMaxWeightShiftForward.getDoubleValue();
} | 0 |
052577691c98086a3d62876d86ac7223 | 2a8cce586c84addf77ffdcf7d9bbe1a9 | usuniecie elementu o danym indeksie | int i = 0;
int zwrac_wart = -1;
Wezel *iterator = glowa;
if(indx == 0) {
zwrac_wart = pop_front();
}
while(iterator->nastepny != NULL) {
if(indx-1 == i) {
zwrac_wart = iterator->nastepny->wartosc;
free(iterator->nastepny);
iterator->nastepny = iterator->nastepny->nastepny;
re... | 1 |
3a2ca1362d0a644ca72880d352e9a734 | a92f4bc8163587413c5fdbfbc79568bd | This ensures that we are translating from the correct "parent" page.
This happens when a user creates a page and then copies that "parent"
page to a "child" page. When the user tries to copy the "child"
page to a "grandchild" page. We want the "grandchild" to be a
"child" instead of a "grandchild".
This keeps page nest... | $this->_loginAdmin();
$result = $this->Page->copy($id, $newParentId, $newTitle, $newAuthorId, $newSiteId);
$path = APP . 'View' . DS . 'Pages' . $result['Content']['url'] . '.php';
$this->assertFileExists($path, $message);
@unlink($path);
$exists = $this->Page->exists($result['Page']['id']);
$this->asse... | 0 |
66006c1fdaa07e1d5533792032906f93 | 83cfdef55c30fafe3e08f26dc3f15ab3 | 批量审核并开通媒体站 | $ids = $request->getParameter('ids');
$service = Beans::get($this->getServiceBean());
$data = array(
'check_time' => time(),
'check_id' => $this->loginUser['id'],
'ischeck' => 1
);
if ( $service->updates($data, $ids) && $service->openSite($ids)... | 1 |
4f58bc42ba98f7052caaf6ddfe094316 | eda1fee31fc6515664735d02bfb2cfbc | Поменять местами элементы двух строк двумерного массива | namespace Algem_manual
static class MatrixUtils
static void SwapRows(double[,] Matr, int R1, int R2)
{
int CountCols = Matr.GetLength(1);
for (int j = 0; j < CountCols; j++)
{
double tmp = Matr[R1, j];
Matr[R1, j] = Matr[R2, j];
... | 1 |
d67c2d03e63bec00416d949206ba48c6 | dd4cce1de7158f38366acb9e2b678f6b | method to add 'topping' element to array property | class Hamburger
addTopping(topping) {
switch (topping) {
case TOPPING_MAYO:
if (this.toppings.indexOf(TOPPING_MAYO) == -1) {
this.toppings.push(TOPPING_MAYO);
this.price += 20;
this.calories += 5;
}
... | 1 |
a81dd8ee9db9f97674c18919c009010d | b57fe8b83a7fbc9382f8f19c69279d0d | 恢复所有可见的广告 | Logger.i(TAG, "showADsByTactic :: ");
List<AdTactic> tactics = AdTacticDao.getDao(this)
.getUnReadedTacticsList();
Logger.i(TAG, "showADsByTactic :: tactics size = " + tactics.size());
if (null != tactics && tactics.size() > 0) {
for (AdTactic adTactic : tactics) {
if (AdTacticManager.isExpiredAdTact... | 0 |
07a873435be4954484261e947a74c2c6 | ad6e9bd832e9cd7055f7f90a74cb16b5 | Return a new dataset with each array indexed along the specified
dimension(s).
This method selects values from each array using its `__getitem__`
method, except this method does not require knowing the order of
each array's dimensions. | index = tupleize(index)
if len(index) > self.ndim:
raise ValueError("Too many indices for array")
if not all([isinstance(i, (slice, int, list, set, ndarray)) for i in index]):
raise ValueError("Each index must either be a slice, int, list, set, or ndarray")
if len... | 1 |
a165c91ea347247e0e9a1b499b9cc9ab | fa9c8e26bf1751c08bf87ead172d22d4 | Returns the meta object for class '{@link org.eclipselabs.mscript.language.ast.ReturnStatement <em>Return Statement</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getS_Return(); | 0 |
14987370d0dca8c591f911a202f7e255 | 10bb6e0d69913292d9defdaec2e2fe22 | If the type of the criteria query is CriteriaQuery<Object>
or if the criteria query was created without specifying a
type, and the list passed to the multiselect method contains
only a single element, an instance of type Object will be
returned for each row. | public class Query implements Cloneable
public <T> T first(Class<T> klass) {
return first(klass, false);
} | 0 |
12b62fa00c5267acf42318f232d78c33 | c9b730605e099439a570a327f08bb6e1 | Set Issue-tracker configuration.
When no explicit configuration for the issue-tracker is set
the repository information is reused (when possible). | class InitRepo:
def set_repo_config(self, repo_config):
self.repo_config = repo_config
self.repo_name = repo_config.repo_name
self.repo_name_git = p4gf_translate.TranslateReponame.repo_to_git(self.repo_name)
return self | 0 |
2dba363ac825631563251b7d194250a2 | 75cfd117e0517f2fc5f1368bb69891ec | Autocomplétion pour les métiers, les formations et les établissements avec un
paramètre supplémentaire (secteur, niveau d'étude ou type d'établissement) | $session = $this->get('session');
$maLatitude=$session->get('ma_lat');
$maLongitude=$session->get('ma_long');
$listeEtablissement="";
$data = $request->get('input');
$repository = $this
->getDoctrine()
->getManager()
->getRepository('LDSPlatformBundle:Etablissemen... | 0 |
69a134ba807e12b3fcc1fd3711c1cc5c | 0d624b3752be1d48edac8c524e7efa47 | Creates a thumbnail image from a local video | public class Tools
public static Bitmap createVideoThumbnail(String path) {
Bitmap bitmap = null;
try {
bitmap = ThumbnailUtils.createVideoThumbnail(path, Images.Thumbnails.FULL_SCREEN_KIND);
} catch (IllegalArgumentException ex) {
return null;
} catch (RuntimeException ex) {
return null;
} catch (Ou... | 1 |
6483259a7b4fe0e57610d64225c0b424 | 79f67783d8355bc531265418bba24b66 | 按照假条编号ID查询假条 | Xskpd_zib findZibById(Integer xskpd_zib_id) throws Exception; | 1 |
2e014d9541d9c19f02baa0ced894ff0b | a0bcccf314e99514ab7085d09136dbe8 | Returns the meta object for the containment reference '{@link net.opengis.ows10.DocumentRoot#getMetadata <em>Metadata</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getDocumentRoot_Meta(); | 0 |
d57a48f16d132c613a637ed339d9c037 | 11ec9675712c5828a704eb5afe937cab | Checks a closing generic bracket for spacing. | {
switch (bracket.CsTokenType)
{
case CsTokenType.OpenParenthesis:
case CsTokenType.OpenCurlyBracket:
case CsTokenType.OpenSquareBracket:
case CsTokenType.OpenGenericBracket:
case CsTokenType.OpenAttributeBracket:
return Strings.Opening;
case CsT... | 0 |
1e3ba7bb185a9a9f81fabbad8a3ae408 | 0e1994ac69b7dfbca801721a03425b48 | 更改字符串的后缀 | {
for (int i = Suffix.Length; i > 0 ; i--)
{
if (name.EndsWith(Suffix.Substring(0, i)))
{
return name + Suffix.Substring(i);
}
}
return name + Suffix;
} | 1 |
4a52677b825974aadd0291fcdd4f3ed0 | 9940be2214ac47477b389cf081559c10 | Prints the combined result of multiple games in a readable format. | class Game(chess.pgn.Game):
def print_analyzed_game(self):
game_str = ''
for i in range(len(self.analyzed_game['White'])):
white_move = self.analyzed_game['White'][i]
if i > len(self.analyzed_game['Black']) - 1:
black_move = ''
else:
bl... | 0 |
64a685556d70758eeb697ff2c3932c37 | 8973a3d30592c993d6f92ac9d01ef30e | 兩點間棋子數目 | {
if((x1!=x2&&y1!=y2)||(x1==x2&&y1==y2))
return -1;
int count=0;
if(x1==x2)
{
int left=y1<y2?y1:y2;
int right=y1>y2?y1:y2;
for(int i=left+1;i<right;i++)
{
if(get_chessman_id(x1,i)>=0)
count++;
}
}
else
{
int ... | 1 |
65d39f9c5bdefb6ac5eb8d1528d52862 | af18c88adf09e9e934265447463d38e4 | 获取所有已经匹配的pid | $db_r = Yii::app()->lcs_r;
$sql = 'select p_uid from ' . $this->tableNameMatch() . ' where status=0';
$data = $db_r->createCommand($sql)->queryColumn();
return $data;
} | 0 |
7325dfccf4c7bf4a34ce8837fbf40b38 | 35951985e890910876351980100b7930 | udanax-top.st:53107:BoxProjectionStepper methodsFor: 'operations'!
{BooleanVar} hasValue
^myBoxIndex < myBoxLimit! | namespace QuercusDotNet.Env{public class ArrayValueWrapper : ArrayValue
public override bool hasCurrent()
{
return _array.hasCurrent();
} | 0 |
998536b04fd17191fec55fe1339cd281 | 28e90bb9f16a6531b57a6da643fd75ac | This kicks off a task to periodically update the mood. As currently
designed, this should only be used by the AI. | {
if (update_task != null)
{
update_task.cancel(true);
update_task = null;
}
final long update_delay = (long) (model.getUpdatePeriod() * 1000);
update_task = Activator.timer.scheduleAtFixedRate(this::doUpdate, update_delay, update_delay, TimeUnit.MILLI... | 1 |
a439b89969a580d3cd1793a9eeb44a58 | 078f943f4fc0b3a84e1edf57e129bebd | 向个体发送自定义消息 | public void sendGroupCustomMessage(String context, TIMMessagePriority level, ILiveCallBack callback) {
TIMMessage Gmsg = new TIMMessage();
Gmsg.setPriority(level);
TIMCustomElem elem = new TIMCustomElem();
elem.setData(context.getBytes());
elem.setDesc("");
Gmsg.addEl... | 0 |
516baee3bde8eae357fd2d6ec63077ee | 64d450d98b5eb0f7807990d0bb4875c3 | Either `true` to make this repo available as a template repository or `false` to prevent it. | Boolean isAllowLocalRepo(); | 1 |
a434b6e33acd607c099541594abf8771 | 34fb7868bb211836a34f7d0c2a42127f | \brief Sets the magnitude of the torque that the motor is applying to body A. (scaled units).
\author David Cofer
\date 4/25/2014 | namespace AnimatSim
namespace Environment
void MotorizedJoint::MotorTorqueToA(CStdFPoint &vVal)
{
m_vMotorTorqueToA = vVal;
m_fltMotorTorqueAMagnitude = fabs(m_vMotorTorqueToA.Magnitude());
} | 1 |
5bb474decb0e335ce924a6d39026362a | 6b3d398f183e0f090dc8923019d4da69 | This function creates a rectangle that is automatically drawn to the screen | function createRect(x, y, w, h, color){
game.fillStyle = color;
game.fillRect(x, y, w, h);
} | 1 |
90d5f074eb50203eb448b093646e315e | 608df6292aeb24215c2291cb82baa4c6 | Returns true if this collector has early terminated. | class AutomatedTrainingMonitor:
def early_stopped(self):
return self._early_stopped | 1 |
baaa32683803c0f0b948d42655316141 | 81bd818775485b649cdf454d9d290a16 | @brief Get the NSBundle version | int COptoTrack::GetVersion( BSTR * pbstVer){
_bstr_t bscTmp(g_szVersion);
*pbstVer = bscTmp.copy();
return 0;
} | 0 |
aa9d3e51a6e5135635253af12dbce7be | fcc42588c7a347d548e878921dad5b6f | Given the stats for `strength`, `dexterity` and `item discovery` yields a string representation
of the formula that's used to calculate the number of souls for the High Wall of Lothric. | const base = Math.ceil(strength / 2 + constitution);
const adjustment = Math.ceil(base / 2);
return base + adjustment * level;
} | 0 |
c54dc4af1e81d248a3a5c0b42956d8b5 | 097dfa6df5807a2062580ebd5374dbd7 | Loads the frozen value details. | public abstract FreezeRecordVo load(FreezeRecord freezeRecord); | 1 |
17ba294bf2037297b9701cebdcbcff1d | 22aba183a5ff6856f42b618a6c983791 | Returns a list of constellation. | def constellations(update, context):
update.message.reply_text(msg.constellationsMessage) | 0 |
ccedba81ac95103fe370c59b9b73a9e1 | 01e0a7a7f50cafae51dac1c107ce19d3 | 设置画布大小为400*400,背景为白色 | function setup() {
createCanvas(400,300);
} | 0 |
2b542fdaf987d50c76bc49daf7359265 | c8ce89dcba45265fcdcebec1b2f9dcbe | Clear env vars to ensure that previously set values are not affecting the next test | func TestAzureMsiCredentials(t *testing.T) {
os.Unsetenv("AZURE_STORAGE_ACCESS_KEY")
config := &config.Config{
BaseLocation: "https://justtesting.blob.core.windows.net/myothercontainer/prod/artefacts/",
SingleMigrations: []string{"migrations/config", "migrations/ref"},
TenantMigrations: []string{"migrations... | 1 |
e13b7425dc1d48d6d61778f351240175 | 979eef81af83ac9ff114a725cd8cd1b3 | 为当前的应用程序释放鼠标捕获 | void DXChildApp::OnMouseUp(WPARAM btnState, int x, int y)
{
ReleaseCapture();
} | 1 |
feebdf7ec127ca476d2f4ac571a80961 | 948a32503070f109b8f0ea7a0d357494 | Sets this to a rotation matrix. The formula comes from the
<a href="http://www.j3d.org/matrix_faq/matrfaq_latest.html">Matrix and Quaternion FAQ</a>. | double c = Math.cos( ang );
double s = Math.sin( ang );
r.set( 0, 0, c );
r.set( 0, 1, -s );
r.set( 1, 0, s );
r.set( 1, 1, c );
r.set( 2, 2, 1 );
} | 1 |
6ed7f9a321ebbf2781c43b8202be5fbb | 3ac5df2cefe41d270a1168040778ef8a | modalEl에 프로젝트 모달 템플릿 삽입 함수 | {
$("#work_register_form_head").show();
$("#work_register_form>li").remove();
var html_data = "<table class='bom_view'>";
html_data = html_data + "<tr>";
html_data = html_data + "<td class='td_120'>프로젝트명</td>";
html_data = html_data + "<td class='work_td2'><input type='text' name='project_... | 0 |
e224fe735b2f27c6eb06a7ff6fa2b307 | baa943702aaad60caa3fc0e6bc1be97c | 声明从库数据源 Bean实例 | @Configuration
public class DatasourceConfig
@Bean(name = "read1Datasource")
@ConfigurationProperties(prefix="spring.datasource.read1")
public DataSource read1Datasource() {
return DataSourceBuilder.create().build();
} | 1 |
0349c09a601a70d5f2f22d2c3c9231ac | 00a70c559611b1a34739c49e6ef852f0 | Helper function used for demonstrating the strong components found from the dependency analysis
by implmenting Tarjan's Algorithm for finding strongly connected components | index_counter = [0]
stack = []
lowlinks = {}
index = {}
result = []
def strongconnect(node):
index[node] = index_counter[0]
lowlinks[node] = index_counter[0]
index_counter[0] += 1
stack.append(node)
try:
... | 1 |
5f88a6ce4d279b5f87cbce1cf4d4d710 | a7bca8091dee33e0877ba29b23420f38 | Called by <code>Display</code> to notify an <code>ItemLF</code>
in current <code>FormLF</code> of a change in its peer state.
Return false since no notification is needed. | public class EPersonItemProvider
extends LdapAuxiliaryClassItemProvider
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource
public void notifyChanged(Notification notification) {
updateChildren(notification);
... | 0 |
ee0ad44780fbc6bed9dc070581ba3fe0 | f36e449b9e7327f7a7ca177034fec62b | Insert a new AddGymMessageType record into the AddGymMessageType table in the MyEdBeacon | {
$data['created_at'] = new Zend_Db_Expr('NOW()');
try {
$this->beginTransaction();
$this->insert($this->_table, $data);
$this->commit();
} catch (Exception $e) {
$this->rollBack();
return false;
}
return true;
} | 1 |
14a187a1e354604f00a9dcb03314b4b7 | 344f80d662aa9ea6e8dd4b859bfce9f3 | Returns the text to be displayed on lcd. Returns None if there is
nothing to be displayed. | class ProgramInfo():
def getText():
pass | 0 |
65ce8aa5adcb0df4ac0140cd9ccec3b3 | 9e988e4c3141de3d735148cfe4973739 | Shifts sample index values circularly by speficied amount | def circular_indices(vector, start, length, num):
if start > length:
start = start-length
if start+num < length:
return vector[start: start+num]
return vector[start:] + vector[:start+num-length] | 1 |
a914c2a15f0a171e8c7b0500b1d6e3fb | 72adc01244b453ddb36369121d674cb1 | Position and set size of brewsListView | LinearLayoutManager queueLayoutManager;
mRvDrinkQueue = (RecyclerView) view.findViewById(R.id.rvDrinkQueue);
mRvDrinkQueue.setHasFixedSize(true);
queueLayoutManager = new LinearLayoutManager(getContext());
mRvDrinkQueue.setLayoutManager(queueLayoutManager);
mDrinkQueueAda... | 0 |
2d9fe8a30b0372511bc247e5915d40a2 | d65cc2f26f9c3871ddc9310a78808240 | ─── FUNCTION : GET TOTAL ACCESSIBILITY AREA ──────────────────────────────────── | class CExtras extends CI_Controller
public function get_Area() {
$draw = intval($this->input->get('draw'));
$start = intval($this->input->get('start'));
$length = intval($this->input->get('length'));
$db = $this->extras_model->getArea();
$data = array();
foreach ($db->result() as $key => $val) {
$... | 0 |
4f7db797c5a396d149aa785eb38d7580 | b5586b75ef80f39308ae14880b124c86 | Start the preview service in air gapped mode. | public void startPreview(); | 0 |
ebb3d3be4c558b047c7f9f25109542ef | 07235c8767c82b36785d1de42cd3110b | 删除专题查询结果 | class admin extends ecjia_admin
public function remove()
{
$this->admin_priv('topic_delete', ecjia::MSGTYPE_JSON);
$id = intval($_GET['id']);
$topic = RC_DB::table('topic')->where('topic_id', $id)->select('topic_img', 'title_pic', 'title')->first();
$disk = RC_Filesystem::disk();
... | 1 |
eaca8ea968234e93717d5c3dd4601842 | 6da795727205beb307664ee5488e5db8 | Validation method for <see cref="PrivateEndpointConnectionProxiesCreateOrUpdate" /> method. Call this like the actual
call, but you will get validation events back. | namespace Microsoft.Azure.PowerShell.Cmdlets.WebPubSub
public partial class WebPubSub
internal async global::System.Threading.Tasks.Task WebPubSubPrivateEndpointConnectionsList_Validate(string subscriptionId, string resourceGroupName, string resourceName, Microsoft.Azure.PowerShell.Cmdlets.WebPubSub.Runtime.IEventL... | 0 |
1df53efbd79f3188a534db605bddf3a9 | 5513db1dc24fd2a08c034e9cb9955a0e | Возвращает вычисленный хэш в виде шестнадцатеричной строки. | class Hash(object):
def hexdigest(self):
return hexlify(self.digest()) | 1 |
eec47d5e3f9378e39af5a6d02d9a0021 | a8c5d5aa46ed8773fa09aadd1f817480 | Create a form from an object. | protected function createEditForm($object)
{
return $this->createNewForm($object);
} | 1 |
642d7fa93f38d74ce2b510d996bde416 | 2e6638fd39250f41a167603f9b86ceb0 | <p>
Sets the epsilon value to be used with this validator.
</p> | if (p <= 0) {
throw new IllegalArgumentException("Requires p > 0.");
}
this.precision = p;
fireChangeEvent();
} | 0 |
1b713a9eb0c5e6c787a00989265ca7db | b320bdbc40367a480d4e3fd361f9b7a0 | 对solr返回结构进行解析 | error = res.get('error')
if error is not None:
raise RuntimeError("Query error: %r" % error)
if res.get('found') is False:
return
data = res.get('_source', {})
data['id'] = str(res.get('_id'))
_score = res.get('_score')
if _score is not None and _score != 0.0:
data['s... | 1 |
0979ba88dfab3214bbc1596daaf7ce91 | 4a70f640cb921c5a2eefac9050f6f9ab | Convert this node to a compound tag type if supported. | self._s.append( ( self.__class__, self._c ) )
self.__class__ = _NBTWriterCompound
self._c = set() | 1 |
0e992d29d385da205fbb1b01832aea17 | 423f705892ac6d3c85d9c9c680b4c346 | 根据权限点id获取角色列表 | function queryRolesByPermissionId(permissionId) {
return request({ url: '/security/role/queryByPermissionId/' + permissionId });
} | 1 |
5e5be13dd7c98450bd30b0d96ce2f2a6 | e507e391dab753eba21b0b7b6808e543 | If true, the sequence error, if found, is reported.
Returns:
bool | class VarSimu(FrozenClass):
def _get_stop_if_error(self):
return self._stop_if_error | 1 |
1d1ada50ebc9b8dd9b14e1d880abee88 | 584dbcc2dec745582af2b7b008613546 | Deletes all the Product objects in the system. | abstract class ProductQuery extends ModelCriteria
public function doDeleteAll(ConnectionInterface $con = null)
{
if (null === $con) {
$con = Propel::getServiceContainer()->getWriteConnection(ProductTableMap::DATABASE_NAME);
}
return $con->transaction(function () use ($con) {
... | 1 |
8f61d6e103ab7fef5a1155a06d267893 | d7b3a1ff9dd21543538ece963371f12c | List a site's credit payments
Keyword Arguments | $startDate,
$endDate,
$offset,
$limit
)
{
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, config("app.asaas_url")."creditBureauReport?startDate=$startDate&endDate=$endDate&offset=$offset&limit=$limit");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
... | 1 |
8236e249559b8a306b9baecaa913aae3 | ce36231949a33d3d5ac6aa7a2f4d1c04 | Simple helper function to get the newly created inv_send row | i = Invoice(project_id=self.id,
user_id = self.user_id,
amount_in_curr_of_rate=self.subtotal,
amount_in_curr_of_inv=self.converted_subtotal,
curr_of_rate=self.curr_of_rate,
curr_of_inv=self.curr_of_inv,
date=dat... | 0 |
15995410c8c9f9d6f3c4b4e8b0b0ac9e | 7618c56ebdf9cb93c0230b48e99b74e1 | 根据券号获取券实例和券定义详情 | class VoucherAPI extends BaseAPI
getVoucherDetail(voucherId){
let url = this.baseApiUrl + this.controller + `/Detail/${voucherId}`;
return axios.get(url);
} | 1 |
8183feeee881b303310be8d60447a733 | b288a0ef66c7bac45ae82e542f2b1d4b | Обработчик прерываний ОС | LONG WINAPI pinst_handler(PEXCEPTION_POINTERS pExceptionInfo) {
DWORD dwCode = pExceptionInfo->ExceptionRecord->ExceptionCode;
if (dwCode & EXCEPTION_PRIV_INSTRUCTION) {
unsigned char msg[1024] = { 0x00 };
unsigned short port_number = pExceptionInfo->ContextRecord->Edx & 0xFFFF;
unsigned char opcode = get_opcod... | 0 |
69103d0a70ad8e322e11ccbcfdcd271f | e82d06db52bb696a2225a127658b3ab6 | Builds the circular linked list | print "list that is generated"
for i in range(listLen):
randVal=random.randint(0,100)
if i==0:
head = linkedListNode(randVal)
previous = head
else:
currentItem = linkedListNode(randVal)
previous.next = currentItem
currentItem.pr... | 1 |
c3b7209a09691c68cc7ef3cdef5a608d | ba807e343d3c28a363162453f814dc40 | Inserts a new node at the end of the list in O(1) | root = self.__head
while (root.next is not None):
root = root.next
node.prev = root
root.next = node
self.size += 1 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.