query_id
string
corpus_id
string
query
string
code
string
label
int64
fd9e2dba4eac244f8160f635d57e98d7
e1e08f8575a3f0d8f0e3eb932db91bba
保存预算控制数
@Service @Transactional(readOnly = true,propagation=Propagation.REQUIRED) public class SubBudgetServiceImpl implements SubBudgetService{ @Override @Transactional(readOnly = false,propagation=Propagation.REQUIRED) public void saveQuantities(SubBudget subBudget) { List<SubQuantities> list=new ArrayList<SubQuantities>...
1
967e505549b180749ac199c7852ec3ce
6785ce28ec74c16b69de9d403dccc4e1
Contructor that initializes all entries to zero.
Stats::Stats() { numEntries = 0; maxEntries = 20; }
0
174c0b55490d897471691ab4f17d5d68
92d40c17b9491462c8460b8b1206b487
Construct a directed Erdos-Renyi network (with binary connection weights).
: max_edge_ID(0), population(number_of_nodes),sites(number_of_opinions) { long int j,number_of_edges; int i; vector<Node>::iterator person_it; igraph_eit_t eit; igraph_integer_t from, to; degree=4.0; for(i=0;i<number_of_opinions;i++) sites[i].reserve(number_of_nodes); igraph_watts_strogatz_game(&igraph, 1, nu...
0
4270b4fd636b0a53acea25ec107127e9
2fa1d91594d4a7aee05eee55162fbbb1
用于int或float两种值类型范围的检查
class School(Model): def check_value(num,min=-1000,max=1000,massage=''): if not (min< num < max): print(massage) raise ValueError
1
3438eafb2ae5a05fbd51e1d998450b68
d4b92721bb4757fda43a98f985b92f1e
Menu contendo opções a serem escolhidas no inicio da execução do programa aqui é possível escolher se a pesquisa será feita por categorias se será uma pesquisa direta, ou se simplesmente ouvirá as notícias do dia
print("Rede Social \n" " 1 - Definir nome da rede social.\n" " n - Próxima opção.\n" " 0 - Sair")
0
097ef6254358f20cc4276f356bd3f5be
75ce34f65e7cde6c0480f2e2e4fe301b
根据红冲小票获取冲红单信息
namespace wms_transmitter.Worker class SynchronizeOrderCFStatus public List<RefundBill_M> getRefundBill() { ValObj vo = new ValObj(); vo.rowNum = Convert.ToInt32(ComonUtil.packSize); vo.orderFrom = "2"; List<RefundBill> l = staUp.getRefundBill(vo); ...
1
e3c8ea3c2259f221792850cd2a988c1b
a42de1f3e7d3ec6f4d9c98b2171ce875
取得当前路径下的所有文件夹或文件
private String[] getFolderList(String path) { if (!isFolderPath(path)) { return null; } if (current != null) { current = null; } current = new File(path); File[] files = current.listFiles(); if (files == null) { return new String[0]; } ArrayList<String> file_array = new ArrayList<Str...
0
4d82a3b59cd56c8a83379e5ad41de365
1b561dfb8a5aec656324148016cb9676
Memory comparison (case-insensitive)
int memory_compare(const void *s1, const void *s2, uint32_t n) { const char *pch1 = (const char*)s1; const char *pch2 = (const char*)s2; while (n > 0 && *pch1 == *pch2) { pch1++; pch2++; n--; } return (unsigned char)*pch1 - (unsigned char)*pch2; }
0
d13e03441774096e1dc4291372de3cbb
2352c38ba1dc0feb0e7788380794eec2
Instantiates a GameController with the specified values.
class GameController extends Controller public function __construct(GameService $gameService) { $this->service = $gameService; }
1
86a378decbd96d45642ef8a22fad11eb
7c745c690e38c009feab3260a1ccd919
Call dispose on the target.
namespace CodeHelpers.Pooling public abstract class PoolerBase<T> where T : class protected virtual void Clear(T target) { if (target is IDisposable disposable) disposable.Dispose(); }
1
0d484b980450025364882d29c19d2f34
3b4e8265f00a3887687d1da9dd9c7852
This function receives the XML response to the Authenticate method call, and creates a auth token
var r = parseResponse(this.responseText); if (r.type === 'Error') errCallback(r.text); else if (r.type === 'Notify') { if (t.getAttribute('act') === 'remove') { location.reload(); } setMes...
0
5521e87fe80b384b8cc30e2cf1c7b875
531e68e1d1612e98a25e89f2012aed3b
Test of encode method, of class HuffmanEncoder.
(c,root) = huffman([1, 2, 3, 4]) s = encode([1,2,3,0,3,2,1],c) print s ans = decode( s, root ) print ans
1
bc5545900bf0826c9827f82e5fda4ef1
7160c2714e8205fe7a3a073bbb701fc2
Fetchs and stores in the driver the PCIE capabilities (gen speed and lanes) of the slot the device is in. Handles APUs and virtualized environments where PCIE config space may not be available.
FindPcieEpCapId ( IN UINT8 PciePortDev, IN UINT8 PciePortFun ) { SYSTEM_AGENT_NVS_AREA_PROTOCOL *SaNvsAreaProtocol; UINT64 PciePortAddress; UINT8 PciePortBus; UINT8 PcieCapOffset; EFI_STATUS Status; Stat...
0
5a12f07c7db9ef19e9b27bd9b5a9eccb
4e418a51f8fc744e68fdece0c3abc0f1
根据token_id查询是否存在这样的钱包
$this->db->select('*'); $this->db->from('m_wallet'); $this->db->where('member_id',$id); $this->db->where('wallet',$address); $query = $this->db->get(); $item = $query->row(); return $item; }
0
f2f71dc4a541d0e6bd9ed227cc98f57d
05158926b6ab8f76b2e373ed7cb082bf
Read a signed 16-bit value from the specific register, in little endian byte order.
class I2CDevice(object): def read_s16(self, reg, little_endian=True): result = self.read_u16(reg, little_endian) if result > 32767: result -= 65536 return result
1
9c7a5435cc3a74fc7d386c5c974895c7
6d0a95e12f42130bb962f664402d4cf4
Prefix返回标准logger的输出前缀。
class FilelogRoute extends CLogRoute public function getPrefix() { return $this->_prefix; }
1
ef6f06aeff55529f7fd413e6dc77ab12
95ce62e08c11e880b67c3346dcb15afd
collect function information from stream of *.o file
{ std::string cmd = "otool -l \"" + filename + "\""; std::string output = system_get_output(cmd); if(output.find("can't open file")!=std::string::npos or output.find("No such file")!=std::string::npos or output.size()<1) { std::cerr << "Cannot find file " << filename << " to read its dependencie...
0
8922c2277923425525edbd40f0cd54d0
82367a13bd1f846de49746ed932c527e
修正误差
{ Vector forward(Layer layerList[], int nLayer, Vector input); Vector db = delta; Matrix dw(w.row, w.col); for(int i = 0;i < w.row;i++) { for(int j = 0;j < w.col;j++) { dw[i][j] = prevA[j] * delta[i]; } } double EPS = 0.0001; ...
1
6f225063945584a2983c9ae696210cd6
0975cc403ddd3e14ec8f9157b0d3d1fc
Plot a trace of a statistic in the form of statistic vs. iteration.
def plot_trace(df, goals, logplot=False, absolutes=None): best_data = {} targets = [c for c in df.columns] for target in targets: best_data[target] = [] x = np.array(df.loc[:, target]) for i, xi in enumerate(x): if goals[target] == 'max': best_data[target]...
1
c5ecc5acd8fd39ad2022283b04979ec7
4a42c9248e3f9467b4ce68e9cccc4c0e
Make the key checker's input text the map name.
{ TextBox mapTextbox = sender as TextBox; if (mapTextbox != null && mapTextbox.Text.Trim() == "") { mapTextbox.Text = defaultMapName; } }
0
f3da655cbc416e46acb3200259c43013
ab0322bb3a1bd84ced4344cda6c19747
支出表唯一自增id
class IDService public static function getStatementId() { return self::getId("oil.income.statement.id.",3); }
0
a3f331452104e8a4af109c998d846077
35952cd601e47c09ed514a12afb37938
Функция приведения текущего хранилища к шаблону
const _collectionFrag = document.createDocumentFragment(); const _set = document.importNode( _collectionTemplate.content, true ); const _container = _set.querySelector( '.collection__container' ); let title = ''; if ( currSet?.text?.title?.full) { title = this.getTextValue( currSet.text.title....
1
d1a35b9090bfb12ca572b8375adbe816
4139a11ccc7c35cca208d66f9c9b37da
Center _text_ in a banner _width_ wide with _border_ characters.
if width is None: try: width = int(subprocess.check_output(['stty', 'size']).split()[1]) except: width = 80 return ''.ljust(width, fill) if not text else ('%s %s ' % (3*fill, text)).ljust(width, fill)
0
b70b640cf67bacabef13ca6162de9b20
82847a9f14d81366143a02c6a585178c
checker om et kast er lig med sidste kast, fx når man skal se hvis man har slået 2 seksere i sidste kast
bool checkDouble(stack<card> &played) { bool d = false; card t = played.top(); played.pop(); card s = played.top(); if (t.readValue() == s.readValue()) { d = true; doubles++; } played.push(t); return d; }
1
a4a02d5998037d0897d866cb23b2455b
c41113464e8527860cf0bf0c5e2b84fb
Fields that shouldn be affected by updates.
public class EntityInfo public String[] getIgnore_update_field() { return ignore_update_field; }
1
81f7b8febaf6d3951f32c3b4e783e668
c61dec3885f059167aaeaf1374fd39ca
core method - records voice command input and returns the recorded input
audio_data_list = get_audio_clip(record_seconds) clientKey = mc.houndify_clientKey clientId = mc.houndify_clientId userId = mc.houndify_userId client = houndify.StreamingHoundClient(clientId, clientKey, userId) client.start(MyListener()) client.fill(b"".join(audio_data_list)) result = cl...
0
edb321defcb0a2de477799510cdb40fb
198efb1be8a3481d77f0a237ab40dab9
Increments the current master to the next in the client state list
perf_gconf_t *gconf = perf_get_global_config(global); gconf->clients.cur_host_i = apr_hash_next(gconf->clients.cur_host_i); return perf_get_cur_host(gconf, worker); }
1
fce3a11a958e9282b58976216ea63b91
47a9750012ba274a6e546f2ccac757cc
Sets each pixel in the image as supplied in an array of RGBAPixels. Ensure that the size of the array is correct.
class FitsImage(object): def set_pixels(self, pixels): if not (pixels.shape == self._pixels.shape): raise AssertionError("Shape mismatch between pixels supplied {0} and existing image pixels {1}".format(pixels.shape,self._pixels.shape)) self._pixels = pixels self._rms = None ...
1
53a662ed074118e4ce49723978d0f4e1
7f61448ad6da3ef0f9cb03f40c5be655
(Hint: The function will be similiar to the factorial function!)
cases like (1)
0
84746dae8c5685bd5efe4ceddcea4ea8
f446917a39367fd9f6bec67c7bdfeffd
Se escapa ou não os campos
class tinyDoc extends clsTinyButStrong public function getIsEscape() { return $this->isEscape; }
1
6d215e518f0b01ef99f907c354a28278
fe2d1751f82881402d0dcf40447f8549
@author - Diego Milano Configuracao do Android View Client. Precisa ser chamado antes de importar o MonkeyRunner e o MonkeyDevice
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); ControlAndroid ca = new ControlAndroid(); CrashHack ch = new CrashHack(ca); initialize(ch, false); this.graphics.getView().setOnTouchListener(ca); this.graphics.getView().setKeepScre...
0
a56653f6746132159482408351422406
4c5b32ca4f9b31511a68bde818050b91
根据差分数组还原原数组
ArrayList<FastAndRuthlessDiffImplByteArrayParts> outArrayList = new ArrayList<FastAndRuthlessDiffImplByteArrayParts>(); ByteBuffer buf = ByteBuffer.wrap(byteArray).order(ByteOrder.LITTLE_ENDIAN); while (buf.hasRemaining()) { short start = buf.getShort(); if (start == FARD_REPEATING_BLOCK) { short repeat...
1
d2e2d4d5b975d4dc51ff792c841fa10c
5b5a54d9151d270bdaf9a4de19b1fc65
Returns rotated sun position for the game.
double vPos = getVerticalSunposition( latitude ); double hPos = getHorizontalSunPosition(); return new float[] { (float) Math.sin( hPos ), (float) Math.sin( vPos ), (float) -Math.abs( Math.cos( hPos ) ) }; }
1
55048d007cb23a4f0e778e87e57a2d1b
96ade0692cf2d817be29d6f2d665463c
Tests if trying to remove a non-existing file results in an error
filename = join(dirname(__file__), "resources", "test_file2.txt") with open(filename, "w") as f: f.write("Test file for remove call") assert exists(filename) await aiofiles.os.remove(filename) assert exists(filename) is False
0
eb8517047a1b5ee99b3b0d4c5ffb0092
95ffb29db36fe83237117b728526d8ce
Register instances for the constructors.
{ RegisterType(ObjectType::ENTITY, &Entity::CreateInstance); RegisterType(ObjectType::MAP, &Map::CreateInstance); RegisterType(ObjectType::MATERIAL, &Material::CreateInstance); RegisterType(ObjectType::MESH, &Mesh::CreateInstance); RegisterType(ObjectType::SHADER, &Shader::CreateInstance); RegisterType(ObjectType...
1
5a3ad53af3d887b9f7f8370f94563e70
bac642bc23c3c8e93d17aefa4e448035
Configures the command's URL encoding or decoding, depending on the selected mode.
options = self.options if options.Cem: enc_perm = options.Cem.split(",") for _enc in enc_perm: enpayload_url = self.encmap[_enc](enpayload_url) else: for enctype in list(self.encmap.keys()): if getattr(options, enctype): ...
1
896b0146d1e9b2212ddd8677fee32e95
1c8a369da01ff49b88d08a9b87bd0976
Установить текущий игровой стол
public class CardGamePlayer extends JFrame public void setTable(Table t) { getContentPane().add(t, BorderLayout.WEST); t.updateUI(); repaint(); }
1
517ea9f117be86500f5b0dcf4df73e2d
d0c2aca61167598189d2dfa254333550
visualize controllers with cylinders
var topColr = new Float32Array([0.8, 0.8, 0.8]); var walColr = new Float32Array([0.8, 0.2, 0.0]); var botColr = new Float32Array([0.8, 0.8, 0.0]); var ctrColr = new Float32Array([0.8, 0.8, 0.0]); var errColr = new Float32Array([0.8, 0.8, 0.0]); var capVerts = 100; var topRadius = 1.0; cylVerts2 = new Fl...
1
93266ca4f83c9f08b68c64e4694d355b
56a0eed568118623806a1a637b8f87dd
プレイ時間(秒)を取得
class MemoryPlayerFactory implements IMemoryPlayerFactory public getTime(): number { return Math.floor(angular.element(this._playerId).data('jPlayer').status.currentTime); }
1
243d0abf3c3f79e82b128c9612953c73
4ca45d89990b8560865481c09049051b
Modifica un contrato.
let id = c.id; this.updateContract = c; return this.http.get(this.url + `/${id}`) .map(response => response.json()).toPromise(); }
0
4de83482d86c934c2dd561f5f3c31358
af871de5f71a890fd605dc9c80d31f51
create a new list node containing a short string for the data
{ list_node *l = malloc(sizeof(list_node)); if (l != NULL) { l->next = NULL; l->data = data; } return l; }
1
9234a6f7484bed0a92470fcf05d072a3
7390162eacb3e214b8a2fcac16975fbf
修改充值卡过期时间
int modifyExpireTime(@Param("userId") int userId,@Param("expireTime") Date expireTime);
1
109742fc36791ceef6c8e771485068d4
21babde1bbc5dbb682013663e6fa530b
wrapper function for tcsetpgrp
class TestProgram(six.with_metaclass(TestProgramMeta, object)): def run( self, args=None, catch_stderr=False, with_retcode=False, timeout=None, raw=False, env=None, verbatim_args=False, verbatim_env=False, ...
0
2dd9651955908acedf669a0e1a97712d
e2683c07a4e561e78a58b5672f43c92f
Deletes a carrito entity.
@CrossOrigin(origins = "*") @RestController @RequestMapping("/carrito/v1") public class CarritoController @DeleteMapping("/delete/{idCarrito}") @ResponseStatus(code=HttpStatus.OK) public void borrarCarrito(@PathVariable("idCarrito") Long idCarrito){ carritoService.delete(idCarrito); }
1
ed306b26007f3debe47e19398a3f81ef
ef8d31ec2475c23b21745943a1e978ab
Processes the payment with UnionPay.
payload = utils.mk_payload(self.key, pairs=( ('merchantId', self.merchant_id), ('payId', pay_id), ('dttm', utils.dttm()), )) url = utils.mk_url(base_url=self.base_url, endpoint_url='oneclick/process') r = self._client.post(url, data=json.dumps(payload)...
1
709689ff34aa55a1fd2bf6b91666f73c
4c68b431f765644a6a74ee0133b32955
scrape AQI webpage based on submitted zip code
def parse_aqi(url_result): aqi_start_element = '''<a class="cbol_aqi_num" href="/news/385.html" target="_blank">''' aqi_end_element = '''</a>''' start_element_index = url_result.find(aqi_start_element) start_index = start_element_index + len(aqi_start_element) end_index = url_result.find(aqi_end_ele...
0
fe7f6fa6bc1baeff1317d38a67bf250f
58326c1fa34a4f047117995fd7920472
删除一个成果,包括此成果对应的附件也删除
{ $JournalModel = M('Journalpaper'); $Condition['id'] = $achi_id; $owner=$JournalModel->where($Condition)->getField('user_number'); if($owner!=session('userNum')){ $this->error('权限错误,不能删除该成果!'); } $JournalModel->where($Condition)->delete(); delete_all_info($achi_id,1); $this->success('删除该科...
1
c60a0beafa5eb13b408b719aa72e1359
45f459d50ae0a681b23e3e01b78fd605
Ball picked up by player.
Ball typedef struct { Vector3D pos; }
0
0e614499cf763cc6e7867c57dd7d4c4e
3b2189cf931ec4706493d9a4b37d0577
提取关键字,返回剩余的部分以及关键字
int cut(char ret[],char data[],const char *token,int point){ int len=1,i=0; char *tp,buff[MAX],*argv[MAX]; strcpy(buff,data); tp=strtok(buff,token); argv[i]=tp; for(i=1;i<MAX && tp!=NULL;i++) { tp=strtok(NULL,token); if(tp!=NULL){ argv[i]=tp; len++; } } if(point-1<len) strcpy(ret,argv[point-1]); el...
0
874367146555ffb406fbfc7e7a7fa654
3b777db3e0b77f09719f9f81c61c6277
쿠키에 검색어 목록 저장 비활성화 처리
cookie('search_history', NULL); setcookie ("content_keyword", "", time()-3600); $jsonArr['status'] = 1; echo json_encode($jsonArr); }
1
cbd96c0d400ff3089f648337ac640065
8a059801c8751d1960ac316ea99c13d5
Removes all ACEs for the Service User principal (except those that live beneath the System User's rep:User node)
{ ResourceManagerAdministrationProtocol adminProtocol = CreateAdminProtocol(); RefreshServiceAclsRequest request = recordFactory.NewRecordInstance<RefreshServiceAclsRequest >(); adminProtocol.RefreshServiceAcls(request); return 0; }
0
d29b23174adf90c5d551caf0df95aaf1
b1e9a0980f812448caaf8b44e0271a1a
Destroys a command
int i; for (i = 0; i < cmd->numArgs; i++){ free(cmd->args[i]); cmd->args[i] = NULL; } if (cmd->hasOutfile == TRUE){ free(cmd->outfile); cmd->outfile = NULL; } if (cmd->hasInfile == TRUE){ free(cmd->infile); cmd->infile = NULL; } free(cmd); ...
1
d93365d6f79ec2f6b13a21d91054dbc8
8e010c5463ce94e4c28346eedc507079
功能描述:从session中获取Agent <pre> Modify Reason:(修改原因,不需覆盖,直接追加.) </pre>
HttpServletRequest request = ServletActionContext.getRequest(); HttpSession session = request.getSession(); agent = (Agent) session.getAttribute(Constant.AGENT_SESSION_NAME); return SUCCESS; }
1
ffe2d748eb8dfcfd5ba59bcdd507d2ec
53715c553dd49ea51900f6291133a4bc
Exit a parse tree produced by SimpleCParser#typeSpecifier.
public class CPP14BaseListener implements CPP14Listener @Override public void exitSimpletypespecifier(CPP14Parser.SimpletypespecifierContext ctx) { }
0
f242990256281da78f8471df18a13d6d
97c17becaa0fd8906dc509cdd13c0de9
Проверить лицензию пользователя в указанном ППО
public class CheckRemoteDbUtils public static Integer checkPaspValidity(String passpNumber,Map<String,Object> params) throws PeopleException { if (StringUtils.isNotEmpty(passpNumber)){ String fmsSite = (String) params.get(SettingsKeys.FMS_DB_URL); String fmsLogin=(String) params.get(SettingsKe...
0
53fc93234bf33641e58b715723f23afb
13d01bbf17afd9021c9bc24561ffbbc4
功能: 获取随机字节 参数: iByteCounts 获取数量 pByteBuff 存放buff 返回: 无 修改:
pfl_random_getbytes(void *p, size_t len) { static unsigned char buf[RBUFSZ], *pos = buf + sizeof(buf); static psc_spinlock_t lock = SPINLOCK_INIT; static int fd = -1; size_t rem, amt; ssize_t rc; spinlock(&lock); if (fd == -1) { fd = open(_PATH_URANDOM, O_RDONLY, 0); if (fd == -1) psc_fatal("open %s", _PA...
1
25848d9288f1345b1660cbe3bb663bec
49a2d7767530d5eedf9bb60957f279a2
Enable the Boss Notes frame subsystem
function NS:OnLoad ( ... ) self:SetParent( OmegaMapNoteFrame ); return self.super.OnLoad( self, ... ); end
0
33d39561fd1c47f903bc504e4946031d
d2b5066066868edbecb5281b9906d4b9
Create a base feature extractor network that uses the VGG architecture to derive relevant visual features.
super(panet_vgg, self).__init__(cfg) self.features = nn.Sequential( self._make_layer(2, in_channels, 64), nn.MaxPool2d(kernel_size=3, stride=2, padding=1), self._make_layer(2, 64, 128), nn.MaxPool2d(kernel_size=3, stride=2, padding=1), self._ma...
1
e5a9b65fe3bcdd4196d783f7bd66ba3e
259bbe70982084af2df65e526963e688
Returns the new time advance as indicated by the random access response as specified in Section 4.2.3 of 36.213
TOS_TASK(MAC_ADAPT_CHANGE_PHASE) { TOS_SIGNAL_EVENT(MAC_ADAPT_CHANGE_PHASE)(VAR(msgPtr), TOS_CALL_COMMAND(MAC_ADAPT_SUB_NEXT_RAND)() & (unsigned int)0x3fff); return; }
0
933138382d1c3cad0be92ad1a882c8bd
3644fbca3c99ac3ed1fbad0fdf117022
Set the circumference of a tree.
{ if( x >= 0 ) numberOfSingleTreeRotations = x; }
0
f72e3a4dbaaadea0a41a14ad2ab387c4
0406e9d45e8c8555346f8e7d32a3c52c
Get all pet walkers
@RestController public class PetController @ResponseBody @GetMapping(value = "/Pets") public Iterable<Pet> getPets(){ return dao.findAll(); }
0
79f376f7e0fc03d17f2707e1db149d8d
07055caa35516c32f574db68be56b295
Simulate rolling dice with a chosen number of sides a chosen number of times.
def roll_die(number_of_rolls: int, number_of_sides: int) -> int: total = 0 for dice in range(0, number_of_rolls): total += random.randint(1, number_of_sides) return total
1
3e128bae5af5edc1fed09f71b815cebb
b7e2ed3e79b9bc73b26e250df802f0be
Whether this model exposes probabilities for its predictions. This property allows for the possibility that some, but not all instances of a `Model` are capable of exposing probabilities.
class LinearModel(ModelBase): def is_possible_predict_proba(self): return True
1
9ca1ace2ea5b0a5167cf080a737ed654
8ecf83961ea45200be37fa8a0160ccb3
Compute the SubWord operation.
static void SubWord( unsigned char temp[], unsigned char bit[]) { int i; for(i = 0; i < 4; i++) { ByteToBits(temp[i],bit); temp[i] = s[( bit[7] * 8 + bit[6] * 4 + bit[5] * 2 + bit[4] )][( bit[3] * 8 + bit[2] * 4 + bit[1] * 2 + bit[0] )]; } }
1
5dc35df3e064e9a28da65728b9aca988
de4c4a900e7a68e5e283e515aa88e056
Highlight a clicked intersection on the plan view.
if (highlighted != undefined ) { var sel = selected.indexOf(highlighted) if (sel >= 0) { selected.splice(sel, 1); wireframe.children[highlighted].material = edgeMaterial(paper.edges[highlighted]); } else { selected.push(highlighted); wireframe...
1
425f903cee8cf6304681d684614b1329
d49d61d9898d9cd3105897469fd061e8
return true if the configuration file for this handler exists.
boolean existsSpringConfigFile();
1
2d7ecf061510722c87c1111c9a8d84f0
2d106b0d4ea6a495acbe196a68b43f64
Return a deep copy of the graph.
class Graph(object): def copy(self): return Graph(self.edges)
0
e8b202014ab2d7f6ec041cb3ab13b70e
db8e946b6c0ae15309144edf0d0e93ca
Méthode certifiant que l'utilisateur est un administrateur
if($this->membreStatut = "Admin"){ return true; }else{ return false; } }
1
e9835d8c46b3702ab82b661558fe94c1
2f34764f60d3eb505e0841fab9c01db8
指定されたオクターブの指定された音を指定された強さで出します。
public class Instrument public void noteOn( int pitch, int velocity){ this.channel.noteOn((byte)pitch, (byte)velocity); }
1
9418e97091c3d5d989124241cac019e0
6b5d28f57d115a292d7f5c6b94e4a64d
All methods are considered safe, i.e. can be executed from within Eel
public abstract class InterpreterBase extends ParserVisitor protected boolean isSafe() { return options.isSafe(); }
0
b9db11895d33a05d3e2a4e39d86952a6
06d24476a99482a0439c1c7f1d8c39ed
获取出院诊断为目标疾病名的数据
@Service public class SyzdService public Map<String, Integer> getAllData() { List<String> strList = new ArrayList<>(); Map<String, Integer> resultMap = new HashMap<>(); List<Document> countPatientId = Arrays.asList( new Document("$unwind", "$shouyezhenduan"), new ...
1
28c530be1c93404b707a7d7fe8aacd13
022340951adef7d9f5598aa11bf649c3
Generates a sequence from a seed and a generator function.
let result = [fn(seed0)]; let iteration = [seed0]; let i = seed; while (cd(i)) { iteration.push(i); let v = fn(i); result.push(v); i = iter( iteration[iteration.length-1], iteration[iteration.length-2] ); } return result; }
1
54fc7904e4df2867043b24d0f9b937e1
e6fd1cee9e0cc219c48eb7ba10146481
This function calculates the jerk-minimizing trajectory that tries to keep a desired speed. The optimal trajectory is a quartic polynomial in this case.
jerk_1, jerk_2, jerk_3, jerk_4 = self.get_jerk() time = [0, 0, 0, accel/jerk_2, 0, accel/jerk_3, 0, 0] vel_1 = 0 vel_3 = cruise_v + 0.5 * jerk_2 * time[3]**2 - accel * time[3] vel_5 = cruise_v - 0.5 * jerk_3 * time[5]**2 vel_7 = 0 d = [0, 0, 0, vel_3 * time[3] + 0...
1
6e8fcb37b2590b25250692ed399f2dd7
1bfd29adae3dcd58e2a17dbabfd511ca
获取队列失败消息数量
try{ return mapper.getFailSize(); }catch(Throwable e){ DBCommonUtil.logError(this.getClass(), e); return 0; } }
1
727e818a92b766194aeca4d7aa8cde38
828975ea889da9ef9eb244218c101c2e
[!] -- error [*] -- info [+] -- ok
def info(text): logging.info(f'[*] {text}')
1
93299a88c5d5fe9e928e01028e0aac8a
bb3136cf69e229a41f03874b564c69a2
Gets the grid slot number on which the player lands on.
int getSlot();
1
3ab9040535b56820665a67214e0f7646
95543ca56287fd3fdd03ab03065fcd22
GET: ViewImage
{ if (id == null) { return new HttpStatusCodeResult(HttpStatusCode.BadRequest); } Image image = db.Images.Find(id); if (image == null) { return HttpNotFound(); } return View(image); ...
1
d9e676b36836700a9c3e0472f198b63d
5c4ad12da7b672ecb7a6926aab81f4bc
Checks some conditions to confirm error has actually occurred due to the CMS template code, not some external code. If the error has occurred in external code, the function will return false. Otherwise return true and modify the exception by overriding it's content, line and message values to be accurate against a CMS ...
abstract class ScrapeAbstract abstract protected function checkForErrors($result);
1
eac5d6785ad54e14d6553a777a843af7
ae7cca8eb0961459ff23080f3258aca8
开启授权服务器的access_token以及check_token节点 access_token路径开放使用 check_token路径需要认证后使用
@Configuration @EnableAuthorizationServer public class AuthorizationServerConfiguration extends AuthorizationServerConfigurerAdapter @Override public void configure(AuthorizationServerSecurityConfigurer oauthServer) throws Exception { oauthServer.tokenKeyAccess("permitAll()").checkTokenAccess("isAuthenticat...
1
3743f90490cab71209c6a31f204bd5ea
c739ec59aaea9267a7de5d3d15a220b4
Test init with iterable works.
TEST_HASH = 'sha256' TEST_DATA = [b'1', ] h = htree.HTree(TEST_HASH, iterable=TEST_DATA) with self.subTest(test='init'): self.assertEqual(len(h), len(TEST_DATA)) h.clear() self.assertEqual(len(h), 0)
1
b070eb225736751bce6af7d2dd09218a
6c9277f5e793938a5ecf0cf589fb8786
根据主键更新全量
int updateAllFieldsById(@Param(Constants.ENTITY) ENTITY entity);
1
314374f9c6ab7ab5da52536852099ef9
112ea0169686d385c52c7d5143423197
Determines whether or not this skill was interrupted based on current motion.
public class Skill public Boolean isArmorInterrupt() { return armorInterrupt; }
0
3b7799b574640fd55c5fdfa75b525946
67d516e9f18257b204a74f41cd98c933
魔法伤害减免
if (!isMagicDamage && target.iceblock) { return 0 } else if (!isMagicDamage && target.flagVanish && diceUtil.rollDice(100) <= config.vanishDodgePercent) { return 0 } else if (target.flagBear) { let newDamage = damage - config.bearDamageReduce if (newDamage < 0) { newDamage = ...
0
22f4bdb67896b1330bf44c27ba57a2fc
1471ce9ccd43a6ac8e1d98718bb202b5
DB에서 어트랙션의 평균별점 가져오기
public ArrayList<TeamStrVO> allTeamAverStr();
0
89ee7edef128786f1408481bbbd00ec3
5b5c6ead1e1e3bf4a4161a5c36762052
Returns the bk_tarikh_masuk of this Staff.
public Date getBk_tarikh_lahir();
0
4c7efcce867778f244c3f8788d58fb2c
ad76e8c3bf1b89e3ad706be2f260c896
不同的模型在构造时传入的生成方法是不一样的,这里直接调用传入的生成方法
public boolean modelGetterMethodGenerated(Method method, TopLevelClass topLevelClass, IntrospectedColumn introspectedColumn, IntrospectedTable introspectedTable, ModelClassType m...
0
97b04029cf2a5917a35aee7766940210
65274702471dff20b3fdca5c45561495
<p>Нестатический метод возвращает DDL для создания триггера.</p>
abstract class Trigger extends Query implements QueryInterface public function create(): string { return sprintf( "CREATE TRIGGER %s %s ON %s FOR EACH ROW BEGIN %s END ", $this->query->name, $this->query->event, $this->query->table, $this->getInstr...
1
b65e583e7530056eb9e5048674ca5800
5cf4cc5d7eb9ae52437035808e849a27
The default authorization strategy for this caller (ALLOW or DENY).
class ComputeInstancePropertiesArgs: def compute_instance_authorization_type(self) -> Optional[pulumi.Input[Union[str, 'ComputeInstanceAuthorizationType']]]: return pulumi.get(self, "compute_instance_authorization_type")
0
52e240cc26adeb05dad328b4440cae3d
9d302f53cec35d98f1b1d660b16870a5
Get latest delayed stat snapshot
namespace ES.Repository public class OrderRepository : IOrderRepository public OrderSnapshot GetLatestSnapshot(Guid orderId) { return _eventStore.GetLatestSnapshot<OrderSnapshot>(StreamNameFor(orderId)); }
0
6c507216d8330afff99f23228f321728
55cdc214c16088631e8ad35e67c9e405
Perform bi-linear interpolation.
function bilerp([x1, y1]: Vector, [x2, y2]: Vector, p: number): Vector { return [lerp(x1, x2, p), lerp(y1, y2, p)] }
0
d90ffef6556a7b233879cc7f767d2d09
665507c012680795774d23d10141d494
Redirect customer in Error page.
try { header('Location:' . $this->error_page); } catch (Exception $e) { die(); } }
1
d9cf668a44deefe7cdb7dc123bddada7
0536c012cf9aa81180298e636579f1e4
Inserta un registro en la entidad Concurso Parametros Generales
{ try { if (model!=null) { dbApp.tblPartidos.Add(model); dbApp.SaveChanges(); return model.parId; } } catch (Exception ex) { Glo...
0
a792ecd689835e465690ca5d3a2e3f65
9268771e6e6a3df377a24d4383024844
Get Giá trị tiền SGD - Tiền Singapor
val task = GetValueMany() println("_____dollar $dollar") try { val taskgit = task.execute(valueResourceHTTPS).get() val start = "USD" val finish = "INR" val pattern = Pattern.compile("$start(.*?)$finish") val matcher = pattern.matcher(t...
0
de14bda15109f19897baf3b8866a714c
84082f32402e4303ba52dc9a7ad09cf1
Grabs image and stores to internal cache.
fun getImage(imageID: Int, imageSearchCallback: ImageServiceInterface.ImageSearchCallback) { if (imageCache.containsKey(imageID)) { imageSearchCallback.onImageFound(imageCache[imageID]) } else { imageSearchCallback.onImageNotFound() } }
0
8af8ae65642ef674949e7ee995336836
8933e1c9d61dc28274ce87f3c3b63768
Palauttaa toiminnon kuvauksen (eli selityksen mitä toiminto tekee) käyttöliittymää varten.
public class Tekstikayttoliittyma @Override public String toString(){ return this.pelilauta.toString(); }
0
a2e615198f2f905caee7e14fbdaf4d4d
052b8a570cdb5ea57e82acc8b9b58d0a
Deserializes a sequence length.
namespace Example [System.Serializable()] public partial class SCDie public static Example.SCDie DeserializeLengthDelimited(Stream stream, Example.SCDie instance) { if (instance.AccountId == null) instance.AccountId = new List<string>(); long limit = global::Silen...
1
12b51241cc9a4f0ad1153dd6cad16a7b
c306fb518aa32975d00ca75be80bd6f5
一对多获取队伍失败比赛
def dis_league(league_id): league_teams = LeagueTeams.query(condition="league_id='%s'" % league_id, order='seq asc') if len(league_teams) != 14: raise 'team count error %s' % len(league_teams) league_matchs = [] for i, mm in enumerate(VIS_MAP): for m in mm: league_match = L...
0
4ac9fbde227683fdf98be7ae8029c6f8
50f5c23539df35dff700764657fefdc5
Teste do tamanho do conjunto de vértices
int contador = 0; for(int i = 0; i < 62; i++) { if(conjunto->Membros[i] == 0) contador++; } if(contador == 62) conjunto->vazio = 1; }
0
c070c98da1a9a38736a1dc0d12831e0f
467dc09ebc71beebe09b4ac993b16bd0
Anonymize an element (or related elements) to protect patient identity.
class ElementAnonymizer: def __call__(self, dataset: Dataset, data_element: DataElement) -> bool: raise NotImplementedError
1
769f3a9c8f2700f0564c759423e6dd38
7cd330eb35340a25a598c10abc69ae9b
Test for errors with doubling tendancy tones in a chord.
def test_melody(): evaluate('#d - - - |', [(63, 0.0, 4.0)]) evaluate('#d - | - - |', [(63, 0.0, 4.0)]) evaluate('@e - | z - |', [(63, 0.0, 2.0), (None, 2.0, 4.0)]) evaluate('@e - | _ - |', [(63, 0.0, 2.0), (None, 2.0, 4.0)]) evaluate('#d - | -e - |', [(63, 0.0, 2.5,), (64, 2.5, 4.0)]) evaluate('...
0