query_id
string
corpus_id
string
query
string
code
string
label
int64
4ed2d7be5ed46cb2201e5a1ba234de91
df553be47b56eacf635d482d16803e6f
Waits for the pending asynchronous flush to complete.
try { flushLatch = new CountDownLatch(1); eventQueue.add(flushSentinel); flushLatch.await(); } catch (InterruptedException e) { } }
1
bea1acd8724ee3fb55ce3f854e0a2519
78b980d999190d46f879308ada372ee9
This operation is designed to allow sub-classes to provide implementations that read content of the provided {@link InputStream} and write content (same or different) it into the provided {@link OutputStream}. Both {@link InputStream} and {@link OutputStream} represent the content of the in/out {@link FlowFile}. The {@...
long invoke(InputStream is, OutputStream os) throws IOException;
1
ba1537408a2aed2311b67ac0e8ac5cb7
4e75d36692da877232ce15cdde9ad30d
重写computeScroll()方法,并在其内部完成平滑滚动的逻辑
public void computeScroll() { super.computeScroll(); if (mScroller.computeScrollOffset()) { scrollTo(mScroller.getCurrX(), mScroller.getCurrY()); postInvalidate(); } ObjectAnimator.ofFloat(this, "translationX", 0, 100) .setDurat...
1
8535019f00c1faa1f30dd86e1a763271
d914a02f3962635ff706371a550c189b
Draws the list of root menus on the given position.
self.menuWnd.clear() self.menuWnd.border("|", "|", "-", "-", "#", "#", "#", "#") for index, item in enumerate(self.mainmenu): mode = curses.A_NORMAL if index == self.position and self.__navigation == 'menu': mode = curses.color_pair(1) msg = ' ...
1
5e73046b0a7a4af31b294866bc49ec59
ab07b16c6510938eb0eaa20a71f242b2
Crust radiogenic power for 238U.
double fd238UConstant(double dNum,double dAge) { return fdRadheatConst(dNum,dAge,HALFLIFE238U); }
1
168975f50e422a0138bc5a8b4b76144e
8a58247ad00be75148bf9a0432ece21f
Returns the balance service.
public function balanceApi() : AllBalance;
1
2c7ea4bfd5e6ad207a44a8035a835a18
8a181becca817d5117245213dfd52099
通常破壊が行われた時の経験値取得処理
public class PlayerAct : Character public void onErased() { ++stock.Value; if (currentItemState != ItemState.Item5) { return; } for (var i = 0; i < Make_Num - 1; ++i) { ++stock.Value; } --ItemDurability; }
0
08c84fe7a1aaa285d5021293362ca929
54b610ed689a79c400e0d07208e49225
Create the Archive Index Sheet with a title row
{ $this->_excelTitle[$this->_fileIndex] = array(); if(!isset($this->_excelData[$this->_adID]) || empty($this->_excelData[$this->_adID]))return false; if(empty($this->_activeSheet[$this->_fileIndex]))return false; $title = array_keys($this->_excelData[$this->_adID]); foreach ( $title as $key=>$val ) { $...
1
bd42e1058726067672e737270f287004
d5aa124d066e0ccaf407f116aac23f95
=========================================================================== C-equivalent of R-function lagderiv ===========================================================================
lag.func<-function(x,k=1){ t=length(x) y=c(rep(NA,t)) for(i in (k+1):t){ y[i]=x[i-k] } return(y) }
0
eed6a96ba3b74212c1372ec9d0cd463d
2130f0caf61e00f436274a7dc7ce6744
根据用户编号、课程文章类型编号查询用户所发布的文章信息
public List<TCourseSiteArtical> findTCourseSiteArticalsByChannel(TCourseSiteChannel tCourseSiteChannel, Integer currpage, int pageSize);
0
fdef3bad8297d6a49b4ecc94570b3232
cf92455c4f35df780bc81f53bef6b7a0
点击新增成功确定按钮
class QueryTransferHandle: def click_inform_success_button(self): self.queryTransfer_page.get_inform_success_element().click()
1
cbc4fd08df2e8ca54f4d2b89ca6590fe
259d970443db990768f5d5c29d0b1a88
取出最大的cacheOrde,也就是最接近真实情况的cacheOrder
@Slf4j @Data @Configuration public class DataCacheConfig implements Serializable public long getRdmOrderId () { int interval = maxOrderId.intValue() - idStart.intValue(); return randomInt(interval > 1 ? interval : 1) + idStart + 1; }
0
6a3692bf75f1e451ebb27a54ab0dd2ca
db00ca2f1e1a36cbd0452ff102f1f57c
load the path to the file with ids as a global variable
def init(global_script_path): global SCRIPT_PATH SCRIPT_PATH = global_script_path
1
997ce0a8f23f0a619babdb9671a78e1c
36483cd631f26969df27ddea9010640d
Metoda ta zapobiega tworzenia liczby mnogiej dla nazw tabel
class pluginHitcounter extends Plugin private function createCounter($number) { $l = $this->getDbField('numberofchars'); while (strlen($number) < $l) { $number = '0'.$number; } return $number; }
0
0c2e1c5b78b2a4f9add32547c301b358
b0ff0a51d08dbf1cb07198971e457ad3
<p> 从页面content中提取图片信息(提取图片的路径和文件名,主要是*.gif文件) </p>
@Service @Transactional public class WmNewsServiceImpl extends ServiceImpl<WmNewsMapper, WmNews> implements WmNewsService private List<String> getImagesFromContent(String content) { List<Map<String,String>> list = JsonUtils.toBean(content,List.class); List<String> imageList = new ArrayList<>();; ...
0
0b95c19739ac635b9945940057b95707
111da9a7a0617ee59aea4b9519bf64ce
Set the content of the info window that pops up with the client's profile info when you click on its marker on the map.
public class MapsActivity extends FragmentActivity @Override protected void onCreate(Bundle savedInstanceState) @Override public View getInfoContents(Marker marker) { View v = getLayoutInflater().inflate(R.layout.infowindow_layout, null); infoButtonListener.setMarker...
1
fb51deaa711efade12d16b2f0aff763a
19778b78390c44d84b05b9f2df3cceaf
Ставит флажок разрешиющий запись куков в сессию. Нужно для добавления товаров в чек, через Ajax
try { localStorage.setItem('checkStore', true); canStore = true; } catch (err) { canStore = false; } }
0
1ffc8d43ab781c44df82fde1423ad98a
c773ea8a85bf7dc523389da32a342cfe
invert the 2x2 matrix formed by vector 4 and vector 10 where the vectors are columns
public class VectorRegisterB extends VectorRegisterA public boolean invert_5_10() { final double t = x_5; double invdet = x_5 * y_10 - y_5 * x_10; if (Math.abs(invdet) < ZERO_LIMIT) { return false; } invdet = 1.0 / invdet; x_10 *= -1 * invdet; y_5 *= -1 * invdet; x_5 = y_10 * invde...
0
62f289ab2556df4f3bee43bdd0411b74
67947d04515afe68afab2fa56f4434bd
Ensures no units still have the slow modifiers when the fissure is gone
void InfectionDeinitializer::onDedi() { Infection::resetWeaponInteractionAndEmblems(); h2mod->set_unit_speed_patch(false); }
1
9b552ff1a1d5207a36d011eb50dc35d6
1816ce71ffd682f3efac7a39836fec37
u"""删除ssid后,创建的ssid规则消失(testlink_ID:581)
netname = netNamePage(self.driver, self.url) netname.click_wirelessExtension() time.sleep(0.5) netname.click_netName() time.sleep(1) netname.click_list_edit4() time.sleep(1) netname.input_ssid('ssid_all中2') netname.click_next_tab() time.sle...
1
32f47db3fd3f0847bdbdf7340bdc1bf7
c1e23356953e4159d44fc0f72621cbeb
Executes an internal loop that exits when necessary
void quick6502_loop(quick6502_cpu *cpu) { cpu->running = true; while (cpu->exit_loop) { quick6502_exec_one(cpu); } cpu->running = false; }
1
2ad05aa10b60f74e4da5f182d10ff0c2
50e359e7822d857568735968815bcc95
Move certificates when required.
public void UpdateExchangeServiceCertificates() { var needSave = !_obj.State.IsChanged; var client = this.GetClient(); if (!Equals(_obj.HasExchangeServiceCertificates, client.CanGetOurSubscriberCertificates)) _obj.HasExchangeServiceCertificates = client.CanGetOurSubscriberCertificates;...
1
c89a04e3b72f5a054a632ad62bd12bd5
797b87ab77b630676948547dd694fed3
before parse: /moduleName/version/controller/action after parse: moduleName-version/controller/action
public class AjaxController extends HttpServlet private String parseActionName(String requestUrl) { if (requestUrl == null || requestUrl.length() == 0) { return ""; } requestUrl = requestUrl.replaceAll("\\\\", "/"); int last = requestUrl.lastIndexOf("/"); if (last >= 0) { requestUrl = requestUrl.substri...
0
52a0b034f7058fb96cf05340d6ae7528
172e9ac3d0aa940ce13c402b5dd8c126
Remove the specified ProductCategory from storage.
class ProductsCategoryController extends Controller public function destroy(ProductsCategory $productsCategory) { }
1
9ad82b24c0ff60bcacb33a3b82af8c1e
5ec8f7a5b4b9c1c1f7a1caca447041c4
## interpolate the parameters learned in GTM-LDLV by gaussian process regression (second step of PTG)
mu.temp <- parameters[[3]] orders <- rank(-sapply(mu.temp,'[[',1)) pi_g.temp <- pi_g z_clus.temp <- z_clus delta_g <- list() gamma_g <- list() mu_g <- list() beta_g <- list() Delt_g <- list() p_ig<-numeric(G) z_clus <- matrix(nrow = n, ncol = G) for(grp in 1:G){ order_ind <- which(orders == ...
0
41c9146138f0731f357a025fe30ddd9d
74318e5b42d6cb90e66a67816327c082
Test of getJournal method, of class Article.
jnl = pull_db.get_journal_obj(self.station_code, self.request_name) self.assertIsInstance(jnl, models.RequestsJournal) self.assertEqual(jnl.bus_station, self.station_code) self.assertEqual(jnl.request_name, 'ST')
0
1119524a87a34eedd7a30978a470f470
b5197512d3d7565c15371b4bcd830b73
Will switch the page to a provided index.
public void switchToPage(int index){ this.closeCurrentPages(); IPage page; if(this.pageController2 != null){ if( (!this.showCover && index%2 > 0) || (this.showCover && index%2 == 0 && index > 0)) { index -= 1; } } if(index < this.contentModel.getPages().getTotalPageCount()){ page = this.c...
1
a872a3f17b289d10a31438806634269c
d8d1141280b9328aafe7697c0262aa74
ثبت رکورد جدید مقادیر شمارشی
{ $this->load->helper(array('form', 'url')); $this->load->model('Model_number', 'number', TRUE); $this->load->model('Model_catemap', 'catemap', TRUE); if ($this->input->post('button')) { $this->load->library('form_validation'); if ($this->form_validation->run(...
1
2831cdb93e47a35f8e35bd7427f72ca0
cc152bc8dd40d09517d7be8f0194dd54
设置鼠标移到刻度上响应事件
namespace CM.AnnularProgress.Pie public partial class PieViewHP : ChartViewBase private void UpdateMarksTip() { var tip = tChart.Tools[0] as MarksTip; tip.MouseAction = MarksTipMouseAction.Move; tip.Style = GetTextStyle(m_DVM.LabelTypeEnum); }
1
3702140e1bf1f2ff928220723712d177
4440ce43d38595e4677256dc432e7d58
Don't activate keyboard shortcuts during text editing
function NS.Edit:OnEditFocusGained () NS.Shortcuts:EnableKeyboard( true ); end
0
7ad6e19d2f364d626d4e51a03d836f37
eeadc1929dd6f48dd7f13d22ca7f2513
Create new template spreadsheet with sheets base on prototype sheet.
wb_new = copy(self.templates['receivinglist']) sh_new = wb_new.get_sheet(0) sh_new.portrait = 0 cw = self.CHAR_WIDTH sh_new.col(0).width = math.trunc(6.15 * cw) sh_new.col(1).width = math.trunc(4.1 * cw) sh_new.col(2).width = math.trunc(10 * cw) sh_new.col...
1
83c2c6316f8ba656948713bc630510ee
228d01572b419afd61f039a04d077c59
Convert string value of the select field in a form to an array
abstract class AbstractField implements FieldInterface protected function getValueArray() { return explode(',', $this->value); }
1
6bde4813122cc33c4704d752d4b74d80
af6e8a43af258edcac659d0449b7a641
Dummy implemenation - not used!
class Rates(TrajectoryContainer): # Dummy function def dummy(self): print "test"
1
9d99db1818682f12ddba66cc916fad9c
d1a10fe97f4e987b8c202105e8cd238a
這個function 用來取得該張電影票的電影上映時間
class MovieExtract: def get_release_time(self, node, page_type=1): if page_type == 1: release_time = node.xpath('span/span[2]/text()')[0] year = int(release_time.split(',')[1].strip()) month_str = release_time.split(',')[0].strip().split(' ')[0].strip() month = in...
1
caf2c7c0665ca8ac164fb2707abd766c
3659c5eb825df26fd712ebe36684662b
Test addition of memento.
public class TestCases @Test public void mementoTest() throws IOException { String fileName = "read.txt"; Parser readFile = new Parser(); readFile.parseFile(fileName, new RealURLConnection()); readFile.getUrlReaderList().get(0).getMomento().setState("http://www.eli.sdsu.edu/index.html", Long.parseLong("1430866...
1
3e1538f08eb06852b2f9c46740199f7e
1232ab8f1165a92fac87ebf1c7eca7f6
Implemented manually because Lombok sets reference directly to field itself, not copying collection
@Getter @Setter public class SideEffectFromConstructorParamMutableParent implements MutableParent @Override public Set<MutablePerson> getChildren() { return new HashSet<>(children); }
1
6b83b512e78553c472157ce039b230a1
06c2014a6ba59107d55b9f7a92e93f71
Method turns on the advanced filter display for current table Turns off the fixed column;
void tradingDialog::on_AdvancedView_stateChanged(int arg1) { if (arg1 == 2) { ui->OpenOrdersTable->setColumnHidden(9, false); ui->OpenOrdersTable->setColumnHidden(10, false); ui->OpenOrdersTable->setColumnHidden(11, false); ui->OpenOrdersTable->setColumnHidden(12, false); ui-...
1
0e84297462e54196262480afdd0979d9
d9729e59d9874fecd87636e0b4aba97b
find the minimum number of hops from node_1 to node_2 Assuming the graph is connected
def min_distance(start, end):
1
eb2102c6096ab51b43a2cf44e3acb94e
ae7bd01c161f89842add17fc2027496e
Check whether the toDoList is merely a number
boolean b = true; try { while (b) { for (int j = 0; j < s.length(); j++) { if (!(s.charAt(j) >= 48 && s.charAt(j) <= 57)) { return false; } else { b = false; } ...
1
ca0481c2076d286473362798fad78882
25628d6760d9839452fe4e247e8bf14a
API version requested by the client
@JsonDeserialize @Value.Immutable abstract class _GetInfoResponse @JsonProperty("api_version") @Nullable abstract String getApiVersion();
0
3707bb99ac02dbbfee0a46d19a931b0b
c4faf1bb0fb9b8e0e6567a75787a8c4c
Callee side of fetchPhoto (fetch one photo). To fetch an image file, call this method repeatedly, starting at offset 0 and incrementing by the returned length each subsequent call. Repeat until a length of 0 comes back. not exist if the length is 0.
throws IOException { return out(width, height, len, null, request, response); }
0
ee092c2be49338dd4a3c52afd1ca7aa1
fdbf13a2c428e09b3752885a233608ba
数组转化成字符串[非json]
class Js extends Component protected function transformArray($value) { if (is_array($value)) { return json_encode($value); } }
0
826485a7fa372a5ed30e5d3fe64dbe55
10f53b8a252d53f7cf7977f94ad6593e
Test creating basic pet profile
{ $pet = factory(AnimalFriend\Pet::class)->create([ 'name' => 'Freddie', 'type' => 'Cat', ]); $this->seeInDatabase('pets', ['type' => 'Cat']); $user = factory(AnimalFriend\User::class)->create([ 'name' => 'bobsmith', 'email' => 'bob@exa...
1
ff3944977a2dc3b32cf851ff39c09919
8867b01dd8c8b032c4feec5e76f87271
Get all instances saved so far for a particular job.
class JobService(AbstractService): def get_job_instance_details(self, job_instance_id): pass
0
a18fe4a197ddb9640ff0b3c6795a52d5
0f5e736eff41ea0eff99d06baaa1618d
根据cart表中的cid更改uid(一条记录)
public class CartDaoImpl implements CartDao @Override public void updateCart(Cart cart) { String sql = "update cart set cnum = ?,ccount = ? where cid = ?"; try { queryRunner.update(sql,cart.getCnum(),cart.getCcount(),cart.getCid()); }catch (Exception e) { e.printStack...
0
b1c61691a0e7b17f59447bed76c2e9e1
920c299923a780ae622a053f72c98f83
编辑法律
$lid = base64_decode(I('get.p')); $count = M('Laws')->where('id=' . $lid)->count(); if(empty($lid) || $count <= 0) { $this->redirect(C('TMPL_EXCEPTION_FILE')); } $model = D('App/LawsRelation'); $data = $model->relation(true)->where('id=' . $li...
0
70a67c9ccf798e1754222c1e1d97f9f4
856500369fd3d6d4f6d72e11a7cd2ba7
crops image into circle, removes all points besides ones inside circle
def circle_crop(img, sigmaX=10): img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB) img = cv2.resize(img, (IMG_SIZE, IMG_SIZE)) img = crop_image_from_gray(img) height, width, depth = img.shape x = int(width/2) y = int(height/2) r = np.amin((x, y)) circle_img = np.zeros((height, width), np.uint8)...
1
74be5dd3713b1b58f0f83b35c19a900a
34725112b7aaabee5388f43a3c68e53d
CFL control based on Flux reduction
int i; for (i = 0; i < c.nx_tot; i++) { c.FL[rho][i] = c.UL[rho][i]*c.VL[vxn][i]; c.FL[vxn][i] = c.UL[rho][i]*c.VL[vxn][i]*c.VL[vxn][i]; c.FL[vxt][i] = c.UL[rho][i]*c.VL[vxn][i]*c.VL[vxt][i]; c.FL[vxb][i] = c.UL[rho][i]*c.VL[vxn][i]*c.VL[vxb][i]; c.FL[eng][i] = c.VL[vxn][...
0
750cd05596d544612beea96a99c4cd1b
bcdfb8dd9823e547b04a90dd748ca877
根据兴趣的一级分类进行推送
configs = get_config() recpairs = RecPair_online.objects.all() women_acc_cnt = defaultdict(int) men_acc_cnt = defaultdict(int) print len(recpairs) recPair_list = [] for recpair in recpairs: try: man = UserList.objects.get(openid=recpair.openid_man) woman = Use...
0
6792181b13b8e0dbffb0dd6ee1b93cd8
845acfb2d47a87c9e2cd63bcfaa24fae
# this function take a cutoff and return the accuracy, senstivity and pos_pred_value on a matrix shape and based on the results of this cutoff
pred <- ifelse(pd> pdcutoff, 1 , 0) ct <- table(pred,class) return(c( ct[1,1], ct[1,2], ct[2,1], ct[2,2] ,ct[1, 1] +ct[2,1] , ct[2,2] + ct[1,2] )) }
0
a46055538978dff551101d49fdab9058
9e84a0bd2b9504cee6343fe2077e0345
发送【调拨单(出库)】信息到EBS
try{ $sql = "SELECT djbh,yrrq FROM ckycd WHERE id = '{$dj_id}'"; $dj_info = $this->db->get_row($sql); if(empty($dj_info)){ throw new Exception('单据不存在'); } $sql = "SELECT sku,sl,sl2 FROM ckycdmx WHERE dj_id = '{$dj_id}'"; $dj_info['mx_list'] = $this->db->get_all($sql); if(empty($dj_info['mx_li...
1
8bd9865b46d6d4b5263427c21c1e94c4
02b82c5f4418a7f5f70256ff4c58da23
meiboNo6を返します。
public class NyujokenPostexParentParam public RString getMeiboNo4() { return this.meiboNo4; }
0
e55b4ca62563fc8423b4c184348d2c1b
b1be09b6b328779382a05accc39eb838
Search for an element on the page, starting from the current element.
{ Browser browser = context.Browser(); return browser.CurrentWithinElement() ?? browser; }
0
befcf8d592504304b081ca91f4f67e18
494a2f702364f0bc55c8805753382d98
Drawable to serve as a button to draw a frequency response.
super().__init__() self.model = model layout = QVBoxLayout() invisibleLabel = QLabel('') layout.addWidget(invisibleLabel) paramLayout = QHBoxLayout() self.blitHarm = mySlider('Harmonics', 0.0) paramLayout.addWidget(self.blitHarm) paramWidget = QWidget() paramWidget.setLayout(paramLayout) layout.ad...
0
004485883744642e1a7f7413e7636e8f
6f516e9048bb7479fa5d683aa66250ef
保存问题操作
class ProblemController extends Controller public function save(Request $request) { $this->problemService->save($request); }
1
9ae71ddb5503f39b55430090dbf10239
8221e89c013b187be6856f1c94fb35ed
Retourne les émotions de l'utilisateur.
namespace Photohack.Services Task<int> GetEmotionAsync(string text);
1
5dc6937f7e2870e3ce44533a7015c566
211aa281514ebf4208f4ca9fe6f5825f
UInt32Type constructor.
if (!(this instanceof UINT64)) return new UINT64(a00, a16, a32, a48); this.remainder = null; if (typeof a00 === "string") return fromString.call(this, a00, a16); if (typeof a16 === "undefined") return fromNumber.call(this, a00); fromBits.apply(this, arguments); }
0
becbb8dd917691b98f6fe696011f04c2
1f06a9037b34679194cc8284b68eb30f
Returns the xajax Javascript timeout
class Config extends Entity{ public function getTimeout(){ return $this->timeout; }
0
9ba3bfada1359fcf443e8dc1ae12b1fc
6bc303c95f69d1e21a4b45c3dda350dd
原本是input.to_s.parameterize,但是parameterize只支援英文跟數字,所以改用babosa的to_slug
toSlug(data) { return speakingurl(toPlainText(stripUnicode(data)), { custom: { _: '-' } }); }
1
2d177da20ce56416c221246bdc6f326f
2efb263ff8d30db12b5384372846fc17
Retorna o xml referente às mensagens de Exception da lib atual.
class MoIP: def get_xml(self): return etree.tostring(self.enviar_instrucao)
0
789084bb2e683359c965a235432b62fc
45cfe6d396554647dd5dab7a96b8d497
根据订单获取订单投诉状态
int complaintOrder(Order order);
0
aa98c71cc92f2a0165b3c0891e0dd2ce
d5298e1ade6cf76aa489e8f3fc60dba2
Basic input/output for adding a MenuItem to the order. Outputs the Menu to the client and allows a selection.
int orderID, tableID; int choice; tableID = OrderBoundary.getPendingTableID(); orderID = getOrderID(tableID); do { choice = OrderBoundary.editChoice(); if (choice == 1) { addingItems(orderID); } if (choice == 2) { removingItems(orderID); } } while ((choice == 1) || (choice == 2)); r...
0
7402db724a6c48d89f900a2d29173b38
2a8a748f4b63284e86d1578d53a11068
deletes a testcase. Keyword arguments: request -- the calling HttpRequest testcase_id -- id of the testcase to delete
def testcase_delete(request, cid): case = TestCase.objects.get(id=cid) case.delete() return HttpResponseRedirect("/testcase/")
1
13a52fdfff4f6c0c350f6cc47a3f47d8
37e61e383c572dc4b35acfe6e3197409
武器攻击时间间隔计时
this.attackMonsterTimeCounter += dt; if (this.attackMonsterTimeCounter > this.AttackInterval) { this.attackMonsterTimeCounter = 0; for (let index = 0; index < this.hitedMonsterIds.length; index++) { let monsterUid = this.hitedMonsterIds[index]; let...
1
af7d713885e60c8ade83b69959d1f555
db6ee157c5fddfefd12841c6fef3769e
Check if you won if all three values are the same.
class Board(object): def equal3(self, a, b, c): return a == b and b == c
1
e988a04ae9c00e0fc5d688fddfe4c801
0a124012cc9877e9274751baab942bd6
route GET '/admin/updateconfirmation' -- Affichage de la page de confirmation de mise à jour
{ if (Request::post('type') === 'show') { echo $this->view->render('admin/update'); } }
0
496d33720f5ab82710f666bd4f04f796
c3ff9e6ad320922ca07dc26d80818563
获得所有专辑音乐的url
let data = new URLSearchParams(); data.append('id', id); return this.http.get(`${this.musicApiURL}/music/url`, { search: data }) .map(response => response.json()); }
0
31906b66d4ffd808eae8894c9c2b454d
06eb1ac7b02ffe45f7aa903187ce2fdb
Stores the contents of the Y register into memory.
class ZeroPage(): def zpx_sty(self): addr = self.decoder.addr_x self.cpu.mem_bus.write(addr, self.cpu.y) return addr
1
0a4edfe67c155e8636cc8c0947ddd4c6
52782915c14a0a5ee565597b856a0827
14. Проверка фильтрации по assignee (имеется МНОГО Issues c искоемым именем assignee)
class FilterBuilderTest @Test public void testDescription() { Taskmanager tm = Taskmanager.getInstance(); assertFalse(tm.isEmpty()); Predicate<Task> desc = FilterBuilder.description("Assignment"); ObservableList<Task> tasks = tm.getTasks(); List<Task> result = tasks.stream().filter(desc).collect(Collectors.t...
0
1aeaaec821805e5276dcf6f875efde6b
b9bebf9025b6dda65a5df245b9079c61
Will ask if user wants to play again and will wait until either "Y" or "N" is pressed. Can handle both upper and lower case
playAgain=' ' while playAgain[0].upper() not in ['Y', 'N']: playAgain=input("Do you want to play another game? (Y/N) ") return playAgain[0].upper() == "Y"
1
6dfb3fd3828718652d384b2445eb5c61
0400ce67d9c7d61f0433aad155a3f114
Returns a hash code for this <see cref="T:System.Drawing.Size"></see> structure.
{ unchecked { var hashCode = (Family != null ? Family.GetHashCode() : 0); hashCode = (hashCode * 397) ^ Size.GetHashCode(); hashCode = (hashCode * 397) ^ (int)Weight; hashCode = (hashCode * 397) ^ (int)Style; return hashCode; } }
0
aae00b4b5a84a53133b798cc2173fe6e
d0c225295344de19651a647d6ebe9f52
Subtraction to avoid overflow problems and negatives. If the difference a-b is less than 0 it is assigned the value 0.
TDFUminus(TDF_INT64 a, TDF_INT64 b) { TDF_INT64 sum; lo_u32(sum) = lo_u32(a) - lo_u32(b); if (lo_u32(sum) > lo_u32(a)) { hi_u32(sum) = hi_u32(a) - hi_u32(b) - 1; } else { hi_u32(sum) = hi_u32(a) - hi_u32(b); } return sum; }
0
ee9f1727f95570fb418eb41fa126e009
6775e8082bce5ae8cd5f9c907aac53dc
makes the search results visible when text is entered into search
function expandSearch(){ document.querySelector("form input[type=text]").style.display = "inline-block"; }
0
9915468d9cb87a152761f0eb07ad203f
fc7d0f3901a740d1bfcf300709e0a7c0
Return the number of elements of the arithmetic sequence start + step * i which are <=end and which are divisible by factor
int count = 0; for (int index = i; index <= j; index++) { if ((index - Integer.parseInt(String.valueOf(new StringBuilder(String.valueOf(index)).reverse()))) % k == 0) { count++; } } return count; }
0
f009eb38da473819a144f669cd738a76
3ba18b13aeb3b4cf036ffe25fadd8fa9
When detecting orchestrator agents, one might need to try several IPs before finding the good one. The first url returning a 200 and validating the lambda will be returned. If no lambda is provided, the first url to return a 200 is returned.
def find_teleserver(networks): for network in networks: hosts = [host for host in network] pool = multiprocessing.Pool(processes=10) responses = pool.map(try_reach_ip, hosts) response = [str(ip) for ip in responses if ip] return response
0
fa08cc738e4b92df28cd390cb02e700a
1488deaf8d2aa0fc19254f7ff1de8db3
Get all collision frames attached to a link frame.
vector<class tGridEntry *> & entries, const tCollisionSkin * skin) { TRACE_METHOD_ONLY(MULTI_FRAME_3); entries.resize(0); tGridEntry * entry = (tGridEntry *) skin->GetExternalData().mPointer; if (!entry) { TRACE("Warning = skin %s has grid entry 0!\n", skin); return; } int i, j, k; tScalar f...
0
4d79abe1a4f9783f9f3396b01c3c9d6d
7dedc0a49f1732db95a557a1b59ac9e7
Constructs a complete group topic.
{ Controls.Add( new LiteralControl("<dl>") ); Controls.Add( new LiteralControl( "<dt>Id</dt>" ) ); Controls.Add( new LiteralControl("<dd>") ); Controls.Add( new ForumTopicId () ); Controls.Add( new LiteralControl("</dd>") ); Controls.Add( new LiteralControl( "<dt>Title</dt>" ) ); Controls.Add( ne...
1
5bf5346713c200c0d72d9b556cafffa6
1eda49904defe7c61ded109d8b8186d9
Detect file type by mime.
$finfo = new \finfo(); $this->mime_type = static::getMimeType($this->file_path); if (!in_array($this->mime_type, $this->mime_types)) { $this->error[] = 'Unknown file type'; return false; } return true; }
1
8ed543671c8d70d2b60c1c2fefc13dec
ce4821b7ec29c3d795c2bb0c5025e711
功能:获取声明的所有 activity 完整路径名
@Data @SuppressWarnings("all") public class Apk public List<String> getActivity() { if (CollectionUtil.isEmpty(activity)) { activity = getMainFestFileElesAttrValue("activity", "android:name"); } return activity; }
1
502bf0e9449d7add5f8a8c6641f89c7c
3f3c830e14118bf2d6370e0ca6d4deaa
Visits ValueAssignEx.
{ switch (_p_->kind) { case is_NumAssgnv: visitNumvar(_p_->u.numassgnv_.numvar_); visitNumval(_p_->u.numassgnv_.numval_); break; default: badkind(Numassgn); } }
0
eef7b073e42bc1f2715020cbb53b13ac
1560cf66850645eb9b1ef5437d7672d1
Returns the first proto trace in |link_prefix|/trace/traceEvents/
public function getProtoInfo($link);
0
012912120ce9be861c3b2e55a9013de2
55df65414000e9771a923a1776dbaa63
Base URL where the video manifest file is located, for example "repository/[video_id]"
@BoxResourceType("file_request") public class BoxFileRequest extends BoxResource public class Info extends BoxResource.Info public String getBaseUrl() { return this.baseUrl; }
0
0eaec6e01b949eff0d471309f96dcb85
3db18128f45315390f68702ad1767e08
<odoc> <key>CSV.setSeparator(aSeparator)</key> Sets the default separator to use when building a CSV output (default is ;) </odoc>
void setSeparator(String value);
1
0513c337324cf094bda50a97615c0c90
886344c8b62e1cd235afe09c67a34982
通过案件Id查询典型案例
Map findCaseById(String fid);
1
53d93392341e0e99646517ef213310e6
db8d4049fc92a05255f5cc796d9b3551
Metodo que faz a inicializacao dos leitores e escritores
void initialize_readers_writer() { sem_init(&key,0,1); }
1
950e55cde0315a7db6f11334b165c2f6
6421f337ae40ea682bb7c94d6ed9a14b
Convert U.S./Imperial units to SI/Metric units
var imperial_display = document.getElementsByClassName("imperial")[0].style.display; if (imperial_display == "inline-block") { showUnits("metric"); hideUnits("imperial"); } else { showUnits("imperial"); hideUnits("metric"); } return; }
0
5401347a1bbd9ce99bcb097ad4af7671
8552cb7c549f454b90562123204482bb
This will revert the location of the police officers back to their initial starting point (upon loading the characters last checkpoint)
void APirateGameCharacter::BeginPlay() { Super::BeginPlay(); CurrentCheckpoint = GetActorLocation(); }
0
17ff101441be8101cc63aefc80a4d905
2c31a475cdb785ab56d53ae09fa58721
Returns indices of GPUs to use for a process. These indices already respect the CUDA_VISIBLE_DEVICES envvar. I.e. if CUDA_VISIBLE_DEVICES is '1,2,3', then from torch's there are three visible GPUs with indices 0, 1, and 2. Therefore, in this case gpus_for_process(0, 1) returns [0], gpus_for_process(1, 1) returns [1], e...
def cuda_use_gpus(gpu_ids): os.environ['CUDA_DEVICE_ORDER'] = 'PCI_BUS_ID' os.environ['CUDA_VISIBLE_DEVICES'] = _cuda_get_gpu_spec_string(gpu_ids)
0
53567038681e8e903cfb553ecbd06815
853ac95ea557377db5af3fb4280c7fb1
Проверка на правильность при добавлении 'Rubric'
class Rubric extends \yii\db\ActiveRecord public function rules() { return [ [['name'], 'string', 'max' => 255], ]; }
1
21719cf45164523a80a44cfebd2b14c9
cb22d7bb74744caf824ccb6b405059a7
註冊子任務。
namespace Mozlite.Tasks public class TaskServiceConfigurer : IServiceConfigurer public void ConfigureServices(IServiceCollection services) { services.AddSingleton<IHostedService, TaskHostedService>(); }
0
89a3914025acc8578761e256a449453c
08f72304260722b88f0fc5a9377a35ef
Starting point.
def main() -> None: print("Hello world!")
1
b085e0df16df9aea95e172d25e10aa41
7da07029a853b454bc65cf76d7420868
Finds the maximum character length upto which the given strings are equal.
ai = len(a) ac = 0 bc = 0 maxLength = 0 while(ac < ai): if(a[ac] == b[bc]): maxLength +=1 ac +=1 bc+=1 else: return maxLength return maxLength
1
f9771d6af5f9f275a4ee5c11c89293d8
d88de2a81c3edbf72ed29374bcff4f4d
判断当前线程本地存储中,业务操作是否禁用了数据权限过滤,如果禁用,则不进行后续的数据过滤处理了。
@Aspect @Component public class PecadoDataScopeAspect public static void dataScopeFilter(JoinPoint joinPoint, PecadoUser user, List<Role> roleList, String deptAlias, String userAlias) { StringBuilder sqlString = new StringBuilder(); for (Role role : roleList) { String dataScope = role.getD...
0
a2d1eba322cecfcd125d1927c82aee06
bea11522d107f7e93363135ec6aa2623
Метод установки значений ширины и высоты предыдущего изображения
namespace ImageEditor public class ImgEditor private void SetImageSizes() { SizeX = image.Width; SizeY = image.Height; }
1
6d17a328702f0c9f6ddfa3de827baeef
f0c5ea12c16df317b6438c20f2e4f062
Prints the current draw of the two motors
public class DrivetrainSubsystem extends PIDSubsystem public void printEncoders() { System.out.println(getRightEncoderDistance() + ", " + getLeftEncoderDistance()); }
0
cfaf277d26edb8025a2b7d19d3fccf10
0497797bc5a998e28287252785f0458c
An object that implements just the write method of the file-like interface.
class FileWriter(object): def __init__(self, name): super(FileWriter, self).__init__() self._file_object = None self._name = name
0
47d998eb127df57254a2935ca52810a8
f186fcc355a5fdc26fb40a25ff6571aa
Show the form for creating new news.
class NewsController extends Controller public function create() { return $this->news->showForm(); }
1
268f87afce1f51d519ffd6e8bd4e6bc2
2c24ff53e0d5f81e716d1e1ec04e1e58
Metodo para listar todos los maestros
class MaestrosController extends Controller public function index() { $maestros = Maestro::all(); return view('maestros.index', compact('maestros')); }
1
d2973c7db8589e184382cebfbdf65bf5
671f2ac69d3a17ff0f084ab33bc74102
符合条件的题目数量
String sql_p1 = "select count(distinct t.id) from exam_question t, exam_question_study1 p1 where t.id = p1.question_id and p1.prop_val_id = ? and t.parent_id = 0"; String sql_p2 = "select count(distinct t.id) from exam_question t, exam_question_study2 p1 where t.id = p1.question_id and p1.prop_val_id = ? and t.pare...
1
62ef47af1700bac3c1f8aabe3ae574a7
efe9c08feba9dc435a1d8d45dac0327d
gibt die Kindknoten eines Baumes als Liste zurück
namespace ImplementGraph.Classes public class Graph public List<Node> GetNeighbors(Node root) { return root.Children; }
1