Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.
| Ctrl+C | copy current line (if no selection) |
| Ctrl+X | cut current line (if no selection) |
| Ctrl+⇧+K | delete line |
| Ctrl+↩ | insert line after |
| from http://stackoverflow.com/questions/21060234/ruby-operator-precedence-table | |
| N A M Operator(s) Description | |
| - - - ----------- ----------- | |
| 1 R Y ! ~ + boolean NOT, bitwise complement, unary plus | |
| (unary plus may be redefined from Ruby 1.9 with +@) | |
| 2 R Y ** exponentiation | |
| 1 R Y - unary minus (redefine with -@) |
| def fibonacci(n) | |
| raise "bad argument" if n < 1 or n.is_a? Float | |
| return 1 if n == 1 or n == 2 | |
| fibonacci(n-1) + fibonacci(n-2) | |
| end | |
| n = Integer(ARGV[0]) | |
| 1.upto(n) {|x| print fibonacci(x).to_s + " "} | |
| print "\n" |
| # This file is NOT licensed under the GPLv3, which is the license for the rest | |
| # of YouCompleteMe. | |
| # | |
| # Here's the license text for this file: | |
| # | |
| # This is free and unencumbered software released into the public domain. | |
| # | |
| # Anyone is free to copy, modify, publish, use, compile, sell, or | |
| # distribute this software, either in source code form or as a compiled |
| // http://en.wikipedia.org/wiki/Simplex_algorithm | |
| #include "SimplexAlgorithm.h" | |
| #define M 200 | |
| #define N 100 | |
| int main(void) | |
| { | |
| int n, m, i, j; | |
| printf("请输入总的变量的个数和松弛变量的个数:\n"); | |
| scanf("%d %d", &m, &n); |
| #include <iostream> | |
| #define MAX 100 | |
| using namespace std; | |
| int main(void) | |
| { | |
| int i, j, m, n; | |
| double a[MAX]; | |
| cout << "please input n: "; |
| #include <iostream> | |
| using namespace std; | |
| int main() | |
| { | |
| int flag; | |
| long int a, b; | |
| long double result; | |
| char operation; |
| #include <stdio.h> | |
| #include <string.h> | |
| void mcopy(char *, char *, int); | |
| int main(void) | |
| { | |
| char a[80], b[80]; | |
| int m; |
| #include <stdio.h> | |
| int search(int *a, int, int); | |
| int main(void) | |
| { | |
| int a[10], i, x; | |
| int j = 0; |
| #include <stdio.h> | |
| void sumDiff(int, int, int *, int *); | |
| int main(void) | |
| { | |
| int a, b, sum, diff; | |
| while(scanf("%d %d", &a, &b) != EOF) { | |
| sumDiff(a, b, &sum, &diff); |