这书不错,链接-装载-库 我觉得是很底层的东西。比如很多人闭着眼睛都能写出来的hello world(当然不包括brianfuck,如果你会,你真的闹残了吗= =), 其实链接编译器做了很多,不然就哪来的printf,这IO初始化也是CRT(c runtime)库完成的。堆栈的初始化,还有系统装载让程序运行等等。涉及很多。
书里后面就讲了一个CRT库,自己写一个,感觉不错,学了很多。比如mall...
分类:
其他好文 时间:
2014-06-22 06:46:27
阅读次数:
337
使用Linq提供的扩展方法Distinct可以去除序列中的重复元素。
该方法具有以下两种重载形式:
(1)public static IEnumerable Distinct(this IEnumerable source) (重载1)
通过使用默认的相等比较器对值进行比较并返回序列中的非重复元素。
(2)publicstatic IQueryable Distinct(this IQue...
分类:
其他好文 时间:
2014-06-22 11:07:47
阅读次数:
258
上篇文章讲到三层。接下来就通过一个实例具体的看怎么用三层实现用户登陆界面。
一、Model实体(LoginModel):
namespace LoginModel
{
//添加类:UserInfo Model实体作用:封装数据,使数据在三层中传输 ,更倾向于业务逻辑层
public class UserInfo
{
//定义用户...
分类:
其他好文 时间:
2014-06-22 11:37:36
阅读次数:
273
1.3 JBoss As 7安装
安装JBoss As 7分为下面几个步骤:
1. 下载JBoss
下载地址:http://www.jboss.org/jbossas/downloads 选择JBoss As 7 的7.1.1的社区版。
2. 解压:
#mkdir –p /usr/local/jboss
# unzip jboss-***.zip
# m...
分类:
其他好文 时间:
2014-06-22 11:36:42
阅读次数:
244
在此发现一个oracle漏动,eg:
DELETE JEW_LOG WHERE C_ID IN (SELECT C_ID FROM BAS_BATCHNO WHERE C_WARID='028' AND C_BATCHNOTYPE='P')
在这个DELETE 语句中子查询是报错的因为没有C_ID这个字段、所以JEW_LOG这张表就糟殃了数据98292条记录直接被删除、幸亏一直以来养成的好...
分类:
其他好文 时间:
2014-06-22 07:56:10
阅读次数:
400
POJ 3304 Segments
大意:给你一些线段,找出一条直线能够穿过所有的线段,相交包括端点。
思路:遍历所有的端点,取两个点形成直线,判断直线是否与所有线段相交,如果存在这样的直线,输出Yes,但是注意去重。
struct Point
{
double x, y;
} P[210];
struct Line
{
Point a, b;
} L...
分类:
其他好文 时间:
2014-06-22 12:06:30
阅读次数:
225
因为有了Struts1,俺们了解了开源框架;因为有了Struts2,俺们又知道了两个开源框架还可以合为一体。...
分类:
其他好文 时间:
2014-06-22 06:22:36
阅读次数:
182
/*
ID:kevin_s1
PROG:runround
LANG:C++
*/
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
#include
using namespace std;
//直接枚举即可
//gobal variable...
分类:
其他好文 时间:
2014-06-22 11:06:45
阅读次数:
185
用tarjan进行缩点。
然后用dfs求最长路。水体。。。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 110000
vectorold[maxn];
vectorvec[maxn];
int dnf[maxn],low[maxn],instac...
分类:
其他好文 时间:
2014-06-22 11:51:01
阅读次数:
203
如果不需要求边的个数的话,就是一个裸的最小割问题。
求边的个数就用边的权值记录一下。
#include
#include
#include
#include
#include
using namespace std;
#define INF 99999999
#define LL long long
const LL maxn =55;
const LL maxm =4400;
con...
分类:
其他好文 时间:
2014-06-22 11:15:00
阅读次数:
167
from:unix高级环境编程
unix/linux中共享内存是最高效的ipc方式。
有几种使用方式:
1)mmap /dev/zero设备:
fd = open("/dev/zero", O_RDWR);
area = mmap(0, size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
close(fd);
加入MAP_SHARE...
分类:
其他好文 时间:
2014-06-22 06:21:16
阅读次数:
215
破烂的文具盒里,一张十年的纸条子和一袋存了十年的德芙巧克力
浅绿色的纸条子上写是当时你给我抄的作业题目,蓝色清秀的字体
可是十年后,你却已嫁他人
将身后的风雪,夕阳,空气埋葬、窑藏,待很多年以后酿成美酒,开窑,与另一个人共饮...
分类:
其他好文 时间:
2014-06-22 07:59:02
阅读次数:
205
dp[i][j]:还有i个不相同的位置,还能走j步,一共有多少种走法。
很明显
dp[i][j]=sigm(dp[i-k][j-1]*c[i][k]*c[n-i][m-k]);
用记忆化搜索记忆一下即可。
#include
#include
#include
#include
#include
#include
#include
using namespace std;
#define m...
分类:
其他好文 时间:
2014-06-22 08:07:31
阅读次数:
203
使用l,r指针游动。
然后使用记录游动过程中的最大值。
我离散化了一下。
#include
#include
#include
#include
#include
#include
using namespace std;
#define maxn 110000
mapmp;
struct list
{
int x;
int get;
int lose;
in...
分类:
其他好文 时间:
2014-06-22 11:52:02
阅读次数:
226
As we all know,a thread is a separate process on your computer.you can run multiple threads all at the same time.
multi-threaded code has the disadvantage of becoming quite complex very quickly,altho...
分类:
其他好文 时间:
2014-06-22 07:25:06
阅读次数:
244
LinQ to Object是指对任意IEnumerable或Ienumerable集合使用linq查询.它可代替查询任何可枚举的集合.如List,Array或Dictionary.
LINQ的优点
和foreache相比有三个优点
它们更简明、更易读,尤其在筛选多个条件时。它们使用最少的应用程序代码提供强大的筛选、排序和分组功能。无需修改或只需做很小的修改即可...
分类:
其他好文 时间:
2014-06-22 08:56:16
阅读次数:
170