query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
867ceb64d8717771a3e66841519ce572 | 8efa7cf96091f6e2c34e363fc494bd79 | Consulta la información del cliente de un albarán | public ActionResult FacturaDatosCliente(string parametro1)
{
ViewBag.accion = parametro1;
return PartialView("_FacturaDatosCliente");
} | 0 |
86845035054e669d4df655fba0f8f00d | 0b021ef8cabac26fb7077d5aedb89e7d | Accept-Encodingヘッダを取得する。<p> | class Request
public function getAcceptEncoding(): array
{
return $this->acceptEncoding;
} | 1 |
4ddf6822b2dbad441ef608f4e9ed78eb | f839c1ee8aec474cf6b64dee9e68ee60 | Update the scrolling titles to ensure they are not in a now invalid
scroll position. | export default function ScrollingTitle({ titles })
function updateContainerSize() {
let [maxWidth, maxHeight] = computeContainerSize();
maxWidth *= 1.1
containerRef.current.style.width = maxWidth + 'px'
containerRef.current.style.height = maxHeight + 'px'
} | 0 |
4be352428bcf03ba6b9b627cf5f106c2 | fad4a1add8e2cdc7d648bce57cef0b3d | Función lexer | def scanner():
edo = 0
lexema = ""
leer = True
while (True):
while edo < 100:
if leer: c = sys.stdin.read(1)
else: leer = True
edo = MT[edo][filtro(c)]
if edo != 0: lexema += c
if edo == 100:
lexema = lexema[:-1]
... | 1 |
69aab1212e4d89b595c19c1ed6cf24d7 | 641421401082ebc1217048a4bd318455 | 分公司能耗趋势对比图 | {
string reportCode = string.Empty;
Plant plant = PlantService.GetInstance().GetPlantInfoById(pId);
IList<PlantUnit> unitList = plant.plantUnits;
if (unitList != null && unitList.Count > 0)
{
IList<DeviceStuct> devices = new List<Device... | 1 |
974d552989d7608fb28e5bf0c600f7ce | 1e9774df65e15ee879aba59151a9306b | Returns true if we should proceed with GLI's basic error handling.
This calls the error block if the user provided one | class GdalErrorHandler:
def is_set(self):
return self.err_level and self.err_level > gdal.CE_None | 0 |
24c9239495ed48705946cb9f9d214b73 | 2e5a689246a72e24abc32c17cd58a04d | Split a single string into multiple lines of text, storing each as a
VisionEgg.Text.Text instance | class SplitDocumentApi
def split_document_txt_by_line(input_file, opts = {})
data, _status_code, _headers = split_document_txt_by_line_with_http_info(input_file, opts)
data
end | 0 |
a80bef7444ea18b4225c96a6f963adce | 421befaa1050fddb58a340e24de62406 | 告警转派 | export default class ExamineController
alertTransfer() {
this.utilityService.goState('mask.examine-transfer', {"id": this.submId, "pageId": "pr1100", flag: 'true', laundryFlag: '5'});
} | 1 |
f72d86b606a36ba29c137f2d269718bf | 02c1f1d62c6002730f7316d7b6d57dc6 | Purges the provided pages and recursively updates the link tables. | BacklinkCache::get( $title )->clear();
$other = $title->getOtherPage();
$other->purgeSquid();
$title->touchLinks();
$title->purgeSquid();
MediaWikiServices::getInstance()->getLinkCache()->invalidateTitle( $title );
HTMLFileCache::clearFileCache( $title );
InfoAction::invalidateCache( $title );
if ( $t... | 1 |
420649a3a6e904aedcfddc5c3d82e4e9 | a56974f9683c679efd985693153b1d33 | если в поиске участвует выбор этажей, и он не максимален, включаем этажи в поиск | {
if ( isset( $_POST[ 'depdrop_parents' ] ) )
{
$number = $_POST['depdrop_all_params']['number'];
$id =$_POST['depdrop_all_params']['building'];
$list = CommunityRealestate::find()
->andwhere( ['in', 'building_id', $id] )
->andwhere( ['in', 'room_number', $number] )
->orderBy('... | 0 |
bcd8f8d8f7488fca40a93f6f407fabb5 | db2c18df4073124530ce01d65f6bccb7 | #任意(center)の点から最も近いnvic点を求める関数 | C = as.matrix(C)
k = nrow(C);
dist = c(rep(0, k));
for(i in 1:k) {
dist[i] = calc_dist(x, C[i, ]);
}
return(which(dist == min(dist))[1]);
} | 1 |
ce38f04f5f06b33900eb66f6740d8dcc | b1bcc88839bfef50c5f2b39a17d515ea | Recebe duas imagens e as posiciona uma ao lado da outra. | def pegar_imagenes_alineado_izquierda(superficie1, superficie2):
w,h= superficie2.get_size()
w1,h1= superficie1.get_size()
superficie2.blit(superficie1, (0, h/2-h1/2))
return superficie2 | 0 |
549d48095ec278316f76c79e943f7f92 | 837a7127c74532e53308f0d3c31acf20 | 对指定字符串进行非空检验,此版本的为空不包括空格字符,制表键等有长度的空字符串。 | public class StringKit
public static boolean isNotEmpty(String str) {
if (str != null) {
str = str.trim();
}
return (!(isEmpty(str)));
} | 1 |
24eaf866c087134eaa7675ad7b8c66bf | 05e3440e97486a2aba8c977a28fe04d6 | @brief Rotate-left word N of S into D.
EEEE 1001010 0NI DDDDDDDDD SSSSSSSSS
ROLWORD D,{#}S,#N
D = {D[15:0], S.WORD[N]). | fn dsll(&mut self, rd: Register, rs: Register, rt: Register, shift: u8) -> Result<()> {
unsafe {
let mut rd = Into::<u8>::into(rd) as u32;
let mut rs = Into::<u8>::into(rs) as u32;
let mut rt = Into::<u8>::into(rt) as u32;
let mut shift = shift as u32;
... | 0 |
13d8bf4e19435251de71060330d51b15 | 6f83c119ca124d83d97b97847dd61cda | Train locally using fl_model. At the end of training, a
model_update with the new model information is generated and
send through the connection. | train_data, (_) = self.data_handler.get_data()
_train_count = self.data_handler.get_train_counts()
val_data = self.data_handler.get_val_data()
try:
lr = fit_params['hyperparams']['local']['optimizer']['lr']
except KeyError:
raise ValueError('lr value is no... | 1 |
ff868fbbfcb6ee811ea1de8534c0e5fe | 760e0d12b5506b02e5a8a662f5baa08f | Returns the parse tree node that at is at the root of this namespace and includes all decorations. If there are no decorations, returns the same as {@link #getNode()}. | @Deprecated
T getNode(); | 0 |
f2cd2a12fd4135991d1d8ae479dd9df7 | 8c2bb7615f2607e10d76d0f54ed873ac | Checks if two cubes are in the same location | {
if (one.i == two.i && one.j == two.j)
{
return true;
}
return false;
} | 1 |
f46c9805f72204967f68504c8b7a2264 | 7efbdba47a18ef9b4d2e0fca128dd00b | Tests getting of a saved version from file | initial_list = [0.1, 0.3, -0.3]
save_list(initial_list, "list.json")
loaded_list = load_list("list.json")
assert initial_list == loaded_list
remove_file_if_exists("list.json") | 1 |
2885e8a183dd60ee0fdc21549219ab4b | 57a744198ce686d0e0a6e70ef6dd45e4 | 如果 圖片成功載入 繪製成canvas | function initCanvas () {
const img = document.getElementById('j-init')
img.onload = () => {
const sw = img.width
const sh = img.height
preCtx.drawImage(img, 0, 0)
}
initGenerate()
} | 1 |
f23021cb4a87d54adb3d30830bd96a7c | 80bb67ef4db94d6e2d5e816448f90290 | This method *must* be implemented by the client implementation to
parse out and setup the request objects action, provider and parameter
information. | abstract class AbstractRequestProvider implements ProviderInterface
abstract protected function parseData($rawData); | 1 |
4089c13b0cbffc7804693ac0ca1876c2 | 7db45d95d9d999d2c335fdea38ff2001 | Using GloVe, embed each token then aggregate them. | super().__init__()
self.embedding_dim = embedding_dim
self.embedding = nn.Embedding(len(vocab), embedding_dim, padding_idx=vocab.stoi['<pad>'])
self.embedding = nn.Embedding.from_pretrained(vocab.vectors)
self.embedding.weight.requires_grad = False
self.pool_type = pool_... | 1 |
968aa6c77aea4599c26642ecfc13637a | 1750ee4da29093af53129b2386866bc3 | Safely execute code in new namespace with specified dictionary | mod_name, mod_fname, mod_loader):
if init_globals is not None:
run_globals.update(init_globals)
run_globals.update(__name__ = mod_name,
__file__ = mod_fname,
__loader__ = mod_loader)
exec code in run_globals
return run_globals | 1 |
143f47e89d01a6189feb157696da599f | d42932d9e405777cb9292f11defa654f | Starts the iRobot Create's Cover and Dock demo. | {
UACRevealer.Enter();
started = true;
if (!IsDemoMode)
{
Runtime.StartExecute();
}
} | 0 |
02601b01c1e53c2288e99297fe1cf70d | 0dfeb2b056c43fd8f52b322e26ca8287 | gives you a pop-up that shows where on the computer the program is// | {
MessageBox.Show("This Program was built to help understand simple programming concepts.",
"Help");
} | 0 |
82da4c37bbac6b1664d02bf3bc553935 | 96b3ec0b9d524639f373a225d1fc16f5 | Drain stamina during heavy attack | {
if (sprinting && (movingHorizontal || movingVertical))
{
stats.AddStamina(-globalSettings.staminaDrain);
}
else if (!sprinting || !(movingHorizontal || movingVertical))
{
stats.AddStamina(globalSettings.staminaRecharge);
}
if (stats.G... | 0 |
77151b25e9c533ced8f4e0fce39ae0a3 | 6a4c98977f6254de80b86cecafd398f6 | Reads line number lineNumber in file fileName (initialized in constructor) | String returnLine = "DONE";
try(BufferedReader in = new BufferedReader(new FileReader(fileName))){
String line;
int currentLineNum = 0;
while((line = in.readLine()) != null){
if(currentLineNum == lineNum){
returnLine = line;
}
currentLineNum++;
}
}catch(IOException e){
System... | 1 |
51e521b7c8c8a68509af2a6c0489eba2 | d858396c6d93d4b35989e5e4d6d5debc | !查询运行的位置下限 | @Table(name = "t_pdms_check_biz")
public class PdmsCheckBizDto extends BaseDto implements Serializable
public void setLower(Integer lower) {
this.lower = lower;
} | 0 |
11c3f9e0ea15b9457c76b9dd0035f926 | c59840b55d391db0c0ee3b9bf86e59ab | Updates the number of captured red marbles. Takes no parameters and returns nothing. | public class MyBoard implements Board{
@Override
public int getRedCaptures() {
return redCaptures;
} | 0 |
fafe003dbfc9985fb2664c6c884d585b | c40fa8589d279e7afb5b36b05b41da1f | Get an exception thrown when you try to delete a user that is not there | public class UserDAOTest
@Test (expected = FuberException.class) public void getUserByIdWhenUserIdIsNonExistent() throws Exception
{
USER_DAO.getUserById( "nonExistent" );
} | 0 |
1342a7a96e4c193c7f4075ec32564ec3 | 6b6b6298ecbab9916e669cc4aa034982 | 终端输出整数,线程安全 | for (;;) {
int i = atomicI.get();
boolean suc = atomicI.compareAndSet(i, ++i);
if (suc) {
break;
}
}
} | 0 |
05421342e392dcd5e796306cb91a4be2 | da7ce6b8763280ef59fbcfcc64cc5a26 | Perform a given action within the context of a new, isolated state. Modifications are temporary
and the existing state will be restored afterwards. | dt = self.to_timedelta(period)
disposed = []
s = [state]
def tick(scheduler, state):
if disposed:
return
self.schedule_relative(dt, tick)
new_state = action(s[0])
if new_state is not None:
s[0] = new_state
... | 0 |
e244efd55730e3a15d63ce8359a1b04e | 4972926ce34c52ee1d2a56407b0cb319 | Encode the word using handCode rules. | code = word.lower()
for rule in rules:
code = re.sub(rule[0], rule[1], code)
return code.upper() | 1 |
d700b3788dbfed09f9b87815ce9925d2 | 50ac3addcd727b58eb1610425db6d891 | 비동기로 서버에 병원정보 요청하는 함수 | public class ApiHosptal
public void parsing3(String ykiho) throws IOException {
StringBuilder urlBuilder = new StringBuilder("http://apis.data.go.kr/B551182/medicInsttDetailInfoService/getMdlrtSbjectInfoList");
urlBuilder.append("?" + URLEncoder.encode("ServiceKey","UTF-8") + "=mVuXPgyIJRP7yT3vIZK5ZpG2e1Gc... | 0 |
a25cb8747ceb382c82793372fb016e7b | d962c739e9a6df82d3c50a2db696cede | 调用时传入url,并返回可调用函数hook | function hookfun(fun) {
return function () {
var args = [].slice.call(arguments);
if (funs[fun] && funs[fun].call(this, args, this.xhr)) {
return true;
}
return this.xhr[fun].apply(this.xhr, args);
}
} | 0 |
533a7ccf12db38b73a0931cc3dff760e | 18b03f50617bab754f559db17a9b2158 | Test whethre a character is a punctuation of Chinese. | public class StringHelper
public boolean isChinesePunctuation(char c) {
Character.UnicodeBlock ub = Character.UnicodeBlock.of(c);
return ub == Character.UnicodeBlock.GENERAL_PUNCTUATION
|| ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION
|| ub == Character.UnicodeBlock.HALFWIDTH_AND_FULL... | 1 |
0c1c831541c9f9a8ecfe9267d3136744 | 7896e070a85ae6bc4b2a550165688539 | 删除此章节下所有的段落 | void deleteChapter(String id); | 0 |
8686dbf8b41857188af08fb837d02b24 | 89ee81a1be79d1f2c65faf6529ccd99b | Check if the homomorphism is valid (preserves edges and types). | with self._driver.session() as session:
tx = session.begin_transaction()
valid_typing = check_homomorphism(tx, source, target)
tx.commit()
return valid_typing | 1 |
3be2445f2023b5905a9bf9fb5da5a25c | 7fd919dc414437b0bfb9e48075877df0 | 要求3D CAVVアルゴリズムを設定する | isApply3DEffect = _3deffect;
if (_3deffect) {
legend.setProperty(StyleGraphicPropertiesElement.Stroke, "none");
legend.setProperty(StyleGraphicPropertiesElement.StrokeColor, "#b3b3b3");
legend.setProperty(StyleGraphicPropertiesElement.Fill, "none");
legend.setProperty(StyleGraphicPropertiesElement.FillC... | 0 |
d6624e3e9beee03c585594c2af53a2f6 | f54dbc9d112968628c3849790b83e905 | check whether teacher is exist in specified group. | class TecInfo(BaseFile):
def teacher_exist(self, teacher_id, teacher_ids):
if teacher_id in teacher_ids:
return True
else:
return False | 1 |
931a68f8f65eee6982d9191a139f40ce | 43c23551080272f1f5c2a4748eefff5e | 根据国家中文名称查询国家编码
国家中文名称 | if country_name == "":
return "CHN"
country_name = country_name.strip()
if G_dictionary.country_name_dict.has_key(country_name):
return G_dictionary.country_name_dict[country_name]
else:
return "CHN" | 1 |
41e21634f134e92d7bcdbae721a5cbc1 | 55a464d2ee9e1d5c2f598b1e9e307165 | Tests the creation of the second stack in the DoubleStack object. | stackitem s;
Sl(2);
So(2);
s = S1;
Push = s;
s = S1;
Push = s;
} | 0 |
6863f0124cf3539d8437688a4798da58 | 1dd7406bfdc6c24f1fe3338325d39b19 | Scans for PluginType's and Concrete Types that close the given open generic type | public final class GenericTools
private static void getGenericInfos(Class<?> type, List<GenericInfo> result, Class<?> ownerType) {
Type[] genTypes = type.getGenericInterfaces();
if (genTypes.length > 0) {
for (Type genType : genTypes) {
if (genType instanceof ParameterizedTyp... | 0 |
8eaf7ad574908b0db64d87a619ac543b | 6b8b38deaeb44d5a80d5532a8896328c | Processes an input source and adds its character, word, and line
counts to the respective variables. | public void process() {
while (!exit && (!prev.isDone() || !input.isEmpty())) {
while (!input.isEmpty() && !exit ) {
String line;
try {
line = input.take();
linecount++;
charcount += line.length();
if (line.length() > 0) {
String[] words = line.trim().split("\\s+");
... | 1 |
06db042a3bfe0b311bc96074d6866828 | 0ee2b976fad3497df2ccf4d19b7686d5 | Provide an {@link AppenderAdapter} for the underlying Root logger. | logAppender = new WriterAppender(new PatternLayout(
ConsoleSettings.CONSOLE_PATTERN_LAYOUT.get()), new ConsoleWriter());
LogManager.getRootLogger().addAppender(logAppender);
} | 0 |
b3e09872ab0c25b55744739c366739bb | 980fefe06b491e3e02a1f18cea897085 | Делаем запись на стене пользователя с указанным ID | class Server:
def make_post_to_user(self, id_us):
data = requests.get("https://api.vk.com/method/wall.post", params = {'access_token': self.tok,
'v': self.v,
'owner... | 1 |
28ec9fb111a2ca49b5894f2636be711c | 392788191b70843f8d8ff5b81c644e31 | Lista todos os departamentos. | $departaments = \App\Departaments::with('users')->get();
$collection = (new Collection($departaments))->paginate(4);
return view('departaments.index', ['departaments' => $collection]);
} | 1 |
ed60e192b54a8eef294994c30d05729d | 33e4384c602a5de4b5ca715f4671d5bb | Paginates the days to the right. | Calendar calendar = Calendar.getInstance();
calendar.set(Calendar.YEAR, calendar.get(Calendar.YEAR) + year.getCurrentItem());
calendar.set(Calendar.MONTH, month.getCurrentItem());
int maxDays = calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
String dayPostfix = getContext().get... | 0 |
55aff54dd8a53cfea634d5b21b2644da | 9832a8160ca4bb36368df9a92835b0c1 | Возвращает объект платежной системы | if (!$this->PaymentSystem) {
$this->PaymentSystem = new IfreePaymentSystem($this->User);
}
return $this->PaymentSystem;
} | 1 |
de7573b6beb83f2f3476c7cd857091f0 | e6f382d061b04902e8dbc92beb5ebf4c | 查看规则集的规则列表
根据项目ID、规则集ID等条件查询规则列表。
Please refer to HUAWEI cloud API Explorer for details. | public class AomClient
public ListAlarmRuleResponse listAlarmRule(ListAlarmRuleRequest request) {
return hcClient.syncInvokeHttp(request, AomMeta.listAlarmRule);
} | 1 |
856471d2ad19743a8becb2409c266f95 | 4464bd18ba68d7fa8037fa1c5a057b63 | Funcion que retorna las distintas url a trabajar por el cliente | function getUrlServer(request,action){
if(request=="#tableMatters" && action=="delete"){
return '../core/php/DeleteMateria.php';
} else if(request=="#tableUsers" && action == "delete"){
return '../core/php/DeleteUser.php';
} else if(request=="#tableMatters" && action=="edit"){
return... | 1 |
49dafea61af2108e0ec5a5387cab8ba2 | 73888718ed2fea52f7deb0fe52a55f71 | Determines whether the boat was hit | {
foreach ($this->shipList as $ship) {
if ($ship->deckIsSet($y, $x) && !$ship->isDestroyed()) {
$ship->hit();
return $ship->isDestroyed();
}
}
return false;
} | 1 |
fea1a5822720a85d446724ec43a1946f | 9abb2d940c44f79eef750aad04724a4c | Set HotelSearchCriteria value | class HotelSearchCriteriaType extends AbstractStructBase
public function getCriterion()
{
return $this->Criterion;
} | 0 |
b58ccf6a14f09a0f60e567310e366753 | 749e2964280a32ffeeab9a9c528b11d6 | metoda pozwalajaca na stworzenie poziomu pierwszego | {
snakeX[0] = WIDTH/2; snakeY[0] = 3;
snakeX[1] = WIDTH/2; snakeY[1] = 2;
snakeX[2] = WIDTH/2; snakeY[2] = 1;
for(int i=3; i< 100; i++)
{
snakeX[i] = 0;
snakeY[i] = 0;
}
char waz = 219;
for(int i=0; i<rozmiar; i++)
Level[snakeY[i]][snakeX[i]] = waz ;
} | 1 |
379d50dbaa789d53c0020b5b3d1f6d16 | 78fb8975c9f4a87c8680a2f7d6a62244 | Clean up after the FtpClient. | namespace au.util.io
public class FtpClient
private void Close() {
if(_sock != null)
_sock.Close();
} | 1 |
8a49386f46c1a9e6721c56988805ad48 | d7bb387c5368cd1f863825ccfa1dae49 | Reads and returns the value of 'column' within 'row'. If an ongoing
transaction has changed 'column''s value, the modified value is returned.
The caller must not modify or free the returned value.
Various kinds of changes can invalidate the returned value: writing to the
same 'column' in 'row' (e.g. with ovsdb_idl_txn... | assert(idb && id > 0);
if(!tcidblockmethod(idb, false)) return false;
if(!idb->path){
tchdbsetecode(idb->txdb, TCEINVALID, __FILE__, __LINE__, __func__);
tcidbunlockmethod(idb);
return false;
}
char *rv = tcidbgetimpl(idb, id);
tcidbunlockmethod(idb);
return rv;
} | 0 |
87acd599119325781d60ade7f6f42468 | f25fadad53a584bd74f0c653619b34d2 | Gets the size of the specified ascii image. | public class AsciiImage
public int getWidth() {
return asciiImage.length;
} | 1 |
f48289a6c179d2d0e973418aff73f99d | 28bce09dbbe2b7f3c9502a833617ef60 | returns a negated version of this image. | class PointBMPImage(BMPImage):
def negate(self):
self._map(lambda r: L - 1 - r)
return self | 1 |
73e5b8173898ddd362e995a644589ef5 | 878c2780e0dfd6c1ae56185447521921 | Remove all text from the entry | class Entry:
def clear_character(self):
ex.name_box.setText('')
ex.title_box.setText('')
ex.bio_box.setText('')
print('cleared') | 1 |
1001a17e1464492a8ec83f52307dcef0 | 51d25f5d722125e3a239732193dc35a8 | 如果是在自动寻路中,则判断当前的传送点是否是自己需要的传送点 | if (!m_NavMeshAgent.pathPending && m_NavMeshAgent.remainingDistance <= 0.1f) {
PatrolNum++;
if (PatrolNum >= PatrolPoint.Count) {
PatrolNum = 0;
}
m_NavMeshAgent.destination = PatrolPoint[PatrolNum];
}
} | 0 |
b874d0f4586b0b3f035c7dea91535976 | 5fc2bd92c12018d22b227d068c02e017 | Search for the keywords of the property SearchText in this tree. | {
var query = new StringBuilder();
if (this.Parameters.SearchTerm.Contains('"'))
{
query.Append(this.QueryAllPropertiesAnd(SearchUtilities.GetSearchTermsSplit(this.Parameters.SearchTerm), 1.0));
}
else if (!this.Parameters.SearchTerm.Co... | 1 |
d9bdee134b71aaa2ded438c2fe5f8dd2 | 80212a8bf727d3165c026d84763a65dc | 木を表示する | def disp(ban: dict):
board = copy.deepcopy(ban)
print(disp_stand(board[0],0))
print(" 9 8 7 6 5 4 3 2 1 ")
print("+-ー-ー-ー-ー-ー-ー-ー-ー-ー+")
print('|{}{}{}{}{}{}{}{}{}|一'.format(disp_piece(board[91]),disp_piece(board[81]),disp_piece(board[71]),disp_piece(board[61]),disp_piece(board[51]),disp_piece(boar... | 0 |
8164c63f0d48e7f5e0b59743e2e5fd8e | 2e6e35f2681d999fe7cbd520bc771e0c | Should return a generator of Event-model instances, ordered
by origin time. | event1 = self.make_event(D1T1, D1T2)
event2 = self.make_event(D1T3, D1T4)
event3 = self.make_event(D1T3, D1T4)
event4 = self.make_event(D1T3, D1T4)
event5 = self.make_event(D2T1, D2T2)
return [event3, event5, event1, event2, event4] | 0 |
ecef6e6944e1e8d661d7df0e61950566 | b3f299568d6fc9a1cef7979fe33d4e11 | Metoda zwracająca walutę jaką chce zakupić użytkownik | class CartController
private function getCurrency()
{
return $this->_currency;
} | 1 |
5cb2fab2b5dea5f65ea10e1de8a8b6af | 1f5b279e16e903fafc4763520f927e56 | inserts node at the front of the list | Node* temp{ new Node{ line,head,head->next } };
head->next->prev = temp;
head->next = temp;
theSize++;
} | 0 |
6c2b0e973c3ce907717c4acc14492bec | 2fe95b6762c4ac2a40b4fcfdf446df68 | Set 是否回滚 | class Get
public function setRev(bool $value): Get
{
$this->rev = $value;
return $this;
} | 1 |
349a1d43c6f38ec969f94ac910833ea9 | a9745474b28bf507311657cc8211b7c8 | Remove consecutive duplicates from a string | Arrays.sort(inString);
char[] outString = new char[inString.length];
char lastChar = '\u0000';
int counter = 0;
for (int i = 0; i < inString.length; i++) {
if (lastChar == inString[i])
continue;
outString[counter] = inString[i];
lastChar = inString[i];
counter++;
}
char[] rtnString = new c... | 1 |
dccc695f15cd31a145c75862eb213752 | 0992560dd614b7e66ba8e9990987077f | Pushpin clicked event handler | class Map
private pushPinClickHandler () : any
{
Microsoft.Maps.Events.addHandler(this.pushpin, 'click', ()=> this.defaultInfobox.setOptions({visible: true}));
} | 1 |
3986a032786af1a0e0845423bf384187 | 3318bbcc460aecffef162503f1560573 | Closes wave input | {
try
{
waveIn.Dispose();
waveIn = null;
writer.Close();
writer = null;
}
catch (Exception err)
{
applog.write("ошибка: " + err);
}
} | 1 |
f6e7e5581886b44190157a3b4e422990 | 1c347060c227212a5cc25f7b863edd3f | getCamera returns the camera attached to entity e (if there is one). | func Camera(children ...Element) *CompoundElement { return newCE("Camera", children) } | 0 |
5c374d709e5b6129d63e75845c4a5021 | 0fc43e14998fc9763a2a4af8907640a0 | Crée un nouveau contact et retourne son ID | class Model:
def ajouter_contact(self,contact):
conn = sqlite3.connect('annuaire.db')
cursor = conn.cursor()
cursor.execute("""
INSERT INTO nom_prenom(nom,prenom,groupe,favori) VALUES(
:nom,
:prenom,
:groupe,
:favori
)
""",contact)
conn.commit()
cursor.execute("""SELECT MAX(id_contact) from ... | 1 |
6b09bf0e39e79be90fe8e1dab3b65870 | ee6c2d906bc50d1d62b82384067d8b97 | Create a rule for single-quote string literals | register_spot(BEGIN_SINGLE_QUOTING) do |scanner|
begin
scanner.scan_until(/\'+/)
end while (!scanner.matched.nil? && scanner.matched != "'" && !scanner.eos?)
end
end | 1 |
8392bf263a3175939b12b82303375149 | 00fc4fbcda28f8296aa88bcafc28a3a2 | 根据医院编号、科室编号和工作日期,查询排班详情信息 | @GetMapping("getScheduleDetail/{hoscode}/{depcode}/{workDate}")
public Result getScheduleDetail(@PathVariable("hoscode") String hoscode,
@PathVariable("depcode") String depcode,
@PathVariable("workDate") String workDate){
List<Sched... | 1 |
86bab234c9d76727cdad220cbed0d183 | bba8a6391ff7b250f80c504169b84452 | Fixture to provide async iosxe driver instance | class IosxrDeviceHandler(DefaultDeviceHandler):
def __init__(self, device_params):
super(IosxrDeviceHandler, self).__init__(device_params) | 0 |
fa7b0f6232ee44151768ad06a277ff31 | 427d13264247dbdd575ddf2ee8b42136 | Returns if mutation should happen when creating new population of agents. | boolean canTriggerMutation(); | 1 |
276b9faeda64247fe162940644590038 | 56ccee57c473ede0defdbf2dc043ada7 | Gets the current player armor on HUD. | public class Health : MonoBehaviour
public int GetDisplayArmour()
{
return Mathf.CeilToInt(CurrentArmour);
} | 1 |
dfb27c90c945925c19d8480d298decdb | e214668d219251d897b84ecbf9656a83 | Check that the Waller-Hartree total cross section can be set | setTripletProductionCrossSection )
{
std::vector<double> cross_section( 2 );
cross_section[0] = 1e-12;
cross_section[1] = 2.0;
epr_data_container.setTripletProductionCrossSection( cross_section );
FRENSIE_CHECK_EQUAL( epr_data_container.getTripletProductionCrossSection(),
... | 0 |
00e4c386f42aaccc8743e456ceda0e87 | e703ba76538a1aff9aee44e9491226f3 | Load and reslove all schemas from directory or url | class Schema
function __construct($path = null)
{
if ( $path !== null )
{
include $path;
}
} | 0 |
ff899846fa1370544958333315c362c6 | cb25230de3840e3394054d6debe47651 | 查看电子处方笺 | public String precheckDoc(DjPrescriptionParam param,ModelMap map,@PathVariable Long did)
{
if(!isLogin())
return URL_RedirectLogin;
DjUser user = getUserInfo();
Map<String ,Object>searchMap = new HashMap<String,Object>();
searchMap.put(DjPrescription.sStore, user.getRealName());
DjPrescription preList = ... | 1 |
8c80c0175b911c64b381d52e3fe23d3c | 172d193a74d76100a093fc13594996d8 | 哨兵模式 redisson 客户端 | @Configuration
@ConditionalOnClass(Config.class)
@EnableConfigurationProperties(RedisProperties.class)
public class RedissonAutoConfiguration
@Bean
public RedissonClient redissonSentinel() {
return RedissonUtil.getRedissonClient(redisProperties);
} | 1 |
2a279a5a7f59167f93ba5d3f0e7a4671 | 6f57938f9acf446edb88202bcdef14a4 | Sends a **Software configuration** request to SPOT.
It asks info about one or more software items contained in SPOT.
+---------------+----------------+
| Command class | Command type |
+===============+================+
| 0x10 | 0x03 |
+---------------+----------------+ | class Proxy(proxy.Proxy):
def create_software_config(self, **attrs):
return self._create(_sc.SoftwareConfig, **attrs) | 0 |
e202ea55a1800249c0a0102fd9017d5b | 18c26b15ee907afdecc79f28dbd579d5 | Sets the application info. | {
string title;
if ( fn != null ) {
fn = fn.Trim();
}
if ( !string.IsNullOrEmpty( fn ) ) {
title = fn + " - " + AppInfo.Name;
} else {
title = AppInfo.Name;
}
this.Title = title;
} | 0 |
000c973b38840f30e1f2cd36cf3e9ba0 | 4a16d3a07399316058b398a48aeb033a | Does initialize the test environment before each test run. | public final class RefreshTokenGrantHandlerTest extends DatabaseTest
@Before
public void initializeEnvironment() {
TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
handler = new RefreshTokenGrantHandler(getSession());
} | 1 |
804a9777dae53ea94406b6fd51c78f91 | db8bca1dbcf506bfbd5f9c20939e3e0b | GET: /LegArmor/ | class ShipArmorsController
def index
@ship_armors = ShipArmor.all
end | 0 |
81dd2180d56cf82965af336ca6c850e1 | 53d57f6c1498235b928ce681f5cf2b6f | Like remove(), except executes atomically, returning success/failure | class KyotoTycoon(object):
def remove(self, key, db, flags=0):
return (yield from self.remove_bulk(((key, db),), flags)) | 0 |
45297347ec94e939337d5544a09a2453 | 9f91a75d045d1449605605ffffdf41a8 | Function performing right rotation | Node* rotateRightRight(Node* node) {
Node *a = node, *b = a->right;
a->right = b->left;
b->left = a;
return b;
} | 1 |
e21c5eb6e4b4df3162a27340b7c6cdf6 | 8c04d506ccda6c38c5defa365ebb420d | 将CountDownLatch全部进行countDown操作 | @Slf4j
public class CountDownLatchExampleTest1
@Test
public void test1() throws InterruptedException {
ExecutorService exec = Executors.newCachedThreadPool();
final CountDownLatch countDownLatch = new CountDownLatch(threadCount);
for (int i = 0; i < threadCount; i++) {
final int ... | 1 |
0587689645af19ca443ea86aee1db188 | 077cc2f6149929d7b2d779c3aa5754d1 | Getter for the pid controller that is used to correct the heading of the drone during the flight between
two turns | PidLoop& Rover::bearingPid()
{
return mBearingPid;
} | 1 |
cb0376c740163756985fa3b1820b1b2e | 70b79fe44bacf6179cb7c5c628673583 | 在地图上创建吃豆人 | if($map_id) {
$map = $this->getMap($map_id);
$optionsFood = (object) array(
'x' => rand(1, $map->width-1),
'y' => rand(1, $map->height-1),
'map_id' => $map_id,
'type' => 0,
'value' => 1,
);
... | 0 |
8c7c957120ae0a768444b9c63855ad9b | a1aae12a6091df46f675610cfa805148 | [START classroom_create_course] | function createCourse(request: Request, response: Response) {
CreateCourseService.execute({
name: "NodeJS",
duration: 10,
educator: "Dani",
});
return response.json({ Message: "Bem vindo ao mundo Node.js" });
} | 1 |
a45cb7cf46f917a9221410cf63aa14fb | 94a216559a7700eae8eb81bef97b509e | 返回扩大后的矩形框 | public static class RectangleUtils
public static Rectangle Extand(this Rectangle _rect,float _width,float _height) {
return new Rectangle(_rect.m_center, new Vector2(_rect.m_size.x + _width * 2,_rect.m_size.y + _height * 2));
} | 1 |
03f8cce8a2da27ded4937e2a9c5d0f3e | 3ca80c963918e56c147915c6c3ca2fc3 | Получить задания подразделения из кеша. | if(is_null($this->cacheHqs)) {
$this->cacheHqs = HqBusiness::getFromTypeMissions($this);
$this->cacheHqs->store();
}
return $this->cacheHqs;
} | 1 |
86777627ebb1b7cfedfc02797b575188 | c4d4e5c289083b8d10661f1949b134e3 | Método estático que verificará si un string contiene otro string en su interior. | var resultado: boolean = false;
if (stringReference && stringReference != null && stringToSearch && stringToSearch != null
&& stringReference.length && stringReference.length > 0 && stringToSearch.length
&& stringToSearch.length > 0 && stringToSearch.length <= str... | 0 |
6df0321ea893a0159239a159a02a7244 | 1d40b1985dd3e9b9d387d9c401e6c754 | 改变文章css属性,使lazyload失效 | if (!is_admin()) {
if (isset($attr['data-no-lazysizes'])) {
unset($attr['data-no-lazysizes']);
return $attr;
}
$attr['class'] .= ' lazyload';
if (isset($attr['srcset'])) {
$attr['data-srcset'] = $attr['srcset'];
unset($attr['srcset']);
} else {
$attr['data-src'] = $attr['src'];
}
$attr['sr... | 0 |
0c0a082557c151d1e65099b26b9c7297 | 57bcee15dee9b5daf433299cd227d248 | Sets up the screen's elements to specified coordinates. | Rectangle2D primaryScreenBounds = Screen.getPrimary().getVisualBounds();
basePane.setLayoutX(primaryScreenBounds.getWidth()/2-640);
basePane.setLayoutY(primaryScreenBounds.getHeight()/2-360);
rectangle.setLayoutX(primaryScreenBounds.getWidth()/2-640);
rectangle.setLayoutY(prima... | 1 |
fb49d278b28f2086b9fa6898253c8b4a | 86380ced27ea4138fbed7328b5e6b907 | Calculate transaction cost value. | return (current_cost * current_amount + max(5,
trans_amount * trans_price * 0.0003) + trans_amount * trans_price) / (
current_amount + trans_amount) | 1 |
d4794ca5484f52ff8250e699e36488bd | d2eacc70a3709bf83e23c41b78d460ce | Check booking page screen is displayed | class DashboardController
public function billBlockCheck(\WebGuy $I)
{
try {
$I->see(MainPage::$BILLS_PAID_TEXT, MainPage::$BILL_SUGGESTION_BLOCK_SELECTOR);
} catch (\Exception $e) {
}
$I->see(MainPage::$MY_BILL_TEXT);
$I->seeElement(MainPage::$BILL_BLOCK_CONTENT_... | 0 |
550d7e722f1f73e3ee6d09080e97b29e | 3655defe5952727a6089c752f622d218 | Перевод количества секунд в строку (дни, часы, минуты и секунды) | const levels = [
[Math.floor(seconds / 31536000), 'years'],
[Math.floor((seconds % 31536000) / 86400), 'days'],
[Math.floor(((seconds % 31536000) % 86400) / 3600), 'hours'],
[Math.floor((((seconds % 31536000) % 86400) % 3600) / 60), 'minutes'],
[(((sec... | 1 |
f1be1464bc32811097c0a54555e80bff | 303fc9dd77f68829e539cfd742406111 | Gets the account. Results are cached. | public class AccountCache
public static AccountInfo getAccount() {
return (AccountInfo) UnoApplication.getCacheManager().getAsObject(Constants.KEY_ACCOUNT);
} | 1 |
3f3a4e022a88ee12b508874547e857e6 | 6a518bd52180ba612e8f9c4da9460c95 | func that returns how many tasks are currently running | abstract class Mediator implements ITask
public function running_count() {
return count($this->running_calls);
} | 1 |
427153e83299560f4470083a784ae345 | 47e9053fa110ef8a2cb53a4ebe99dfc2 | Updates an order item attribute/property. | try:
params = request._serialize()
headers = request.headers
body = self.call("ModifyOrderAttribute", params, headers=headers)
response = json.loads(body)
model = models.ModifyOrderAttributeResponse()
model._deserialize(response["Response"]... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.