Write an S-expression calculator with following functionalities:
- Reads the expressions from
stdin
and prints the output tostdout
- Note that you should guarantee that your program only writes revelant
Write an S-expression calculator with following functionalities:
stdin
and prints the output to stdout
#include <cstdio> | |
#include <cassert> | |
#include <cctype> | |
#include <cstring> | |
#include <cstdlib> | |
#define SCAST_FLOAT(x) static_cast<Float*>(x) | |
#define SCAST_INT(x) static_cast<Int*>(x) | |
/* Abstract interface for numbers */ |
Ted Yin <ted.sybil@gmail.com>
sudo apt-get install apparmor-utils
{ | |
"vars": { | |
"@gray-base": "#000", | |
"@gray-darker": "lighten(@gray-base, 13.5%)", | |
"@gray-dark": "lighten(@gray-base, 20%)", | |
"@gray": "lighten(@gray-base, 33.5%)", | |
"@gray-light": "lighten(@gray-base, 46.7%)", | |
"@gray-lighter": "lighten(@gray-base, 93.5%)", | |
"@brand-primary": "darken(#428bca, 6.5%)", | |
"@brand-success": "#5cb85c", |
#include "base/kaldi-common.h" | |
#include "util/table-types.h" | |
#include "util/parse-options.h" | |
#include <map> | |
using namespace kaldi; | |
const char *usage = | |
"Concatenate features with speaker level ivector (e.g. appending speaker\n" | |
"ivector to each frame of the corresponding utterance)\n" | |
"Usage: append-ivectors <ivector-rspecifier> <utt2spk-rspecifier> <in-rspecifier2> <out-wspecifier>\n\n" |
/* | |
* Author: Ted Yin (Maofan Yin) <ted.sybil@gmail.com> | |
* Description: Implementation for performing a move in direction left in 2048 game | |
*/ | |
class Game2048 { | |
public int moveLeft(int[][] b, int i) { | |
int bonus = 0; | |
int h = 0; /* b[i][0..h-1] has its final value and cannot be changed | |
again (exactly the same definition in your hint) */ |
imap <C-h> deleteChar | |
imap <C-w> deleteWord | |
unmap x | |
map d closeTab | |
map u lastClosedTab | |
map <C-u> scrollPageUp | |
map <C-d> scrollPageDown | |
map <C-p> J | |
map <C-n> K | |
set smoothscroll |
extern crate winit; | |
extern crate libc; | |
extern crate x11_dl; | |
fn main() { | |
let mut events_loop = winit::EventsLoop::new(); | |
unsafe { | |
libc::setlocale(libc::LC_CTYPE, b"zh_CN.utf8\0".as_ptr() as *const _); | |
let xlib = x11_dl::xlib::Xlib::open().expect("get xlib"); | |
(xlib.XSetLocaleModifiers)(b"@im=fcitx\0".as_ptr() as *const _); |