每个cpu都有队列来处理接收到的帧,都有其数据结构来处理入口和出口流量,因此,不同cpu之间没有必要使用上锁机制,。此队列数据结构为softnet_data(定义在include/linux/netdevice.h中):
/*
* Incoming packets are placed on per-cpu queues so that
* no locking is needed....
分类:
系统相关 时间:
2014-05-23 07:29:17
阅读次数:
514
在某些条件下,我们要求网站的某页上显示指定的信息,
但是这种指定如果固定去用代码写死的话,对以后的改动将会是大麻烦;
这时候sql语句的优势就凸显出来,利用sql语句只需要改改数字,就能让显示的内容彻底替换;
代码如下:
[e:loop={'select * from phome_ecms_news where id in (2452,2697,2299,2267)',4,24,0...
分类:
数据库 时间:
2014-05-22 13:14:19
阅读次数:
425
http协议中的头信息和正文是采用空行分开,什么是空行呢?简单来说,就是\r\n\r\n。
所以将服务器返回的数据用\r\n\r\n分开后的结果,一个是头信息,一个是正文信息。
C#的代码如下:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
usi...
分类:
其他好文 时间:
2014-05-22 12:55:02
阅读次数:
300
??
A Stack or A Queue?
Time Limit:
1 Second Memory Limit: 32768 KB
Do you know stack and queue? They're both important data structures. A stack is a "first in last out" (FILO) data ...
分类:
其他好文 时间:
2014-05-22 12:24:38
阅读次数:
236
测试结论
mysql版本 5.1
表类型: innodb, row_format=compact (这是默认的行格式)
插入超过10个blob, blob的数据量很小(
插入超过10个blob, blob的数据量很大(>768字节), 插入失败:报 Got error 139 from storage engine。
注意,如果mysql服...
分类:
数据库 时间:
2014-05-22 11:55:10
阅读次数:
347
Remove Nth Node From End of List删除链表倒数的第N个元素...
分类:
其他好文 时间:
2014-05-22 11:15:52
阅读次数:
170
当我们想让自己的属性设置保存下来,这时就需要SharedPreferences。
上面这个小程序,音乐状态是保存下来的。使用的上一次退出的状态。
进入DDMS,data文件下的data文件中,找到自己的包名文件,双击打开,有shared_prefs文件,里面有xml文件,这就是配置文件。
本程序使用了android的上下键,同常我们的模拟器的方向键是不能用的,这是就需要我们打开它,在C盘下找到文件 .android,双击avd文件,找到你的模拟器的文件夹,双击打开,找到config.ini,打开,修改arm...
分类:
移动开发 时间:
2014-05-22 08:55:22
阅读次数:
347
A
123
var a = $(".content")[0].firstChild.data;
function al(){
alert(a);
}
window.onload=al;...
分类:
其他好文 时间:
2014-05-22 07:00:08
阅读次数:
254
#查看数据库版本
mysql> select @@version;
+------------+
| @@version |
+------------+
| 5.5.16-log |
+------------+
1 row in set (0.00 sec)
mysql> select * from information_schema.schemata; # 保存了系统...
分类:
数据库 时间:
2014-05-20 15:05:07
阅读次数:
456
戳我去解题Given a linked list, remove thenthnode from
the end of list and return its head.For example, Given linked list:
1->2->3->4->5, and n = 2. Aft...
分类:
其他好文 时间:
2014-05-20 08:04:28
阅读次数:
291