锘??xml version="1.0" encoding="utf-8" standalone="yes"?>中日韩视频在线观看,精品中文一区,老司机aⅴ在线精品导航http://www.aygfsteel.com/shijian/zh-cnTue, 24 Jun 2025 01:59:02 GMTTue, 24 Jun 2025 01:59:02 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
    asd錛坅ctivity stream data錛夋暟鎹槸浠諱綍緗戠珯鐨勪竴閮ㄥ垎錛屽弽鏄犵綉绔欎嬌鐢ㄦ儏鍐碉紝濡傦細閭d簺鍐呭琚悳绱€€佸睍紺恒€傞€氬父錛屾閮ㄥ垎鏁版嵁琚互log鏂瑰紡璁板綍鍦ㄦ枃浠訛紝鐒跺悗瀹氭湡鐨勬暣鍚堝拰鍒嗘瀽銆俹d錛坥peration data錛夋槸鍏充簬鏈哄櫒鎬ц兘鏁版嵁錛屽拰鍏跺畠涓嶅悓閫斿緞鏁村悎鐨勬搷浣滄暟鎹€?br />     鍦ㄨ繎鍑犲勾錛宎sd鍜宱d鍙樻垚涓€涓綉绔欓噸瑕佺殑涓€閮ㄥ垎錛屾洿澶嶆潅鐨勫熀紜€璁炬柦鏄繀欏葷殑銆?br />      鏁版嵁鐗圭偣錛?br />         a銆佸ぇ鍚炲悙閲忕殑涓嶅彉鐨刟d錛屽瀹炴椂璁$畻鏄竴涓寫鎴橈紝浼氬緢瀹規槗瓚呰繃10鍊峯r100鍊嶃€?/span> 
        b銆佷紶緇熺殑璁板綍log鏂瑰紡鏄?span class="Apple-style-span" style="font-family: verdana, 'courier new'; font-size: 14px; line-height: 21px; color: #000000; ">respectable and scalable鏂瑰紡鍘繪敮鎸佺綰垮鐞嗭紝浣嗘槸寤惰繜澶珮銆?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 case錛?span class="Apple-style-span" style="font-size: 14px; ">娑堟伅鎸佷箙
  2. Throughput rather than features are the primary design constraint錛?span class="Apple-style-span" style="font-size: 14px; ">鍚炲悙閲忔槸絎竴瑕佹眰
  3. State about what has been consumed is maintained as part of the consumer not the server錛?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 machines錛?span class="Apple-style-span" style="font-size: 14px; ">蹇呴』鏄垎甯冨紡
3.Basics
    Messages are the fundamental unit of communication錛?br />     Messages are
 published to a topic by a producer which means they are physically sent to a server acting as a broker錛屾秷鎭鐢熶駭鑰呭彂甯冨埌涓€涓猼opic錛屾剰鍛崇潃鐗╃悊鐨勫彂閫佹秷鎭埌broker錛?br />     澶氫釜consumer璁㈤槄涓€涓猼opic錛屽垯姝opic鐨勬瘡涓秷鎭兘浼氳鍒嗗彂鍒版瘡涓猚onsumer錛?br />     kafka鏄垎甯冨紡錛歱roducer銆乥roker銆乧onsumer錛屽潎鍙互鐢遍泦緹ょ殑澶氬彴鏈哄櫒緇勬垚錛岀浉浜掑崗浣?a logic group錛?br />     灞炰簬鍚屼竴涓猚onsumer group鐨勬瘡涓€涓猚onsumer process錛屾瘡涓秷鎭兘鍑嗙‘鐨勭敱鍏朵腑鐨勪竴涓猵rocess娑堣垂錛?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涓嶇涓€涓猼opic鏈夊灝戜釜consumer錛屽叾娑堟伅浠呬細瀛樺偍涓€浠姐€?br />
4.Message Persistence and Caching

4.1 Don't fear the filesystem !
    kafka瀹屽叏渚濊禆鏂囦歡緋葷粺鍘誨瓨鍌ㄥ拰cache娑堟伅錛?br />     澶у閫氬父瀵圭鐩樼殑鐩磋鏄?寰堟參'錛屽垯浣夸漢浠鎸佷箙鍖栫粨鏋勶紝鏄惁鑳芥彁渚涙湁绔炰簤鍔涚殑鎬ц兘琛ㄧず鎬€鐤戯紱瀹為檯涓婏紝紓佺洏鍒板簳鏈夊鎱㈡垨澶氬潡錛屽畬鍏ㄥ彇鍐充簬濡備綍浣跨敤紓佺洏錛?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 紓佺洏縐嶇被
    紓佺洏欏哄簭璇誨啓鐨勬€ц兘闈炲父楂橈紝 linear writes on a 6 7200rpm SATA RAID-5 array is about 300MB/sec錛?/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銆傞『搴忚鍐欐槸鏈€鍙瑙佺殑妯″紡錛屽洜姝ゆ搷浣滅郴緇熼€氳繃read-head鍜寃rite-behind鎶€鏈幓浼樺寲銆?br />     鐜頒唬鎿嶄綔緋葷粺錛岀敤mem浣滀負disk鐨刢ache錛汚ny 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. 
    Jvm錛歛銆佸璞$殑鍐呭瓨寮€閿€鏄潪甯稿ぇ鐨勶紝閫氬父鏄暟鎹瓨鍌ㄧ殑2鍊嶏紱b銆佸綋heap鏁版嵁澧炲ぇ鏃訛紝gc浠d環瓚婃潵瓚婂ぇ錛?/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銆備緷璧栨枃浠剁郴緇熷拰pagecache鏄紭浜巑em cahce鎴栧叾瀹冪粨鏋勭殑銆?/span>
    鏁版嵁鍘嬬緝錛孌oing 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. 灝藉彲鑳界殑緇存寔鍦ㄥ唴瀛樹腑錛屼粎褰撳繀欏繪椂鍐欏洖鍒版枃浠剁郴緇?
    褰撴暟鎹绔嬪嵆鍐欏洖鍒版寔涔呭寲鐨勬枃浠訛紝鑰屾湭璋冪敤flush錛屽叾鎰忓懗鐫€鏁版嵁浠呰鍐欏叆鍒皁s pagecahe錛屽湪鍚庣畫鏌愪釜鏃墮棿鐢眔s flush銆俆hen 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.
    鎸佷箙鍖栨秷鎭殑鍏冩暟鎹€氬父鏄疊Tree緇撴瀯錛屼絾紓佺洏緇撴瀯錛屽叾浠d環澶ぇ銆傚師鍥狅細瀵婚亾銆侀伩鍏嶉攣鏁存5鏍戙€?br />     
