bar

js

♀尐吖头ヾ 提交于 2019-12-04 13:43:01
创建过去七天的数组 [... Array ( 7 ). keys ()]. map ( days => new Date ( Date . now () - 24*60*60*1000 * days )); 获取URL的查询参数 ? foo = bar & baz = bing => { foo : bar , baz : bing } let q = {}; location . search . replace ( /([^?&=]+)=([^&]+)/ g , ( _ , k , v ) => q [ k ] = v ); console . log ( q ); 数组去重 [...new Set(arr)] 创建特定大小数组 [... Array ( 3 ). keys ()] // [0, 1, 2] 来源: https://www.cnblogs.com/xiumumi/p/11868789.html

vue中的自定义分页插件组件

妖精的绣舞 提交于 2019-12-04 12:17:19
介绍一下,已经有很多的vue分页的组件了,大家都是大同小易,那么我就结合自身的使用,写出了一片文章 首先在新建一个分页模块 在模块中引入相应的代码,(内有详细的注释) template中 <div class="page-bar"> <ul> <li class="first"> <span>共{{dataNum}}条记录 第 {{cur}} / {{all}} 页</span> </li> <li v-if="cur>1"> <a v-on:click="cur--,pageClick()"><</a>//点击上一页 </li> <li v-if="cur==1"> <a class="banclick"><</a>//点击第一页时显示 </li> <li class="li_a" v-for="index in indexs" v-bind:class="{ 'active': cur == index}"> <a v-on:click="btnClick(index)">{{ index }}</a>//页码 </li> <li v-if="cur!=all"> <a v-on:click="cur++,pageClick()">></a>//点击下一页 </li> <li v-if="cur == all"> <a class="banclick">></a> /

PHP对象继承

≡放荡痞女 提交于 2019-12-04 10:51:57
PHP对象继承 <?php class foo { public function printItem($string) { echo 'Foo: ' . $string . PHP_EOL; } public function printPHP() { echo 'PHP is great.' . PHP_EOL; } } class bar extends foo { public function printItem($string) { echo 'Bar: ' . $string . PHP_EOL; } } $foo = new foo(); $bar = new bar(); $foo->printItem('baz'); // Output: 'Foo: baz' $foo->printPHP(); // Output: 'PHP is great' $bar->printItem('baz'); // Output: 'Bar: baz' $bar->printPHP(); // Output: 'PHP is great' ?> 来源: https://www.cnblogs.com/newmiracle/p/11856253.html

博客园界面美化

怎甘沉沦 提交于 2019-12-04 09:01:09
0.感谢原作 https://www.cnblogs.com/menxin- ... 1.页面css代码 /** 原有样式修改 */ #sideBar{ display: none; } #mainContent{ width: 100%; box-shadow: 0 0 0; border-radius: 0px; opacity: 0; transition:0.5s; margin-top:40px; } #main{ width: 60%; background-color: white; /*max-width: 700px;*/ } @media screen and (max-width: 1000px) { #main {width: 100%;} } body{ background-image: none; background-color:white; font-family: Menlo,Bitstream Vera Sans Mono,DejaVu Sans Mono,Monaco,Consolas,monospace !important; line-height: 1.8; } #cnblogs_post_body{ font-size: 16px; } #green_channel{ display: none; } #post_next_prev{

群体分化指数 FST

