compizConfig设置管理器 -> Ubuntu Unity Plugin -> Switcher 第3项第5项之间、第4项第6项之间 每次开机轮换启用禁用
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /etc/wpa_supplicant/wpa_supplicant.conf | |
# sudo ifup wlan0 启动wifi | |
# sudo ifdown wlan0 关闭wifi | |
country=GB | |
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev | |
update_config=1 | |
network={ | |
ssid="PYGMALION" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<build> | |
<plugins> | |
<plugin> | |
<groupId>org.apache.maven.plugins</groupId> | |
<artifactId>maven-jar-plugin</artifactId> | |
<version>2.6</version> | |
<configuration> | |
<archive> | |
<manifest> | |
<addClasspath>true</addClasspath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt-get install gnome-panel cd ~/.local/share/applications/ gnome-desktop-item-edit . --create-new 设置完毕后,~/.local/share/applications/下会生成以desktop为后辍的文件。 这时你在搜索栏中就可以找的到idea,之后把图标直接拉到启动器栏就可以了。 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def combcount(n,r): | |
f = lambda n,r:n*f(n-1,r) if n>r else 1 | |
return f(n,n-r)/f(r,0) | |
def permcount(n,r): | |
f = lambda n,r:n*f(n-1,r) if n>r else 1 | |
return f(n,n-r) | |
# 附带使用python的itertools求全排列、全组合函数 | |
import itertools as it |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Mocker<T extends Exception>{ | |
private void pleaseThrow(final Exception t)throws T{ | |
throw (T)t; | |
} | |
public static void main(final String[] args){ | |
try{ | |
new Mocker<RuntimeException>().pleaseThrow(new SQLException()); | |
}catch(final SQLException ex){ | |
ex.printStackTrace(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//数组方式处理 小数位有空格隔开 | |
function addCommas(val) { | |
var aIntNum = val.toString().split("."); | |
if (aIntNum[0].length >= 5) { | |
aIntNum[0] = aIntNum[0].replace(/\B(?=(\d{3})+(?!\d))/g, ","); | |
} | |
if (aIntNum[1] && aIntNum[1] >= 5) { | |
aIntNum[1] = aIntNum[1] ? aIntNum[1].replace(/\B(?=(\d{3})+(?!\d))/g, " ") : " "; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
隐藏元素的另一种方法是通过剪裁它们来实现。在以前,这可以通过 clip 属性来实现,但是这个属性被废弃了,换成一个更好的属性叫做 clip-path。Nitish Kumar 最近在 SitePoint 发表了“介绍 clicp-path 属性”这篇文章,通过阅读它可以了解这个属性的更多高级用法。 | |
记住,clip-path 属性还没有在 IE 或者 Edge 下被完全支持。如果要在你的 clip-path 中使用外部的 SVG 文件,浏览器支持度还要更低。使用 clip-path 属性来隐藏元素的代码看起来如下: | |
*/ | |
.hide { | |
clip-path: polygon(0px 0px,0px 0px,0px 0px,0px 0px); | |
} | |
/* | |
下面是一个实际使用它的例子: | |
如果你把鼠标悬停在第一个元素上,它依然可以影响第二个元素,尽管第二个元素已经通过 clip-path 隐藏了。如果你点击它,它会移除用来隐藏的 class,让我们的元素从那个位置显现出来。被隐藏元素中的文字仍然能够通过读屏软件读取,许多 WordPress 站点使用 clip-path 或者之前的 clip 来实现专门为读屏软件提供的文字。 |
OlderNewer