ï»??xml version="1.0" encoding="utf-8" standalone="yes"?>欧美在线视频二区,免费高清在线,91国内精品久久http://www.aygfsteel.com/luedipiaofeng/archive/2011/02/24/345053.htmlBlakeSuBlakeSuThu, 24 Feb 2011 05:03:00 GMThttp://www.aygfsteel.com/luedipiaofeng/archive/2011/02/24/345053.htmlhttp://www.aygfsteel.com/luedipiaofeng/comments/345053.htmlhttp://www.aygfsteel.com/luedipiaofeng/archive/2011/02/24/345053.html#Feedback0http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/345053.htmlhttp://www.aygfsteel.com/luedipiaofeng/services/trackbacks/345053.html There are two way to let Maven package your application, either as a single jar with all your dependencies jar.


 <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-assembly-plugin</artifactId>
  <configuration>
   <descriptorRefs>
    <descriptorRef>jar-with-dependencies</descriptorRef>
   </descriptorRefs>
  </configuration>
 </plugin>



One advantage if you choose to do this way is if you need to sign your application jar.
This is needed if you are building a Java Web Start client and you need more access than connecting back to the server.
To read more about have Maven signing your jar read http://maven.apache.org/plugins/maven-jar-plugin/usage.html.
But if you choose to go this way, make sure that all license agreement are shipped with your one single jar.

Another way is to let Maven package your source code only and then referring the dependent jar file from the MANIFEST file.


 <plugin>
  <groupId>org.apache.maven.plugins</groupId>
  <artifactId>maven-jar-plugin</artifactId>
  <configuration>
   <archive>
    <manifest>
     <addClasspath>true</addClasspath>
     <mainClass>se.msc.adapter.Main</mainClass>
     <classpathPrefix>lib/</classpathPrefix>
    </manifest>
   </archive>
  </configuration>
 </plugin>


BlakeSu 2011-02-24 13:03 发表评论
]]>
eclipse ¾lˆäºŽæœ‰äº†åˆ—编辑功èƒ?/title><link>http://www.aygfsteel.com/luedipiaofeng/archive/2010/10/15/335216.html</link><dc:creator>BlakeSu</dc:creator><author>BlakeSu</author><pubDate>Fri, 15 Oct 2010 03:33:00 GMT</pubDate><guid>http://www.aygfsteel.com/luedipiaofeng/archive/2010/10/15/335216.html</guid><wfw:comment>http://www.aygfsteel.com/luedipiaofeng/comments/335216.html</wfw:comment><comments>http://www.aygfsteel.com/luedipiaofeng/archive/2010/10/15/335216.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/335216.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/luedipiaofeng/services/trackbacks/335216.html</trackback:ping><description><![CDATA[eclipse 3.5之后¾lˆäºŽæœ‰äº†åˆ—编辑,快捷键是alt+shift+a,再次按此快捷键返回常规编辑状态ã€?br /> <br /> <img src="file:///C:/DOCUME%7E1/bsu/LOCALS%7E1/Temp/moz-screenshot-1.png" alt="" /><img src="file:///C:/DOCUME%7E1/bsu/LOCALS%7E1/Temp/moz-screenshot-2.png" alt="" /><img src="http://www.aygfsteel.com/images/blogjava_net/luedipiaofeng/columnedit.png" alt="" border="0" height="289" width="307" /><br /> <img src ="http://www.aygfsteel.com/luedipiaofeng/aggbug/335216.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/luedipiaofeng/" target="_blank">BlakeSu</a> 2010-10-15 11:33 <a href="http://www.aygfsteel.com/luedipiaofeng/archive/2010/10/15/335216.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>LineNumberReader 指定文äšg¾~–码http://www.aygfsteel.com/luedipiaofeng/archive/2010/08/05/327998.htmlBlakeSuBlakeSuThu, 05 Aug 2010 01:13:00 GMThttp://www.aygfsteel.com/luedipiaofeng/archive/2010/08/05/327998.htmlhttp://www.aygfsteel.com/luedipiaofeng/comments/327998.htmlhttp://www.aygfsteel.com/luedipiaofeng/archive/2010/08/05/327998.html#Feedback0http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/327998.htmlhttp://www.aygfsteel.com/luedipiaofeng/services/trackbacks/327998.html
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.LineNumberReader;


