??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美成人小视频,日韩一区精品视频,久久免费看少妇高潮http://www.aygfsteel.com/shijian/zh-cnWed, 18 Jun 2025 00:11:36 GMTWed, 18 Jun 2025 00:11:36 GMT60meta学习 - 前辈kafkahttp://www.aygfsteel.com/shijian/archive/2013/07/06/378641.html矛_ | Fat Mind矛_ | Fat MindSat, 06 Jul 2013 06:57:00 GMThttp://www.aygfsteel.com/shijian/archive/2013/07/06/378641.htmlhttp://www.aygfsteel.com/shijian/comments/378641.htmlhttp://www.aygfsteel.com/shijian/archive/2013/07/06/378641.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/378641.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/378641.html

http://incubator.apache.org/kafka/design.html

1.Why we built this
    asdQactivity stream dataQ数据是M|站的一部分Q反映网站用情况,如:那些内容被搜索、展C。通常Q此部分数据被以log方式记录在文Ӟ然后定期的整合和分析。odQoperation dataQ是关于机器性能数据Q和其它不同途径整合的操作数据?br />     在近几年Qasd和od变成一个网站重要的一部分Q更复杂的基设施是必ȝ?br />      数据特点Q?br />         a、大吞吐量的不变的adQ对实时计算是一个挑战,会很Ҏ过10倍or100倍?/span> 
        b、传l的记录log方式?span class="Apple-style-span" style="font-family: verdana, 'courier new'; font-size: 14px; line-height: 21px; color: #000000; ">respectable and scalable方式L持离U处理,但是延迟太高?br />
    Kafka is intended to be a single queuing platform that can support both offline and online use cases.

2.Major Design Elements

There is a small number of major design decisions that make Kafka different from most other messaging systems:

  1. Kafka is designed for persistent messages as the common caseQ?span class="Apple-style-span" style="font-size: 14px; ">消息持久
  2. Throughput rather than features are the primary design constraintQ?span class="Apple-style-span" style="font-size: 14px; ">吞吐量是W一要求
  3. State about what has been consumed is maintained as part of the consumer not the serverQ?span class="Apple-style-span" style="font-size: 14px; ">状态由客户端维?/span>
  4. Kafka is explicitly distributed. It is assumed that producers, brokers, and consumers are all spread over multiple machinesQ?span class="Apple-style-span" style="font-size: 14px; ">必须是分布式
3.Basics
    Messages are the fundamental unit of communicationQ?br />     Messages are
 published to a topic by a producer which means they are physically sent to a server acting as a brokerQ消息被生者发布到一个topicQ意味着物理的发送消息到brokerQ?br />     多个consumer订阅一个topicQ则此topic的每个消息都会被分发到每个consumerQ?br />     kafka是分布式Qproducer、broker、consumerQ均可以由集的多台机器l成Q相互协?a logic groupQ?br />     属于同一个consumer group的每一个consumer processQ每个消息能准确的由其中的一个process消费Q?span class="Apple-style-span" style="color: #222222; font-family: Arial, sans-serif; font-size: 15px; line-height: 22px; ">A more common case in our own usage is that we have multiple logical consumer groups, each consisting of a cluster of consuming machines that act as a logical whole.
    kafka不管一个topic有多个consumerQ其消息仅会存储一份?br />
4.Message Persistence and Caching

