query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
8298ff05931c7e2c90fb003b2cda320b | f3185aeb388d96f419f5b298c016bd39 | 查询usrInfo表中的信息 | @SpringBootTest
public class UserInforMapperTest
@Test
public void selectUser() {
System.out.println("LLL");
System.out.println(userInforMapper.selectUserInfor());
} | 1 |
7e113009d0321af8ed4c3a7ea0c2e63b | a13ef207577ab89da9d6e4ff9fce3d15 | Write an <see cref="System.Int32"/> to the given byte array
starting from the specified offset,
and composed as the Little-endian format | [MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void WriteInt32(this Stream stream, Int32 value)
{
WriteInt32(stream, value, new byte[sizeof(Int32)]);
} | 0 |
6dfddea7eb27016c9c4e4f85296a38b3 | 9963b77a2a41a10379ed1f2ff4716984 | クレジットカード名義取得メソッド | public class CreditPaymentAction extends ActionSupport implements SessionAware{
public String getCreditCardMaster() {
return creditCardMaster;
} | 1 |
b495f7363b07f8c9181a02ee18448192 | ec62bc2ff22f19da08fd3fe2e29c7c9f | Function for calculate mean pixel intensity for all frames in a video | io.use_plugin('freeimage')
list_image=sorted( glob.glob( os.path.join( os.path.abspath(dirin), pattern ) ) )
imlist=io.imread_collection(list_image)
fimlist=imlist[0].astype(float)
for i in range(len(imlist)-1):
fimlist += imlist[i+1].astype(float)
meanimg_ens=np.rint(fimlist/len... | 1 |
a3e96c8e345c4c835822663311521834 | 06262647f6b4515f07debe47cbde7844 | Describe:开始扫描(判断操作系统版本号, 用于处理不同蓝牙设备)
Date:2018-04-16 17:41:02 | if (!mBle.isSupportBle(this)) {
toast("该设备不支持BLE蓝牙")
finish()
}
if (!mBle.isBleEnable) {
val enableBtIntent = Intent(BluetoothAdapter.ACTION_REQUEST_ENABLE)
startActivityForResult(enableBtIntent, Ble.REQUEST_ENABLE_BT)
} else {
... | 0 |
0abdcf5f972c921e2a1d5babe24cc342 | 256b2410917c72b0a51bc7a975f563de | Update reviews to db | return axios
.put("/review", {
review_id: review.review_id,
context: review.context,
score: review.score
})
.then(response => {
if (response.message == "success") {
return true;
} else return false;
})
.catch(err... | 1 |
e5dfa2461159fd2ef03182d9a22abdb4 | 332c36a4c292a3e4c3247c136781606a | Wraps subprocess.Popen().communicate().
Returns ((stdout, stderr), returncode).
- The process will be killed after |timeout| seconds and returncode set to
TIMED_OUT.
- Automatically passes stdin content as input so do not specify stdin=PIPE. | if 'stdout' in kwargs:
raise ValueError('stdout argument not allowed, it will be overridden.')
if 'stderr' in kwargs:
raise ValueError('stderr argument not allowed, it will be overridden.')
stdouttmp = TemporaryFile()
stderrtmp = TemporaryFile()
process = subprocess.Popen(stdout=stdo... | 0 |
e3f5ee3b283e35084341a7fcc852387d | b09ffb45902be4ebb4f7b4a966804a11 | Generates a new 3-digit shortcode. | class QED_Shortcodes_Helper_Service extends SD_Component
public function generate_id() {
static $id = 0;
$id++;
return $id;
} | 0 |
a9c549b80c385567d71df0e41a1ba7cf | 57520c78ceb0590f817efbf65dee6f2c | Obsluga eventu pygame w grze
Zwraca albo nazwe biezacego stanu gry (gdy stan sie nie zmienia)
albo nazwe nowego stanu gry ktory wynika z obslugi eventu | class Bt2Bd2(object):
def on_event(self, event):
self.state = self.state.on_event(event) | 0 |
a18abd2ac1382b04f1234f93347955c5 | c9f7cd0e2e80b08f7c89be223dbaf8c0 | ユニットの現在HPを設定する.
0以下は0に修正する. | public class Unit : MonoBehaviour
public void SetHP(int hpToSet) {
currentHP = hpToSet;
if (currentHP <= 0) {
isDead = true;
currentHP = 0;
GetComponent<SpriteRenderer>().color = new Color(1, 1, 1, 0);
}
} | 1 |
b0863835a313241d5cd94d29509d270b | af72b757b2b1300e008973ec6dd9f375 | 传入顺序为[c3,c4,c5],但处理顺序为c5,c4,c3 | inline void bubbleSort4(int* data)
{
#define COMP_SWAP(i, j) if(data[i]>data[j]) std::swap(data[i], data[j])
COMP_SWAP(0, 1);
COMP_SWAP(1, 2);
COMP_SWAP(2, 3);
COMP_SWAP(0, 1);
COMP_SWAP(1, 2);
COMP_SWAP(0, 1);
} | 0 |
c0fa86dc1df1eabdc430c30a0269df75 | ef3b376529624b3fe5b0ab8b3ffed80c | даёт уровень звуковой мощности от этого источника в указанной точке без учёта препятствий | float minDistance = 1f)
{
if (sound == null)
return;
GameObject emptyGO = new GameObject("Sound" + sound.name);
emptyGO.transform.position = pos;
AudioSource source = emptyGO.AddComponent<AudioSource>();
source.c... | 0 |
8324976be1ff457b76ff5bcc2dd75475 | 45fbd70ed2831a852b9fa7ddc11a0124 | Get the type of administrator. | @JsonFlatten
public class ManagedInstanceAdministratorInner extends ProxyResource
public String administratorType() {
return this.administratorType;
} | 1 |
205c611d04e917058703ce639dab270d | 8b0de030494a4f46cefb6a0f3a2781dc | Post timeseries data. | class StiltStation():
def get_ts(self, start_date, end_date, hours=None, columns=None):
s_date = tf.parse(start_date)
e_date = tf.parse(end_date)
hours = tf.get_hours(hours)
if e_date < s_date:
return False
if not hours:
return False
df=pd.DataFram... | 1 |
7e5cf24a72345d7826c2f0d8c2080012 | 94600b5871daf288099304c1e67c65d1 | Move to the next analysis request | class AnalysisRequestPublishView(BrowserView):
def _nextAnalysisRequest(self):
if self._current_ar_index < len(self._ars):
self._current_ar_index += 1 | 1 |
b04a91abaab2a4a23af3a3a93b3fa1f9 | e24578963e95179d860349f45046bac2 | 占用槽位 | local function allocateSlot(stype)
local slots = cfg.slot_types[stype]
if slots then
local _uslots = uslots[stype]
for k,v in pairs(slots) do
if _uslots[k] and not _uslots[k].used then
_uslots[k].used = true
return k
end
end
end
return nil
end | 1 |
f17c1ab38d48fb0222582f8cbfd13ff9 | 919c8d6079f6e14080a9fde9adae7d93 | Returns a newly constructed list of keys matching regular expression.
<p>
The will contain all keys whose {@linkplain OptionKey#qualifiedName(IOptionKey) qualified name} matches the
given regular expression pattern sorted by name. | String[] getKeys(String pattern); | 0 |
78e05a904879da176d99474f73c836bb | 230483d9c5b7b54f9341c060af0f17a8 | Menu handler for `alias_find_menu (Next)'. | alias_apply_handler(item, event)
Panel_item item;
Event *event;
{
char *proc = "alias_apply_handler";
sectxv_alias_window_objects *ip = (sectxv_alias_window_objects *) xv_get(item, XV_KEY_DATA, INSTANCE);
if (sectool_verbose) fputs("sectxv: alias_apply_handler\n", stderr);
aux_put_AliasList(useralias);
a... | 0 |
d199b74a28b03671d22a9e816ba38ab0 | 6a45c07525465ed3c1814430720e3e1e | Resizes each schedule | {
LinkedListNode<T> node = _tasks.First;
while (node != null)
{
ScheduleTask t = node.Value;
if (!(t.Status == Status.Scheduled || t.Status == Status.Running))
{
node = node.Next;
continue... | 1 |
a66970350412a72b21945ce7a7efc569 | 483397ea8c0b39c1154414b2091f52e6 | Busca un jugador por id | public IActionResult Get(Guid id)
{
try
{
var _jogador = _repository.BuscarJogadorId(id);
if(_jogador == null)
{
return NotFound();
}
return Ok(_jogador);
}catch (Excep... | 1 |
e675a152f6423b9a0f76d64e15ffb73d | 520948e84e3aafbe938d486cb07a887e | Returns the difference in millis between the current timer value and
a timer value previously returned by Now. | timediff( unsigned int now, unsigned int then )
{
unsigned int diff;
diff = now - then;
return diff;
} | 0 |
634994a0a60b04aa81183aa23f9937fb | d35256edb42f65b159f4b68d685d20cd | Toggle shader enable | {
orxASSERT(sstShader.u32Flags & orxSHADER_KU32_STATIC_FLAG_READY);
orxSTRUCTURE_ASSERT(_pstShader);
if(_bEnable != orxFALSE)
{
orxStructure_SetFlags(_pstShader, orxSHADER_KU32_FLAG_ENABLED, orxSHADER_KU32_FLAG_NONE);
}
else
{
orxStructure_SetFlags(_pstShader, orxSHADER_KU32_FLAG_NONE, orxSHADER_K... | 1 |
c68624a498547292ebc9f39f697aa66c | 9b453b7ea19b60b8cdbff6baa0328254 | US Exports of Goods and Services, Balance of Payments (Mln $) | namespace NinjaTrader.Indicator
public partial class Indicator : IndicatorBase
public USExportGoodsServicesBalanceOfP USExportGoodsServicesBalanceOfP()
{
return USExportGoodsServicesBalanceOfP(Input);
} | 1 |
e6e4890fcb1211dd0dddd1b02244199a | 6c70035eed22a8b9e4723c7e5e209844 | Return the GeneralSettings plugin to access the settings faster | function DiviRoids_Settings()
{
return DiviRoids_Settings::getInstance();
} | 0 |
358eff07051cd02a651377543177a7e5 | 58a69ac34f8d795c2f31b4f6670c9649 | Gets the price of this TicketTypeResponse. # noqa: E501
Цена билета # noqa: E501 | if self.local_vars_configuration.client_side_validation and total_price is None:
raise ValueError("Invalid value for `total_price`, must not be `None`")
self._total_price = total_price | 0 |
18b0cf7744b3614320e0151b17332f6d | d7885d80fff680b3c87906a68fef4ec8 | Obtém o Tamanho Máximo para o Arquivo | class Adjunto{
public function get_Size(){
return $this->size;
} | 0 |
b2ec6867fc3a04eaf0a3a2765c724c80 | 38e670ef516cd4eab1955af9b1991cce | Takes a patterned resource path and resolves it using the key/value path resources into
a segmented encoded URL. | def simple_pattern_request_path **args
resources = {
"customer:thing" => (proc do |customer:, thing:|
raise ::ArgumentError, "customer cannot contain /" if customer.to_s.include? "/"
"customers/#{customer}/things/#{thing}"
end),
"requ... | 1 |
f3d5835606489d064a761b0ac07d00ac | 47b2534e0526e70992ed155b244a71ac | Возвращает массив событий изменения указанного заказа | class Common_Model_CouponObject extends HKBaseObject{
public function getOrderEvents($partnerCode, $eventCode){
return $this->getMapper()->getOrderEvents($partnerCode, $eventCode);
} | 1 |
7621966452290d19444208d71621299b | d07d2d75cb2c82bb5b6fa63cb304ec56 | Get the Sonos speaker bass EQ. | public class Components extends Settings
public JSlider getEqLowSlider() {
return EqLowSlider;
} | 0 |
1995f16af4d684e58f8c6009f87fbb48 | 14aa8ac17f2c888b47b10d70319e54e9 | create HMM for testing posterior_decoding | Hmm *hmm;
Obs *obs;
float *a;
float *b;
float *pi;
int *obs_seq;
int *state_seq;
int mul;
int m;
int n;
int i;
struct timeval timer;
printf("\n");
#if N_TEST
hmm = (Hmm *)malloc(sizeof(Hmm));
obs = (Obs *)malloc(sizeof(Obs));
... | 0 |
99db9eae53eeb97a3c2b27d941e7d1b8 | 4e89e1c2631c8a9bc9003d22e17c48c8 | @brief json map 형식 문자열 생성. e.g.) { "sub1" : "sub-value1", "sub2" : "sub-value2" } | val json = StringBuilder()
json.append("{")
if (map != null && map.size > 0) {
for (key in map.keys) {
json.append(objectToJson(key))
json.append(":")
json.append(objectToJson(map[key]))
json.append(",")
}
... | 1 |
4a1b2a25b6b34b21d7778e8707a20a85 | d81d0b75365aeb239e890fe8d8f7e708 | Constraints are allowed at non-getters per processor option, but all other
checks (no static methods allowed etc.) still apply. | int modifier = method.getModifiers();
if (Modifier.isStatic(modifier)) {
return false;
}
if (Modifier.isAbstract(modifier)) {
return false;
}
if (Modifier.isNative(modifier)) {
return false;
}
if (method.getName().equals("getClass")) {
return false;
}
return true;
} | 1 |
54e878aa91cce3870e9350524b95dc63 | 91d32fa2be8ba232db7d47e2f946d9e9 | 从收敛队列里面,遍历符合规则的电话通知消息,进行电话通知 | @Component
@Lazy(false)
@Scope(value = "prototype")
public class ClientPremessagingEventHandler implements WorkHandler<MessageEvent>
private void sendInRuleCx(List<MsgCxRecord> msgRecordList, String isp, MsgCxRecord msgRecord) {
new ClientSendCxThread(msgRecordList, msgRecord, isp).start();
} | 0 |
ffc0d1a8882fc3b0a259b6fd32380b6f | 9e940e9451b70dba4b947ef91efe59cf | 通过组织ID查询对应的功能操作并标识为已选择 | class Role
def single_function_operates(sf)
self.all_role_system_function_operates!.select {|ops| ops.system_function_operate.system_function_id == sf.id}
end | 0 |
bed7d9fbf6d881aad7e2134b192ccc3f | 7c94df6ac0eb3c101738d0090222a2e0 | Confirmation page for after people create a new account | def confirm_auth():
return render_template("auth_confirmation.html") | 1 |
2e38078879b4157de56de29c9645a471 | 3d40a117487776371fe09a8dc3218f19 | 전화번호 리스트를 리턴하는 메소드 | public class ContactListActivity extends Activity
private ArrayList<Contact> getContactList() {
Uri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;
String[] projection = new String[]{
ContactsContract.CommonDataKinds.Phone.CONTACT_ID,
ContactsContract.CommonData... | 1 |
cf45757bb9c9e65ec4d9fe350cfafc59 | bf55f3719712a97d2247b04f419b8a96 | Calculates Symmetric MAPE given y_true and y_pred | def symmetric_mape_per_item(*, y_true: pd.Series, y_pred: pd.Series) -> pd.Series:
return (2 * (y_true - y_pred).abs() / (y_true.abs() + y_pred.abs())).groupby(level=ITEMID, sort=False).mean() | 1 |
ad8131d72e5014269450cdfa4ec000ff | 8b16123b36631b3c410d48aed2ddab4f | return copy of the minimal element | int VEB_tree:: getMin(){
return min != NIL ? min : NIL;
} | 0 |
32c13b3028da12174043ec5a73449b9e | 1fb1982ce653a4b4261c7c61c6e6bd14 | https://learn.microsoft.com/zh-cn/azure/cognitive-services/translator/reference/v3-0-reference#errors | let status = {
100: 'Continue',
101: 'Switching Protocols',
102: 'Processing',
200: 'OK',
201: 'Created',
202: 'Accepted',
203: 'Non-Authoritative Information',
204: 'No Content',
205: 'Reset Content',
206: 'Partial Content',
20... | 0 |
771de59c6135d26f825ff75d88b8fe80 | 71cc21ad141c1f0fe1060a07cc817f2f | Shader compilation exception. | namespace PCC
InvalidPipelineException::InvalidPipelineException()
: std::runtime_error(ATL::CStringA(MAKEINTRESOURCEA(IDS_INVALIDPIPELINE)))
{
} | 0 |
8f6b940755decdbf5c3360e49e11fa6b | 1d461be5314d27b3aeed4422dbb00041 | rotates the tetrimono clockwise | {
int temp1,temp2,temp3;
temp1 = tetromino[1][1];
temp2 = tetromino[1][2];
temp3 = tetromino[2][2];
tetromino[1][1] = tetromino[2][1];
tetromino[1][2] = temp1;
tetromino[2][2] = temp2;
tetromino[2][1] = temp3;
for(int i=0;i<4;i++)
{
temp1 = tetromino[0][i];
temp2 ... | 1 |
193489eef2058eeeb7489bee04a616b2 | 0991fcdf181af24ac3ac93499e63787d | Creates a new group milestone. | class MilestoneController extends Controller
public function create(Student $student, StudentRecord $record)
{
if ($student->id !== $record->student_id) {
abort(404);
}
$this->authorise('view', $student);
$this->authorise('createMilestone');
$types = auth()->user(... | 0 |
4fdb50abe9ecfd1df7455b969d197b98 | aa6420707606ba06357d70812841f894 | Stores static information on all champions from a given version in
database, if they don't yet exist | $champion = new Champion(
$values["id"],
$values["version"],
$values["key"],
$values["name"],
$values["title"],
$values["blurb"],
$values["info_attack"],
$values["info_defense"],
$values["info_magic"],
$values["info_difficulty"],
$values["image_full"],
$values["image_group"],
$v... | 0 |
e1ff258229c619dfd1ebbd56f3542fc7 | bd4e2b6459b1ac17c38c3aad53b111b7 | Counts and shows items | int countItem(int randomVals[],int counts[],int size){
for(int j=0;j<size;j++){
counts[randomVals[j]]++;
}
cout<<endl;
printCounts(counts,10);
return 0;
} | 1 |
ffd7fb1a258481e156911fcfea7c8999 | 2c735e695ec3d4ae0fdf964278d302b1 | Predstavljanje žanra filma, konstruktorskom funkcijom | Serie::Serie(string nombre, string genero) : nombre(new string(nombre)), genero(new string(genero))
{
ratingTotal = 0.0;
} | 1 |
cd9ee0e5fc7ebee5f3f03eb64dd07941 | 1f81e2b7c440ac5a82f02aad3b8bb414 | Return planet with provided Id
<p>
If no planet is found, throws PlanetNotFoundException.
</p> | try {
return Optional.ofNullable(getById(id));
} catch (EntityNotFoundException | IllegalArgumentException ex) {
return Optional.empty();
}
} | 0 |
125dedd6710c36957b54ead32b91d32e | 5a599d2e7ddff995baa43ca555c85797 | It's not possible for a stack variable to be referenced in more than one statement, so we can
reuse the stack offsets after each statement. | class Instr implements Constants, Codes, ShadowStackConstants, Types
private int relocation(int shadowStkConstant) {
int addrOffset = 1;
switch(shadowStkConstant) {
case S_LIT:
case S_REG:
break;
case S_LOCAL:
addrOffs... | 0 |
5a24a33b9a72f56f04e7ac3c7dc2d519 | 5336b45971ea9010fa573f36c59b99ed | Searches through a list of reddit Submissions for the one that corresponds to the desired
game and thread type. The desired game is the one where the two given teams are playing. | public final class RedditUtils
public static String findNbaGameThreadId(Listing<Submission> submissions,
GameThreadType threadType,
String homeTeamAbbrev,
String awayTeamAbbrev) {
... | 1 |
230113e451a78b46dc773bc3fd792402 | 14f387935871abe2d262a0dc90f2554d | No input arguments.
This function writes libfg algorithm output like SoC etc to the
to the Fule Gauge interface driver. | float temperature,
float humidity)
{
FSP_PARAMETER_NOT_USED(p_api_ctrl);
FSP_PARAMETER_NOT_USED(temperature);
FSP_PARAMETER_... | 0 |
d955571fa272fb28d48d8a62d156ecc2 | 87fbd8c63f153f3953d09f5039f7dd3a | 判断是否登录, 如果登录, 则继续; 如果未登录, 转到登录页面 | comm.access_ser('./data/check.php', {}, function (data) {
if (data.if_logined == 0) {
location.href = './login.html';
console.log('未登录')
ls.setItem('url', url)
} else {
location.href = url;
}
})
} | 1 |
da16cbdde4767b6f440828d134288f03 | ce506813d81c38ce9d8feed0407b709a | Moves the terminal cursor down one line | export default class ConsoleHelper
public static cursorDown() {
this.write(CursorActionWords.MOVE_DOWN);
} | 1 |
cc7919f0e950f650853284fc06ff8ba0 | bcdef312c24c9ce527d8fd5a4fc4e57d | Retrieves the User's current Hair Identifier. | string CustomerAccount::getHairSelection()
{ return hairSelection; } | 1 |
97565cd663e9412318336741c1b0f316 | 53c3cb8136d5a28564092b36c3b80273 | 初始化右侧空间的容器 | lists = new ArrayList<>();
rightRlv.setLayoutManager(new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false));
adapter = new BaseAdapter<DepartmentInfo>(mActivity, lists) {
@Override
public int getItemLayoutId(int viewType) {
return R.layou... | 1 |
a535f6aa5305c7060aa40577fc3afdbe | 66c5a0ad086edcff27db80b918bcad26 | 验证用户风险 | class OK_MAKER:
def check_risk(self,symbol):
risk = self.get_net_pot(symbol)
if risk['keep_deposit']/risk['account_rights'] <= self._params['risk_rate']:
print('now risk is :%s,limit risk:%s'%(risk['keep_deposit']/risk['account_rights'],self._params['risk_rate']))
return True
... | 1 |
c1d12696408c5e9f5c0661000e60cd5c | 5b4b63a454ace6934f5b12f45fbcb6b0 | Get estimated time of compilation of current package. | def e_eta() -> str:
output, _ = run_cmd('genlop -cn')
out = output.decode('utf-8')
eta = ''
if search(r'Error.*no working merge found', out):
eta = 'Unknown'
reqex = search(r'ETA:\s(.*)\.', out)
if reqex is not None:
eta = reqex.group(1)
print(eta)
return eta | 1 |
c624c699fbac7acba4e7ceb7e874df76 | 77183a273ffd85cf1fc95b1543e38e5b | \brief OTS initial configuration.
\retval None. | void OTS_DeInit(void)
{
bM4_OTS_CTL_OTSST = 0u;
M4_OTS->CTL = 0u;
M4_OTS->DR1 = 0u;
M4_OTS->DR2 = 0u;
M4_OTS->ECR = 0u;
} | 0 |
235dd317635f467ca5167318e74fba73 | 2de162262dfe1cd4bbba2f20bfe6f652 | 判断当前实体是否是Parent的实例 | namespace Qorpent.Model
bool IsParentDefined(); | 0 |
b713d14c82af349bdf487fc020ac8c48 | 00330e197c2315e65f7610307424d3de | Iterates the given block for each slice of <n> elements. If no
block is given, returns an enumerator.
outputs below
[1, 2, 3]
[4, 5, 6]
[7, 8, 9]
[10] | raise Erlang::ImproperListError if improper?
return enum_for(:each_chunk, number) unless block_given?
chunk(number).each(&block)
return self
end | 1 |
c5a5d51e24c22557d3f7e2686d05c81b | 0aab9043aa7549e11607beee04d88611 | Gets the resource collection API of CustomEntityStoreAssignments. It manages CustomEntityStoreAssignment. | namespace AutotaskCorporation.Autotask.Data.BusinessObjects.Entities
public partial class BusinessStructure
protected partial class DivisionSubdivision
public partial class ResourceAssignment
public partial class ResourceAssignmentManager
protected override IQueryable<DAL.BusinessDivisionSubdivisionResource> ... | 0 |
31c9ffbb4b3490f4019179bd1987d312 | 31601fba1dbdb98214b4c049fb434348 | 设置异常信息给DbLog | namespace Universal.Web.Framework
public static class ExceptionInDB
public static void ToInDB(Exception ex)
{
Tools.WebSiteModel model = Tools.ConfigHelper.LoadConfig<Tools.WebSiteModel>(Tools.ConfigFileEnum.SiteConfig);
if (!model.LogExceptionInDB)
return;
... | 1 |
7530741c508a06389243308c90034daf | e1daf1bf71bdcc455618d15c7a6f885c | Create an instance of {@link TParallelGateway } | public PollerFlux<PollResult<P2SVpnGateway>, P2SVpnGateway> beginCreateOrUpdate(
String resourceGroupName, String gatewayName, P2SVpnGateway p2SVpnGatewayParameters, Context context) {
return this.serviceClient.beginCreateOrUpdate(resourceGroupName, gatewayName, p2SVpnGatewayParameters, context);
... | 0 |
e2ecfe3114b6bee45465cdc813ff2261 | c2c59eeadc75a6322d31ac4d652ca519 | Gets the list of resources from cache. | export class ResourceManager
public static GetList(): Resource[]
{
return this.storage;
} | 1 |
56452e5368c5c22400c603310b444464 | 8121e0b038d77cb1994882389d9c4555 | Set the value of vendedor | public class Vendedor extends Empregado implements Serializable
public static void setPorvenda(float porvenda){
Vendedor.porvenda=porvenda;
} | 0 |
0bcd95de27e9b9c1f8440db1057c7419 | e61e3eae0924c9f99009dd50f64f1276 | Update size chart image of item. | function setImgSize(omitFix, omitInitViewSize, disableEffect) {
function exchangeProps(obj, propA, propB) {
var pass = obj[propA];
obj[propA] = obj[propB];
obj[propB] = pass;
}
var sizeProps = {}, exWH, updateProps, viewResized;
sizeProps.width = sizeProps.height = sizeProps.bBox_width... | 1 |
332a407229188bd546ef6e664e09022d | d54c6037d044d19cabfa50cacc4c0e35 | remove and decrement the number of rows | let table = document.getElementById("grid");
if (numRows > 0) {
if (numRows == 1) {
numCols = 0;
}
numRows--;
let rows = table.lastElementChild;
table.removeChild(rows);
}
} | 1 |
a53e8763ca277eae5bbe1eaf4a86f6b2 | 5438562059c5e29d512212f0c3abf86b | Create a Win32 process started suspended. pi will hold the handles to the process and main thread | namespace edx
bool CreateSuspendedProcess(const std::string & filename, const std::string & fileargs, STARTUPINFOA & si, PROCESS_INFORMATION & pi)
{
si.cb = sizeof(STARTUPINFOA);
std::stringstream cmdLine;
cmdLine << "\"" << filename << "\" " << fileargs;
BOOL result = CreateProcessA(0, (LPSTR)cmdLine.str().c_... | 1 |
651443a837bc2ac635682fcbc9247683 | e339160490805c53367393b6ebc63361 | Simple input_fn for our 3D U-Net estimator, handling train and test data
preparation. | def input_fn(is_training, batch_size, data_dir, num_epochs=4):
print ('input_fn batch_size %d' % batch_size)
dataset = tf.data.Dataset.from_tensor_slices(filenames(is_training, data_dir)).repeat()
dataset = dataset.shuffle(buffer_size=_FILE_SHUFFLE_BUFFER)
dataset = dataset.flat_map(tf.data.TFRecordData... | 1 |
cc881edaeed997134c6027b7d2b8d4cb | 10f09b3a3add819260a127ecf34a8960 | Tests whether additional event types can be registered. | public class TestEventListenerTags extends AbstractWindowTagTest
public void testCustomEventListener() throws Exception
{
checkEventTypeRegistration(CUSTOM_EVENT_BUILDER, "");
} | 1 |
684d9f1df7203f745cbb4fa4e997a8a9 | cd4793d7013082337322f4de9bcc0153 | Get the coach settings for a given user or create a new Settings | try {
return await this.userSettingsModel.findOne(userData);
} catch(err) {
console.log(err)
}
} | 0 |
ec4ca939c6b9ca7c1de81aa5c788cb28 | 991d75050690281d2eaf17741a1b0477 | Append _QC_issue instance to existing _QC_Station_Report instance. | for chart in self._charts:
self._db.Query("""INSERT INTO report_data_set_chart_instance
(report_data_set_chart_id, report_data_set_instance_id, chart_generation_time)
VALUES(%s, %s, NOW())
ON DUPLICATE KEY UPDATE chart_generation_time = NOW... | 0 |
f26db4b0c8191ec5f6306b002b7a6251 | e41488762d090510fe9d06f22d61d1e2 | 对于无参方法,需要传空数组 | public class VariableParameters
public static void main(String[] args) {
add();
add(1,2,3);
add(new int[]{4,5,6});
} | 0 |
31641cdeeb2970cacc2ae20287af2dfc | fe51adde77634ac9619afa796bfe0899 | 根据文章标题和文章分类查询博客 | List<Blog> findBlogByTitleOrTypeOrRecommend(BlogQuery blog); | 1 |
6eddedca669fe5e6e57b620f431337ba | 90131832ef2581611ff8765180d3b061 | 根据public ip查询当前主机开关状态 | namespace JDCloudSDK.Cdn.Client
public class CdnClient : JdcloudClient
public async Task<QueryWafSwitchResponse> QueryWafSwitch(QueryWafSwitchRequest request) {
return await new QueryWafSwitchExecutor().Client(this).Execute<QueryWafSwitchResponse, QueryWafSwitchResult, QueryWafSwitchRequest>(request).Co... | 0 |
8e4f7969704498fa562a3a1f2c5fd698 | 86ccca552ebcca5326c328d6352cf6a2 | Compute normalized sizes for the words in the cloud basing on the frequency | result = modelState.wordDists.copy()
norm = result.sum(axis=1)
result /= norm[:, np.newaxis]
return result | 1 |
a4f0d2cbe23d4b6db8afa07fbf1b2b58 | 69fc4e4272fbcd5a7ace1e2c479cdf40 | Test modifiying bookmarks that already exist locally | $privly_test_set.each do |to_test|
if not to_test[:manifest_dictionary]["action"] == "new" or
to_test[:manifest_dictionary]["name"] == "Login" or
to_test[:manifest_dictionary]["name"] == "Help"
next
end
page.driver.browser.get(to_test[:url])
page.driver.browser.get(to... | 1 |
e4a59c5c3488f42b7863bf8b1b0fc374 | c70d315b38642fb359effad70a77f8d1 | Проверка общей информации для всех ролей в блоке "Общая информация". | class AdminPage(Base):
def check_page_elements(self):
tabs = [{"name": "логотип", "loc": self.LOGO},
{"name": "поле для ввода логина", "loc": self.USERNAME},
{"name": "поле для ввода пароля", "loc": self.PASSWORD},
{"name": "ссылка для восстановления пароля", "loc... | 0 |
5fa702a1ab02395db441cfacdc2143bd | 039170e59562bd1afd48c2ee89ae83d0 | Performs L2 loss between 2 tensors. | def l2_loss(prediction, ground_truth):
difference = tf.square(
prediction - ground_truth)
return tf.reduce_mean(difference) | 1 |
2744935d0642bf5c601dcfbf27df7fda | b55643d50ad48f0c2c9e15147d05568f | Checks to see if the current player is underage. | if(age < 16) { return false; }
else return true;
} | 1 |
d3ef054f9e1fa1aa0f95b06eaf18ffdd | 7bd95c3e99d50d5e98a757f24cc20367 | pingxx支付 | {
$order = \app\common\model\Order::where('order_sn', $order_sn)->find();
\Pingpp\Pingpp::setApiKey(config('pingpp.api_key'));
\Pingpp\Pingpp::setPrivateKeyPath(config('pingpp.private_key_path'));
\Pingpp\Pingpp::setAppId(config('pingpp.app_id'));
$params = [
'ord... | 1 |
a67ff9f608bbf88a58f192393c31ea38 | 7d5084579b310ec7f9d7a7b9fbccda47 | Tests for nil "color" element | public class WSOHDImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl
implements com.bagnet.nettracer.ws.core.pojo.xsd.WSOHD
public boolean isNilColor() {
synchronized (monitor()) {
check_orphaned();
org.apache.xmlbeans.XmlString target = null;
target = (or... | 1 |
9bef17149ae7e026c12fcbc96c11be93 | a7843e7adfb0540a930408ce3aacebef | Создает из объекта viewmodel
если указана текущая viewmodel, то обновляет её новыми данными | namespace BaseStarShot.Services
Task<BaseViewModel> PushAsync(Type viewModelType); | 0 |
05dcdd52aa46706639c0060aee1dbaca | 8d0ca7667470d6f6d0563b675afbb741 | Returns an array of length N chains, indicating the number of groups (residues) in each chain. | class ResidueSequence(ClonableArray):
def level(self):
return len(self.multicharge()) | 0 |
324d4f6c209ca7cebb180a2817c6f48a | 33fe9e33443e031a5560face9c2e2385 | Returns the truncated value as an integer.
Equivalent to
rat.truncate. | class long(object):
def __trunc__(self, *args, **kwargs):
pass | 0 |
76aa9069d9e58b9f2a11cc920402dd4b | e47c238fa2701ae5601807a5e34fd3c3 | Ejemplifica el uso de polimorfismo sobre las clases heredadas | {
Cicla cc1 = new Cicla("Pedalear", 3);
Cicla cc2 = new Cicla("Pedalear", 4);
Cicla cc3 = new Cicla("Pedalear", 5);
Patineta p1 = new Patineta("Patinar", 1);
Patineta p2 = new Patineta("Patinar", 2);
Motorizado m1 = new Motorizado("Quimico", 6);
Motorizado m2 ... | 1 |
f8a0f0b4e51fe2d83d294e3184e6afa1 | 8160e1df9f5b16a6b46b6a68f11b9737 | 23. 인수로 주어진 배열 arr에서 짝수이고 3보다 큰 수만을 구하여 이를 배열로 반환하는 함수를 작성하라 | def func(a) :
result = []
i = 1
while i <= a :
if i % 3 == 0 :
result.append(i)
i = i + 1
return result | 0 |
3cba96c4a03c5ae628d59739d1016837 | 16fb201fe3708bc8e357357d42da96c2 | common users will see only their services in <select> options | services1 = Service.objects.create(user=self.user, name='Service 1')
services2 = Service.objects.create(user=self.user, name='Service 2')
business = Business.objects.create(user=self.user, name='Business 1')
business.services.add(services1)
res = self.client.get(SERVICE_URL, {'as... | 1 |
db9950fc1733f81b64b870c2109cf7f7 | 161bb9a7f25085fdf7a4f383e3c49b5e | Scan for named bluetooth devices | method = "scan"
device_list = []
output = self._internal_exec_multiple_v2(self._BLUETOOTH_MODULE, method, is_system=True)
for element in output:
btdev = BluetoothDevice()
if "Address" in element:
btdev.address = element["Address"]
if "N... | 1 |
caa46176a6103acb81d8f2072dea02af | 7b0c75935a9e57ccfc3e202be77f0266 | 时间处理,datetime特征获得对应年月日周 | feature_time = []
day_time = datetime.datetime.strptime(Ds, '%Y%m%d')
Ds = day_time.strftime("%Y%m%d")
day_offset = (day_time - day_start).days
feature_time.append(day_offset)
week_offset = 0
if day_offset > 0:
week_offset = (day_offset - 1) / 7
feature_time.append(week_offset)
... | 1 |
38d6969b5dcaba7245b03c520674b063 | 4c7765b412d34dd9c069dfbe4a8a44c3 | Calculates the angle between 2 lines by first determining the angle of the individual
lines and then subtracting them from each other | {
double angle1 = Math.atan2(line1.getY2() - line1.getY1(),
line1.getX2() - line1.getX1());
double angle2 = Math.atan2(line2.getY2() - line2.getY1(),
line2.getX2() - line2.getX1());
return angle1 - angle2;
} | 1 |
2a781612a07904803e17d1c7ff1ec3af | c8d1cc9233443c6fcadb9ddc4b436e90 | Find prime using Fermat's little theorem. | if (x%2==0) return false;
for(int i=0;i<1000;i++){
int a = (getRandomInteger(x*2)%(x-2)) + 2;
if (gcd(a,x)!=1)
return false;
if(fastExp(a, x-1, x)!=1)
return false;
}
return true;
} | 1 |
07e9bc64ee85f41adc30a3ed2e9b76b8 | f7ed76aa7ab61f4d5ed7aca90bbef4d1 | Spracovanie snimkov | {
string procImagePath;
var capture = new Capture();
var viewer = new ImageViewer();
using (var image = new Mat($"{AppContext.BaseDirectory}{Properties.Settings.Default.PathToImages}\\{currentImg}.jpg",
LoadImageType.Color))
using (Imag... | 1 |
bec5ffd9b032ab14cab264017b26a447 | 75d2e078a9b498434ffd79f6a331add6 | 盤面の角の座標を返す。 | {
if (side == 0)
{
for (int i = 0; i < 8; i++)
{
for (int j = 0; j < 8; j++)
{
if (board[i,j].Equals('K'))
return ChessFunctions.NumsToCoords(new int[] { j, i });
... | 0 |
7481a00244d94fa9a3cf38bf737d14a2 | 39a8da3d897df98ed517fcaa9eda38bd | 选中员工放进输入框 | {
string emp=search_text.Text.Trim();
List<Model.Employee> emp_list = new List<Model.Employee>();
string p=this.hide_part.Value;
int part=5;
if (p.Equals("人事部")) part = 0;
else if (p.Equals("财务部")) part = 1;
else if (p.Equals("... | 0 |
d430df59c1f643ed2ce0eff65a875cb9 | 7c7598d9f6219716caae0f70593a24f0 | Sets the value of the '{@link org.xtext.example.mydsl1.bookstore.Person#getVoornaam <em>Voornaam</em>}' attribute.
<!-- begin-user-doc -->
<!-- end-user-doc --> | public void setPersonFamilyName(String personFamilyName); | 0 |
8e94ac6b81fe81cf45713a55de8d4ad1 | 83dd96df65c828a52d22cd4f7604b3dc | 讀取UID到點號的對應 | class GUIForGetData:
def __readtxt(self):
f = open('UID_i.txt')
str1 = f.read()
f.close()
return int(str1) | 0 |
8e2c325b041c0ebbcb34a097bdc77898 | ef0a66c14a922ecb12479848cd255e90 | Search dir for all .shp files. Return a list of just the
base file name for each file. | def tableNames(dir):
names = []
for f in os.listdir(dir):
head, tail = os.path.splitext(f)
if tail == '.shp':
names.append(head)
return names | 1 |
5c0ee69b2e102c6f68b1f66c8fc0877b | 15297a23858f9cbbda968da8b1c4c5cb | use this if you run this app outside cluster | func init() {
if _, ok := os.LookupEnv("KUBERNETES_SERVICE_HOST"); ok {
Host = "0.0.0.0"
} else {
Host = "127.0.0.1"
}
} | 1 |
71e576df502472cb6e5ccbc3e32a6880 | 4b27a2c6bfcc0d78e51efa65291c7071 | <p>
Creates a function package.
</p>
<p>
A function package is a .zip file in CSAR (Cloud Service Archive) format that contains a network function (an
ETSI standard telecommunication application) and function package descriptor that uses the TOSCA standard to
describe how the network functions should run on your networ... | final ZipUtils appZip = new ZipUtils();
final FileUtil fileUtil = new FileUtil();
final File[] csarFolders = new File[] { new File(META_FOLDER), new File(DEFINITIONS_FOLDER), new File(TOSCA_TYPES_FOLDER) };
prepareFoldersWithFiles(serviceTemplate, xml, xsd, fileUtil);
for (final File folder : csarFolders) {
... | 1 |
52b43978601f83c8d9b429bb5294e525 | 94da1c3caf54d0c7fc40e08e84676f64 | 获得杠头gameobj | local game_client = nx_value("game_client")
if not nx_is_valid(game_client) then
return false
end
local game_scence = game_client:GetScene()
if not nx_is_valid(game_scence) then
return false
end
local player_client = game_client:GetPlayer()
if not nx_is_valid(player_clien... | 1 |
4363bb7b680c5eb51f6de88b26844144 | 1d7d821d14859c5d6f22caf688129536 | 查找设置ActionBar Tab显示在底栏的方法,找不到method则返回false。 | public abstract class ActionBarActivity extends AppCompatActivity
implements IActionBar.OnBarClickListener
protected abstract boolean showActionBar(); | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.