Intuitively a persistent queue could be built on simple reads and appends to files as is commonly the case with logging solutions.
    鎸佷箙鍖栭槦鍒楀彲浠ユ瀯寤哄湪璇誨拰append to 鏂囦歡銆傛墍浠ヤ笉鏀寔BTree鐨勪竴浜涜涔夛紝浣嗗叾濂藉鏄細O(1)娑堣€楋紝鏃犻攣璇誨啓銆?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浼樺厛浜巔roducer銆?br />     
There are two common causes of inefficiency :
        two many network requests, 錛?
 APIs are built around a "message set" abstraction錛?
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.錛?浠呮彁渚涙壒閲忔搷浣渁pi錛屽垯姣忔緗戠粶寮€閿€鏄鉤鍒嗗湪涓€緇勬秷鎭紝鑰屼笉鏄崟涓秷鎭€?br />     and excessive byte copying.錛?
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.錛?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鎻愪緵鐨剒ero-copy錛?
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.
    鐞嗚В錛歬afka 
producer api 鎻愪緵鎵歸噺鍘嬬緝錛宐roker涓嶅姝ゆ壒娑堟伅鍋氫換浣曟搷浣滐紝涓斾互鍘嬬緝鐨勬柟寮忥紝涓€璧瘋鍙戦€佸埌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. 澶ч儴鍒嗘秷鎭郴緇燂紝瀛樺偍鏄惁琚秷璐圭殑鍏冧俊鎭湪broker銆傚垯鏄錛屼竴涓秷鎭鍒嗗彂鍒頒竴涓猚onsumer錛宐roker璁板綍銆?br />     闂錛氬綋consumer娑堣垂澶辮觸鍚庯紝浼氬鑷存秷鎭涪澶憋紱鏀硅繘錛氭瘡嬈onsumer娑堣垂鍚庯紝緇檅roker ack錛岃嫢broker鍦ㄨ秴鏃舵椂闂存湭鏀跺埌ack錛屽垯閲嶅彂姝ゆ秷鎭€?br />     闂錛?.褰撴秷璐規垚鍔燂紝浣嗘湭ack鏃訛紝浼氬鑷存秷璐?嬈? 2.
 now the broker must keep multiple states about every single message  3.褰揵roker鏄鍙版満鍣ㄦ椂錛屽垯鐘舵€佷箣闂撮渶瑕佸悓姝?br />
4.5.1 Message delivery semantics
    
So clearly there are multiple possible message delivery guarantees that could be provided : at most once 銆乤t least once銆乪xactly 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). 
    娑堣垂鍒嗗彂璇箟錛屾槸 ‘浜嬪姟鎻愪氦’ 闂鐨勫彉縐嶃€傜畻娉曟彁渚?exactly onece 璇箟錛屼袱闃舵 or 涓夐樁孌墊彁浜わ紝paxos 鍧囨槸渚嬪瓙錛屼絾瀹冧滑瀛樺湪緙虹偣銆傚吀鍨嬬殑闂鏄姹傚嬈ound trip錛屼笖
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鐩爣鏄痗onsumer鑳藉湪鏈€澶ч€熺巼鍘繪秷璐癸紝鍙笉騫哥殑鏄紝褰揷onsume閫熺巼灝忎簬鐢熶駭閫熺巼鏃訛紝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.  涓嶅瓨鍦╬ush闂錛屼笖涔熶繚璇佸厖鍒嗗埄鐢╟onsumer鑳藉姏銆?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閫氳繃zk錛岀鐞嗕笌broker鐨勮繛鎺ャ€傚綋涓€涓姹傦紝鏍規嵁partition rule 璁$畻鍒嗗尯錛屼粠榪炴帴姹犻€夋嫨瀵瑰簲鐨刢onnection錛屽彂閫佹暟鎹€?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. 




]]>
Js緇冧範錛氭搷綰礳ookiehttp://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浠g爜錛宭ogin.js鏂囦歡