public class Main {
    
    
public static void main(String[] args) throws IOException {

        InputStreamReader isr 
= new InputStreamReader(new FileInputStream("15370720.pdf4"), "utf-16");
        LineNumberReader lnr
=new LineNumberReader(isr);
        String line 
= null;
        
while((line=lnr.readLine())!=null){  
           System.out.println(lnr.getLineNumber()
+"\t"+line);
        }
   }
}


BlakeSu 2010-08-05 09:13 发表评论
]]>
Class.getResourceAsStream å’?ClassLoader.getResourceAsStreamhttp://www.aygfsteel.com/luedipiaofeng/archive/2010/07/28/327336.htmlBlakeSuBlakeSuWed, 28 Jul 2010 08:31:00 GMThttp://www.aygfsteel.com/luedipiaofeng/archive/2010/07/28/327336.htmlhttp://www.aygfsteel.com/luedipiaofeng/comments/327336.htmlhttp://www.aygfsteel.com/luedipiaofeng/archive/2010/07/28/327336.html#Feedback0http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/327336.htmlhttp://www.aygfsteel.com/luedipiaofeng/services/trackbacks/327336.html 资源åQŒç”¨çš„æ˜¯¾lå¯¹è·¯å¾„ã€?br />
在ä‹É用Class.getResourceAsStream æ—Óž¼Œ 资源路径有两¿Uæ–¹å¼ï¼Œ 一¿Uä»¥ / å¼€å¤ß_(d¨¢)¼Œåˆ™è¿™æ ïL(f¨¥ng)š„路径是指定绝å¯?br /> 路径åQ?如果不以 / å¼€å¤ß_(d¨¢)¼Œ 则èµ\径是相对与这个class所在的包的ã€?

在ä‹É用ClassLoader.getResourceAsStreamæ—Óž¼Œ 路径直接使用相对于classpath的绝对èµ\径ã€?

举例åQŒä¸‹é¢çš„三个语句åQŒå®žé™…结果是一æ ïL(f¨¥ng)š„åQ?
   com.explorers.Test.class.getResourceAsStream("abc.jpg")
= com.explorers.Test.class.getResourceAsStream("/com/explorers/abc.jpg")
= ClassLoader.getResourceAsStream("com/explorers/abc.jpg")

BlakeSu 2010-07-28 16:31 发表评论
]]>
Standalone Java CAS Clienthttp://www.aygfsteel.com/luedipiaofeng/archive/2010/07/15/326212.htmlBlakeSuBlakeSuThu, 15 Jul 2010 09:59:00 GMThttp://www.aygfsteel.com/luedipiaofeng/archive/2010/07/15/326212.htmlhttp://www.aygfsteel.com/luedipiaofeng/comments/326212.htmlhttp://www.aygfsteel.com/luedipiaofeng/archive/2010/07/15/326212.html#Feedback0http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/326212.htmlhttp://www.aygfsteel.com/luedipiaofeng/services/trackbacks/326212.htmlThere's a variety of clients for CAS. The Java-based clients (JA-SIG, Yale, see JA-SIG website) typically handle the browser-based client interaction with CAS very well through ServletFilter implementations.

Now what about programmatic authentication, i.e. achieving authentication through non-browser based applications? There exists a CAS .NET client but I did not manage to find the appropriate Java implementation. So here goes - it is based on the Apache HttpClient.

In case I missed any existing implementation achieving the same purpose, let's look at the bright side: at least now I understand the CAS protocol :-)

