query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
b82321819d0abaa05a2856aeec9bc560 | 21f26b7d038f3af9b05b2aeb6eb8eb84 | 读取私聊未读消息的发出者数量 | {
$num = $this->db->select('count(id) as num')->from('msgs')->where(array('markread' => 0, 'toer' => $mid))->get()->row_array();
return $num['num'];
} | 0 |
121aa3bb2ac5d7695a809634f663d128 | b7eb15498012d9eb26f0322794ec4148 | Getter for the right Column of this OnClause | public Object getRight(); | 1 |
0d54a26d8295169fd571b8865631e179 | 9c936bc872671c2063f0286b2431c97c | 查询指定用户下的房源所涉及到的小区列表 | @Service
@Transactional
public class CentServiceImpl implements CentService
public List<BuildingCustomer> villagesbylanduserid(Long userid) {
return centCustomerMapper.villagesbylanduserid(userid);
} | 1 |
19a4ddc3d3d06728b4fa43daffc2087a | 50e50366b5aeb9462a1baf001d38e762 | 在待机或ACC OFF状态下,拔插设备不应该开屏。 | try {
if (isHdcamConnected() && !isHdcamInsideHome()) {
return true;
}
} catch (ExtDeviceNotConnectedException e) {
e.printStackTrace();
}
return false;
} | 0 |
a4a58220ee0881cb7f06d66069bd1d86 | f74cab948767d5b8a9f8714e8e588fc2 | Имеется ли достаточное количество данных с минимальным таймфреймом для работы симулятора | namespace Manager.Models
public class Manager
public bool MinAvailableTimeCheck()
{
return AvailableTimes.Count >= MinAvailableTimeCount();
} | 1 |
8767e71de371de43f6754b94278b29f9 | a3953e356f39ba2ebda7ac04b0b5c41c | adds a resource pool. If the pool already exists it is overwritten | public class SimulationDefinition extends ModuleDefinition
public void overwriteResourcePool(String poolName, Integer poolSize, Double costPerTimeUnit) {
resourcePoolDefinitions.put(poolName, new Object[] {poolSize, costPerTimeUnit});
} | 1 |
c7061df694f6db7e2e0d73b61bcea210 | 4231ccb739d0308dd4ac820235c1c502 | Redirects to need_decision summary page when no session variables are set. | function noSessionPage(req: any, res: any, next: any) {
if (sessionHandler.findSessionByID(req.sessionID)) {
res.redirect('/charselect');
} else next();
} | 0 |
131677b246919d9bcc4f9e158e019a9d | 414164c54d60094665b2ff651fa709ab | ETH转账接口 | @Controller
@RequestMapping(value = "/account")
public class AccountController extends BaseFrontController
@RequestMapping(value = "/goEthEdit")
public ModelAndView goEthEdit() throws Exception {
ModelAndView mv = this.getModelAndView();
PageData pd = this.getPageData();
Object num = pd.get(... | 0 |
06e099ebe3951a44b3b637fa6cac945d | 7f61448ad6da3ef0f9cb03f40c5be655 | just getters/setters | cases like (1) | 0 |
a4fa28408db6c40f3822ac78e4ef6683 | f5d29d3f0f62b8d6574a8777ae38ad97 | Check that the index is updated on create of a case study. | child_id, parent_id, index_id, parent_ref = self._initialize_parent_child()
updated_id = 'changed_index_id'
self.factory.create_or_update_case(CaseStructure(
case_id=child_id,
indices=[CaseIndex(
CaseStructure(case_id=updated_id, attrs={'create': True}),
... | 1 |
484a764f7774bf24195b54496ffd905c | a3759d2342833960c9a28fd47c1e4886 | The depth index of the last span returned by {@link #next()} | final class LayerDelegate
int getDepthIndex() {
return depthIndex;
} | 0 |
bd63701f14be6c0c73a960a3bb9621a0 | b5329a0d7b1dbeb20d3cfc6aebd70791 | Returns whether `self` is the default internal encoding. | impl TextDecoderMethods for TextDecoder
fn Encoding(&self) -> DOMString {
DOMString::from(self.encoding.name().to_ascii_lowercase())
} | 0 |
3e667bd2ac990f6928b6b8c7c102783d | e6f0267ff72a8b0de80cf60283c03d5e | 检测BF0C模板下是否包含9F4D借贷记交易日志入口 | if (null != fromFunctionCode && FunctionCode.C_3_2_2.equals(fromFunctionCode)) {
return true;
}
return false;
} | 0 |
91ebe43c951d6ed2bf6e68ac94a38286 | 1bc99b58a9f7fd969f01033955291138 | Возвращает суммарную длину субконтура | {
int length = 0;
for (int i = 0; i < circuit.Circuit.Count; i++)
{
if (circuit.Circuit[i] is IElement)
{
length += 80;
}
else if (circuit.Circuit[i] is ParallelCircuit)
{
... | 1 |
c52e7e17ab466647f162e38fd3fafcbc | 855b2fa390857737d7f6eafb560eaf41 | Variadic vindex: finds index of first value in iterable that when
passed to find_func returns truthy | var i = -1, a = -1;
for(var v of x)
if(ft(v, ++i, x)) a = i;
return a;
} | 1 |
ce1227475f1bb6c5165bbb29affcdeae | 14b365ad0eb838214936b69736220cd5 | 参考:https://www.jianshu.com/p/9d4e4cf06d23 | def longest_common_prefix2(strs):
if not strs or not strs[0]:
return ''
def lcp(l):
for i in range(l):
for s in strs[1:]:
if len(s) < i + 1 or s[i] != strs[0][i]:
return False
return True
min_l = min([len(s) for s in strs])
l, r = 0... | 1 |
06f24bfc933bb417e8b59cfa5a301576 | 2e5b577c9668abb953736d978a34c631 | ColumnVector constructor | if (rows == 0) {
if (type.isNestedType()) {
return ColumnView.NestedColumnVector.createColumnVector(type, 0,
null, null, null, Optional.of(0L), children);
} else {
return new ColumnVector(type, 0, Optional.of(0L), null, null, null);
}
}
DeviceMemoryBuffer da... | 1 |
e2e4fcbf738914a5329a42a093a6adac | 472cee7d598bb82298537d9e33b847d4 | Create the pfw text line representation of this switched shunt | public abstract class PFWFileWriterImpl implements PFWFileWriter
protected String getPFWGeneratorLine(Battery battery, Bus bus, ControlArea a, Zone z, Bus rb) {
int id = battery.getAttribute(PFWModelConstants.PFW_LEGACY_ID_KEY, Integer.class);
String name = battery.getAttribute(Generator.NAME_KEY,String.class);
... | 0 |
a9584b76e3266f24ec37ad3a0ed7d890 | 1a5c5b7cff1ec02840b6d4d01a6ceb14 | 根據id和類別獲得圖片組 | $page_type = PageType::findFirstByType($page_type_str);
if (false == $page_type)
return false;
$page_type = $page_type->id;
$pics = PictureGroup::find(array(
'conditions' => 'picture_group_item_id = :id: AND page_type = :page_type:',
'bind' => array('id' => intval($id), 'page_type' => intval($page_type... | 1 |
917961b2a5f568c0da74b5acc9e7de0a | 8da40acf481f3c85630de93c4467833e | Randomly choose from existing literals. | def select_next_literal(formula):
for clause in formula:
return clause[0] | 0 |
4941974bedab63f580403901119f335e | ad56c42d1894e0b25546bf7a5be69ed6 | release all elements instantaneously but
start_position != end_position so they are released along a line | {
LinesVector result;
LineStruct newLine;
size_t numberOfLines = allLines.size();
for (size_t i = 0; i < numberOfLines; i++)
{
if (allLines[i].endIndex == endPosition)
{
newLine.startIndex = allLines[i].startIndex;
newLine.endIndex = allLines[i].endIndex;
result.push_back(newLine);
... | 0 |
1d634b82196d70ba03b2dc9e6acfad35 | 6ad9a23be2cd059767713d9cdc2d2f2c | Check that ZipFile finds entries when its got a long comment | with zipfile.ZipFile(TESTFN2, "w") as zipfp:
for fpath, fdata in SMALL_TEST_DATA:
zipfp.writestr(fpath, fdata)
try:
with zipfile.ZipFile(TESTFN2, "r") as zipfp2:
raise zipfile.BadZipFile()
except zipfile.BadZipFile:
self.assertI... | 0 |
83d64a4fbdd29eb5e60145a4732c475b | 70764d048f9b62bc986898d28ac225bd | 레이저빔 데이터 세팅하기 (시작점과 끝점 구해서 위치와 스케일 세팅하기) | export class BulletData
public setLaserData(delayTime: Decimal | number, followNode: Node, followPosition: DecimalVec3 | Vec3, lifeTime?: Decimal | number) {
this.delayTime = delayTime instanceof Decimal ? delayTime : new Decimal(delayTime);
this.followNode = followNode;
if (this.followPosition ... | 0 |
baa5223119efdd48a4da74330fbad2b0 | 1b45f6eb69308d373a297269174cfec1 | Verifies that Jaql Shell produce the same output as expected. | @Component
public class ScriptMeasurementsExecutorImpl implements ScriptMeasurementsExecutor
private void testScriptOutput(SimpleEngine engine, ScriptExecutionResultDto script, TaskDto task) {
Object outputObject = null;
Object scriptResult = null;
final String body = script.getBody();
L... | 1 |
fc940766c1f39b49d55b4bc775657b7b | 4f88d0a96078d8ae84b6647f14086f70 | 车辆销售功能 | class UsedCar extends CI_Controller
public function car_list($key = '其他', $value = '其他', $offset = 0){
$key = urldecode($key);
$value = urldecode($value);
$data['key'] = $key;
$data['value'] = $value;
$order_str = 'create_time DESC';
$array = array();
if($key == '... | 1 |
5621f0b7f3bd013ef6f740faa451f765 | e856bca9b7e762f7076629e1c276bc3b | Checks whether the given method can be made static, i.e., does not reference the "this" object
The method to check | boolean result = false;
if (isPsiFieldOrMethodOrClass(psiElement)) {
if (psiElement instanceof PsiMethod) {
return isStaticMethod(psiElement);
} else if (psiElement instanceof PsiField) {
return isStaticField(psiElement);
}
}
... | 0 |
435c7884c6d8616567962dfe8e8610cb | 55ce8726da865782876541dd1c724b56 | 通过游戏报名卸载游戏 | {
$ids = $_REQUEST['ids'];
$ids = explode(',',$ids);
$game = M('game');
$map['game_id'] = array('in',$ids);
$infos = $game->where($map)->select();
foreach ( $infos as $info){
unlink("./Uploads/gameIcon/".$info['game_icon']);
unlink("./Uploads/g... | 1 |
d7b1c42a4be8e4e77f97ceb397e42fb6 | 02c9336cd9d7968305e15a45325699db | <code>true</code> if no result, <code>false</code> otherwise | public class Matcher implements MatchResult{
public final boolean proceed(){
return proceed(0);
} | 0 |
025b608646744589e3a8b72c8fc6ea8c | b9e579fecbc280e06d9350e42d852569 | 2D convolution layer (e.g. spatial convolution over images)
This layer creates a convolution kernel that is convolved with the layer
input to produce a ndarray output. | class Convolve(Operator):
def __init__(self, *parents, **kargs):
assert len(parents) == 2
super().__init__(*parents, **kargs)
self.padded = None | 0 |
b17cceb9fc113c303268e0bd1f1e6037 | 9320fce065c13b7057c037c504dfa8af | 批量插入node标签 | class Neo4jUtil():
# 初始化数据库
def batch_node(self, entitys_items):
with self.driver.session() as session:
session.write_transaction(self.batch_add_node, entitys_items) | 1 |
31c0407e25710c842ea66e5b4c0eaaaa | 1926f03e020b350df1b8d553b14eb9bd | 获取AND条件 | {
if (right == null)
return Ge(left, (object)right);
return SqlBuilder.Instance.Ge(left, SqlBuilder.Instance.Val(right));
} | 0 |
72b2f53a8bfac2e8baf77ba2865558e9 | 806ca5de65bd19316c545a2edf8d2d50 | 删除NPC身上特定的触发器 | function CActivityCtrl.MingLeiDelGuideNpc(self)
self.m_MLNpcList = {}
g_MapCtrl:DelDynamicNpc(0)
end | 0 |
2ac18bca091136acd7a672e585b47861 | 24a107945925ffadab2eebbd8bb0b032 | Test Vulnerabilities count Public. | class SecuritySlackCommandTest extends TestCase
public function testHandleMethodWithoutVulnerabilities(): void
{
Notification::fake();
$this->bindPassingSecurityChecker();
Config::set(
'laravel-security-checker.slack_webhook_url',
'https://hooks.slack.com/services/T00... | 0 |
9f7db2b23594405c8738dd72e2c596ac | 0482785a1264c409724571cf440ff5fe | Creates a physics interface object. | export class CubismUserModel
public loadPhysics(buffer: ArrayBuffer, size: number): void {
this._physics = CubismPhysics.create(buffer, size);
} | 1 |
848a2bca7ddc51a8c8614793c2e030e2 | f69328444a1dd9cdcb6dce3c7c633a72 | Dynamically creates subclass of MigratingCommand.
Method takes name of the function, module it is part of
and builds the subclass of :py:class:`MigratingCommand`.
Having a subclass of :py:class:`cliff.command.Command` is mandatory
for the osc-lib integration. | if not any(map(lambda b: isinstance(b, JaykModule), bases)):
bases += (JaykModule,)
result = type.__new__(mcs, name, bases, dict(namespace))
functions = [function for function in namespace.values()
if hasattr(function, "_jayk_commands")]
result.commands =... | 0 |
1dd059e14d04e8e0868eef7657ad7b64 | 41d27226383ab7f24282a8103bbe4a77 | Encola un vídeo para generar su previsualización. | {
$targetDirId = self::createTargetDirId($id);
$targetDirVideo = self::createTargetDirVideo($targetDirId, $username);
$dest = $targetDirVideo . basename($postFile["name"]);
$i = 1;
while (file_exists($dest))
{
$dest = $targetDirVideo . basename($postFile["name"], self::MP4_EXT) . strval(... | 0 |
919320f2c10863da76d1b564197e5dea | c7a7d8c2c3fb67018a46f81d5bff86c8 | Returns bucket value of a test to force assignment. Empty if no force is given. | class Train extends \Core\Data
public function getForce() {
return $this->properties['force'];
} | 0 |
d54152af2231369088a09f01950a54ad | cfc808d3049bc2e5103f942617994149 | returns list of primes up to 10000 | def primeLoop():
array = []
composites = compositeLoop()
for x in range(2,101):
if not x in composites:
array.append(x)
return array | 0 |
8100c47d9aafeea3250c460976209984 | c8875b5be3347daac4c75c4eb7132780 | Get a complete list of end of day quotes for an entire exchange. | class StdQuotes(object):
def k(self, symbol='', begin=None, end=None):
with self.client.connect(*self.bestip):
data = self.client.get_k_data(symbol, begin, end)
return data | 0 |
2deb91b95462935e167f12db272634ef | 0045af067adfbcfcd1595993444fd54d | Push the player back after taking damage | {
HealthController.Knockback(2.5f, hitDirection, false);
if(!HealthController.TakeDamage(damage))
{
PlayerSoundController.PlayHurt();
PlayerAnimatorController.HitOnBody();
}
blocking = false;
PlayerAnimato... | 1 |
c1e1fc64b340d294c284e259676e360b | 4aae8d2c9c44825e246e2c86b4be6ab0 | 根据ID,返回一个PfmReport对象 | namespace PFM.DawnXZ.Library.BLL
public class PfmReportBLL
public static PfmReportMDL Select(long rptId)
{
return PfmReportBLL._dal.Select(rptId);
} | 1 |
6264b23682f661a5cd5fd54abcfea947 | 6914c287fc18d7e67e2af16eb2a4b682 | Check that the largest allowed dispatch is OK. | dispatch_url = self._get_dispatch_url()
access_token = AccessTokenFactory(user=self.mock_user, application=ApplicationFactory()).token
headers = {'HTTP_AUTHORIZATION': 'Bearer ' + access_token}
response = self.client.post(dispatch_url, {}, **headers)
assert 200 == response.status... | 0 |
fc7c43ba8dd5afa0e13fa9f3941bbf06 | 8ca8009b9884575fff6f869a678a09f8 | RETURN the indices of elements in <inputList> whose value is True | def from_boolean_array(bool_array):
return np.where(bool_array)[0] | 1 |
d2cbb5635c5b3a9ef716c2ee2aa8ad55 | 55e75e488ea87880ffd9d73d3a0f1cb7 | ========================================FIND COLUMN NUMBER IN EXCEL SHEET============================== | $colcount = $p_data->colcount($p_sheet);
for ($col=1; $col<=$colcount; $col++) {
$ColName = $p_data->val(1, $col, $p_sheet);
if ($ColName == '')
return $col-1;
}
return $colcount;
} | 1 |
920e76e01fb956718c23f4a436c65960 | bcaf7a8c9ca8da0dd6f7421c780d99f3 | NewCommand creates a new command from an options map. | func NewRunnerOptions(opts ...RunnerOption) *RunnerOptions {
opt := &RunnerOptions{
Env: make(map[string]string),
Exec: DefaultRunnerExec,
}
for _, o := range opts {
o(opt)
}
return opt
} | 0 |
0ead3aa8a6bc81364099abd91bab464a | 79e93e8b4bbba7e82e2d4ff1ab6975c5 | Write a unsigned short value to the DataStream | namespace RageLib.Data
public class DataWriter
public void Write(ulong value)
{
WriteToStream(value);
} | 0 |
8295eb83e68d726e5317c7e3814192b9 | 3fd874181668554e988101d71718b6b2 | Возвращает количество повторений данной фишки в комбинации | int i=0;
for (Card card: cards) {
if (card.getSuit() == suit && card.getNumber() == number) { return i+1; }
i++;
}
return 0;
} | 0 |
17d724a324a5a2e363a5274e5f2597b3 | c271b63efe9fafe28d3a8a2877fe986d | Returns the assumed type of this numeric value based on the range of
the number. This does not take surrounding source, or program flow,
into consideration | if (range.equals(DfIntRangeType.FULL_RANGE)) return INT;
if (range.isEmpty()) return DfType.BOTTOM;
Long value = range.getConstantValue();
if (value != null) {
return intValue(Math.toIntExact(value));
}
return new DfIntRangeType(range, null);
} | 1 |
806b0a658e0e72686847f2821d39be27 | 4f738642b24505559f4bdae28b3a2bc9 | Gets the Mobile Country Code | class EnterpriseBroadWorksMobileManagerAddHomeZoneRequest extends \CWM\BroadWorksConnector\Ocip\Models\C\OCIRequest
public function getMobileCountryCode()
{
return $this->mobileCountryCode instanceof \CWM\BroadWorksConnector\Ocip\Nil ? null : $this->mobileCountryCode;
} | 1 |
dce3d2b3cf16b73c8c489e42ac38aaa8 | 66d6c204480a64ecbebb909166b886d5 | Permet de reprendre la chanson précédement jouée au meme endroit (typiquement pour reprendre un chanson après un combat) | def re_play():
pygame.mixer.music.rewind() | 1 |
d8b38a4df0322022592933bd2fe3a577 | 0ec275053d0781b484500ff2fe516282 | Ensure the neural networks are identical for both cases. | r = load_model('/mnt/disks/gscratch/regressor_redo2_epoch4.h5')
c = load_model('/mnt/disks/gscratch/my_model2_epoch1.h5')
self.regressor = Model(inputs=regressor.layers[0].input, outputs=regressor.layers[-2].output)
self.classifier = Model(inputs=classifier.layers[0].input, outputs=class... | 0 |
ff88820c160145599ec4b4efb2942822 | 02627dedb89f7b26d2f949cefb749e88 | Get the provisioning state of the container registry at the time the operation was called. Possible values include: 'Creating', 'Updating', 'Deleting', 'Succeeded', 'Failed', 'Canceled'. | class GetContainerServiceResult:
def provisioning_state(self) -> str:
return pulumi.get(self, "provisioning_state") | 1 |
4933c7e5de0688f820d16ba503b45280 | 50ecdcc8125f94959ba23177c376bfae | Detect anomaly status of the latest point in time series.
<p>This operation generates a model using the points that you sent into the API, and based on all data to
determine whether the last point is anomalous. | Func<GetAnomalyRecordsDescriptor, IGetAnomalyRecordsRequest> selector = null,
CancellationToken cancellationToken = default(CancellationToken)
); | 0 |
9aedcd25d7e3ead321c412725c7d11a8 | 962478801b38724d0b9f954d81fdc277 | 유클리드의 호제법을 이용한 최대공약수 구하기 | Scanner scan = new Scanner(System.in);
int a = scan.nextInt();
int b = scan.nextInt();
int c = b;
while(a%b != 0){
c = a%b;
a = b;
b = c;
}
System.out.println(c);
} | 1 |
6bdf6fcc5de10e09caeb92fe48ae91ea | 7bc459bc260dea75fcaffd6f8ac4ac27 | POST /api/events/:id/send-confirm | @event = Event.new params[:event]
authorize! :manage, @event
@event.save!
render 'show'
end | 0 |
61a5a80e44e8ffd3be0d8865c9df5458 | d78465150e4679afa82611bed3d3134c | Obtain the number of milliseconds it takes to reload the gun. | public float getReloadTimeSecs(); | 0 |
d0433c1c94d4063f254d95d424993de8 | a94d0aa73017fa122b4c9b5f62898929 | Меню авторизации закрыто по умолчанию | class MenuForm : Form
protected void MMCloseClick(object who, EventArgs e)
{
MessageBox.Show("Неактивная команда", "Заглушка",
MessageBoxButtons.OK);
} | 0 |
26b3dcd1ef6ab86bcef8dd51cd8c228e | 569bbb993a35310a1f4b1a8e443fceb9 | Function to follow a line till it encounters intersection | void line_follow()
{
if(wsen2() >= 165)
{
if((wsen1() >= 180) || (wsen3() >= 180))
{
node_counter += 1;
if(node_counter >= node_limit)
{
stop();
buzzer_on();
_delay_ms(1000);
buzzer_off();
}
else
{
if(turn_counter%2 == 0)
{
forward();
buzzer_on();
_delay_ms... | 1 |
7e19c4cbf4608b54244742e57a5a5c74 | 1b27bb31f007de1d12817fbbb180f074 | the given iterables, which are assumed to all have the same length
(computation halts immediately where the predicate fails) | def keep_indexed(iterable, pred):
return filter(None, fn.iters.starmap(pred, enumerate(iterable))) | 0 |
20b4e55ae095574b8d205de55c248870 | 28c2d2d3b88c01011f2f490c46a5f2e4 | Retorna o número total de queries executadas. (Vai geralmente no fim do script) | class Db
public static function countQueries(){
return self::$_countQueries;
} | 1 |
a652866d066434b8b9a7a5880d240bff | 48e18c13900b4492c4701e3bafed60e2 | Get the web safe string representation of the entity's key. | public class RdfResourceParts
private String _getDecodedKey() throws OData2SparqlException {
if (getAsEntitySet(0) != null)
return getAsEntitySet(0).getDecodedKey(uriInfo);
return null;
} | 0 |
37453a50698f9b0445ec55e9b1f53720 | 1c8ed72fe6ddc4e993176272d71c3a35 | Returns the stored audio level (stored only if config.debug is enabled) | public final class GlobalConfig
public static float getSoundLevel() {
return ((float) Integer.parseInt(PROPERTIES.getProperty("sound_level", "85"))) / 100;
} | 0 |
bb9ffcf1e4955a4e965782b77319ccfa | 2cf578f67967c3b0edafba4ecb2d1cca | Convert this to a line of text as it would be written to the
status file. | class Download:
def toString(self):
if self.__status == DownloadStatus.INITIALIZED or \
self.__status == DownloadStatus.NOTFOUND:
return self.__shortName + ' ' + self.__statusMessage
else:
return self.__shortName + ' ' + \
self.__getStatusString() + ' ' + \
sel... | 1 |
86b60e47b3511f2212d3217b7a1601d8 | 92b674cc64462fbf8e5d9d5131b4aff7 | Récupère le nombre de jours de congés disponibles pour le type de congé sélectionné | namespace EMS
public partial class LeaveList : System.Web.UI.Page
public int getallocatedleave(int jobid,int leavetypeid)
{
int days = 0;
foreach(var al in allocatedleaves)
{
if(al.JobTitleId==jobid && al.LeaveTypeId==leavetypeid)
{
... | 1 |
e8dddc4a5f7a1d38b4546eca97e55ada | 11adc1ac0cfc82b50c159c30aed05917 | Visit a parse tree produced by PlSqlParser#dependent_handling_clause. | class PlSqlListener(ParseTreeListener):
# Enter a parse tree produced by PlSqlParser#swallow_to_semi.
def enterDependent_handling_clause(self, ctx:PlSqlParser.Dependent_handling_clauseContext):
pass | 1 |
eb5413d3a3c66374cc39574b739b30f7 | 5c554f9a344be71cfac63f2407066c5e | Final vertex is actually the first vertex. This routine, called when
a polygon definition is completed, just draws the final side. | const CBCGPPoint& ptLeftBottom, const CBCGPPoint& ptRightBottom, BOOL bSetFinalVertexes)
{
CBCGPPointsArray& arVertexes = bSetFinalVertexes ? m_arFinalVertexes : m_arOriginalVertexes;
arVertexes.SetSize(4);
arVertexes[0] = ptRightTop;
arVertexes[1] = ptLeftTop;
arVertexes[2] = ptLeftBottom;
arVertexes[3] = p... | 0 |
a9f1deeab6e703e01f8f8cf9a69ec60d | 7a0790db3fbf490c7b225fb9057bf8e5 | Visits the payload element and annotates it with metadata | namespace Microsoft.Test.Taupo.OData.Reader.Tests
public class RemoveAtomMetadataFromPayloadElementVisitor : ODataPayloadElementVisitorBase
public static ODataPayloadElement Visit(ODataPayloadElement payloadElement)
{
new RemoveAtomMetadataFromPayloadElementVisitor().Recurse(payloadElement);
... | 0 |
60fa1f2560639cbb6c73ea9e18bf4686 | 3a3463863b6c232e0f1e7f8d84b10ad6 | Returns the distance between two planets | if (source == destination) {
return 0;
}
if (distances[source.getPlanetID()][destination.getPlanetID()] < 0) {
double dx = source.getX() - destination.getX();
double dy = source.getY() - destination.getY();
int dist = (int) Math.ceil(Math.sqrt(dx *... | 1 |
243c423d8d94d6d5dae7a0af9fd7743a | 2fd3f1f2ac0514e4f50bd321ac3bf0f6 | Retourne si oui ou non la personne a été selectionnée | public class Capteur
public boolean isSelectionne() {
return selectionne;
} | 1 |
1c189556da82258b5864200667ccfc9d | 3a32cdf30a1f4d0d7f68136a0030f710 | Returns true if RefundPaymentRequest instances are equal | {
if (input == null)
return false;
return
(
this.AutoRefund == input.AutoRefund ||
(this.AutoRefund != null &&
this.AutoRefund.Equals(input.AutoRefund))
) &&
(
... | 1 |
d7116be6ba5654cfbc701fc8d5c47c58 | 72c8584668af2995190b2a7576b81413 | Swap the position of the two items in this list at :itemIndex1: and :itemIndex2: | public class HoverCellListView extends ListView
public void swapItems(int firstItem, int secondItem); | 1 |
69ca8d4103f46a9d3c6d85dd89c78c7f | 2e05df1d5b6f6b69bbf002ad4cccb8e5 | 输出成绩(分班级) | int a=0,b=0,c=0,d=0,e=0;
float grade=0.0;
class chengji*h;
h=head;
while(h!=NULL){
grade=h->fanhuiyuwen();
if(grade<=100&&grade>90){++a;}
if(grade<=90&&grade>80){++b;}
if(grade<=80&&grade>70){++c;}
if(grade<=70&&grade>60){++d;}
if(grade<=60){++e;}
h=h->next;
}
cout<<" ... | 0 |
dd4ac60966b35e2f2277ea4cfbb0f670 | 2d2d1451591b622fc5f77a363e77b29d | Calculate the module of the gradient. | mag = 0
norm = 0
for key in grad:
for layer in grad[key]:
for param in layer:
norm += 1
mag += be.norm(layer[param]) ** 2 / len(layer[param])
return sqrt(mag / norm) | 1 |
a9e33ec114f3c5ea144010463e0cc146 | 5b2039e6f0f98335e671eb5956fd17e5 | gif compressor to be used in compress_gui.py
calls functions in the correct order to compress a gif | def cli(directory, name, max_size, fps, duration, optimize, verbose):
full_dir_path = os.path.realpath(directory)
if duration and fps:
raise ValueError('Cannot specify both a duration and an FPS.')
if optimize:
check_gifsicle_installation()
io = ImageIO(directory=full_dir_path, name=name... | 1 |
ff35ca0761120bab26cab750acde6ecb | e42a41cf01d6e836abe86f8bcb99d19c | Callback to get all facebook pages available on user's Facebook Account. | def get_fb_pages():
registry = getUtility( IRegistry )
token = registry['nuw.types.social.ISocialSettings.fb_user_token']
if token is not None:
url = 'https://graph.facebook.com/me/accounts?' + urllib.urlencode( {
'access_token': token
} )
try:
conn = urllib2.... | 1 |
0b09d03386c09f2a846b198207c85465 | 72e4932b8e50e5b99b33005edd24c85f | 设置log4net的上下文 | {
var logCfg = new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "/clientPC/log4net.config");
log4net.Config.XmlConfigurator.ConfigureAndWatch(logCfg);
} | 0 |
8dd11fd344861e49f9f3b8baa19b298f | 67881bdc6af30cef61bf1b9be0a1c72c | 捡起某坐标上的道具 | {
zObjectB *ob = objectbm.get(AIDefine.pos.x);
if (!ob)
{
Zebra::logger->debug("%s 找不到要丢的物品 id=%u num=%u",name,AIDefine.pos.x,AIDefine.pos.y);
return false;
}
for (DWORD i=0; i<AIDefine.pos.y; i++)
scene->addObject(dupIndex,ob,1,getPos(),0,0);
t_NpcAIDefine ad;
ad.type = NPC_AI_WAIT;
AIC->se... | 0 |
9a46b3f00539f09215f2bad394f4c5bc | c936f87d85dd7a8f3fb7e697fe4d8dec | Método para asociar el pedido en curso al acuerdo de facturación utilizado para el pago, si procede | {
if ($request->has('purchase_order') && $request['purchase_order'] && ((int)$request['purchase_order']) > 0)
{
$invoiceData = new PosSaleInvoiceData();
$invoiceData->pos_sale_id = $posSale->id;
$invoiceData->purchase_order = $request['purchase_order'];
... | 1 |
cf36924b06dfc83bb312ec7d4f6f948c | f13ce3e6235a29916ea0ce9bd063f7a7 | Parse the comma-separated list into TLS format. | class TLSFileFormatPureTLSOUT(TLSFileFormat):
def tlsout_tls_desc(self, tls_desc):
listx = []
if tls_desc.name != "":
listx.append("TLS %s" % (tls_desc.name))
else:
listx.append("TLS")
for (chain_id1, frag_id1,
chain_id2, frag_id2, sel) in tls_desc.ra... | 0 |
a54c2bec0efa2659bf6c025af5629d49 | 4cb64775e333b75f82b9d899a96693a4 | HandleMessage handles messages and returns referral URLs. | referrer = request.headers.get(b"referer", b"")
response_headers = [(b"Content-Type", b"text/javascript"),
(b"Access-Control-Allow-Origin", b"*")]
return (200, response_headers,
b"if ('DedicatedWorkerGlobalScope' in self &&" +
b" self instanceof DedicatedWo... | 0 |
34e22662d1290d8cc07444a4e0ff2fbc | 4212ea95b38973f65520e6c60221c046 | Sets the denominator to den,unless d
is zero, in which case the method
prints an error message | if (denom == 0) {
throw new DivideByZeroException();
} else if (denom < 0) {
this.denom = denom * -1;
this.num = this.num * -1;
} else {
this.denom = denom;
}
} | 0 |
aff0b367dba866c27fdf0a055b6f53cd | b3a3357d9d87b8f1f44ac0177a728319 | called by device interrupt routines to feed input characters
into the circular console input buffer | {
ASSERT(indev);
irq_spinlock_lock(&indev->lock, true);
if (indev->counter == INDEV_BUFLEN - 1) {
irq_spinlock_unlock(&indev->lock, true);
return;
}
indev->counter++;
indev->buffer[indev->index++] = ch;
indev->index = indev->index % INDEV_BUFLEN;
waitq_wakeup(&indev->wq, WAKEUP_FIRST);
irq_spinlock_unlock(... | 1 |
4c8a0e347601b213d784fda68e02b8e1 | 76bd9913cf1fd6e15b2a2b697de9ba91 | @brief Get number of queued messages in a Message Queue. | if (IS_IRQ_MODE() || IS_IRQ_MASKED()) {
return os_svcMessageQueueGetCapacity(mq_id);
} else {
return __svcMessageQueueGetCapacity(mq_id);
}
} | 0 |
d76d082a7af486107e446a3b2882a9ec | 4c862c31d8e30ec4fc6c9557300983f1 | при добавлении новой цены.
<i>Вызывается в методе:</i><br>
<a href="http://dev.1c-bitrix.ru/api_help/catalog/classes/cprice/add.php">CPrice::Add</a> | {
$el = new \CIBlockElement();
$el->SetPropertyValuesEx($id, self::IBLOCK_ID, ['PRICE' => $price, 'COST' => $cost]);
} | 0 |
eaa73d7ee08397a562b76ca393b0bcd5 | 1876e57b14f75e5eb3fe8e4bd46b630e | 將指定的關連值放入連動欄位 | _valueLink (v) {
if (this.formItemType === 'childForm') {
this._valueLinkByChildForm(v);
} else {
this._valueLinkByForm(v);
}
} | 1 |
6396d21eeff168a8cadc3a597f5288c3 | c08b19a26fdda51ab6e25451d89102e1 | checks if the cluster is single site or multisite
return: True is multisite else False for single site | abstract class WSAL_AbstractSensor
protected function IsMultisite() {
return function_exists( 'is_multisite' ) && is_multisite();
} | 1 |
6d13016301a6f267641913702c23a7c2 | 484ae45f44e5d15f0f9d9bb4f91118bf | Find Time Exit - Time Entry | q="""SELECT in_date ,in_time FROM records WHERE out_date IS NULL """
cur.execute(q)
row = cur.fetchone()
in_time=str(row[1])
in_date=str(row[0])
in_time_complete_object = in_date+" "+in_time
print(COLOR["BLUE"]," ","IN DATE :".rjust(20," "),in_date,"IN TIME :".rjust(15," "),in_time)
now = datetime.now()
cu... | 1 |
a87303ef70493ef0a796e30417671474 | 782d2496f8ced1015e0f96fc0746434f | Returns the meta object for the reference '{@link SQL2003_V3.CollectionType#getType <em>Type</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getType_CollectionType(); | 1 |
d56a08cd342861c08f830deb2b9671cd | 68c5ea27d7461a3e5ea1c9e6c2dd037e | Get the list of revision IDs that were associated with deleted titles. | result = set()
result.add(title)
re_link = "\\[\\[([^\\]]+)\\]\\]"
re1 = ".*verschob die Seite %s nach %s.*" % (re_link, re_link)
re2 = ".*hat „%s“ nach „%s“ verschoben.*" % (re_link, re_link)
regs = [ re.compile(re1), re.compile(re2) ]
for x in self.revisions(tit... | 0 |
9ff8d248262fc370a72acc133b0dbe4b | 18616725d553cc3e04a0de28796715ba | 获取learner_status | const tableRows = $('#pane-learner .el-table__body .el-table__row');
const dataSource = [];
for (let index = 0; index < tableRows.length; index++) {
const rowVal = $('.cell', tableRows[index]);
dataSource.push({
name: rowVal[1].innerText,
selectScore: rowVal[4].innerText,
totalScore: row... | 0 |
3926ca722e271cb4ac3bfbc29aae02eb | 6d90c8ee81f69e882a2d61b51607e1b1 | Program show what factor of a number is the greater prime number
Requires a number
Prints the greater prime number according the joined number | {
int i,PrimeNumber,InputNumber;
int Prime[50];
int X;
PrimeNumber=0;
InputNumber=FirstInputNumber;
for(i=2;i<=InputNumber;i++)
{
if(InputNumber%i==0)
{
Prime[PrimeNumber]=i;
PrimeNumber++;
InputNumber=InputNumber/i;
i=1;
}
}
X=1;
i=0;
while(FirstInputNumber!=X)
{
... | 0 |
c80bd2b4164bbc74fb6847212760841c | 6645e453a6b380f3db738025e63fdd22 | responds to LEFT mouse clicks on the chart | void MousePlot(GLint button, GLint action, GLint xMouse, GLint yMouse){
if (iMode==1 && button == GLUT_LEFT_BUTTON&&action == GLUT_DOWN){
rx = xMouse;
ry = WinWidth - yMouse;
glutPostRedisplay();
}
} | 1 |
09cc35dc9759e404a6972709bd6b766d | 371fb2ab30b3a7721bd487df833130c2 | SDiff returns the members of the set resulting from the difference between the first set and all the successive sets. | if len(HashSets) == 0 {
return NewHashSet()
} else if len(HashSets) == 1 {
return HashSets[0]
}
r := HashSets[0].Duplicate()
for _, IntHashSet := range HashSets[1:] {
IntHashSet.Lock()
for e := range IntHashSet.Val {
r.Val[e] = true
}
IntHashSet.Unlock()
}
return r
} | 0 |
ef70591c259e5c0d8b080bc8ed7014b1 | 95555964f9675708e1501f14fddca7e1 | @brief Stop ongoing P2P device discovery or other operation (connect,
listen mode). Like a soft reset. | acfg_status_t acfg_p2p_flush(acfg_wsupp_hdl_t *mctx)
{
return acfg_stringize_cmd(mctx, "P2P_FLUSH");
} | 1 |
6e524a152242d0671e55d632d8393605 | e7a8f1195c1b8f7e52b5a1626d8b4768 | Calculates the total scattering rate for L valley minus self-scattering | ivector = self.coefficients['ivector']
jvector = self.coefficients['jvector']
Nz = self.coefficients['Nz']
sdlgle = numpy.sum(self.P_gldm / ((ivector[None, :, None] ** 2) * (jvector[None, None, :] ** 2)), (1, 2)) / Nz
return sdlgle | 0 |
f4acde8446cff32e23b10cd369e6cd0c | f756374ef64e23de470cf0967fa3fc37 | 根据单据流程节点统计各个节点当前数量 | class Project extends Api
public function countByNode()
{
try {
$this->returnmsg(200, 'success!', \app\api\model\ProjectNode::countByNode());
} catch (DbException $e) {
$this->returnmsg(400, $e->getMessage());
}
} | 1 |
bcd8a19d204250a686ffc4759d9260b7 | 647f66d61a77c26cd0aa56b7615b6847 | Transitions the underlying <see cref="T:System.Threading.Tasks.Task`1" /> into the <see cref="F:System.Threading.Tasks.TaskStatus.RanToCompletion" /> state. | namespace System.Data.Entity.Utilities
#endif
public static class TaskExtensions
public void GetResult()
{
_task.GetAwaiter().GetResult();
} | 1 |
6a0fce44f47003340e27331a69ff35ff | d5987c01a352a0978183761bf37f2def | Fetches a list of books from the OpenLibraryAPI based on a book title | def get_book_titles(book_name):
db = get_db()
books_collection = BooksCollection(db.books)
books = books_collection.get_books_by_title(book_name)
books_with_regex = []
if books.count() == 0:
books_with_regex = books_collection.get_books_by_regex(book_name)
search_results = utils.return_t... | 0 |
d66dcd4b315a93fde3087dd5106fa5ec | 021e0a27eab38eaa94a673a3e6b59802 | メニュー遷移のリクエストを送る | namespace NUInsatsu.UI
public partial class PrintDocMotionPage : Page
private void TransMenuPage()
{
Action transAct = ()=>
{
Free();
NavigationService.Navigate(new MenuPage());
};
Dispatcher.Invoke(transAc... | 1 |
b33088c6be8af2e88e82dabce5f07cee | daef4e95574e0edd0593e55515c584f0 | Reverses a message that has been transformed by this transformer. | {
Logger.Warn( "override this method to transpose message" );
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.