//鐢ㄦ埛鐨勭櫥闄嗕俊鎭啓鍏ookies
function SetCookie(form)//涓や釜鍙傛暟錛屼竴涓槸cookie鐨勫悕瀛愶紝涓€涓槸鍊?/span>
{   
    var name = form.name.value;
    var password = form.password.value;
    var Days = 1; //姝?nbsp;cookie 灝嗚淇濆瓨 7 澶?nbsp;
    var exp  = new Date(); //鐢熸垚涓€涓幇鍦ㄧ殑鏃ユ湡錛屽姞涓婁繚瀛樻湡闄愶紝鐒跺悗璁劇疆cookie鐨勭敓瀛樻湡闄愶紒
    exp.setTime(exp.getTime() + Days*24*60*60*1000);
    document.cookie = "user="+ escape(name) + "/" + escape(password) + ";expires=" + exp.toGMTString();
}
//鍙朿ookies鍑芥暟--姝e垯琛ㄨ揪寮?涓嶄細錛屽涔犳鍒欒〃杈懼紡)  
function getCookie(name)      
{
    var arr = document.cookie.match(new RegExp("(^| )"+name+"=([^;]*)(;|$)"));
    if(arr != nullreturn unescape(arr[2]); 
    return null;
}
//鍙朿ookies鍑芥暟--鏅€氬疄鐜?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]; 
              }
          }   
      }    
  }   
//鍒犻櫎cookie錛岋紙servlet閲岄潰錛氳緗椂闂翠負0錛岃緗負-1鍜宻ession鐨勮寖鍥存槸涓€鏍風殑錛夛紝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浠g爜錛屾枃浠秎ogin.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鎺у埗鐨刢ookie-->
        <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">
                                        瀵嗙爜錛?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)">璁頒綇鎴?nbsp;         
                        </form>
                    </td>
                </tr>
            </table>
        </div>
    </body>
</html>

 


鐩殑錛氬綋浣犲啀嬈℃墦寮€login.jsp欏甸潰錛岃〃鍗曢噷闈㈢殑鍐呭宸茬粡鍐欏ソ浜嗭紝鏄綘涓婁竴嬈$殑鐧婚檰淇℃伅錛?/p>


闂錛?.JavaScript閲岄潰鍙朿ookie閮芥槸鍐欐鐨勶紝涓嶆槸寰堢伒媧伙紒
            2.JavaScript鐨刢ookie鏄寜鐓у瓧絎︿覆鐨勫艦寮忓瓨鏀劇殑錛屾墍浠ユ嬁鍑虹殑鏃跺€欙紝浣犺鎸夌収浣犳斁榪涘幓鐨勫艦寮忔潵閫夋嫨錛?/div>
            3.鏈潵鏄兂瀹炵幇鑷姩鐧婚檰鐨勶紝鍙垜鐨勬瘡涓〉闈㈤兘瑕乻ession鐨勬鏌ワ紒涓€涓鎴風錛屼竴涓湇鍔″櫒绔紝娌¤兘瀹炵幇錛?/div>

 

 



]]>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銆乶umber銆乥oolean鍧囨湁瀵瑰簲鐨?'瀵硅薄綾?
2.鍑芥暟
  - 瀹氫箟鍑芥暟
        - function 鍏抽敭瀛?br />        - 鍙傛暟錛堣渚嬪瓙錛夛紝arguments
        - 鍑芥暟鍐呭彉閲忓0鏄庯紝var鍖哄埆
  - 浣滅敤鍩?br />        - 閾懼紡緇撴瀯錛堝瓙鍑芥暟鍙互鐪嬭鐖跺嚱鏁扮殑鍙橀噺錛?br />  - 鍖垮悕鍑芥暟
      - 浣跨敤鍦烘櫙錛堥潪澶嶇敤鍦烘櫙錛屽錛歫sonp鍥炶皟鍑芥暟錛?br />      - this鐗瑰緛
渚嬪瓙錛?/font>
var add = function(x) {
    return x++;

}
add(1,2,3); // 鍙傛暟鍙互闅忔剰澶氫釜錛岀被浼糐ava涓殑(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(); // windows錛宼his鍦ㄥ尶鍚嶅嚱鏁板唴閮ㄦ槸鎸囧悜windows鑼冨洿

var name = "windows";
var fn = function() {
    name 
= "hello";
    alert(
this.name);
}
fn(); // 鍥犲嚱鏁板唴閮ㄥ彉閲弉ame鏈0鏄庝負var錛屽垯灞炰簬鍏ㄥ眬鍙橀噺錛屼笖this鎸囧悜windows錛屽垯涓?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 銆恎ood銆?br />鍏跺畠璇█闂寘姒傚康 http://www.ibm.com/developerworks/cn/linux/l-cn-closure/