4.1 Don't fear the filesystem !
    kafka完全依赖文gpȝd储和cache消息Q?br />     大家通常对磁盘的直觉?很慢'Q则使h们对持久化结构,是否能提供有竞争力的性能表示怀疑;实际上,盘到底有多慢或多块Q完全取决于如何使用盘Q?span class="Apple-style-span" style="color: #222222; font-family: Arial, sans-serif; font-size: 15px; line-height: 22px; ">a properly designed disk structure can often be as fast as the network.
    http://baike.baidu.com/view/969385.htm raid-5 
    http://www.china001.com/show_hdr.php?xname=PPDDMV0&dname=66IP341&xpos=172 盘U类
    盘序d的性能非常高, linear writes on a 6 7200rpm SATA RAID-5 array is about 300MB/secQ?/span>These linear reads and writes are the most predictable of all usage patterns, and hence the one detected and optimized best by the operating system using read-ahead and write-behind techniques。顺序读写是最可预见的模式Q因此操作系l通过read-head和write-behind技术去优化?br />     C操作pȝQ用mem作ؓdisk的cacheQAny modern OS will happily divert all free memory to disk caching with little performance penalty when the memory is reclaimed. All disk reads and writes will go through this unified cache. 
    JvmQa、对象的内存开销是非常大的,通常是数据存储的2倍;b、当heap数据增大Ӟgc代h来大Q?/span>
    As a result of these factors using the filesystem and relying on pagecache is superior to maintaining an in-memory cache or other structure。依赖文件系l和pagecache是优于mem cahce或其它结构的?/span>
    数据压羃QDoing so will result in a cache of up to 28-30GB on a 32GB machine without GC penalties. 
    This suggests a design which is very simple: maintain as much as possible in-memory and flush to the filesystem only when necessary. 可能的l持在内存中Q仅当必L写回到文件系l?
    当数据被立即写回到持久化的文Ӟ而未调用flushQ其意味着数据仅被写入到os pagecaheQ在后箋某个旉由os flush。Then we add a configuration driven flush policy to allow the user of the system to control how often data is flushed to the physical disk (every N messages or every M seconds) to put a bound on the amount of data "at risk" in the event of a hard crash. 提供flush{略?/span>

4.2 
Constant Time Suffices
    
The persistent data structure used in messaging systems metadata is often a BTree. BTrees are the most versatile data structure available, and make it possible to support a wide variety of transactional and non-transactional semantics in the messaging system.
    Disk seeks come at 10 ms a pop, and each disk can do only one seek at a time so parallelism is limited. Hence even a handful of disk seeks leads to very high overhead. 
    Furthermore BTrees require a very sophisticated page or row locking implementation to avoid locking the entire tree on each operation.
The implementation must pay a fairly high price for row-locking or else effectively serialize all reads.
    持久化消息的元数据通常是BTreel构Q但盘l构Q其代h太大。原因:寻道、避免锁整棵树?br />     
Intuitively a persistent queue could be built on simple reads and appends to files as is commonly the case with logging solutions.
    持久化队列可以构建在dappend to 文g。所以不支持BTree的一些语义,但其好处是:O(1)消耗,无锁d?br />     
the performance is completely decoupled from the data size--one server can now take full advantage of a number of cheap, low-rotational speed 1+TB SATA drives. 
Though they have poor seek performance, these drives often have comparable performance for large reads and writes at 1/3 the price and 3x the capacity.

4.3 Maximizing Efficiency
    Furthermore we assume each message published is read at least once (and often multiple times), hence we optimize for consumption rather than production. 更进一步,我们假设被发布的消息臛_会读一ơ,因此优化consumer优先于producer?br />     
There are two common causes of inefficiency :
        two many network requests, Q?
 APIs are built around a "message set" abstractionQ?
This allows network requests to group messages together and amortize the overhead of the network roundtrip rather than sending a single message at a time.Q?仅提供批量操作apiQ则每次|络开销是^分在一l消息,而不是单个消息?br />     and excessive byte copying.Q?
The message log maintained by the broker is itself just a directory of message sets that have been written to disk.
Maintaining this common format allows optimization of the most important operation : network transfer of persistent log chunks.Q?br />     To understand the impact of sendfile, it is important to understand the common data path for transfer of data from file to socket:
  1. The operating system reads data from the disk into pagecache in kernel space
  2. The application reads the data from kernel space into a user-space buffer
  3. The application writes the data back into kernel space into a socket buffer
  4. The operating system copies the data from the socket buffer to the NIC buffer where it is sent over the network
    利用os提供的zero-copyQ?
only the final copy to the NIC buffer is needed.

4.4 End-to-end Batch Compression
    In many cases the bottleneck is actually not CPU but network. This is particularly true for a data pipeline that needs to send messages across data centers.
Efficient compression requires compressing multiple messages together rather than compressing each message individually. 
Ideally this would be possible in an end-to-end fashion — that is, data would be compressed prior to sending by the producer and remain compressed on the server, only being decompressed by the eventual consumers. 
    
A batch of messages can be clumped together compressed and sent to the server in this form. This batch of messages will be delivered all to the same consumer and will remain in compressed form until it arrives there.
    理解Qkafka 
producer api 提供扚w压羃Qbroker不对此批消息做Q何操作,且以压羃的方式,一赯发送到consumer?br />
4.5 Consumer state
    Keeping track of what has been consumed is one of the key things a messaging system must provide. 
State tracking requires updating a persistent entity and potentially causes random accesses. 
    
Most messaging systems keep metadata about what messages have been consumed on the broker. That is, as a message is handed out to a consumer, the broker records that fact locally. 大部分消息系l,存储是否被消费的元信息在broker。则是说Q一个消息被分发C个consumerQbroker记录?br />     问题Q当consumer消费p|后,会导致消息丢失;改进Q每ơconsumer消费后,lbroker ackQ若broker在超时时间未收到ackQ则重发此消息?br />     问题Q?.当消Ҏ功,但未ackӞ会导致消?? 2.
 now the broker must keep multiple states about every single message  3.当broker是多台机器时Q则状态之间需要同?br />
4.5.1 Message delivery semantics
    
So clearly there are multiple possible message delivery guarantees that could be provided : at most once 、at least once、exactly once?br />     
This problem is heavily studied, and is a variation of the "transaction commit" problem. Algorithms that provide exactly once semantics exist, two- or three-phase commits and Paxos variants being examples, but they come with some drawbacks. They typically require multiple round trips and may have poor guarantees of liveness (they can halt indefinitely). 
    消费分发语义Q是 ‘事务提交’ 问题的变U。算法提?exactly onece 语义Q两阶段 or 三阶D|交,paxos 均是例子Q但它们存在~点。典型的问题是要求多ơround tripQ且
poor guarantees of liveness?br />     
Kafka does two unusual things with respect to metadata. 
First the stream is partitioned on the brokers into a set of distinct partitions. 
Within a partition messages are stored in the order in which they arrive at the broker, and will be given out to consumers in that same order. This means that rather than store metadata for each message (marking it as consumed, say), we just need to store the "high water mark" for each combination of consumer, topic, and partition.  
    
4.5.2 
Consumer state
    In Kafka, the consumers are responsible for maintaining state information (offset) on what has been consumed. 
Typically, the Kafka consumer library writes their state data to zookeeper.
    
This solves a distributed consensus problem, by removing the distributed part!
    
There is a side benefit of this decision. A consumer can deliberately rewind back to an old offset and re-consume data.

4.5.3 Push vs. pull
    
A related question is whether consumers should pull data from brokers or brokers should push data to the subscriber.
There are pros and cons to both approaches.
    However a push-based system has difficulty dealing with diverse consumers as the broker controls the rate at which data is transferred. push目标是consumer能在最大速率L费,可不q的是,当consume速率于生速率Ӟthe consumer tends to be overwhelmed?br />     
A pull-based system has the nicer property that the consumer simply falls behind and catches up when it can. This can be mitigated with some kind of backoff protocol by which the consumer can indicate it is overwhelmed, but getting the rate of transfer to fully utilize (but never over-utilize) the consumer is trickier than it seems. Previous attempts at building systems in this fashion led us to go with a more traditional pull model.  不存在push问题Q且也保证充分利用consumer能力?br />
5. Distribution
    Kafka is built to be run across a cluster of machines as the common case. There is no central "master" node. Brokers are peers to each other and can be added and removed at anytime without any manual configuration changes. Similarly, producers and consumers can be started dynamically at any time. Each broker registers some metadata (e.g., available topics) in Zookeeper. Producers and consumers can use Zookeeper to discover topics and to co-ordinate the production and consumption. The details of producers and consumers will be described below.

6. Producer

6.1 Automatic producer load balancing
    Kafka supports client-side load balancing for message producers or use of a dedicated load balancer to balance TCP connections. 
 
    The advantage of using a level-4 load balancer is that each producer only needs a single TCP connection, and no connection to zookeeper is needed. 
The disadvantage is that the balancing is done at the TCP connection level, and hence it may not be well balanced (if some producers produce many more messages then others, evenly dividing up the connections per broker may not result in evenly dividing up the messages per broker).
    
Client-side zookeeper-based load balancing solves some of these problems. It allows the producer to dynamically discover new brokers, and balance load on a per-request basis. It allows the producer to partition data according to some key instead of randomly.

    The working of the zookeeper-based load balancing is described below. Zookeeper watchers are registered on the following events—

  • a new broker comes up
  • a broker goes down
  • a new topic is registered
  • a broker gets registered for an existing topic

    Internally, the producer maintains an elastic pool of connections to the brokers, one per broker. This pool is kept updated to establish/maintain connections to all the live brokers, through the zookeeper watcher callbacks. When a producer request for a particular topic comes in, a broker partition is picked by the partitioner (see section on semantic partitioning). The available producer connection is used from the pool to send the data to the selected broker partition.
    producer通过zkQ管理与broker的连接。当一个请求,Ҏpartition rule 计算分区Q从q接池选择对应的connectionQ发送数据?br />
6.2 Asynchronous send

    Asynchronous non-blocking operations are fundamental to scaling messaging systems.
    
This allows buffering of produce requests in a in-memory queue and batch sends that are triggered by a time interval or a pre-configured batch size. 

6.3 Semantic partitioning
    
The producer has the capability to be able to semantically map messages to the available kafka nodes and partitions. 
This allows partitioning the stream of messages with some semantic partition function based on some key in the message to spread them over broker machines. 




矛_ | Fat Mind 2013-07-06 14:57 发表评论
]]>
Jsl习Q操Ucookiehttp://www.aygfsteel.com/shijian/archive/2012/09/09/387339.html矛_ | Fat Mind矛_ | Fat MindSun, 09 Sep 2012 07:18:00 GMThttp://www.aygfsteel.com/shijian/archive/2012/09/09/387339.htmlhttp://www.aygfsteel.com/shijian/comments/387339.htmlhttp://www.aygfsteel.com/shijian/archive/2012/09/09/387339.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/387339.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/387339.html1.Js代码Qlogin.js文g

//用户的登陆信息写入cookies
function SetCookie(form)//两个参数Q一个是cookie的名子,一个是?/span>
{   
    var name = form.name.value;
    var password = form.password.value;
    var Days = 1; //?nbsp;cookie 被保存 7 ?nbsp;
    var exp  = new Date(); //生成一个现在的日期Q加上保存期限,然后讄cookie的生存期限!
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = "user="+ escape(name) + "/" + escape(password) + ";expires=" + exp.toGMTString();
}
//取cookies函数--正则表达?不会Q学习正则表辑ּ)  
function getCookie(name)      
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    if(arr != nullreturn unescape(arr[2]); 
    return null;
}
//取cookies函数--普通实?nbsp;     
  function   readCookie(form){   
      var   cookieValue   =   "";   
      var   search   =   "user=";   
      if(document.cookie.length   >   0)     {   
          offset   =   document.cookie.indexOf(search);
          if(offset !=  -1){     
              offset   +=   search.length;   
              end   =   document.cookie.indexOf(";",offset);   
              if   (end  ==  -1)   
                    end   =   document.cookie.length;
              //获取cookies里面的?nbsp;         
              cookieValue   =   unescape(document.cookie.substring(offset,end))
              if(cookieValue != null){
                    var str = cookieValue.split("/");
                    form.name.value = str[0];
                    form.password.value = str[1]; 
              }
          }   
      }    
  }   
//删除cookieQ(servlet里面Q设|时间ؓ0Q设|ؓ-1和session的范围是一LQ,javascript好像是有点区?/span>
function delCookie()
{
    var name = "admin";
    var exp = new Date();
    exp.setTime(exp.getTime() - 1);
    var cval=getCookie(name);
    if(cval!=null) document.cookie= name + "="+cval+";expires="+exp.toGMTString();
}

 

2.jsp代码Q文件login.jsp

<%@ page contentType="text/html; charset=gb2312" language="java"
    import="java.sql.*" errorPage=""%>
    
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        <title>javascript 控制 cookie</title>
        <link href="css/style.css" rel="stylesheet" type="text/css">
        <script type="text/javascript" src="js/login.js"></script>
    </head>
    <script language="javascript">
    function checkEmpty(form){
        for(i=0;i<form.length;i++){
            if(form.elements[i].value==""){
                alert("表单信息不能为空");
                return false;
            }
        }
    }
