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 std::str; | |
fn main() { | |
// -- FROM: vec of chars -- | |
let src1: Vec<char> = vec!['j','{','"','i','m','m','y','"','}']; | |
// to String | |
let string1: String = src1.iter().collect::<String>(); | |
// to str | |
let str1: &str = &src1.iter().collect::<String>(); | |
// to vec of byte |
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
Emoji fun with KDB+/Q | |
unicode table: https://en.wikipedia.org/wiki/Emoji | |
h:8#-8!`$"😀" / get symbol header in bytes | |
d:8_-8!`$"😀" / starting emoji | |
10 cut {-9!h,x}@'(enlist[4#d] cross "x"$128 + til 64) cross 0x0 | |
`😀`😁`😂`😃`😄`😅`😆`😇`😈`😉 | |
`😊`😋`😌`😍`😎`😏`😐`😑`😒`😓 | |
`😔`😕`😖`😗`😘`😙`😚`😛`😜`😝 | |
`😞`😟`😠`😡`😢`😣`😤`😥`😦`😧 |
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
q){1 " ",string[x],"% "; 1 x#"=";1 "\r";system"sleep 0.1"}@'til 100;-1 "Done!"; | |
/ 37% ===================================== | |
/ Done!=================================================================================================== |
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
$ git status | |
On branch branch2 | |
Your branch is up-to-date with 'origin/branch2'. | |
nothing to commit, working directory clean | |
$ git merge master | |
Auto-merging readme.md | |
CONFLICT (content): Merge conflict in readme.md | |
Automatic merge failed; fix conflicts and then commit the result. | |
$ git diff | |
diff --cc readme.md |
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
In order to get kdb+/q 32-bit running on Ubuntu 64-bit you'll need to install: | |
``` | |
sudo apt-get install gcc-multilib | |
``` | |
Ubuntu no longer packages ia32-libs for 64-bit builds. |