query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
77694cc63d6db7db3428e96d1cc139dd | b7287af43a70536c45b6b9a8e1c32f1e | Test whether the current clause passes or fails. Returns
either True or False.
Usage:
if clause_rule.is_passing:
# do something... | class Case_Clause_Atomic(VBA_Object):
def eval(self, context, params=None):
if (context.exit_func):
return
test_val = params[0]
if (self.is_else):
return True
if (self.test_range):
start = None
end = None
try:
st... | 1 |
ed45edda4bdaeb2a4510261ae252ed93 | a08df43f6d66366274d3e7fb8e4a9fe5 | Main instance of WP Carousel Pro
Returns the main instance of the WP Carousel Pro. | static $instance;
if ( $instance === null || ! ($instance instanceof Responsive_Lightbox) ) {
$instance = Responsive_Lightbox::instance();
}
return $instance;
} | 0 |
ba2012ade34a0146d9423e7ef84f6fd9 | 89856b55669b9d51bcab607c378cf1de | Take this exception and store it as an error in the result backend.
This unifies the handling of broker-connection errors with any other
type of error that might occur when running the task. So the same
error-handling that might retry a task or display a useful message to
the user can also handle this error. | static void handleErrorResponse(Message message) {
BrokerClientException brokerException = new BrokerClientException();
brokerException.addMessage(message.getMessage());
throw brokerException;
} | 0 |
810c1ae556d4709ebe88b57bae54fa42 | 783a50d8d4c86764308c1180a39e05a9 | Verify Shapefile Integrity | assert geom_type in ['Point', 'Line', 'Polygon'], 'invalid geom_type'
assert isinstance(gdf_name, str), 'gdf_name is not a string'
assert 'geometry' in gdf.columns, 'there is no "geometry" column'
separator = '----------------------------------------------------'
print(gdf_name, 'has duplicate rows:... | 1 |
81f89ce674f7c53cd74de08e0eb663af | 4d9d73fe03bc45f236d2d34b9ba989f2 | @brief 导入课程信息 | def import_course(courses):
count = 1
course_list = []
for course in courses:
if course not in course_list:
course_data = TransferCourse(count, course[0], course[1], course[2])
course_data.save()
count = count + 1 | 1 |
8c5f082d430e4159083c190e9d193794 | 65b0cd39db9db04e9da94547d340c8bc | 电池出库订单记录详情接口 | {
$StoreOutEntity = StoreOutModel::where('order_id',$orderId)->where('status','<>',2)->first();
if($request->has('page') && !empty($request->get('page'))){
$page = $request->get('page');
}else{
$page = 1;
}
if($request->has('pageSize') && !empty($reque... | 1 |
3474ff9b1902d19bc1b5a12f55baf5f9 | 08cbb56e86338d7495d0c0a93fbe623b | Renvoie l'URI de base à utiliser
$forceMode TEST/PROD pour forcer l'utilisation d'une des 2 plateformes | class DejalaConfig
public function getRootServiceURI($forceMode = NULL)
{
$l_serviceURL = NULL;
$useMode = $this->mode;
if ($forceMode && ($forceMode == 'PROD'))
$useMode = 'PROD';
elseif ($forceMode)
$useMode = 'TEST';
if ($useMode === 'PROD')
$l_serviceURL = $this->serviceURL;
else
$l_service... | 1 |
b7526224ae559d3b9cc2628f5b5674a6 | e9e9a43288bc22a0a46214f33367ee33 | Get Instance login settings. | class LoginAccount implements ModelInterface, ArrayAccess
public function getLoginAccountSettings()
{
return $this->container['login_account_settings'];
} | 1 |
b8459cd75ae05c9cbef2ef9b4c5e463c | 49ee4ac35cfd94574d2ee1fa4bd9454b | Gets the products array from localStorage | export class ProductService
getProductFromCart() {
return JSON.parse(localStorage.getItem('product'));
} | 0 |
6c56dafa368da90b51461b17d17f5d2d | 7a44303f0c3cda74544df75970942790 | Increases the current attack delay. | public abstract class Hero
public void increaseCurrentAttack() {
this.currentAttack++;
} | 0 |
91760ee61ff8d12e1bccbe59a7d56584 | 469ca2cd659ef1089265eb85abf4e0c0 | [hideRules : Oculta las reglas de validación de los campos del formulario que no hayan sido alterados] | function btn_guardar(){
jQuery.validator.messages.required = 'Campo obligatorio';
$('#form').validate({
rules: {
fecha_entrada: {
required: true
},
nrohabitacion: {
required: true,
},
}
});
} | 0 |
45f89280b3f7e028e0c16f5651b5c5ae | ef64b9a029f63db6387e95a05f07ae8e | \brief Check for the presence of the OneShot feature
\ingroup camcore | {
const unsigned int k_triggerInq = 0x530;
Error error;
unsigned int regVal = 0;
error = pCam->ReadRegister( k_triggerInq, ®Val );
if ( error != PGRERROR_OK )
{
}
if( ( regVal & 0x10000 ) != 0x10000 )
{
return false;
}
... | 1 |
afb20b5f2aab54fcfce001ecaa448ee5 | f2b1ad54bbd9a2babd59822a0ad4942d | Returns subscriber type | public function getSubType(){
return $this->getParameter('sub_type');
} | 0 |
ae9d35d17a76b3434f1f2e69801de3ed | 211c8db8eeda384cbdf568cf0bc23db1 | 邮箱认证第二步提交 | {
$id = I('id', false, 'int');
$code = I('code', false, '/^\w{32}/');
if ($id && $code)
{
$map['id'] = $id;
$map['code'] = $code;
$map['type'] = 1;
$info = M('Code')->where($map)->Field('use_id,content')->find();
... | 1 |
e9e06aacd02faa2062de8aa44aaab3ff | 5caa0862878792cd49af5fec43ffc75d | Read a jpeg from an input stream | {
int result = -1;
const string typeTag = "Content-Type:";
const string lengthTag = "Content-Length:";
int lengthTagLength = lengthTag.Length;
string header = ReadHeader(stream);
if (header == null)
{
return -1;
... | 0 |
f4da814bfd4c43ae9acdf697b24bcad6 | b43fea32814aac5b5d7ab30375381bac | Tests the DumbComputer.process_instructions function with the
big provided example. | String instruction = "up move 5 and down run 10 and left move 5";
InstructionHandler handler = new InstructionHandler();
handler.handle(instruction);
System.out.println(handler.output());
} | 0 |
c1d4803703fc2e85fd0d3455cfb40c54 | 8fb1f759ec2b0ecf81d8953705866c8d | Call this method to let resque-yat that a call was made that
should count against the rate limit. | class RequestLimiter
private function _increment() : void
{
$this->_requestCount++;
if ($this->_requestCount === 1)
{
$this->_timekeeper->start();
}
} | 1 |
fa905c77a48190256bc21a384260526f | 5cfc9e09442ce24c5fde6d56f7cd5159 | Context manager for switching between another repo and Chromium src.
No-op if the --bisect-repo option is not used, otherwise changes directories
to the specified repo's directory, then returns to the original directory when
the context is left. | @wraps(f)
@sandboxed
def _inner(self, *args, **kwargs):
root = os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
src = os.path.join(root, 'fixtures', fixture_name)
dest = os.path.join(self.sandbox, fixture_name)
shutil.copytree(src, dest... | 0 |
41006f929ecddce33afde3be54c2c574 | 170835245501397143a81b1b953a7ad1 | 根据url获取该链接下分享的文件和文件夹 | {
set_time_limit(120);
if (!empty($body['url'])) {
$url = $body['url'];
$downloadUrl = $url;
$curl = new Curl();
$curl->get($url);
if ($curl->http_status_code == '200') {
$url = urldecode($url);
$url = str_r... | 1 |
95bac54d8284c492a3e8162a249edcfa | 76a8450b299b54295138ef7c1962f256 | 计算公交价格 | try:
import gevent
from application.uber.uber import get_uber_price
from application.tfs.tfs import get_tfs_price
from application.ola.ola import get_ola_price
start_latitude = request.args.get('start_latitude')
start_longitude = request.args.get('start_longitude')
... | 0 |
8185ad2068d055d589c3473a6301491e | 8780927fbd17479610e50c11b878a11e | Normalize the collector data as much as possible. | class DelegatingCollectionNormalizer implements CollectionNormalizerInterface
public function normalize(CloverCollection $clovers) {
if ($normalizer = $this->resolver->resolve($clovers)) {
$normalizer->normalize($clovers);
}
} | 1 |
fd58a7dc62e697473de119c071350b5c | cf3a7dfeb01a91fbe1bafd458b8977b5 | 下载管理与城市列表的切换 | this.setData({
city_list_index: e.detail.value,
});
let k = this.data.city_list[e.detail.value].name;
this.data_play(k);
wx.setStorageSync('user_district', k);
this.choo_anima();
} | 0 |
eb4e9ef26cdd50851519f46c1b903d8c | 1ba957f8345dfe340e426d7f97dbe625 | Retorna true si tiene permisos para usar el GPS. | final LocationManager manager = (LocationManager) context.getSystemService(Context.LOCATION_SERVICE);
if (!manager.isProviderEnabled(LocationManager.GPS_PROVIDER)) {
return false;
} else {
return true;
}
} | 0 |
7ca89504e9c8976139d0bea9f7192028 | 8fc34b9b6d4574b5a12358c32e61e055 | Generates a string based on `$template` content and current `$model` attributes.
You can specify any number of attributes enclosed in { and } (e.g. {alias_name}).
Of course, attribute should exist in current `$model`.
You can use "dot" notation to specify relational attribute (e.g. {category.alias_name}).
It support ma... | try {
StringWriter result = new StringWriter();
template.process(model, result);
return result.toString();
} catch (Exception e) {
throw Exceptions.unchecked(e);
}
} | 1 |
7871c75a332f997810d0e03de1ea9b51 | 17fb361290424da9ec69b6e7a1130dd1 | マップをドラッグした場合の処理を行う | {
float prevMapX = calcMapX(e.Location.X);
float prevMapY = calcMapY(e.Location.Y);
float prev_scale = scale;
if (e.Delta > 0)
{
if (scale < 10)
{
scale += 1;
}
else if... | 0 |
5f12aeaa23502ceb007e016f23ff906f | ac1e811a3eaad4295d32ac4ebc1539b0 | Additional SQL feature settings. | {
$this->add_features = (array) $feature;
add_action( 'init', array( &$this, '_add_post_type_support' ) );
return $this;
} | 0 |
826b0c398d603add43c177d0dd709e98 | ccbfcfcb99f5213de28c017ce9cebd7c | Returns the index of the right most leaf object in the heap | class SumTree:
def _rightmost_leaf_index(self):
if self._num_appends == 0:
raise IndexError("function is not defined on empty trees")
return len(self) - 1 | 1 |
1858e01ad85791a254fa6c9f8dc3fd29 | d89866d2ea9c6fedac4214c1f7953c73 | Obtiene la cantidad de veces que un elemento aparece en la bolsa. | namespace TGC.Group.Model.Crafting
class Inventory
public int cuantosTenesDe(ElementoRecolectable elemento)
{
Item item = Recolectados.Find(x => x.tipoDeElemento() == elemento);
if (item != null)
return item.Amount();
else
return 0;
... | 1 |
2874d6cca026003854d5d966f0952b4d | 6c28991bbe841a5b8d30303ba573b721 | Returns the meta object for class '{@link model.Exemplar <em>Exemplar</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getExperiment(); | 0 |
0f04347b6e8ee2e6e34936ac84d93057 | 2685d13028c3dbeeb8584d43b6652ccd | Get Social Form Group given the Social Form code | class MageBridgeConnectorProductJomsocialGroup extends MageBridgeConnectorProduct
public function getFormField($value = null)
{
$query = "SELECT `name` AS `title`, `id` AS `value` FROM `#__community_groups` WHERE `published`=1";
$db = JFactory::getDBO();
$db->setQuery($query);
$optio... | 0 |
937b349edb24ec6536ba647e445d7c9c | 47e6ab455cd0edfaa6516439856b38c2 | Computes an upper bound on the weight of a satisfying witness to the
transaction.
Assumes all ec-signatures are 73 bytes, including push opcode and
sighash suffix. Includes the weight of the VarInts encoding the
scriptSig and witness stack length.
# Errors
When the descriptor is impossible to safisfy (ex: sh(OP_FALSE... | var size = sizeCalculator.outputSize(type)
size += when (type) {
ScriptType.P2WPKH,
ScriptType.P2WSH -> {
sizeCalculator.inputSize(ScriptType.P2WPKH) + sizeCalculator.witnessSize(ScriptType.P2WPKH) / 4
}
ScriptType.P2TR -> {
... | 0 |
57c35b44b1362b2adf4b0aba46d02a6b | 7b154ede0d89ab49c00e6a2846c15b07 | enable/disable the combo box depending on which radio
button is selected | {
switch (Convert.ToInt16(comboBox1.SelectedItem))
{
case 1:
textBox2.Enabled = true; textBox12.Enabled = true;
textBox3.Enabled = false; textBox13.Enabled = false;
textBox4.Enabled = false; textBox14.Enabled = f... | 0 |
b60b0b5a369d35e8764844e88c4dc951 | c2d7d2d95589e21e761e94b5f5317b58 | 获取所有的数据库片段 | List<Fragment> getAllFragment(); | 0 |
8081277cc56df6eb45ddc23da5f0983e | ba41720d1d40a703b8b160fee8e40b14 | Counts number of possible jumps to free field (i.e. without knight) | {
int count = 0;
for (auto i = 0; i < Board::pieces.size(); i++)
{
if (!Board::pieces[i]) continue;
for (auto j = i + 1; j < Board::pieces.size(); j++)
{
if (!Board::pieces[j]) continue;
if (solve and count)
{
return -1;
}
if (Board::pieces[i] == Board::pieces[j] |
std::abs(Board::pieces... | 0 |
703935242f4a6ce5e6982a2aedd85a84 | 8bfb0b237c39dd81089f199625c214fb | Strips any protocol-relative '//' from the anchor text.
protocol-relative prefix (such as stripping off "//") | $proto = preg_match('%^\s*https://%i', (string) $value) ? 'https':'http';
return preg_replace('%^\s*(?:.*?://)?([^/?#]+).*$%m', '\1', (string) $value);
} | 0 |
c96eab8bfaf4680945bea7fecd078d72 | 953c2f6ca7eba2c23dfccd14801f8d18 | Resolve interface and callback interface on a list of abstract contracts. | class Application extends BaseApplication
public function fireBeforeResolvingCallbacks(string $interface)
{
foreach ($this->beforeResolvingCallbacks as $callback) {
$callback($interface);
}
} | 0 |
35c127663494a6a59181ba5dccd05551 | dc7e55feda426bfb64d33fac01412a67 | 修改代理商信息
<param name="tbAgent">代理商信息</param> | namespace Hy.Erp.system.Dao
public class BOOKSAGENTSDao : MapperDaoSupport, IBOOKSAGENTSDao
public void Update(BOOKSAGENTS BOOKSAGENTS)
{
MapperTemplate.Update(BOOKSAGENTS);
} | 1 |
d99efa61fa06ce02064e4c5a98a8e101 | 9783ec35517e9e67da7edb48761dd34e | 60FPS修复 | float frameTime = deltaTime;
while(frameTime >= 1 / 60f) {
changeRatio();
frameTime -= 1 / 60f;
}
} | 1 |
52589b5db92e4d2c51b79b289aade865 | 67540c4cfc09d69649f881443974af6c | オブジェクトをデフォルト通貨、言語で初期化 | class Currency extends Number
public function __construct()
{
$this->locale = self::DEFAULT_LOCALE;
$this->symbolFormat = self::SYMBOL_FORMAT_NATIONAL;
$this->negativeFormat = self::NEGATIVE_FORMAT_PLUS_MINUS;
$this->setPrecision(2);
} | 1 |
9918ae2625a55662378163921c5b6de2 | 11ef3248fc78d78a30358826f86818ce | copied from CPython 3.10 | def _module_repr(module):
loader = getattr(module, '__loader__', None)
if spec := getattr(module, "__spec__", None):
return _module_repr_from_spec(spec)
elif hasattr(loader, 'module_repr'):
try:
return loader.module_repr(module)
except Exception:
pass
try:... | 1 |
faf1588c3ffcad97efe0462cb57cbf3f | 084cfe5d72690190afeb0b93a87acd93 | Helper method to parse a float string representation that has
a comma as decimal separator.
Can't use locale as the page being parsed could not be in the
same locale as the python running environment | class OfferItem
def fcomma(value)
if value.present?
value.to_s.gsub(',', '.').to_d
else
0.0
end
end | 1 |
d324d803d9ec2a0de09d2a703182d771 | 996bb71703a665526433338682e91f12 | Returns the set difference of two vectors | class Vector
function difference($vector) {
$vector->replacePoints(array_map(array($this,'negate'), $vector->getPoints()));
return $this->sum($vector);
} | 0 |
0cbd94da4c6af89b3ff558839151abef | 14b7b4646a6f74b0d32ced389434d5be | Retorna una lista con los eventos de un torneo grupal | {
ArrayList <GroupEvent> ans = new ArrayList <GroupEvent>();
String query = "SELECT * FROM Spartan.GroupTournamentEvents WHERE idGroupTournament = " + idTournament + "";
try
{
ResultSet rs = dbService.sendQueryToDB(query);
GroupEvent Ge;
int idEvent;
String date;
String state;
String place;
... | 1 |
f3a7a5d7a29615752d53d527d635906a | ef0e4012dabecd2830e3470479e7fd4d | Так как куку нельзя установить после вывода данных
То реализован механизм отложенной установки куков
Который отработает при следующем запросе
Где-то идет вывод данных и не стали тратить время на поски | {
Yii::$app->user->login(User::findOne(['username' => 'test_user']));
$date = '2018-10-18';
$type = 1;
$dataBeforeUpdate = $this->selectSomeData($date, $type);
$cachedDataBeforeUpdate = $this->selectSomeDataCached($date, $type);
$model = SomeDataModel::findOne(['user_... | 0 |
37a338caa2cf124fb18ecd2f65bbde04 | 2206b7e70f8e5a74dde6a7c2d248a713 | Sets png_path | class form_builder_Core
public static function set_image_path($data) {
self::$image_path = $data;
} | 0 |
83cdbb754484d3d91bf8818c979a6d85 | 83a58f2b92afbce4b3e2f114f67efa6b | Convert feature ids to features | retval = []
for r in rules:
tokens = r.split(" ")
for i, t in enumerate(tokens):
if t.startswith("feature_"):
ft_id = int(t.strip("feature_"))
tokens[i] = orig_features[ft_id]
retval.append(" ".join(tokens))
return retval | 1 |
689315abd119dd792c6e8c4425f24f43 | f4d251fb262841408e365b2c6d47bbce | controlla se hanno stessa dim o stesso inode | {
int u = 1, i = 0;
while(i < nn && u)
{
if(v1[i].codice != v2[i].codice || strcmp(v1[i].nome, v2[i].nome) != 0) u = 0;
i++;
}
return u;
} | 0 |
1d26a9f460d5cec3fa36b52c999b044f | 30d0eb57f17ac2daf7c26461f5f2616d | 将一个结点存储的超额流传递给与其直接相邻的结点
相比于增广路径,侧重于修改当前点的流量,尽量地清空超额流 | {
for(int i=ed;i!=st;i=edge[path[i]].u)
{
int pair=path[i]^1;
edge[ path[i] ].flow+=aug[ed];
edge[ pair ].flow-=aug[ed];
}
point=st;
return aug[ed];
} | 1 |
d0c7b59ae6768e45b4ca03d97b3ce545 | 8bfb829f777959208a28fcb51e2a9b90 | Deletes picked models. | class osc::MeshImporterTab::Impl final : public LayerHost
void DeleteSelected()
{
::DeleteSelected(m_Shared->UpdCommittableModelGraph());
GarbageCollectStaleRefs();
} | 1 |
1d79b1b0680c8af762c76a846088882d | 2049a06a5ba947908f9a77b47d20b979 | Inner product similarity | self.vector()
self.delsim()
sum = 0
for key in self.vector1:
sum += self.vector1[key]*self.vector2[key]
a = sqrt(reduce(lambda x,y: x+y, map(lambda x: x*x, self.vector1.values())))
b = sqrt(reduce(lambda x,y: x+y, map(lambda x: x*x, self.vector2.values())))
... | 1 |
e1cbf5167e96f3e807400a979ef94d9b | f1b17b5a27e6bafbf47db58721820aac | Returns the value of the '<em><b>Rx</b></em>' containment reference.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Rx</em>' containment reference isn't clear,
there really should be more of a description here...
</p>
<!-- end-user-doc --> | String getRx(); | 1 |
328c376d8da0aad1491ac3c157c953de | ba7b5eef4a4c46452bdfcb80006518c1 | Load YOLO's inference graph into memory. | with tf.gfile.FastGFile(os.path.join(
FLAGS.model_dir, 'classify_image_graph_def.pb'), 'rb') as f:
graph_def = tf.GraphDef()
graph_def.ParseFromString(f.read())
_ = tf.import_graph_def(graph_def, name='') | 0 |
a87318c80eeaa9a895cf2b7e77c726e3 | 6c6f9e3acbf7ffb1e269d97bedc78957 | 单链表长度 | {
int count = 0;
LinkNode *p = s;
while (p = p->next)
count++;
return count;
} | 1 |
2198924326e94e2ee9d8cf18e42e02c2 | 9cd130806318c81f1b798d266f7ad310 | Delete all events according to the indexes. | int numDeleted = 0;
if (eventIds != null) {
for (Long eventId : eventIds) {
if (eventId != null) {
numDeleted += setEventDeleteFlag(eventId, delete);
}
}
}
return numDeleted;
} | 0 |
b6db209fa6afe1580606831f5f216f20 | 5dc57c8dc3d039f083afa353da1756ff | Returns a constraint that tests whether the
actual value is greater than or equal to the supplied argument | namespace NUnit.Framework.Constraints
public class ConstraintExpression
public GreaterThanOrEqualConstraint GreaterThanOrEqualTo(object expected)
{
return (GreaterThanOrEqualConstraint)Append(new GreaterThanOrEqualConstraint(expected));
} | 1 |
1550f71b21be56c04d721d097ca691bc | 9a0fb396a7968393aab50caf24e4745e | 根据选中测量端口,更新显示的端口参数 | namespace AttCon
public partial class Form1 : Form
private void comboBox1_SelectedIndexChanged(object sender, EventArgs e)
{
SetSerialPortName();
richTextBox1_toString(Function.paramvalue.changePort);
} | 1 |
8ff164bc40cb3d8d6fba3aee6cf7714a | 157ec8307cada384244fc632cd7ed402 | Activate event loop integration with this VisPy application. | class Application(object):
def go(self):
if not self._setUp():
return
if self._isPsycoEnabled():
self._activatePsyco()
self.root.startRendering() | 0 |
47fa119c63d39971b429a45e9d0f8ca4 | 1fc58d09834edf5504bb2a298bdf362c | конструктор моей модели - устанавливает колличество столбцов | int ZArrayModel::columnCount(const QModelIndex & parent) const
{
return 3;
} | 0 |
7655a2764867dafa23f20ce5b7a6ec7c | cf62a973fdd72c38bd5c7d61b6fdbcb1 | 位置指定右マウスアップ
Simulates the event that occurs when the user releases the right mouse button (i.e., stops
holding the button down) at the specified location. | namespace Metatool.WindowsInput
public class MouseSimulator : IMouseSimulator
public IMouseSimulator RightUp()
{
var inputList = new InputBuilder().AddMouseButtonUp(MouseButton.RightButton).ToArray();
SendSimulatedInput(inputList);
return this;
} | 0 |
4233ef8763c11eb7163afc1f7d8c5c39 | 73710f73633ec31ca38d653b08a84e54 | Event fired internally when the user attempted to make a change to
the edit box that would have caused it to fail validation. | function onEdit(e){
updateDynamicValidationListIfNeeded(e);
} | 0 |
50dfe64f697f440eb3f2c54743051e82 | ceb528befcd95d80c85aff76c610852e | 绑定资源中间件 | {
$parameter = $parameter ?: strtolower(class_basename($model));
$middleware = [];
foreach ($this->resourceAbilityMap() as $method => $ability) {
$modelName = in_array($method, ['index', 'create', 'store']) ? $model : $parameter;
$middleware["can:{$ability},{$modelNam... | 1 |
7452a08ce39152bda88b9c01a31743af | 9a9d89c8002b4869072687795e89d968 | returning all elements names from
``ConditionDefinitionPrecondition`` according specification,
with preserving original sequence order. | class ConditionDefinitionPrecondition(backboneelement.BackboneElement):
def elements_sequence(cls):
return [
"id",
"extension",
"modifierExtension",
"type",
"code",
"valueCodeableConcept",
"valueQuantity",
] | 1 |
a799bfbb21d4100df8617f05d48001ea | 1c0b9d0a8d8e54df09402323fce17612 | Tự động tìm kiếm FeeAmount | namespace RFD.FMS.WEB.AudiMgmt
public partial class FinancePaymentConfirm : FMSBasePage
protected void btnSearch_Click(object sender, EventArgs e)
{
Search(SearchType.Total);
} | 0 |
cd92787582c2786f15c05af01d88f97e | c6e679cf3c84211383e9f8fcde502293 | Dominican Republic Flag | def paint_flag_bosnia_herzegovina():
f = FlagPainter(1 / 2)
background_color = (14, 19, 150)
triangle_color = (251, 207, 0)
star_color = WHITE
f.background(background_color)
points = [(106 / 400, 0), (306 / 400, 0), (306 / 400, 1)]
f.draw_polygon(points, triangle_color)
x_start = 60 / 40... | 0 |
6aa72de2d2c477bb8573dbc623a13952 | 9a44bda70c66346d5ac53116f6ab187c | 验证服务器响应时间小于1S | if (abs(time() - $this->params['time']) > 180) {
$this->apiReturn(8001);
}
return $this;
} | 0 |
a570e2713077ae38358bb8416798822d | 5c6463923245b217d3ac9b9d0915d87a | Charge dans cache la liste des types de paiements possibles | public class PaymentAware implements ApplicationContextAware
private void preparePaymentTypes() {
Map<String, PaymentApi> paymentApiList = this.applicationContext.getBeansOfType(PaymentApi.class);
paymentApiList.forEach((key, value) -> {
PAYMENT_MAP.put(value.getPayType(), value);
})... | 1 |
2e86e3d30bec9dcce0750bc59a4d291b | 474a2f13ce9e5aa4c7b57b88f59a8dea | function returns, if possible, the name of the function containing the PC. | import sys, dis
frame = sys._getframe(2)
code = frame.f_code
lasti = frame.f_lasti-3
oldout = sys.stdout
sys.stdout = open('log','w')
dis.disassemble(code, lasti)
sys.stdout.close()
sys.stdout = oldout
fd = open('log')
for line in fd:
if line.startswith('-->'):
... | 1 |
4d879616e557bd73889779b7139dc946 | ac983d836fda7d251fd76048b63aa24d | Handle SIGQUIT, sent by systemctl stop | def quitHandler():
sys.stderr.write("Recieved a SIGINT!\n") | 0 |
b9d0ede572ba83b5e630ca0cc16c2dd4 | e911a6fd55dca91ad5925a64ada0ecc6 | Set or Clear the Modem PowerKey pin | {
if( bc66 ) {
bc66->control_lines.MDM_PWRKEY_N(1);
bc66->func_delay(500);
bc66->control_lines.MDM_PWRKEY_N(0);
}
} | 1 |
12a5ac93a0c5b8a199fff6764808d479 | b98a4d68933fb7109df45535d80238e1 | This API will do the following
Creates handle for the requested external FTL- region.
Creates physical block to logical block mapping.
Creates spare block array for bad block management | {
Uint32 idx;
Uint32 totalBlocks;
Uint32 badBlocks;
Ptr hLlcObj;
Int32 result = IOM_COMPLETED;
Bool flag = TRUE;
do
{
assert(NULL != ftlObj);
flag = FALSE;
if (NULL == ftlObj->hLlcObj)
{
re... | 0 |
3170d55a6c7f0cd8c79e0ad55b9564da | 08447fab325c5400fc7e083119c52d4e | Return 'p1' if the current player is Player 1, and 'p2' if the current
player is Player 2. | public class Othello_2P extends JApplet
private String getTurn()
{
if( p1Turn == true )
{
return "P1 (B)";
}
else
{
return "P2 (W)";
}
} | 0 |
bb7ead19fb21a8e5523bd2f95f14826c | 6b2590e22fd27e7012679ac16ac67cac | 是否取消报文,如果报文还在队列中的化那么删除该报文,如果报文
正在处理,那么根据mayInterruptIfRunning参数来决定是否中断处理 | void cancel(boolean mayInterruptIfRunning); | 1 |
b2f3f609f40671e8da50338e4e317c0a | e842d4e6d34fd70c9971a85d5829376a | Obtener eventos a los cuales YA este registrado el usuario | export class EventService
getMyEvent():Observable<any>{
console.log("entro en servicio de mis eventos")
return this.http.get(`${this.BASEURL}/api/evento/event/myshow`, this.options)
.map((res)=>res.json())
.catch(this.handleError);
} | 1 |
65f23922fd4c124fff3eb250023ad1d9 | 5ecdc07a6653aab83bcb825ae0876afa | Sets the maximum number of players per team | public class BreakoutRoom
public void SetMaxParticipants(Integer max) {
maxGroupSize = max;
} | 1 |
9475f4c63b7c0298b214fa39808c5591 | f6c6796bde72892d9a4590711d090d61 | Encrypt the data with the list of PGP keys, returning an armored string | (fin,fout) = os.popen2('gpg2 --yes --quiet -r %s -e -o %s' % (self.username, self.file_name))
for line in self.rawdata:
print >>fin, line | 0 |
248e7fb5b77954fcb1e3d031d63e62e3 | 42a06c19f455fdc265867ff7c07c0ca7 | Check that a bound var, propagates its binding into functors. | public class CallAndNotResolverUnitTestBase<S extends Clause, T, Q> extends BasicResolverUnitTestBase<S, T, Q>
public void testCallFunctorWithArgumentBindsVariable() throws Exception
{
resolveAndAssertSolutions("[[f(x)], (?- call(f(X))), [[X <-- x]]]");
} | 1 |
4f54d2c0d2deb3226ff7c12f2b16c44c | a206b6cd7285c1236784d3fac5b4522e | 创建新的WfContext, 原来的将被丢弃 | String id = getContext().getFlowId();
AttributeMap attributes = getContext().getFlowAttributes();
return getContext().getFlowArtifactFactory().createFlow(id, attributes);
} | 0 |
bcc0e597bb4b7b7103c901c21cbeb4c3 | 5edd60622026d9449c7cebcc95706354 | Create a new cache on the given network. | class Client(object):
def create_network(self, body=None):
body = self.serialize(body)
return self.do_request("POST", self.networks_path, body=body) | 0 |
84a40555c270cd4036cbfcfb6d1bd114 | 9127988b87be79779e90ef53368fe752 | fetch all available product on pointed tradingday | $this->Url .= 'all_trade';
$params = "api_key=" . $this->Api_Key . "&symbol=wtusdt&time=1564124760170";
parse_str($params,$post);
return $post;
} | 0 |
d4027ec50e5cdbfaa82be635067d7906 | f70eccf48f60014ab322f10579b86744 | 根据结束时间查询商品列表 | List<GoodsInfo> selectByTime(@Param("startTime") String startTime, @Param("endTime") String endTime); | 0 |
9c61b77d42fbf443a28891c5a90312fe | 20e7832b02d21ed5f896968d84f5a534 | Add file name pattern that, if set, a file must NOT match to be instrumented. Pattern matching
is done with the <c>PathMatchSpec</c> Windows function. | namespace Chutzpah.Coverage
void AddExcludePatterns(IEnumerable<string> excludePatterns); | 1 |
ebb35e7278febd2124e4afd2cc7608ad | 59134d29a487c4ee529274457a1a7835 | 换到注册页面 | void gotoRegister(); | 1 |
e07f544d8224b9ab285476d7a1363701 | 14a52bbbb7bdd0ec6c6b57281c6853a8 | Max length is 50 characters | class TrackerTable extends Main\Entity\DataManager
public static function validateLength50(): array
{
return array(
new Main\Entity\Validator\Length(null, 50),
);
} | 1 |
7b9b0e02de405adc6cc373d2fc8caffb | 16efb5e5f3a289620457eb9772d70295 | Echo a character back to the client and convert LF into CRLF. | void shell_putc(int c)
{
if (c == '\n') shell_putc_raw('\r');
shell_putc_raw(c);
} | 1 |
aab5a574357bcac3c8cb7bd732a8c1d5 | 24661e444e1b124e7f6939446af699c6 | 查找指定流程编号的主流程 | {
$flow_process = DB::connection('workflow')
->table('flow_process')
->where('is_del','=',0)
->where('flow_id','=',$wf_id)
->select()
->get()
->toArray();
$flow_process_first = array();
foreach($flow_process as &$value)
{... | 1 |
8239181ad64bda859aca5951552e041e | 09d3b058747d760943a92215e79b14ef | Step 4c: Confirm Challenge | {
console.log("doConfirm()");
var code_confirm = document.getElementById("code_confirm").value;
var payload_for_post = "user_email_address=" + window.user_email_address + "&" + "user_password=" + window.user_password + "&" + "code_confirm=" + code_confirm;
console.log("payload_for_post: " + payload_for_post);
... | 1 |
4b0d77281512331981b482f6026424ea | 4e1bf89daeda9370053e6eda03f709e9 | Method to retrieve the current values of the Incident data model
attributes. | List<EmergencyIncident> getCurrentIncident(); | 1 |
e7c2a0e39bf3044f6c21ac7b5a57a651 | 1b3d83e4869a58279f9aa64ac26c7e92 | This method can be overridden to implement FMU-specific initialization tasks that go beyond
just initializing parameters with static values. The default implementation is empty. | namespace SpiceSharp.Components.SwitchBehaviors
public class FrequencyBehavior : BiasingBehavior, IFrequencyBehavior
public void InitializeParameters(FrequencySimulation simulation)
{
} | 1 |
cf1ebe42a7a3ea7e1bf84f5db544a1e4 | fb671b1073631cf4a6058e58025b2a59 | 获取fragment中的WebView控件 | public class WebViewFragment extends SimpleUpFragment
public WebView getWebView() {
return mIsWebViewAvailable ? mWebView : null;
} | 1 |
395099b91fe425720b4355a7951e1979 | f8327b7681a24f5b96f46d347ee2a2f7 | Returns the value of the '<em><b>Its Data Variable</b></em>' containment reference list.
The list contents are of type {@link name.niu.guita.uisut.UIDataVariable}.
<!-- begin-user-doc -->
<p>
If the meaning of the '<em>Its Data Variable</em>' containment reference isn't clear,
there really should be more of a descripti... | EReference getUdtRef_UdtVariables(); | 1 |
4565346654f2608d4a21c6b64a5b8315 | 646837953a2890a23d26a53f1ddd94ac | Put TLV elements into management frames. | VOID
AmFillMgmtFrameHeader(
_In_ PAP_ASSOC_MGR AssocMgr,
_In_ PDOT11_MGMT_HEADER MgmtFrame,
_In_ DOT11_MGMT_SUBTYPE MgmtSubtype,
_In_ PDOT11_MAC_ADDRESS DestAddr
)
{
MgmtFrame->FrameControl.Version = 0x0;
MgmtFrame->FrameControl.Type = DOT11_FRAME_TYPE_MANAGEMENT;
MgmtFrame->FrameControl... | 0 |
759d2f8da076160daaa5a78ac9f66b17 | 48c908288eb7b5cb8063c30df6113abb | AABB-AABB test | static bool TestAabbAgainstAabb2(const btVector3 &aabbMin1, const btVector3 &aabbMax1,
const btVector3 &aabbMin2, const btVector3 &aabbMax2)
{
bool overlap = true;
overlap = (aabbMin1.getX() > aabbMax2.getX() || aabbMax1.getX() < aabbMin2.getX()) ? false : overlap;
overlap = (aabbMin1.getZ() > aabbMax2.getZ(... | 1 |
ac6800fc66499ddefac27717edf4a3ee | 5210c763714c3f80c397465e01de240a | 根据节点状态获得节点右下角显示的图片 | data = getNodeData(name, 't')
data.extend(getNodeData(name, 'a'))
data.extend(getNodeData(name, 'b'))
number_critical = number_warning = 0
if name in ['pos_machine', 'tais', 'mas']:
for i in range(len(data)):
if data[i]['alarm'] == 'critical':
number_critical += 1... | 1 |
8001708a31690ee4443eb6db219a68b7 | 0288f3491baa5432938c6760234c3942 | Checks whether the encoding-declaration exists in the specified file content or not. | String allText = file.getText();
for (int i = offset; i >= offset - 2; i--) {
if (allText.charAt(i) == '{'
&& (allText.charAt(i - 1) == '#' || allText.charAt(i - 1) == '$')) {
return true;
}
}
return false;
} | 0 |
b3be75c5b2d0ee8c1ecbe11bff5bea89 | ec36ee3d7e796efb9af8393303d00ba2 | Renders content suitable for a .gitmodules file.
Uses format compatible with Git submodules subsystem. | fork_repos, original_repos = fork_and_original
original_header(original_repos) + original_repos +
fork_header(fork_repos) + fork_repos
end | 0 |
2334ef6fb7074b8fe51d1e435035d005 | fcf61025d0b11b41bf51d32431bdedb6 | 把每个栏目前十名放进黄金榜 | function m:initData(top32,topOther)
if top32 == nil or topOther == nil then return end
self.top32_list = {}
self.topOther_list = {}
for k,v in pairs(top32) do
local temp = {}
temp.player1 = v[1]
temp.player2 = v[2]
temp.result = v[3]
temp.index = k
temp.d... | 0 |
041ea5dfeebf6b43105c0fa994a40520 | f39de6b4f0a7b614b2abbfc678617eb1 | Method to compute shipping cost | namespace TVC.ApplicationServices.Orders.Shipping
public static class ShippingCostService
public static decimal? ComputeShippingCost(Currency currency, string shippingMethod, string countryCode,
WeightInfo weight, string[] logisticTags)
{
throw new NotImplementedException();
... | 1 |
7fe15c2b897630c8a1f062e905d46166 | fe60f23b0e2a3d5aed2301bd4ca663ea | Returns the meta object for class '{@link com.b2international.snowowl.snomed.Concept <em>Concept</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EReference getDescription_Concept(); | 0 |
39364056a939dbb4946f941ca73321cc | 7a53e44273c615b8d4d0b658cb541069 | 攻撃モーション中で無ければいずれかのアニメーションを再生 | [RequireComponent(typeof(Animator))]
public class GoblinAnimationController : MonoBehaviour
public void AttackAnim( )
{
if (!CheckAttacking()) return;
if (_attackTime > 0) return;
int n = Random.Range (1, (ATTACK_TYPE + 1) + 3);
string[] attack = { "attack1", "attack2", "attack3" };
for (int i = 0; i < attac... | 1 |
4e8be618eb9b86f2a486f32b3279d0a8 | 94ebce632e1a5ea5366e4d245e355a8e | Actualizar la fecha de expiracion del Token | return new Promise((resolve, reject) => {
const ahora = new Date();
const tokenExp = new Date(fechaExp * 1000);
ahora.setTime(ahora.getTime() + 1 * 60 * 60 * 1000);
if (tokenExp.getTime() > ahora.getTime()) {
resolve(true);
} else {
this.auth.renewToken().subscribe(
... | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.