4.瀵硅薄
    - new Object()
    – 瀵硅薄瀛楅潰閲?/div>
    – 鏋勯€犲嚱鏁?br />    - 涓婅堪鎿嶄綔錛岀粡鍘嗙殑姝ラ
        –鍒涘緩鏂板璞?div>
        –灝嗘瀯閫犳柟娉曠殑浣滅敤鍩熻祴緇欐柊瀵硅薄(new 鎿嶄綔絎?
        –涓哄璞℃坊鍔犲睘鎬? 鏂規硶
        –榪斿洖璇ュ璞?/div>

var obj = new Object();  // new Object鏂瑰紡
obj.name = 'zhangsan';

var obj = {                   // 瀛楅潰甯擱噺鏂瑰紡錛屽畾涔夊璞?/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 鍏抽敭錛屽惁鍒欑瓑浜庤皟鐢ㄤ竴涓櫘閫氬嚱鏁?br />obj.showName();
alert(obj.name);


璧勬枡錛氬唴閮ㄥ煿璁璸pt 


]]>[杞琞 Linux 鍙ユ焺鏄粈涔?錛?/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";">鍙ユ焺灝辨槸涓€涓爣璇嗙錛屽彧瑕佽幏寰楀璞$殑鍙ユ焺錛屾垜浠氨鍙互瀵瑰璞¤繘琛屼換鎰忕殑鎿嶄綔銆?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";">鍙ユ焺涓嶆槸鎸囬拡錛屾搷浣滅郴緇熺敤鍙ユ焺鍙互鎵懼埌涓€鍧楀唴瀛橈紝榪欎釜鍙ユ焺鍙兘鏄爣璇嗙錛?/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";">錛屼篃鍙兘鏄寚閽堬紝鐪嬫搷浣滅郴緇熸€庝箞澶勭悊鐨勪簡銆?/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";">綆楁槸鍦ㄦ煇縐嶇▼搴︿笂鏇夸唬鍙ユ焺鍚э紱</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";">鏈夌浉搴旀満鍒訛紝浣嗘病鏈夌粺涓€鐨勫彞鏌勭被鍨嬶紝鍚勭綾誨瀷鐨勭郴緇熻祫婧愮敱鍚勮嚜鐨勭被鍨嬫潵鏍囪瘑錛岀敱鍚勮嚜鐨勬帴鍙f搷浣溿€?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";">鍦ㄦ搷浣滅郴緇熷眰闈笂錛屾枃浠舵搷浣滀篃鏈夌被浼間簬</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";">閲岋紝榪欏彨鍋氭枃浠舵弿榪扮</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";">錛岃€屽湪</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";">浠ヤ笅鍦ㄦ病鏈夋涔夌殑鏃跺€欑粺縐頒負鍙ユ焺</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";">鍚庣敤鎴鋒搷綰墊枃浠剁殕閫氳繃璇ュ彞鏌勮繘琛屻€?/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";">Linux</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";">Windows</span><span style="font-size:10.5pt;Times New Roman";">錛屾枃浠跺彞鏌勬€繪槸鍜屽唴鏍哥殑鏂囦歡瀵硅薄鐩稿叧鑱旂殑錛屼絾濡備綍鍏寵仈緇嗚妭鐢ㄦ埛騫朵笉鍙銆傚唴鏍稿彲浠ラ€氳繃鍙ユ焺鏉ヨ綆楀嚭鍐呮牳閲屾枃浠跺璞$殑鍦板潃錛屼絾姝よ兘鍔涘茍涓嶅鐢ㄦ埛寮€鏀俱€?/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";">Linux</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";">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";">鍒嗗埆浠h〃鏍囧噯杈撳叆銆佹爣鍑嗚緭鍑哄拰鏍囧噯閿欒杈撳嚭銆傚湪紼嬪簭涓墦寮€鏂囦歡寰楀埌鐨?/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";">鍦ㄥ唴鏍鎬腑錛屾瘡涓€涓繘紼嬮兘鏈変竴涓鏈夌殑</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";">”</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;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";">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";">fd</span><span style="font-size:10.5pt;Times New Roman";">錛屼篃鏃犳硶寰楀埌鎵撳紑鏂囦歡瀵硅薄鐨勫湴鍧€錛屽彧鑳藉閫氳繃緋葷粺鎻愪緵鐨勫嚱鏁版潵鎿嶄綔銆?/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";">璇█閲岋紝鎿嶇旱鏂囦歡鐨勬笭閬撳垯鏄?/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";">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";">緇撴瀯蹇呭畾鍜?/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";">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";">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="紼嬪簭璁捐"><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";">,</span><span style="font-size:10.5pt;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="搴旂敤紼嬪簭"><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";">(</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";">鎵€綆$悊鐨?/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></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";">錛岃€屽彞鏌勫垯鏄敱緋葷粺鎵€綆$悊鐨勫紩鐢ㄦ爣璇嗭紝璇ユ爣璇嗗彲浠ヨ緋葷粺閲嶆柊瀹氫綅鍒頒竴涓?/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";">鐨勬帶鍒躲€傦紙鍙傝</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></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";">騫翠唬鐨勬搷浣滅郴緇燂紙濡?/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";">錛夌殑</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";">緋葷粺鐨?/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="Windows API"><span style="text-decoration: none; ">Windows API</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";">涔嬮棿鐨勯€氫俊娓犻亾銆備緥濡傦紝妗岄潰涓婄殑涓€涓獥浣撶敱涓€涓?/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";">綾誨瀷鐨勫彞鏌勬潵鏍囪瘑銆?/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";">鎰堝姞鍙楀埌闈掔潗錛岃€屾寚鍚戝彟涓€鎸囬拡鐨勯偅綾誨彞鏌勫彈鍒板喎娣°€傚敖綆″姝わ紝璁稿</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";">浼犻€掔粰</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";">涓嬫爣縐頒負鍙ユ焺銆?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瀹樻柟 錛?a >http://code.google.com/p/powermock/ 

1. 浣跨敤mockito鐨勫悓瀛︼紝鎺ㄨ崘闃呰濡備笅閮ㄥ垎

    - document [蹇呴€塢
        - getting started
        - motavition
    - mockito extends [蹇呴€塢
        - mockito 1.8+ useage
    - common
    - tutorial
    - faq [蹇呴€塢


2. 闄勪歡錛氬疄闄呭紑鍙戜腑浣跨敤鍒扮殑
powermock鐨勪竴浜涚壒鎬э紝綆€鍖栧悗鐨勪緥瀛愶紙浠呬負璇存槑powermock api浣跨敤錛?/span>銆備富瑕佸寘鎷?/span> 錛?/span>

 

-          淇敼縐佹湁鍩?/span>

-          縐佹湁鏂規硶

-            嫻嬭瘯縐佹湁鏂規硶

-            Mock

-            Verify

-          闈欐€佹柟娉?/span>

-            Mock

-            鎶涘嚭寮傚父

-            Verify

-          Mock綾婚儴鍒嗘柟娉?/span>

-          Mock Java core library錛屽錛?/span>Thread

-          Mock 鏋勯€犲櫒

/Files/shijian/powermock.rar





]]>
[杞琞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


鍘熸枃鍦板潃錛?/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.

 

璋鋒瓕鍏徃縐瀬鍙備笌縐戝鐣岀殑浜ゆ祦錛岄€氳繃鍙戣〃鎶€鏈鏂囷紝璐$尞寮€婧愯蔣浠訛紝鍒跺畾鏍囧噯錛屽紩鍏ユ柊鐨?/span>API鍜屽伐鍏鳳紝涓懼姙璁插駭鍜屾紨璁詫紝鍙傚姞姝e湪榪涜鐨勬妧鏈京璁猴紝絳夌瓑銆傛垜浠彂甯冪殑鏂囩珷鎻愪緵鎶€鏈拰綆楁硶鐨勮繘姝ワ紝鍦ㄥ紑鍙戞柊鐨勪駭鍝佸拰鏈嶅姟榪囩▼涓涔犲埌鐨勫唴瀹癸紝鎻ず涓€浜涙垜浠湪璋鋒瓕鎵€闈復鐨勬妧鏈寫鎴樸€?/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.

 

涓轟簡褰版樉鎴戜滑鐨勪竴浜涘伐浣滐紝鎴戜滑瀹氭湡閫夋嫨涓€浜涘垪鏂囩珷鍙戝竷鍦?/span>blog銆?/span>2010涓湡錛屾垜浠涓€嬈″彂甯冧簡涓€浜涘垪鐨勬枃绔犲湪blog錛屽茍闅忓悗鍦ㄥ崥瀹㈡枃绔犱腑鏇磋緇嗚璁哄畠浠€傚湪絎簩杞腑錛屾垜浠己璋冧粠2010騫翠笅鍗婂勾鏂板€煎緱娉ㄦ剰鐨勮鏂囥€傝繖涓€嬈★紝鎴戜滑緇欐湁褰卞搷鍔涚殑鏂囩珷鐨勪綔鑰呮垨鍚堣憲鑰呬互鑽h獕錛屽ぇ綰﹀崰鎬繪枃绔犳暟鐨?/span>10%銆傝繖鏄壈闅劇殑閫夋嫨鐨勶紝鎵€浠ユ垜浠彲鑳藉凡緇忛仐婕忎簡涓€浜涢噸瑕佹枃绔犮€傚洜姝わ紝璇風湅瀹屾暣鐨勬枃绔犳竻鍗曘€?/span>

 

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

 

鍦ㄦ湭鏉ュ嚑鍛ㄦ垜浠皢鏇存繁鍏ョ殑璋堣榪欎簺璁烘枃錛屼絾鐜板湪鍙仛涓€浜涙€葷粨銆?/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.

 

澹伴煶澶勭悊錛?/span>榪欎釜婊ゆ嘗鍣ㄧ駭鑱旀ā鍨嬬殑鑰蟲湹鏄敤鏉ヤ綔涓轟竴縐嶉珮鏁堢殑澹伴煶澶勭悊鍣紝鏄胺姝岀殑鍑犱釜鏈哄櫒澹伴煶澶勭悊欏圭洰涔嬩竴銆?/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. 

 

浣滆€呬粙緇嶅湪綰垮箍鍛婂垎閰嶅拰鍖歸厤鏂歸潰鐨勪紭闆呭拰寮哄ぇ鐨勭畻娉曟妧鏈細涓€縐嶆販鍚堥殢鏈烘壈鍔ㄥ拰璐┆閫夋嫨錛屽疄鐜板湪綰垮喅瀹氥€備粬浠殑鎶€鏈彮紺轟簡緇忓吀鐨勫尮閰嶇畻娉曠殑鏂扮殑鏂瑰悜錛屼緥濡傦紝鎸戦€夊叾涓竴緇勭浉鍏崇殑騫垮憡錛屼簨鍏堜笉鐭ラ亾鏈潵鐨勭綉绔欓〉闈㈣闂殑騫垮憡浣嶇疆鐨勯渶姹傘€傘€愬叧娉ㄣ€?/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.

 

綾沖皵鏍煎叞濮嗙殑鍏釜搴﹀垎紱誨疄楠?/span>錛岃糠浜虹殑灝忎笘鐣岄伒浠庡畠鐨勭粨鏋滐紝鍦ㄦ渶榪戝嚑騫村凡緇忎駭鐢熶簡寰堝鏈夎叮鐨勭爺絀躲€傚湪榪欎竴鍏鋒湁閲岀▼紕戞剰涔夌殑瀹為獙錛岃〃鏄庢湭鐭ョ殑瀵規柟寰€寰€鏄€氳繃鐔熶漢錛屼互浠や漢鎯婅鐨勭煭閾捐繛鎺ュ嵆鍙璇嗐€傚湪鏈枃涓紝鎴戜滑鎻愪緵鐞嗚鍜屽疄楠屽叧浜庤繎浠g殑紺句細緗戠粶妯″瀷錛?/span>Affiliation Networks錛屾彁渚涗簡涓€縐嶈В閲婅繖縐嶇幇璞★紝騫舵縺鍙戠ぞ浼氱綉緇滅殑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.

 

鍦ㄧ鏁e晢鍝佸競鍦虹殑闈炰環鏍煎鉤琛°€愬叧娉ㄣ€?/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.


緲昏瘧榪涜涓?
 



]]>clojure涔婬elloWroldhttp://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浠婂ぉ寮€濮嬪皾璇昪lojure錛岄亣鍒扮殑闂銆佺粡楠屾暣鐞?br />
1.浜嗚Вclojure

2.寮€濮婬elloWrold
    - 鎼緩寮€鍙戠幆澧冿紙瀵逛簬浠嶫ava榪囨潵鐨勪漢錛岃偗瀹氫範鎯痚clipse錛?br />      鍦ㄧ嚎瀹夎鐨勯€熷害姣斾箤榫熻繕鎱紝鎺ㄨ崘鍏ㄦ墜鍔ㄦ柟寮忓畨瑁呮彃浠?br />    錛坋clipse鎵嬪姩瀹夎鎻掍歡 http://www.aygfsteel.com/shijian/archive/2012/03/18/372141.html錛?br />      紱葷嚎zip錛?nbsp;http://roysong.iteye.com/blog/1260147
    - 璺戣搗鏉?br />        - 鍏?榛戠獥鍙?鍚?nbsp;http://clojure.org/getting_started錛岀儹鐑韓
        - eclipse寮€鍙戯紙鎻愰啋錛氬繀欏繪妸clojure-xxx.jar鍔犲叆classpath錛?br />        - 闃呰 http://www.ibm.com/developerworks/cn/opensource/os-eclipse-clojure/錛屽啀緇冧範

3.濡備綍瀛︿範
   http://weiyongqing.iteye.com/blog/1441743
    寮?“鎴戝氨搴旇涓€姝ヤ竴姝ユ潵錛屽厛鎶奵lojure鐨刣oc鏂囨。緗戠珯涓婄殑core閮芥暡鎵撲竴閬嶏紝鐒跺悗錛屽涔犲瓩瀹佺殑RPC妗嗘灦錛岀┖闂叉椂鍋?clojure鐨勯棶棰?#8221;




]]>
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 蹇€熸墦寮€璧勬簮鏂囦歡
    c. ctrl + shift + t 蹇€熸墦寮€綾繪枃浠?br />    d. alt + shift + o  蹇€熸墦寮€ '閫変腑鐩稿悓璇嶏紝鍑虹幇闃村獎'

