显示下一条  |  关闭

多情只有春庭月,犹为离人照落花

 
 
 
 
 
 

using std namespace

2012-5-16 4:07:37 阅读1 评论0 162012/05 May16

Explained as simply as possible, namespaces allows us to group a set of global classes, objects and/or functions under a name. If you specify using namespace std then you don't have to put std:: throughout your code. The program will know to look in the std library to find the object. Namespace std contains all the classes, objects and functions of the standard C++ library.

作者  | 2012-5-16 4:07:37 | 阅读(1) |评论(0) | 阅读全文>>

古代日本简史

2012-4-30 1:06:57 阅读1 评论0 302012/04 Apr30

发信人: zhaoce (米高蜥蜴), 信区: History
标  题: 古代日本简史
发信站: BBS 未名空间站 (Sat Apr 28 09:12:09 2012, 美东)

作者  | 2012-4-30 1:06:57 | 阅读(1) |评论(0) | 阅读全文>>

latex beamer 页面间超链接

2012-4-24 9:11:56 阅读8 评论0 242012/04 Apr24

\documentclass[red]{beamer}

%用pdf-latex进行编译

\usepackage[3D]{movie15}

\usepackage{hyperref}

作者  | 2012-4-24 9:11:56 | 阅读(8) |评论(0) | 阅读全文>>

latex insert C code

2012-4-12 23:51:56 阅读7 评论0 122012/04 Apr12

\verb@i*((pic->width-1)/8+1)+j/8@


or

\begin{verbatim}

ceil(pic->width/8)*pic->height

作者  | 2012-4-12 23:51:56 | 阅读(7) |评论(0) | 阅读全文>>

latex Verbatim Text

2012-4-10 7:31:49 阅读17 评论0 102012/04 Apr10

There are several ways to introduce text that won't be interpreted by the compiler. If you use the verbatim environment, everything input between the begin and end commands are processed as if by a typewriter. All spaces and new lines are reproduced as given, and the text is displayed in an appropriate fixed-width font. Any LaTeX command will be ignored and handled

作者  | 2012-4-10 7:31:49 | 阅读(17) |评论(0) | 阅读全文>>

动态语言

2012-4-6 21:03:10 阅读10 评论0 62012/04 Apr6

  所谓的动态类型语言,意思就是类型的检查是在运行时做的,比如如下代码是不是合法的要到运行时才判断(注意是运行时的类型判断):   def sum(a, b):   return a + b

execute at runtime many common behaviors that other languages might perform during compilation, if at all.


Examples

The following are generally considered dynamic languages:

作者  | 2012-4-6 21:03:10 | 阅读(10) |评论(0) | 阅读全文>>

latex table

2012-4-4 5:48:32 阅读9 评论0 42012/04 Apr4

\begin{table}[ht]
\caption{Nonlinear Model Results} % title of Table
\centering % used for centering table
\begin{tabular}{c c c c} % centered columns (4 columns)
\hline\hline %inserts double horizontal lines
Case & Method\#1 & Method\#2 & Method\#3 \\ [0.5ex] % inserts table
%heading
\hline % inserts single horizontal line
1 & 50 & 837 & 970 \\ % inserting body of the table

作者  | 2012-4-4 5:48:32 | 阅读(9) |评论(0) | 阅读全文>>

linker input file unused because linking not done

2012-3-28 1:15:45 阅读66 评论0 282012/03 Mar28

Compiler Flag Error Examples

> When I try to compile using the makefile, it gives me the 
> error :
>>make > gcc -Wall -c client1.c
> gcc -Wall -c -lsocket -lnsl libfile1.c
> gcc: -lsocket: linker input file unused because linking not done
> gcc: -lnsl: linker input file unused because linking not done

作者  | 2012-3-28 1:15:45 | 阅读(66) |评论(0) | 阅读全文>>

printf size_t

2012-3-27 12:16:26 阅读13 评论0 272012/03 Mar27

The printf format specifier %zu will work fine on C++ systems; there is no need to make it more complicated.

z      A  following  integer  conversion  corresponds to a
              size_t or ssize_t argument.

作者  | 2012-3-27 12:16:26 | 阅读(13) |评论(0) | 阅读全文>>

Mac Mouse Vim

2012-3-27 8:27:01 阅读12 评论0 272012/03 Mar27


set mouse=a

Just press alt key and click! (with mouse support previously activated in vim)

作者  | 2012-3-27 8:27:01 | 阅读(12) |评论(0) | 阅读全文>>

http://www.ferozeh.com/Prep/Questions/Question45.aspx

不能用xor: ^ in C.
#include <stdio.h>

int main(n)
{
    int a = 3, b = 2;
    int c = 6, d = 7;
    printf("%d, %d.\n", a^b, c^d);
}


This is indeed a trick question since the first solution that comes to mind is to

作者  | 2012-3-24 4:09:54 | 阅读(22) |评论(0) | 阅读全文>>

main 递归

2012-3-20 22:33:22 阅读12 评论0 202012/03 Mar20

定义为int n,与argc一样。

int n = 10;
int main(n)
{
       printf("%d\n", n);
       if (n==0)
               return 0;
       else
               main(n-1);
}


int n[] = {10}, *m=n;
int main(n)
{
    printf("%d\n", *m);
    if (*m==0)
        return 0;
    else
    {
        *m = *m-1;
        main(n);
    }

作者  | 2012-3-20 22:33:22 | 阅读(12) |评论(0) | 阅读全文>>

Bus error

2012-3-20 10:22:22 阅读25 评论0 202012/03 Mar20

Bus errors are usually signaled with the SIGBUS signal, but SIGBUS can also be caused by any general device fault that the computer detects. A bus error rarely means that the computer hardware is physically broken—it is normally caused by a bug in a

作者  | 2012-3-20 10:22:22 | 阅读(25) |评论(0) | 阅读全文>>

latex subfigure重新编号

2012-3-12 1:31:14 阅读10 评论0 122012/03 Mar12

在 \begin{figure}  后面加
\setcounter{subfigure}{0}

作者  | 2012-3-12 1:31:14 | 阅读(10) |评论(0) | 阅读全文>>

scalapack gather a distributed vector back to one processor

2012-3-5 8:54:19 阅读25 评论0 52012/03 Mar5

How do I gather a distributed vector back to one processor?

There are several ways to accomplish this task.

You can create a local array of the global size and each process will write his pieces of the matrix in the appropriate locations, and then you can do a call to the BLACS routine DGSUM2D to add all of them together and then leave the answer on one process or on all processes.

作者  | 2012-3-5 8:54:19 | 阅读(25) |评论(0) | 阅读全文>>

查看所有日志>>

 
 
 
 
 
 我要留言
 
 
 
留言列表加载中...
 
 
 
 
 
 
 
 

海外 美国

 发消息  写留言

 
人有太多烦恼,只是因为记忆力太好。曾经有多少悸动欢愉,而今就会有多少痛苦纠结。据说有一坛酒,叫做醉生梦死。喝了它的人,就会将前尘往事统统忘却,再也不会陷入过往,费神,伤心。
 
近期心愿Because of good memory, people can't forget annoying stuffs. How much joy in the past, how much pain there will be. It is said there is a wine called befuddled life. The one who drinks it will forget all the past and never become sad.
博客等级加载中...
今日访问加载中...
总访问量加载中...
最后登录加载中...
 
 
 
 
 
 
 
心情随笔列表加载中...
 
 
 
 
 
 
 
列表加载中...
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

页脚

网易公司版权所有 ©1997-2012

   
创建博客 登录  
 关注