query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
1a05903bdb3d8eb6f9fcfd1e7972e09c | d8783b43a36d4853e6967a7b1bd478d0 | Pull all testcases to the worker. | def pullTestFramework(args=None):
pullGCCSuite()
pullLLVMSuite()
pullNWCCSuite() | 1 |
d43b7978aabe04caa54e08ab19ea6bd9 | b9f3825053680c17d782a57b4cb7c132 | Create and return an integer counter. | def createCounter():
L = [0]
def counter():
L[0] += 1
return L[0]
return counter | 1 |
0f496a7137d58bec5b78faa558bb7d2c | 1dda33e3942d88569e9f39f1f966fbec | Dump an attribute of a FunctionInfo object. | {
std::cout << " name=\"" << f.encodingName(index) << "\" length=" << f.length(index);
switch (f.primitiveType(index))
{
case Ir::CHAR:
if (f.length(index) == 1)
{
std::cout << " type=CHAR value=\"" << (char)f.getUInt(index) << ... | 1 |
71c8f0ecf96800dd3e932cccd72ae1d9 | 3ee4ccae64c450c3ee363922148b8563 | В зависимости от тега траектории меняем материал | if (targetWaypoint != null) {
targetWaypoint.GetComponent<Renderer>().material = waypointMaterial;
}
if (currentItem != null) {
targetWaypoint = navigator.GetClosestWaypoint(currentItem.transform.position);
targetWaypoint.GetComponent<Renderer>().material = go... | 0 |
46aa451abeca5f509c2f1ab9dbbbadaf | b56888e5d42f22ef3034612d50e65673 | Method checks if name validation error is present | class Validator
hasErrors(name) {
return this.getErrors(name).length > 0;
} | 1 |
c471f677493ed340d84fe4108760cd2a | 873f41cc11da0d251670b77f3d2b7d22 | 用手机号登录, 其中mobilePhoneNumber和smsCode为必填字段 | function loginByMobile({ mobile, code }) {
return requestWithoutToken("/login/code", "post", { mobile, code });
} | 1 |
6cae773fd100bcb4c798efdc6e714289 | edd86ed98481592d19f3b787eada39b3 | Initiate connection on the logical channel.
o for PVC we just get channel configuration
o for SVCs place an X.25 call
>0 connection in progress
<0 failure | int prh_sdp_l2cap_connect_channel(t_bdaddr remote_address, u_int16 remote_psm)
{
#if PRH_L2CAP_AUTO_CONFIG==0
int ret;
waiting_for_configure=0x01;
waiting_to_configure=0x01;
ret=L2_Connect(remote_address,remote_psm);
if (ret!=BT_NOERROR && ret!=BT_PENDING)
{
waiting_for_configure=0x00;
waiting_to_configure... | 1 |
a4211a3b49535a41885a6df8bbe5c0e0 | 74b30367c0fd6da9858ddb5b2a32e28f | Draws the textures to the stage based on the chosen character, and based
on all of the selected DTs. | DrawBackgroundStars(0);
DrawPhotonResidue(1);
DrawDust(2);
DrawScoreGain(3);
if((currentTransAnimState >= (int)transTextStates.StaticBox && gameState == (int) State.TransmissionAnimation)
|| gameState == (int) State.Finished) {
DrawTransmissionStaticBox(5)... | 0 |
d0d062510f01629340b31431b1859ecc | ef56d3d56c923330bdb78b3d2f88e281 | 数据列名转属性名 | public class CodeGenerator
private String getPropByColName(String colName) {
String[] cs = colName.split("_");
String rs = "";
for (String str : cs) {
if (StringUtils.isEmpty(rs))
rs += WordUtils.uncapitalize(str);
else
rs += WordUtils.capitalize(str);
}
return rs;
} | 1 |
33213bbee8daaf369ce89519844f84d8 | 1ffd92053bdfe14a503938acee006c9e | первый обход в глубину для алгоритма Косарайю для подсчета времени выхода из вершин | {
time++;
u.d = time;
u.color = 1;
for (int i = 0; i < u.adjacencies.size(); i++)
{
if (vertices[u.adjacencies[i] - 1].color == 1)
{
isDAG = false;
cycle.push_back(u);
cycle.push_back(vertices[u.adjacencies[i] - 1]);
}
if (vertices[u.adjacencies[i] - 1].color == 0)
topVisit(verti... | 1 |
a1622e0bf7b4b437a37af4aa9b897ca3 | e42e898439919170675de098c1c14fc9 | Apply Pending Changes | {
foreach (var pendingChange in this.pendingChanges)
{
pendingChange();
}
this.pendingChanges.Clear();
foreach (var deleted in this.deletedObjects)
{
foreach (var entity in this.ResourceSetsStorage.SelectMany... | 1 |
0c2e360166bc2d0b0a2b278e8b78c98e | cfdcf02d94a660913da3c9babbf448e2 | Current revision id for the multi cluster app (string) | class GlobalDnsArgs:
def multi_cluster_app_id(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "multi_cluster_app_id") | 0 |
38f89b638bc47c0d19ffc6fe261bf0ad | 6d68850a5bef3dc86279e08c65ff40e1 | Cannot recurse into BadExpression | match e.kind {
ast::ExprKind::If(..)
| ast::ExprKind::Match(..)
| ast::ExprKind::Block(..)
| ast::ExprKind::While(..)
| ast::ExprKind::Loop(..)
| ast::ExprKind::ForLoop(..)
| ast::ExprKind::TryBlock(..) => false,
_ => true,
}
} | 1 |
23f0478fdc6f8836b897ac66eb478bb5 | 2bec28927d7f49de60cede710bbe0fcd | Open receipt window | Intent intent = new Intent(this, ReceiptImageViewActivity.class);
intent.putExtra(ReceiptImageViewActivity.ITEM_UUID, itemID);
startActivity(intent);
} | 1 |
2d5676add80d5bd3f431aaed2aaa7b4d | 25a998886a5b8702d3c5b75e291fda66 | 1 H <- D | static inline void ld_h_d(emu_state *restrict state, uint8_t data[] UNUSED)
{
REG_H(state) = REG_D(state);
state->wait = 4;
} | 1 |
3eab672b3d1953f1ab7f539bce06a230 | 16732c42d1e3a56da7625fd44ce766db | Adds a point at end of path | class Path(SimObject):
def add_point(self,pose):
self.points.append((pose.x,pose.y)) | 1 |
4f98baed3f4999bea075e0e287b0fa91 | bc663cb6dc851297fd5db2beb5836113 | Takes a string (sentence or paragraph)
Returns string with all words capitalized | class Translate(generics.CreateAPIView):
def capitalize(self, sentence):
sentence = sentence.strip()
sents = re.split('([.!?] *)', sentence)
cap_sent = ''
for s in sents:
if (len(s)):
cap_sent = cap_sent + s[0].capitalize() + s[1:]
return cap_sent | 0 |
25eee9f7fdc09644818b387011861a77 | 47798025d90367d73aa0c174aadbe378 | The address of the copy of the router table | public class ISPController extends Thread
public String getRouterAddress() {
return sessionData.routerAddress;
} | 0 |
22c65eebbcf72e1d7cc251e91e77323c | 36f24119cc2959a555fa56e5cb7a009d | 添加/移除消息映射 | function enablemsg(id,enabled)
local handler = MSG[id]
if handler then
if enabled then
handler.on = handler.backon
else
handler.backon = handler.on
handler.on = nil
end
end
end | 0 |
0db24d45742ea2bbe66f74800e3a1bb0 | 8100a77611f941cfe7218d5b8d199148 | Returns a list containing randomly selected items from an input list. | if not isinstance(list_a, list):
raise TypeError('The argument given is not of `list` type.')
if n < 0 or len(list_a) < n:
raise ValueError('The value of the given `n` is invalid.')
return random.sample(list_a, n) | 1 |
e726196e0729b751e41944fd0b2b514e | 530c28d0b7ad887e53be4a3f4da8a5eb | POST /bricks | check_policy(pecan.request.context, 'create')
try:
new_brick = pecan.request.dbapi.create_brick(brick.as_dict())
pecan.request.rpcapi.do_brick_deploy(pecan.request.context,
new_brick.uuid)
except Exception as e:
... | 1 |
29d63d51c98cf10db367d6ad6865d38d | ae45eb31b811ccc59a5ca6f7c47e05a9 | Create Direct2D factory. | SBOOL SCAPI SciterD2DFactory (IUnknown** ppf) { return SAPI()->SciterD2DFactory (ppf); } | 1 |
a012d595e6955e246a021de7e66816d9 | 008acb36fb274aa32c3cad35f0ec3fab | Tells the drone to hold its position | public class LinkamCI extends TemperatureBase
public void sendHold() {
logger.debug("Linkam sendHold() called");
arw.handleCommand("O");
} | 1 |
2b0993759a0a967411a8c39e5c7cc7e9 | 9004769499de6da04d0f79fca61e3d65 | Ritorna le coordinate in cui la pecora nera si trova. | res = []
for ficha in Fichas_Negras.sprites() + Fichas_Blancas.sprites():
res.append(ficha.get_pos())
return res | 0 |
31e099021e3db13ed3cb1cf4a9be5884 | 57c2fe881e14e61d864467bf366fe905 | Compute the light sampling weight, which 1/pdf | sigma_photon2 = np.maximum(noiseless_image, 0.)
w = sigma_det*sigma_det + sigma_photon2
if w.min() == 0:
w_min = (np.extract(sigma_photon2 > 0, sigma_photon2)).min()
w = np.where(w==0, w_min, w)
return (1./w) | 1 |
14b9185927cf9ebfced9e7b66827ddf8 | 052ef6b2e8699541a37c10e2ce20bed1 | Configuramos en el constructor del controlador la autenticación usando el Middleware auth.basic,
pero solamente para los métodos de crear, actualizar y borrar. | class Especie_Controller extends Controller
public function __construct() {
$this->middleware('auth', ['only' => 'index']);
} | 0 |
64b310a2050f0afcc14582e9f8e83f3e | 172cb1af62e3ebf499ccab878025f919 | Returns a dictionary of {componenetID: cost} | def price_total(component_dict):
total_sum = 0
for key in component_dict:
total_sum += component_dict[key]
total_sum = round(total_sum, 2)
return total_sum | 0 |
09c4d727e47d6465729c5e8aad7d1548 | 9305a0850ee85d3b09d3becba9e906bb | This method returns if password mismatch message is displayed | public class SignInPage extends BasePage
public boolean authenticationFailureMsgDisplayed(){
return authentication_failure.isDisplayed();
} | 0 |
a11ebda437f932b28377e04ea89fbe3f | fc91b3bbfb86a95253fa9fc6094a1918 | Changes category of item | function updateCat(itemId)
{
var parentId = $('#parentId_'+ itemId).val();
var newName = $('#itemName_'+ itemId).val();
var postDate = {itemId: itemId,parentId:parentId,newName:newName};
$.ajax({
type: 'POST',
async: false,
url: "/admin/updatecategory... | 1 |
1fb3f789a49f4b5098f95621222cc63a | 2fe5dc9cec5202532294709c6092ff7d | List the members requests to join the group. | function RequestGuildMembershipList() end | 1 |
3bff5d65a12e9b82c84496c37bd13cc7 | 72e6be8e2523bd8e0d3075f7f069dab4 | Modified Julian Date -> Gregorian Calendar Date | void LunarToGregorian()
{
} | 0 |
e96c329fb0bb6f18731ad11ba95face4 | 699a52cd008118c7954c2b75f03dd116 | 初期化されていない場合exceptionを投げる。 | AbstractFriio::assertInitialized() throw (not_ready_error)
{
if (!initialized) {
throw not_ready_error("not initialized.");
}
} | 1 |
d581b09044ad0c4d0236a38467d9e36e | a74a1592e28849adbbba94f98e018735 | Returns the TT Content | public function getTTl(); | 0 |
1fb064f174a60b7b8e1b2aeccffb4f8d | 39b22dc44892ff04ca3dccdc4c756c97 | 摇一摇详情页 | class LuckyFollow extends WebBase
public function luckyFollowDetail()
{
$this->assign('add_button', false);
$this->assign('del_button', false);
$this->assign('search_button', false);
$this->assign('check_all', false);
$grid['field'][0] = 'sports_name';
$grid['title'] ... | 1 |
853d5769ade48f0976109f4ca9aed772 | 220f77f6a6fad7b6e9ce9f30e35cff5f | 获取属性merBillNo的值 | public class FindPersonMemberBaseReturn implements Serializable
public String getMerchantNo() {
return merchantNo;
} | 0 |
fc7d5808335d6759050a2a7ee27de0a6 | 420791aeed21263b70a683b73d33239e | Takes time-series as an input and returns next raw, that is fed to the fitted model,
when predicting next value. | let trend = this.sample_predictive_trend(df, iteration);
let beta = this.params['beta'][iteration];
let seasonal = np.matmul(seasonal_features.as_matrix(), beta) * this.y_scale;
let sigma = this.params['sigma_obs'][iteration];
let noise = np.random.normal(0, sigma, df.shape[0]) *... | 0 |
8eb08a99bbf23771418ab1694dd3a2cd | 5350c1aec1bd8370a950be3aef7d7613 | 切换MT4帐号状态 | class RealAccountModel extends CI_Model{
public function updateMt4Account($mt4Account,$id)
{
$this->db->where('id',$id);
return $this->db->update('realaccount',array('mt4_account' => strval($mt4Account)));
} | 0 |
b9e9a4a2e4e26d22ba1f0a04f5c87ae5 | c6989e65a114b93fcbf4f5600ca0c4ec | Utworzenie nowego nagłówka faktury sprzedaży. | painter.setFont(HEADING_FONT)
doc = painter.device()
painter.drawText(doc.width() / 2 - 800, doc.height() / 14, "FAKTURA") | 1 |
aab157fa1457ebf8fb2ab4d3e89eea4e | 96715e9319fb21d5d4b701b01e727860 | 设置流水号 自增长ID | @Component
public class VersionDownService
public Long setSeq(){
Long length=Long.parseLong("0");
Seq seq=seqDao.findByName("VERSIONTASKSEQ");
if(seq!=null){
seq.setSeq(seq.getSeq()+1);
seqDao.merge(seq);
}else{
seq=new Seq();
seq.setName("VERSIONTASKSEQ");
seq.setSeq(Long.parseLong("0"));
se... | 1 |
28b3625c0fcf101254e8a772bef4a13c | f4fdd4231da3855cd2981d9445831720 | modbus configuration (default) : device ID, signed type of modbus's data-byte (True = signed-type byte) | void initModbus(ModbusMaster* node){
node->begin(9600);
node->writeSingleRegister(0, 0x0406);
Sleep(1000);
node->writeSingleRegister(0, 0x047F);
Sleep(1000);
} | 0 |
a2404bf5054dd06d0a7835bb24998c7c | dc00a8e144c405b241387389336ea4ab | # convertDate(Date) returns the Season in which the Date falls falls based on the above variables | foreach (Session::get("season_dates") as $season => $season_data){
if($date >= $season_data["start_date"] && $date < $season_data["end_date"]){
return $season;
break;
}
}
} | 1 |
efd9fa9668058edf6506a4ee77fcb198 | 735f8eb2cce7a30059fde90a87636c76 | \brief Timer4 PWM & Emergency malfunction IRQ handler | void TIM4_IRQHandler(void)
{
HAL_TIM_IRQHandler(&TIM4_Handler);
} | 1 |
f09f1a88407ebff73b1d0985734cb978 | 5eba6ca1550e5c9e39f5d8248efd2e41 | Ensure we can create an Authority object | class TestMajaSentinel2L1Angles(MajaTestCase):
def test_object(self):
self.maja_oject = MajaL1Angles(self.root, self.nss)
self.assertIsNotNone(self.maja_oject) | 0 |
9dc4823d2eb9f21bfcff9d9928920910 | 8aa2e8999e95a14300982380a79efbe8 | Setter for <code>nfl_plays.player.broad</code>. | public class StarDetail
public void setBf(String bf) {
this.bf = bf;
} | 0 |
5cece63da5c7d5f006e426abeca139f8 | e0666994419c12b2cc294a51933c214b | Определим, есть ли свободные каналы для совершения звонков | {
int count;
req = "SELECT COUNT(*) FROM pocyks WHERE callsRemain>0 AND active=1;";
if (debug)
{ cout << req << endl; }
rc = sqlite3_exec(db, req.data(), countCallback, &count, &zErrMsg);
check();
return count > 0;
} | 1 |
052bb02f2d4136f032c8d748979304e5 | ca5d9e15dc97865110a9f11d02c99915 | new 1d idct | class DCT:
def idct2(self,c):
return np.sum((c.reshape(N,N,1)*self.phi_2d.reshape(N,N,N*N)).reshape(N*N,N*N),axis=0).reshape(N,N) | 0 |
3e524f40a026329a309482c0b1326456 | f567f149fa311f4536509cc7ea3e2d38 | 根据Id将某一个memberMission的状态改为已完成
成功则返回true,失败返回false | public class MyMissions
public void SetFinishMission(int id)
{
MissionInst inst = FindMission(id);
if (inst != null)
{
inst.m_isFinished = true;
}
} | 0 |
2f6a5107b9b36b8fd0cf12f5985e681e | 048cd2953ddabfd070c364db6c88d235 | добавление отвеченного вопроса в профиль пользователя | @Modifying
@Transactional
@Query(value = "INSERT INTO user_questions_upvoted (user_id, questions_upvoted_id) "
+ "VALUES (?1, ?2)", nativeQuery = true)
void addUpvotedQuestion(Long userId, Long questionId); | 0 |
d2235dc4df99f0ca106638bbbafaf724 | 699c425197d37187e5efe3f7bc8a5088 | write webpage data to csv file | class Commons:
def write_webpage_content_tofile(self, content, path):
file_out = open(path ,"w")
file_out.write(str(content))
file_out.close() | 0 |
9b081335e2ded8b9a3723359bab8b913 | bd16fa7faed1c4c32da659b238b6caba | Returns the collection of paths from the source node to any of the target nodes (if such exists). If there is no path
between them, an empty collection is returned. | namespace Mortician.Core.ClrMdAbstractions
IList<IClrObject> FindSinglePath(ulong source, ulong target, CancellationToken cancelToken); | 0 |
023c4efdbe5ba8a7f671c7d79923ee2d | 991381841398b92d0c2a63cc6a359f01 | [Documentation](https://wow.gamepedia.com/API_GetRewardNumSkillUps) | function GetRewardNumSkillUps() end | 1 |
c1803c9642803cf2e331782f1cb26e14 | de8b00ac448e683d771e2ed58024cf1c | 字符转莫尔斯电码 | length := len(str)
if length == 0{
return "", errors.New("length must > 1")
}
values := make([]string, 0)
for _, v := range str{
if value, ok := morseMap[byte(v)]; ok{
values = append(values, value)
}
}
result := strings.Join(values, "")
return result, nil
} | 1 |
22178972c42a92c5c3f784145b7ce1ea | 73023575ca26e47d2ac242cd1cfcf506 | 使用缓冲流实现读取操作 | Reader reader = null;
Writer writer = null;
try {
reader = new FileReader("d:/linkList - 副本.txt");
writer = new FileWriter("d:/linkList - 副本.txt", true);
writer.write("字符流缓冲前");
writer.flush();
writer.write("字符流缓冲后\n");
wr... | 0 |
07c1d1ee5d5e1c825ab3b4511460f611 | c48873008e8fd5f3cdec7145aa0d2648 | Get the generic mapping for a firewall object. | export default class Firewalls extends BaseModule
public getById(firewallId: string): Promise<any> {
return this._execute({
actionPath: `${this.basePath}/${encodeURIComponent(firewallId)}`,
});
} | 0 |
24f83aeee926f9405923f21ad33ab102 | 3fc8ed2aebf6f9fabd458bfa54d2707e | Convert coordinates from 2d array (i,j) into spatial coordinates (x,y). | class Raster:
def ij2xy(self, i: ArrayLike, j: ArrayLike, offset: str = "ul") -> tuple[np.ndarray, np.ndarray]:
x, y = rio.transform.xy(self.transform, i, j, offset=offset)
return x, y | 1 |
a711baba5c44e7c3b441931815f218b2 | 5bef34126842c3c8c1d7b5652aa36f59 | Get exclusive access to a file and apply a function. | namespace GSF.IO
public class OutageLog : IProvideStatus, IDisposable
private T GetFileLock<T>(Func<string, T> lockFunction)
{
return FilePath.GetFileLock(m_fileName, lockFunction);
} | 1 |
7f98d088faa1e71b065b4fbb5e621e1a | 2effe922a5ffbe9cdaac0dfe6bab2b32 | AD7606数据采样 | {
double[] md = new double[64];
for (int j = 0; j < 64; j++) md[j] = double.Parse(Function.GetConfigStr(Data.ADconfigPath, "add", "AD_Channel_" + j.ToString(), "value"));
while (_BoxIsStarted)
{
bool ret = Func_AD.Return_ADValue(ref ADList, ref dat... | 1 |
bcd963c3c4f4bda32291b5e5b368a30a | 4caa79e2df3eedab1b7490b238289339 | Gets the request URL from the JSON description object | public class AgRequestParameters
public URL getURL()
{
return m_URL;
} | 0 |
3fcb71a6d38b595610247752f9aabf42 | e20bb255cbb80eb799cf0f5ea797f030 | Phương thức lấy danh sách phiếu thu theo mã sinh viên | {
ObservableCollection<PHIEUXUATHANG> list = new ObservableCollection<PHIEUXUATHANG>();
using (QLDLDataContext db = new QLDLDataContext())
{
var query = (from records in db.PHIEUXUATHANGs
where records.MADL == maDL
... | 0 |
82148a1f250e468e66a980d187766dde | 52b5c00809295d1652a16a18c827f681 | Returns how long it took to complete all tasks, and the order in which they were finished. | class Day7:
def __init__(self, filename="input/2018/day_7.txt", team=5, task_time=60):
self.filename = filename
res = self.steps_ordered()
print("CHALLENGE 2018.7.1: "+str(res))
res = self.steps_time(team, task_time)
print("CHALLENGE 2018.7.2: "+str(res)) | 1 |
39aad26588fcfdb511206265b06d8c55 | 3fdb5fc2778afa63758d807d88839e86 | 得到某一类型小说的总阅览量 | class DouBanSpider():
def get_total(self,typ):
url='https://movie.douban.com/j/chart/top_list_count?type={}&interval_id=100%3A90'.format(typ)
ua=UserAgent()
html=requests.get(url=url,headers={'User-Agent':ua.random}).json()
total=html['total']
return total | 0 |
2085958033f7c40d09239beec2327f6a | fe32abcdcbdaf1f20067755be3dc852a | judge which ash can was touched according to the given position | pos.z = 0;
GameObject clone = Instantiate(touch, pos, Quaternion.identity);
Color c = Color.yellow;
if (pos.y <= -4.5f || pos.y >= -2.95f || pos.x <= -2.9f || pos.x >= 2.9f )
c = Color.red;
if (pos.y > -4.5f || pos.y < -2.95f) {
if(pos.x >= -1.55f && pos.x <= -1.45f)
c = Color.red;
if(pos.x >= -... | 1 |
c815a9fab434b0f296404f845354bb75 | c75aeb4704f5cd6b8e9ef38c50f27f6e | Тестирование преобразования тернарного оператора выбора. | bool result;
result = False("A") || False("B") && False("C");
result = True("A") || False("B") && False("C");
std::cout << result << " :=====================" << std::endl;
} | 0 |
d51678c46d38fb73e7221e03281ca703 | bc595a6b4273fb2b26eacf9096b66b0c | Checks if all points X sit in a plane. | def points_coplanar?(points)
end | 1 |
20410af80ef00b0e3233f77cd25e6a7e | 35ca2ecd6c558387113b7e84fe924a24 | 立方数判定 | {
if (num == 2 || num == 3)
return 1;
if (num % 6 != 1 && num % 6 != 5)
return 0;
int tmp = sqrt(num);
for (int i = 5; i <= tmp; i += 6)
if (num % i == 0 || num % (i + 2) == 0)
return 0;
return 1;
} | 0 |
fabecc9e5d27a682f8ff14224b821c97 | 1dc72691b0799cac35356db26eec3224 | 加载底部菜单html | function loadmenu() {
$.post('GetFootMenus', {}, function (d) {
if (d.status == "0") {
showmenu(d);
var menuhtml = "";
$('#ulmenu li').remove();
$("#content").html("");
$('#tabpane').remove();
var b = 0;
var menuid = 0;
... | 1 |
7e619d4f08804fe18976148ec1abc2d7 | cc1e36b249f1a7b03af4c322c366db54 | Retorna la tolerancia para el reconocimiento de actividad. | uint16_t GestionADXL362::getActivityThreshold(void){
return genericRead16(ADXL362_REG_THRESH_ACT_L);
} | 1 |
252f5f505187b9cb9f33c06d718a9073 | 232360b251b724fe05624558007db245 | Invalid argument | class InvalidArg(ConfigError):
def __init__(self, msg=None):
self.msg = msg or '' | 1 |
945e765af0816cdaf7dffeaaceecd3e3 | 8096e3bd55a86bc6e8f52e189dd99728 | 提交销售上报 | toReport() {
wx.navigateTo({
url: '../saleReport/saleReport'
});
} | 0 |
3761155d584543ef8f74344c4c293817 | ffc3f6f76b906ed1dfd2eba4b98819a4 | 删除至回收站 | class GoodsController extends Controller
public function recyd($id)
{
$res = Goods::onlyTrashed()->where('id', $id)->forceDelete();
if($res){
return redirect('/admin/goods');
} else {
return back();
}
} | 0 |
cd3e47f7c6917e16b38ba42ebd39280f | 889149150c394ee19c5d6f70b2c285f4 | Sets the institutional threshold. | public class MetricsDTO
public void setInstitutionalThreshold(String institutionalThreshold) {
this.institutionalThreshold = institutionalThreshold;
} | 1 |
9fb75ecc4063f250d86f3a037002ba56 | 2a071f09ea07ed488ad0693e5270523f | Returns the song name that is currently playing on Spotify | public class Songrating
public synchronized static String getCurrentSongname(String user){
JsonNode rootNode = executeHttpGet(new HttpGet("http://ws.audioscrobbler.com/2.0/?method=user.getrecenttracks&user=" + user +"&api_key=c163e88e2f4c297187fdac4c293862f1&limit=1&format=json"));
return rootNode.path("recenttrack... | 0 |
2e369b9bf78b370abc78f1a38f9305e2 | 10ea5c5c100a54d1e93451db4a0b4dfa | 针对保险数据QA数据集设计的读取函数 | def read_testing_Data():
os.chdir('E:\\硕士课题\\近期任务5\\日尺度预测\\数据')
PG_S_data=pd.read_excel('Salinity_日均盐度.xlsx', 'PG').set_index('Time')
MK_F_data=pd.read_excel('Sixianjiao Flow_1.xlsx', 'Makou2').set_index('Time')
SS_F_data=pd.read_excel('Sixianjiao Flow_1.xlsx', 'Sanshui2').set_index('Time')
HL_data=pd.read_excel('... | 0 |
f544fd98696dd46a74f49e1ffc3f0b15 | 6b816de40ce79b2e18809553cfc8b2bb | 根据诗人进行诗词采集 | def poemGet(keyword):
body['text'] = keyword
url = 'https://aip.baidubce.com/rpc/2.0/nlp/v1/poem' + '?access_token=' + token
param = json.dumps(body).encode('utf-8')
try:
result = requests.post(url=url, headers=headers, data=param)
print(result.json()['poem'][0]['title'])
conte... | 0 |
a2cf12e2e7bc91475e5810a884f085f9 | 16e85f50dbd5e4742f12ec5414b1ad33 | сокрытие полей регистрации | for (let el of document.querySelectorAll('.md-form')) {
el.style.marginTop = '3.0rem';
}
this.modalTitle.innerText = 'Регистрация';
document.querySelector('.modal-login .modal-body').style.display = 'block'; ... | 0 |
ecc7241b15837c4a5ee6bd7794626d56 | 25172ec151895edc67c637d4e368fc1d | Get the resource links from resource of specific type to a resource. | public Collection getFromResourceLinks(String fromType, String toType, Long toUID)
throws FindEntityException, SystemException, RemoteException; | 1 |
4a5e06994d3aaee544ad1d42b88fd446 | 9a7e6d04f028de5cd43ee9934423f357 | Update page with new page contents | def overwriteContent(url, new_HTML):
payload = setupPayloadObject(getPageID(url), new_HTML)
submitUpdate(payload) | 1 |
07656c57a05f4cd950226d8a215fd5c7 | 7eb05b5878e9306197280f70e48b8be4 | Crear una nueva tupla con los elementos que son mayores a 5 | listaAux = []
for elemento in tupla:
if (elemento > 5):
listaAux.append (elemento)
return ( tuple (listaAux) ) | 1 |
df644c70446f3c683c17b696ab902516 | a02a02216df33d1d647d2dc2494bb499 | The parent looks at the children. If the eldest child
is bigger than the parent, switch values in the tree.
Do this until parent is bigger than eldest child. | int left = (2*parent) + 1;
int right = (2*parent) + 2;
while( left < n ) {
int val = -1;
boolean rightExists = right < n;
if(rightExists && ary[left] > ary[right] && ary[left] > ary[parent])
val = left;
else if(rightExists && right < n && ary[left] <= ary[right] && ary[right] > ary[parent])
va... | 1 |
14daefeea584423050b382babac9aac3 | 5ae3798344ccd9d9d933141469df5f1e | 创建输入文本框一 | function createInput(parentId){
count++;
rcount++;
var str = '<div name="div" ><font style="font-size:12px;">附件</font>'+
' '+ '<input type="file" contentEditable="false" id="uploads' + count + '' +
'" name="uploads'+ count +'" value="" style="width: 220px"/><input type="button" value="删除" ... | 0 |
03c1f9a0961afa8773d7787f92c871a6 | 8b695ce3a76a4e741aac1f375cd53625 | 初始化包含total的内部商家C2C交易手续费统计数据 | public class AdminCC
public static void initCache() {
initCache(0);
} | 0 |
88a1cbd7fcf0526ef0310ed7ae47db7c | 8c84e70a993f17aa846e47e4520e2810 | Creates a new high-level SQS response object | class Services_Amazon_SQS_Response
public function __construct(HTTP_Request2_Response $httpResponse)
{
$this->_httpResponse = $httpResponse;
} | 1 |
ad3da65bad784596f521439440204ad1 | 9942edd5c9a701c634192271fc4aca48 | 矩形の塗りつぶし描画. | public class GcUtils
public static void drawRectangle(GC gc, float[] rectangle, boolean fill) {
drawRectangle(gc, rectangle[0], rectangle[1], rectangle[2], rectangle[3], fill);
} | 1 |
d7379dc28b7c2d977dfcc956314be554 | 6fa18182de2ecc5465c87397f61801d6 | 初始化单选下拉框 | public ResponseData<List<Select>> initSelect(HttpServletRequest request) {
ResponseData<List<Select>> responseData = null;
try {
List<Select> selectList = new ArrayList<Select>();
for (int i = 0; i < 5; i++) {
Select select = new Select();
sele... | 1 |
a25bacc9cda335f608c14a33706a5be1 | ceea107493e4aff1320e3cb243658678 | Returns the truststore type. | abstract class KeystoreLocationImp implements KeystoreLocation
public String getKeyStoreType() {
return keyStoreType;
} | 0 |
adb04265ab8d0aac0cfccec486ba18e9 | d16883759cb60f89d4180eb0230904f5 | Wait until the core Service got connected to the API. | from .core import Core
logging.debug('Waiting for core')
while True:
with self.state_lock:
if self.state == self.STATE_READY:
return Core.get_instance()
if self.state == self.STATE_FAILED:
raise RuntimeError('Cor... | 1 |
92a0e564906c2e1ee6642ac7c5d412cb | 9ad4ef3691f9f348eb358984da86f4c1 | Получен ли access_token | class Application_Model_FacebookApi
public function hasAccessToken()
{
return !empty($this->access_token);
} | 1 |
7758a4c8705fba9aba0c14cd301ddad8 | df45ebaabf69541b5760cdc6f3edac1f | For file system storage, all newlines are replaced with OS-appropriate | class midcom_helper_datamanager_type_text extends midcom_helper_datamanager_type_baseclass
public function convert_to_storage()
{
$this->value = preg_replace("/\n\r|\r\n|\r/", "\n", $this->value);
return $this->value;
} | 0 |
6f363a81fc25289fd81bea5d5896d593 | 5cc9df2f3f509492212090ed2fc8e38f | Makes sure the game doesn't run too fast | public class PlayerInformation : MonoBehaviour
void Start () {
Screen.sleepTimeout = SleepTimeout.NeverSleep;
} | 0 |
fe39ccc00005d5d243035095a685da63 | 4da059b282dfd77fe3f1c0ed5109dd6b | Maps an object from domain space into proxy space. | {
object target = CreateProxy(@object.GetType());
var handler = DynamicHelper.CreateDynamicMapHandler(@object.GetType(), target.GetType());
handler(@object, target);
((IEntityObject)target).Reset();
return target;
} | 1 |
f882d3f19c93a4f0365280d58e1ad58b | c7960e451cda3f88289fea42e6526d8e | Updates the horse variables in a race | public class HorseRacingAssignment
private static int[] playerOnHorse(int[] playerOnHorse, int playerNumber, int horseNumber) {
playerOnHorse[playerNumber] = horseNumber;
return playerOnHorse;
} | 1 |
f6bfec6253ad4dd79b127569a514a4c9 | 524c93e536b4678c2babd8d2f94ebe9a | Return checkout config value by key and store | class Allopass_Hipay_Model_Config extends Varien_Object
public function setConfigData($key, $value, $storeId = null, $scope = 'default')
{
return Mage::getConfig()->saveConfig('hipay/hipay_api/' . $key, $value, $scope, $storeId);
} | 0 |
35fb4dd59af0ee8d02b7901b4a5207cb | ccbcb6700ab53782d0ea337b30510d9a | Toggle watching list item | export class UserTowatchComponent implements OnInit
toggleToWatchMovie(movieId: any, movieTitle: any): void {
this.fetchApiData.getToWatch(this.username).subscribe((resp: any) => {
const toWatchMovies = resp.toWatchMovies;
if (toWatchMovies.includes(movieId)) {
this.fetchApiData
.remov... | 1 |
07be15e37adea7bc27408f8ef486182b | 93f0c89801e7d63cd85852d6c25925b6 | Gets the "isDisplay" element | Boolean isVisible = (Boolean) getValue(PROPERTY_ISVISIBLE);
if (isVisible != null)
return isVisible.booleanValue();
return false;
} | 0 |
a917bf42b0ce9c10b437b7ffadf3afde | 82fd3840574bf47d5d53190bbbb1874d | Sets the value of the "range" attribute of this SedRepeatedTask. | SedRepeatedTask::unsetRangeId()
{
mRange.erase();
if (mRange.empty() == true)
{
return LIBSEDML_OPERATION_SUCCESS;
}
else
{
return LIBSEDML_OPERATION_FAILED;
}
} | 0 |
6e6302cd40d32a34352833328b7d1686 | cf02904ce06cede9f61a508fcb5f6efa | @brief This command is issued by the ZNP device when it responds to a bind request from a
remote device. | ZdoEndDeviceBindReq * pMsg)
{
int i;
uint8 status;
zAddrType_t dstAddr;
cId_t *inList = NULL;
cId_t *outList = NULL;
dstAddr.addrMode = Addr16Bit;
dstAddr.addr.shortAddr = pMsg->dstaddr;
if (pMsg->n_inputclusters)
{
inList = (cId_t *) malloc (sizeof (cId_t) * pMsg->n_inputclusters);
if (inList)
... | 1 |
d3c768af32c5e4c21effe5b64a06e860 | 39a08e2d61d1870b2449745beec43c39 | Get the Catalog version | kwargs['_return_http_data_only'] = True
if kwargs.get('async'):
return self.get_catalog_versions_with_http_info(api_key, api_secret, **kwargs)
else:
(data) = self.get_catalog_versions_with_http_info(api_key, api_secret, **kwargs)
return data | 1 |
4f5231b20a7841b44a4427761d18bfc0 | 1991e7e0fea68470d20719bbb2034579 | redirected URL handler after logging in | function asm_redirect_after_logout(){
wp_redirect( '/' );
exit();
} | 0 |
3a015b9998f8eef19748e735d5aeaf11 | f133c714a59b623730380524fdb47183 | forward transforms a column with the DWT | void forward_dct(double *source_image, double *output_image_dct)
{
unsigned int block_rows, block_columns;
unsigned int r, c, i, j;
int block[4][4];
int block_core_transformed[4][4], block_transformed[4][4];
block_rows = rows >> 2;
block_columns = columns >> 2;
for(r = 0; r < block_rows; r++) {
for(c ... | 0 |
66cb3a06206b10c9fce171898ed517bf | 631c3585f4a33c86fd6c2af448cbf313 | Sets the inputs of this StudyTypeDefinition. | if (studySource == null) {
this.studySource = "";
} else {
this.studySource = studySource.getCode();
}
} | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.