This file contains hidden or 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
{[:input] [:label]} | |
(h/clone-for [[k v] (:choices q)] | |
[:input] | |
(h/set-attr :name (-> q :question-id name) | |
:id (name k) | |
:value (name k)) | |
[:label] | |
(h/do-> | |
(h/set-attr :for (name k)) |
This file contains hidden or 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
user> (zero? 1) | |
false | |
user> (zero? 0) | |
true | |
user> [0 1 2 0 3] | |
[0 1 2 0 3] | |
user> (filter zero? [0 1 2 0 3]) | |
(0 0) | |
user> (count (filter zero? [0 1 2 0 3])) | |
2 |
This file contains hidden or 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
open [file-name] -a emacs |
This file contains hidden or 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 ln -fhsv 1.6.0 /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents | |
sudo ln -fhsv 1.6.0 Current | |
sudo ln -fhsv 1.6.0 CurrentJDK |
This file contains hidden or 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
find . -name "*.elc" -type f | xargs rm -f |
This file contains hidden or 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
:repl-options {:port 10101 :host "0.0.0.0" } |
This file contains hidden or 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
lvextend -L +5G /dev/ubuntu/data | |
减少5G | |
lvresize -L -5G /dev/ubuntu/data | |
三、增加swap空间。 | |
一般swap是内存的2倍,但是如果一不小心在安装时少分了点,那就有点郁闷了。没关系,lvm可以增加swap空间。 | |
1、free查看swap的卷标 | |
#free |
This file contains hidden or 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
_coverImage = [UIImage imageNamed:@"Default.png"]; | |
} | |
[self.view addSubview:_coverImage]; | |
[UIView beginAnimations:@"FadeOutCover" context:nil]; | |
[UIView setAnimationDuration:0.5f]; | |
[UIView setAnimationDelegate:self]; | |
[UIView setAnimationDidStopSelector:@selector(removeAndDeleteCover)]; |
This file contains hidden or 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
VBoxManage modifyvm "Your VM Name" --natpf1 "guestssh,tcp,,2222,,22" | |
ssh root@localhost -p 2222 |
This file contains hidden or 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
- (void)viewWillAppear:(BOOL)animated | |
{ | |
[super viewWillAppear:animated]; | |
if (!maskLayer) | |
{ | |
maskLayer = [CAGradientLayer layer]; | |
CGColorRef outerColor = [UIColor colorWithWhite:1.0 alpha:1.0].CGColor; | |
CGColorRef innerColor = [UIColor colorWithWhite:1.0 alpha:0.0].CGColor; |