`
kingquake21
  • 浏览: 262561 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论
文章列表
from BeautifulSoup import BeautifulSoup AllFile = open("/home/me/Documents/JavaRelated/vmspec/AllInstuctionsSet.doc.html" , 'w') FirstFileName = "/home/me/Documents/JavaRelated/vmspec/Instructions2.doc.html" class SubInstructions: def __init__(self,index): ...
场景: A系统以一个生产者向Queue里连续发送了两条消息(消息1、消息2) B系统以一个消费者监听Queue,结果是先收到的消息2,再收到的消息1   目前这个问题正在调查…… 疑问1:对某个Queue只配置一个消费者,是否意味着只有一个线程在处理消息呢?
为了解析“2011-12-07 15:33:17.372 CST”这个字符串   import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; import java.util.Calendar; public class Test{ public static void main(String[] args) throws ParseException{ ...
这是一个通用的问题,很多业务场景下都存在,例如取出价格最贵的那个商品,取出最新的价格、等等   这类问题可以归为,如何将分组中最大值所在的行取出来   假设我们有一张表存储着”供应商ID_商品ID_采购价格_采购时间“四列信息,其中供应商ID_商品ID为联合主键 要求:对于某个商品,取出最近一次采购的价格?   错误作法: select supplier_id , product_id , last_price , max(last_time) from table where product_id = 12345 group by product_id  错误原因: ...
先看一下这个SQL SELECT o.custid, c.name, MAX(o.payment) FROM orders AS o, customers AS c WHERE o.custid = c.custid GROUP BY o.custid;  在标准SQL中,上面这句查询 是不合法的,因为该查询包含Group by子句,所以在select列表中的列只能是group by里面声明的列,或者是使用了聚集函数的列。而上面这句SQL中c.name不属于这两者   但是在Mysql中对Group by功能进行了扩展,使得在包含有group by子句的查询中也能select没 ...
Execution in the Kingdom of Nouns   They've a temper, some of them—particularly verbs: they're the proudest—adjectives you can do anything with, but not verbs—however, I  can manage the whole lot of them! Impenetrability! That's what I  say! — Humpty Dumpty Hello, world! Today we're g ...
everything runs in parallel, except your code   在node中,除了自己的js代码是单线程在运行,其他的都是并行的   可以这样理解,想象自己的js代码是国王,而node是他的佣人   一天的开始是由一个佣人将国王叫醒,问国王是否有什么需要,国王将任务的清单给佣人后,然后继续小憩   这个佣人拿着这个任务清单,并分发给各个部门去做   一旦某个任务完成了,佣人会立即向国王汇报,国王每次只能听取一个任务的汇报,如果有多个任务完成了,国王也只能每次听取一个任务的汇报   国王的任务由他的佣人们并行的完成了,但是国王却只能一次处 ...
在安装VirtualBox-4.1-4.1.4_74291_fedora15-1.x86_64时出现一个很奇怪的问题,说是kernal head不匹配,它想在找2.6.38的内核,但是系统上只有2.6.40 错误信息: Makefile:23: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR= and run Make again..  Stop. 因为我是一安装完系统就进行了系统升级,但是升级后一直没有重新启动,重启之后再安装就好了   mark一个链接: ...
在linux下,dump java thread 如果是在控制台中运行,则直接ctrl+\ 如果是在后台运行,可以先找到运行java到pid,然后kill -QUIT PID,会将thread dump内容输出到该java进程到标准输出流里,例如tomcat就会写在catalina.out里
转自http://www.jonboy60.com/2011/01/20/howto-install-kernel-pae/   The Linux kernel with support for up to 64GB of high memory. It requires a CPU with Physical Address Extensions (PAE). Physical Address Extension (PAE) is a feature to allow x86 processors to access a physical address space (inc ...
vi的查找替换功能太强了,但是不经常用总是忘,在博客里面记录一下 http://vim.wikia.com/wiki/Search_and_replace
http://vim.wikia.com/wiki/VimTip188 http://vim.wikia.com/wiki/Search_and_replace   When searching : . , * , \ , [ , ] , ^ , and $ are metacharacters. + , ? , | , { , } , ( , and ) must be escaped to use their special function. \/ is / (use backslash + forward slash ...
数据库中有一个currencies表,表中有一个字段code,类型为CHAR(3),用于存放“CNY”,“USD”之类的字符串 与之对应的Java对象中的字段是String类型   如果通过Entity映射,没有问题,可以; 但是通过原生SQL和ResultTransformer映射时,却总是出错 String sql = "select currencies.code, attr1, attrN from currencies, table1,tableN"; SQLQuery sqlQuery = session.createSQLQuery(sql); s ...
ebay第三版的架构分析
  从一张没有主键的表中找到所有重复的行 例如: A   B   C --------- 1   1   2 1   1   3 1   1   3 1   1   3   得到: 1   1   3   ——————   A   B   C --------- 2   1   2 2   1   3 2   1   3 2   1   2   得到: 2   1   2 2   1   3   当时想了很久,没有正确答案,回来之后想了一下,发现可以用group by来实现   select * from TableName group ...
Global site tag (gtag.js) - Google Analytics