</script>
    <body onload="readCookie(form)"> <!-- 作ؓJavaScript控制的cookie-->
        <div align="center">
            <table width="324" height="225" border="0" cellpadding="0" cellspacing="0">
                <tr height="50">
                    <td ></td>
                </tr>
                <tr align="center">
                    <td background="images/back.jpg">
                        <br>
                        <br>
                        登陆
                        <form name="form" method="post" action="" onSubmit="return checkEmpty(form)">
                            <input type="hidden" name="id" value="-1">
                            <table width="268" border="1" cellpadding="0" cellspacing="0">
                                <tr align="center">
                                    <td width="63" height="30">
                                        用户名:
                                    </td>
                                    <td width="199">
                                        <input type="text" name="name" id="name">
                                    </td>
                                </tr>
                                <tr align="center">
                                    <td height="30">
                                        密码Q?br />                                    </td>
                                    <td>
                                        <input type="password" name="password" id="password">
                                    </td>
                                </tr>
                            </table>
                            <br>
                            <input type="submit" value="提交">
                            <input type="checkbox" name="cookie" onclick="SetCookie(form)">C?nbsp;         
                        </form>
                    </td>
                </tr>
            </table>
        </div>
    </body>
</html>

 


目的Q当你再ơ打开login.jsp面Q表单里面的内容已经写好了,是你上一ơ的登陆信息Q?/p>


问题Q?.JavaScript里面取cookie都是写死的,不是很灵z!
            2.JavaScript的cookie是按照字W串的Ş式存攄Q所以拿出的时候,你要按照你放q去的Ş式来选择Q?/div>
            3.本来是想实现自动登陆的,可我的每个页面都要session的检查!一个客LQ一个服务器端,没能实现Q?/div>

 

 



矛_ | Fat Mind 2012-09-09 15:18 发表评论
]]>Js 基础知识http://www.aygfsteel.com/shijian/archive/2012/05/20/378611.html矛_ | Fat Mind矛_ | Fat MindSun, 20 May 2012 05:50:00 GMThttp://www.aygfsteel.com/shijian/archive/2012/05/20/378611.htmlhttp://www.aygfsteel.com/shijian/comments/378611.htmlhttp://www.aygfsteel.com/shijian/archive/2012/05/20/378611.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/378611.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/378611.html  - undefined
  - null
  - string
        - == ?=== 区别
  - number
  - boolean
  - string、number、boolean均有对应?'对象c?
2.函数
  - 定义函数
        - function 关键?br />        - 参数Q见例子Q,arguments
        - 函数内变量声明,var区别
  - 作用?br />        - 铑ּl构Q子函数可以看见父函数的变量Q?br />  - 匿名函数
      - 使用场景Q非复用场景Q如Qjsonp回调函数Q?br />      - this特征
例子Q?/font>
var add = function(x) {
    return x++;

}
add(1,2,3); // 参数可以随意多个Q类似Java中的(int x ...)

var fn = function(name, pass) {
    alert(name);
    alert(pass);
};
fn("hello","1234",5); // 按照传递的序排列


var name = "windows";
var fn = function() {
    var name 
= "hello";
    alert(
this.name);
}
fn(); // windowsQthis在匿名函数内部是指向windows范围

var name = "windows";
var fn = function() {
    name 
= "hello";
    alert(
this.name);
}
fn(); // 因函数内部变量name未声明ؓvarQ则属于全局变量Q且this指向windowsQ则?hello'

function add(a) {
    return ++a;
}
var fn = function(x,add){
    return add(x);
}
fn(1, add);  // 函数作ؓ参数

3.闭包  
http://www.ruanyifeng.com/blog/2009/08/learning_javascript_closures.html 【good?br />其它语言闭包概念 http://www.ibm.com/developerworks/cn/linux/l-cn-closure/

