“初始化 定义 赋值” 之间的联系与区别
 
           本来很早之前就想写个blog,说说这三个家伙的区别和联系,三者之间各种联系,很难比较清楚的讲明白,感觉当时好像分析思路还不够“完整”。今天遇到别人抛出来的一个问题。根本的问题是和初始化和赋值有关系,于是留下这个blog。
#include 
struct _ANIBMP
{
        int FirstNu...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:04:54   
                                阅读次数:
384
                             
                         
                    
                        
                            
                            
                                在浏览器与服务器进行交互时,往往需要把涉及到的一些数据保存下来,这时就需要使用cookie或session进行状态管理。
这篇文章先来说说session怎么用,首先在servlet中创建一个session来保存信息,举个例子,在做登陆验证时,如果登陆成功,需要将用户的信息保存到session中,怎么保存呢?下面给出代码:
 public class Login_Do extends HttpS...
                            
                            
                                分类:
Web程序   时间:
2014-07-22 23:03:52   
                                阅读次数:
355
                             
                         
                    
                        
                            
                            
                                表
a = { }
b = { x = 1, ["hello, "] = "world!" }
a.astring = "ni, hao!"
a[1] = 100
a["a table"] = b
function foo()
end
function bar()
end
a[foo] = bar
--分别穷举表a和b
for k, v in pairs(a) do
print(k, "=>",...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:00:33   
                                阅读次数:
261
                             
                         
                    
                        
                            
                            
                                题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=5170
Attack on Titans
Time Limit: 2 Seconds      Memory Limit: 65536 KB
Over centuries ago, mankind faced a new enemy, th...
                            
                            
                                分类:
其他好文   时间:
2014-07-22 23:00:16   
                                阅读次数:
536
                             
                         
                    
                        
                            
                            
                                sed‘s/^/\//g‘4行首增加指定字符提取网页中的播放地址:#!/bin/bash
printf"enteryourdir:"
readdir
echo"$dirisxx"
cd$dir
echo`pwd`
forfilein`ls.`
do
if[-d$file];then
echo$file
cd$file
echo`pwd`
tree`pwd`|grepplay|sed‘s/.*//g‘>11
tree`pwd`|grepplay|sed‘s/.*//g..
                            
                            
                                分类:
其他好文   时间:
2014-05-03 00:53:15   
                                阅读次数:
336
                             
                         
                    
                        
                            
                            
                                题目链接:
http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemCode=3749
Chameleon
Time Limit: 6 Seconds      Memory Limit: 65536 KB
Given n groups of integers(all the integers are distin...
                            
                            
                                分类:
其他好文   时间:
2014-05-02 19:06:34   
                                阅读次数:
447
                             
                         
                    
                        
                            
                            
                                Reverse a linked list from positionmton. Do it 
in-place and in one-pass.For example:Given1->2->3->4->5->NULL,m= 
2 andn= 4,return1->4->3->2->5->NULL.No...
                            
                            
                                分类:
其他好文   时间:
2014-05-02 09:10:46   
                                阅读次数:
252
                             
                         
                    
                        
                            
                            
                                - (void)viewDidLoad{ [super viewDidLoad]; // Do any 
additional setup after loading the view, typically from a nib. [NSThread 
sleepForTimeInte...
                            
                            
                                分类:
移动开发   时间:
2014-05-02 00:25:42   
                                阅读次数:
441
                             
                         
                    
                        
                            
                            
                                You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could you do this in-place?
刚开始没有思路,但是自己举了几个简单的栗子才看出规律:需要一圈儿一圈儿的变换位置。有两层for循环:外...
                            
                            
                                分类:
其他好文   时间:
2014-05-01 18:33:34   
                                阅读次数:
359
                             
                         
                    
                        
                            
                            
                                1. 调用其他的.lua文件   dofile("xx.lua");  
2. 避免用 "_VERSION"这类的标识符,Lua将这类标识符用作特殊用途,通常保留"_"作为”哑变量“
3. Lua的一些保留字:
   do in local nil until 等
   
4. 注释:-- 表示行注释   --[[ ... ]] 表示块注释
一般的块注释这样写:
--[[
...
                            
                            
                                分类:
其他好文   时间:
2014-04-30 22:34:38   
                                阅读次数:
270