2.濡備綍璁劇疆鑷繁鐗瑰畾鐨勫揩鎹烽敭
    


浜屻€佹彃浠?br />
璇?/span>鍔″繀闃呰錛?/span>
    http://wiki.eclipse.org/FAQ_How_do_I_install_new_plug-ins%3F 錛堜負浠€涔堟帹鑽愪嬌鐢╡clipse update manager錛?
    http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way/ 錛堜富瑕佽瑙?manual install'瀹夎 鏂瑰紡錛?/span>

1.鎻掍歡瀹夎鏂瑰紡
    1.1 鍦ㄧ嚎瀹夎
          瀹樼綉wiki鍐欑殑寰堟竻妤氾紝浼樺娍錛?.鎻掍歡涔嬮棿渚濊禆綆$悊銆佺増鏈吋瀹規€х鐞? 2.濡傚悓浣犲湪Windows瀹夎杞歡涓€鏍鳳紝褰撲綘涓嶉渶瑕佺殑鏃跺€欏彲浠ラ€氳繃update manage寰堝鏄撶殑鍗歌澆錛涘綋浣犲畨瑁呮洿澶氱殑plguin鏃訛紝鏇村鏄撶鐞嗐€?br />    eclipse wiki瀵筸anual 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.
        鍙儨鐨勬槸錛屽緢澶氭椂鍊欑綉緇滅殑鎯呭喌涓嶆槸寰堢悊鎯籌紝灝濊瘯寰堝閬嶅悗錛屼緷鐒跺け璐ワ紱榪欐槸淇冧嬌manual install鏍規湰鐨勫師鍥犮€? 
    1.2 鎵嬪姩瀹夎
        a銆佺涓€縐嶆柟寮忥細涓嬭澆plugin鍒版湰鍦幫紝瑙e帇鍚庡鍒秄eatures銆乸lugin鍒?eclipse_home%涓嬪搴旂殑鐩綍
        濡傛鍥?nbsp;http://static.flickr.com/75/219742315_9ee663e2c8_o.png
        浼樺娍錛氱粷瀵圭畝鍗曪紱緙虹偣錛氭濂芥槸閫氳繃update manager瀹夎鐨勪紭鐐癸紝鎻掍歡涔嬮棿鐨勪緷璧栥€佺増鏈吋瀹規€э紝浠ュ強鍚庣畫鐨勭鐞嗭紝閮介渶瑕佹墜鍔ㄦ搷浣溿€?br />        b銆佺浜岀鏂瑰紡錛氶€氳繃.link鐨勬柟寮忥紝瑙e喅'鍚庣畫綆$悊闂'
             b-1銆乪clipse鐩綍鍒涘緩 links 鐩綍
             b-2銆佸垱寤哄搴旂殑.link鏂囦歡錛屽錛歴ubversive.link
             b-3銆佸垱寤簊ubversive/eclipse/錛屾嫹璐漟eatures銆乸lugin鍒版鐩綍
             b-4銆佷慨鏀箂ubversive.link鏂囦歡錛屽錛歱ath=E:/dev/eclipse-t/thrid-plugins/subversive
             b-5銆侀噸鍚痚clipse錛堥噸鍚悗錛屽彂鐜拌浣跨敤svn錛屽繀欏誨畨瑁卻ubversive connector錛涢獙璇佹墜鍔ㄥ畨瑁呯殑緙虹偣錛?br />         c銆佹彁紺猴細
                   - 鎵嬪姩瀹夎鎻掍歡鏃訛紝鍔″繀浠旂粏闃呰錛屾鎻掍歡鐨勫厛鍓嶆潯浠訛紙鍚﹀垯鍑洪棶棰橈紝寰堥毦鎺掓煡錛夈€?br />                    濡傦細m2eclipse鍏堝喅鏉′歡