4.对象
    - new Object()
    – 对象字面?/div>
    – 构造函?br />    - 上述操作Q经历的步骤
        –创徏新对?div>
        –构造方法的作用域赋l新对象(new 操作W?
        –为对象添加属? Ҏ
        –q回该对?/div>

var obj = new Object();  // new Object方式
obj.name = 'zhangsan';

var obj = {                   // 字面帔R方式Q定义对?/div>
    name : 'zhangsan',
    showName : function (){
        alert(this.name);
    }
};
alert(obj.showName());
function Person(name) { // 构造函?br />    this.name = name;
    this.showName = function(){
        return this.name; }
    };
var obj = new Person("zhangsan"); // 必须?new 关键Q否则等于调用一个普通函?br />obj.showName();
alert(obj.name);


资料Q内部培训ppt 


矛_ | Fat Mind 2012-05-20 13:50 发表评论
]]>[转] Linux 句柄是什?Q?/title><link>http://www.aygfsteel.com/shijian/archive/2012/04/06/373463.html</link><dc:creator>矛_ | Fat Mind</dc:creator><author>矛_ | Fat Mind</author><pubDate>Fri, 06 Apr 2012 06:02:00 GMT</pubDate><guid>http://www.aygfsteel.com/shijian/archive/2012/04/06/373463.html</guid><wfw:comment>http://www.aygfsteel.com/shijian/comments/373463.html</wfw:comment><comments>http://www.aygfsteel.com/shijian/archive/2012/04/06/373463.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/shijian/comments/commentRss/373463.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/shijian/services/trackbacks/373463.html</trackback:ping><description><![CDATA[<p style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; line-height: 30px; "></p><p><br /></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">1.</span><span style="font-size:10.5pt;Times New Roman";">句柄是一个标识符Q只要获得对象的句柄Q我们就可以对对象进行Q意的操作?br /><br /></span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">2.</span><span style="font-size:10.5pt;Times New Roman";">句柄不是指针Q操作系l用句柄可以扑ֈ一块内存,q个句柄可能是标识符Q?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">map</span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">key</span><span style="font-size:10.5pt;Times New Roman";">Q也可能是指针,看操作系l怎么处理的了?/span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">是在某U程度上替代句柄吧;</span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">Linux </span><span style="font-size:10.5pt;Times New Roman";">有相应机Ӟ但没有统一的句柄类型,各种cd的系l资源由各自的类型来标识Q由各自的接口操作?br /><br /></span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">3.http://tech.ddvip.com/2009-06/1244006580122204_11.html</span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">在操作系l层面上Q文件操作也有类g</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">FILE</span><span style="font-size:10.5pt;Times New Roman";">的一个概念,?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">Linux</span><span style="font-size:10.5pt;Times New Roman";">里,q叫做文件描q符</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">(File Descriptor)</span><span style="font-size: 10.5pt;Times New Roman";">Q而在</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">Windows</span><span style="font-size:10.5pt;Times New Roman";">里,叫做句柄</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">(Handle)(</span><span style="font-size:10.5pt;Times New Roman";">以下在没有歧义的时候统UCؓ句柄</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">)</span><span style="font-size:10.5pt;Times New Roman";">。用户通过某个函数打开文g以获得句柄,?/span> <span style="font-size:10.5pt;Times New Roman";">后用hU|件皆通过该句柄进行?/span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"> </p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">设计q么一个句柄的原因在于句柄可以防止用户随意d操作pȝ内核的文件对象。无论是</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">Linux</span><span style="font-size:10.5pt;Times New Roman";">q是</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">Windows</span><span style="font-size:10.5pt;Times New Roman";">Q文件句柄L和内核的文g对象相关联的Q但如何兌l节用户q不可见。内核可以通过句柄来计出内核里文件对象的地址Q但此能力ƈ不对用户开放?/span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"> </p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">下面举一个实际的例子Q在</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">Linux</span><span style="font-size:10.5pt;Times New Roman";">中,gؓ</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">0</span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">1</span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">2</span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">分别代表标准输入、标准输出和标准错误输出。在E序中打开文g得到?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">3</span><span style="font-size:10.5pt;Times New Roman";">开始增ѝ?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"> fd</span><span style="font-size:10.5pt;Times New Roman";">具体是什么呢</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">?</span><span style="font-size:10.5pt;Times New Roman";">在内怸Q每一个进E都有一个私有的</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">“</span><span style="font-size:10.5pt;Times New Roman";">打开文g?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">”</span><span style="font-size:10.5pt;Times New Roman";">Q这个表是一个指针数l,每一个元素都指向一个内核的打开文g对象。?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">Q就是这</span> <span style="font-size:10.5pt;Times New Roman";">个表的下标。当用户打开一个文件时Q内怼在内部生成一个打开文g对象Qƈ在这个表里找C个空,让这一Ҏ向生成的打开文g对象Qƈq回q一的下标</span> <span style="font-size:10.5pt;Times New Roman";">作ؓ</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">。由于这个表处于内核Qƈ且用h法访问到Q因此用户即使拥?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">Q也无法得到打开文g对象的地址Q只能够通过pȝ提供的函数来操作?/span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"> </p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">C</span><span style="font-size:10.5pt;Times New Roman";">语言里,操纵文g的渠道则?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">FILE</span><span style="font-size:10.5pt;Times New Roman";">l构Q不难想象,</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">C</span><span style="font-size:10.5pt;Times New Roman";">语言中的</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">FILE</span><span style="font-size:10.5pt;Times New Roman";">l构必定?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">有一对一的关p,每个</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">FILE</span><span style="font-size:10.5pt;Times New Roman";">l构都会记录自己唯一对应?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">fd</span><span style="font-size:10.5pt;Times New Roman";">?/span></p> <span style="font-size: 10.5pt; line-height: 240%; font-family: 宋体; "><br /><strong>句柄</strong> </span><span id="wmqeeuq" class="Apple-style-span" style="font-size: 14px; font-weight: normal; "><a >http://zh.wikipedia.org/wiki/%E5%8F%A5%E6%9F%84</a><br /><br /></span> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="E序设计"><span style="font-family: 宋体; text-decoration: none; ">E序设计</span></a> </span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">,</span><span style="font-size:10.5pt;Times New Roman";">句柄</span><span style="font-size:10.5pt;Times New Roman";">是一U特D的</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="指针Q尚未撰写)"><span style="font-family: 宋体; text-decoration: none; ">指针</span></a> </span><span style="font-size:10.5pt;Times New Roman";">。当一?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="应用E序"><span style="font-family: 宋体; text-decoration: none; ">应用E序</span></a> </span><span style="font-size:10.5pt;Times New Roman";">要引用其他系l?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">(</span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="数据?><span style="font-family: 宋体; text-decoration: none; ">数据?/span></a></span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="操作pȝ"><span style="font-family: 宋体; text-decoration: none; ">操作pȝ</span></a> )</span><span style="font-size:10.5pt;Times New Roman";">所理?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="内存"><span style="font-family: 宋体; text-decoration: none; ">内存</span></a> </span><span style="font-size:10.5pt;Times New Roman";">块或</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="对象 (计算机科?"><span style="font-family: 宋体; text-decoration: none; ">对象</span></a> </span><span style="font-size:10.5pt;Times New Roman";">Ӟp使用句柄?/span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">句柄与普?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="指针 (信息?"><span style="font-family: 宋体; text-decoration: none; ">指针</span></a> </span><span style="font-size:10.5pt;Times New Roman";">的区别在于,指针包含的是引用</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="对象 (计算机科?"><span style="font-family: 宋体; text-decoration: none; ">对象</span></a> </span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="物理地址"><span style="font-family: 宋体; text-decoration: none; ">内存地址</span></a> </span><span style="font-size:10.5pt;Times New Roman";">Q而句柄则是由pȝ所理的引用标识,该标识可以被pȝ重新定位C?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="物理地址"><span style="font-family: 宋体; text-decoration: none; ">内存地址</span></a> </span><span style="font-size:10.5pt;Times New Roman";">上。这U间接访?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="对象 (计算机科?"><span style="font-family: 宋体; text-decoration: none; ">对象</span></a> </span><span style="font-size:10.5pt;Times New Roman";">的模式增Zpȝ对引?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="对象 (计算机科?"><span style="font-family: 宋体; text-decoration: none; ">对象</span></a> </span><span style="font-size:10.5pt;Times New Roman";">的控制。(参见</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="装Q尚未撰写)"><span style="font-family: 宋体; text-decoration: none; ">装</span></a> )</span><span style="font-size:10.5pt;Times New Roman";">?/span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">在上世纪</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">80</span><span style="font-size:10.5pt;Times New Roman";">q代的操作系l(?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="Mac OS"><span style="text-decoration: none; ">Mac OS</span></a> </span><span style="font-size:10.5pt;Times New Roman";">?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="Windows"><span style="text-decoration: none; ">Windows</span></a> </span><span style="font-size:10.5pt;Times New Roman";">Q的</span><span style="font-size: 10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="内存理"><span style="font-family: 宋体; text-decoration: none; ">内存理</span></a> </span><span style="font-size:10.5pt;Times New Roman";">中,句柄被广泛应用?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="Unix"><span style="text-decoration: none; ">Unix</span></a> </span><span style="font-size:10.5pt;Times New Roman";">pȝ?/span><span style="font-size: 10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="文g描述W?><span style="font-family: 宋体; text-decoration: none; ">文g描述W?/span></a> </span><span style="font-size:10.5pt;Times New Roman";">基本上也属于句柄。和其它</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="桌面环境"><span style="font-family: 宋体; text-decoration: none; ">桌面环境</span></a> </span><span style="font-size:10.5pt;Times New Roman";">一P</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="Windows API"><span style="text-decoration: none; ">Windows API</span></a> </span><span style="font-size:10.5pt;Times New Roman";">大量使用句柄来标识系l中?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="对象 (计算机科?"><span style="font-family: 宋体; text-decoration: none; ">对象</span></a> </span><span style="font-size:10.5pt;Times New Roman";">Qƈ建立操作pȝ?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="用户I间Q尚未撰写)"><span style="font-family: 宋体; text-decoration: none; ">用户I间</span></a> </span><span style="font-size:10.5pt;Times New Roman";">之间的通信渠道。例如,桌面上的一个窗体由一?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";">HWND </span><span style="font-size:10.5pt;Times New Roman";">cd的句柄来标识?/span></p> <p style="margin:0cm;margin-bottom:.0001pt;line-height:22.5pt"><span style="font-size:10.5pt;Times New Roman";">如今Q?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="内存"><span style="font-family: 宋体; text-decoration: none; ">内存</span></a> </span><span style="font-size:10.5pt;Times New Roman";">定w的增大和</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="虚拟内存"><span style="font-family: 宋体; text-decoration: none; ">虚拟内存</span></a> </span><span style="font-size:10.5pt;Times New Roman";">法使得更简单的</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="指针 (信息?"><span style="font-family: 宋体; text-decoration: none; ">指针</span></a> </span><span style="font-size:10.5pt;Times New Roman";">愈加受到青睐Q而指向另一指针的那cd柄受到冷淡。尽如此,许多</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="操作pȝ"><span style="font-family: 宋体; text-decoration: none; ">操作pȝ</span></a> </span><span style="font-size:10.5pt;Times New Roman";">仍然把指向私?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="对象 (计算机科?"><span style="font-family: 宋体; text-decoration: none; ">对象</span></a> </span><span style="font-size:10.5pt;Times New Roman";">的指针以?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="q程"><span style="font-family: 宋体; text-decoration: none; ">q程</span></a></span><span style="font-size:10.5pt;Times New Roman";">传递给</span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="客户?><span style="font-family: 宋体; text-decoration: none; ">客户?/span></a> </span><span style="font-size:10.5pt;Times New Roman";">的内?/span><span style="font-size:10.5pt;font-family:"Calibri","sans-serif";Times New Roman";"><a title="数组"><span style="font-family: 宋体; text-decoration: none; ">数组</span></a> </span><span style="font-size:10.5pt;Times New Roman";">下标UCؓ句柄?br /><br /><br /></span></p><p> </p><img src ="http://www.aygfsteel.com/shijian/aggbug/373463.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/shijian/" target="_blank">矛_ | Fat Mind</a> 2012-04-06 14:02 <a href="http://www.aygfsteel.com/shijian/archive/2012/04/06/373463.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>单元试利器 ?powermock [使用结]http://www.aygfsteel.com/shijian/archive/2012/03/29/371819.html矛_ | Fat Mind矛_ | Fat MindThu, 29 Mar 2012 04:39:00 GMThttp://www.aygfsteel.com/shijian/archive/2012/03/29/371819.htmlhttp://www.aygfsteel.com/shijian/comments/371819.htmlhttp://www.aygfsteel.com/shijian/archive/2012/03/29/371819.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/371819.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/371819.html官方 Q?a >http://code.google.com/p/powermock/ 

1. 使用mockito的同学,推荐阅读如下部分

    - document [必选]
        - getting started
        - motavition
    - mockito extends [必选]
        - mockito 1.8+ useage
    - common
    - tutorial
    - faq [必选]