My CAS client works within any application. It uses the HttpClient and behaves like a browser client as CAS requires cookie support.

Here's the code:
import org.apache.commons.httpclient.Header;
import org.apache.commons.httpclient.HttpClient;
import org.apache.commons.httpclient.HttpMethod;
import org.apache.commons.httpclient.HttpStatus;
import org.apache.commons.httpclient.methods.GetMethod;
import org.apache.commons.httpclient.methods.PostMethod;
import org.apache.log4j.Logger;

/**
* The CasClient allows users to programmatically login
* to CAS protected services based on the CAS 2 protocol.
* This client behaves like a browser-client in terms of
* cookie handling.<br>
*
@author Mathias Richter
*/
public class CasClient
{
  
   
public static Logger LOG = Logger.getLogger( CasClient.class  );

   
public static final String LOGIN_URL_PART = "login";
   
public static final String SERVICE_VALIDATE_URL_PART = "serviceValidate";
   
public static final String TICKET_BEGIN = "ticket=";
   
private static final String LT_BEGIN = "name="lt" value="";
   public static final String CAS_USER_BEGIN = "<cas:user>";
   
public static final String CAS_USER_END = "</cas:user>";
  
   
private HttpClient fClient;
   
private String fCasUrl;
  
   
/**
    * Construct a new CasClient.
    *
    * 
@param casUrl The base URL of the CAS service to be used.
    
*/
   
public CasClient( String casBaseUrl )
   {
       
thisnew HttpClient(), casBaseUrl );
   }
  
   
/**
    * Construct a new CasClient which uses the specified HttpClient
    * for its HTTP calls.
    *
    * 
@param client
    * 
@param casBaseUrl
    
*/
   
public CasClient( HttpClient client, String casBaseUrl )
   {
       fClient 
= client;
       fCasUrl 
= casBaseUrl;
   }
  
   
/**
    * Authenticate the specified username with the specified password.
    * This will not yield any ticket, as no service is authenticated
    * against. This wil just set the CAS cookie in this client upon
    * successful authentication.
    *
    * 
@param username
    * 
@param password
    
*/
   
public void authenticate( String username, String password )
   {
       authenticate( 
null, username, password );
   }
  
   
/**
    * Validate the specified service ticket against the specified service.
    * If the ticket is valid, this will yield the clear text user name
    * of the autenticated user.<br>
    * Note that each service ticket issued by CAS can be used exactly once
    * to validate.
    *
    * 
@param serviceUrl
    * 
@param serviceTicket
    *
    * 
@return Clear text username of the authenticated user.
    
*/
   
public String validate( String serviceUrl, String serviceTicket )
   {
       String result 
= null;
       PostMethod method 
= new PostMethod( fCasUrl + SERVICE_VALIDATE_URL_PART );
       method.setParameter( 
"service", serviceUrl );
       method.setParameter( 
"ticket", serviceTicket );
       
try
       {
           
int statusCode = fClient.executeMethod(method);
           
if (statusCode != HttpStatus.SC_OK)
           {
               LOG.error( 
"Could not validate: " + method.getStatusLine() );
               method.releaseConnection();
           } 
else
           {   
               result 
= extractUser( new String( method.getResponseBody() ) );
           }
       } 
catch ( Exception x )
       {
           LOG.error( 
"Could not validate: " + x.toString () );
           x.printStackTrace();
       }
       method.releaseConnection();
       
return result;
   }
  
   
/**
    * Authenticate the specified user with the specified password against the
    * specified service.
    *
    * 
@param serviceUrl May be null. If a url is specified, the authentication will happen against this service, yielding a service ticket which can be validated.
    * 
@param username
    * 
@param password
    * 
@return A valid service ticket, if and only if the specified service URL is not null.
    
*/
   