subeclipse
銆乵ylyn銆?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 鎵嬪姩瀹夎plugin錛?link鏂囦歡鐨刾ath璺緞 蹇呴』浣跨敤緇濆璺緞


鎬葷粨錛氬eclipse鎻掍歡瀹夎錛岄鍏堟帹鑽恥pdate manager錛涗粎褰撶綉緇滅幆澧冧笉鍏佽鏃訛紝瀹夎澶辮觸鏃訛紝鍐嶅皾璇曟墜鍔ㄥ畨瑁呫€?br />
2.鎻掍歡璧勬簮鏀墮泦

2.1銆?m2eclipse鎻掍歡瀹夎
    1錛夊厛鍐蟲潯浠?br />         a銆乪clipse3.2鎴栨洿楂樼増鏈紙鍙拷鐣ワ紝涓€鑸嬌鐢ㄧ殑eclipse宸茬粡3.5浠ヤ笂 鐗堟湰錛?br />         b銆乯dk楂樹簬1.4鐗堟湰錛沞clipse榪愯鍦╦dk鐜錛岄潪jre鐜
        c銆佸繀欏誨厛瀹夎鎻掍歡錛歴ubeclipse錛坰vn錛夈€乵ylyn錛堜換鍔$鐞嗭級錛? mylyn鍦╡clipse3.5浠ヤ笂鐗堟湰錛屽凡榛樿瀛樺湪錛屾棤闇€瀹夎
        svn鎻掍歡鍦ㄧ嚎瀹夎鍦板潃錛堢綉緇滀笉紜畾鎬э紝鏇存帹鑽愪笅杞絲ip錛宎rchive閫夋嫨鏈湴鏂囦歡瀹夎錛?br />        http://subclipse.tigris.org/servlets/ProjectProcess;jsessionid=290480ED68C2C7E781DCCE66CE657FC2?pageID=p4wYuA
     2錛夊畨瑁卪2eclipse錛屾湭鎵懼埌鍙笅杞藉埌鏈湴鐨剒ip錛屽彧鑳藉湪綰垮畨瑁咃紝鍦板潃 http://www.eclipse.org/m2e/download/




]]>
娉涘瀷 [core Java 闃呰絎旇]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棰樿錛氬崟鍏冩祴璇曠殑榪囩▼涓紝閬囧埌娉涘瀷mock鐨勯棶棰橈紱閲嶆柊娓╀範涓€閬嶏紝闃呰錛坈ore java 娉涘瀷錛?br />


