query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
837f817178a06598bea07f56afd5ea2c | 042bfda0a05e12b35064fd70ea1259e2 | On pré-installe les paramètres par défauts. | {
$resolver->setDefaults([
'data_class' => Parametrage::class,
'translation_domain' => 'parametrage',
'csrf_protection' => false,
]);
} | 1 |
a17568221166eea2c9ec7284141ac0f6 | 3880fd5bbb6aa551caf80fcc26399a54 | 根据给定的语义分割图,计算label的个数分布 | def label_distribution(trainFile="atec/training.csv"):
labels=read_cut_file(file_path=trainFile,with_label=True)["label"]
neg_count=labels.count(0)
pos_count=labels.count(1)
assert neg_count+pos_count==len(labels)
counts=[neg_count,pos_count]
labels=["不同义","同义"]
fig=plt.figure(figsize=(9,9))... | 1 |
b1031fc5c93946509d651b09749ecd9a | a5b3ef38571fa539f8f98907516ddf7c | insert adjustment values into their table | insert_arrivalmode(cur, conn)
insert_visatype(cur, conn)
insert_temperature(cur, conn)
insert_address(cur,conn)
insert_arrivalport(cur,conn)
insert_city(cur, conn)
insert_state(cur, conn)
insert_country(cur, conn)
insert_date(cur, conn) | 0 |
a252257295e4bf7acb5577e6624497e9 | 05093f1c6474562fea0d5809c053cdef | Replace the current process, executing PATH with arguments ARGV and
environment ENVP. ARGV and ENVP are terminated by NULL pointers. | asmlinkage long new_sys_execve( const char __user *filename,
const char __user *const __user *argv,
const char __user *const __user *envp)
{
return new_sys_execveat(AT_FDCWD, filename, argv, envp, 0);
} | 1 |
590db75c65a3b778ca0454ce3e1cf8f5 | c416578d5c086641fdac83903ef71c59 | OT1 = Original Tweets | def dotweet(t):
instream.write('1\n')
instream.write('%s\n' % t)
if len(t) < 15:
instream.write('\n') | 0 |
249dbd310a80c951510b227f4be63250 | 7cddc878885e83b48e057496883651ee | Time in this program is a minute number 0-((24*60)-1)=1439
This function should read in a time value and check its
validity. If it is not valid eg. not -1 or not 0-1439
It should print "Invalid Time" and return false.
othewise it should return the value in the integer pointed
to by time_ptr. | {
if (tm->tm_year < 70
|| ((unsigned)tm->tm_mon) >= 12
|| tm->tm_mday < 1
|| tm->tm_mday > rtc_month_days(tm->tm_mon, tm->tm_year + 1900)
|| ((unsigned)tm->tm_hour) >= 24
|| ((unsigned)tm->tm_min) >= 60
|| ((unsigned)tm->tm_sec) >= 60)
return -1;
return 0;
} | 0 |
712cf096c38b678e83cd395850dc37a8 | f3126a28f04a9f65e20545dbdad162ee | Add a branch layer to the model that provides the functionality of
branching or an ``if-else`` block.
Refer to the ``BranchLayerParams`` message in the specification (NeuralNetwork.proto) for more details. | def layer_add():
pass | 0 |
9e28917b4729e406f74298964bbb0e53 | 52e32ec62b82c4ddfcc766249757b671 | Stores the commands for an event.
All commands are considered to be executed in parallel. | class CommandsEvent extends Event
public function setCommands(array $commands): void
{
$this->commands = $commands;
} | 1 |
992ed8e02179029cf8c96d3c8a46b751 | 13cf9fbaa5a3ad31af7d093f0b0768dd | Collect all localization models. | {
$localizations = [];
foreach ($this->getLocalizations() as $child) {
$localizations[] = $child;
$localizations = \array_merge($localizations, $child->getAllLocalizations());
}
return $localizations;
} | 1 |
208b03233c3471a7198449975fdc0aef | 0fcfddbc803dd4f2bfc82c6315133fe1 | Open the island permissions menu for a player. | player.getPacketDispatch().sendCS2Script(917, new Object[]{-1, -1});
player.getPacketDispatch().sendRunScript(1105, "");
player.getPacketDispatch().sendInterface(player.getInterfaceManager().getWindowsPane(), 21, 553, false);
player.getPacketDispatch().sendCS2Script(1104, new Object[]{1,... | 1 |
a37ca380d79c4b0fd511cf9c84b88d98 | 8bd9324e84dbb016d45307578451049b | 鬼人 | function ghost(obj,obj2,value,mode,label){
is_return++;
var x=Number(obj.attr("x"))+Number(obj.attr("width"))/2;
var y=Number(obj.attr("y"))+Number(obj.attr("height"))/2;
var x2=Number(obj2.attr("x"))+Number(obj2.attr("width"))/2;
var y2=Number(obj2.attr("y"))+Number(obj2.attr("height"))/2;
var scale=Number(obj.a... | 1 |
7442b978ed14c9ec80eb321d9cb15fc7 | 3e71339666098bbc7d55425af244b6ce | 三张滚动的地面 | function init()
function createGround() {
let ground = room.ground('xy', 100, 60, new THREE.TextureLoader().load('../../../assets/JS/three/floor1.jpg'))
ground.material.side = THREE.DoubleSide
ground.receiveShadow = true;
let wall_l = room.ground('-yz', 60, 20, 0xfbfb73)
wall_l.p... | 0 |
095f8aac37e73cc169139ce369b731a1 | 5099fdb35def7ec54f13f82cba6bef7b | 优化算法:最多进行 n-1 轮比较 | public class BubbleSort
public static void bubbleSort(Integer[] a, int n) {
if (n <= 1) return;
for (int i = 0; i < n; ++i) {
boolean flag = false;
for (int j = 0; j < n - i - 1; ++j) {
if (a[j] > a[j+1]) {
int tmp = a[j];
... | 1 |
8cfcf104298b639a2c0bb02edb91a9ae | 71ba0e5a88de8cd105bcd674c72339fc | Indica si el primer numero es mayor que el segundo | double x,y;
x = (double)numerador/denominador;
y = (double)A.numerador/A.denominador;
if(x<y){
return true;
}else{
return false;
}
} | 0 |
62317dfa5f056f1dfc2cda471a9a1a62 | b4a43c91e440056ae56023c6bc91543e | Resize the given image to the given size without cropping | class HatchPipeline:
def __resize_image(input, width, height, interpolation):
return cv2.resize(input, ((int)(width), (int)(height)), 0, 0, interpolation) | 1 |
64cf45b13dbb3d21f53c35f66d66a295 | 25d91c2898660987af8181c747fc49cb | default impl returns zero, which disables the calling
functionality | bool TrigFunction::IsZero()
{
return false;
} | 0 |
6ede87f28fb22e25e2541148fbbe66d9 | 5a68ff1d186a62b61cf9badc505297d9 | Set automatic folding behaviours. (Scintilla feature 2663) | namespace Kbg.NppPluginNET.PluginInfrastructure
public class ScintillaGateway : IScintillaGateway
public AutomaticFold GetAutomaticFold()
{
return (AutomaticFold)Win32.SendMessage(scintilla, SciMsg.SCI_GETAUTOMATICFOLD, (IntPtr) Unused, (IntPtr) Unused);
} | 0 |
3a2c40d7a96ec921e38a6e2d06c0b7ce | 7c5ae0eff339f2076927b8861ead3f4a | Feedに対して指定したIDの投稿を削除する | {
$feed = Feed::find($id);
if (!is_null($feed)) {
$feed->delete();
}
session()->flash('success', 'Feed has been deleted !!');
return back();
} | 0 |
6f868432fa1a09fecefb9d17c4464628 | 40ceffdfea3ff7d878e0ef4260b1364c | Shuffle - print out a series of randomly chosen songs. | let currentIndex = songList.length;
let temporaryValue;
let randomIndex;
while (0 !== currentIndex) {
randomIndex = Math.floor(Math.random() * currentIndex);
currentIndex -= 1;
temporaryValue = songList[currentIndex];
songList[currentIndex] = songList[randomIndex];
songList[r... | 1 |
f99b6e6a1b8b842b4f2f57499c6831db | cfae144693145c8e384a244780b9c2b4 | @brief 共有メモリ上のレイヤー設定ファイルを動的に更新する
レイヤ番号を受け取り、サーバに退避してあるレイヤ設定ファイルを検索。
同ファイルを検査、解析し、共有メモリ上のレイヤ設定情報を更新する。 | List<MapLayerInfo> mapLayerInfos = new ArrayList<MapLayerInfo>();
MapDB mapDB = MapDB.getMapDB();
MapInfo tmapInfo = mapDB.getMapInfo(trackmapid);
MapInfo pmapInfo = mapDB.getMapInfo(mastermapid);
int sz = pmapInfo.countMapLayerInfo();
for (int i=0; i<sz; i++) {
MapLayerInfo mapLayerInfo = pmapInfo.getMa... | 0 |
f4e9a39d8891fdf1c1869e57320601f3 | 2c3f0f7a3e604d8f9aad11edaedfd158 | Obsluga listy aktywnych konwersacji | selection = self.ui.teKonwersacja.createMimeDataFromSelection()
if len( selection.text() ) > 0:
self.ui.actionSkopiuj.setEnabled( True )
else:
self.ui.actionSkopiuj.setEnabled( False ) | 0 |
9ebafb7720ce37afd6cf394c4c3f55c1 | 42b32fbf98148ccaed5fc0c6291b60bf | Convenience layer that performs an affine transform followed by a ReLU
Inputs:
- x: Input to the affine layer
- w, b: Weights for the affine layer
Returns a tuple of:
- out: Output from the ReLU
- cache: Object to give to the backward pass | a, fc_cache = affine_forward(x, w, b)
out, relu_cache = relu_forward(a)
cache = (fc_cache, relu_cache)
return out, cache | 1 |
c486965100a596236b844f6e961370d9 | 735aa302040f44b42e1f1ccff8964d8a | Returns the next element in the list and then updates the current position. | namespace dnlib.Utils [DebuggerDisplay("Count = {Count}")]
[DebuggerTypeProxy(typeof(CollectionDebugView<>))]
public class LazyList<TValue> : ILazyList<TValue> where TValue : class
public bool MoveNext() {
#if THREAD_SAFE
list.theLock.EnterWriteLock(); try {
#endif
if (list.id == id && index < list.Count_NoL... | 1 |
eba8e73364b97a7903f9907f6bb49514 | 315bb09ad1838251c577ff375ba4c469 | Test sort criteria for children where device allows anything. | session = Session()
customer_devices_query = CustomerDevices(session, url, customer_id=customer_id)
customer_devices_query.order_by(order=Order.ASCENDING, order_by="os_version")
assert customer_devices_query._query_parameters == {"orderby": "+os_version"} | 0 |
e504299ecf3e8aa7922921220d51520a | 7b1a37dd31175888e005aed49695c395 | 在字符串 haystack 中查找第一次出现字符串 needle 的位置,不包含终止符 '\0'。 | void basic_substr() {
std::size_t pos = hay.find(needle);
} | 1 |
0722aaf2ce7e75fbb3b846f33b04c611 | 38a4a6555c55d1c9d6690d00fc586665 | 将资源中的数据类型翻译成SQL的数据类型 | class MssqlEngine
public function DataTypeMap($type)
{
switch($type)
{
case 'varchar': case 'char':
return 'varchar'; break;
case 'tinytext': case 'text': case 'mediumtext': case 'longtext':
return 'text'; break;
case 'integer': case 'bigint': case 'int': case 'tinyint': case 'longint': ca... | 1 |
3989240e96df60c5c99f9da13d440471 | 1efd9e7775ec2e4e2de968d2767dabc9 | Send message via Socket to iMonitor API | kwargs.setdefault('msg_id', msg_id)
kwargs.setdefault('token', self.token)
logger.debug('[%s] >> %r', self.address, kwargs)
self._socket.send(json.dumps(kwargs)) | 1 |
225461c929a810b82c83d886d2d6b361 | a27a354f512d19573e78c7cae566470c | mobileGuestPurchaseMembersRuleを返します。 | public class WebshopMessage implements Serializable
public String getMobileGuestPurchaseMembersRule() {
return StringUtil.coalesce(CodeUtil.getEntry("mobileGuestPurchaseMembersRule"), mobileGuestPurchaseMembersRule);
} | 1 |
f05880842b9f0c40e7947edbc03201ff | 676fa9156e47dfad661228ff7fdecf7f | ログインしているユーザーのコメントを作成し、保存する | if @sentence
@comment = @sentence.comments.build(comment_params)
@comment.user_id = current_user.id
@comment.save
render :index
elsif @sound
@comment = @sound.comments.build(comment_params)
@comment.user_id = current_user.id
@comment.save
render :index
elsif @video
@comme... | 1 |
ce5e407885623880a35f54b010d63fc1 | deaf8c6daf2dabe36edbda7771636ab2 | 创建 Relation 表 | Relation createRelation(Relation relation); | 0 |
d942731da95e692337b33e61c4ef3b8a | 6521f6de1e466cb28549228f8d00dda2 | returns player one's status. | function getStatus() {
var ss = myPlayer1 && myPlayer1.getStatus();
} | 1 |
d5e52b84925bf9f9e6157a6e6b4f541d | b93900f0390e4af83c6e0a0d5ec4cde3 | Test all different regression types | y, tx, _ = load_csv_data('train.csv')
y_train, tx_train, y_test, tx_test = train_test_split(y, tx, 0.8)
standardized_tx_train, mean_tx_train, std_tx_train = standardize(tx_train)
standardized_tx_test, _, _ = standardize(tx_test, mean_tx_train, std_tx_train)
test_least_squares_GD(y_train, standardiz... | 1 |
db15e25fc50379c2d16786b6618e743c | 83af8fc0c12b1ed4c6dbb94f4218da72 | Méthode qui me permet de récupérer des informations sur l'utilisateur qui correspond avec sont pseudo, l'e-mail ou son id
Date et heure au format français | namespace HFAPI
public class User
public static List<string> GetMemberinfo(string pseudo)
{
try
{
var infos = new List<string>();
var ID = Nickname2ID(pseudo);
var panel = MyWebClient.DownloadString("http://hack-free.net/User-" + ID);
... | 0 |
30b031d39ee53a3dbec1f4b8b4ec1bc5 | 8d9e51fecfb3ede485cdd1a601ceb217 | scikit-learn随机梯度下降 | miniBatchFraction=0.01, epoch=10000, tol=1.e-6):
method = tf.train.GradientDescentOptimizer(learning_rate=learningRate)
optimizer = method.minimize(model['loss_function'])
tf.summary.scalar("loss_function", model["loss_function"])
tf.summary.histogram("params", model["model... | 0 |
ff135b4784b1d6d9b628f0f6d1d7a797 | d4da5d57b3a73a368cd82c0a6f4b7fe6 | Method for placing a power cube in the switch on the same side of the field as the robot, from the end of the switch. | servoAngle(sv_cam, cam[-1], 1)
sv_pow.start(0)
servoAngle(sv_pow, off, 1)
servoAngle(sv_pow, mid, 1)
sv_pow.stop(0) | 0 |
b9bd9164a485f70edafbb17a338a9dc3 | e169c44dc13b3590d3cc2c4415e86647 | Ação para botão Ver Perfil, no sidemenu | function visualizar_perfil(){
?>
<?php
include("bd/conecta_bd.php");
include("routes/links.php");
include("assets/validations/validate_cartoes.php");
$id_usuario = $_SESSION['user']['id'];
$nome_usuario = $_SESSION['user']['nome'];
$email_usuario = $_SESSION['user']['email'];
$sql_perfil =... | 0 |
662b08b8b3c49825db92e6b07f257edd | bada152e3d23a5d86a93e07619d3551c | 建立关系体系,每个人推荐n个,一共level代 | class UserRepository
public static function createReferralToUsersRelationship(Collection $users, User $referral, int $level): Collection
{
$collection = new Collection();
foreach ($users as $user) {
$collection->add(['user_id' => $user->id, 'referral_id' => $referral->id, 'level_id' => $... | 1 |
4961b44475a54f5d2fb902e2f983c0e9 | 3ce9a5943e6691ced81ad35ff1333204 | The decorator use to setup the cache descriptor.
See the :mod:`onegov.core.orm.cache` docs for usage. | self.func = func
self.cache_name = "_cache_" + func.func_name
self.ttl = DEF_CACHE_TTL
if DEF_CACHE:
self.__call__ = self.cache_call
else:
self.__call__ = self.func | 1 |
dcae08094ad3c3baff51d64298770137 | a829684a891dee391b4b0240a4a0e103 | Returns the sum of n bernoulli-trials with the probability of p | n_success_counter = 0
for i in range(n):
random_number = np.random.random()
if p > random_number:
n_success_counter += 1
return n_success_counter | 1 |
585e8aea1ac5ad89611f7022bb9fdc5d | ca51bc7a75a1a62ccdb47821977d3a54 | Gets the declaring class name for the reflected property.
If the property has been declared into a trait, returns the name of the class using the trait. | class ReflectionProperty extends InternalReflectionProperty implements IReflection, TokenReflection\IReflectionProperty
public function getDeclaringTrait()
{
return null;
} | 0 |
eb9a4272e28d55a6ebaf12c3f7cedb25 | ac7a3f7df05672005bc82ed87a1a1c52 | 获取材质实例引用。 | function getMaterial() : Material
{
if (null==m_gameObj || null==m_gameObj.renderer)
{
return null;
}
return m_gameObj.renderer.material;
} | 1 |
853e8c1955f1d95b51f325df7ded4a06 | b31b91d34232e87499ed3e0de6cd9ab6 | 現在の手札を表示する。 | for (int i = 0; i < 5; i++) {
System.out.printf("%d:%s\n", i+1, hand.get(i));
}
} | 1 |
a6e23bd8a50d5973c6934de38117e297 | 9f01b155fc311be51735a0c99994101b | Initiates the solution search by adding the starting puzzle configuration
to the queue and marking it as visited. | start_node = Puzzle(initial_state, None, None)
print("Initial state:")
print(start_node)
if start_node.goal_test():
return start_node.find_solution()
q = Queue()
q.put(start_node)
explored = []
while not(q.empty()):
node = q.get()
explored.append(node.state)
... | 1 |
3811b2e08a7495f24768e17f82d60cc6 | 42817fe4e8aaa33477f3c82d8d3955c2 | Возвращает предыдущую ошибку. | public function getLastErr(); | 1 |
64f1581ac577a8dd8d71c80990fcd1f2 | de77f165bfff624b3c13a08a419d5672 | spawn an item depending on what the value of itemID is | {
switch (itemName)
{
case "Key":
gotKey = true;
source.pitch = Random.Range(0.8f, 1.2f);
source.PlayOneShot(pickSound);
break;
case "Rifle":
GetRifle();
break;
case "H... | 0 |
dbba83370f9ea236d925793d03eb234d | 93a81797a27f8753bd65f03aeaa6ff7f | 点击贷款申请汇总 | public class HomeOldFragment extends BaseFragment implements HomeOldView,
SwipeRefreshLayout.OnRefreshListener
@OnClick(R.id.ll_total_loan)
public void onClickLoan() {
openAccount(AccountType.LOAN);
((HomeActivity) getActivity()).setNavigationViewSelectedItem(R.id.item_accounts);
} | 1 |
71bfd598d96570c0555b6db1abf5241e | a47ae4e52869cbf96b640256a65a40db | Retourne le mot de passe ou FAUX si pas trouvé | class Compte
public static function getMotDePasse($id) {
global $db;
$sql = "SELECT motDePasse";
$sql.= " FROM Compte";
$sql .= " WHERE id = :1";
$cursor = $db->prepare($sql);
$cursor->bindParam(':1', $id);
$cursor->execute();
$line = $cursor->fetch(PDO::F... | 0 |
8042699a9a183867350daef5e5316de3 | 79f5e207eb71b3cdc0c7110b14c79945 | Calculate the depth time series for cells in an unstructured grid. | def constant_depth(field, grid, depth, zeta=None, threads=-2):
grid = seapy.model.asgrid(grid)
if np.ndim(field) == 3:
field = seapy.adddim(field)
if zeta is not None and np.ndim(zeta == 2):
zeta = seapy.adddim(zeta)
depth = depth if depth < 0 else -depth
x, y = np.meshgrid(np.arange... | 0 |
c979b081d57d416998445077e9a28b62 | 9411a5212028c5aeae164580e49f0d38 | Admin 房源详情 | $stu=db('house');
$hid=input('Id');
$list=$stu->where('Id='.$hid)->find();
$es = db('estate');
$list['zone'] = $es->where('Id='.$list['zoneid'])->find()['name'];
unset($list['zoneid']);
$this->assign('list',$list);
$zonename = $es->select();
$this-... | 1 |
9005a6d81ff2a587b1374c9358619c4c | 0445371102448939cfe580e8823f2acf | *************************
this method initializes the charge on an electrode,
given a Voltage drop, and assuming the electrolyte is vacuum
Lgap : vacuum gap between electrodes in nanometers
Lcell : distance (nm) between electrodes in the electrochemical cell.
MMsys : QM/MM simulation obje... | volt[0] = 0
volt[Y-1] = 0
volt[:,0] = 0
volt[:,X-1] = 0
volt[(Y//2)-(GAP//2),((X//2)-(WIDTH//2)):((X//2)+(WIDTH//2))] = V
volt[(Y//2)+(GAP//2),((X//2)-(WIDTH//2)):((X//2)+(WIDTH//2))] = -V | 0 |
278c39d639f84bcbe94e634b896aff37 | 561b7cab21cb648784fb38956873f7c4 | Evaluates the probability density function of the distribution. | namespace TAlex.MathCore.Statistics.Distributions
public class ExponentialDistribution : Distribution
public override double ProbabilityDensityFunction(double x)
{
if (x < 0.0)
{
return 0.0;
}
return _rate * Math.Exp(-_rate * x);
} | 1 |
d3aa12e5b0e5cd0b454bbdd852fc2b1c | 35413b4d8058a0f547e7dfed072ae71f | push object from extension registry; 1-byte index | int set_object(lua_State *L, void *key)
{
TRACE(" set_object(): key=%p (%s %d)\n", key, __FILE__, __LINE__);
lua_pushlightuserdata(L, key);
lua_pushvalue(L, -2);
lua_rawset(L, LUA_REGISTRYINDEX);
return 1;
} | 0 |
a9d2d1e9c85898baffa02a4e72dc328f | c5b0d9de0b411f51f841219f8e6b00db | Process platforms command | class ProcessRegions extends Command
public function handle()
{
$this->process();
$this->info('');
$this->info('Regions: Completed');
} | 0 |
59b43bc746fd890dfb562e0958e23af3 | 85258394a5ef1c732de173d800f07b0f | A hint for currently executing step if the context prefers stopping processing more input since
the sinks are 'full'. This is polled by readers to stop consuming more records, when they can.
Currently the hint is set only by the sinks in streaming. | namespace DotNetty.Common
void Record(object hint); | 1 |
e89455d3ee8b2ee10b9e7abdac0cf32a | b4e1835eb6448d2f700a6de67064212a | 返回exampaper操作的对象 | var _tempEp = null;
currentpage = _page < 1 ? 1 : _page;
var epObj = $(exampaper).find("exam > page[num=" + currentpage + "]");
if (epObj.size() == 1) {
_tempEp = epObj;
} else {
if(top.isOffline){
exampaper = loadExamPaperByAjax(0, _at);
}else{
exampaper = loadExamPaperByAjax(_page, _at);
}
if ("e... | 1 |
7bc3920caea65928bb558277437a56d6 | d5e7dcbf07aa631c0e528a38333bfbb9 | app2.1 分享至邻聚群组 - 选择群组接口 | $user_id=input('post.user_id');
$session_key=input('post.wx_session_key');
$encryptedData = input("post.encryptedData");
$iv = input("post.iv");
if($encryptedData&&$iv&&$session_key){
if($session_key){
vendor("wxaes.wxBizDataCrypt");
$w... | 1 |
906094090ee1629fb8ef1156950f98bf | 92f42325d6ebec92ea25241237bcbbb4 | Helper function to convert the American odds to a more readable
decimal format. | to_american_odds = function(decimal_odds){
american_odds = -100
if(decimal_odds >= 2){
american_odds = (decimal_odds-1)*100
}
else{
american_odds = -100/(decimal_odds-1)
}
return (american_odds)
} | 0 |
7a02bb3a8af1a0afdf0e446a332ce0ef | 107e695d86baa56478e000cf16d84df4 | 指定されたorm_rowidを持つ出荷明細構成品のインスタンスを取得します。 | val erpSalesOrderShipments = ErpSalesOrderShipments()
erpSalesOrderShipments.erpSalesOrderId = erpSalesOrderId
val salesOrderShipments = erpShipmentsDao.selectSalesOrderShipments(erpSalesOrderShipments)
return if (salesOrderShipments != null) {
this.get(salesOrderShipments.er... | 0 |
b08373ae48b7bd594a47100acf9df135 | b42c746401ae54cad3df08b26e989452 | 미납통행료 알림 차량등록 목록 조회 | public String selectTestDriveVehicleInspctPopup(Model model) throws Exception{
CarInfoSearchVO carInfoSearchVO = new CarInfoSearchVO();
carInfoSearchVO.setUseYn("Y");
model.addAttribute("carLineCdInfo", carInfoService.selectCarListsByCondition(carInfoSearchVO));
... | 0 |
d83293e67d798299e4247f02e14e0ca5 | 963011d356f321a7d4d0a50416330a49 | Нажимает на кнопку закрытия текста ошибки | def closeErrorMessage():
return conftest.click(ele=get_page('关闭错误提示')) | 1 |
bd636d05366aa14b9453637bd9c8c341 | 66889fde6fa694912aaf83c919b54718 | Convert list of numbers to list of BVs | lb = []
for i in list:
c = int(i)
lb.append(c)
return lb | 0 |
3d746a5a8a732f06495cabdcb68db47b | b911251b4d2c4d65f268fe6cf8be2308 | 展开/收缩图层的图例(最后需要执行toc的Update方法) | var doc;
var txtBox;
var displayEntries;
var le;
var leName;
var groupName;
var s2 = '';
try {
displayEntries = gObjMapView.legend.getDisplayEntries();
if (displayEntries == null) {
s2 = "";
}
else {
var cnt = displayEntries.getCoun... | 0 |
e2d4caa0ee80792fa161891cb0a63dec | 2600c067a954af10a39ea54925456610 | Prepare information for association complete indication.
The buffer is allocated by the caller.
The caller must make sure the buffer is big enough to hold all data. | class CDicomSession extends CMbObject
protected function prepareAAssociateRJPDU($reason) {
return array(
"result" => 2,
"source" => 1,
"diagnostic" => $reason,
);
} | 0 |
1874ef5493595d5eef8d1664f23774af | 378c3548c2ce41e27f32897e9bce2030 | Returns the ISO numeric code. | namespace Opten.Common.Extensions
public static class CultureExtensions
public static string GetISOCode(this CultureInfo cultureInfo)
{
return cultureInfo.Name;
} | 0 |
8fddb62ff9d85c14b155daa07dfa07e3 | 0581f47a380be164c378ad8f85773c5c | Executes the field resolver and returns its result. | class Callback implements ResolverInterface
public function resolve($value, $args, ResolveContext $context, ResolveInfo $info, FieldContext $field) {
$result = ($this->callback)($value, $args, $context, $info, $field);
return $result;
} | 1 |
6c6467ea3ea709a5095b643685da36d0 | f476e74c7ce8d827b3506380cade63f6 | Handles the assembly unload event | {
if (LoadedAssemblys.ContainsKey(DesignPlugin.PluginId)) {
LoadedAssemblys[DesignPlugin.PluginId].Unload();
LoadedAssemblys.Remove(DesignPlugin.PluginId);
}
return true;
} | 1 |
136ec765106efe5def3529e9b179df74 | 1c82858273190477d426c9a7345f84b0 | Four control point 2D Cubic interpolation for ranges from 0 to 1, start to end of curve. | return function (t: number) {
let u = 1 - (t = Math.min(1, t));
return {
x: u * u * p0.x + 2 * t * u * p1.x + t * t * p2.x,
y: u * u * p0.y + 2 * t * u * p1.y + t * t * p2.y
};
};
} | 0 |
15b20fda6779bdf34c75033be3bb1f1f | 4cc08dd13c741dee4f295154010cd455 | ZeroTriangle3d return true only if triangle have zero area | return sign(abs(det(a - p, b - p)) + abs(det(b - p, c - p))
+ abs(det(c - p, a - p)) - abs(det(b - a, c - a))) == 0;
} | 1 |
efe8478572be7dc50ff43f6bd54bcafd | 7fabfc8a4dc58af24cf7c02f2f2dbc9b | Provides list of VAT types with descriptions. | {
return array(
self::VAT_NONE => self::VAT_NONE,
self::VAT_0 => self::VAT_0,
self::VAT_10 => self::VAT_10,
self::VAT_18 => self::VAT_18,
);
} | 0 |
05a8e7ec8c625959f5fa8ae69b67687d | 11645f8bc5ce63841572a813de78aa6f | Sets task to a 10 minutes interval. | public function everyTenMinutes()
{
return $this->spliceIntoPosition(1, '*/10');
} | 1 |
ca156ad161e2e821501cb92fe620ba90 | 8d5294bdaba5bc4ad09010072e0aedf8 | add data byte to the end of the tx buffer | void VCP_AddToTxBuff(uint8_t received_byte)
{
VCP_Tx_Buffer[VCP_Tx_ptr_in] = received_byte;
VCP_Tx_ptr_in++;
if (VCP_Tx_ptr_in == VCP_TX_DATA_SIZE)
{
VCP_Tx_ptr_in = 0;
}
} | 1 |
8d7dc42dcfb2eb871dcd93b63848ef23 | bbd4ae6bce004d6304d56c677edd1308 | Application class which extends the QT class QMainWindow for grid dynamics simulation visualization | class PyPoolMainWindow(QtGui.QMainWindow):
def __init__(self, parent=None):
super(PyPoolMainWindow, self).__init__(parent)
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
self.svg = None
self.graphics_item = None
self.scene = QtGui.QGraphicsScene()
self.ui.graphic... | 1 |
419f320c6792332ba5f802b902a70702 | c223ed818d123ca1d3190871c2693651 | It allows `_` as attribute name. | class _AttributeDict(dict):
def __getattr__(self, key):
try:
return self[key]
except KeyError:
raise AttributeError(key) | 0 |
003a648bb9af7d3a5b8525b81f4c165a | 6e7557d31f10241d0e26c475814d5972 | 判定新增还是修改 | if (this.idKey == null && this.addApiUrl != null) {
console.log("add===>", this.model);
this.add();
} else if (this.idKey != null && this.editApiUrl != null) {
console.log("edit===>", this.model);
this.edit();
}
... | 1 |
89e12c208d3c2011653ae9207927a29a | f7302be21e93041ff44d44735940c593 | Parse a mynathon script from a file and execute it. | script = (self.message.content[7:]).strip().replace("`", "")
try:
old_stdout = sys.stdout
redirected_output = sys.stdout = StringIO()
exec(script, locals())
sys.stdout = old_stdout
await self.send_result(redirected_output.getvalue() or "No outp... | 0 |
bb7c5ce23ed5ded6b7b3cc6a6b287752 | 0d016679ef7d79b183bfef7ae37d5639 | Schedules a message to be sent, returns a promise which fulfills the
response. | sendMessage(contentType, headers, body, options = {}) {
const timeout = options.timeout !== undefined ? options.timeout : this._timeout;
let messageId;
if (!isUndefined(options.sequence)) {
messageId = options.sequence;
} else if (!isUndefined(this._sequence)) {
messageId = this._sequence;
... | 1 |
d625e135b012b4febc5ce40a8f8a4753 | fbec2a780178b33e0bbc2cfa557e47fc | Fyller ut tabellen visninger for rapporter | namespace EveMarketMonitorApp.Reporting
class IncomeStatement : ReportBase
public override void FillReport()
{
GetDataFromDatabase();
} | 0 |
9735f49ebd8a3ab10b4dff4fd5089a09 | 9864f13f398e7ce615af1ceb4b471514 | Formats Timedelta as hh:mm:ss | def format_timedelta_as_time(td):
return '%02i:%02i.%03i' % (td.seconds // 60, td.seconds % 60, td.microseconds // 1000) | 0 |
a8e1c8ba0ed073ca99396ca649f6fa3b | 576ebc78072ccb7a3c8fd7742cf02535 | Returns an Integer extracted from a Poisson
distribution with average `average`.
Implemented according to the Knuth algorithm. | double poission_gen_interval(double avg_rate)
{
if (avg_rate > 0)
return -logf(1.0 - (double)rand() / RAND_MAX) / avg_rate;
else
return 0;
} | 0 |
e0f191c934d3ed8aca96ad86b804357f | 358c1a8b3ea62737f8eb4f56f4178ed8 | Get a random.Random instance initialized with a seed derived from the the given args. | class RandomChooser(SequenceChooser):
def for_seed(seed: int = 0) -> "RandomChooser":
ret = random.Random()
ret.seed(seed)
return RandomChooser(ret) | 1 |
e5e9a3faf9ead2b55bd76bd5e8da844c | 63c6ae0062ff031f9c185b0e016f37db | Method called to prompt player if they wish to hit, returning true if the player wishes to hit, false otherwise. | public class DiceGame
private static boolean shouldContinue() {
System.out.println("Would you like to continue playing?");
System.out.print("Yes/No? >>");
Scanner in = new Scanner(System.in);
String input = in.next();
return input.equals("Yes");
} | 0 |
395327a490ab1cca401cf560e2cab89a | 08dc840ad07b5c4c14ac463f07799d18 | Begin the two-phase commit process. | if tctx(sess).state != TranState::Inprogress {
log::warn!("commit_tran: unexpected state={:?}", tctx(sess).state);
}
tctx(sess).state = TranState::Commit;
record_tran_commit(sess);
end_xid(sess);
sess.lock_release_all();
tctx(sess).state = TranState::Default;
return Ok(());
} | 0 |
59d8efb57f3073f5329bb872a3519cb8 | b5c54711b2b4a9a5d8341e9bb77abc7b | 输入wifi密码弹框 | new MaterialDialog.Builder(this)
.content(R.string.common_open_wifi)
.negativeText(R.string.common_cancel)
.positiveText(R.string.common_confirm)
.onNegative((dialog, which) -> {
})
.onPositive((dialog, which) -> wis... | 0 |
af3568dda6257fa6abcb476c21aa818b | 63ee851a0fb0f68c5d8ac3958bf59d81 | Присваиваем переменным заранее выбранное положение в пространстве (по углам комнаты) | int ConnectRoom(int x,int y){
if (x == 1){
if (Room_1.count == 0){
Room_1.c1 = y;
Room_1.count = Room_1.count + 1;
}
else if (Room_1.count == 1){
Room_1.c2 = y;
Room_1.count = Room_1.count + 1;
}
else if (Room_1.count == 2){
Room_1.c3 = y;
Room_1.count = Room_1.... | 1 |
7710f1c047e4b8f4cce5a8920830d678 | 5b65fb2fad687f57f6ddbf711d13c810 | 初始化所有枪械模型sample。 | List<Gun> gunList = new ArrayList<Gun>();
Gun gun = new Gun();
gun.setName("M16");
gunList.add(gun);
gun = new Gun();
gun.setName("M10");
gunList.add(gun);
gun = new Gun();
gun.setName("M1");
gunList.add(gun);
gun = new Gun();
gun.setName("M12");
gunList.add(gun);
gun = new Gun();
... | 1 |
9f5d977a9b383d2cd2023e1b95001948 | f0fc7f828573367cba89d60259c51deb | Retourne vrai si le mot pMot est présent dans la solution | {
int count = 0;
foreach (String str in dictionnaire)
{
if (str == mot) count++;
}
return count;
} | 0 |
df4390901a02bde89560577dd16252b1 | 396aaa25ddac5d762fac72bf11675775 | ## Used for making a legend for the heatmap-style "image(...)"
## plot command.
## When you have a list of colors and breakpoints,
## and you want a legend, this is the function you call
## to get the labels for the legend.
## It gives you labels like "(1,3]" for a color, indicating
## that that color is used for value... | Labels_ <- list()
for(i in 1:(length(Breaks.)-1)){
Labels_[[i]] <- paste(Breaks.[[i]], Breaks.[[i + 1]], sep="-")
}
unlist(Labels_)
} | 1 |
7cf698db5a438bdcad348880c14b9c42 | c581d4d5218ede6a7a887ed658e15fd1 | 配置选定设备,开启对应配置窗体; | public abstract class DeviceFragment extends Fragment{
public abstract void openConfigureActivity(); | 1 |
1cfa92f203d168c0858d68724b2bec21 | d7df2fb0513e73fdb94e031a597d77e8 | 获取图集下的图片 | class MuseumApplyPics extends Model
public function getPics( $museumid, $type, $limit = false )
{
if( !$museumid )
return false;
$arrImgs = array();
$where = array(
'columns' => 'id,filename,bucket,object,type,cdn_url,size,assets_id,img_type',
'condition... | 1 |
4f1661585e9c99bee0ca4271d03be543 | 206f8ad87308dc30e691a7349ce82d07 | Load subreports by master rpt id. | request = ReportSlaveIdRequest(**kwargs)
resp = self.execute(request)
if not resp.isError():
return {
'function_code': resp.function_code,
'identifier': resp.identifier.decode('cp1252'),
'status': resp.status,
'byte coun... | 0 |
5bfaf6257c7022915d9b632cbecc2b8b | 615b6cb8cf2d2d89bd5384f5247fcd61 | This method is called when an alarm is updated. | void onAlarmUpdated(final int alarmId); | 1 |
435dd917b7beaade3f6fc980581ba8e9 | 3715566469b1ab5cf5510428f1d58263 | 毛利率:(营业收入-营业成本)/营业收入 | operationRevenue = commonUtils.calCommonIndex(subject, data, benefitEnum.Benefit.OperationRevenue.value)
operatingCost = calOperatingCost(subject, data)
operatingMargin = commonUtils.handleDivisionZero((operationRevenue - operatingCost), operationRevenue)
print('计算营业毛利率的结果为:', operatingMargin)
retur... | 1 |
765a5eabccfddcd5f12fdfd8bde4f332 | 19817030b67710e51b82a1b7fc55b796 | Tekee JTextArean, jonka sisalla lukee pelinohjeet. | {
textLog = new JTextArea();
textLog.setLineWrap(true);
textLog.setEditable(false);
JScrollPane textAreaScroll = new JScrollPane(textLog);
textAreaScroll.setBounds(5,60,width-15,height-150);
add(textAreaScroll);
} | 0 |
ea59b1bb3ba8126cb99356afc2ac84aa | f35f0b81bf5392d95540c672dc29ce2b | 点击确定解密按钮 | class DecryptButton(BaseButton):
def __init__(self):
super(DecryptButton, self).__init__(name="解密")
self.function_init() | 0 |
4db98e54f89c96faa60b6e10efb32acb | 3a93e3e6c2d1841f04161e8f0eda5af5 | Returns the meta object for class '{@link simplepdl.WorkDefinition <em>Work Definition</em>}'.
<!-- begin-user-doc -->
<!-- end-user-doc --> | EClass getWorkReqFulfType(); | 0 |
aeeebb90fa1a83bf205076b22c8016b4 | 0a60a602f69087954936ba0c78bd5bb1 | 根据小红点顺序加载scrollview信息 | self.vipTabBtn:setVisible(false)
self.zfbTabBtn:setVisible(false)
self.wxTabBtn:setVisible(false)
self.unionTabBtn:setVisible(false)
self.zfbdTabBtn:setVisible(false)
self.qqTabBtn:setVisible(false)
self.jdTabBtn:setVisible(false)
local vipPos = tonumber(self.configsInfo["Agentsort"])
local zfbPos = tonumber(s... | 1 |
d3d0636ef0fcb15fffb7e777ed0f66b9 | d52484c84a703e8e1d88580cb01b261b | Funktio hakee harjoituksen tiedot tietokannasta. | class Tietokantakasittelija:
def hae_kysymys(self, i: int):
kysymys = self.database.execute("SELECT * FROM Kysymyksia WHERE id=?", [i]).fetchone()
return kysymys | 0 |
965d50f7a168e1aee4f241fdbab6c4db | 56ee651da6beecdd9ce35a7bf40f5ae2 | Adds a corner to the vector with all the corners | void addCorners(int upperLeft[2], int lowerLeft[2], int upperRight[2], ofstream& cornersFile) {
cornersFile << "(" << upperLeft[0] << "," << upperLeft[1] << "), ";
cornersFile << "(" << lowerLeft[0] << "," << lowerLeft[1] << "), ";
cornersFile << "(" << upperRight[0] << "," << upperRight[1] << "), ";
cornersFile <<... | 0 |
c2be04f67d434920f8ff106830e7df77 | 24b467306ea7d26f490daa7bee120977 | Function for receiving messages from the queue | void msgq_receive(int msgqid, void *receive_buffer, int message_size, int message_type) {
if (msgrcv(msgqid, receive_buffer, message_size, message_type, 0) == -1) {
fprintf(stderr, "msgrcv failed\n");
exit(EXIT_FAILURE);
}
} | 1 |
d627465a0db8cae35147a70ce5c364e5 | 5cbc31d33f7c18137aeee30fcabbe186 | Only select case definitions that are deployed in a deployment with the
given deployment id. | namespace org.activiti.engine.repository
IModelQuery deploymentId(string deploymentId); | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.