2. 附gQ实际开发中使用到的
powermock的一些特性,化后的例子(仅ؓ说明powermock api使用Q?/span>。主要包?/span> Q?/span>

 

-          修改U有?/span>

-          U有Ҏ

-            试U有Ҏ

-            Mock

-            Verify

-          静态方?/span>

-            Mock

-            抛出异常

-            Verify

-          Mockc部分方?/span>

-          Mock Java core libraryQ如Q?/span>Thread

-          Mock 构造器

/Files/shijian/powermock.rar





矛_ | Fat Mind 2012-03-29 12:39 发表评论
]]>
[转]Google: Excellent Papers for 2011http://www.aygfsteel.com/shijian/archive/2012/03/24/372604.html矛_ | Fat Mind矛_ | Fat MindSat, 24 Mar 2012 03:39:00 GMThttp://www.aygfsteel.com/shijian/archive/2012/03/24/372604.htmlhttp://www.aygfsteel.com/shijian/comments/372604.htmlhttp://www.aygfsteel.com/shijian/archive/2012/03/24/372604.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/372604.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/372604.html


原文地址Q?/span>
http://googleresearch.blogspot.com/2012/03/excellent-papers-for-2011.html

 

Excellent Papers for 2011

Posted by Corinna Cortes and Alfred Spector, Google Research

Googlers across the company actively engage with the scientific community by publishing technical papers, contributing open-source packages, working on standards, introducing new APIs and tools, giving talks and presentations, participating in ongoing technical debates, and much more. Our publications offer technical and algorithmic advances, feature aspects we learn as we develop novel products and services, and shed light on some of the technical challenges we face at Google.

 

h公司U极参与U学界的交流Q通过发表技术论文,贡献开源YӞ制定标准Q引入新?/span>API和工P丑֊讲和演Ԍ参加正在q行的技术辩论,{等。我们发布的文章提供技术和法的进步,在开发新的品和服务q程中学习到的内容,揭示一些我们在h所面的技术挑战?/span>

 

In an effort to highlight some of our work, we periodically select a number of publications to be featured on this blog. We first posted a set of papers on this blog in mid-2010 and subsequently discussed them in more detail in the following blog postings. In a second round, we highlighted new noteworthy papers from the later half of 2010. This time we honor the influential papers authored or co-authored by Googlers covering all of 2011 -- covering roughly 10% of our total publications.  It’s tough choosing, so we may have left out some important papers.  So, do see the publications list to review the complete group.

 

Z彰显我们的一些工作,我们定期选择一些列文章发布?/span>blog?/span>2010中期Q我们第一ơ发布了一些列的文章在blogQƈ随后在博客文章中更详l讨论它们。在W二轮中Q我们强调从2010q下半年新值得注意的论文。这一ơ,我们l有影响力的文章的作者或合著者以荣誉Q大U占L章数?/span>10%。这是艰隄选择的,所以我们可能已l遗漏了一些重要文章。因此,L完整的文章清单?/span>

 

In the coming weeks we will be offering a more in-depth look at these publications, but here are some summaries:

 

在未来几周我们将更深入的谈论q些论文Q但现在只做一些ȝ?/span>

 

Audio processing

 

Cascades of two-pole–two-zero asymmetric resonators are good models of peripheral auditory function”, Richard F. Lyon,Journal of the Acoustical Society of America, vol. 130 (2011), pp. 3893-3904.
Lyon's long title summarizes a result that he has been working toward over many years of modeling sound processing in the inner ear. 
 This nonlinear cochlear model is shown to be "good" with respect to psychophysical data on masking, physiological data on mechanical and neural response, and computational efficiency. These properties derive from the close connection between wave propagation and filter cascades. This filter-cascade model of the ear is used as an efficient sound processor for several machine hearing projects at Google.

 

声音处理Q?/span>q个滤L器联模型的x是用来作ZU高效的声音处理器,是谷歌的几个机器声音处理目之一?/span>

 

Electronic Commerce and Algorithms

 

Online Vertex-Weighted Bipartite Matching and Single-bid Budgeted Allocations”, Gagan AggarwalGagan GoelChinmay KarandeAranyak MehtaSODA 2011.
The authors introduce an elegant and powerful algorithmic technique to the area of online ad allocation and matching: a hybrid of random perturbations and greedy choice to make decisions on the fly. Their technique sheds new light on classic matching algorithms, and can be used, for example, to pick one among a set of relevant ads, without knowing in advance the demand for ad slots on future web page views. 

 

作者介l在U广告分配和匚w斚w的优雅和强大的算法技术:一U؜合随机扰动和贪婪选择Q实现在U决定。他们的技术揭CZl典的匹配算法的新的方向Q例如,挑选其中一l相关的q告Q事先不知道未来的网站页面访问的q告位置的需求。【关注?/span>

 

Milgram-routing in social networks”, Silvio Lattanzi, Alessandro Panconesi, D. Sivakumar, Proceedings of the 20th International Conference on World Wide Web, WWW 2011, pp. 725-734.
Milgram’s "six-degrees-of-separation experiment" and the fascinating small world hypothesis that follows from it, have generated a lot of interesting research in recent years. In this landmark experiment, Milgram showed that people unknown to each other are often connected by surprisingly short chains of acquaintances. In the paper we prove theoretically and experimentally how a recent model of social networks, "Affiliation Networks", offers an explanation to this phenomena and inspires interesting technique for local routing within social networks.

 

c_格兰姆的六个度分d?/span>Q迷人的世界遵从它的结果,在最q几q已l生了很多有趣的研I。在q一h里程意义的实验Q表明未知的Ҏ往往是通过熟hQ以令h惊讶的短链连接即可认识。在本文中,我们提供理论和实验关于近代的C会|络模型Q?/span>Affiliation NetworksQ提供了一U解释这U现象,q激发社会网l的interesting technique for local routing。【关注?/span>

 

Non-Price Equilibria in Markets of Discrete Goods”, Avinatan Hassidim, Haim Kaplan, Yishay Mansour, Noam Nisan, EC, 2011.
We present a correspondence between markets of indivisible items, and a family of auction based n player games. We show that a market has a price based (Walrasian) equilibrium if and only if the corresponding game has a pure Nash equilibrium. We then turn to markets which do not have a Walrasian equilibrium (which is the interesting case), and study properties of the mixed Nash equilibria of the corresponding games.

 

在离散商品市场的非h格^衡【关注?/span>

 

HCI

 

From Basecamp to Summit: Scaling Field Research Across 9 Locations”, Jens Riegelsberger, Audrey Yang, Konstantin Samoylov, Elizabeth Nunge, Molly Stevens, Patrick Larvie, CHI 2011 Extended Abstracts.
The paper reports on our experience with a basecamp research hub to coordinate logistics and ongoing real-time analysis with research teams in the field. We also reflect on the implications for the meaning of research in a corporate context, where much of the value may be less in a final report, but more in the curated impressions and memories our colleagues take away from the the research trip.

User-Defined Motion Gestures for Mobile Interaction”, Jaime Ruiz, Yang Li, Edward Lank, CHI 2011: ACM Conference on Human Factors in Computing Systems, pp. 197-206.
Modern smartphones contain sophisticated sensors that can detect rich motion gestures — deliberate movements of the device by end-users to invoke commands. However, little is known about best-practices in motion gesture design for the mobile computing paradigm. We systematically studied the design space of motion gestures via a guessability study that elicits end-user motion gestures to invoke commands on a smartphone device. The study revealed consensus among our participants on parameters of movement and on mappings of motion gestures onto commands, by which we developed a taxonomy for motion gestures and compiled an end-user inspired motion gesture set. The work lays the foundation of motion gesture design—a new dimension for mobile interaction.

Information Retrieval

Reputation Systems for Open Collaboration”, B.T. Adler, L. de Alfaro, A. Kulshrestra, I. Pye, Communications of the ACM, vol. 54 No. 8 (2011), pp. 81-87.
This paper describes content based reputation algorithms, that rely on automated content analysis to derive user and content reputation, and their applications for Wikipedia and google Maps. The Wikipedia reputation system WikiTrust relies on a chronological analysis of user contributions to articles, metering positive or negative increments of reputation whenever new contributions are made. The Google Maps system Crowdsensus compares the information provided by users on map business listings and computes both a likely reconstruction of the correct listing and a reputation value for each user. Algorithmic-based user incentives ensure the trustworthiness of evaluations of Wikipedia entries and Google Maps business information.

Machine Learning and Data Mining

Domain adaptation in regression”, Corinna CortesMehryar MohriProceedings of The 22nd International Conference on Algorithmic Learning Theory, ALT 2011.
Domain adaptation is one of the most important and challenging problems in machine learning. 
 This paper presents a series of theoretical guarantees for domain adaptation in regression, gives an adaptation algorithm based on that theory that can be cast as a semi-definite programming problem, derives an efficient solution for that problem by using results from smooth optimization, shows that the solution can scale to relatively large data sets, and reports extensive empirical results demonstrating the benefits of this new adaptation algorithm.

On the necessity of irrelevant variables”, David P. Helmbold, Philip M. LongICML, 2011
Relevant variables sometimes do much more good than irrelevant variables do harm, so that it is possible to learn a very accurate classifier using predominantly irrelevant variables. 
 We show that this holds given an assumption that formalizes the intuitive idea that the variables are non-redundant.  For problems like this it can be advantageous to add many additional variables, even if only a small fraction of them are relevant.

Online Learning in the Manifold of Low-Rank Matrices”, Gal Chechik, Daphna Weinshall, Uri Shalit, Neural Information Processing Systems (NIPS 23), 2011, pp. 2128-2136.
Learning measures of similarity from examples of similar and dissimilar pairs is a problem that is hard to scale. LORETA uses retractions, an operator from matrix optimization, to learn low-rank similarity matrices efficiently. This allows to learn similarities between objects like images or texts when represented using many more features than possible before.

Machine Translation

Training a Parser for Machine Translation Reordering”, Jason Katz-Brown, Slav PetrovRyan McDonaldFranz Och, David Talbot, Hiroshi Ichikawa, Masakazu Seno, Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing (EMNLP '11).
Machine translation systems often need to understand the syntactic structure of a sentence to translate it correctly. Traditionally, syntactic parsers are evaluated as standalone systems against reference data created by linguists. Instead, we show how to train a parser to optimize reordering accuracy in a machine translation system, resulting in measurable improvements in translation quality over a more traditionally trained parser.

Watermarking the Outputs of Structured Prediction with an application in Statistical Machine Translation”, Ashish Venugopal,Jakob Uszkoreit, David Talbot, Franz Och, Juri Ganitkevitch, Proceedings of the 2011 Conference on Empirical Methods in Natural Language Processing (EMNLP).
We propose a general method to watermark and probabilistically identify the structured results of machine learning algorithms with an application in statistical machine translation. Our approach does not rely on controlling or even knowing the inputs to the algorithm and provides probabilistic guarantees on the ability to identify collections of results from one’s own algorithm, while being robust to limited editing operations.

Inducing Sentence Structure from Parallel Corpora for Reordering”, John DeNeroJakob UszkoreitProceedings of the 2011 Conference on Empirical Methods in Natural Language Processing (EMNLP).
Automatically discovering the full range of linguistic rules that govern the correct use of language is an appealing goal, but extremely challenging. 
 Our paper describes a targeted method for discovering only those aspects of linguistic syntax necessary to explain how two different languages differ in their word ordering.  By focusing on word order, we demonstrate an effective and practical application of unsupervised grammar induction that improves a Japanese to English machine translation system.

Multimedia and Computer Vision

Kernelized Structural SVM Learning for Supervised Object Segmentation”, Luca BertelliTianli Yu, Diem Vu, Burak Gokturk,Proceedings of IEEE Conference on Computer Vision and Pattern Recognition 2011.
The paper proposes a principled way for computers to learn how to segment the foreground from the background of an image given a set of training examples. The technology is build upon a specially designed nonlinear segmentation kernel under the recently proposed structured SVM learning framework.

Auto-Directed Video Stabilization with Robust L1 Optimal Camera Paths”, Matthias GrundmannVivek Kwatra, Irfan Essa,IEEE Conference on Computer Vision and Pattern Recognition (CVPR 2011).
Casually shot videos captured by handheld or mobile cameras suffer from significant amount of shake. Existing in-camera stabilization methods dampen high-frequency jitter but do not suppress low-frequency movements and bounces, such as those observed in videos captured by a walking person. On the other hand, most professionally shot videos usually consist of carefully designed camera configurations, using specialized equipment such as tripods or camera dollies, and employ ease-in and ease-out for transitions. Our stabilization technique automatically converts casual shaky footage into more pleasant and professional looking videos by mimicking these cinematographic principles. The original, shaky camera path is divided into a set of segments, each approximated by either constant, linear or parabolic motion, using an algorithm based on robust L1 optimization. The stabilizer has been part of the YouTube Editor (youtube.com/editor) since March 2011.

The Power of Comparative Reasoning”, Jay Yagnik, Dennis Strelow, David Ross, Ruei-Sung Lin, International Conference on Computer Vision (2011).
The paper describes a theory derived vector space transform that converts vectors into sparse binary vectors such that Euclidean space operations on the sparse binary vectors imply rank space operations in the original vector space. The transform a) does not need any data-driven supervised/unsupervised learning b) can be computed from polynomial expansions of the input space in linear time (in the degree of the polynomial) and c) can be implemented in 10-lines of code. We show competitive results on similarity search and sparse coding (for classification) tasks.