public String authenticate( String serviceUrl, String username, String password )
   {
       String lt 
= getLt( serviceUrl );
       
if ( lt == null )
       {
           LOG.error( 
"Cannot retrieve LT from CAS. Aborting authentication for '" + username + "'" );
           
return null;
       }
       String result 
= null;
       PostMethod method 
= new PostMethod( fCasUrl + LOGIN_URL_PART );
       
if ( serviceUrl != null ) // optional
           method.setParameter( "service", serviceUrl );
       method.setParameter( 
"_eventId""submit" );
       method.setParameter(
"username", username );
       method.setParameter(
"password", password );
       method.setParameter(
"lt", lt );
       method.setParameter( 
"gateway""true" );
       
try
       {
           fClient.executeMethod(method);
           
if ( serviceUrl == null )
           {
               
if ( extractLt( new String( method.getResponseBody() ) ) != null ) // if CAS does not return a login page with an LT authentication was successful
               {
                   LOG.error( 
"Authentication for '" +  username + "' unsuccessful" );
                   
if ( LOG.isDebugEnabled() )
                       LOG.debug( 
"Authentication for '" + username + "' unsuccessful." );
               } 
else
               {
                   
if ( LOG.isDebugEnabled() )
                       LOG.debug( 
"Authentication for '" + username + "' unsuccessful." );
               }
           } 
else
           {
               Header h 
= method.getResponseHeader( "Location" );
               
if ( h != null )
                   result 
= extractServiceTicket( h.getValue() );
               
if ( result == null )
                   LOG.error( 
"Authentication for '" + username + "' unsuccessful." );
           }
       } 
catch ( Exception x )
       {
           LOG.error( 
"Could not authenticate'" + username + "':" + x.toString () );
       }
       method.releaseConnection();
       
return result;
   }
  
   
/**
    * Helper method to extract the user name from a "service validate" call to CAS.
    *
    * 
@param data Response data.
    * 
@return The clear text username, if it could be extracted, null otherwise.
    
*/
   
protected String extractUser( String data )
   {
       String user 
= null;
       
int start = data.indexOf( CAS_USER_BEGIN  );
       
if ( start >= 0 )
       {
           start 
+= CAS_USER_BEGIN.length();
           
int end = data.indexOf( CAS_USER_END );
           
if ( end > start )
               user 
= data.substring( start, end );
           
else
               LOG.warn( 
"Could not extract username from CAS validation response. Raw data is: '" + data + "'" );
       } 
else
       {
           LOG.warn( 
"Could not extract username from CAS validation response. Raw data is: '" + data + "'" );
       }
       
return user;
   }
  
   
/**
    * Helper method to extract the service ticket from a login call to CAS.
    *
    * 
@param data Response data.
    * 
@return The service ticket, if it could be extracted, null otherwise.
    
*/
   
protected String extractServiceTicket( String data )
   {
       String serviceTicket 
= null;
       
int start = data.indexOf( TICKET_BEGIN  );
       
if ( start > 0 )
       {
           start 
+= TICKET_BEGIN.length();
           serviceTicket 
= data.substring( start );
       }
       
return serviceTicket;
   }
  
   
/**
    * Helper method to extract the LT from a login form from CAS.
    *
    * 
@param data Response data.
    * 
@return The LT, if it could be extracted, null otherwise.
    
*/
   
