query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
2fac32ec581a467fe9d88e40316fc6fa | 91eb757dbfbe9077ce3711a836744be3 | Get all URL components | class UrlParserTest extends TestCase
public function testComponents() : void
{
$parser = new UrlParser(self::_VALID_FULL_URL);
$this->assertEquals(self::_VALID_FULL_URL_COMPONENTS[PHP_URL_SCHEME], $parser->getScheme(), 'Invalid scheme');
$this->assertEquals(self::_VALID_FULL_... | 1 |
753dc0deef1063aa383eecadec7cbc10 | b97b206ccf2c92f21f0d861a4cf55288 | Send a localised text message to all clients without the server login. The parameter is an array of structures {Lang='??', Text='...'}. If no matching language is found, the last text in the array is used. Only available to Admin. | {
if( m_AdminGame)
m_AdminGame->SendAllChat( m_Language->GetLang( "lang_0105", bnet->GetServer( ) ) );
if( m_CurrentGame )
m_CurrentGame->SendAllChat( m_Language->GetLang( "lang_0105", bnet->GetServer( ) ) );
} | 0 |
f11732b678e269f9f9a1c180f5dc72e8 | 8a9a02e191dee852b37d277463d05432 | Henter tiden oppgaven tar. | public class Job
public int getTime() {
return time;
} | 1 |
93ac49b75193e7c46bc89bf0559fcceb | c1318278cf09cc6781343230c0c37090 | 使用switch完成:模拟计算器操作:输入第一个整数,输入第二个整数,输入运算符(+-*/),打印结果 | int main(int argc, const char * argv[]) {
printf("请输入表达式\n");
double value1, value2, result;
char op;
scanf("%lf%c%lf", &value1, &op, &value2);
if (op == '+') {
result = value1 + value2;
} else if (op == '-') {
result = value1 - value2;
} else if (op == '*') {
result ... | 0 |
d0c48085fe3ccb67a6c20d3dd9b0dc02 | 8a3c0a49d3543c2bb9226c21a179408c | Gets a value indicating whether a specified annotation value is valid. | $className = is_object($className) ? get_class($className) : $className;
$tags = $this->reflectionService->getPropertyTagsValues($className, $propertyName);
$annotationValues = $tags[$annotation];
if ($annotationValues !== NULL && (in_array($value, $annotationValues) || $value === TRUE)) {
return TRUE;
}
... | 1 |
ecd0094c1726cb58c794e4098a04a6ed | 7bdf6a9c655eb5c57be4021fd9ae74e8 | eventからpageX/Yを適切に取って返す | function getPageXY(event){
var event = event || window.event;
return {
pageX : event.pageX || event.clientX + document.documentElement.scrollLeft,
pageY : event.pageY || event.clientY + document.documentElement.scrollTop
};
} | 1 |
aceb00e09198ddded26c43577bbe8bd6 | 8502791b910e9e8012ba49f53d60c29e | Calls the notifications manager to handle turning on/off notifications
depending on the status chosen by the user | boolean notificationAvailable = false;
if(notificationQueue.size() > 0) notificationAvailable = true;
if(notificationDisplayed) {
boolean currentNotificationStatus = checkCurrentNotification();
if(!currentNotificationStatus && notificationAvailable) displayNextNotificatio... | 0 |
c2f74a622f219a1641daf9fdc59d8358 | 8762b89c50f4fab61948de0768521e63 | apply committed log entries to message queue | std::vector<OplogEntry>::const_iterator begin,
std::vector<OplogEntry>::const_iterator end) {
OplogBuffer::Batch batch;
for (auto i = begin; i != end; ++i) {
batch.push_back(i->getEntry().getRaw());
}
enqueue(opCtx, batch.cbegin(), batch.cend... | 1 |
f49cb3b44a9d75aafb990a2c772b7782 | 6f8cff15ff3314b97bde2392332fc117 | draws a texture mapped sphere | function drawSphere(){
gl.bindBuffer(gl.ARRAY_BUFFER, sphereVertexPositionBuffer);
gl.vertexAttribPointer(shaderProgram.vertexPositionAttribute, sphereVertexPositionBuffer.itemSize,
gl.FLOAT, false, 0, 0);
gl.bindBuffer(gl.ARRAY_BUFFER, sphereVertexNormalBuffer);
gl.vertexAttribPointer... | 1 |
af3b37bbd3c5090af5d8bc50d3c20832 | fe07989f32d86692b5381850b2bb884a | POST /test_type_versions | class Api::V1::TypesController
def create
if @current_user.is_admin?
@type = Type.new(type_params)
if @type.save
render json: @type, status: :created
else
render json: {errors: @type.errors}, status: :unprocessable_entity
end
else
render json: {errors:'You are not a... | 0 |
903d836149d1e2eb46a5713b68729a66 | 60f209b562ebe5df1c221f97e3441d17 | змінна, що визначає чи поставили мінус | bool CheckMinus(char first) {
return first == 45;
} | 1 |
5ea96700fc711d1971bdc756db89c9f5 | de2f5ecc6b94034dce16e21ec3376b26 | Show some initialisation statistics | #ifdef DEBUG
llvm::errs() << "[fileSize:" << fileSize << "]" << "\n";
llvm::errs() << "[#params:" << numberParams.size() << "]" << "\n";
llvm::errs() << "[#fcts:" << numFunctions << "]" << "\n";
llvm::errs() << "[#branchingfactor size:" << branchingfactor.size() << "]" << "\n";
#endif
... | 1 |
7532d61cc779567d25d4e305f1da48af | c9cd6ab2a893acae27f5f424d19c86bd | Creates a new MapServer instance | export class MapEngine
constructor(width?: number, height?: number, srs?: string, scales?: Array<number>) {
this.width = width || 256;
this.height = height || 256;
this.srs = new Srs(srs || 'EPSG:3857');
this.groups = new Array<LayerGroup>();
this.scales = new Array<number>();
... | 0 |
d7f4785895e011a24cdaee220a24922e | b6abf848a16fc3327505b05db44ad8da | Replenishes power bar | {
for (int i = 0; i < 12; i++)
{
popUP_powerBank(i + 1);
}
} | 0 |
806202eacc38b1924be3af818ad0d535 | 12e119c8ce64fbe7cb0fa03cdd5b2a66 | Moves the enumerator to the previous element of the hashtable's list. | unchecked {
uint size = this.MultiHashtable.size;
uint currentIndex = this.CurrentIndex + 1;
if (currentIndex >= size) {
return false;
}
KeyValuePair[] keyValueTable = this.MultiHashtable.keyValueTable;
while (currentIndex < size && keyValu... | 0 |
9a0ebc23f81d93167c2fa7e15e4b07ad | f23e6afcac443ae9588e086c50af3842 | 获取本地视频列表 | class video_exam
public function getLocalVideoList()
{
return $this->files->listDir('files/attach/videos');
} | 1 |
9114cb593b3db3f7ce121ba42a1d3705 | 74f735bf222266d86ec660be039a890c | Test API cannot delete flight for regular user (DELETE request) | $payload = array();
$payload['username'] = "Redrama";
$payload['visitReason'] = "Some Reason";
$payload['startDateTime'] = "2018-09-20T23:06";
$payload['endDateTime'] = "2018-09-20T23:07";
$request_create_user = $this->client->post('/api.php', ['form_params' => $payload]... | 0 |
b74ecc70d4ab76e188b679626f806fcc | c0bb643f2357f13a765c607ee647b8a0 | method to check if Deuce rule is activated | class Match(models.Model):
def get_deuce_status(self):
if self.player_one_score==self.player_two_score and self.player_one_score >= 2:
return True
else:
return False | 1 |
e0da626a6fd06d8436a3dccba06f8011 | c650f61d912f8492a7a022e95385351b | 让目的地为当前位置的乘客出电梯,更新吞吐量 | {
foreach (Floor f in listOfFloors.Where(x => x.GetFloorNumber() == _currentFloor).Take(1))
{
foreach (Person p in GetCurrentPassagers().ToList())
{
if (p.End_floor == f.GetFloorNumber())
{
cu... | 1 |
3b9e45b90777b4b71b4eda0a218fe58d | 0bbfb8cb6aada39eca25293e186eae49 | set the size of the document | @XmlRootElement
public class Document extends SpacedItem
public Document setSize(long size) {
this.size = size;
return this;
} | 1 |
80afef6ea1bcec55d08c7c648e6e2038 | 04781b1ca885bf6467d623847f327141 | # Nettoie les données manquantes en remplaçant par les modes ou médiandes les plus fréquentes | for var in vars_with_na:
mode_val = data[var].mode()[0]
data[var] = data[var].fillna(mode_val)
return data | 1 |
5af0c56002c7acaad50813209a40e565 | 17e136be9e5c169e0ec748d6ddbc80bb | 从返回的header中解析object的metadata信息 | createObjectMetadata(rawHeader) {
if (!rawHeader) {
return this.store.createRecord('object-metadata');
}
return this.store.createRecord('object-metadata', {
headers: this.parseHeaderString(rawHeader)
});
} | 1 |
ef36c963d4a569a85341312de52efe6e | 104d9119e40041bcd7cd0cf14e9d6fcc | check the read_only fields are really read_only | class Utils_Test(unittest.TestCase):
def test_readonly(self):
item = Item()
self.assertEqual(item.name, 'foo')
self.assertEqual(item.version, '1')
self.assertEqual(item.other, 'data')
with self.assertRaises(AttributeError):
dummy = item.nonexistent | 1 |
1cb79a8d6a024822512ece875b88fad1 | 9bd433862dd3cbb8105f069a7ae419c2 | Parses lines of strings to a shortcut object by splitting the entries with the delimiters comma and semicolon. | def _make_space(options):
def extract_items(list_string):
return [list_type(x) for x in list_string.split(";")] | 0 |
fec47d7025f0260152b1afbf507a014e | c1852f771ddfa4d48f95c75231ff4f87 | Applies a service to a domain. | if entity is not None:
result = remote.call_service(self.api, domain, command, entity)
else:
result = remote.call_service(self.api, domain, command)
if result is True:
result = 'Ok.'
elif result is False:
result = 'Uh oh! Something went wro... | 1 |
22726eb9e33458fbced8dcdc7bedb31c | 1808f91960abec5bb6c0add4a2db921b | Set usr move on grid if position empty | class Grid
public function setCell($symbol, $position)
{
if ($this->isValueEmpty($this->grid[$position["y"]][$position["x"]]))
{
$this->grid[$position["y"]][$position["x"]] = $symbol;
}
} | 1 |
d30861a75fc1efab2341fdd745efde5b | 56c7885c5ae21360e088993a07c978d6 | 绑定银行卡检测 | function bindCard(){
if(!MValify.realName($("#userRealName").val(), "userRealName")){
return;
}else{
AlertDialog.hide();
}
if(!MValify.cardCode($("#certificateNo").val(), "certificateNo")){
return;
}else{
AlertDialog.hide();
}
if(!checkBankCardCode("bankCardCode")){
return;
}else{
AlertDialog.hide()... | 1 |
d00a428a1f59eedb4e207f91450448d0 | 11446378491579d854409ea4ee846709 | 函数功能描述:插入[TB_BID_SUPPLIER 中标供应商, 序列seq_bidsupplierid] | public class BaseDaoImpl extends BaseMapperImpl implements BaseDao{
@Override
public Integer insertKpBidExpert(KpBidExpert kpBidExpert) {
return kpBidExpertMapper.insertKpBidExpert(kpBidExpert);
} | 0 |
3923274d646fc807faa05b4d768789e3 | a16166083180de2ca8b945e3b08eb40e | Method that allows you to convert the
DoublyLinkedList into a String easily.
Primitive right now. (output is rather ugly)
=== Representation Invariant ===
We assume that the content of each _Node
can be converted to a String already.
@type self: DoublyLinkedList
@rtype: str | class RubyDoublyLinkedList
def to_s
to_string
end | 1 |
148c74b99283e967d185a8b78ae85428 | 6581081e751f9ac2e9cbb7dec0ad19d8 | Plots the time taken to calculate features only (ignoring model prediction time),
with time on the y-axis and window sizes on the x-axis. | self.time_vector = time_vector
self.yaxis_list_of_lists = yaxis_list_of_lists
self.chosen_time = chosen_time
self.savepath = Bespoke_savepath
self.savename = savename
self.plot_title = f'{self.savename[:10]} {self.savename[11:13]}:{self.savename[13:15]}:{self.savename[15:... | 0 |
a8cdb308995670b251646d91ab689efc | ed49e1c7b81355e47ef300696ef006e5 | 测试: 验证根据一个数列出该数的倍数 | public class date0707
public static void test8(){
System.out.println("100以内的4的倍数");
for(int i = 1,j = 0; i <= 100; i++){
if(i % 4 == 0){
System.out.print(i + " ");
j++;
}
if(j == 5){
System.out.println();
j = 0;
}
}
System.out.println();
} | 1 |
018011737cfe1ce035d97a56e7f641cd | f08d4a145082d080ee92303effb8f8f4 | Get the first child node or <code>null</code> if no child is present | YpmContext getFirstChild(); | 1 |
726f04afcf6115eee15529e340739382 | 451954e23fbb14daac434b1bc1baba7f | 根据Source生成查询总数sql | public String getCountSql(String querySql); | 1 |
322dd41872a0679fc2340aedfd9e1a9b | 5d8d324ea1ab8f4cd380b416ac2a22f9 | Deletes the committee member. | @PostMapping("/deleteCommitteeMember")
public JSONObject deleteCommitteeMember(@RequestBody JSONObject requestJson) {
CommonUtil.hasAllRequired(requestJson, "committee_member_id");
return committeeMemberService.deleteCommitteeMember(requestJson);
} | 1 |
f8ca74db40a073399d65f3a6b59c34e6 | 4524889d8e4b2646ff06347c63ea9b96 | Αναζήτηση στασής που υπάρχει στη βάση δεδομένων με βάση το κωδίκο | public Stack getByHashCode(int hashCode) {
CriteriaBuilder criteriaBuilder = getEntityManager().getCriteriaBuilder();
CriteriaQuery<Stack> query = criteriaBuilder.createQuery(Stack.class);
Root<Stack> root = query.from(Stack.class);
try {
return getEntityManager()
... | 1 |
16464675d93a59d39d6db650d575d1af | 00007375188be941cf2a4c6e4c045219 | Test that all of the permissions survive initialisation. | custom_permission_set = PermSet.objects.create(
name='custom',
display_name='Custom',
is_private=False
)
PermAccess.objects.set_default(
permission_set_name=custom_permission_set.name,
permission_name='can_edit_stuff',
level... | 0 |
a9c2f24956c9c1b210fb30700f08ef82 | dbddfb38f390c206947cb81969db9e12 | Handle product sale creation | class Sales_Model extends CI_model
public function create($store_id, $products_id, $user_id) {
$this->db->where('store_id', $store_id);
$this->db->where('products_id', $products_id);
$this->db->where('stock > 0');
$this->db->set('stock', 'stock-1', FALSE);
$this->db->update('stoc... | 1 |
b5e972643b0521c1a7f94cd4427cc68f | ac25aacf68d792c4e7a27bae9cf2690b | hasKey checks if the given string map contains the given key | func hasKey(d map[string]any, key string) bool {
_, ok := d[key]
return ok
} | 1 |
4a7382b895c63bc1209c32072eafe9b7 | e373a384f5e3e986a866ba9fe5076ba6 | 敌机下移 | class EnemyPlane(object):
def move_down(self):
self.enemy_img_rect.move_ip(0, self.speed)
if self.enemy_img_rect[1] > core_data.SCREEN_HEIGHT:
self.reset() | 1 |
e6f0e2909b9f65740b53a312961b875b | a42492cb73c2276951bc754c11d9ae5c | Removes inert and aria-hidden attribute from sibling elements | const view = this.context.view;
const siblings = getSilbings(view);
each(siblings, (sibling) => {
const maskElements = getSiblingMaskElements(this.context, sibling, 10);
const elements = getElements(sibling);
if (maskElements) {
each(elements, (el) => {
if (maskElements.i... | 0 |
29282353b8d147cd2b066e8f211c290d | 2cd99db837f587a0c33d20cd39e38eec | Callback for {@link IFarmLogic}s to plant a sapling, seed, germling, stem.
Will remove the appropriate germling from the farm's inventory.
It's up to the logic to only call this on a valid location. | public class BioBlockSapling extends BioBlock implements IPlantable
public void growTree(World world, int x, int y, int z) {
} | 0 |
1b6a5fedae012c3bba8143fdbd6787c7 | 685b00d5d83373d646e1a5adf1b838bc | 根据模具型号号获得模具型号 | namespace ClassLibrary.Repository.Interface
MoldType GetById(string moldTypeId); | 1 |
c54e9e9f00c81fa4806d3eb232e07692 | 7bf5890cd76d7f915644d440fbcae04a | Проверяет является ли строка датой вида 01-01-0000 | if ( strlen($date) < 10 ) return 0;
$f1 = substr($date,2,1);
$f2 = substr($date,5,1);
if ( ($f1 != "-") || ($f2 != "-") ) return 0;
list ($d,$m,$a) = explode("-",$date);
return checkdate($m, $d, $a);
} | 1 |
027d1fbd56bed2300d8fe5ee03fec4af | 78db9cbbca407a2260fe72f7be55545b | The more detailed status of the L2 network. | class _NetworkPeeringState:
def state_details(self) -> Optional[pulumi.Input[str]]:
return pulumi.get(self, "state_details") | 1 |
855600ba12011a1789184b7e8d2dc05f | 7c5e835eb28ef306524838561ebe7ada | 如果不使用goal,则直接返回 | if problem.isGoalState(problem.getStartState()):
return []
else:
queueXY = PriorityQueueWithHeuristic(problem,func)
path = []
visited = []
element = (problem.getStartState(),[])
queueXY.push(element,heuristic)
while not (queueXY.isEmpty()):
... | 0 |
d66f2136534856ef140c7884483bd3ec | c23c009624063ad28abbbb43d9c3c25b | 設定學生的組別編號 | namespace Journal.ClientLib.Infrastructure
public class DatabaseManager : ControllerManagerBase
public Task SetStudentGroupAsync(int studentId, int groupId)
=> QueryExecuter.ExecuteGetQuery(CONTROLLER_NAME, "SetStudentGroup", new Dictionary<string, string>()
{
["studentId"] =... | 1 |
6b573d559a46758ef394c574e88aad72 | 286bfd3417f662e974bb5109143f016a | Сортировка по типу изменения | sortCondition = 'date';
const sort = this.methods.sortBy((items) => {
items.sort((a, b) => {
const datea = utils.isValidDate(a.data.item.date)
? a.data.item.date.getTime() : 9999999999999;
const dateb = utils.isValidDate(b.data.item.date)
? b.data.item.dat... | 0 |
15a73cbc00f930ddb2027ccfdfef806e | 6c9eef8b770683cb8811e23fd3308bc8 | Calculate time between calls for animation | function setAnimationTime(case_position, previous_case_position, divPreviousCasePositionIdNumber, divIdNumber){
var animationTime;
if(case_position.top == previous_case_position.top){
if (divIdNumber - divPreviousCasePositionIdNumber < 0){
animationTime = divPreviousCasePositionIdNumber - di... | 1 |
4c7622c9a1dd1860ca7b32518e3f71d9 | 352bb4ae8e24a6690df265f39351da6b | Translate problem to standard conic form | void ProblemData::p2c()
{
FOR(i, Np)
{
W[0][i] = rho[i];
W[1][i] = rho[i]*u[i];
W[2][i] = rho[i]*v[i];
W[3][i] = rho[i]*w[i];
Vsqr[i] = (u[i]*u[i] + v[i]*v[i] + w[i]*w[i]);
e[i] = p[i]/(rho[i]*(GAMMA-1)) + 0.5*Vsqr[i];
W[4][i] = rho[i]*e[i];
}
} | 0 |
9e3a42f2da848960c00990c2cbd9420f | d96ad0656c683b26dcf621d7f8f0de06 | Retrieve the data that AT+CESQ provides | static bool getCESQ()
{
int rxlev;
int rsrq;
int rsrp;
bool success;
MBED_ASSERT(!gUseN2xxModem);
success = ((UbloxATCellularInterface *) gpInterface)->get_cesq(&rxlev,
NULL,
... | 1 |
1e1324f16d9ea0cf531f1cca111efac4 | e33f54cc57e2794509bae6ff9df6c1d7 | 数値配列の要素に奇数が含まれているか | {
bool result = false;
foreach (int item in array)
if (ModXY(item, 5))
result = true;
return result;
} | 0 |
5ba414e8a0a70c621c8f2686c629b825 | a8ce98ee0505d0c94669c4d2953a8b5c | 让用户选择是否打这个电话 | namespace HZ.ToolRoomDev
public partial class MainWin : Window
private void btnConfirmCall_Click(object sender, RoutedEventArgs e)
{
Helper.SoundPlay("select");
StartProcess(ToolOpeType.ConfirmCall);
} | 0 |
bb3e0731ede68daada46689455a6ce01 | e947fbbbf468bce049e55bacb5f16819 | 递归添加下拉框 | namespace Task.Common
public class DropDownListHelp
private void addChildItems(string parentKeyField, string parentKey, string keyField, string textField, string sortString, DropDownList ddl)
{
DataView dv = new DataView(dt, parentKeyField + "='" + parentKey + "'", sortString, DataViewRowState.C... | 1 |
dc8b9be0c348d25fe0f37e2f20b796a7 | 99d3f7800b74005982f55d187aecf926 | to go to page two of instructions | public class GameControl : MonoBehaviour
public void ShowInstrucionsTwo()
{
controlPanels[0].SetActive(false);
controlPanels[1].SetActive(true);
} | 1 |
ae37674ebbdd224891b7cd4ae6d03758 | ddb99f97544e8a662ae9e27b077d786e | Creates a new intersection record indicating whether there was a hit or not and the object which was hit. | {
++vs.IntersectCounter;
vs.IntersectLocation[ vs.IntersectCounter ] = Location;
vs.IntersectWhich[ vs.IntersectCounter ] = Which;
vs.IntersectPiece[ vs.IntersectCounter ] = Piece;
vs.IntersectActive[ vs.IntersectCounter ] = TRUE;
vs.IntersectUpperRootTrue[ vs.IntersectCounter ] = UpperRootTrue;
switch ( ... | 1 |
eecb90cdc83f8f40e9ea3ccf34646e36 | dd2195a87cad1765de105ce615bdeae0 | Nếu tồn tại admin | {
$admin_id = session()->get('admin_id');
if($admin_id)
{
return Redirect::to('/quantri');
}else{
return Redirect::to('/quantri/dangnhapad')->send();
}
} | 1 |
f732e3d9edd5595a2917790cef617542 | 97f819491e3bc283aead75366fc3501d | Sets a string-type config item's value. | static bool
ConfigLoader_setString(const ConfigEntry *entry __attribute__((unused)), void *storage,
const char *value)
{
char **char_pointer = storage;
char *old_value = *char_pointer;
*char_pointer = strdup(value);
free(old_value);
return true;
} | 1 |
3ac39d80261ebfef2b4eadee70d7db19 | 9e382d738d5d16ec9d59e39eca95f062 | GET: Shop/Categories | {
Uri uri = new Uri("http://localhost:51563/api/");
using (var client = new HttpClient())
{
client.BaseAddress = uri;
var result = client.GetStringAsync("OnlineShopping/GetAllCategories/").Result;
var lstc = JsonConvert.Deserial... | 1 |
fb831f3da79bea4519a9b4dc8503e7a0 | bd31c3570f11ddae6b69566e56921714 | Function based view used to display the details of a bike object | {
$bike = $this->bikeRepo->findByUuid($uuid);
return view('admin.bikes.show', [
'bike' => $bike,
]);
} | 1 |
1a711a1caaca7fed9c1a37eccb103e02 | 7915d22bbe2732ea967a704bd430a361 | 插入默认配置超时检查 | Info("开始获取到超时时间; 脚本id " + id)
entity,_ := SCRIPT_CONFIGS.Get(id)
if monitorUtil.CheckString(commonUtil.ToString(entity.TimeOut)) {
Info("获取到超时时间" + commonUtil.ToString(entity.TimeOut))
timeOut := entity.TimeOut
if timeOut == 0 {
return 8
}
return timeOut
}
Info("获取到默认超时时间8秒")
return 8
} | 1 |
2c89518c933b01586baf2dc4801da58b | 89eac40328349f404f035988d145452a | Listen to a lot of chunks and deduce the rms threshold. | trim_ms = 0
while sound[trim_ms:trim_ms + chunk_size].dBFS < threshold:
trim_ms += chunk_size
return trim_ms | 0 |
dadefee4b277122d989f6eaa4d921108 | e2cfc4a509bccb2b4b3b4456104083cc | 登录视图函数:获取二维码并在页面显示 | def login(request):
global CTIME
global QCODE
url = 'https://login.wx.qq.com/jslogin?appid=wx782c26e4c19acffb&fun=new&lang=zh_CN&_=%s' % CTIME
r = requests.get(url=url)
v = re.findall('uuid = "(.*)";', r.text)
QCODE = v[0]
return render(request, 'login.html', {'qcode': QCODE}) | 1 |
634d47e30706a5b07a9d6789e0d35a7d | ad7e98e1145087042eb2858245c4a845 | Opens "Home screen" in the middle screen. All the screen stack is
destroyed. | class AndroidMethods(metaclass=abc.ABCMeta):
def open_home_screen(self) -> bool:
_ = self.send_keyevent(KEYCODES["HOME"])
return self.is_home_screen | 0 |
265225984923b2d210c417a96f696080 | 899656a030b3ab97d90f6a0cdaf74095 | יוצר את לוח המודעות | {
Temperature = new int[4, 7];
Random Temp = new Random();
for (int i = 0; i < Temperature.GetLength(0); i++) {
for (int j = 0; j <Temperature.GetLength(1); j++) {
Temperature[i, j] = Temp.Next(-5, 10);
}
}
... | 0 |
c4aff1f1964aba160a6a1e2b9700f68c | 943010a50472527cd5e73542ce7a7ac4 | 设置内容是否为空的的监听事件 | public class QuestionListFragment extends Fragment
public void setOnListEmptyListener(OnListEmptyListener onListEmptyListener) {
this.mOnListEmptyListener = onListEmptyListener;
} | 1 |
bcd94818015441a78d606c98e591269a | 37dfe60edbe415fa1e484500a62ebb58 | 将seatMap的行转化为string | var seatTypeNum = "";
var resultContainer = $("#seatAddResult");
var seatNumLis = resultContainer.find('li');
seatNumLis.each(function() {
var currentLi = $(this);
seatTypeNum = seatTypeNum + currentLi.attr("id") + "#"
+ currentLi.attr("seatnum") + "@";
});
return seatTypeNum;
} | 0 |
2c56980d05cae13b080b2c712c0e8919 | f8933fb239912b8b354725a97078db92 | Display a listing of the AdvisorUserPresent. | class AdvisorUserPresentController extends AppBaseController
public function index(Request $request)
{
$auth = Auth::user();
$roomAds = $this->userAdvisorRepository->findWhere(['user_id' => $auth->id])->SortByDesc('room_id');
$this->advisorUserPresentRepository->pushCriteria(new RequestCrite... | 1 |
edb980b7a6ab6b829b52b8f030bf5c82 | 43a8e15d77ccd04d08c0fa17ac478c4b | The callback for rendering the settings page | class orddd_appearance_settings
public static function orddd_appearance_admin_setting_callback() { } | 1 |
b40fac3c46f8bcb92aa2dc5885b42b8b | 1c791a1ad3b1e45d051022e61e210bae | menyediakan sebuah transformasi pada x-axis kedua ticks labels.
Returns a tuple of the form (transform, valign, halign) | numax = len(self.ax.figure.axes)
if np.mod(numax, 2) == 1:
if numax == 1:
divider_props = dict(pad=0.2)
else:
divider_props = dict(pad=0.5)
props = dict(labelpad=-40, y=1.01, rotation=0,
ha='center', va='bottom'... | 0 |
94ec1a9409bc43efe925f1a79e328536 | c31603daac40737cfbf54e0667e1e819 | 기준통화 데이터 목록을 리턴한다 | List resultList = (List) jdbcTemplate.execute(
new CallableStatementCreator() {
public CallableStatement createCallableStatement(Connection con) throws SQLException {
String storedProc = "{call sp_web_getcurrencylist(?)}";
CallableStatement cs = con.prepareCall(storedPr... | 1 |
4893bd6ffe99959e4a85a46087acc623 | 222151e9d279161b4c2efc9ed0946764 | Méthode d'écriture du chemin dans le fichier des préférences | {
try
{
BufferedWriter bw = new BufferedWriter(new FileWriter(DIRECTORY_SAVED_FILE));
bw.write(dir);
bw.close();
}
catch(IOException ex)
{ex.printStackTrace();System.exit(0);}
} | 1 |
854924f2e77ac68083e6ee0af26f5d96 | 80539f74b5a463835ecb54a1cc8be4f3 | 视图函数,修改店铺绑定的经营者的账户 | $user_model = User::model();
$user_info = $user_model->findByPk($id);
$admin_model = Admin::model();
$shop_model = Shop::model();
if(isset($_POST['User'])) {
$shop_info = $shop_model->findByPk($user_info->shop_id);
$user_info->attributes = $_POST['User'];
... | 1 |
63bbac6a355419260dc0e3e188246b4a | 30a87174d00b89dc7580d24ad590db1d | @brief Function to load Full SDR information to database | {
if ((message->data[0] == CC_COMPLETED_NORMALLY) &&
(cm_fru.site[site].sdr_state == SDR_GET) &&
(message->data_len > (sdrsize + 2)))
{
cm_fru.cmflags &= ~CM_SDRINPROGRESS;
if (sdroffset == 0)
{
sdrremain = message->data[7];
nextsdrid = (message->data[2] << 8) | message->data[1];
}
else
{... | 0 |
0d9bf70d3dbce735dcc5c07ca7a030ea | e93ebc469e8817cba842d868fd3aaf82 | Test whether codes can be retrieved for primitive types and their wrapper class | if (clz == null) {
return false;
}
return BasicType.wrapperPrimitiveMap.containsKey(clz);
} | 1 |
a40796534151d93fa11b7c89c4f5e86d | adc0f55656edc21e255595999e93ec2c | Use this to access the restarter. | if (cfg.memberId() == 0 && restarterStarted.compareAndSet(false, true)) {
Thread restarterThread = new Thread(new Runnable() {
@Override public void run() {
try {
println("Servers restarter started on driver: "
+... | 1 |
9d32dcdedde97d182d6879f34d39ecb3 | 3c88d66a310ba079d3a673854dde46c7 | method for getting hit by laser | public class laserhit : MonoBehaviour
void Start () {
} | 0 |
572438263b448b248392932066db3b69 | 6ec4cbaf17ccf1ba9a062e8258d18575 | ミッションソート(OOCT)情報リスト取得.<br>
ミッション基本情報、予定検体・分析数より予め決められた条件でデータを抽出し、ミッションソート(OOCT)情報リストを作成して返却する。 | @Param("userId") Integer userId, @Param("assignedDate") Date assignedDate,
@Param("timeSlotType") String timeSlotType) {
Map<String, Object> parameter = new HashMap<String, Object>();
RowMapper<Mission> mapper = new BeanPropertyRowMapper<>(Mission.class);
parameter.put("m... | 1 |
c029234af44c88591230a12e5b27a3b2 | 1bd2170dba82ce4617e620b3eea82669 | Get the vertical velocity array | double* clsNoise::get_y_vel()
{
return y_vel;
} | 1 |
cdcbf0fd0c3d0194d1af32338b050a7b | ef771e86b9b2d70259bf01b586a38cff | 处理自动注入注解,Setter方式注入 | try {
PropertyDescriptor[] descriptors = Introspector.getBeanInfo(bean.getClass()).getPropertyDescriptors();
for(PropertyDescriptor descriptor : descriptors){
Method setter = descriptor.getWriteMethod();
if(setter!=null && setter.isAnnotationPresent(Autowi... | 1 |
2edb45d5f1510cd1c5737610edbd069c | 590f9e3b5ce51aaf2731834b50cc0b8e | Create a process per item in the list
Items in the list should be tuples, where
the first item in the tuple is a function
and the second item in the tuple is another
tuple for the arguments to that function.
The process objects are returned as a list. | def process_test_cases(inp_list, parse_func, exec_func):
pool = multiprocessing.Pool(POOL_SIZE)
return map(exec_func, parse_func(inp_list)) | 0 |
58d7f1df181dd2da7264e6b51491a83e | 5e8691c8dbcc64171b6719772f219337 | Metodo que atualiza um Grupo de Pesquisa que já existe na base de dados | public abstract void deleteGrupoPesquisa (GrupoPesquisa grupoPesquisa); | 0 |
20c25b924d51e332eb8c2c2101fb1df2 | c73e30aa33c6bfb744b08e5d5da888c0 | Metodo que permite llenar la entidad de páginación para grillas sin filtros | $this->withPagination = $withPagination;
if ($withPagination == false) {
return;
}
} | 0 |
2a5fd590f8cc5137c6af5ed22feaf385 | c24125d9ffe1e0ab55125b9211f7ae51 | Selects the supplied date cell. | class CalendarPage(BaseMiniumPage):
class Actions(BaseMiniumPage.Actions):
def select_date(self, date):
self.page.elements.calendar_date(date).click()
return self | 1 |
6e6a0db570c2d96c227497542108f480 | 1763fa5340148fc3276a434e385ce120 | convert a CarParameter object to a parameter vector (list of float) | class GCR(object) :
def GetParameters(self) :
parametersList = []
for i in range(len(self.fParameters)) :
parametersList.append(self.GetParameter(i+1))
return parametersList | 0 |
8a97df0a4427692a37595ad0904a84ee | 75c7e511e3dc579fb49027845b21adba | 根据物品组ID,物品刷新等级区间 | namespace WindowsFormsApplication1
public static class CampaignBatch
public static void RefreshLevelSoldierExpansionItemReward()
{
for (int chapterID = 3; chapterID <= 30; chapterID++)
{
int level1 = GetLevelIDFromChapter(chapterID, 1);
int level2 = Ge... | 0 |
f1c94a7cc4f8a50c35a1ed13fde17290 | bfeff5d7a5d735d96b336a8ff25702c4 | SignToken 为userName签发token,token包含了用户名 | nowTime := time.Now()
expireTime := nowTime.Add(3 * time.Hour)
claims := Claims{
Username: username,
Password: password,
StandardClaims: jwt.StandardClaims{
ExpiresAt: expireTime.Unix(),
Issuer: "gin-blog",
},
}
tokenClaims := jwt.NewWithClaims(jwt.SigningMethodHS256, claims)
token, err := tokenClai... | 1 |
de8bec96327489a2c98940f56a15fab6 | e6fea9bdbc511f27dcff7ed7ff3e5ce4 | hss受理日志查询页面 | public class LoghTodayDefineAction extends ActionSupport implements
ServletRequestAware{
public String loghTodaySelect() throws Exception{
String sql="";
Organization org = (Organization) request.getSession().getAttribute("currentOrganization");
String innerCode=(String) orgDAO.getOrgInnerInfo(org)[0];
if(!thi... | 1 |
2f1a7eea1faeba64b9f2d308f0e43611 | 7b5558a62c79dafea8d50eb0a00546b1 | If the Watchdog Non-Maskable Interrupt (NMI) is called,
loop until the device resets. Some devices will invoke
this callback upon watchdog expiration while others will
reset. See the device specific watchdog driver documentation
for your device. | __nfweak void Watchdog_Reset(){} | 0 |
aa70dfcedf00bae2c2c21e168e959111 | be2f174665f651f07c67f4edbbabdedf | 爬取解析医疗保险 | tracer.addTag("CrawlerBaseInfoService.crawlerBaseInfo:开始爬取解析养老保险", parameter.toString());
WebClient webClient = WebCrawler.getInstance().getNewWebClient();
Set<Cookie> cookies = CommonUnit.transferJsonToSet(taskInsurance.getCookies());
for (Cookie cookie : cookies) {
webClient.getCookieManager().addCookie(co... | 0 |
d58e6091375bf04106df6b19a33435ac | 65be0fee7a999924fb49c5436118889d | Generic chain class. Very similar to itertools.chain except this object
can be iterated over multiple times. | class MemberChain(Expr):
def __init__(self, items):
self.items = items | 0 |
8b94c0fd29d1f4cc3c4bcfee5213008a | 08357057a2a5b4184b17483c0c0a35f6 | return the current position of the "joystick" controller | def getcurrentpos_steppermotors():
pass | 0 |
58c549f07b02c24fde0698248034fe8c | eeaafd2078a4b3081c1f80cdcad0b6a1 | 品牌Banner加载,即品牌专题最上面的一张图的加载,后来确认是从促销那边拿的一段html代码 | function _html(index){
return `<li>
<a href="http://www.7jia2.com/brand?bId=${data[index].bId}"><img src='${data[index].url}' alt='${data[index].bName}'></a>
</li>`
}
$(".content_"+num+"F .mainLf_swBox ul").html(""+_html(data.length-3)+_html(data.length-2)+_html(data.length-1));
for(var i=0;i<data.length... | 0 |
5982cb3ae8b55dae3042b0207a28ce6d | 83ff7057803024ecd682d4fefb226cba | 返回当前所有的皮肤类型 | class skin_mod extends action
function getAllSkin(){
$rs = $rss = $rst = $info = $sort = $rows = $skin_sort_rows = $sysconfig = '';
$rs = DR('mgr/skinCom.scanSkinDirectory');
foreach($rs['rst'] as $value) {
$rss = DR('mgr/skinCom.readSkinConfig', '', $value['location'] . '/' . SKIN_CONFIG);
if($rss['rst']) ... | 1 |
e246f5b8b10ca53496eec0b84b2a6bf5 | 008f6c829cd9e45386f9cf5039d7d95a | Marks the local storage as dirty | void MarkDirty(); | 1 |
7a6026a88b8652380313b1863236b0d5 | 18c2bdfe6aeb222cc83d30640181bda3 | 电瓶是否在位 | public class UnityPublicBusiness
public static boolean isBatteryCharging(){
int status = BaseApplication.INSTANCE.getBatteryStatus();
if(status == BatteryManager.BATTERY_STATUS_CHARGING ||status == BatteryManager.BATTERY_STATUS_FULL){
return true;
}
return false;
} | 0 |
7f7a56454afc96d12990eb758d49f781 | bf88783cb607f2b8c9c4d3570df2a5ba | 当每个聊天被点击显示该用户详细信息弹窗 | public class ConversationFragment extends BaseFragment implements ConversationView, ConversationAdapter.OnConversationClickListener
@Override
public void onConversationClick(EMConversation emConversation) {
Intent intent = new Intent();
intent.setClass(getActivity(), ChatActivity.class);
int... | 0 |
1d17650d19adaebd7e6f36103166366f | 145b871a8a5026ab2b7520e820f33f0f | Получить символьный код инфоблока | class IBlock
public static function getID($sCode = '', $sType = '')
{
$iResult = 0;
if ($sCode) {
$arFilter = [
'=CODE' => $sCode
];
if ($sType) {
$arFilter['=TYPE'] = $sType;
}
$arIBlock = \CIBlock::getList(... | 0 |
d30dcd19f0764db7ff249d860973949c | 1c30635b8ff16c944e36d6017c2b7ffe | 是否有通路,直接使用并查集 | class Solution:
def findRedundantConnection(self, edges):
pre = [0] * 1001
for edge in edges:
x = self.find(edge[0], pre)
y = self.find(edge[1], pre)
if x != y:
pre[y] = x
else:
return edge | 1 |
1a7209021e3affac316f048539c5ada0 | 04e52d79f6636a929e32e6d4892054a4 | #### isNegativeZero :: Number -> Boolean | if (!is.numeric(x)) { return(FALSE) }
non_integer <- max(abs(x - round(x)))
non_integer==0 && !is.na(non_integer)
} | 0 |
7742fc95f7f01a072604e23874795541 | 7fb7f427132f310586e34a3e7fca0716 | Sets (as xml) the "text_nl" attribute | public class TextNlAttributeImpl extends org.apache.xmlbeans.impl.values.XmlComplexContentImpl implements com.abctech.transition.xmladbeans.sologstrand.TextNlAttribute
public void setTextNl(java.lang.String textNl)
{
synchronized (monitor())
{
check_orphaned();
org.apache.xml... | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.