xmind鏍煎紡錛堝彲涓嬭澆錛?錛?a title="鏁寸悊榪囩▼涓紝璁板綍涓簒mind鏍煎紡" href="/Files/shijian/generic.rar">鏁寸悊榪囩▼涓紝璁板綍涓簒mind鏍煎紡

鍗曞厓嫻嬭瘯閬囧埌鐨勯棶棰橈紝綆€鍖栧悗濡備笅錛?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     }

浠嶆病鐞嗚В錛屽摢浣嶅ぇ浠欙紝鑳藉府鎴戣В閲婁笅 錛?img src ="http://www.aygfsteel.com/shijian/aggbug/371545.html" width = "1" height = "1" />

]]>
璁板綍璐達細鏃ュ父闂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鍐茬獊瀵艱嚧錛屽簲鐢ㄦ姤閿欍€傜被鍨嬭漿鎹㈠啿紿併€?br />    闇€姹傦細瀹氫綅鏌愪釜綾誨疄闄呬粠閭d釜jar鍔犺澆 錛?-verbose:class 鍙傛暟錛堟垨鑰?nbsp;
-XX:+TraceClassLoading錛夛紝璇︾粏鐨勮褰曚簡鍔犺澆浜嗛偅浜涚被銆佷粠閭d釜jar鍔犺澆銆?br />
鍙傝錛?a >http://agapple.iteye.com/blog/946603