protected String extractLt( String data )
   {
       String token 
= null;
       
int start = data.indexOf( LT_BEGIN  );
       
if ( start < 0 )
       {
           LOG.error( 
"Could not obtain LT token from CAS: LT Token not found in response." );
       } 
else
       {
           start 
+= LT_BEGIN.length();
           
int end = data.indexOf( """, start );
           token = data.substring( start, end );
       }       
       
return token;
   }
  
   
/**
    * This method requests the original login form from CAS.
    * This form contains an LT, an initial token that must be
    * presented to CAS upon sending it an authentication request
    * with credentials.<br>
    * If a service URL is provided (which is optional), this method
    * will post the URL such that CAS authenticates against the
    * specified service when a subsequent authentication request is
    * sent.
    *
    * 
@param serviceUrl
    * 
@return The LT token if it could be extracted from the CAS response.
    
*/
   
protected String getLt( String serviceUrl )
   {
       String lt 
= null;
       HttpMethod method 
= null;
       
if ( serviceUrl == null )
           method 
= new GetMethod( fCasUrl + LOGIN_URL_PART );
       
else
       {
           method 
= new PostMethod( fCasUrl + LOGIN_URL_PART );
           ( ( PostMethod ) method ).setParameter( 
"service", serviceUrl );
       }
       
try
       {
           
int statusCode = fClient.executeMethod(method);
           
if (statusCode != HttpStatus.SC_OK)
           {
               LOG.error( 
"Could not obtain LT token from CAS: " + method.getStatusLine() );
               method.releaseConnection();
           } 
else
           {
               Object o 
= method.getResponseHeaders() ;
               
return extractLt( new String( method.getResponseBody() ) );
           }
       } 
catch ( Exception x )
       {
           LOG.error( 
"Could not obtain LT token from CAS: " + x.toString () );
       }
       method.releaseConnection();
       
return lt;
   }
  
}



BlakeSu 2010-07-15 17:59 发表评论
]]>
java取文件换行符http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/30/324892.htmlBlakeSuBlakeSuWed, 30 Jun 2010 07:45:00 GMThttp://www.aygfsteel.com/luedipiaofeng/archive/2010/06/30/324892.htmlhttp://www.aygfsteel.com/luedipiaofeng/comments/324892.htmlhttp://www.aygfsteel.com/luedipiaofeng/archive/2010/06/30/324892.html#Feedback0http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/324892.htmlhttp://www.aygfsteel.com/luedipiaofeng/services/trackbacks/324892.html

BlakeSu 2010-06-30 15:45 发表评论
]]>
¼›æ­¢‹¹è§ˆå™¨ç¼“å­?/title><link>http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/25/324386.html</link><dc:creator>BlakeSu</dc:creator><author>BlakeSu</author><pubDate>Fri, 25 Jun 2010 01:06:00 GMT</pubDate><guid>http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/25/324386.html</guid><wfw:comment>http://www.aygfsteel.com/luedipiaofeng/comments/324386.html</wfw:comment><comments>http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/25/324386.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/324386.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/luedipiaofeng/services/trackbacks/324386.html</trackback:ping><description><![CDATA[html<br /> <div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">  </span><span style="color: #0000ff;"><</span><span style="color: #800000;">meta </span><span style="color: #ff0000;">http-equiv</span><span style="color: #0000ff;">="pragma"</span><span style="color: #ff0000;"> content</span><span style="color: #0000ff;">="no-cache"</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br />   </span><span style="color: #0000ff;"><</span><span style="color: #800000;">meta </span><span style="color: #ff0000;">http-equiv</span><span style="color: #0000ff;">="cache-control"</span><span style="color: #ff0000;"> content</span><span style="color: #0000ff;">="no-cache"</span><span style="color: #0000ff;">></span><span style="color: #000000;"><br />   </span><span style="color: #0000ff;"><</span><span style="color: #800000;">meta </span><span style="color: #ff0000;">http-equiv</span><span style="color: #0000ff;">="expires"</span><span style="color: #ff0000;"> content</span><span style="color: #0000ff;">="0"</span><span style="color: #0000ff;">></span></div> <br /> <br /> servlet<br /> <div style="background-color: #eeeeee; font-size: 13px; border: 1px solid #cccccc; padding: 4px 5px 4px 4px; width: 98%;"><!--<br /> <br /> Code highlighting produced by Actipro CodeHighlighter (freeware)<br /> http://www.CodeHighlighter.com/<br /> <br /> --><span style="color: #000000;">          response.setHeader(</span><span style="color: #000000;">"</span><span style="color: #000000;">pragma</span><span style="color: #000000;">"</span><span style="color: #000000;">,</span><span style="color: #000000;">"</span><span style="color: #000000;">no-cache</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />           response.setHeader(</span><span style="color: #000000;">"</span><span style="color: #000000;">cache-control</span><span style="color: #000000;">"</span><span style="color: #000000;">,</span><span style="color: #000000;">"</span><span style="color: #000000;">no-cache</span><span style="color: #000000;">"</span><span style="color: #000000;">);<br />           response.setDateHeader(</span><span style="color: #000000;">"</span><span style="color: #000000;">expires</span><span style="color: #000000;">"</span><span style="color: #000000;">, </span><span style="color: #000000;">0</span><span style="color: #000000;">);</span></div> <br /> <br /> <img src ="http://www.aygfsteel.com/luedipiaofeng/aggbug/324386.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/luedipiaofeng/" target="_blank">BlakeSu</a> 2010-06-25 09:06 <a href="http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/25/324386.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>frame 中跨域访问cookie(java)http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/25/324385.htmlBlakeSuBlakeSuFri, 25 Jun 2010 01:04:00 GMThttp://www.aygfsteel.com/luedipiaofeng/archive/2010/06/25/324385.htmlhttp://www.aygfsteel.com/luedipiaofeng/comments/324385.htmlhttp://www.aygfsteel.com/luedipiaofeng/archive/2010/06/25/324385.html#Feedback0http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/324385.htmlhttp://www.aygfsteel.com/luedipiaofeng/services/trackbacks/324385.html

BlakeSu 2010-06-25 09:04 发表评论
]]>
vim的复制粘贴小¾l?/title><link>http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/18/323810.html</link><dc:creator>BlakeSu</dc:creator><author>BlakeSu</author><pubDate>Fri, 18 Jun 2010 06:21:00 GMT</pubDate><guid>http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/18/323810.html</guid><wfw:comment>http://www.aygfsteel.com/luedipiaofeng/comments/323810.html</wfw:comment><comments>http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/18/323810.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.aygfsteel.com/luedipiaofeng/comments/commentRss/323810.html</wfw:commentRss><trackback:ping>http://www.aygfsteel.com/luedipiaofeng/services/trackbacks/323810.html</trackback:ping><description><![CDATA[<span id="ctl00_MainContentPlaceholder_ctl01_ctl00_lblEntry"> <p><span id="ctl00_MainContentPlaceholder_ctl01_ctl00_lblTrackbacks">原文地址 http://lsong17.spaces.live.com/blog/cns!556C21919D77FB59!603.trak</span></p> <p><br /> </p> <p>用vim˜q™ä¹ˆä¹? 了,始终也不知道怎么在vim中ä‹É用系¾lŸç²˜è´´æ¿åQŒé€šå¸¸è¦åœ¨¾|‘上复制一ŒDµä»£ç éƒ½æ˜¯å…ˆgedit打开文äšgåQŒä¸­é”®ç²˜è´´åŽå…³é—­åQŒç„¶åŽå†ç”¨vim打开¾~–辑åQŒçœŸçš„不 爽;上次论坛上有人问åˆîCº†æ€Žä¹ˆåœ¨vim中ä‹É用系¾lŸç²˜è´´æ¿åQŒå°è±¡é‡Œå›žå¤å¾ˆå¤šåQŒæœ‰å¥½å‡ ™å늚„回复却没有解决问题,今天实在受不了了又在¾|‘上扑֊žæ³•,竟意外地扑ֈ° 了,贴出来分享一下ã€? </p> <p>如果只是想ä‹É用系¾lŸç²˜è´´æ¿çš„话直接在输入模式按Shift+Insetž®±å¯ä»¥äº†åQŒä¸‹é¢è®²ä¸€ä¸‹vim的粘贴板的基¼‹€çŸ¥è¯†åQŒæœ‰å…´è¶£çš„可以看看, 应该ä¼?x¨¬)有所收获的ã€?br /> vim帮助文档里与¾_˜è„“(chu¨¤ng)板有关的内容如下åQ? </p> <ol> <li>vimæœ?2个粘贴板åQŒåˆ†åˆ«æ˜¯0ã€?ã€?ã€?..ã€?、aã€?#8220;、+åQ›ç”¨:reg命ä×o可以查看各个¾_˜è„“(chu¨¤ng)杉K‡Œçš„内宏V€‚在vim中简单用y只是复制åˆ? “åQˆåŒå¼•号)¾_˜è„“(chu¨¤ng)杉K‡ŒåQŒåŒæ ïL(f¨¥ng)”¨p¾_˜è„“(chu¨¤ng)的也是这个粘贴板里的内容åQ? <p> </p> </li> <li>要将vim的内容复制到某个¾_˜è„“(chu¨¤ng)板,需要退出编辑模式,˜q›å…¥æ­£å¸¸æ¨¡å¼åŽï¼Œé€‰æ‹©è¦å¤åˆ¶çš„内容åQŒç„¶åŽæŒ‰"Ny完成复制åQŒå…¶ä¸­N为粘 贴板å?注意是按一下双引号然后按粘贴板åähœ€åŽæŒ‰y)åQŒä¾‹å¦‚要把内容复制到¾_˜è„“(chu¨¤ng)板aåQŒé€‰ä¸­å†…容后按"ayž®±å¯ä»¥äº†åQŒæœ‰ä¸¤ç‚¹éœ€è¦è¯´æ˜Žä¸€ä¸‹ï¼š(x¨¬) <ul> <li>“åïL(f¨¥ng)²˜è´´æ¿åQˆäÍ(f¨´)时粘贴板åQ‰æ¯”较特ŒDŠï¼Œç›´æŽ¥æŒ‰yž®±å¤åˆ¶åˆ°˜q™ä¸ª¾_˜è„“(chu¨¤ng)板中了,直接按pž®Þq²˜è´´è¿™ä¸ªç²˜è´´æ¿ä¸­çš„内容åQ? </li> <li>+åïL(f¨¥ng)²˜è´´æ¿æ˜¯ç³»¾lŸç²˜è´´æ¿åQŒç”¨"+yž®†å†…容复制到该粘贴板后可以ä‹É用CtrlåQ‹Vž®†å…¶¾_˜è„“(chu¨¤ng)到其他文档(如firefox、geditåQ? 中,同理åQŒè¦æŠŠåœ¨å…¶ä»–地方用CtrlåQ‹C或右键复制的内容复制到vim中,需要在正常模式下按"+påQ?</li> </ul> <p> </p> </li> <li>要将vim某个¾_˜è„“(chu¨¤ng)杉K‡Œçš„内容粘贴进来,需要退出编辑模式,在正常模式按"NpåQŒå…¶ä¸­Nä¸ºç²˜è´´æ¿åøP¼Œå¦‚上所˜qŽÍ¼Œå¯ä»¥æŒ?5pž®? 5åïL(f¨¥ng)²˜è´´æ¿é‡Œçš„内容¾_˜è„“(chu¨¤ng)˜q›æ¥åQŒä¹Ÿå¯ä»¥æŒ?+pž®†ç³»¾lŸå…¨å±€¾_˜è„“(chu¨¤ng)杉K‡Œçš„内容粘贴进来ã€?</li> </ol> <p><font color="lime">注意åQšåœ¨æˆ‘这里,只有vim.gtk或vim.gnome才能使用¾pȝ»Ÿå…¨å±€¾_˜è„“(chu¨¤ng)板,默认çš? vim.basic看不åˆ?号寄存器ã€?/font></p> </span> <img src ="http://www.aygfsteel.com/luedipiaofeng/aggbug/323810.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.aygfsteel.com/luedipiaofeng/" target="_blank">BlakeSu</a> 2010-06-18 14:21 <a href="http://www.aygfsteel.com/luedipiaofeng/archive/2010/06/18/323810.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss> <footer> <div class="friendship-link"> <a href="http://www.aygfsteel.com/" title="狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频">狠狠久久亚洲欧美专区_中文字幕亚洲综合久久202_国产精品亚洲第五区在线_日本免费网站视频</a> </div> </footer> Ö÷Õ¾Ö©Öë³ØÄ£°å£º <a href="http://" target="_blank">ÆÕ¶ý</a>| <a href="http://" target="_blank">ÂÞÉ½ÏØ</a>| <a href="http://" target="_blank">ÀÖÁêÊÐ</a>| <a href="http://" target="_blank">̫ԭÊÐ</a>| <a href="http://" target="_blank">¿¦À®Ç߯ì</a>| <a href="http://" target="_blank">°¢¿Ë</a>| <a href="http://" target="_blank">¾ÞÒ°ÏØ</a>| <a href="http://" target="_blank">ãþ´¨ÏØ</a>| <a href="http://" target="_blank">¶àÂ×ÏØ</a>| <a href="http://" target="_blank">Á°Ô´ÊÐ</a>| <a href="http://" target="_blank">×Ó³¤ÏØ</a>| <a href="http://" target="_blank">½£´¨ÏØ</a>| <a href="http://" target="_blank">ÀÖÖÁÏØ</a>| <a href="http://" target="_blank">ͬÐÄÏØ</a>| <a href="http://" target="_blank">äųØÏØ</a>| <a href="http://" target="_blank">¶¨Ô¶ÏØ</a>| <a href="http://" target="_blank">ÎÚÀ¼ºÆÌØÊÐ</a>| <a href="http://" target="_blank">ÆÁ¶«ÊÐ</a>| <a href="http://" target="_blank">»ªÄþÏØ</a>| <a href="http://" target="_blank">Õò°²ÏØ</a>| <a href="http://" target="_blank">ÍòÄþÊÐ</a>| <a href="http://" target="_blank">ÄþÇ¿ÏØ</a>| <a href="http://" target="_blank">¾°¹È</a>| <a href="http://" target="_blank">ÎÚËÕÊÐ</a>| <a href="http://" target="_blank">ïÃûÊÐ</a>| <a href="http://" target="_blank">ÏãºÓÏØ</a>| <a href="http://" target="_blank">°ÍÁÖÓÒÆì</a>| <a href="http://" target="_blank">ÎÚÀ¼²ì²¼ÊÐ</a>| <a href="http://" target="_blank">ÂåÆÖÏØ</a>| <a href="http://" target="_blank">¹ãË®ÊÐ</a>| <a href="http://" target="_blank">ÑÉêÈ</a>| <a href="http://" target="_blank">Ìì½òÊÐ</a>| <a href="http://" target="_blank">¹ðÁÖÊÐ</a>| <a href="http://" target="_blank">å´²ýÏØ</a>| <a href="http://" target="_blank">¼´Ä«ÊÐ</a>| <a href="http://" target="_blank">ÆÕÄþÊÐ</a>| <a href="http://" target="_blank">¸ñ¶ûľÊÐ</a>| <a href="http://" target="_blank">¸ÓÖÝÊÐ</a>| <a href="http://" target="_blank">Î÷Ï¿ÏØ</a>| <a href="http://" target="_blank">´óÆÒÏØ</a>| <a href="http://" target="_blank">³¤ÄþÏØ</a>| <script> (function(){ var bp = document.createElement('script'); var curProtocol = window.location.protocol.split(':')[0]; if (curProtocol === 'https') { bp.src = 'https://zz.bdstatic.com/linksubmit/push.js'; } else { bp.src = 'http://push.zhanzhang.baidu.com/push.js'; } var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(bp, s); })(); </script> </body>