Displaying notes 121 - 130
Created by Dr. Xi on March 08, 2013 08:46:33 Last update: March 08, 2013 08:46:33
To revert all local updates in the current working directory:
svn revert . -RExample:
$ svn revert . -R Reverted 'pom.xml' $ svn s...
Created by Dr. Xi on March 07, 2013 20:26:23 Last update: March 07, 2013 20:26:23
Create a jax-ws web service with Spring, Apache CXF and Maven. Create the pom.xml :
<project xmlns="http://maven.apache.org/POM/4.0.0"...Create the web service interface ( src/main/java/jaxws/JaxwsHello.java ):
package jaxws; import javax.jws.WebService;...Implement the web service ( src/main/java/jaxws/JaxwsHelloImpl.java ):
package jaxws; import javax.jws.WebService;...Create src/main/webapp/WEB-INF/cxf-servlet.xml :
<?xml version="1.0" encoding="UTF-8"?> <beans x...Register the CXF servlet in src/main/webapp/WEB-INF/web.xml :
<?xml version="1.0" encoding="UTF-8"?> <web-app...Build:
mvn packageThe resulting WAR file can be deployed to any servlet container (for example, Tomcat).
Created by google.4IC5G2W8 on March 04, 2013 19:20:08 Last update: March 04, 2013 19:20:08
Created by Dr. Xi on March 01, 2013 16:09:00 Last update: March 04, 2013 12:28:23
This is probably the easiest way to create a web service in JAX-WS. There are no external dependencies other than Java EE. Assuming that you build the web service as a webapp (say jaxws-example.war), the pom.xml can be as simple as:
<project xmlns="http://maven.apache.org/POM/4.0.0"...You can implement and deploy the web service in 3 easy steps: Code the service as a POJO (annotate class to expose it as a web service)
package jaxws; import javax.jws.WebMethod; ...Declare the POJO as a servlet in WEB-INF/web.xml :
<?xml version="1.0" encoding="UTF-8"?> <web-app...Build the webapp, and deploy the resulting war:
mvn packageThe only catch is, this only works for a Java EE 5+ compliant container such as WebLogic or JBoss. It does not work for a simple servlet...
Created by magnum on March 03, 2013 13:27:54 Last update: March 03, 2013 13:27:54
Suppose you have a very large log file and it's hard to load the whole file into an editor. But you know the range of lines you are interested in. You can use sed to extract the range of lines to a smaller file:
$ sed -n 2737172,2743667p proxy.log > proxy-short....The switch -n means 'quiet', suppress automatic printing of pattern space . You can also use regex to mark the start and end lines instead of absolute line numbers.
Created by Dr. Xi on February 27, 2013 10:01:21 Last update: February 27, 2013 10:01:21
The SVN property svn:mergeinfo holds the history of merges made to a file or directory. To display mergeinfo in plain text:
$ svn propget svn:mergeinfo .If you dig XML:
$ svn propget svn:mergeinfo --recursive --xml
Created by woolf on February 14, 2013 15:42:24 Last update: February 14, 2013 15:42:24
Example to convert all upper case letters to lower case with tr :
$ echo ABCD | tr [A-Z] [a-z]
Created by Dr. Xi on February 13, 2013 19:40:08 Last update: February 13, 2013 19:40:08
According to MSDN : On Windows 7 and on Windows Server 2008 R2 with the Wireless LAN Service installed, the operating system installs a virtual device if a Hosted Network capable wireless adapter is present on the machine. This virtual device normally shows up in the "Network Connections Folder" as "Wireless Network Connection 2" with a Device Name of "Microsoft Virtual WiFi Miniport adapter" if the computer has a single wireless network adapter. This virtual device is used exclusively for performing software access point (SoftAP) connections. The lifetime of this virtual device is tied to the physical wireless adapter. If the physical wireless adapter is disabled, this virtual device will be removed as well. On Windows 7, there's no UI to start or stop SoftAP....
Created by freyo on February 09, 2013 14:40:31 Last update: February 09, 2013 14:40:31
Use this link to lookup information on an IP address: http://bgp.he.net/ip/188.8.131.52 Whois lookup is also supported. Clean page, no clutter.
Created by freyo on February 09, 2013 14:22:42 Last update: February 09, 2013 14:22:42
To find out the DNS server ip address your computer is using, load this page in your browser: http://myresolver.info/