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
#include <iostream> | |
int main() | |
{ | |
std::cout << "The size of scalars:" << std::endl; | |
std::cout << "int\t" << sizeof(int) << std::endl; | |
std::cout << "long\t" << sizeof(long) << std::endl; | |
std::cout << "short\t" << sizeof(short) << std::endl; | |
return 0; |
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
#include <cstdio> | |
int main(int argc, char *argv[]) | |
{ | |
FILE* f = fopen("assert.log", "a"); | |
fputs("hello", f); | |
fclose(f); | |
return 0; | |
} |
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
; ^ ctrl ! alt # win | |
; super paste | |
SetKeyDelay 30 | |
#v::Send {raw}%clipboard% | |
; hide window | |
#PgDn:: |
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
^!v::SendInput from SendInput: %clipboard% | |
^!a::WinHide A | |
^!b::WinShow |
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
/* | |
* (gdb) print d | |
* $1 = 10.1 | |
* (gdb) print f | |
* $2 = 10.1000004 | |
*/ | |
#include <stdlib.h> | |
int main() { |
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
using UnityEngine; | |
using System.Collections; | |
public class touch : MonoBehaviour { | |
public int life = 3; | |
// Use this for initialization | |
void Start () { | |
} |
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
using UnityEngine; | |
using System.Collections; | |
public class touchit : MonoBehaviour { | |
private string result = "none"; | |
// Use this for initialization | |
void Start () { | |
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
function bmi(w, h) | |
-- BMI 身体质量指数 用来衡量胖瘦和是否健康的一个标准 | |
-- 体重过低 <18.5 | |
-- 体重正常 18.5~23.9 | |
-- 超重 24.0~27.9 | |
-- 肥胖 ≥28 | |
-- http://zh.wikipedia.org/wiki/%E8%BA%AB%E9%AB%98%E9%AB%94%E9%87%8D%E6%8C%87%E6%95%B8 | |
-- w:体重 kg | |
-- h:身高 m | |
return w / (h * h) |
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
[palsenberg-repo] | |
name=palsenberg-repo for CentOS 5 | |
baseurl=http://www.palsenberg.com/rpmrepo/ | |
gpgcheck=0 |
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
#include <iostream> | |
class Foo { | |
public: | |
Foo() : a(0) {} | |
public: | |
int a; | |
}; | |
void myprint(const Foo& foo = Foo()) { |