query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
bafdab4c16293cb31da39c4b35b8506e | 7b8c38be2afe848c6cf00a5261e20631 | 根据政策ID获取政策集合,同时获取每个政策的返利信息。 | Policy getPolicyInfo(Map map); | 0 |
158ced975163fa5c6dba366ba82eb7fc | 11598ea3cffa28d05a6cb19b14366d13 | Sets the value of the '{@link SensorDataWebGui.AbstractPE#isPersistentView <em>Persistent View</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | @Generated(
value = {
"http://www.jooq.org",
"jOOQ version:3.7.3"
},
comments = "This class is generated by jOOQ"
)
@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class CompositionRecord extends UpdatableRecordImpl<CompositionRecord> implements Record10<UUID, UUID, UUID, Boolean, Boolean, String, I... | 0 |
ee82e1d2b00b17329c83f660367cff88 | f1b4105dca5a992e82253cc468074633 | @brief vraci grafiku k figurky. | BITMAP *cPlayer::getUnitBitmap(int index) {
if (bmp_unit[index]) {
return bmp_unit[index];
}
return nullptr;
} | 1 |
a3bdf23d3498d86c7ccf92ab9acb829e | bb6bb645fb8f9e2156e4782b5764ccee | 将stat中的数据绘制到条形图中,stat是一个dict类型,key是X轴,key的value是一个list类型,元素序号num对应的值是Y轴 | index = list(dic.keys())
value = list(dic.values())
plt.bar(range(len(value)), value, tick_label=index, color="green", width=0.8)
for x, y in zip(index, value):
if y:
plt.text(x, y + k, "%d" % y, ha="center", va="top")
plt.xlabel("时间")
plt.ylabel("{}".format(name))
plt.rc... | 0 |
478eeeb9ca9f898df4bcb530949531ca | f3cf98eb6650db020beebed75b63522c | Get todays sunrise and sunset times in the local time zone
for a given (hard-coded) latitude/longitude and (optional) elevation. | throws MalformedURLException, IOException, GeonamesNoResultsException
{
lst = TimeScale.getLocalSiderealHrsDec(anyPlace, ldt);
} | 0 |
de480eb775a6a85547009fe62397c3c5 | b912b0785eaf5e1704cb712d23be8158 | Offers a form that modifies an existing comment. | class CommentsController(BaseController):
def new(self, format='html'): | 0 |
01eb8fde8c43aa9f246423666b01b4c2 | c136a93e0fff6799b1a651d76f80e58e | Gets OAuth user by the specified user Id or Phone number asynchronous. | Action<GetSocialError> onFailure)
{
Check.Argument.IsNotNull(providerId, "providerId");
Check.Argument.IsNotNull(providerUserId, "providerUserId");
Check.Argument.IsNotNull(onSuccess, "onSuccess");
Check.Argument.IsNotNull(onFailure, "onFailure");
... | 0 |
0d10f0076fcd3f4a732669061150530e | 1c361e3d7a541099d02b15807a1a2735 | returns false if no overlap
else returns [startoverlap,endoverlap]
null in start time is assumed to be -Inf
null in end time is assumed to be +Inf | bool data_occ::is_overlap(setEntry * set, time_t start, time_t end)
{
} | 0 |
58613a13eac9a4645027f48896ec3aef | 329e05cff023db72468fb590f16680c7 | read メソッドが呼び出された後に、
FileInputStreamMonitor#postProcess を呼び出すように、
コードに修正を加える。 | @Deprecated
abstract class AbstractFileReader
protected abstract void afterReading(); | 0 |
e736c6eb3ba9508c66e21438f13b5eb5 | 1246a27bdd5e12ea33612d681714fb8f | Returns if the point is within range of length and width. | public abstract class AbsAnimal implements IAnimal
boolean isLenWithin(int low, int high) {
return low <= this.length && this.length <= high ;
} | 0 |
a68c73c02cb331f98c2ce3050d5e752d | 0ab1aadfe03872d24dec6ab33bdabf7a | Метод формирует массив моделей с задачами | public class MainActivity extends AppCompatActivity
private void loadArrayWithRecords() {
for (int i = 0; i < modelArrayList.size(); i++){
TaskModel taskModel = new TaskModel();
taskModel.setDate(modelArrayList.get(i).getDate());
taskModel.setTitle(modelArrayList.get(i).getTi... | 1 |
8161e88ae8675723bb812fd6f901dae2 | 5a05ff775ba7495d56a82654de6b3075 | Posts a comment to the specified clan. | clankey = clankey.lower()
try:
await self.clubs.setBonus(clankey, " ".join(bonus))
except KeyError:
return await self.bot.say("Please use a valid clanname: {}".format(await self.clubs.namesClubs()))
await self.bot.say("Success") | 0 |
5ef1448f2c36697c7d5035cb20fbf81f | 1a16f5aac6d0d4c0d9f4063b91e9cba6 | this method handles OnClick for mastery report button | namespace Pegasus.Pages.UI_Pages
public class RptMainUXPage : BasePage
private void ClickAddAndCloseButton()
{
Logger.LogMethodEntry("RptMainUXPageResource", "ClickAddAndCloseButton",
base.IsTakeScreenShotDuringEntryExit);
base.ClickButtonById(RptMainUXPageResource.... | 1 |
b12a76566e66a8c3777e13db1b4885e3 | 5a8104e0529f8bbd7ffd870e14575ce9 | 根据商户认证状态显示用户信息 | public class MineNewFragment extends BaseFragment
private void updateAuthData(UserInfoModel userInfoModel) {
String phone = userInfoModel.getPhone();
String name = userInfoModel.getMerchantCnName();
StorageCustomerInfo02Util.putInfo(context, "merchantCnName", userInfoModel.getMerchantCnName());
... | 1 |
26150ebe039168953659d03d5b489723 | 5ea47244f085abf49f9b0518a977af66 | 혈압 등록 | public void addInfo(BloodPressureInfo bloodPressureInfo); | 1 |
41bf9fa84aa870fe4b6cbf4c888cbead | 2ad2ea860f8035b76008bf6ed9cee228 | Get listing rule id | {
if (!$this->GetIsClassLoaded())
{
throw new SWIFT_Exception(SWIFT_CLASSNOTLOADED);
return false;
}
return $this->_dataStore['notificationruleid'];
} | 1 |
91c8f906c61d691317d17286f04d423b | 2ef213e2e23c30756a62583f5066381c | RPN expression evaluation test | int main()
{
char * test = "5 - (2+3) * (15-10)";
printf("%s = %d\n", test, exprValue(test));
return 0;
} | 0 |
75ecd51db1db76f4f08fca9bfdd11860 | 720c631824396a500cd4d17b8bf9cf9a | Sum two accumulators. | public class TradeAccumulator
public TradeAccumulator add(@Nonnull TradeAccumulator a2) {
return new TradeAccumulator(
getTotalPrice().add(a2.getTotalPrice()),
getTotalQuantity() + a2.getTotalQuantity()
);
} | 1 |
82e15aaf6c173e1325b2e00bf02e6495 | 9f48817b9c35e468301a81c76e564ef9 | This call is required before any other calls to the Facebook API. We pass in the callback to be invoked once initialization is finished | if (!FB.IsInitialized) {
FB.Init(InitCallback, OnHideUnity);
} else {
FB.ActivateApp();
}
} | 1 |
30fcf27c3ce3e38df5e73213af78dadd | e730d19557cb998fe0a16606d54f742e | Toggle support button text | auto state = button->getToggleState();
juce::String selectedString = state ? "Sountrol Off" : "Sountrol On";
button->setButtonText(selectedString);
} | 1 |
79702000949730fa20c2677ec2c862b8 | 9160f8d5af57d4d2a610388cbf249287 | Class which wraps the X11 event polling and turns it into a notification
system | {
pLastInstance=this;
m_coData = XOpenDisplay("");
m_coCtrl = XOpenDisplay("");
if(!m_coCtrl || !m_coData)
{
cErr<<"Cannot open connection to X11 display server"<<endl;
exit(1);
}
XSynchronize(m_coCtrl,True);
int maj, min;
if(!XRecordQueryVersion(m_coCtrl, &maj, &min))
{
cErr<<"X11 record extension not ... | 1 |
45654f1c3bd01a7b3cd705e97284da9f | 73edababbcac34c78d8cf5745922c44a | Get the list of best models for a given GBD round except for shock
aggregator models | def get_best_model_version(gbd_round):
sql_statement = """SELECT
gbd_round,
model_version_id,
cause_id,
sex_id,
model_version_type_id,
is_best
FROM
... | 1 |
e372af5de7af574303948f90d5f3e259 | c8b48367a62c49d1f53fd2fccc9da2f5 | changes xml file names e.g. 0file1.xml | class Context
function moveXmlToArchive($file)
{
$fileNew = $this->subdirArchive . str_replace($this->subdirNew, '', $file)."-".self::getNow();
rename($file, $fileNew);
} | 1 |
c0bdfbf7e21f20cadb5d48c0bdee852d | f9999cb8aa12b593dc5a353be07bbe84 | 获取pointsAccountJournal列表 | Map<String, String> params = addCommonParams(context);
params.put("page", page);
sign(params);
return OkGo.<String>post(HttpModel.pointsAccountLogs)
.params(params)
.converter(new JsonConvert<String>() {
})
.adapt(new Observ... | 1 |
214fc1d6420b58a13a56041475fa1988 | d7ee052730a247bb571d9b6ec6d513e2 | 利用itertools包创建多值离散特征二分序列组合 | def feature_split():
value_DIR = np.array([0, 1])
value_a = range_split_even(2, 3, 0.01, 2)
value_b = range_split_even(0.1, 0.9, 0.01, 2)
value_f = range_split_even(20, 30, 0.1, 1)
value_alpha = range_split_even(15, 25, 0.1, 1)
value_theta = range_split_even(30, 45, 0.1, 1)
value... | 0 |
75c7c1ccd6d711922a640f05c5cde17d | 25ff27cccecf7e0274643a6ee583465a | Updates the neighborFacility's build time. This is for internal use only (reCalcQueuedBuildings()). | class Building(pst.cEasyPersist):
def setTime(self, ti):
self.set("up", ti) | 0 |
60cb6a623f8b50a7c4f470fd71fde2cd | ca0da6589f9d93bff03969b4260a1a2b | Returns the value of the '<em><b>One Way</b></em>' containment reference.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>One Way</em>' containment reference isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | public java.lang.String getIsOneOneCmp(); | 0 |
65e48a2d356f614df28dbec3daf1927d | 52b9ff68905dfcd4f4bf53c624de1a0d | @brief draws the increment screen markings | void menuDigital_drawStep(void){
uint8_t i,str[14];
lcd_3310_gotoXY(0,5);
for (i=0;i<PWM_INC_COUNT;i++){
itoa((int32_t)pwm_inc_array[i],&str);
if (i==mainConfig.PWMincIndex)
lcd_3310_invert(1);
else
lcd_3310_invert(0);
lcd_3310_drawText(str);
lcd_3310_invert(0);
if (i!=PWM_INC_COUNT-1... | 1 |
bd348ab375df59fa1e59808942ae2313 | e42e45fbce654cfea69dbbae4fc36ed7 | get numpy list of QRS Locations
Returns:
qrs_locs (numpy list): list of QRS locations in the signal | RR_interval = int(ECG_param['RR_min']*ECG_param['sample_freq'])
nyquist_freq = 0.5 * ECG_param['sample_freq']
bandpass = [10, 50]
low = bandpass[0] / nyquist_freq
high = bandpass[1] / nyquist_freq
filter_order = 1
b, a = butter(filter_order, [low, high], btype="band")
ts = lfilter(b, a... | 1 |
c4440b722ee9c378eedef5db68c37d9d | a9a2d3b73ac0c6688592d42750f3acae | 字符串为空返回默认值,不为空返回本身的trim | class IndexController extends WxController
public function trimString($value) {
$ret = null;
if ($value != null) {
$ret = $value;
if (strlen($ret) == 0) {
$ret = null;
}
}
return $ret;
} | 0 |
f95f02482cb28df5b5b098c286f7631c | 216752d21c73edce0fa7e033aa55736f | Simulates a single mouse _click on a button | namespace WindowsInput public class MouseSimulator : IMouseSimulator
public void XButtonClick(int buttonId) {
var inputList = new InputBuilder().AddMouseXButtonClick(buttonId).ToArray();
SendSimulatedInput(inputList);
} | 1 |
6e84f02e458a068be7a68b402cb7af76 | 0a8cd00fc52d9724fd47210a9a673d88 | add product to coupon | class CouponController extends BaseController
public function actionAddCouponProduct()
{
$model = new CouponForm();
$model->setScenario('addProduct');
if($model->load(Yii::$app->request->post()) && $model->validate())
{
if($model->saveCouponProduct())
{
... | 1 |
41d678761bb27f94b310190ae2401d95 | 003d2943fd7ce3171a1089dc37672974 | Metoden pausar programmet för bättre interraktion med användaren | namespace Exercise_4
public class Program
private static void Pause()
{
Console.WriteLine( "\nPress any key to continue..." );
Console.ReadKey();
} | 1 |
b74fc0d6199fa93bc64df5d969930380 | 1ba263a285abbd90c29a1f8954ae1cf0 | Rollback a migration for all the connections | {
foreach (var kv in ConnectionStrings)
{
RollbackMigration(kv.Key, migrationId);
}
} | 1 |
194b3cb50730fb74e0a9904fd975ab39 | f7a8c224bea119368b9cd93c7724114f | Given a search token, returns a configuration which would match a JSON. | {
if (!is_string($input)) {
throw new UnexpectedTypeException($input, 'string');
}
$input = trim($input);
if (empty($input)) {
return new SearchCondition($config->getFieldSet(), new ValuesGroup());
}
$array = json_decode($input, true, 512, \JSO... | 1 |
a9ffc68194fc9a31c7557fc270f8504c | 5650705a4503ac2aaadfe003eabd8a81 | 返回正常的界面想要展示的View的Id | public abstract class BaseActivity extends ActionBarActivity implements ThreeButtonsListener
protected abstract int getViewID(); | 1 |
a0d7c5f120eb42eec1265860aab1bccb | a6a9f015b9a48d442371fe028b10b5a5 | Visualize one or many regular triangular prisms with different features. | plotter = pyvista.Plotter(lighting=None)
for plane_y in [2, 5, 10]:
screen = pyvista.Plane(center=(0, plane_y, 0), direction=(0, -1, 0), i_size=5, j_size=5)
plotter.add_mesh(screen, color='white')
light = pyvista.Light(
position=(0, 0, 0), focal_point=(0, 1, 0), color='cyan', intensi... | 0 |
c0bdd337a0ac309475386954fd5256fe | 2cc8719e630f2c56a0988912b72ed923 | 获取用户备注的所有信息 | List<Map<String, Object>> findAllRemarkCollect(String userremarkcollect_user_id); | 1 |
20c4e9e7d95238a129e2dc30715ee822 | f0d10576a7f997b90b8f193c0d00c003 | change la couleur de fond de la fenetre qui a le focus | public class GrilleGui implements Runnable{
public void setCouleurFond(Coord c, Color couleurFond){
if(grille[c.ligne][c.colonne]==null)
try {
Thread.sleep(100);
} catch (InterruptedException e) {
e.printStackTrace();
}
grille[c.ligne][c.colonne].setBackground(couleurFond);
} | 0 |
b79396edfa2a0326b7d5e030656f5daf | 5fcc40cc6f51ebad887d03703a5cbaad | Получить идентификаторы для подчиненных только первого уровня | {
$user_list = $this->modelUser->getList(['leader_id' => $id], 'id', 'id asc', false);
foreach ($user_list as $v)
{
if (!empty($v['id'])) {
$data[] = $v['id'];
$data = array_unique(array_merge($data, $this->getSubUserIds($v['id'], $data)));
... | 0 |
1269eb11e1bb1c252b851b5d8aa1f9ae | 297ac0fc43800afce490c140eb041744 | Gets all of the keys/values collection from state. | namespace Xamarin.Forms.Labs.Services
IDictionary<string, T> GetAll<T>(IEnumerable<string> keys); | 1 |
ce4e0c91cb36cdc245b7bf63cd647c36 | a1ac5d89a264ab4b5ca8c6358ce35ac4 | Asserts a fact into a prolog knowledge base. | public boolean isAsserted(SubjectNode s, String p, ObjectNode o)
throws URISyntaxException; | 0 |
6a48b9973bc48caf13ccd297cae9ce38 | 86ef3f896c5f360626cdc935559806d6 | <p>
根据输入的Pattern获取传入时间
</p> | return StringUtil.isEmpty(pattern) ? parse(date, SDF_DEFAULT) : parse(
date, new SimpleDateFormat(pattern));
} | 1 |
35971831c46f7f8216705785179cb6d4 | 154f1da3464eff3e9c073eeb08bf6506 | Return true if the response was taken from the cache. | public function isFromCache(): bool; | 1 |
7cc701f512ca54858191f08941addfcf | efe84585cc94ec1a69aa1a2a12e000c6 | Парсинг свойств json .env файла. | {
$properties = trim($properties);
if($properties == "") {
return [];
}
$properties = preg_replace("/([-a-z0-9_]+)\s*=\s*('|\")/", "\n$1\n$2", $properties);
$properties = trim($properties);
$properties = explode("\n", $properties);
$pairs = [];
... | 1 |
424e65bac9b45bfce73c4f1c3860a116 | 625ee1b88bf01ae6dd464cae463f7124 | Returns values corresponding to major and minor classes (in two-class classification problem). | def _split_minor_major(X, y, sample_weight=None):
vals, idx = np.unique(y, return_inverse=True)
minor_idx = np.array({True: idx}.get(
np.sum(idx) < (len(idx) // 2), np.logical_not(idx)), dtype=bool)
return X[minor_idx, :], y[minor_idx], X[np.logical_not(minor_idx),:], \
y[np.logical_not(mino... | 1 |
1aae77a179a2a4c2b41177becccca490 | 70e6d37b9cebd86c1c72b3db1b7fb2e2 | Returns the number of pull request events | counter = 0
for pullRequest in pullRequestList:
if pullRequest["state"] == "open":
counter += 1
return counter | 0 |
6df61e9e323ad74c92c4743883698cac | d9aa57ea19871f083d19bdab7dd63802 | takes in raw .wav data, parses needed data to play on codec | static wavinfo_t GetWavinfo( char* name, byte* wav, int wavlength )
{
wavinfo_t info;
Com_Memset( &info, 0, sizeof( info ) );
if( !wav )
{
return info;
}
iff_data = wav;
iff_end = wav + wavlength;
FindChunk( "RIFF" );
if( !( data_p && !strncmp( ( char* )data_p + 8, "WAVE", 4 ... | 1 |
b1b543233e28826534cee2f6f797ee4e | 82abfe92ee7e0ca3417853a3406ccd48 | An action for analyzing a given string. | class PhpSourceHelper implements \SourceHelper, WebPackerInterface
private function analyzeString(array $source)
{
$lines = explode(PHP_EOL, $source['src_content']);
$class = $this->extractClassname($lines);
$namespace = $this->extractNamespace($lines);
if ($class!==null && $namespace!==null)
... | 1 |
964fc8d807792fb37ce00e31400a03da | bc890bc70b9bd44e0b020fe422bd8717 | Retourne un tableau de forme [x, y] représentant les coordonnées
auxquelles le fantôme de couleur demandée se trouve en début de niveau. | public class Board
public List<Point> getGhostsStart() {
return this.ghostsStart;
} | 0 |
11827631746e69e7120555fbc30f5e51 | ab84c852b089947fee718907f379526e | Check if the given file extension is a vector image file extension. | {
$fileExtension = strtolower( MOODLEEX_getFileExtension( $fileName ) );
$extensionList = array( 'gif','jpg', 'jpeg', 'png' );
return in_array( $fileExtension , $extensionList );
} | 0 |
0fd872b0745377a20b0ee62d352a7a1c | 409d92cbe5cbf82cee0122159e73f2b2 | Sets value of attribute EndTime for DrTestAction node. | public void setEndTime(java.util.Date value); | 1 |
7126fe212a8571875cee79f7ce9a55ea | 341a89730dcf3db7f22cd66f19a38e03 | Ensure permissions for study-level views are properly configured. | user = profile_utils.seedNDBUser()
profile_utils.loginNDB(user)
profile_utils.seedNDBStudent(self.program, user=user)
response = self.get(self.url)
self.assertResponseForbidden(response)
user = profile_utils.seedNDBUser()
profile_utils.loginNDB(user)
profile_utils.seedNDBProfile(
... | 1 |
c29faa51aaa89c26f8bb199a2c29174d | bbeb81f0ac61c798e827b4abd489dd14 | Return a list of all buff names | if sim_info is None:
raise AssertionError('Argument sim_info was None')
if not CommonComponentUtils.has_component(sim_info, CommonComponentType.BUFF):
return list()
buff_ids = list()
sim_buffs = CommonBuffUtils.get_buffs(sim_info)
for buff in sim_buffs:
... | 0 |
888d730c505ff3e2f788490dcad61d84 | 3644f1351b5ce86691370907da77ea37 | Verify that parsing succeds with problematic .changes files. | updater = Updater()
parseString(
"""<?xml version='1.0' encoding='UTF-8'?>
<osmChange version="0.6" generator="osmosis">
<create>
<node id="104" version="1" timestamp="" lat="52.6" lon="-3.3">
<tag k="highway" v="bus_stop"/>
<unexpected-tag>Blabla</unexpected-tag>
<tag k="name" v="Stop... | 1 |
62eeddf51e66606a43b6bb94a5f5bfc1 | 13b7a512e7c4dc8dfb533e654751e161 | The version of the managed rule set. | class CostCategoryArgs:
def rule_version(self) -> pulumi.Input[str]:
return pulumi.get(self, "rule_version") | 1 |
db8a94f1430ec0c9a24f2f049dc425e9 | 301344e0fddcfd0c0e08a748463c83c2 | Get the resolution bits of the sensor.
00 = 15-bit,
01 = 16-bit,
10 = 17-bit,
11 = 18-bit | uint8_t MPU9250::getMagResolution() {
return readMaskedByte(AK8963_ADDRESS, AK8963_CNTL1, MAG_RESOLUTION_SEL_MASK);
} | 1 |
de19580bb68ec262f3b65f6cd3f5a593 | b407fd84f9d21e79ba2e5c5ad16d1a6b | overriding the not equals (!=) operator | class Position:
def __ne__(self,other):
return not(self == other) | 1 |
d9d9d96c0f32a191335cb2b059946103 | f451ce7be2d8ef256c8f104aabe7c999 | adds one seven meter for Team B after the 7m button was clicked and displays the new value | public class MainActivity extends AppCompatActivity
public void sevenMeterTeamA(View v) {
sevenMetersTeamA = sevenMetersTeamA + 1;
displaySevenMeterForTeamA(sevenMetersTeamA);
} | 0 |
c3c2ac1b51386e8409155d90cf9f92f3 | 2987b6f2a3eb87f87458df499038ff24 | converts image_vector (784,) into a matrix(28, 28) | def transform_image(image):
arr = []
for i in range(0, len(image), 28):
arr.append(image[i:i+28])
return np.array(arr) | 0 |
44dbe8c6a8e3b01e52c8f3b0ee895f29 | b4ef775d65fd66bbf237a4f13a4d51b8 | Initialise a classifier that classifies query strings as either smltk or qna. | class Sage(Destiny):
def initClassifier(self):
self.networkThreatClassifier = svm.SVC() | 0 |
51a03d16bc6307c06ecc72a621ca3a46 | 3d2c28337c3e136a808584c4ecefee42 | Вью групп.
Выводит посты относящиеся к одной группе, разбивая по страницам. | group = get_object_or_404(
Group.objects.all(
).prefetch_related(
'posts__author', 'posts__comments'
),
slug=slug
)
posts = group.posts.all()
paginator = Paginator(posts, 10)
page_number = request.GET.get('page')
page = paginator.get_page(page_number)
... | 1 |
67bee7198a7339ccbd8df10cf78e9109 | a3761083eb6c6aebabc830164e1acd40 | Validate if the graph-scan is supported in the Xray version | if(!(graph && graph["@context"] && graph["@graph"]))
throw new Error("Invalid device graph detected!");
} | 0 |
3da230f4bec75a0035a6d64bf116d2aa | 509ae46a9a6f08fe2176eb7faeae4f7e | Sets the value of the JobProperty and lock it in one command . | class AlWorker
def set_value( key, val )
@values_rwlock.synchronize( Sync::EX ) { @values[ key.to_s ] = val }
end | 1 |
48d0f03c7ff2ce85a83120ff82c73d18 | fa521d7453f9c1848e182c2e34db1752 | Parses a function declaration given a return type and a function name. | class Parser:
def parse_declare_function(self, _type):
name = self.tokens.pop()
self.tokens.expect("(")
args = []
stored_offset = self.offset
self.offset = 0
while not self.tokens.check(")"):
arg_type = self.tokens.pop()
if self.tokens.check("*"):
... | 1 |
1fd552257b3bd50315df94e412bd60fb | c7c7dd22cc97e0e003229308fcf23bfb | Baixa todos os links marcados (removido) | lotes = []
headers = {'Authorization': "Bearer {}".format(token)}
resultado = buscarTodos(service_layer, token, 20)
print("Quantidade Total: {}".format(len(resultado)))
print('-')
for i in resultado:
print("Id: {}".format(i['id']))
conteudo = {
'idGerado': i['id'... | 1 |
c763e48c916da78790eab89365a0430d | 1332edfd9ad7c8696627ba3248a010f9 | Writes a mesh to collada file format. | with open( filename, 'w' ) as ofile:
for mlib in obj.mtllibs:
ofile.write('mtllib {}\n'.format(mlib))
for i in range(vertices.shape[0]):
ofile.write('v '+' '.join(['{}'.format(vertices[i,j]) for j in range(vertices.shape[1]))+'\n')
for i in range(texcoords.sha... | 0 |
a65ef3f1e5516ca439ddf329554ad4a4 | 0be40ce0e7b05c98e444f5c8b4bea7b4 | Localizes all the display names of the model properties by using the resource mapper to generate the keys.
Display names are later used in validation and error messages. | namespace AccountingPlusWeb.Administration
public partial class ManageUserCards : ApplicationBasePage
private void LocalizeThisPage()
{
string labelResourceIDs = "SAMPLE_DATA,USER_NAME,USER_FULL_NAME,PASSWORD,MAP_USERCARD_PIN,DOWNLOAD_CSV_TEMPLATE,NOTE,USER_SOURCE,HELP_FOR_MAPPING_CARDID_PIN,CAR... | 1 |
d62c688c55fb0de89fe785c847b68adc | 0a41c01970432dcbe705f19d9e32871a | 如果没有任何操作则直接返回 | class MongoOperator
public function x()
{
if ($this->xResult) {
return $this->xResult;
}
$dao = ManagedMongoDAO::getInstance();
$dao->setName($this->dao->getName());
switch ($this->class) {
case QC::select:
$this->xResult = $dao->select... | 0 |
ef5b079195c11783a9034e97e82b5266 | bd5fd1cc12639f0121713d9a7405ec68 | Updates screen for day view button click | public class WorkoutHomeActivity extends CustomActionBarActivity implements IGraphSetup{
public void onDayButtonClick(View view){
isWeekView = false;
updateDayScreen(cal);
resetDay();
} | 1 |
0a729cf87f13039c603305bad92bc48e | 41960bb505809a044a2453746441c4e1 | 更新今天推荐人数 | {
$now = time();
$where = "`g_league`.`recommend`>'{$now}'";
return $this->where($where)->count();
} | 0 |
2648361d8ebc3efd45580d2f0d82721a | 7c9283404a9e634097f3300fbbbc3911 | função para realizar o cadastro de Usuário | class Usuario:
def cadastro(self):
self.cpf = input('CPF: ')
self.senha = input('Digite uma Senha: ')
senha2 = input('Repita a Senha: ')
if not is_cpf_valido(self.cpf):
print('CPF Inválido')
elif not (self.senha == senha2):
print('As senhas não bateram.')
... | 1 |
65142be1833edf41d8d80fb49fd985b0 | 713d50f09904e7f8e5f5fe23deba1a42 | Emulates a real-image Sawyer Env without access to robot, only works together with the Offline Agent! | class OfflineSawyerEnv(BaseEnv):
def __init__(self, env_params_dict, reset_state=None):
self._hp = self._default_hparams()
self._adim, self._sdim = 4, 4 | 1 |
4757628977222c8f27dde2e62aa8745c | c10a636a08136ccb010215536292e7ad | <pre>
If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type`
is the type of the array elements.
</pre>
<code>.google.spanner.v1.Type array_element_type = 2;</code> | public final class ColumnEntity extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.clouddms.v1.ColumnEntity)
ColumnEntityOrBuilder public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
impl... | 0 |
98630c1956cdf3eb7ab68a4201c1a416 | 2b908d10e3a94e0f918f9ece2a46199e | Returns the TCP server socket. | public class ServerManager
public ServerSocket getServerSocket()
{
return this.serverSocket;
} | 1 |
6075c347676eb157925fb2f5d57d5e53 | 31b3dbd0bec22265cb84b18ff0942ba5 | Check that the newton powerUp correctly get the possible targets and move them on the chosen position | {
foreach (RectTransform r in possibleTargets)
{
if (RectOverlaps((RectTransform)transform, r))
{
if(r.GetComponent<MinigameSelect>().IsSet)
{
break;
}
else
{
... | 1 |
e5879a73ebc4d1fff649de0467efda39 | a730b38c05a97332ab96ed4642e9bd0f | Like [forwardCursorPositions] but moves backward. | line = get.reverse
pos = get.size - cursor
return unless md = line.match(BACKWARD_WORD, pos)
self.cursor = (line.size - md.offset(0).last)
end | 1 |
b4a260ebcc0b1a843293690513d7a3c1 | 3795360c00daa4ed82f205a052e66243 | Shared at: http://stackoverflow.com/a/28236548/1522342 | function splitArray(array, chunkSize) {
return Array(Math.ceil(array.length/chunkSize)).fill().map(function(_,i) {
return array.slice(i * chunkSize, i * chunkSize + chunkSize);
});
} | 1 |
0eb2a9c9715e45a05be3de311299fbbc | fd6fa397905fe12037a71c261e054b54 | Возвращает ссылку на выбранный в списке расчётный счёт | public class TestTransactionCalculator
private Account getAccount(String name, int whichOne) {
Map<String, ArrayList<Account>> accountTable = transactionCalculator.getAccountTable();
return accountTable.get(name).get(whichOne);
} | 1 |
cfc561767335f6488a10b62bcdb41a8b | 6a84d8c6c11b99d9d936218577b88470 | Move the cursor to the end of the current logical line. | namespace ElmSharp
public class Entry : Layout
public void MoveCursorLineEnd()
{
Interop.Elementary.elm_entry_cursor_line_end_set(RealHandle);
} | 1 |
656599b30f70275290ce988a0bb9f365 | 902237747712c4a4c7728a2d5f6d8485 | method to set the time slots adapter | timePeriodSpn = dialogView.findViewById(R.id.spn_time_period);
timePeriodAdapter =
new ArrayAdapter<>(getContext(), android.R.layout.simple_spinner_item);
timePeriodAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
timePeriodAdapter.addAll(ge... | 1 |
628ab8d9935c05e14b514c3bb943c2ef | 2bae957fad53b6d7a51f90dd866656ba | 距離のインデックスを返す。 | {
int aindex = -1;
int adistanceVecCount = m_vDistanceVec.size();
int alowerBoundIndex = 0;
int aupperBoundIndex = adistanceVecCount - 1;
float alowerBound = m_vDistanceVec[alowerBoundIndex];
float aupperBound = m_vDistanceVec[aupperBoundIndex];
float atempDistance;
int atempIndex;
while( aindex == -1 )
{
i... | 1 |
c1c1cb427351f506478663ad5350f905 | d97594cd61e9ea03044aeb0a3934701c | IsIPv6 returns if netIP is IPv6. | ip := net.ParseIP(s)
if ip == nil {
return false
}
if ip.To4() == nil {
return false
}
if strings.Contains(s, ":") {
return false
}
return true
} | 0 |
da3fa0eec830dc4736e544deef05f1c0 | eef3d4b8fa187091dc7d04f892f000d9 | 更新资金池记录 | @Service
public class HomeService
public void updatePoolJF(String gmnum){
PoolVO pool=new PoolVO();
pool.setGmnum(gmnum);
DataVO data=new DataVO();
data.setGmnum(gmnum);
List<DataVO> datas=homeMapper.getData(data);
data=datas.get(0);
List<PoolVO> pools = homeMapper.getPools(pool);
if(pools.size()>0){
... | 1 |
3b96334690c059e2dc6ccfe538cc3549 | 08875c0f8cc3a921a1296a4dbf11eaa6 | Gets IDB record for style ID. | class user_tbl_Org extends vvphp_basic_Table
public function get_style_id() {
return $this->RecordSet[$this->RecNo]['style_id'];
} | 0 |
389245fbfd2d6c349ae88d4ed78962e5 | d7f2f3656379d9f21919d60f978245f5 | 通过用户id和订单状态分页获取订单信息 | @Repository
public class OrderDao
public List<WebAppOrderView> pageQueryOrderByStatusAndUserId(PageParam<WebAppOrderView> page, Integer userId, Set<EnumOrderStatus> status) {
Set<Integer> statusSet = new HashSet<>();
status.forEach(s -> statusSet.add(s.getValue()));
return mapper.pageQueryOrderB... | 1 |
629824bca69107d96726e087f3893d79 | d65a44d96c1aba310ee7802212c1a1de | Hide the switching roles prompt | namespace Checkmate.Modules.Game.UI
public class GamingPage : FGUIPage
public void HideRole()
{
mRolePanelUI.Visible = false;
mRolePanelUI.Clear();
} | 1 |
56030b4cb7cdccc3811b8d30911bb813 | 777dd4bb341c540e55e666882ea73039 | 圆等分函数 | public class Utils2
public static Integer[] splitInteger(int nodeNum, int circleNum) {
int quotient = nodeNum / circleNum;
int remainder = nodeNum % circleNum;
Integer[] nodesEachCircle = new Integer[circleNum];
for (int i = 0; i < circleNum; i++) {
nodesEachCircle[i] = quoti... | 1 |
26a89988e0b3ebbd45bbc25da7b4fbf3 | fefde06c59d7b07893f8ee2520486210 | Setea la salida de video para camara de filmación y fotografía. | namespace AsymtekFMG5Engine
public class siVision
public void SetVisionCamera(string name, int index)
{
m_FluidMove.Machine.WcfComm.VisionConnectToCamera();
} | 0 |
aa398ea45b4415ab657274c2fec939b2 | 3a87d73dc918d05d17ab414c0c8ec5ff | Returns the list of Lake Areas | class regions
public function land_list(){
$this->check_land_list();
return $this->lands;
} | 0 |
c9832640bdba252eeb5ab96b0ed44859 | a2fb3bbcfd2165c29dced055c15f1619 | Apply app state to all environments | env = self.env.dup
manifest.all_selected_source_packages.each do |pkg|
pkg.autobuild.apply_env(env)
end
env
end | 0 |
d4e99fdb2a9a42027a7a12941b7e7bfc | 811ee329199ab92363a3f514ab5e3883 | 过滤根节点到起点和终点相同的部分,然后拼接成一条完整的地图路线 | int type = mNaviAnalyser.analyzeNavi(startGroupId, startPt, endGroupId, endPt, FMNaviAnalyser.FMNaviModule.MODULE_SHORTEST);
if (type == FMNaviAnalyser.FMRouteCalcuResult.ROUTE_SUCCESS) {
fillWithPoints();
updateLineMarker(startGroupId);
}
} | 0 |
56655553d27351171921dd8fb2e0f77a | 859219480015d8d76284fcf052ea7479 | Range returns a new Range element. | func NewRange() *Range {
self := Range{}
self.SetDefaults()
return &self
} | 1 |
aba5dfd4b567c1f0dfaff8e3124dc990 | 4f1c956ac239e210f83f6e493c00a0e6 | Create an action to update Snapshots. | self,
) -> Callable[[gcn_snapshot.UpdateSnapshotRequest], operations_pb2.Operation]:
if "update_snapshot" not in self._stubs:
self._stubs["update_snapshot"] = self.grpc_channel.unary_unary(
"/google.cloud.netapp.v1.NetApp/UpdateSnapshot",
request_serialize... | 1 |
68c1d89b5248671799d623778a42c6ed | 6d1fa681e29b4f79c21694125bed1be0 | メッセージの送信先ユーザを取得 | class MisskeyClient(BaseClient):
def get_send_user(self):
return self.message["user"]["username"] | 1 |
b2a501a41889ed330ec07c9c8711ce24 | 91d45c13114fa49e5bb26917127f8d5c | 设置弹幕样式 | public class PlayerActivity extends AppCompatActivity implements View.OnClickListener
private void initDanma() {
HashMap<Integer, Integer> maxLinesPair = new HashMap<>();
maxLinesPair.put(BaseDanmaku.TYPE_SCROLL_RL, 5);
HashMap<Integer, Boolean> overlappingEnablePair = new HashMap<>();
... | 1 |
f302f7dee6b91833e8dbe23affe82b2b | 54366dcc60c4a6b2ba0b8b6c9c2188a9 | Finds the Dictcategory model based on its primary key value.
If the model is not found, a 404 HTTP exception will be thrown. | $model = Category::find()->with()->where([
'id' => $id
])->limit(1)->one();
if ( $model === null )
throw new NotFoundHttpException( Yii::t('yii', 'No results found.') );
return $model;
} | 1 |
503d8ace4e38e12dbc224a6c0e98f83d | f65a45d3131091dd549fcfc6d1707b35 | Send a command (via Ajax) to delete the log file. | class DownloadLogsController extends Controller
public function destroy($id)
{
return redirect('upload-logs');
} | 0 |
d365709d2d948644f78a1f66fca9d96b | 2221ff25fdd62c5f8de19582b9726d47 | Counts the no of uncompleted tasks | incompleteCount(){
return Tasks.find({checked:{$ne:true}}).count();
} | 1 |
a42ae20392974bb5a4149ca06c25e5b6 | e3e9ab52e105790126329c155b918964 | 将long类型的time 转化成format的string | {
if (!lTime.equals(0l))
{
DateTime dt = new DateTime(lTime);
return dt.toString(format);
}
return null;
} | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.