query_id string | corpus_id string | query string | code string | label int64 |
|---|---|---|---|---|
91a23899e74f9e48cd83549e502847c1 | 71e610cd4926832170d9301b681321b4 | 更新某一天某一节课,某个运维人员的状态 | @Service
public class SchoolTeachPlanService
@Transactional
public RestResponse updateOneSchoolTeachPlanDay(Long schoolid, Long teachplanid, ReqUpdateDayTeachPlan reqbody) {
SchoolTeachPlanDay dayPlan = teachPlanDayDao.findOne(teachplanid);
if (dayPlan == null) {
return new RestResponse(MsgErrCode.NSM_TEACHPLAN... | 0 |
9229e829106526d030f1f8964dbe074c | 16ee12a170d0ed215be82db6c9ef79dd | Use a more strict version of markdown parser for untrusted source. | val md = """
# Hello
we are **going** to exclude some parts of this input _from_ parsing
$EXCLUDE_START
what is **good** is that we
> do not need to care about blocks or inlines
* and
* everything
* else
$EXCLUDE_END
**then** markdown _again_
and emp... | 0 |
d5b599833638fa46f3ecac4e881ec1da | 389c6ec38acdaa4e38801e7536e91c82 | Reset mappings for mapping algorithm. # noqa: E501
This method makes a synchronous HTTP request by default. To make an
asynchronous HTTP request, please pass async_req=True | if not kwargs.get('mapping_id'):
raise exc.ArgumentRequired("'mapping_id' argument is required")
mapping = self.get_mapping(**kwargs)
for key in mapping.keys():
value = kwargs.get(key, None)
if value is not None and mapping[key] != value:
mappi... | 0 |
070a7b4d1ca3822266120c0b010c70e1 | 619f71a40c432d83591a2c5b890e066e | Returns site ID from file name. | def get_id_from_file(filename):
m = re.match(r'([0-9]+)[-0-9]*\.[a-z]+', filename)
if m is not None:
return m.group(1) | 1 |
600b1c626128cac3889499660316fc5b | 4884499b230bd7c6c588f4fe65699227 | Genera link a la primer página | {
$page_name = self::$instance->show_language[self::$instance->language]['first_page'];
$page = 1;
return self::$instance->produceLink($page, $page_name);
} | 1 |
5c8383bc8cbd09007ea30a8c50b99874 | 33ab6fbfccc9c064910b9ed012238e42 | Given two positions check if two position are on a vertical or horizontal line | public class Board implements IBoard
private boolean isVerticalOrHorizontal(int fromRow, int fromCol, int toRow, int toCol) {
return (fromRow == toRow || fromCol == toCol);
} | 1 |
155c7ec277a7dc093f7d6e0e8d987b54 | f17c344919ab1fd7810cd0a5d553f861 | Ingrid commands that calculate linear trend. | logger.debug("Entering ndvi_trend function.")
def f_img_coll(ndvi_stack):
img_coll = ee.List([])
for k in range(year_start, year_end + 1):
ndvi_img = ndvi_stack.select('y' + str(k)).addBands(ee.Image(k).float()).rename(['ndvi', 'year'])
img_coll = img_coll.add(ndvi_img)
... | 1 |
e730922ed510ca230a82a3a72103c8de | 71272710670609a5fb20248ab582287d | 黑白矩阵 最小修改数 | if len(matrix) == 0:
return 0
rowMax = len(matrix)
colMax = len(matrix[0])
if rowMax == 0:
return 0
dp = [[0]*(colMax+1) for i in range(rowMax+1)]
temp = 0
for row in range(1,rowMax+1):
for col in range(1,colMax+1):
if matrix[row-1][col-1] == "0":
... | 0 |
31a53f7ee0cf3693b951cc755b875794 | 335f7704216ec592813fc6dd32f4416a | 镶嵌操作,镶嵌成功返回true,失败返回false
操作之后需要自行存储equipInfo变更 | {
vector<int> vecTypes;
int needGolden = 0;
vector<int> lockPos;
vector<DWORD> vec;
for (int i = 0; i < content.lockpos_size(); ++i)
{
lockPos.push_back(content.lockpos(i));
}
int err = AffirmRefineCheck(player, content.equipid(), lockPos, content.isautobuy());
if (0 != err)
{
return err;
}
Smart_Ptr<Ar... | 0 |
545c0bdfffe5ea6ded4397608ff6750a | 58e2cf03f75fb49df8bf178e927bef6c | Desvincula determinados perfis de uma pessoa em uma Unidade | $OcsTbPupePerfilUnidPessoa = new Application_Model_DbTable_OcsTbPupePerfilUnidPessoa();
$OcsTbPupeAudit = new Application_Model_DbTable_OcsTbPupeAuditoria();
$dadosPupe['PUPE_CD_MATRICULA'] = $matricula;
$db = Zend_Db_Table_Abstract::getDefaultAdapter();
$db->beginTransaction();
... | 0 |
510a7c6ed0a7cb152f5ca61ef819d23d | 98a6cbd018d285e019379cd2ee6306e2 | ProtoToClusterConfigWorkerConfig converts a ClusterConfigWorkerConfig object from its proto representation. | func ProtoToContainerawsNodePoolConfig(p *containerawspb.ContainerawsNodePoolConfig) *containeraws.NodePoolConfig {
if p == nil {
return nil
}
obj := &containeraws.NodePoolConfig{
InstanceType: dcl.StringOrNil(p.GetInstanceType()),
RootVolume: ProtoToContainerawsNodePoolConfig... | 0 |
74564a8c4b842746d150f333275be006 | 4f7cd62bf483329301fc8245ba05cb98 | Returns an instance of a loaded password hasher.
If algorithm is 'default', the default hasher will be returned.
This function will also lazy import hashers specified in your
settings file if needed. | def get_hasher(hash_algo, usedforsecurity=True):
if str(hash_algo) == 'md5':
return md5(usedforsecurity=usedforsecurity)
else:
return hashlib.new(str(hash_algo)) | 0 |
176e0308f9239d1084eb6d78f336d914 | 315f064a0388fb4491f8f5ed68ef0636 | Get an existing lens. | ExportLensResult exportLens(ExportLensRequest exportLensRequest); | 0 |
49f106680ae4f3005b87e221613cfffd | 6edaa278fe05a835624a3df0128efbfb | Returns the source element for this location provided it's of the
given type, if applicable | throws CoreException
{
IJavaObject cpeArray = getObject( entriesOwner, "entries", false );
if ( cpeArray instanceof IJavaArray )
{
IJavaArray entries = (IJavaArray) cpeArray;
for ( int i = 0; i < entries.getLength(); i++ )
{
IJavaO... | 1 |
beefdfab5b9259e68cb182a34bec3b58 | 98bb3f42dc99d8a83c1a096ddb2b3073 | 定义SecurityWebFilterChain对安全进行控制,使用ServerHttpSecurity构造过滤器链; | public ShiroFilterFactoryBean webFilter(SecurityManager securityManager){
ShiroFilterFactoryBean shiroFilterFactoryBean=new ShiroFilterFactoryBean();
Map<String,String> filterChainMap = new LinkedHashMap<String,String>(16);
filterChainMap.put("/login","anon");
filterChainMap.put("/**... | 0 |
a397992123ec13f8c4615f523952a1fd | 662aba9f99b4233ba87d3b54cd799e55 | Create and assign a battler for each player, chosen at random. | public class Gamestate : MonoBehaviour
void SetupBattle() {
StartCoroutine(RenderPlayers());
} | 0 |
245b4937c1d884a2cab802fd2f4f8b4e | 9efadd2a20d98b19d86372cf2fde85c0 | Получение всех клеток и фигур текущего цвета (игрока) для дальнейшего получения всевозможных ходов, одним из
которых можно будет воспользоваться | public class Board implements java.io.Serializable
public ArrayList<Cell> getAllFigureCellsPlayer(boolean aColor) {
ArrayList<Cell> figureCells = new ArrayList<>();
for (int i = 0; i < dimension; i++) {
for (int j = 0; j < dimension; j++) {
if (figureArray[i][j] != null
&& figureArray[i][j].color == aC... | 1 |
4fda4f4c0b283431257539d7a7ffbbdd | adc1a6b1f6a7bd54fd9329193d1f5f93 | !
@brief Waits for HSE be ready
ERROR HSE oscillator not yet ready | {
__IO uint32_t StartUpCounter = 0, HSEStatus = 0;
RCC->CR |= ((uint32_t)RCC_CR_HSEON);
do
{
HSEStatus = RCC->CR & RCC_CR_HSERDY;
StartUpCounter++;
} while((HSEStatus == 0) && (StartUpCounter != HSEStartUp_TimeOut));
if ((RCC->CR & RCC_CR_HSERDY) != RESET)
{
HSEStatus = (uint32_t)0x01;
}
e... | 1 |
88984ab1b20bf1466cf0a5f99be986f9 | 3ac589f66200de5c871cdbe1091e60bf | compute L for the entire population | def L(data,w):
ans = 0
for x in data:
t = dot(w,x)
ans += x[-1]*t-log(1+Exp(t))
return ans | 1 |
0ca3faf6f8172d787526c0e0f8885240 | ad03bc5cb675592084dd5d77b8c2eae2 | <pre>
Specifies whether this pass is active.
</pre>
<code>bool active = 4;</code> | boolean isActiveActive(); | 0 |
74b75420cfd1d9e0cc75e2fdb390e1d4 | d0792e96d0a1626e75bf46da91553cd8 | Function to upload config to tftp server
for DES1210-28ME model | {
TCM_enable();
PE_low_level_init();
uint32 ii = 0;
uint32 a = 0;
uint32 nr_block_flash = 0;
LDD_TError Result = -1;
uint32_t ImageDatatoSend = 0;
uint32_t image_shift = 0;
uint8_t fileDetected = 0;
uint32_t imageStart = 0x7000;
uint32_t controlFileStartAddress = 0;
fileDetected = findFileStartAddress(&imag... | 0 |
0de25e1f0daa73c7e6460cfdd48dd9b7 | b5d2b338ff32ee2ffefb1e65dc3d7a00 | 判断当前实体的主键字段名是否叫做id | public class DDBSEntityProperty
public boolean isIDEntity() {
return ddbsEntityIDProperty != null;
} | 0 |
dcc0fbe65e772aad73f110644cb805d1 | 996b761891ff4cdb6e5b3049812c47d6 | 反馈结果:其他玩家摸牌 | {
NiuniuPlayerUI player = null;
for (int i = 0; i < NiuniuModel.Inst.mGameedSeatIdList.Count; i++)
{
if (NiuniuModel.Inst.mGameedSeatIdList[i] != SeatId)
{
if (TryGetPlayer(NiuniuModel.Inst.mGameedSeatIdList[i], out player))
{
... | 0 |
820d72bc314338dbad7a8800b89c1b2c | a09937797e065583ab4fa1702c11332e | 获取每列车不同席别的票价,返回一个列表 | class query:
def station_seat(self, index):
seat = {'商务座': 32,
'一等座': 31,
'二等座': 30,
'特等座': 25,
'软卧': 23,
'硬卧': 28,
'硬座': 29,
'无座': 26,
}
return seat[index] | 0 |
21798eaa6686bfc361c1f171b8beb35e | 6c5c8a8ac6af4a28106014bf0bef06eb | resetting the XML helper structure to initial empty state | {
g_xmlDoc = null;
g_json = {};
g_trees = {};
g_noline = 0;
} | 1 |
f55e21059e5c1c1d3f970ab9e70e843e | c7ac8e55ecfca683b3bcbd14f3a45801 | 根据事件状态ID查询事件状态 | TbEventEntity getEvent(String eventID); | 0 |
3da94f8ceadc2a82b5d30735b57fb6c7 | cf6da35bf37ded2b0a951447c38864f0 | 设定是否沙箱环境 | class TaobaoClient
public function setIsSandbox($isSandbox)
{
$this->isSandbox=(boolean)$isSandbox;
} | 1 |
67e52b55b4e38135de7cc4093ad1ba11 | 26b184bb2a877782a8ba644acb8fda93 | 获取赠券扩展信息(推荐) | *getExtendcouponListAdd({ payload }, { call, put }) {
const response = yield call(doGetExtendcouponListAdd, payload);
return response
} | 1 |
b46ca378800c676b1b4b5e4f6cb772e9 | cd2a1e72f975f1ed51ba8518bb49c475 | RETORNA UN ARRAY CON LOS RUBROS A AFECTAR Y SU RESPECTIVO VALOR PARA INSERTARLOS EN DETAPLAN | {
$matricula = 0;
$pension = 0;
$costos = Costos::select("Monto")->where('Descripcion','like','%MATRICULA%')->get();
$matricula = $costos[0]->Monto;
$costos1 = Costos::select("Monto")->where('Descripcion','like','%PENSI%')->get();
$pension = $costos1[0]->Mont... | 1 |
bcf0ce5939e20c497957d862fa14081f | edbb09274b7c2ace710c0dd17d7ffe42 | 判决是否为符号 | {
Symbol *data = (Symbol *)symbol_match->tail->pre->data;
return (flag + data->flag) == 0;
} | 0 |
b1a28b83708f8e66d2e2a809de88e0a6 | 67307b232b584d96c9cda6bd5802c3cf | Returns vector of point indexes for points that were outside of all triangles. | class SimpleGraph:
def WeakVertices(self):
out_of_triangles = []
for index in range(len(self.vertex)):
left = enumerate(self.m_adjacency[index][:index])
right = enumerate(self.m_adjacency[index][index+1:])
possible_neighbours = [(ind, is_edge) for ind, is_edge in left... | 1 |
d451e2be5fbcec2f31422f8e4b7cba0f | 4fbe57d42d5834303077161fb81bb6c0 | Get the spark command to execute string for displaying it | puts 'Streaming statement:'
stmt = "#{@hadoop_cmd} jar #{@streaming_jar} " <<
"-files #{files.map { |f| "#{File.join @fs_default_name, hdfs, f}" }.join ','} " <<
"-input #{File.join @fs_default_name, hdfs, 'hadoop-bcftools-streaming-input.txt'} " <<
"-output \"#{File.join hdfs, 'hadoop-bcf... | 0 |
b585810075b879b7341bd68e68be70be | 6e14db1f9cc3679c27ede2577bbe223d | Format Moodle version column | class MLA_List_Table extends WP_List_Table
function column_modified( $item ) {
if ( '0000-00-00 00:00:00' == $item->post_modified ) {
$h_time = __( 'Unpublished', 'media-library-assistant' );
} else {
$m_time = $item->post_modified;
$time = get_post_time( 'G', true, $item, false );
if ( ( abs( $t_diff =... | 0 |
2f0555798455362fbebcf1c6d67150b1 | 6c9a3560a120d48e1d0a623617af980f | The method invoked when the player warps. | PlayerControl pc = PlayerControl.instance;
pc.warped = true;
pc.transform.position = new Vector3(39.5f, 3.5f, 0);
ShowMapOnCamera.S.transform.position = new Vector3(39.5f, 6.4f, -10);
GameState.destroyOnScreen();
pc.roomOffsetX = 2;
pc.roomOffsetY = 0;
} | 1 |
4ae469fdda25c8c20fc7e8ad3eca134d | 577afbb35c161f4fb307fdc3844e1526 | open instagram and enter login credentials | class InstaFollower:
def login_insta(self):
self.driver.get(insta_url)
time.sleep(3)
email_entry = self.driver.find_element_by_name('username')
password_entry = self.driver.find_element_by_name('password')
email_entry.send_keys(email)
password_entry.send_keys(password)
... | 1 |
cc05224af8a0da1ceabdc8dbb2c39508 | be5c71a828313be6ed590a3c052330ae | If the booleanStr is a valid boolean (see isValid) it returns the boolean value, otherwise it throws an exception | class inputValidate{
public static function validateBoolean($var){
return (filter_var($var,FILTER_VALIDATE_BOOLEAN)) ? $var : FALSE;
} | 0 |
926a514749827935c65b53d0eb9ac611 | 43dffdde039ced90869491a8a4700d2d | Test collapsing nodes by a dictionary. | a = {"b": 2, "c": 3}
d = {"a": a, "d": {"e": a}}
assert flatten_join(d) == {"a.b": 2, "a.c": 3, "d.e.b": 2, "d.e.c": 3} | 1 |
77cd3808b39e86353d526dea7db4154f | aec0ce60a408bfdcfe0e2deeaf6a44a8 | access_token的创建时间,从1970年到创建时间的秒数。 | public class CreateCredentialResponse extends SdkResponse
public String getCreateTime() {
return createTime;
} | 0 |
e3dd20362ba436ca945afe1856e24fbf | 0a53aba7b86bed73f063f30bc61534a4 | # Add notice for users that may have clicked "edit" for a
# section in the stable version that isn't in the draft. | class Eazyest_Gallery_IPTC_Caption
function admin_notices() {
settings_errors( 'eg_iptc_update_caption_disclaimer' );
} | 0 |
49be625e7db04c3f48082f35065ffead | cea48eb8e26edaf18e5a5e22b207b773 | - Do not call this function inside an `interrupt::free` critical section | impl Driver
pub unsafe fn handle_interrupt_unchecked() {
Self::handle_interrupt_impl(&*SYST::ptr())
} | 1 |
2699d2307e288e4c9f5843c521de6f52 | 8840f09b4fe05dcc3e1eb64a8431e5cf | tree에서 작은 값들부터 순서대로 제거하면서, 제대로 삭제되었음을 확인한다. | filled_bst.delete(15)
assert filled_bst.size() == 20
order = [x for x in filled_bst.pre_order()]
assert order == [57, 20, 17, 12, -2, 13, 23, 45, 26,
30, 49, 53, 52, 54, 86, 75, 100, 89, 87, 101] | 0 |
710ddd2ed00d0eb90c12df730dac3bd4 | be79e674bf4d99a62565bf92dd181558 | Invoke the health checks and do any additional status messaging | {
if (!_checks.Any())
{
return default;
}
var startTimestamp = Logger.IsTraceEnabled() ? Stopwatch.GetTimestamp() : 0;
Logger.HealthCheckGetStatusExecuting();
var results = await Task.WhenAll(_checks.OrderBy(v => v.Name).Sel... | 1 |
b310cac0f2d967ecb3c5c58f80e2bf36 | 5d09863affa6182fe0b0c48d0fcc5bdb | LLC 라이브러리 내부에 저장되어 있는 라디오설정정보를 복사한다. (수정 후 재설정하기 위해) | function checkBoxSetting(){
var formObj=document.frm1;
if(formObj.rlsd_flg.value=="Y"){
formObj.rlsd_flg.checked=true;
}
else{
formObj.rlsd_flg.checked=false;
}
if(formObj.ctrb_ratio_yn.value=="Y"){
formObj.ctrb_ratio_yn.checked=true;
}else{
formObj.ctrb_ratio_yn.checked=false;
}
} | 0 |
92a9554ec0fc2586cba3cb56680618b3 | c889e95b2c1be11d1bce41568971739a | 播放'签到'图片动画 | public class CheckController implements Initializable
private void animateImageShow() {
Animator.nodePopIn(ticket_image, 0.6, e -> sprite.replay());
} | 1 |
5d56f81f8d930f1c3bdb7f9a76e6b0b9 | 6eea5e15cb117794ca18009d35b551f5 | Fill between the two curves given. | if twin:
ax = self.axes2.obj[ir, ic]
else:
ax = self.axes.obj[ir, ic]
obj = getattr(self, obj)
fc = obj.fill_color
ec = obj.edge_color
ax.fill_between(x, lcl, ucl,
facecolor=fc.get(iline) if type(fc) is RepeatedList else fc,... | 1 |
473ebd5156743771dd7cfabf73afe244 | 8a5ef0c9e6cce555d2d211ac58c1d0bd | 删除评论
在评论中增加删除时间 | {
$comment_ids = array_column($comment, 'comment_id');
$update['is_delete'] = 1;
$update['delete_time'] = datetime();
$res = Db::name(self::$db_name)
->where('comment_id', 'in', $comment_ids)
->update($update);
if (empty($res)) {
exceptio... | 1 |
6abaea778a970d2dca3f6bb5b29255ec | 5ec4e1eba7a5f687d371e9c75d4f2302 | 隐藏宝箱 | public class BagService extends BaseService{
public void openBox(RequestMsg req){
Integer boxId=req.getBody(Integer.class);
if(boxId==null){
req.sendErrorMessage("参数错误");
return;
}
SessionBean session=sessionService.getSession(req.getChannel());
BagEntity bag=this.load(session.getId()... | 0 |
35d4c7666ceed32fa907ad52a8e2659f | 2950d2ceacb5a40c82257c2c229e20db | Tunnels through "walls" (including rubble and closed doors)
Note that you must tunnel in order to hit invisible creatures
in walls, though moving into walls still takes a turn anyway.
Digging is very difficult without a "digger" weapon, but can be
accomplished by strong players using heavy weapons. | {
int i, t, y, x, yy, xx, dy, dx;
int damage = 0;
int sn = 0, sy = 0, sx = 0;
bool hurt = FALSE;
cave_type *c_ptr;
bool map[32][32];
bool tree = FALSE;
if (!py_in_dungeon())
{
return (FALSE);
}
... | 0 |
902eb3c2f58bbb5ceb9493529b16f117 | 0d4ad5fc7552aa35286166dac08d50b4 | Permet de d'acceder au temps de transit du segment pour la simulation | double gtl_get_transition() {
return(zt);
} | 1 |
380c0bcea1be2e39c94a63cab8fb2ddc | dd26e75aecba6554a7762daea331ed6e | Offers the {@link ItemStack} fast to this inventory, avoiding
the creation of {@link InventoryTransactionResult}s. | @Override
InventoryTransactionResult set(@Nullable ItemStack stack); | 1 |
5f2a464d7932fea952cbf2784cda2cf0 | be67eb6236d27729cd28a343f7ab8e77 | generates a string of specified length | result = ''
for i in range(int(length)):
result = result + str(char)
return result | 1 |
94df2ba5a735a730d6db21c03539ac73 | db165a860b2df9bc4f4e4054790f4c24 | Increases the length of the snake. | public final class Grid
private void lengthenSnake() {
this.snake.lengthen(this.lengthen);
} | 1 |
1cc9cd6ebe688343abc2d7bad0874c44 | c0a6cb389f835fd5ac84e1d52aa51b3c | Adds a reason why this element's reflection is invalid. | Spectacle<T> because(String reason); | 1 |
8a0999a09dca1cd9f05defac08af72a6 | 3413a132ea595a0e58a76bb17ae4d3e2 | Fires a shot randomly. | successful = False
while not successful:
x = random.randint(0, self.width-1)
y = random.randint(0, self.height-1)
successful = self.shoot(x,y) > -1 | 1 |
7daa6daf1c5a811a47afd29f5cb4f739 | 739dea0049075d28e09b22d1aaa505e1 | Calculates the weekly salary.<br /> | public class Employee extends Person
public BigDecimal getRegularWeekSalary() {
BigDecimal value = new BigDecimal(getHoursPerWorkWeek());
value = value.multiply(getHourlyRate());
return value.setScale(2, BigDecimal.ROUND_HALF_EVEN);
} | 1 |
870a9d9f2c7a57f86e191aa03232e9ef | 9f53e2db08bf926595b57be453d7701c | 根据请求时间排序 | public class OrderTimeBean
public List<String> sortTime() {
List<String> keyset = new ArrayList<>(orderDatas.keySet());
Collections.sort(keyset, new Comparator() {
@Override
public int compare(Object lhs, Object rhs) {
if (parseData(lhs.toString()) > parseData(rhs... | 1 |
35f40ae3639f3be4ef4f8b780bf50685 | 5af3d225b162391810b292dc5ff6f0cf | Method for checking whether the points are vertical. | class LineSegment:
def isVertical(self):
return self._startPoint.getX() == self._endPoint.getX() | 1 |
3d9087e6b304a56777aacf561590fb1a | 3fb9e3f278ef1dea2db614c1f450d75e | Retrieves district information for a teacher.
Returns the district for a teacher | public class DataApi
public SchoolResponse getSchoolForTeacher(String id) throws ApiException {
ApiResponse<SchoolResponse> resp = getSchoolForTeacherWithHttpInfo(id);
return resp.getData();
} | 0 |
f75274889666342f74958263db19e7d8 | b6d10c6050e9098506f1be36f4c52c5c | 生成凭证取最小、最大收费日期,用来存日志表 | public List<Date> getMaxAndMinDate(String tenantId); | 1 |
4741ee38afe3635f1d9511db549a8be2 | 027fa41cc39d6ba192e8aa5484daa03d | Sets the booking end date | public class Reservation
public void setEndDate(Date endDate) {
this.endDate = endDate;
} | 1 |
5751eb952eb1b28fdcbc26bd1f6f3977 | 7468d4f83c6fb433d37a0914e352dd8d | Converts a row of the database in a dictionary containing the articles
details for use in the templates as full article. | def doc_to_dict(doc):
title = doc.getElementsByTagName("title")[0].firstChild.data
arxivid = doc.getElementsByTagName("id")[0].firstChild.data
created = doc.getElementsByTagName("created")[0].firstChild.data
categories = doc.getElementsByTagName("categories")[0].firstChild.data
abstract = doc.getEle... | 1 |
d6b12ab67a9e82a6a9191ba27bb0cd31 | fcc20ff7c0c26e4d4355f212aecf409b | Orderform fixture for RML samples | def forms() -> List[castor_form.CastorForm]:
form1 = castor_form.CastorForm("Fake Survey", "FAKE-SURVEY-ID1", "Survey", "1")
form2 = castor_form.CastorForm("Fake Report 1", "FAKE-REPORT-ID1", "Report", "1")
form3 = castor_form.CastorForm("Fake Report 2", "FAKE-REPORT-ID2", "Report", "1")
form4 = castor_... | 0 |
003b7b2926fc822a9c666f3aaf882692 | cfb34eb7fb9eac353cfa2b24833c5b92 | Update the content of a chained campaign with the provided json content | {
$parameters = [
'id' => (string) $id,
'field' => (string) $field,
'value' => $value
];
return (bool) $this->apiClient->doCall('updateCampaign', $parameters);
} | 0 |
b54739dcc677bfc08e53cfd3ae40282c | e25041b32b37e33e0fc7bc470debdc7c | Run the BIG client <-> server test case with a UNIX transport. | class LDPIpv6CutThruTestCase(VCLTestCase):
def test_ldp_ipv6_cut_thru_bi_dir_nsock(self):
self.timeout = self.client_bi_dir_nsock_timeout
self.cut_thru_test(
"sock_test_server",
self.server_ipv6_args,
"sock_test_client",
self.client_ipv6_bi_dir_nsock_test_... | 0 |
068359733a84690f8c35bbe1824d78b5 | 2db298ffbb4384bd4edbed49112d13af | Edit product column via ajax | $data = array(
'value' => (int) $this->input->post('value')
);
$result = $this->Home_model->update($this->input->post('product_id'),(int) $this->input->post('column'),$data);
echo json_encode($result);
} | 1 |
93951fba3579fd8888779f53d0c0e0f8 | b6e629617807c656c04f8e6dd461fe1e | Reset Casing values | class NCLNameCaseCore extends NCL
private function reset()
{
$this->lastRule = 0;
$this->lastResult = array();
} | 1 |
52f65e19841ffc1d00b828858f0fe406 | 0abebd6402a680c216536741456f55ad | _Map_
Get a map of request type to id from the DB | dirreq_map_get_(dirreq_type_t type, uint64_t dirreq_id)
{
dirreq_map_entry_t lookup;
lookup.type = type;
lookup.dirreq_id = dirreq_id;
return HT_FIND(dirreqmap, &dirreq_map, &lookup);
} | 0 |
a97b2ae9733aa1dbb0f93e1ba793a7ff | 7b57d80df5ca462cb55bc1f79d319b3a | Probe (pre-initialization detection) of external TMDS transmitters. | int
sn_probe(device_t dev)
{
struct sn_softc *sc = device_get_softc(dev);
uint16_t bank;
uint16_t revision_register;
uint16_t base_address_register;
int err;
if ((err = sn_activate(dev)) != 0)
return err;
bank = CSR_READ_2(sc, BANK_SELECT_REG_W);
if ((bank & BSR_DETECT_MASK) != BSR_DETE... | 0 |
5bf7c1b989c799c2a04d7d4d63cb3f5b | c7b1042035eeb549e405515e6117c40a | Maximum number of input elements each output element depends on | public abstract class HLExpressionElement implements Cloneable
public int getMaxNumberInputs() {
return maxNumberInputs;
} | 1 |
dbe5397041cc97c2cdfbb4f43d8f040f | 6af244ba6596679eb70ad6732142e15a | Get the deleted and closed orders from the Account History tab. | namespace Huobi.Net.Interfaces.Clients.UsdtMarginSwapApi
Task<WebCallResult<HuobiCrossMarginOrderPage>> GetCrossMarginClosedOrdersAsync(MarginTradeType tradeType, bool allOrders, int daysInHistory, string? contractCode = null, string? symbol = null, int? page = null, int? pageSize = null, string? sortBy = null, Cancell... | 1 |
6dc4a203cc23e77f7d2ca133717d3213 | 3e16c3a988ed2caccc709d5ff45521b5 | Suite's JAR file extension. | String name = "";
NodeList nl = d.getElementsByTagName("suitefile");
if (nl != null && nl.getLength() > 0) {
Element el = (Element)nl.item(0);
name = el.getFirstChild().getNodeValue();
}
name = name.substring(0, name.indexOf("."));
return name;
} | 0 |
b8dbff570754ee3f370b9eb5b580c94f | c6c6197bc1176b4db2ef6ccab5bc2cb0 | Reset PageRank value | self.cursor.execute('drop table if exists pagerank')
self.cursor.execute('create table pagerank(urlid int primary key,score double)')
self.cursor.execute('insert into pagerank select id,1.0 from urllist')
self.dbcommit()
for i in range(iterations):
print "Iteration ... | 1 |
00ebf4f0c2453bf6551f03d8ff1d39b4 | 9ae71dc60ca05f12c2d0381cd564844a | make the jframe non-movable | public final class statistics extends javax.swing.JFrame
void hidesize(){
setSize(1400, 820);
setLocationRelativeTo(null);
setResizable(false);
} | 0 |
cdf717e0f0d6ad1e2f39c14c501022a6 | 6be4473fc52ed3b0f5112a82e8bbcb02 | Method pings multiple machines at once with given timeout. If all machines come online (are pingable) within timeout methods returns | def ping(hostname, timeout=0.2, attempts=2, packet_size=64):
for i in xrange(attempts):
try:
result = do_one(str(hostname), timeout, packet_size)
if result is not None:
break
except socket.error:
result = None
return result | 0 |
255b00df07c2f9d08e086a0a92fa8552 | 31159b727cdbf821b83ba836387d4b06 | Bai 212: Trung binh cong so duong | void main()
{
int tieptuc;
LIST lst;
quaylai:InPut(lst);
printf("\n");
OutPut(lst);
printf("\n");
LietKeVaTinhTongCacSoChinhPhuong(lst);
printf("\n");
printf("\nBan co muon tiep tuc thuc hien chuong trinh hay khong ? Neu co bam phim C,nguoc lai bam bat ky 1 phim nao khac de ket thuc!");
tieptuc=getch();
if(t... | 0 |
95ede2f955f4b7120f3af30f9006e645 | e391e7d2ed12ad2e01cc2da968a0eb6e | 检查因到达截止日期而下线广告的用户并发送邮件 | class Count implements ShouldQueue
public function handle()
{
$config = $this->config;
$limit = $this->limit;
$timeLoop = $config->hours * 3600;
$emailExcerpt = explode(',', $config->mail_excerpt);
$timeAgo = time() - $timeLoop;
$timeAgo = date('Y-m-d... | 1 |
597fe38af31ce8f4f5db42871caa1a1f | 8cb7fea2103b1fc477079ff21ee34fef | recorre el grafo utilizando el algoritmo de búsqueda en amplitud | {
int i;
FILABARRAS *lista_barras = NULL;
BOOL visitado[numeroBarras];
for (i = 0; i < numeroBarras; i++)
{
visitado[i] = false;
}
for (i = 0; i < numeroAlimentadores; i++)
{
buscaPU(alimentadores[i].noRaiz, grafo[alimentadores[i].noRaiz].Vbase, visitado, grafo, Sbase);
... | 0 |
7e77bf4ee50475a79370927b312983e3 | 0670ed117a6a5d026ab910464d2b84f9 | Is it a one-day event? | {
if (eventItem?.Start?.DateTime == null || eventItem?.End?.DateTime == null)
{
return false;
}
TimeSpan eventDuration = eventItem.End.DateTime.Value - eventItem.Start.DateTime.Value;
var result = eventDuration.TotalDays == 24 && eventI... | 0 |
e9b20e3081ddda5e5f3e1f04180d5add | e693af564ed3f3c53befcba32ea13a89 | 拍拍小店卖家重新出价 | class IndexController extends \App\Modules\Base\Controllers\FrontendController
public function actionNewprice(){
$id = $_SESSION['user_id'];
$ppj_id = $_POST['ppj_id'];
$ppj_no = $_POST['ppj_no'];
$seller_max_fee = $_POST['max'];
$seller_min_fee = $_POST['min'];
$time = time();
$arr['user_id']=$id;
$arr... | 1 |
0af4c7daf15583a85d183a60b7f0901e | e5d6f310f9bb120c642ed63e4626bb5a | FUNCTION
DESCRIPTION
This function is called to check whether "off state" need to be check frequently
CALLS
PARAMETERS
None
RETURNS
GLOBALS AFFECTED
None | PRIVATE void cal_offline_check_data2(void)
{
} | 0 |
709dcfee2ba8c201d4546e8cf0bfe5fd | b1671979fbc5f0edf8b5ee28e26cd763 | Determines whether the specified character is either <see cref="Path.DirectorySeparatorChar"/> or
<see cref="Path.AltDirectorySeparatorChar"/> | public static class Paths
public static bool IsDirectorySeparator(char value)
=> value == DirectorySeparator || value == AltDirectorySeparator; | 1 |
7fea6a6081391e57aa60a6cded922ae1 | c73cacfeed534591d9d5acc380ebd870 | 当前线程是否是reactor的主线程 | int mainThreadId = getMainThreadId();
int currentThreadId = Process.myTid();
return mainThreadId == currentThreadId;
} | 1 |
117efd94695891f0b3ad327673eee662 | 29286491ce6c2044f12a556448caf6a2 | Updatuje recenzenta clanku. | {
if (null === $id)
$id = $this->request()->attributes->get('id');
if (!$id)
return false;
$request = $this->request()->request;
$approved = $request->has('approved') && $this->get('user')->isAdmin() ? $request->get('approved') : 0;
$data = [
... | 1 |
5619e8a475479ab943e941eb988412f9 | e704169f9110279f61c260275e355dd4 | Remove all subscribers from channel. | namespace Hydra.Framework.Actors.Channels
void UnsubscribeAll(); | 1 |
e29f4484d98910bbad1efd09df40dc4d | 76438ebee99b31bf025f34ef52093604 | Read a user preference from the NSDefaults system. | function getPreference(preferencesBranch, name) {
return preferencesBranch.getComplexValue(name,
Components.interfaces.nsIPrefLocalizedString).data;
} | 1 |
7a9287f30b64c461051d522f6ade0b06 | eb02c476a484fbbdd82d8e00922c51e8 | Tells whether two points are equal by proximity or not as far as interpolation goes. | {
Vector2 distanceVector = vectorA - vectorB;
return (Math.Round(Mathf.Abs(distanceVector.x), compareFidelity, MidpointRounding.AwayFromZero) < float.Epsilon &&
Math.Round(Mathf.Abs(distanceVector.y), compareFidelity, MidpointRounding.AwayFromZero) < float.Epsilon);
... | 1 |
0a25c8feb1f6c5d1e4c2191171db621c | 9d60e24ce1804dcbe2c7342fba4d6e1d | Returns a regex pattern that matches the variable. | class Regexp extends Fsb_model
public static function pattern($varname, $limit = false, $options = null)
{
if (preg_match('#\{[A-Z]*?\}#', $varname))
{
$varname = substr($varname, 1, -1);
}
switch ($varname)
{
case 'COLOR' :
$pattern = '(\#[a-f0-9]{3}|\#[a-f0-9]{6}|[a-z\-]*?)';
break;
case 'N... | 1 |
28ca9ba1298f45ef26094ee89327d131 | 62e381140be812d38fb0471174a4c52d | Lock or unlock the I/O lines used by the servos.
Sets whether the specified Servo I/O is active. | void ServoInterface::useServo(bool servo_on) {
} | 1 |
f96b46f678c2d27c3b1c5d1b548d5142 | 689bb170bbd4b3b4f6b70f83a96ec534 | we won't be cloning anything, but we want the object graph in SerializationContext to remember the correct instance. | namespace System.Data.Entity.Infrastructure.Interception
public class DbCommandInterceptionContext : DbInterceptionContext
protected override DbInterceptionContext Clone() => (DbInterceptionContext) new DbCommandInterceptionContext((DbInterceptionContext) this); | 0 |
63241157c75d865798d5a7d68f5c638b | a7be5a71ebbd64085946f7f6b87bc1bb | 获得一首诗的喜欢统计 | export class BooksService
showlove(booklove,callback){
this.http.post(this.url+'/showlove',booklove).subscribe(
function (result) {
callback(result);
},
function (error) {
console.log(error.message);
}
);
} | 0 |
380cea255ad426e966ff9265b4614608 | 4bf1a6b9576a8bde485dee8b1929163c | 刷新年月列表 | mYears.clear();
int index = 0;
for (int i = mMinYear; i <= mMaxYear; i++) {
mYears.add(i + "年");
if (mYear == i) {
index = i - mMinYear;
}
}
mYearPicker.setItems(mYears);
mYearPicker.setInitPosition(index);
updat... | 1 |
b715333bd7266b9acfc4f096d20a5592 | 5871da0050f4b938859948255793f31d | Search tweets and get it coords | def get_coordinates_and_texts(tweets, already_showed):
coordinates_to_show = []
ids = []
texts = []
for tweet in tweets['statuses']:
if ((tweet['coordinates'] != None) or (tweet['place'] != None) or (tweet['geo'] != None)... | 1 |
150b2c55e475277ce9844f073e2d355d | 68459ddea16dd0c4add3db4967c83a1b | Private function to calculate the before/after vectors for pad_wrap. | batch_index, ch_index):
(_, _, batch_length) = d.size()
dilations = d * dilation
idxP = torch.arange(-batch_length, 0).float()
if torch.cuda.is_available():
idxP = idxP.cuda()
idxP = torch.add(-dilations, idxP)
idxP = idxP.round().long()
maxP = -((torch.min(idxP) + ba... | 1 |
bf422046df01037e50916cc9a84464cf | 706d46e91efccc10fc9cee563aee5e9f | Auto correct author name | if (this.state.author.length===0){
if (!this.props.getAuthorsQ.loading && this.props.getAuthorsQ.authors!==(undefined||null)){
let author = this.props.getAuthorsQ.authors[0];
this.setState({author: [author.name, author.id]});
}
}
} | 0 |
5796144ae41976f2fff958934d5aa162 | f7e122cd617304c35e15b7e4ceca82f8 | 获得用例开始时间 | {
if (count($this->beginTime) == 0) {
return null;
}
return $this->beginTime['value'];
} | 1 |
8508f97c3bf1147aa38186c36671aecf | 30af702d3e890e3b7f8d29688e612cfd | done on exit of screen, passes the text back and disposes of the form | namespace GameShop [Serializable]
public class HeaderPage : Page
public void OnExit(object sender, EventArgs e) {
Form1.form.OnExit();
} | 0 |
6c9f5e815af085c1f77d855a31904aad | b4967d4b61eb4ec9c3e70f6a0f4c1839 | 贵宾卡积分消费报表导出 | class HotelsDemoController{
function ticketConsume_excel(){
set_time_limit(0);
ini_set('memory_limit', '-1');
$model=new Model();
$ticketConsumeMap=session('ticketConsume_excel');
foreach ($ticketConsumeMap as $key => $value) {
$where[$key]=$value;
}
$... | 1 |
b578b999709d3ab72cc909e281af2c67 | 35f5c5c1b4eddf76a6de1ab2b34de2ed | 如果已经登录过,跳转至index页面 | class Login extends CI_Controller
public function index() {
$this->is_login();
$url = get_url('/index.php/Login/menu');
header("Location:$url");
} | 0 |
03de0c2a7d659f1661f5204b0a8625fe | 6500ae8c58794fa8205f9a3f7883ce3f | Gets a specific bank property value assoicated with the given keyName | @Service
public class BankService
public Object getBankDetails(String name) {
return repository.bankDetails(name);
} | 0 |
e8eead1e2335a40717e13c6dfcf85bb7 | 6c1fbbd9a7f74a6c0bd1ab7e1eb30a3d | 动作:点击录播课-优惠价格提示信息 | class ZhengxinPage(BasePage):
def click_zhengxin_jiben_ziliao(self):
self.find_element(*self.zhengxin_jiben_ziliao_loc).click() | 0 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.