2.鎬ц兘嫻嬭瘯榪囩▼
   linux鏈変粈涔堝懡浠ゃ€佹垨杞歡錛屽彲浠ュ悓鏃舵敹闆哻pu銆乴oad銆佷笂涓嬫枃鍒囨崲銆乵em銆佺綉緇淚O銆佺鐩業O絳夋暟鎹悧 錛?br />   vmstat 鍚箟璇﹁В 錛?->  鍥懼艦鍖栨姤琛?錛堢棝鑻︾殑鏄'浜哄伐'鐪嬬潃璁板綍鏁版嵁錛岃繖綆€鐩存槸紼嬪簭鍛樼殑姹$偣鍛€錛?br />   錛坴mstat鐨処O緇熻鐨勬槸鍧楄澶囷紙濡傜鐩橈級鐨勬暟鎹紝緗戝崱娌℃湁瀵瑰簲鐨勮澶囨枃浠訛紙http://oss.org.cn/kernel-book/ch11/11.2.3.htm錛夛紝緗戠粶IO緇熻浣跨敤iftop錛?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]
鍙傝錛歨ttp://dinghaoliang.blog.163.com/blog/static/126540714201082764733272/
%jboss_home%/server/default/deploy/hsqldb-ds.xml榪欎釜鏂囦歡涓湁涓€涓狣efaultDS鏁版嵁婧愰厤緗紝涓存椂瑙e喅鍒犻櫎hsqldb-ds.xml鏂囦歡銆傚師鍥犳湭鐭ャ€?br />
4.logback 0.9.19 鐗堟湰錛屽紩鍏?lt;encoder>錛屾斁寮?<appender><layout></appenader>
        <encoder>
            
<pattern>%m%n</pattern>
            
<charset class="java.nio.charset.Charset">UTF-8</charset>
        
</encoder>

婧愮爜錛歄utputStreamAppender.java
  protected void writeOut(E event) throws IOException {
    this.encoder.doEncode(event);
  }
瀵規棩蹇楁枃浠禼harset鎸囧畾錛岀粡榪嘾ebug璋冭瘯錛屽繀欏婚€氳繃姝ゆ柟寮忛厤緗墠鏈夋晥銆傚惁鍒欏彇緋葷粺榛樿緙栫爜銆?br />
5.璁劇疆linux緋葷粺緙栫爜
http://linux.vbird.org/linux_basic/0320bash.php#variable_locale
鍏跺疄‘緋葷粺緙栫爜’璁劇疆錛屽嵆璁劇疆瀵瑰簲鐨勭郴緇熷彉閲忥紝鍒欐墍鏈夊彲璁劇疆緋葷粺鍙橀噺鐨勬枃浠墮兘鍙緗紪鐮侊紝export浣垮叾鐢熸晥
locale 鏌ョ湅褰撳墠鐢ㄦ埛浣跨敤鐨勭紪鐮侊紙錛夛紝locale -a 鏌ョ湅鏈哄櫒鎵€鏀寔鐨勬墍鏈夌紪鐮?br />榛樿璁劇疆錛?br />  a銆佺郴緇熺駭鍒? /etc/profile -> /etc/sysconfig/i18n錛岃緗?LANG 錛堟棤鏁堟樉紺篹xport鐢熸晥錛夛紙YY錛歩18n鏈変釜LANGUAGE璁懼畾錛屼笉鐭ュ叾鍚箟錛屽垹闄ゆ棤褰卞搷錛?br />  b銆佺敤鎴風駭鍒?~/bash_rc銆亊/bash_profile銆亊/bash_login銆亊/profile錛岃鍙栨湁闄愰『搴忥細浠庡乏鍚戝彸錛涘繀欏繪樉紺篹xport鐢熸晥
  
璦畾 LANG 鎴栬€呮槸 LC_ALL 鏅傦紝鍓囧叾浠栫殑瑾炵郴璁婃暩灝辨渻琚€欏叐鍊嬭畩鏁告墍鍙栦唬銆傛€諱箣涓€鍙ヨ瘽錛氬湪褰撳墠鐢ㄦ埛璁劇疆LANG錛屾槸鏈€浼樻柟妗堛€?br />


]]>
主站蜘蛛池模板: 清苑县| 五河县| 青海省| 尼木县| 育儿| 如皋市| 友谊县| 西昌市| 兴山县| 辽阳市| 扶绥县| 乌兰察布市| 花莲县| 南皮县| 泗洪县| 罗山县| 翁源县| 昌宁县| 泰宁县| 固镇县| 辉县市| 大新县| 克东县| 克山县| 宁强县| 百色市| 江阴市| 沙坪坝区| 海阳市| 介休市| 临湘市| 玉屏| 泸溪县| 东乡| 安泽县| 简阳市| 三门县| 山东省| 西昌市| 合山市| 潮安县|