NLP

Unsupervised Part-of-Speech Tagging with Bilingual Graph-Based Projections”, Dipanjan Das, Slav PetrovProceedings of the 49th Annual Meeting of the Association for Computational Linguistics (ACL '11), 2011, Best Paper Award.
We would like to have natural language processing systems for all languages, but obtaining labeled data for all languages and tasks is unrealistic and expensive. We present an approach which leverages existing resources in one language (for example English) to induce part-of-speech taggers for languages without any labeled training data. We use graph-based label propagation for cross-lingual knowledge transfer and use the projected labels as features in a hidden Markov model trained with the Expectation Maximization algorithm.

Networks

TCP Fast Open”, Sivasankar Radhakrishnan, Yuchung ChengJerry ChuArvind Jain, Barath Raghavan, Proceedings of the 7th International Conference on emerging Networking EXperiments and Technologies (CoNEXT), 2011.
TCP Fast Open enables data exchange during TCP’s initial handshake. It decreases application network latency by one full round-trip time, a significant speedup for today's short Web transfers. Our experiments on popular websites show that Fast Open reduces the whole-page load time over 10% on average, and in some cases up to 40%.

Proportional Rate Reduction for TCP”, Nandita Dukkipati, Matt Mathis, Yuchung Cheng, Monia Ghobadi, Proceedings of the 11th ACM SIGCOMM Conference on Internet Measurement 2011, Berlin, Germany - November 2-4, 2011.
Packet losses increase latency of Web transfers and negatively impact user experience. Proportional rate reduction (PRR) is designed to recover from losses quickly, smoothly and accurately by pacing out retransmissions across received ACKs during TCP’s fast recovery. Experiments on Google Web and YouTube servers in U.S. and India demonstrate that PRR reduces the TCP latency of connections experiencing losses by 3-10% depending on response size.

Security and Privacy

Automated Analysis of Security-Critical JavaScript APIs”, Ankur Taly, Úlfar Erlingsson, John C. Mitchell, Mark S. Miller, Jasvir Nagra, IEEE Symposium on Security & Privacy (SP), 2011.
As software is increasingly written in high-level, type-safe languages, attackers have fewer means to subvert system fundamentals, and attacks are more likely to exploit errors and vulnerabilities in application-level logic. 
 This paper describes a generic, practical defense against such attacks, which can protect critical application resources even when those resources are partially exposed to attackers via software interfaces. In the context of carefully-crafted fragments of JavaScript, the paper applies formal methods and semantics to prove that these defenses can provide complete, non-circumventable mediation of resource access; the paper also shows how an implementation of the techniques can establish the properties of widely-used software, and find previously-unknown bugs.

App Isolation: Get the Security of Multiple Browsers with Just One”, Eric Y. Chen, Jason Bau, Charles Reis, Adam Barth, Collin Jackson, 18th ACM Conference on Computer and Communications Security, 2011.
We find that anecdotal advice to use a separate web browser for sites like your bank is indeed effective at defeating most cross-origin web attacks. 
 We also prove that a single web browser can provide the same key properties, for sites that fit within the compatibility constraints.

Speech

Improving the speed of neural networks on CPUs”, Vincent VanhouckeAndrew Senior, Mark Z. Mao, Deep Learning and Unsupervised Feature Learning Workshop, NIPS 2011.
As deep neural networks become state-of-the-art in real-time machine learning applications such as speech recognition, computational complexity is fast becoming a limiting factor in their adoption. We show how to best leverage modern CPU architectures to significantly speed-up their inference.

Bayesian Language Model Interpolation for Mobile Speech Input”, Cyril AllauzenMichael RileyInterspeech 2011.
Voice recognition on the Android platform must contend with many possible target domains - e.g. search, maps, SMS. For each of these, a domain-specific language model was built by linearly interpolating several n-gram LMs from a common set of Google corpora. The current work has found a way to efficiently compute a single n-gram language model with accuracy very close to the domain-specific LMs but with considerably less complexity at recognition time.

Statistics

Large-Scale Parallel Statistical Forecasting Computations in R”, Murray Stokely, Farzan Rohani, Eric Tassone, JSM Proceedings, Section on Physical and Engineering Sciences, 2011.
This paper describes the implementation of a framework for utilizing distributed computational infrastructure from within the R interactive statistical computing environment, with applications to timeseries forecasting. This system is widely used by the statistical analyst community at Google for data analysis on very large data sets.

Structured Data

Dremel: Interactive Analysis of Web-Scale Datasets”, Sergey Melnik, Andrey Gubarev, Jing Jing Long, Geoffrey Romer, Shiva Shivakumar, Matt Tolton, Communications of the ACM, vol. 54 (2011), pp. 114-123.
Dremel is a scalable, interactive ad-hoc query system. By combining multi-level execution trees and columnar data layout, it is capable of running aggregation queries over trillion-row tables in seconds. Besides continued growth internally to Google, Dremel now also backs an increasing number of external customers including BigQuery and UIs such as AdExchange front-end.

Representative Skylines using Threshold-based Preference Distributions”, Atish Das Sarma, Ashwin Lall, Danupon Nanongkai, Richard J. Lipton, Jim Xu, International Conference on Data Engineering (ICDE), 2011.
The paper adopts principled approach towards representative skylines and formalizes the problem of displaying k tuples such that the probability that a random user clicks on one of them is maximized. This requires mathematically modeling (a) the likelihood with which a user is interested in a tuple, as well as (b) how one negotiates the lack of knowledge of an explicit set of users. This work presents theoretical and experimental results showing that the suggested algorithm significantly outperforms previously suggested approaches.

Hyper-local, directions-based ranking of places”, Petros Venetis, Hector Gonzalez, Alon Y. Halevy, Christian S. Jensen,PVLDB, vol. 4(5) (2011), pp. 290-30.
Click through information is one of the strongest signals we have for ranking web pages. We propose an equivalent signal for raking real world places: The number of times that people ask for precise directions to the address of the place. We show that this signal is competitive in quality with human reviews while being much cheaper to collect, we also show that the signal can be incorporated efficiently into a location search system.

Systems

Power Management of Online Data-Intensive Services”, David Meisner, Christopher M. Sadler, Luiz André BarrosoWolf-Dietrich Weber, Thomas F. Wenisch, Proceedings of the 38th ACM International Symposium on Computer Architecture, 2011.
Compute and data intensive Web services (such as Search) are a notoriously hard target for energy savings techniques. This article characterizes the statistical hardware activity behavior of servers running Web search and discusses the potential opportunities of existing and proposed energy savings techniques.

The Impact of Memory Subsystem Resource Sharing on Datacenter Applications”, Lingjia Tang, Jason Mars, Neil Vachharajani, Robert Hundt, Mary-Lou Soffa, ISCA, 2011.
In this work, the authors expose key characteristics of an emerging class of Google-style workloads and show how to enhance system software to take advantage of these characteristics to improve efficiency in data centers. The authors find that across datacenter applications, there is both a sizable benefit and a potential degradation from improperly sharing micro-architectural resources on a single machine (such as on-chip caches and bandwidth to memory). The impact of co-locating threads from multiple applications with diverse memory behavior changes the optimal mapping of thread to cores for each application. By employing an adaptive thread-to-core mapper, the authors improved the performance of the datacenter applications by up to 22% over status quo thread-to-core mapping, achieving performance within 3% of optimal.

Language-Independent Sandboxing of Just-In-Time Compilation and Self-Modifying Code”, Jason Ansel, Petr Marchenko, Úlfar Erlingsson, Elijah Taylor, Brad Chen, Derek Schuff, David Sehr, Cliff L. Biffle, Bennet S. Yee, ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI), 2011.
Since its introduction in the early 90's, Software Fault Isolation, or SFI, has been a static code technique, commonly perceived as incompatible with dynamic libraries, runtime code generation, and other dynamic code. 
 This paper describes how to address this limitation and explains how the SFI techniques in Google Native Client were extended to support modern language implementations based on just-in-time code generation and runtime instrumentation. This work is already deployed in Google Chrome, benefitting millions of users, and was developed over a summer collaboration with three Ph.D. interns; it exemplifies how Research at Google is focused on rapidly bringing significant benefits to our users through groundbreaking technology and real-world products.

