query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
d262acb9997e5856afaacd9060a62bb6 | 833030428b1078715042f846ea7e8b0a | Obtem o valor na linha e coluna | if (m != NUL && i > 0 && j > 0) {
PontCab auxCab = m;
while (auxCab != NUL && auxCab->coluna != j) {
auxCab = auxCab->direita;
}
if (auxCab != NUL && auxCab->coluna == j) {
PontElem auxElem = auxCab->abaixo;
while (auxElem != NUL && auxElem->linha != i) {
... | 1 |
2ab1431d89d0a31720a9a2f3fea675d5 | 01286531029b581806150fb981657248 | This is a method that will wait for the referee to indicate what the final scores of the game
are. Once this player receives this message, they will know where they placed in this game of
Fish.
{
"winners" : [Strings representing the winning player colors]
} | AreThereAnyWinners areThereAnyWinners(Winners[] winners)throws RemoteException; | 0 |
d63b73dbfa310ec4c95b48c1fc42d288 | 1c3ed249479005d599f899b5acaa366a | 释放所有剩余页面 | int i;
struct pentry * p;
pd_t * pagedir;
pt_t * pagetbl;
int flag = 0;
for (i = 0; i<NPROC; i++) {
p = &proctab[i];
if(p->pstate == PRFREE) continue;
pagedir = p->pdbr;
int k;
for(k=4;k<(NBPG/4);k++) {
if(pagedir[k].pd_pres != 0) {
flag = 0;
pagetbl = pagedir[k].pd_base * NBPG;... | 1 |
3bf9cdc40d43786ccc882b4fd34fda5f | c64e6bfbf51860e0112a1c6db05801a3 | Removes phantom paragraph tags on images | {
if ( ! $content )
{
$content = get_the_content();
}
$content = trim(preg_replace('~(<a[^>]+>)?\s*(<img[^>]+>)\s*(</a>)?~sim', '', $content));
return $content;
} | 0 |
29b608e6d3192c68ad55ef7ea16420de | e71fa688cdf3580b3bb4cfee80ee8d7a | There may be return address stack (RAS) updates from calls and returns
in the fetch queue that never made it to renaming, so they have no ROB
that the core can annul normally. Therefore, we must go backwards in
the fetch queue to annul these updates, in addition to checking the ROB. | {
int8 i;
uint32 addr;
arc_rm_addr_map_t *entry;
for (i = 0; i < g_arc_rm_addr_map_size; i++)
{
entry = &g_arc_rm_addr_map[i];
entry->addr = cmd_db_query_addr (entry->rm);
CORE_VERIFY (entry->addr != 0);
}
return;
} | 0 |
7fc0ed9cefb01fb0c18f5e533725ec87 | d823921a6a4162247ff4cf9c98e6bc6e | constructor, generates the configuration test | class TestSessionManager extends PHPUnit_Framework_TestCase
public function __construct() {
$this->config=new Configuration();
} | 1 |
d809713eb4d0ec9d0b081d584475fd1d | ee4f27d40f80404e2705697dfdbaba4b | 获取小程序业务域名 | {
if (strpos(SITE_DOMAIN, 'weiphp.cn') !== false) {
return '.weiphp.cn';
} else {
return '.oftenchat.cn';
}
} | 1 |
9b2c136fa481b2b8cf82c4c5bd5f5747 | c54773c1a41c265493d17e49f6b1b85d | Initialize cyclic scheduler for lr modification | def init_lr_scheduler(opt, optim):
return torch.optim.lr_scheduler.StepLR(optimizer=optim,
gamma=opt.lr_scheduler_gamma,
step_size=opt.lr_scheduler_step) | 0 |
17d2abd502028f365f3fdb1eef1fdab5 | a1b55c89d6cbbaf31cebf231ff24d690 | update the device list select list, selecting currently subscribed devices | {
int i;
GtkListStore *store;
GtkTreeIter iter;
GtkWidget *widget;
GtkComboBox *dev_list;
int new_sel_index;
app_reload_device_list();
widget = get_widget("device_list");
dev_list = GTK_COMBO_BOX(widget);
store = GTK_LIST_STORE(gtk_combo_box_get_model(dev_list));
if (app_state.wbfs == NULL && app_... | 1 |
e5132dce6d19bcd008d2cb421a4445de | 5f0a13943664378436a5bc764f674fb5 | Find and display data for each Representative of this Society or group
(Life, Ex-officio or Additional members)
by scanning through all members in $members data array | function gov_member($assign) {
$members = get_field('members', 'options');
$i = 0;
foreach($members as $dude) {
$dudeWhat = $dude['assign'];
if($dudeWhat == $assign) {
break;
}
$i++;
}
$dudeScent = $members[$i];
return $dudeScent;
} | 1 |
2f7b21c93d2e3edd5e9e971b275e321f | eef0634c1c121f185dfbea4b27c1efbe | 获取被邀请投票的用户 | @Repository
public class VoteDao extends BaseDao
@SuppressWarnings("unchecked")
public List<UserInfo> listVoteUser(Integer voteId, Integer comId) {
List<Object> args = new ArrayList<Object>();
StringBuffer sql = new StringBuffer();
sql.append("\n select c.id,c.email,c.wechat,c.qq,c.userName from groupPersion a ... | 1 |
c06fea715e4d86b71e8f48c9d0a387da | b8953dc5ca5e902b42d7506ad5b694c3 | set up the FP and SSE state, and then dump it. | void
vfp_dump(vfp_t *vfp)
{
int i;
union
{
float f;
uint32_t u;
} reg;
for (i = 0; i < 32; ++i)
{
reg.u = vfp->reg.s[i];
printf("s%02d: %f\n", i, reg.f);
}
} | 0 |
8d4fd9109d4ac0119d88b228498812df | 946e892fa2fb1b0e74d2aeee27da8da3 | Print table to file. | if(fp == NULL) {
fp = stdin;
}
fprintf(fp, "==================================\n");
fprintf(fp, "%-20s %s\n", "ACTIONS ", "COUNT");
fprintf(fp, "----------------------------------\n");
fprintf(fp, "%-20s %d\n", "allocations: ", this->allocCount);
fprintf(fp, "%-20s %d\n", " malloc", this->mallocCount);
fpr... | 1 |
3ec7c97053b44f3aa8130d6eb53a3191 | 3b3d13f42b4d6689605ebf717a657299 | Get base URL for HLS segments. | fun getHlsUrl(cameraId: Int, context: Context) =
Utils.getHlsUrl(cameraId, Preferences(context).getToken()) | 1 |
ec89cd99b3f1ec07f49db4d77fa66a8a | 903e0142dcb4cc713b0800f1ca6bcee1 | @brief Append another interface to the list. | {
struct sr_if* if_walker = 0;
int i;
assert(name);
assert(sr);
i = sr_if_name2idx(name);
assert(i >= 0);
if(sr->if_list == 0)
{
sr->interfaces[i] = sr->if_list = (struct sr_if*)malloc(sizeof(struct sr_if));
assert(sr->if_list);
sr->if_list->next = 0;
strn... | 1 |
f9ba8b510d55a1fde4d95915c3841f56 | 3a1eba4376a8e00242b552a2686fb265 | 定义一个扩展方法ReverseDigits,允许int将自己的值倒置 | {
int x = 1534236469;
StringBuilder sb = new StringBuilder();
string str = x.ToString();
int start = 0;
if (x < 0)
{
sb.Append(str[0]);
start++;
}
for (int i = str.Length -1; i >= star... | 0 |
0e1dbf7540bc2b3dae18dc20c29ad90e | e01a69a613939ee158deae0a7ba889ce | Returns a range of all the form send record field signalements.
<p>
Useful when paginating results. Returns a maximum of <code>end - start</code> instances. <code>start</code> and <code>end</code> are not primary keys, they are indexes in the result set. Thus, <code>0</code> refers to the first result in the set. Setti... | public class FormSendRecordFieldSignalementUtil
public static void cacheResult(
FormSendRecordFieldSignalement formSendRecordFieldSignalement) {
getPersistence().cacheResult(formSendRecordFieldSignalement);
} | 0 |
f745b4f95b27fb8d42d2ad1bb660e5a5 | d0ae2798405376f54455c0d086c57aea | 测试库存解冻 | try {
List<LockInfo> lockInfos = new ArrayList<>();
LockInfo lockInfoSku = new LockInfo();
lockInfoSku.setProductId("ze0000test");
lockInfoSku.setStorehouseId(1);
lockInfoSku.setSkuNum("100-100:100-100");
lockInfoSku.setApplyCount(10);
... | 1 |
250dc2aca739af542bf56cf8c4ccf48f | 5148cf50feec6cc136b3419121f6841d | 接收数据时收到未设置测站信息,自动将测站信息入库并在列表中添加 | results = session.query(TestAnalyse)
for r in results:
if r.bd_location==None:
r.bd_location=self.get_bd(r.address)
session.add(r)
session.commit() | 1 |
39b137e200926709d7aa262b06316dcc | 43c9645f096b3712c37f2ad43ea9e442 | Gets the value of the idEnterprise property.
possible object is
{@link IdEnterprise } | @XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ContactQuery", propOrder = {
"id",
"created",
"createdBy",
"updated",
"updatedBy",
"conflictId",
"modId",
"accountCurrencyCode",
"accountId",
"accountIntegrationId",
"accountModId",
"accountPriceListId",
"accountP... | 0 |
8885b0a4b537c7e8bd8844d4d5baa72a | f6f54c6f8e25126f667108eed70bf46e | * desc 删除虚拟机物理文件
* input 虚拟机id
* output None | class Shutdown(object):
def fab_shutdown_vm(self, vm_id):
return run(f'vim-cmd vmsvc/power.shutdown {vm_id}').succeeded | 0 |
360bf176372bc391492a81802efaad3d | 5121e7dd7cbe24ee589ef89ad708b5d8 | Click on Benefits Link. | export class FooterPage
public async clickOnPoliciesLink() {
return this.policiesLink.click();
} | 0 |
db15d57ab82b7243c08087eb69f179d6 | c501fb77950aa3ca42d24eb44dbd03f0 | Breaks the input list into chunks. Used to limit the number of identifiers
sent to Ensembl REST POST API calls (limit 1000). | class Bot:
def _chunk(self, callStrings: list) -> list:
tweetList: List[str] = []
baseIndex = 0
subTweet: str = ""
for index in range(len(callStrings)):
if len(tweetList) == 0:
subTweet = (
", ".join(callStrings[baseIndex:index]) + " ... " ... | 0 |
d333162e5e3aa11550040d62402e7e02 | 686c9261695b9569f56832e9cf8a8a96 | @brief Wait the specified flag with timeout. | {
uint32_t tickstart = LL_GetTick();
while (__LL_FLASH_GET_STATUS_FLAG(FLASH_FLAG_BSY) != RESET) {
if (Timeout != LL_WAIT_FOREVER) {
if ((Timeout == 0U) || ((LL_GetTick() - tickstart) > Timeout)) {
return LL_TIMEOUT;
}
}
}
if (__LL_FLASH_GET_PENDIN... | 1 |
531ca01212999c417e5f4ab291dfe2f9 | 0e0008e93cb65ceb51c48d6214de3ad2 | звільняє ресурси і розблоковує зображення | namespace WindowsFormsSolo
void Release(PictureBox pictureBox); | 1 |
f66ab2861a99d8173ecfa03188d537c2 | 1e292c14da6b8090d714bd58da17263d | Gets the order_hash of this MarketQuoteFill. # noqa: E501
Computed hash verifying the authenticity of the order # noqa: E501 | try :
self._certhashheader = certhashheader
except Exception as e:
raise e | 0 |
a3e914771625f9ff7fe4e89d26a59ed2 | 501efa16ef41b50dd7b9e8e905a6531b | Using our reference to the domElement, toggle a class to expand or hide the article. | if (this.expandButton.textContent === 'Click to expand') {
this.expandButton.textContent = 'Click to close';
this.domElement.classList.toggle('article-open')
TweenMax.to(".article-open", .5, {
height: 400,
})
} else if (this.expandButton.textContent === 'Click to close') {
... | 1 |
4616999fab14aefa38227ff6110fe347 | d9292fbc9412ae3738e1d141fbc5ff9a | The name of the user who owns the data asset. | @JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
public class Asset extends Referenceable
public String getOwner() {
return owner;
} | 1 |
a9f12dee4154213754728daa6f677a07 | 046ecc875f5db5a77e7c2499e8d1e150 | Returns a dictionary for the partial decay widths of the pseudoscalar
mediator.
Returns | namespace Gambit
namespace DecayBit
void neutralino_4_decays (DecayTable::Entry& result)
{
using namespace Pipes::neutralino_4_decays;
mass_es_pseudonyms psn = *(Dep::SLHA_pseudonyms);
result.calculator = BEreq::cb_sd_neutwidth.origin();
result.calculator_version = BEreq::cb_sd_neutwidth.v... | 0 |
dcd577fdc8f3c4439840b992cd5b121e | 75923abfe9a33058c6a527ab879863cf | Method responsible for decrypting an encrypted string that has been encrypted by XOR | def XORdecrypt(encryptedMessage58, symmetricKey58):
messageInt = TC.b58toInt(encryptedMessage58)
symmetricKeyInt = TC.b58toInt(symmetricKey58)
decryptedMessageInt = messageInt ^ symmetricKeyInt
decryptedMessage = TC.bigIntToString(decryptedMessageInt)
return decryptedMessage | 1 |
8b50f8305da589cd4b2862316d7587d1 | 2d5de2826653003a69134e64e94bdce7 | @brief This function resets the current orientation to the default
@param none
@retval none | void oled_resetOrientation() {
oled_write_cmd(SEGREMAP);
oled_write_cmd(COMSCANINC);
} | 1 |
edb9fea296f829f66817c36967e03ed3 | 0b99c9c78707e8e2a07339d8a1bb75a1 | Sets min booking lead time seconds field. | set timein(value) {
elements.timein.value = value;
this.fields.timein = value;
} | 0 |
12f100ce2872cdb1ce19266c36329e01 | 40f61925c7d8b2859684e9d97e5a2263 | ADD Vx and Vy with carry, stores result in Vx. | namespace PolyChip8
public class CPU
private void IADDVX()
{
AddressRegister = (ushort) (VRegisters[X] + AddressRegister);
} | 0 |
8a9137d2ab308314e6170d9c059736aa | 822d09b9923b15ffa1c1ab4bc93a5a2a | isEmpty returns true if Fraction object is in a safe empty state | namespace sict
void Fraction::setEmpty()
{
m_numerator = 0;
m_denominator = 0;
} | 0 |
97c85441d214b3eb8d2c71d98454672e | 4d7f05362a4f3b92371a4c20098ab070 | Open article settings modal. | event.stopPropagation();
var form = $( this ).closest("form");
form.find('.actions .confirmation').hide();
form.find('.actions .static').show();
var article = $( this ).closest("article");
article.toggleClass('danger');
updateHeight( ar... | 0 |
ba2f55148d1e4c355d4806e456fc19bf | d40ee179c3fef889248a3a58904b360d | pull from rnoc's detailed api to get a list of all access points and their number of clients | void Google_Geolocation::scan_access_points(void)
{
buff_size = WIFI_AP_BUFF_SIZE;
wifi_ap_cnt = 0;
wifi_ap_ptr = wifi_ap_buff;
memset(wifi_ap_buff, 0, buff_size);
WiFi.scan(wifi_scan_callback);
*(--wifi_ap_ptr) = ']';
} | 0 |
308db2b2c3fd2e109fe665547613c708 | c3ec3e515bdfc88f958405c1a8d746d2 | @brief Used to follow an angular position command. | {
m_lasttargetangle = targetangle;
fmod(targetangle, 360.0);
targetangle += m_offset;
double delta = GetCurrentAngle() - targetangle;
if (delta > 180)
{ targetangle += 360; }
else if (delta < -180)
{ targetangle -= 360; }
delta = GetCurrentAngle() - targetangle;
if (delta > ... | 1 |
d35adb8e333ab65ae3238d701df4a25a | cf2b61ded832bb93dcafe23e0f9c33f2 | \brief Clear PANCOORD in RXMCR: Receive MAC Control Register
\details Device is not set as PAN coordinator | EFIAPI
ClearOsToCorCntPg (
IN UINT8 Socket,
IN UINT8 ChOnSkt
)
{
MC_2LMCNTL_SAI_COR_CNT_PG_RD_POLICY_N0_MC_2LM_STRUCT CorCntPGRead;
MC_2LMCNTL_SAI_COR_CNT_PG_WR_POLICY_N0_MC_2LM_STRUCT CorCntPGwrite;
CorCntPGRead.Data = ReadCpuCsr (Socket, ChOnSkt, MC_2LMCNTL_SAI_COR_CNT_PG_RD_PO... | 0 |
0418b97e1d2cb147f730a90acd5a1b78 | 8d1733c178cbd7f922d6dfb86c585703 | plot roc curve and save as png | def plot_all_rocs(path, n_runs=100):
plt.figure(figsize=(3, 3))
for i in range(0, n_runs):
basedir = "{}/run_{}/final_analysis/rocs/sec4-test".format(path, i)
with open(basedir + "-1-fpr.npy", "rb") as f:
fpr_1 = np.load(f)
with open(basedir + "-1-tpr.npy", "rb") as f:
... | 1 |
bec08fafb96379591ca6e4c6a53865ec | 4d59978d274ca7447cbc8f820b62d1c9 | 交换数组中k1与k2位置的两个元素 | public class Solution
private static void swap(char[] arr, int i, int k) {
if (i != k) {
char c = arr[i];
arr[i] = arr[k];
arr[k] = c;
}
} | 1 |
a97943bc37bc9f3356280df810cce30a | d754b29c429a16ce53a75f5ff113285d | If n is 1 or 0, simply return n | F = [[1, 1],
[1, 0]]
if (n == 0):
return 0
power(F, n - 1)
return F[0][0] | 0 |
e334d23e27fb6bb6ca3cee1d3391432c | 4ff640a4d6230384b38211272ca5d7fa | affichage voiture qui n'a pas été rendu | function cardnDeck()
{
global $link;
$showtables = mysqli_query($link, "
select distinct C.*
from Cartes C
left outer join Appartenance A
on C.id_carte = A.id_carte
where A.n_deck is NULL;
");
echo "<div id='req' class='hero-unit'>";
... | 0 |
a44b2af17ad5df4956afefcc51c38af7 | 43fb2f7281a1a4960c4981ba96c2448b | Agregar un nuevo tipo de narracion | {
try
{
_tipos_gestion.agregarTipoGestion(ref t);
}
catch (Exception ex)
{
throw ex;
}
} | 0 |
6b5893e85e56b356a666d0a248500bdf | 01a2570d4948760ad14e2b97b4c59ce8 | Calcula la raiz cuadrada de un numero usando math.sqrt
Retorna -1 si n es negativo (invalido) | def sqrt(number: int)-> int:
try:
if number<0:
raise ValueError
if 0<=number<=4:
for i in range(number,0,-1):
if i * i <= number:
return i
return 0
else:
arr = list(range(0, number // 2))
return b... | 0 |
4a84dff095d0c98be146a50d1e1e5d90 | 1a19ead26480a5284f89064deaefd259 | Get the database column which stores the topic ID | class TableNames
public static function getTopic()
{
return 'topic';
} | 0 |
f12042d57736f224e3652108d3969c07 | cbf15d7de89393fa5ca008fd3e88ffa8 | Returns a Shakespearean-like Pokedex result for the given pokemon | _searchResult.postValue(Result.Loading)
_pokemon.reset()
_pokemon.name = name
ShakemonManager.INSTANCE.getShakespeareText(name, object : IServiceCallback{
override fun success(text: String) {
_pokemon.shakespeareDescription = text
publishData()... | 1 |
c10c2776efae6e9eb3742615cad47c31 | 2bba8d57258416c113147df8269db9db | Updates a record in the Direccion table. | {
using (RECURSOSHUMANOSEntities db = new RECURSOSHUMANOSEntities())
{
db.Configuration.LazyLoadingEnabled = false;
db.Configuration.ProxyCreationEnabled = false;
db.Configuration.AutoDetectChangesEnabled = false;
try
... | 1 |
7926630c011c24698aa0267e4de387e4 | da269753c655fd7e03c7e6f9213942f5 | From inlineClassManglingRules.kt | val whenValue = when (value_1) {
is _SealedChild1 -> _ClassLevel2()
is _SealedChild2 -> _ClassLevel3()
is _SealedChild3 -> _ClassLevel4()
}
whenValue checkType { _<_ClassLevel2>() }
checkSubtype<_ClassLevel1>(whenValue)
return ""
} | 0 |
7a01ef32a96e037ee59bfd4f8d8750a5 | 37b99296a6f409adcb74a0d3701afffd | Gets the path for an executable that has it's path in the env variables. | def get_executable_path(executable_name: str) -> str:
out = subprocess.run(["which", executable_name], capture_output=True)
if (out.returncode == 0) and (len(out.stdout) > 1):
return out.stdout.decode("utf-8").rstrip("\n")
else:
return None | 1 |
111e5a2b6b0306593979a75e18b9c14a | 81292c9f06e2dad134fea8836e5e9883 | # Output: leave-one-out CV score | cv.randomForest.function <- function(features, labels, K, ntree, reweight = FALSE){
set.seed(2020)
n <- dim(features)[1]
n.fold <- round(n/K, 0)
s <- sample(n) %% K + 1
cv.error <- rep(NA, K)
for (i in 1:K){
feature_train <- features[s != i,]
feature_test <- features[s == i,]
label_train <- labe... | 1 |
662072db9b7a1d117286a04d766dfd56 | 21ef42346993db938a50b1c76ebd971c | Test that checks if formulation of new user instances is correctly done | class TestClasses1(unittest.TestCase):
def testInit(self):
self.assertEqual(self.newUser.fname,"Annick")
self.assertEqual(self.newUser.lname,"Francine")
self.assertEqual(self.newUser.uname,"mfannick")
self.assertEqual(self.newUser.pword,"anny12") | 1 |
08faabd3ba56d960b2140da03e66eaae | 78ed4d2fd3e6324d8d9c7c3c82f6a2b0 | Get the mission time. | ItemMeta m = base.getItemMeta();
List<String> lore = m.getLore();
String timelore = lore.get(3).replace(ChatColor.BLUE+"", "");
return Long.parseLong(timelore);
} | 1 |
7036309398c23fcdec68993eb96c3ed0 | dbcf5502b80c07d474fa2497daac3420 | !
\brief Aloca memoria inicial das estruturas de chaves secundarias | self._qtd_chaves = int(0)
self._chaves = []
self._pos_pagina_maior_chave = int(0)
self._ponteiro_pai = int(0) | 0 |
f1bb173069ce1e052b3f999e8ca94820 | a091d97797ee0c61177cd662c403abce | Funcion que recibe el estado del juego y muestra las pistas de cada equipo en una pizarra | function showTeamSolutions(round) {
if (round > FIRST_ACTUAL_ROUND) {
for (var i = 1; i <= numPlayers+forceBots; i++) {
if (i != myid) {
if ((showTeamModulo > 0) && ((gameRound) % showTeamModulo == 0)) {
if (i <= numPlayers) {
drawTeamSolution(i, round-1, 0, tPaper[i], false);
... | 1 |
2b1bf818d381c39ce21f5304f8ea747a | 27e3150f2472f52f550b7a268fb0615c | Edge removal | {
QMapIterator<QString, int> iter( this->getEvolutionGraph()->getRemovedFiles() );
while ( iter.hasNext() ) {
iter.next();
bool debug = false;
if ( iter.key() == "" ) {
debug = true;
}
QStringList lList = iter.key().split( "/" );
QString lPom = "";
for ( int i = 0; i < lList.size(); i++ ) {
lPom +... | 1 |
675263f2bfd3be5de317e6479d2349e4 | 80c59d1e9f1d43bf856ba00de9c142a8 | OSS图片裁剪处理
文档参考:https://help.aliyun.com/document_detail/44693.html?spm=a2c4g.11186623.6.974.7NSxh5 | class UploadOSS():
def cutimg(self):
key = 'example.jpg'
new_pic = 'new-example.jpg'
process = "image/crop,w_100,h_100,x_100,y_100,r_1"
self.bucket.get_object_to_file(key, new_pic, process=process)
info = self.get_image_info(new_pic)
assert info[0] == 100
assert i... | 1 |
a9d92837f081393761581cc83f8406a4 | 09bef9da1b04fc6d590b616e2137a02c | Initiates the asynchronous execution of the CreateSbomExport operation. | namespace Amazon.Backup
IAsyncResult BeginCreateBackupSelection(CreateBackupSelectionRequest request, AsyncCallback callback, object state); | 0 |
61e4803de5638ee49ae7df43fb9b6f9e | 0783d5dcd09d8aa62b0068089e43e487 | Builds a title label. | if (titleLabel == null) {
titleLabel = new JLabel(adapter.getMessages().getString("ICL_IntellicutTitle"));
titleLabel.setIcon(intellicutIcon);
Font labelFont = getFont().deriveFont(Font.BOLD, getFont().getSize() + 4);
titleLabel.setFont(labelFont);
tit... | 1 |
a55427f55731ba45cf2a31203026f321 | 26be5c338d135d2c2fa02d5d14ec21ec | Filter the result of wp_lostpassword_url(). | class Tests_Functions_Anonymization extends WP_UnitTestCase
public function filter_wp_privacy_anonymize_data( $anonymous, $type, $data ) {
if ( 'url' === $type && 'example.com' === parse_url( $data, PHP_URL_HOST ) ) {
return 'http://local.host/why-this-was-removed';
}
return $anonymous;
} | 0 |
25e8eb708d8c31b6ff68c14eada4c8f1 | d8b754d107939ce3ab2632f0eead1860 | 点击预览图两边的小图,移动预览框 | function moveSmallImgs() {
var $as = $("#preview>h1>a");
var $backward = $as.first();
var $forward = $as.last();
var index = 1;
var offsetLeft = 0;
$forward.removeClass();
$forward.addClass('forward');
$forward.click(function () {
if(index == 3){
$forward.removeClass(... | 1 |
16740d729f20147983b4b7986ffc7274 | 45264a523f59fdaafbce98d0bf83aa7e | Sometimes Magento will include quotes in their strings.
If this is the case, we need to remove them to prevent double quoting strings. | {
if (
($value[0] === '"' && substr($value, -1) === '"')
|| ($value[0] === "'" && substr($value, -1) === "'")
) {
return substr($value, 1, -1);
}
return $value;
} | 1 |
f095e4e6a957844ec7923554759a15f0 | 6194f2f3b447f223aa61924aaf2aab30 | Runs read throughput tests. | self.contender_name = contender_name
self.rep = rep
run_in_child(self.populate, db_factory)
def write(n, sync):
return self.write_test(db_factory, n, sync)
def read(n, sync):
return self.read_test(db_factory, n, sync)
r = range(self.concurrency)
... | 1 |
4f65974a4a314c5ef73af231a099df27 | 2ec420291ac03980b7c116549587476e | <summary>
Handles key events for docking to borders. | namespace ScreenRuler
public partial class RulerForm : Form
private void dockKeyDown(KeyEventArgs e)
{
Screen screen = Screen.FromControl(this);
switch(e.KeyCode)
{
case Keys.Left:
this.Left = screen.WorkingArea.Left;
... | 1 |
9593a007ca18a19a184edf00d00904b4 | 072229fef71526d25194621f2e887d13 | represents an index into the constant pool array (actually just a uint16) | public final class ConstantClassInfo extends ConstantPoolInfo
public int getNameIndex() {
return nameIndex;
} | 1 |
1e62ebac360b18ed8fc96984b6075ca1 | e4db410f2aead1aabbff62e7e9e68297 | 根据用户id,生成其邀请码 | String generateCode(String userId); | 1 |
b5e5784f990c11131ab48dc52f9cb410 | 1edb99e8380f86535a11ccd55e343b49 | Get file name without extension only | def get_fname_noext(fname):
nodir = fname.split('/')[-1]
noext = '.'.join(nodir.split('.')[:-1])
return noext | 1 |
f26a417bc48eed9313ca4f9e1ddf03cc | f1e140530f65f2c63ef99a194f44db40 | Gets the service_version of this ClusterInstanceInfo.
The version of the service that the instance is running (eg Elasticsearch or Kibana), if available | public class Cluster extends AbstractModel{
public String getVersion() {
return this.Version;
} | 0 |
8f3cc73561b46ab52f1929263d901d13 | 79449f17229c9ac36af65093af9c149d | placement group dump of pools in json format | void dX_poolDump(DX_POOLCTX *ctx)
{
unsigned int idx = 0;
printf("blkUsed=%d\n", ctx->blkUsed);
while (idx < ctx->poolBlkNo) {
if (ctx->blkDesc[idx].numBlk) {
printf("blkDesc[%d]={numBlk=%d}\n", idx, ctx->blkDesc[idx].numBlk);
idx += ctx->blkDesc[idx].numBlk;
} else {... | 0 |
ae64c6ee4fb67cde86e516a336c8703e | 6bcdea54147e74182a70dcbb8f9cb97c | 跳转到企业介绍 | export class LayoutComponent implements OnInit
jumpExplain() {
this.router.navigate(['/explain']);
} | 0 |
e316d4639e50ef92b07f23f56cd6a3fe | 7fbcf906853bb638eafd0af548f40722 | Display a listing of the Rt. | class RapController extends Controller
public function index()
{
return response()->json(new RapCollection(Rap::all()));
} | 0 |
28d5a432a52e7f3aa2566ebf59d01404 | 1da9893cacf4780835fd1395aaadbfe8 | 将自己发送的位置转发到滑动右边字母导航栏定位查找的手机联系人时点击取消转发 | scp = SingleChatPage()
scp.wait_for_page_load()
Preconditions.send_pic_in_group_chat()
cwp = ChatWindowPage()
time.sleep(2)
cwp.press_and_move_right_file(type='.jpg')
time.sleep(3)
scp.click_accessibility_id_attribute_by_name("转发")
scg = SelectCont... | 1 |
fab00dd9dfcf8182fc87e4d41b29e58f | a24316c27490f0a69670e3f9c38ff962 | Function to receive the given encapsulated RNDIS response from the device. | uint8 *rsi_wrapper_to_rsp(uint8 *rsp, uint8 rsp_type)
{
uint8 *descPtr, *payloadPtr, *temp_payloadPtr;
uint8 ii, scanInfo_size;
rsi_wfdDevResponse wfdDevResp;
rsi_scanResponse scanRsp;
#if (RSI_POWER_MODE == RSI_POWER_MODE_3)
int16 retval = 0;
#endif
#if RSI_POWER_MODE
#ifdef RSI_DEBUG_PRINT
static uint8 sl... | 0 |
9b2b98928d3c78f62d64ce5996f83953 | b16f6b3214d420e86c5ad903e0248e09 | Сортировка книг по возрастанию (метод Шелла) | {
double gap = mas.Length;
bool swaps = true;
while (gap > 1 || swaps)
{
gap /= 1.247330950103979;
if (gap < 1) { gap = 1; }
int i = 0;
swaps = false;
while (i + gap < mas.Length)
... | 1 |
6e565f0c5284b7a3f6d39393c1497844 | adf4fb407a694e5a00141201cfd9ad88 | 数据处理:根据nodeId获取node 索引 | function getNodesIndex(nodeId,nodes) {
var index = 0;
for(var i = 0; i < nodes.length; i++){
var node = nodes[i];
if(nodeId == node.nodeId){
index = i;
break;
}
}
return index;
} | 1 |
60636205e29f8a3bc24a39d6f261fe76 | f3cdf0d48d0a3d45f3968cb98232c522 | Sets the last expanded tree paths. | ArrayList<TreePath> temp = new ArrayList<TreePath>();
for(int i = 0; i<paths.length; i++) {
temp.add(getTreePath(paths[i]));
}
TreePath[] treePaths = temp.toArray(new TreePath[0]);
setSelectionPaths(treePaths);
} | 0 |
fcbca58fe7ab6d4eac1b25548ad2e7d1 | 4688086240138cc7bf01e899508fa09d | 没有传递参数 | class TestClass
private function callNoParams(): string
{
return 'callNoParams';
} | 1 |
4558dafdab6f7f65c85486655f566291 | 0a675a0fcc854b34c56bcce4e284f45c | Generates initialization vector using TripleDES algorithm. | {
string temp = "E4ghj*Ghg7!rNIfb&95GUY86GfghUb#er57HBh(u%g6HJ($jhWk7&!hg4ui%$hjk";
symmetricAlgorithm.GenerateIV();
byte[] bytTemp = symmetricAlgorithm.IV;
int IVLength = bytTemp.Length;
if (temp.Length > IVLength)
temp = temp.Substrin... | 0 |
e4411c6bf1fdaacdb78489c22b328e47 | a620acb03166086911f506d036934a66 | 导出其他方案 | function goOtherResolvent(){
layer.open({
type: 1,
shade: 0.2,
title: ['其他更优解决方案', 'font-size:18px;text-align:left;'],
content: $('#otherResolvent'),
area: ['500px', '250px'],
scrollbar: false,
cancel: function(index){
layer.close(index);
... | 0 |
dbd8ee46b97a29d495a5e8ef0bd43b6a | 4ccfee30a408d3517646f5f25fee79aa | POST: Estados/Create | namespace ProyectoSelectos.Controllers
public class EstadoArticuloController : Controller
[HttpPost]
[ValidateAntiForgeryToken]
public ActionResult Crear([Bind(Include = "idArticulo, idPersona, fecha, descripcion,estado")] EstadoArticulo EstadoArticulo)
{
if (ModelState.IsValid)
... | 1 |
5f71e298b5f75b4f421e0569da282891 | 63a6fb1846057926f7da720b8900718f | 司机绑定车辆 | class Service extends Base
public function drive()
{
$param = $this->request->param();
if (request()->isPost()) {
$uid = $this->uid();
$param['member_id'] = $uid;
$param['order_number'] = date('Ymd') . $uid . str_pad(mt_rand(1, 99999), 5, '0', STR_PAD_LEFT);
... | 1 |
cdb3db151d720601c63c3e90cd839a52 | a5af0f44bdf84f21b2a6fb98d5fc78db | Deletes an existing SystemLabel model.
If deletion is successful, the browser will be redirected to the 'index' page. | {
$translation = \backend\models\Translation::findOne(['label_id' => $id]);
if (empty($translation)) {
$this->findModel($id)->delete();
\Yii::$app->getSession()->setFlash('success', 'System-label removed successfully.');
} else {
\Yii::$app->getSession()-... | 1 |
6423c9002091f2e4b63f2b3323d71b59 | 81f43b937a439b37ccbadc6509eb28f8 | Adding a new blocks category for Gutenberg Editor | class Gutenberg
private function registerHooks(): void
{
add_filter('block_categories', [$this, 'registerBlockCategory']);
} | 1 |
fb00a1d2bcb4be741c0489a0dca188ba | ac108561ce4c1a9ea9da63c4f6c659b9 | invoked when user clicks Save and uses drag drop to reorder items | $input = $form_state->getUserInput();
$bo_view_dom_id = $input["bo_view_dom_id"];
$response = new AjaxResponse();
$response->addCommand(new HtmlCommand('.tabledrag-changed-warning', ''));
\Drupal::messenger()->addMessage($this->t('Order has changed successfully'), 'status', TRUE);
$message = [
... | 1 |
ead0bb21c1be3d8ae63887bfe27a1e7b | 705f054a38d11693b7b44320ba2a2cc3 | Перенос товара из вишлиста в корзину | {
var itemSklad = SkladState.FirstOrDefault(o => o.id == item.id);
if (itemSklad == null)
{
item.id = SkladState.Count;
var data = JsonConvert.SerializeObject(item);
Split('C', data);
}
else
{... | 0 |
4748c4eb087fbf0150e457f2c3e9363e | 0daa08e0abb24080c2040a40125a02c7 | Обробка кількості коментарів користувача,
та в залежності від кількості надання користуачеві відзнаки | HelperResult RenderCommentCountSection(Post post, HttpContext context); | 0 |
a953ce52624b371a4249c9d8fe917e2c | 7f091cd652fc8001763377bc8a1b1632 | Returns an array of the button's properties and values.
An associative array of properties and values. | public class HackableButton : HackableColour
public override HackableProperty[] getPropeties()
{
HackableProperty[] properties = new HackableProperty[1];
properties [0] = colourProperty;
return properties;
} | 0 |
967687f8911c5abc06f6e0da23817951 | 3c55213b359df85bdfb6c0b73a1af202 | 优先使用Cache,使用前对比版本 | if(entity.getVersion().isSnapshot()) {
return true;
}
List<ServiceInfo> serviceInfos = getCacheServiceInfos();
if (!serviceInfos.isEmpty()) {
Optional<ServiceInfo> serviceInfo = serviceInfos
.stream()
.filter(s -> s.getServi... | 1 |
99a9aee83219f5e2a45e4a4abb9d4dd8 | d9422b296e556e1bb915e97ae00e107d | 获取长尾资讯信息 | let param = new NewsConfigModel();
param.baseUrl = GlobalConfig.getStafUrl();
param.page = page;
param.size = 3;
param.support_type = 1;
param.label = Util.NEWS_TUIGUANG;
param.region_code = this.webParam.region_code;
const model: NewsModel = await ConfigU... | 0 |
a806156e9624ecec270e12be0f5b5cd3 | 37fe03d01ec91027bceed1cda4036ac3 | Sets the position for the lives and scores | livesBox = new HBox();
livesBox.setPrefSize(180, 60);
livesBox.setStyle("-fx-background-color: #000000;");
livesBox.setTranslateX(700);
livesBox.setTranslateY(40);
livesBox.setAlignment(Pos.CENTER);
gamePane.getChildren().add(livesBox);
} | 1 |
a3d6e7d41b01eecccfd3536d1b96e855 | 212aa5efaad3e4c174704a0c42f5034b | Implements large margin arc distance.
Reference:
https://arxiv.org/pdf/1801.07698.pdf
https://github.com/lyakaap/Landmark2019-1st-and-3rd-Place-Solution/
blob/master/src/modeling/metric_learning.py | super(LDAMLoss, self).__init__(para_dict)
s = self.para_dict['cfg'].LOSS.LDAMLoss.SCALE
max_m = self.para_dict['cfg'].LOSS.LDAMLoss.MAX_MARGIN
self.max_m = max_m
m_list = 1.0 / np.sqrt(np.sqrt(self.num_class_list))
m_list = m_list * (max_m / np.max(m_list))
m_list... | 0 |
dd0f6f49b7ab3fe310b8366af944e843 | 1097acc019c9149c8c3c927f7941a6c0 | Ophalen van de medewerkers en routdokters werkzaam bij TOV. Deze lijst
wordt gebruikt bij het toewijzen van trajectverantwoordelijkheden. | $sql = "SELECT DISTINCT
Ridic.idRidic, prezdivka
FROM
RidiciVeSluzbe,
Ridic,
Jizda,
Stav,
Osoba
WHERE
RidiciVeSluzbe.idRidic = R... | 0 |
f1c3e05d57c50c30213560399244e1ba | 20558efddf988fb99aa973f159029617 | 缓存用户的音乐推荐数据 | def cache_user_recommend(user_id, user_recommend):
redis_user_recommend.hmset(user_id, user_recommend) | 1 |
5f0348b162a39f1a9c331ab70a6be111 | 41c51087bdd8c2b92213c951fd14e168 | 페이지번호 받아서 최신순 노래 리스트 가져오기 | namespace Rocket.BL.Common.Services.ReleaseList
MusicPageInfo GetNewPageInfoByDate(int pageSize, int pageNumber, int? genreId = null, string userId = null); | 1 |
1bd7db0004140f9d6d355aa876300df9 | 1434d47a6bf8ab52d0bc6c57fe558911 | Calculates robustifying weightings that penalise outliers
NCSS Cleveland, W. S. (1979) in his paper 'Robust Locally Weighted Regression and Smoothing Scatterplots'
https://ncss-wpengine.netdna-ssl.com/wp-content/themes/ncss/pdf/Procedures/NCSS/Robust_Regression.pdf | def critic_weighting(X):
criteria_type = np.ones(np.shape(X)[1])
x_norm = minmax_normalization(X, criteria_type)
std = np.std(x_norm, axis = 0)
n = np.shape(x_norm)[1]
correlations = np.zeros((n, n))
for i in range(0, n):
for j in range(0, n):
correlations[i, j], _ = pearsonr... | 0 |
ad5e94d31d1d0bf7f5410f134a9c803d | 61bef38f80970967712e2c75fb1454e9 | https://leetcode.com/problems/minimum-time-difference/ | public class Solution539
public static int findMinDifference(List<String> timePoints) {
if (timePoints.size() > 1440) {
return 0;
}
Collections.sort(timePoints);
double min = Integer.MAX_VALUE;
for (int i = 1; i < timePoints.size(); i++) {
min = Math.min(m... | 1 |
ef238b19210ef168d1546be1ce52f307 | e5a5f237d920c5b39f19245c3f6d8517 | Sets the client host of this audit event. | @JsonInclude(JsonInclude.Include.NON_NULL)
@JsonPropertyOrder({
"cpcode",
"downloadTime",
"uid",
"host",
"path"
})
public class Notification
@JsonProperty("host")
public void setHost(String host) {
this.host = host;
} | 1 |
38a223d324c38f609a42174ed1501daf | 320a9a049799f720e9e1a2a58b0952d0 | extract epub file contents to a workdir folder | CONTAINER='''\
<?xml version="1.0"?>
<container version="1.0" xmlns="urn:oasis:names:tc:opendocument:xmlns:container">
<rootfiles>
<rootfile full-path="{0}" media-type="application/oebps-package+xml"/>
</rootfiles>
</container>'''.format(OPF_FILE)
logging.info(u"Constructing EPUB file...")
... | 0 |
de64274b9d39310406720e321082f330 | 7e65db924beaf2cc0f9b35c5bde3b6a2 | 301 redirect to canonical slug. | def blog_slash(request):
return HTTPMovedPermanently(location=REDIR_TARGET_BASE) | 1 |
bfff1cfee8413341174fc79e7ab21429 | 0d4da2e473bd3a5a21129d75476adbcb | 获取冰箱信息 | Fridger findFridgerByFridgerId(int fridgerId); | 1 |
d8c9038af76fe83dc722bacb9e0fbe9e | 203fed1fa8db2185c007c071e08c469a | Return the list of databases | class Connection(base.List, base.Attr):
def databases(self):
return self._list(self.session, self._list_databases, lambda x: x['result']) | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.