本小妞迷上赌 提交于 2019-12-04 02:00:41
1 Weir & Cockerham, 1984 Weir BS, Cockerham CC (1984) Evolution 38:1358-1370 1.1 一对等位基因 \( \hat \theta = \frac{a}{a+b+c} \) \( a = \frac{\bar n}{n_c} \left\{ s^2 - \frac{1}{\bar n - 1} \left[ \bar p (1 - \bar p) - \frac{r-1}{r} s^2 - \frac{1}{4} \bar h \right] \right\} \) \( b = \frac{\bar n}{\bar n - 1} \left[ \bar p (1 - \bar p) - \frac{r-1}{r} s^2 - \frac{2 \bar n - 1}{4 \bar n} \bar h \right] \) \( c = \frac{1}{2} \bar h \) \( \bar n = \frac{\sum{n_i}}{r} \) \( n_c = \frac{r \bar n - \sum{n_i^2} / r \bar n}{r-1} \) \( \bar p = \frac{\sum{n_i \tilde p_i}}{r \bar n} \) \( s^2 = \frac{\sum{n

pyEcharts安装及使用指南

主宰稳场 提交于 2019-12-03 23:39:40
pyEcharts安装及使用指南 ECharts是一个纯Javascript的图表库,可以流畅的运行在PC和移动设备上,兼容当前绝大部分浏览器,底层依赖轻量级的Canvas类库ZRender,提供直观、生动、可交互、可高度个性化定制的数据可视化图表。ECharts提供了常规的折线图、柱状图、散点图、饼图、K线图,用于统计的盒形图,用于地理数据可视化的地图、热力图、线图,用于关系数据可视化的关系图、treemap,多维数据可视化的平行坐标,还有用于BI的漏斗图、仪表盘,并且支持图与图之间的混搭。 pyEcharts 目前有 0.5 及以下版本和 1.0 以上版本,新版的 pyecharts发生了许多变化。最为明显的是以前调整变量的命令现在都发生了改变。width是旧版本中对图表调整的参数,在新版本这一功能被调整到了option里面。网上大部分教程都是0.5及以下版本。 pip install -i https://pypi.tuna.tsinghua.edu.cn/simple pyecharts==0.5.10 自从 v0.3.2 开始,为了缩减项目本身的体积以及维持 pyecharts 项目的轻量化运行,pyecharts 将不再自带地图 js 文件。如用户需要用到地图图表,可自行安装对应的地图文件包。下面介绍如何安装。 全球国家地图: echarts-countries

扩展运算符,Object.assign

北城余情 提交于 2019-12-03 12:38:54
2019独角兽企业重金招聘Python工程师标准>>> assign或者...扩展符 都是浅拷贝 对象中的扩展运算符(...)用于取出参数对象中的所有可遍历属性,拷贝到当前对象之中 Object.assign 方法用于对象的合并,将源对象 (source) 的所有可枚举属性,复制到目标对象 (target) 如果在拷贝 属性值是对象时,拷贝的是对象的引用地址 可以简单深拷贝: 借助 JSON.parse 。因为字符串转成对象之后就是一个新的对象 var a={title:'a',name:{a:'1',b:'2'}}; var b = JSON.parse(JSON.stringify(a)) b.name.a='3'; console.log(a,b) ========================= let bar = {a:1,b:2}; let foo = {c:3, ...bar} ==> 等价于 let foo = Object.assign({},bar); let bar = [1,2,3] let foo = [4,...bar] 任何 Iterator 接口的对象(参阅 Iterator 一章),都可以用扩展运算符转为真正的数组 foo (a,b,c){ const args = [...arguments]; =>等价于 Array.prototype

Search view bar and other action bar icons are not working properly

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I have implemented the search functionality in my android application along with the sorting of recycler view items in ascending and descending order.I have used action bar icons to perform these operations.My ascending and descending order icons works properly when I don't click search bar icon at all,but as soon as I click on my search bar icon to search something and then I try to sort my recycler view list by clicking on the sorting icons then it doesnt performs sorting.What is the issue? Here is my code for my activity and adapter-->

Update WPF progress bar while filling DataSet, all using Rx

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I'm a bit new in Rx, so please excuse me if this seems silly or obvious... I have an application which at a certain time, is meant to scan a selected folder and retrieve all files recursively, after which it needs to store them in a database. I would like to display a progress bar during that process while keeping the UI responsive of course. A cancel button would also be nice at a later stage. I've implemented this using Rx, like so: // Get a list of all the files var enumeratedFiles = Directory.EnumerateFiles(targetDirectory, "*.*",

OS X key event in menu bar app (Swift)

匿名 (未验证) 提交于 2019-12-03 10:24:21
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: I've been working on a Cocoa project recently. It's a menu bar/status bar-only application. I need some extra information to appear in the menu bar app when the user holds down the option key, and I've been looking everywhere to see how this is possible without any windows showing onscreen. Is it possible to run keyDown: from AppDelegate.swift to do this? Guidance is appreciated. Thanks! 回答1: I am not sure if you can monitor the key down globally but the option key you can do as follow: NSEvent.addGlobalMonitorForEventsMatchingMask