Thialfi: A Client Notification Service for Internet-Scale Applications”, Atul Adya, Gregory Cooper, Daniel MyersMichael Piatek,Proc. 23rd ACM Symposium on Operating Systems Principles (SOSP), 2011, pp. 129-142.
This paper describes a notification service that scales to hundreds of millions of users, provides sub-second latency in the common case, and guarantees delivery even in the presence of a wide variety of failures. 
 The service has been deployed in several popular Google applications including Chrome, Google Plus, and Contacts.


译q行?
 



矛_ | Fat Mind 2012-03-24 11:39 发表评论
]]>clojure之HelloWroldhttp://www.aygfsteel.com/shijian/archive/2012/03/18/372159.html矛_ | Fat Mind矛_ | Fat MindSun, 18 Mar 2012 15:33:00 GMThttp://www.aygfsteel.com/shijian/archive/2012/03/18/372159.htmlhttp://www.aygfsteel.com/shijian/comments/372159.htmlhttp://www.aygfsteel.com/shijian/archive/2012/03/18/372159.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/372159.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/372159.html今天开始尝试clojureQ遇到的问题、经验整?br />
1.了解clojure

2.开始HelloWrold
    - 搭徏开发环境(对于从Javaq来的hQ肯定习惯eclipseQ?br />      在线安装的速度比乌龟还慢,推荐全手动方式安装插?br />    Qeclipse手动安装插g http://www.aygfsteel.com/shijian/archive/2012/03/18/372141.htmlQ?br />      ȝzipQ?nbsp;http://roysong.iteye.com/blog/1260147
    - 跑v?br />        - ?黑窗??nbsp;http://clojure.org/getting_startedQ热热n
        - eclipse开发(提醒Q必Lclojure-xxx.jar加入classpathQ?br />        - 阅读 http://www.ibm.com/developerworks/cn/opensource/os-eclipse-clojure/Q再l习

3.如何学习
   http://weiyongqing.iteye.com/blog/1441743
    ?“我就应该一步一步来Q先把clojure的doc文档|站上的core都敲打一遍,然后Q学习孙宁的RPC框架Q空闲时?clojure的问?#8221;




矛_ | Fat Mind 2012-03-18 23:33 发表评论
]]>
eclipse使用整理http://www.aygfsteel.com/shijian/archive/2012/03/18/372141.html矛_ | Fat Mind矛_ | Fat MindSun, 18 Mar 2012 13:10:00 GMThttp://www.aygfsteel.com/shijian/archive/2012/03/18/372141.htmlhttp://www.aygfsteel.com/shijian/comments/372141.htmlhttp://www.aygfsteel.com/shijian/archive/2012/03/18/372141.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/372141.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/372141.html 一、快捷键

1.常用快捷?/span>
    a. crtl + h 查找内容
    b. ctrl + shift + r 快速打开资源文g
    c. ctrl + shift + t 快速打开cL?br />    d. alt + shift + o  快速打开 '选中相同词,出现阴媄'

2.如何讄自己特定的快捷键
    


二、插?br />
?/span>务必阅读Q?/span>
    http://wiki.eclipse.org/FAQ_How_do_I_install_new_plug-ins%3F Qؓ什么推荐用eclipse update managerQ?
    http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way/ Q主要讲?manual install'安装 方式Q?/span>

