One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
const encrypt = (str, key) => str | |
.split('') | |
.map(s=>(s.charCodeAt()^key).toString(16)) | |
.join('g') | |
; | |
const decrypt = (str, key) => str | |
.split('g') | |
.filter(Boolean) | |
.map(s=> String.fromCharCode(parseInt(s,16)^key) ) | |
.join('') |
const numfix = (n, t) => t[ | |
(n %= 100, 20 > n && n > 4) ? 2 | |
:[2,0,1,1,1,2][ (n %= 10, n < 5) ? n : 5] | |
] | |
; | |
const a = ['день','дня','дней']; | |
numfix(1, a) // день | |
numfix(2, a) // дня | |
numfix(5, a) // дней |
Installing and configuring Qt | |
Download and install the latest Qt. | |
Install necessary extra packages for Qt: | |
For 64-bit machines: sudo apt-get install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 | |
For the emulator: sudo apt-get install libsdl1.2debian:i386 | |
Android dev environment | |
Download the latest Android SDK and uncompress it. | |
Edit your ~/.bashrc file by adding these line at the end: export PATH=$PATH:/path/to/android-sdk-linux/platform-tools:/path/to/android-sdk-linux/tools | |
You should logout and login again to update the PATH variable. | |
In a terminal, run android and install the suggested packages. |