query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
bbfb1e084e88b0aa24e99d8281cc771b | 881e3c2216e6371d6c8566fac698627e | Requests a fresh list of realms | {
Dialog::showServerLoading();
ArenaListMsg* msg = new ArenaListMsg(refresh);
NetworkDataProcessing::getInstance()->sendMessage(msg);
msg = NULL;
} | 1 |
9b8a6a11eac13e90236c738d4a3acdfd | ba969d2b75ed86cc317e893a8ff8698e | 显示下载文件模态框 | setTimeout(function () {
var rowData = gd1.func("getSelected");
if (rowData) {
var ao = art('<div style="text-align:center"><img src="/images/loading.gif" style="max-width:100%" /></div>');
ao.modal.find('.modal-dialog').addClass('modal-lg modal-full');
ao.modal.f... | 0 |
273f76f2be7adf61311a31cff71e9f4a | 339d52553ccc540bb7ae4a760145604f | 取钱的回调函数 | if account.balance >= draw_amount:
print(threading.current_thread().name\
+ "取钱成功!吐出钞票:" + str(draw_amount))
account.balance -= draw_amount
print("\t余额为: " + str(account.balance))
else:
print(threading.current_thread().name\
+ "取钱失败!余额不足!") | 0 |
f577ba795da250624f270766e802d40a | cfc2fae454a0cca812df2a0e855ce067 | 返回这个点在src社区内的所有邻居,以生成器的形式返回。 | class SIPAnonymize(object):
def __get_neighbors_within_src(self, node):
for neighbor in self.__graph.neighbors(node):
if neighbor not in self.__src_com_nodes:
continue
yield neighbor | 1 |
c2e5c61f2f19aadfa48f11aaa01ae303 | 32b92062ad1665892b48607b63106b43 | 获取本月当天或者上月,下月当天
例如本月number:0 上月 : -1 | public final class DateUtils
public static int getMonthDayNumber(
final int year,
final int month
) {
if (year == getYear() && month == getMonth()) {
return getDay();
}
return getMonthDayNumberAll(year, month);
} | 0 |
b578153ab3de63a307ebe15aa09b2a48 | ab804fa15e9a8f42d148fc9ae0eb9b84 | exec_user_input method handles the line entered by the user in the
prompt_toolkit. | print(prompt_val, end='', flush=True)
self.cursor_pos = 0
ret_val = ""
getch.start_input()
while True:
c, d, e = getch(), None, None
esc_seq = None
if c is None:
continue
if len(c) == 1:
pass
... | 1 |
7c5e2d1914bf57395ee72f1ac83d44e2 | cc3629d5eee86b79738e2760e23ba712 | Retrieve the Congressional District | class Metadata
private function setCongressionalDistrict($congressionalDistrict)
{
$this->congressionalDistrict = $congressionalDistrict;
} | 0 |
0e164c6f637fee41c77b06d8c873d57d | 0d01ef697c4569f4c93b907c06ffc1d5 | Проверяет длину строки для инпутов | ui = $.trim(ui);
return (ui.length >= minl && ui.length <= maxl);
} | 1 |
33020126735442f135052d0cb96118bd | 74cd39113e35e7c1ca4384401c63d898 | Encode person keypoints given in coordinates corresponding to an image of given shape into a heatmap. | kpts = kpts.reshape(-1, 14, 3)
heat_one_img = []
for kpt in kpts:
heat_one_joint = []
for joint in kpt:
x, y, v = joint
x, y = (x//stride, y//stride)
if v < 1.5:
heat = heatmap_one_kpt(x, y, heat_size, var)
else:
... | 1 |
91e8570bdc744c8ed5dff6012f985400 | 9ccf762986d3e692cdcc9ebfdc5de98c | Transfer everything from the original stack to a temporary one first, and
then print the path from the later since all nodes in it are in the right
order root -> leaf.
Restore the original stack. | public class PrintRootToLeafPath extends BaseUtil
private void printPath(Stack<BinaryNode<Integer>> stack) {
Stack<BinaryNode<Integer>> temp = new Stack<BinaryNode<Integer>>();
while(!stack.isEmpty()) {
temp.push(stack.pop());
}
print("");
BinaryNode<Integer> node;
... | 1 |
eb8fbe7ae3a26baadc4051c6cff57629 | e74e2e00ab1c6df6548f9df54b9781d6 | #Displays the model coefficients and diagnostics for the stepwise polynomial fit without time-series considerations | summary.cpi.lm.lasso <- function (Fits) {
stopifnot ("cpi.lm.lasso" %in% class (Fits))
for (mod.key in names (Fits$Models)) {
Mod.key.df <- decode.cpi.lm.model.key.df (mod.key)
model <- Fits$Models[[mod.key]]
stopifnot ("lm.lasso" %in% class (model))
cat (sprintf ("\n=== Model: %s ===\n", mod.key))
... | 0 |
293f75046a57afdd7bdd94e8e9b4a12d | 8b0c39571222bfd56ceb95d2d34cceca | Returns oldest item from queue. | public class MyQueue<T>
public T peek() {
shiftStacks();
return stackOldest.peek();
} | 1 |
710a4b4667187999fd214f5db3d779ad | 42d581530e62fbc4601b29af2a64abdf | 如果当前浏览器支持 canvas,则开始渲染要素;如果不支持则移除图层。 | class ElementBase
_render (ctx: CanvasRenderingContext2D): boolean {
if (!this.pointList || this.pointList.length < 1) return this.finish
if (this.pointList.length === 1) {
this._renderPoint(ctx)
} else if (this.pointList.length > 1) {
this._renderPath(ctx)
}
this.from = this.pointList.l... | 0 |
9ae9c6400137db7d6c1ce074f6fba1c7 | cc7a25797a580c357fb68f614e866395 | The public address you share with others to receive funds. | class AccountParamObject:
def auth_address(self) -> MaybeValue:
return AccountParam.authAddr(self._account) | 1 |
c49bfb1b8c79269cfa04299f413b0152 | 74783a9a31129e9474c0c51c128f8679 | Strip the food name of all non-alphanumeric characters and make lower
case. Used for the allFoods set. | public class Place{
public String getCleanName() {
return this.name.toLowerCase().trim();
} | 0 |
ccb59d819170bbae8f683397fda207ff | ffd31608512c81cfffdc456dd9b36c3c | 未ログイン時でgetリクエストした時のテスト | response = self.client.get(self.TARGET_URL)
self.assertEqual(response.status_code, 401)
expected_json_dict = {
"detail": "認証情報が含まれていません。"
}
self.assertJSONEqual(response.content, expected_json_dict) | 1 |
6ec24c53dcd7e14951828af852cc7e63 | 9fb427fef43728855d4816d5cecb631a | 获取一个Sheet的冻结信息,包括冻结列和冻结行 | var m,mc;
var tipSize = (sheetOpts.showGrid)?1:0;
for(var mergeName in sheetOpts.merge){
m = sheetOpts.merge[mergeName];
if(m){
if(ridx>=m.ridx && ridx<=(m.ridx+m.rowspan-1)
&& cidx>=m.cidx && cidx<=(m.cidx+m.colspan-1)){
mc = m;
break;
}
}
}
if(mc){
return {
w: _getCols... | 0 |
579ebf6c6dca28a1da7188306d2c1d72 | b118fa43539f1f390b0b8b87fde2e5f8 | Remove the index key from leaf node. | class BTree
def removeFromLeaf( node, index)
i = index + 1
while (i < node.n)
node.keys[i - 1] = node.keys[i]
i += 1
end
node.n -= 1
return
end | 1 |
108edd6f8cf8e351f3fe9d9549e064c5 | 92ca556df1be1949a567bbcff527e1e9 | Returns the sample with the smallest z-coordinate. | ens = np.array([self.__harmonic_mean([sample["MAD"],sample["OLS"],sample["EMD"],sample["SSIM"]]) for sample in samples], dtype = np.float64)
try:
min_idx = np.nanargmax(ens)
except ValueError:
min_idx = 0
return samples[min_idx] | 0 |
9fedbe029e38b410ffcad575adb2041b | 961a897629f7684a439faccb1c701577 | OnUpdate for the Two Second Ticker | {
Debug.Log("AdvanceTimer");
if (running)
{
if (remainingSeconds > 2)
{
remainingSeconds = 2;
}
}
else
{
remainingSeconds = 2;
}
UpdateDisplay();
} | 1 |
8f07a42d64cc7b33ea4500dfd205bf55 | 2adacb4a8e11422c378fa5042fcc8bf5 | 是否支持动态创建类型的sql语句 | public String getDynamicCreateTypeName(String name) {
if(isBaseType()){
throw new IllegalAccessError("基础数据类型,无法获取动态创建类型的类型名称");
}
switch(SqlStatementBuilderContext.getDatabaseType()){
case SQLSERVER:
return sqlserverCustomDataType.getDynamicCreateTypeName(name);
case ORACLE:
return oracleCustomDa... | 1 |
4ce8b71f00a6029ed5294a8b7fdf82aa | 6213f458c9860346e23d9fe094262970 | Splits ``values`` into ``split_count`` pieces. | def split(value, num_or_size_splits, axis=0, num=None):
pd.split(value, num_or_size_splits, axis) | 1 |
1acbcd7cde37f165821118251e6eeda2 | 230802035455abb0f91b76f8ed402d4a | Shows a long running system toast notification. | interface IView : ISubscription
fun showLongToast(@StringRes resId: Int) | 1 |
20786a9aa2b3f17e3b0c04972a9bc89f | 39b21a4ad73f62082af2e1ee1a6e242d | Creates a new folder on the ArcGIS server. | ObsFSFolder newFolder(NewFolderRequest request) throws ObsException; | 0 |
6fee23bdfe50204ea81444c67f383382 | c146812af7adfc4eaa6c50888199570d | Update a payer with Realex using the Remote API. | $this->sentXML=$this->getRequest();
try{
if($this->api->getConfig('billing/realex/demo_mode_always_pay',false)){
$this->responseXML='<'.'?xml version=\'1.0\' encoding = \'ISO-8859-1\'?'.'>
<response timestamp="20060416201509">
<fake>System is in auto-pay mode, all transactions are ... | 0 |
55462e8ba501cd46e928a6e59c8d5ef5 | e60c8e8b1268d89db742f2bdf3646191 | 根据状态码获取信息并设置所在行的位置 | $.ajax({
url : '../info/getInfoById',
type : 'POST',
dataType : 'json',
contentType : 'application/json',
data : JSON.stringify({
infoId : infoId
}),
success : function(data) {
if(data.success) {
$('#' + contentName +' tr:eq('+ rowIndex +')').remove();
if(tableRowLength === (rowIndex + 1))... | 1 |
7a03c7ea090755db216a17aad6a183a2 | 4aa6b57b2f7d53760ecbb6ccb0371c97 | Trivial function returns a doubling function that is "closed" over a local variable. | var x int
return func (d int) int {
fmt.Println("x = ", x, "d = ", d)
x += d
return x
}
} | 0 |
a2b9c62f80da4fddc3cca273994eeafd | 77ba1725c602ab063affb80917f3f22c | Test case for userManagev1userregister
User registration. | with self.client:
response = self.client.post(
url_for('authentication.register_user'),
data=json.dumps({'username': 'proton', 'password': 'andela'}),
content_type='application/json'
)
data = json.loads(response.data.decode())
... | 1 |
a9e02dda00b2c02b3b6a54ec31409aad | a17d82463e951d4d774d32b79e33c347 | Poišče festivale glede na podane zahteve. | if (!is_array($values)) {
throw new \Workity\Exceptions\InvalidArgumentException("Parameter \$values needs to be array, " . gettype($values) . " given.");
}
try {
$eventsInfo = $this->databaseConnection->select("*")
->from("events")
... | 1 |
ef14b1aa2a287d125fee9ed1c958aa3a | 17f063718c90ec15590701a319162499 | Check whether we edit existing rule or adding new one | namespace BookKeeping.Client.ViewModels
public class DefineRulesVM : ViewModelBase, INavigationAware
private bool CanEditRule()
{
return mMainStm.IsInState(State.DoSomething);
} | 0 |
aefa42081489e96366251061517c3dd0 | 5949b21e24e5cf7a502355afaaf19056 | Specify the plot abbreviation labeling algorithm. | def plot(letter_count, name):
plt.style.use('seaborn-muted')
alphabet = list(ENGLISH_ALPHABET)
plt.plot(alphabet, letter_count, label=name) | 0 |
ce6fb469524138b3f602f6f8143b71dd | c6a72f7ca5d613125b676c3c85bd7207 | Create resource group for a subscription | const httpRequest = new WebResource();
let operationRes: msRest.HttpOperationResponse;
try {
const operationArguments: msRest.OperationArguments = msRest.createOperationArguments(
{
resourceGroupName,
"this.client.apiVersion": this.client.apiVersion,
"this.client.... | 0 |
ae5ce9dbd819522d5c03d62d7d6d9348 | 6661ee78d85afed15a59eedfaaa359e4 | Helper function to get the title for the show action. | class Show extends \App\Entity\Show implements \Doctrine\ORM\Proxy\Proxy
public function getTitle(): ?string
{
$this->__initializer__ && $this->__initializer__->__invoke($this, 'getTitle', []);
return parent::getTitle();
} | 1 |
594357c0e1a6a7d69b6bb379caabccb5 | d932caaae5719b23bef69eb52d413693 | Sends acquisition command for the single channel and receives the data.
If the data was successful received emits 'received' signal. | class EmulatorBase(object):
def acquisition(self, *args, **kwargs):
raise NotImplementedError("overloaded by subclasses") | 0 |
bcdeaf515a21a3e3765571334145b860 | f571ad892e9035b98d733ed2d151cea5 | 在每个theta点两边极近相等距离取2个点,这两个点直线斜率约等于其导数。
用途:该方法是通用的,适用于所有函数求梯度,不限于线性回归。但性能不好,可用于测试验证看自己求导的结果于此是否一致 | grad_a = np.array([(cost(theta + e, X, y) - cost(theta - e, X, y)) / (2 * 1e-5)
for e in np.identity(len(theta)) * 1e-5])
return grad_a | 1 |
f16d1c07f2f9eb147f17dd8828666929 | 79fb3a24d67c5df1c35c272a623dc73a | ! Temperature difference to obtain a certain heat flux [K] | def djnu(temp1, temp2, nu):
return jnu(temp1, nu) - jnu(temp2, nu) | 0 |
b17b3289362908c2134f1ab82a9472cc | c734ca27c74705b11c7251af0df2d772 | https://atcoder.jp/contests/arc074/tasks/arc074_b | n,q = map(int,input().split())
s = input().replace('AC','01')
c = [0]
for si in range(n):
if s[si]=='0':
c.append(c[-1]+1)
elif s[si]=='1':
c.append(c[-1]+1)
else:
c.append(c[-1])
c = c[1:]
ir = list(list(map(int,input().split())) for _... | 1 |
7ea3ab1154e893711e345b0e56e00bf0 | f24c64c780520b9d28522cbc74238e32 | Generate points on the map for various stores using OSM Nominatim API | class graph:
def add_OSMnx_pois(self,amenities=None,p=None,dist=2500,north=None,south=None,east=None,west=None):
nearby_pois = None
if p:
nearby_pois = ox.pois_from_point(p,distance=dist,amenities=amenities)
else:
nearby_pois = ox.osm_poi_download(north=north,south=south,... | 0 |
82ebd9a8d55a99c9ba5a12069d60dfdf | 640f7679253350fe11a684799ba689f2 | Método que visualiza as novidades | class WelcomeController extends Controller
public function index()
{
$noticias = Noticia::orderBy('idNoticia', 'desc')->take(4)->get();
return view('welcome')->with('noticias', $noticias);
} | 1 |
a4abf4278f75a49ac9bce0818f6ea3eb | 85193b806bd4d46d5079b7d98f3a1108 | 调用原始函数 | function ex1()
apply(target, ctx, args) {
return Reflect.apply(...arguments)
} | 1 |
47a52fe3f2017ef1bfd5d7a0242bb6c3 | d1b2cc40c8d011fc0f8a026c87c70809 | 分组编号一致性 | bool Control_Information::Check_Group_Number(void)
{
unsigned char Group_Temp[5];
for (unsigned char i = 0; i < 5; i++)
Group_Temp[i] =AT24CXX_ReadOneByte(GROUP_NUMBER_BASE_ADDR + i);
unsigned char Verify_CRC8_Temp = GetCrc8(&(Group_Temp[0]), 5);
if (Verify_CRC8_Temp == AT24CXX_ReadOneByte(GROU... | 1 |
9e4e51521ff509079402f88b55a2f237 | e9b4035a4cf41bb784704df7390b2d4e | 执行Transact-SQL语句,并返回执行结果 | IDbConnection cnConnection = null,
int timeout = 60)
{
try
{
return transaction?.Connection.Execute(sql, param, transaction, timeout, CommandType.Text) ?? cnConnection.Execute(sql, param, null, timeout, CommandType.Text);
}
... | 1 |
9e6c8ab7c208ff36d942e1a8f3a1f80b | e87dd7ba57d3b9ebf782e3940c6b446e | !
\brief configure USART DMA transmission
only one parameter can be selected which is shown as below:
\arg USART_DENT_ENABLE: DMA enable for transmission
\arg USART_DENT_DISABLE: DMA disable for transmission
\retval none | {
const uint8_t * const arBuffAddr[4] = { Uart0_RecvBuff,Uart1_RecvBuff, Uart2_RecvBuff,Uart3_RecvBuff };
if (uUartNode != HW_UART_NODE3)
{
RCC->AHBENR |= (0X1<<0);
}
else
{
RCC->AHBENR |= (0X1<<1);
}
USART_RxDmaChannel[uUartNode]->CCR &= ~(0X1<<14);
USART_RxDm... | 0 |
cf651a9c80bb3868722bc84f77b22567 | b1062266315de2fff11ceca60c712093 | A helper function for setting a context variable from the policy enforcement context. | public T setTestContextVar(String varName, Object value); | 1 |
acc033e107ea598a0e8575e627b9bc95 | 8ad30fc5f7492e599f8f661c4a96e9be | 碰的牌不能为癞子 | chu_pai_prob, player_simple_pai, player_origin_pai = chu_pai(player_cards_peng_path)
prob_np = np.array(chu_pai_prob)
max_array = prob_np.argsort()[-4:][::-1]
discard_pai = player_simple_pai[max_array[0]]
if discard_pai == player_origin_pai[-1]:
suggestion = "建议不要碰!"
explanation = "碰... | 0 |
89d1f9c0c2f4452f92d8b350c3d57135 | ce7075d6ea0fbf855178299ca31a8dae | Renvoi le mysqli_result | class Create extends Connection{
public function getResult() {
return $this->Result;
} | 1 |
127d65d9ff6060f09bb9283bde40bab0 | da05f411c98250edc9cacea58b7582d0 | 设置kPad display值 | {
*pdwPad1 = dwKeyPad1;
*pdwPad2 = dwKeyPad2;
*pdwSystem = dwKeySystem;
} | 0 |
2fec3ce5d67033fc3d4a0d175e699687 | 5b1ea2bbb8c17230c4c84e7134cfa046 | Get the target attribute value inside the Link tag.
Can be either _blank, _self. | class Link
public function targetAttribute($targetString)
{
$this->targetString = $targetString;
return $this;
} | 0 |
67eecc7185605ea5ca7b92f85920fade | eea09233b9a29192be03ec3403eea61f | ! Process the RPC response header, primarily to get the payload length | class MessageHandle:
def process_protoheader(self):
if len(self._recv_buffer) >= MessageHandle.HEADER_LEN:
self._json_header_len = struct.unpack(
">H", self._recv_buffer[:MessageHandle.HEADER_LEN]
)[0]
self._recv_buffer = self._recv_buffer[MessageHandle.HEADER... | 1 |
848fd8d448bae1681fe578214cfd84ef | 4a1d5e33ffb2f378f8f1266794dd0cbd | Finds the owner of an offer. | abstract class OAuthMethod
public static function find_owner( $account_id ) {
$prefix = static::$prefix;
$res = App::$db->query(
"SELECT user_id FROM users_{$prefix} WHERE {$prefix}_id = ?",
$account_id
);
if( !$res->rows() )
return false;
retu... | 0 |
0849053313cff41d6fe3064b1174fdea | 92239fa1caef9596439783d4e12fd266 | Help-method to resize the comment rows. | public class CommentPaneController implements Initializable
private void updateCommentPaneSize()
{
int i = commentArea.getText().length();
int j = i / 25;
int change = ( 50 + ( j * 20 ) );
commentArea.setPrefHeight( change );
commentArea.setMaxHeight( change );
} | 1 |
bc9c7fb02608d70abf059585ef947d71 | cfe5ea58b50acea6dfe207fe98f52c48 | 计算清关费用 | if (cyStatementConItem.getRemoveTimes() == null && (cyStatementConItem.getRemoveTimesEnterDate() == null || cyStatementConItem.getRemoveTimesExitDate() == null)) {
return;
}
Integer removeTimes = 0;
Double stockDays = 0.0;
if (cyStatementConItem.getRemoveTimes() != null) {
removeTimes += cyStatementConI... | 1 |
c91a489d71ddbe3fc59fab1887ce11be | c31182e5a68e81ac4750777facce91ee | Event handler for when the Versus AI menu entry is selected. | namespace Virtex.App.VerticesTechDemo
class MainvxMenuBaseScreen : vxMenuBaseScreen
void PlayGameMenuEntrySelected(object sender, PlayerIndexEventArgs e)
{
Engine.AddScreen(new DemoSelectScreen(), PlayerIndex.One);
} | 0 |
eb334ebad4a58cebe3d930154966f732 | 8fdc33783d14a54171d191a73b08e03e | 谱库/乐谱编辑 | print("aaa")
print(self.component[self.editing_component]["component"].__class__.__name__)
if self.component[self.editing_component]["component"].__class__.__name__ == "Component":
self.play_move.show()
self.play.hide()
self.stop.show()
self.move_t... | 1 |
ebbb4e24ed6c46b36a1ccb172b62ba3c | dd443ae886cf5f1a6f5a83f63112a47f | Defines method that displays all bucketlists | function find() {
return db("BucketList");
} | 0 |
c7ce742588a8fd9c523b437752445c46 | a8539eeee37d5f17434405be75a0a1b4 | Returns the global DFS object used. | function gGetDash() { return myDash; } | 0 |
3d974e3c478caf042ee98e49ad4f6bd2 | 4e6c76117e68b2be826feb8d79727971 | 分页查询screen_properties | return request({
url: '/screen/findOne',
method: 'post',
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
},
data
})
} | 0 |
43f170889102a6316c5165bf8441afda | eb43f926fee432865ea45c05d7d4528f | Checks whether Shulker use the JavaScript plugins support mode or not. | function isSupported() {
return supported;
} | 0 |
b14a87fd136640ee26a9ad6f280a2d1c | 6ade64d4f4c19fa894cb4566fedbb972 | Returns the customer details of the specific customer number through service call. | public Map<String,String> customerDetails(String customerId); | 1 |
b0debc4b48c4a220661b7e1aa0a993d6 | 68a95734f23efd9d2ff5e10dc0776907 | Verdant Embrace |3|G|G
Enchantment - Aura
Enchant creature
Enchanted creature gets +3/+3 and has "At the beginning of each upkeep, put a 1/1 |Sgreen Saproling creature token onto the battlefield." | aux.AddSynchroProcedure(c,nil,1,1,aux.NonTuner(nil),1,99)
c:EnableReviveLimit()
local e1=Effect.CreateEffect(c)
e1:SetProperty(EFFECT_FLAG_CANNOT_DISABLE)
e1:SetType(EFFECT_TYPE_SINGLE+EFFECT_TYPE_CONTINUOUS)
e1:SetCode(EVENT_SPSUMMON_SUCCESS)
e1:SetCondition(c37675907.regcon)
e1:SetOperation(c37675907.regop)
... | 0 |
214e039c1296a42e03c0fa133b38f101 | e056a132e5228bc84a5d644dc66c41aa | <br>
<p>
返回哈希表 key 中,一个或多个给定域的值。 <br>
如果给定的域不存在于哈希表,那么返回一个 nil 值。 <br> | @Component
public class Jedisclusters
public List<String> hmget(String hash, String key) {
return jedisCluster.hmget(hash, key);
} | 1 |
717b729c0c82aedf110041dc7cd9f94d | 9982b1c0652c44f639a4710ab1cd819e | Delete a nonBusinessDay (asynchronously)
Deletes the nonBusinessDay identified by the specified id. | namespace Infoplus.Api
public partial class NonBusinessDayApi : INonBusinessDayApi
public async System.Threading.Tasks.Task DeleteNonBusinessDayTagAsync (int? nonBusinessDayId, string nonBusinessDayTag)
{
await DeleteNonBusinessDayTagAsyncWithHttpInfo(nonBusinessDayId, nonBusinessDayTag);
... | 0 |
6d4c0f8c2c7fb354c45ebcd3b2b50dde | ad918d6182baebc281296e3ba700bff9 | Returns the start indexes. | public class Protein extends ExperimentObject
public ArrayList<Integer> getPeptideStart(String peptideSequence, SequenceMatchingPreferences sequenceMatchingPreferences) {
AminoAcidPattern aminoAcidPattern = AminoAcidPattern.getAminoAcidPatternFromString(peptideSequence);
return aminoAcidPattern.getIndex... | 1 |
061555a8b8a6feaa479a7f482fc68fff | 1fba8a2cab006e694b7086374424ede9 | Wysyła wiadomość informującą o przyznanym poziomie dostępu dla konta. | namespace LeakBlocker.ServerShared.AdminViewCommunication
void SendPassword(EmailSettings emailSettings); | 0 |
453abd8babffe097f6049b1c14d92554 | 09785ca94130f12b214c52d7681e8fd4 | Evaluates the post content for how many links are in it. | if($content == ''){
$content = get_post_field('post_content', get_the_ID() );
}
return sprintf(
__( '%s', 'text-domain' ),
str_word_count( strip_tags( $content ) )
);
} | 0 |
50ed76c9c4881c18f8134954ef83639a | 36c99941976fbc8825e41fbf6b69a1b4 | Test CLI for the use case of video playlist identifiers. | class SearchTest(unittest.TestCase):
def test_returns_place_vids(self):
assert_spec(Search.search_identifiers, ['self', 'search_phrase', 'limit'])
assert_spec(GVid.parse, ['cls', 'gvid'])
search = Search(self.lib)
score = 1
vid = 'vid-1'
t = 'type'
name = 'Califor... | 0 |
e9fc0bea9c58aad72ebe2b520aa3556f | 5e4359ab60e5b637a8307842423e4704 | 获得某种摘要,例如hashAlgorithm可取为SHA-512 | public class HashHelper
public static Object getHashObj(String algHash){
MessageDigest md = null;
try{
md = MessageDigest.getInstance(algHash);
} catch(Exception ex){
;
}
return md;
} | 1 |
3ade6c92fba87ef4bf9e83338f546f4b | 19be000f149d5d51129737146d2f0a0b | Route for self-care GST information update. | class QhseHandler(webapp.RequestHandler):
def get(self):
response = render_cached_template('services/qhse.html')
self.response.out.write(response) | 0 |
7d0c8324d2249b42a6b8e94310e5949b | 2bafc599964acb99c55a1523d2d861d9 | counting number of selected products in category and subcategories | $url = explode("/", parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH));
if ($url[3] == 'selected_category'){
$a = ($url[count($url)-1]);
$b = str_replace(' ', '', $a);
if (empty($b)) {
$b = 1;
}
} else {
$b = 1;
}
return $b;
} | 0 |
eb86921bcb243c15ceb8ab7c983d018d | 4c6949ba5f78f559832eea324e88e3a0 | Test case for get_supported_locales_for_datasets
Get Supported Locales for Datasets # noqa: E501 | class TestFeaturestoreServiceApi(unittest.TestCase):
def test_get_training_datasets_for_featurestore(self):
pass | 0 |
0ab4ef388e31af7979609c8bae8e46ef | 6bfb97e5230133a09790a8049454ca48 | Read register value from P4 switch using the DEFAULT_CLI. | static int PortCmd_r(PAHCI pAhci, PAHCIPort pAhciPort, uint32_t iReg, uint32_t *pu32Value)
{
RT_NOREF2(pAhci, iReg);
ahciLog(("%s: read regCMD=%#010x\n", __FUNCTION__, pAhciPort->regCMD | AHCI_PORT_CMD_CCS_SHIFT(pAhciPort->u32CurrentCommandSlot)));
ahciLog(("%s: ICC=%d ASP=%d ALPE=%d DLAE=%d ATAPI=%d CPD=%d... | 0 |
5d5572caeb01f796d3e9d14092497918 | ac1e7a40b1f1617f9e68edcc552d9bc0 | Gets the aggregate ratings | [Route("GetAll")]
public async Task<ActionResult<List<RatingModel>>> GetAll()
{
return (await Mediator.Send(new GetAllRatingsQuery())).ToList();
} | 0 |
867ecda6682c21908906b7bc89002918 | 1d8eceada8df10102675caaaf334cc8c | リソースファイルよりメッセージを取得します。
もし、指定されたキーでメッセージが解決できない場合はキーを返します。 | ResourceBundle bundle = logger.getResourceBundle();
String keyStr = String.valueOf(key);
String message = null;
if (bundle == null) {
logger.error(new StringBuffer().append("Resource bundle not set for logger \"")
.append(logger).append("\"").toString());
... | 1 |
32ab3ac3bb57d0d9d2edec753c8002d8 | f6d86171ee7cc83a38d56fac4fdf884f | Seta um patrimônio como disponível. | class Inventory:
def place_property(self, property):
if property not in self.properties:
self.properties[property] = "unmortgaged" | 1 |
76729c3fe550b0ebef88f120e99d623f | 6b8f211ee81c7b384bb4e99b4912bd23 | Проверят дерево на бинарность. | public class Tree<E extends Comparable<E>> implements SimpleTree<E>
public boolean isBinary() {
boolean isBinaryResult = true;
Queue<Node<E>> data = new LinkedList<>();
data.offer(this.root);
while (!data.isEmpty()) {
Node<E> el = data.poll();
if (el.leaves().size... | 1 |
272f2e9fb31f1d2fe168f4446da68d64 | 66aa51e3eba4efab9d911b4fdc5455a0 | two instances are equal iff they represent the same syntax | @arity.eql?(other.arity) &&
@uniq.eql?(other.uniq) &&
@index.eql?(other.index) &&
@module.eql?(other.module) &&
@old_index.eql?(other.old_index) &&
@old_uniq.eql?(other.old_uniq) &&
@pid.eql?(other.pid) &&
@free_vars.eql?(other.free_vars)
end | 1 |
51ce085378853d8298971fa8e26799fd | c3690452a3452f1d602d91645324e3ea | Get a list of the available ports. Already opened ports
are not returend. | def getOpenPorts() -> List:
return transfer.open_ports() | 0 |
699e97c6810554e7d77c6116cb6cad2c | c799d00defcd931f7874ad8c6efac327 | <div class="introMethod">
Parses a string and tries to interpret it as an angle.
</div>
<code>null</code>, if it was invalid.
<code>null</code>. | namespace Css.Functions{ public class LinearGradientFunction:CssFunction{
public static float LoadAngle(Css.Value value){
float angle;
if(value is Css.Units.AngleUnit){
angle=value.GetRawDecimal();
}else if(value is Css.ValueSet && value[0].Text=="to"){
int horizontal=0;
int vertical=0;
for(in... | 0 |
f1429e5775c7a179338991a522660caf | 2444151940e3a865f44c2020e2b846e9 | Increment the total timesteps, episodes and generations. | if self.episode_done():
self.num_act_cur_episode = 0
self.num_episodes += 1
return None
else:
self.num_act_cur_episode += 1
self.total_parleys += 1
if self.max_exs is None:
if ('num_epochs' in self.opt and self.opt['num_epochs... | 0 |
2b6b3973dfe774238d6fa8cd75f32c7a | e5e295810bc5abfeb3aefb71095992bb | Get all establishments with filtering support for certain fields, with support for pagination | class Api_Service_Search
public function etablissements($label = null, $identifiant = null, $genres = null, $categories = null, $classes = null, $familles = null, $types_activites = null, $avis_favorable = null, $statuts = null, $local_sommeil = null, $lon = null, $lat = null, $parent = null, $count = 10, $page = 1)
... | 1 |
97985315c9541c6f17271917ac6a9c4e | a72194a6c9cb27a37740f82fcf369e8a | Set angle of ship | void pacman::setAngle(float degrees)
{
angle = degrees;
} | 1 |
c50df4649eeb0eb0e33a244a874f60b2 | 3d0faf172b9a88c619f2e51df08b2e50 | Converts the current double-precision floating-point into a span of bytes. | namespace Gapotchenko.FX
[CLSCompliant(false)]
byte[] GetBytes(ulong value); | 0 |
d9d790d2951d7f1f8ff6608c55945ff0 | eb2d27c52d5e03b7edd2a6f9c73bd36e | Loads the loss_scaler state dict. | def _load_state_dict(optimizer, state: dict) -> None:
if is_scheduler(optimizer):
optimizer.load_state_dict(state["scheduler"])
optimizer.optimizer.load_state_dict(state["optimizer"])
else:
optimizer.load_state_dict(state) | 0 |
4c3c7fa35a0c16d1247d9b02ed331c81 | 4b810591d46e4e5fd87fd5bbdd901efe | This method evaluates village event code in the mocked context to predict the outcome | namespace StrongholdTiming.Tests
[TestClass()]
public class KingdomTest
[TestMethod()]
public void FixVillageLocationTest()
{
} | 0 |
035712a15dcea0f529de55a2068b4c38 | 06b7dfa96f062754298b93cc8d100bd3 | CSVRowToStringArray: Funzione che prende una riga da un csv e torna un array di stringhe con l'elenco dei contenuti di ogni elemento
Parametri: stringa con riga da esaminare, carattere che separa i campi, carattere che separa le righe | public class TABLE_READER
static public string[] SplitCsvLine(string line)
{
return (from System.Text.RegularExpressions.Match m in System.Text.RegularExpressions.Regex.Matches(line,
@"(((?<x>(?=[,\r\n]+))|""(?<x>([^""]|"""")+)""|(?<x>[^,\r\n]+)),?)",
System.Text.RegularExpressions.RegexOpti... | 1 |
4f7c97a1d56c038ae98dc14b0ddb1ab0 | fe480f310e3a65e97502394b428d95b7 | Get all backward dependencies by namespace for the provided extension. | public function getDownstreamModules(string $module, array $dependencies = null): array; | 0 |
3e5cace7c1df91d1aa1b5a1556560e1d | 3900ed729ad6b1adecb1ba37d882d68c | 摄像机目前看向的位置UV | public Geometry UV(Vector2 uv)
{
vertexUV = uv;
return this;
} | 0 |
f6523bda0518fe290cf659b97e169682 | 8f32d312b012543a808db2811eaf1f9d | 根据loanBasisId删除 | @Service
public class JaloLoanUsageServiceImpl implements IJaloLoanUsageService
@Override
public int deleteJaloLoanUsageByIds(Long[] ids)
{
return jaloLoanUsageMapper.deleteJaloLoanUsageByIds(ids);
} | 0 |
49786b5818164119b413e5c78bdd143a | 9e435efe5a25be4153996166820af296 | inputs:
- learner: the learning algorithm to be trained and predicted on
- sample_size: the size of samples (number) to be drawn from training set
- X_train: features training set
- y_train: income training set
- X_val: features validation set
- y_val: income validation set | x_train, y_train, x_dev, y_dev = split_dataset(samples, labels,
self.dev_share)
if self.batch_iterator_type == 'normal':
batch_iter = _batch_iter
elif self.batch_iterator_type == 'oversample':
batch_iter = _oversampling_batch_iter
else:
... | 0 |
302dcc3d40ef07d7eec17e4a5269dc4d | 4b2f6b1fabb55d9977f7325e3b9ea2b7 | 仮登録と本登録のメールの発行
仮登録と本登録の切り替えはis_active | {
$DO_OldLetters = new DO_Letter;
$DO_OldLetters->whereAdd('id=' .$oldLetterId . ' OR active_version_id=' .$oldLetterId);
$DO_OldLetters->active_version_id = $newLetterId;
$result = Util_DB::update($DO_OldLetters, DB_DATAOBJECT_WHEREADD_ONLY);
$DO_SendPlan = new DO_Letter_send_plan();
$DO_SendPlan->whereAd... | 0 |
e7a3359e56274b00d034cf2177293001 | 888e21a40e4959a8fe57892ec4ecaa7a | Retrieves all branch departments by branch assembly.
In case of exception. | public BranchDepartment findBranchDepartmentByBranchAssemblyAndEndDate(final BranchAssembly branchAssembly,
final Date referenceDate) {
try {
TypedQuery<BranchDepartment> query = this
.getEntityManager()
.createQuery(
"select db from BranchDepartment db where db.branchAssembly = :branchAssembl... | 0 |
1f6113ee534e56885aabcebd30fd4f08 | 1f721fbbaf305bbf52a6f21c6f179a97 | Retrieve printed card item | SGBaseMilitaryCard *SGCardItem::getItemCard()
{
return _card;
} | 0 |
7a49b9ef5a9b90cd4e1c96632c1e3eb5 | 51d4687208913866a33a27eae5037abe | Returns new tags resulting from merging two tag dicts | ret = {}
for k in d1:
if k in d2:
ret[k] = d1[k]
return ret | 0 |
cd096ad8449118de3884015b4ddef6d2 | 97753d97fb170aff158da519bb50e222 | Returns a smoothed series of points using the Catmull-Rom spline algorithm. | interface gxtSpline
fun catmullRom(v1: Vec1, v2: Vec1, v3: Vec1, v4: Vec1, s: Float) = catmullRom(Vec1(), v1, v2, v3, v4, s) | 1 |
cf3079bb8d1a54d716beab6f61dd3319 | 74a46da9603988254090935ee3704248 | Set the calendar time in milliseconds since the epoch
An instant represented by the number of number of milliseconds between
such instant and the epoch, ignoring leap seconds.
</p> | void setDateTime(
int year, @Positive int monthOfYear, int dayOfMonth,
int hourOfDay, int minuteOfHour, int secondOfMinute, int millisOfSecond); | 0 |
dd0ba9b2c6bf1192c383a1397370a16f | b10663e3634dcff80eee973587ff2bb8 | Genertes a Dockerfile file using the configured information | {
$dockerfileStub = 'Dockerfile';
$dockerfileStubPath = $this->stubDirectory.'/'.$dockerfileStub;
$environment = $this->getStringArgument($input, 'environment', false);
if (!empty($environment)) {
$dockerfileStub = $environment.'.'.$dockerfileStub;
}
if (!... | 1 |
e0626a7e69bc54c3a219bdd73477341b | ebe1372786f3c004a9bbe38ec4ca0130 | 读取距离的文件,并且用字典存储 | d_data = pd.read_csv(d_csv, encoding='gbk')
d_dict = {}
column = d_data.keys()
for c in column[1:]:
for s in d_data[column[0]]:
dis = d_data[c][s]
if dis != 0:
d_dict[(int(c), s)] = dis
return d_dict | 1 |
f69b488d853fbe5ea646ec44a1d7d423 | e67d0754455ee305fc07e87608144fd8 | 刪除使用者的緊急聯絡人 | {
try
{
using (TransactionScope transScope = new TransactionScope(TransactionScopeOption.Required, new TimeSpan(2, 0, 0)))
{
using (DDDAO dao = new DDDAO())
{
Receiver data = dao.LoadReceiver(... | 1 |
205c500e76b8d36ada816fe7fdeb0293 | f1b1c6210e437b636f343a81c4c67668 | 更新野牛和狼的距离 | {
while (state.nowYear < 2023)
{
int nextNumDeer = state.nowNumDeer;
if (nextNumDeer < state.nowHeight)
{
nextNumDeer++;
}
else if (nextNumDeer > state.nowHeight)
{
nextNumDeer = nextNumDeer < 1 ? 0 : nextNumDeer - 1;
}
#pra... | 0 |
aa91aaa3d6659aee2d514ce81f727701 | 30cfaa19970a63e95b9398c7187c18a2 | 축, 절대좌표를 입력받아 해당 좌표로 이동하는 기능 | namespace BlessInput
public class InputAction
public static int moveTo(int x, int y)
{
if (x >= (Instance.windowXMax - Instance.windowXMin)) x = Instance.windowXMax;
if (y >= (Instance.windowYMax - Instance.windowYMin)) y = Instance.windowYMax;
int InputX = (Instance.wind... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.