1.插g安装方式
    1.1 在线安装
          官网wiki写的很清楚,优势Q?.插g之间依赖理、版本兼Ҏ管? 2.如同你在Windows安装软g一P当你不需要的时候可以通过update manage很容易的卸蝲Q当你安装更多的plguinӞ更容易管理?br />    eclipse wiki对manual install的看法:This obviously is a more dangerous approach, as no certification takes place about the suitability of the plug-in; it may rely on other plug-ins not available in your installation. In the case of compatibility conflicts, you won’t find out until you use the plug-in that it might break.
        可惜的是Q很多时候网l的情况不是很理惻I试很多遍后Q依然失败;q是促manual installҎ的原因? 
    1.2 手动安装
        a、第一U方式:下蝲plugin到本圎ͼ解压后复制features、plugin?eclipse_home%下对应的目录
        如此?nbsp;http://static.flickr.com/75/219742315_9ee663e2c8_o.png
        优势Q绝对简单;~点Q正好是通过update manager安装的优点,插g之间的依赖、版本兼Ҏ,以及后箋的管理,都需要手动操作?br />        b、第二种方式Q通过.link的方式,解决'后箋理问题'
             b-1、eclipse目录创徏 links 目录
             b-2、创建对应的.link文gQ如Qsubversive.link
             b-3、创建subversive/eclipse/Q拷贝features、plugin到此目录
             b-4、修改subversive.link文gQ如Qpath=E:/dev/eclipse-t/thrid-plugins/subversive
             b-5、重启eclipseQ重启后Q发现要使用svnQ必d装subversive connectorQ验证手动安装的~点Q?br />         c、提C:
                   - 手动安装插gӞ务必仔细阅读Q此插g的先前条Ӟ否则出问题,很难排查Q?br />                    如:m2eclipse先决条g
subeclipse
、mylyn?br />                    ?“Pre-requisite: an Eclipse version including Java Support (e.g. with the JDT : Java Development Tools, as in Eclipse For Java Developers, Eclipse For RCP/RAP developers, Eclipse for JavaEE developers, etc.)” http://code.google.com/p/counterclockwise/wiki/Documentation#Install_Counterclockwise_plugin
                   - 
eclipse 手动安装pluginQ?link文g的path路径 必须使用l对路径


ȝQ对eclipse插g安装Q首先推荐update managerQ仅当网l环境不允许Ӟ安装p|Ӟ再尝试手动安装?br />
2.插g资源攉

2.1?m2eclipse插g安装
    1Q先x?br />         a、eclipse3.2或更高版本(可忽略,一般用的eclipse已经3.5以上 版本Q?br />         b、jdk高于1.4版本Qeclipseq行在jdk环境Q非jre环境
        c、必d安装插gQsubeclipseQsvnQ、mylynQQ务管理)Q? mylyn在eclipse3.5以上版本Q已默认存在Q无需安装
        svn插g在线安装地址Q网l不定性,更推荐下载zipQarchive选择本地文g安装Q?br />        http://subclipse.tigris.org/servlets/ProjectProcess;jsessionid=290480ED68C2C7E781DCCE66CE657FC2?pageID=p4wYuA
     2Q安装m2eclipseQ未扑ֈ可下载到本地的zipQ只能在U安装,地址 http://www.eclipse.org/m2e/download/




矛_ | Fat Mind 2012-03-18 21:10 发表评论
]]>
泛型 [core Java 阅读W记]http://www.aygfsteel.com/shijian/archive/2012/03/08/371545.html矛_ | Fat Mind矛_ | Fat MindThu, 08 Mar 2012 13:05:00 GMThttp://www.aygfsteel.com/shijian/archive/2012/03/08/371545.htmlhttp://www.aygfsteel.com/shijian/comments/371545.htmlhttp://www.aygfsteel.com/shijian/archive/2012/03/08/371545.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/371545.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/371545.html题记Q单元测试的q程中,遇到泛型mock的问题;重新温习一遍,阅读Qcore java 泛型Q?br />


xmind格式Q可下蝲Q?Q?a title="整理q程中,记录为xmind格式" href="/Files/shijian/generic.rar">整理q程中,记录为xmind格式

单元试遇到的问题,化后如下Q?br />
 1     public List<? extends Date> getDateT() {
 2         return null;
 3     }
 4     public List<Date> getDate() {
 5         return null;
 6     }
 7     public void mockGetDate() {
 8         TestMain main = mock(TestMain.class);
 9         when(main.getDate()).thenReturn(new ArrayList<Date>()); //~译OK
10         /*
11          * The method thenReturn(List<capture#2-of ? extends Date>) in the type 
12          * OngoingStubbing<List<capture#2-of ? extends Date>>
                 is not applicable for the arguments (ArrayList<Date>)
13          */
14         when(main.getDateT()).thenReturn(new ArrayList<Date>()); //~译错误
15         when(main.getDateT()).thenReturn(new ArrayList<Timestamp>()); //~译错误
16         when(main.getDateT()).thenReturn(new ArrayList<Object>()); //~译错误
17         when(main.getDateT()).thenReturn(new ArrayList()); //~译OK
18     }

仍没理解Q哪位大仙,能帮我解释下 Q?img src ="http://www.aygfsteel.com/shijian/aggbug/371545.html" width = "1" height = "1" />

矛_ | Fat Mind 2012-03-08 21:05 发表评论
]]>
记录_日常问题http://www.aygfsteel.com/shijian/archive/2011/12/15/366443.html矛_ | Fat Mind矛_ | Fat MindThu, 15 Dec 2011 07:55:00 GMThttp://www.aygfsteel.com/shijian/archive/2011/12/15/366443.htmlhttp://www.aygfsteel.com/shijian/comments/366443.htmlhttp://www.aygfsteel.com/shijian/archive/2011/12/15/366443.html#Feedback0http://www.aygfsteel.com/shijian/comments/commentRss/366443.htmlhttp://www.aygfsteel.com/shijian/services/trackbacks/366443.html1.应用 jar 冲突
    log4j冲突DQ应用报错。类型{换冲H?br />    需求:定位某个cd际从那个jar加蝲 Q?-verbose:class 参数Q或?nbsp;
-XX:+TraceClassLoadingQ,详细的记录了加蝲了那些类、从那个jar加蝲?br />
参见Q?a >http://agapple.iteye.com/blog/946603

2.性能试q程
   linux有什么命令、或软gQ可以同时收集cpu、load、上下文切换、mem、网lIO、磁盘IO{数据吗 Q?br />   vmstat 含义详解 Q?->  囑Ş化报?Q痛苦的是要'人工'看着记录数据Q这直是E序员的污点呀Q?br />   Qvmstat的IOl计的是块设备(如磁盘)的数据,|卡没有对应的设备文Ӟhttp://oss.org.cn/kernel-book/ch11/11.2.3.htmQ,|络IOl计使用iftopQ?nbsp;
   vmstat http://linux.about.com/library/cmd/blcmdl8_vmstat.htm

3.Jboss启动错误 
java.sql.SQLException: Table already exists: JMS_MESSAGES in statement [CREATE CACHED TABLE JMS_MESSAGES]
参见Qhttp://dinghaoliang.blog.163.com/blog/static/126540714201082764733272/
%jboss_home%/server/default/deploy/hsqldb-ds.xmlq个文g中有一个DefaultDS数据源配|,临时解决删除hsqldb-ds.xml文g。原因未知?br />
4.logback 0.9.19 版本Q引?lt;encoder>Q放?<appender><layout></appenader>
        <encoder>
            
<pattern>%m%n</pattern>
            
<charset class="java.nio.charset.Charset">UTF-8</charset>
        
</encoder>

源码QOutputStreamAppender.java
  protected void writeOut(E event) throws IOException {
    this.encoder.doEncode(event);
  }
Ҏ志文件charset指定Q经qdebug调试Q必通过此方式配|才有效。否则取pȝ默认~码?br />
5.讄linuxpȝ~码
http://linux.vbird.org/linux_basic/0320bash.php#variable_locale
其实‘pȝ~码’讄Q即讄对应的系l变量,则所有可讄pȝ变量的文仉可设|编码,export使其生效
locale 查看当前用户使用的编码(Q,locale -a 查看机器所支持的所有编?br />默认讄Q?br />  a、系l? /etc/profile -> /etc/sysconfig/i18nQ设|?LANG Q无效显Cexport生效Q(YYQi18n有个LANGUAGE讑֮Q不知其含义Q删除无影响Q?br />  b、用L?~/bash_rc、~/bash_profile、~/bash_login、~/profileQ读取有限顺序:从左向右Q必LCexport生效
  
a定 LANG 或者是 LC_ALL 時,則其他的語系變數會被這兩個變數所取代。M一句话Q在当前用户讄LANGQ是最优方案?br />


矛_ | Fat Mind 2011-12-15 15:55 发表评论
]]>
վ֩ģ壺 | | ζ| | Թ| | | | | «ɽ| | | ˷| ɽ| | ̶| | ɽ| ½| | | | | ̴| | | | ˳| | | | ¡| Ѯ| | ƺ| ʶ| | | | ƺ| |