Displaying keyword search results 21 - 30
Created by voodoo on July 11, 2009 15:14:55 Last update: July 29, 2010 22:45:48
cURL is a command line tool for transferring files with URL syntax. The main purpose and use for cURL is to automate unattended file transfers or sequences of operations. It's really easy to see HTTP headers with curl:
C:\>curl --head http://www.google.com HTTP/1.0 ...or, headers and page together (dump headers to stdout):
$ curl --dump-header - http://www.google.com HTTP/...Download openssl from openssl.org:
C:\>curl --help Usage: curl [options...] <url> ...
Created by Fang on August 22, 2009 21:48:12 Last update: January 10, 2010 00:29:08
The POM (Project Object Model, pom.xml ) is at the heart of all Maven builds. It tells Maven how to build your project, just like build.xml for Ant. This is a POM for a simple Hello World project:
<project xmlns="http://maven.apache.org/POM/4.0.0"...Not much can be inferred from the POM file alone, because lots of information is implied . For example, packaging defaults to jar , which means that if nothing is specified, Maven compiles all java files under src/main/java and creates a jar . All Maven POMs inherit from a base Super POM. To see the effective POM for your project, type mvn help:effective-pom :
C:\maven\hello-world>mvn help:effective-pomBelow is the Super POM for Maven 2.0.x.
<project> <modelVersion>4.0.0</modelVersion> ...
Created by Fang on August 13, 2009 03:32:36 Last update: January 09, 2010 21:34:34
Maven asks you to organize your project by a standard directory layout. Although you can override the proposed structure via the project descriptor , conformance is strongly recommended. At the top level there are only two directories: src and target . The target directory is used to house all output of the build. The src directory contains all of the source material for building the project, its site and so on. The src directory contains a subdirectory for each type of resources: main for the main build artifact test for the unit test code site for your project site's documentation This is the general layout: Directory Description LICENSE.tx t Project's license README.txt Project's readme pom.xml The Maven "Project Object Model" src/main/java under which the normal...
Created by Dr. Xi on January 04, 2010 05:04:10 Last update: January 07, 2010 15:59:25
This is the error:
>>> import urllib2 >>> f = urllib2.urlopen('htt...Reason: SSL is not supported in Python installation.
>>> import httplib >>> hasattr(httplib, 'HTTPS'...Solution: recompile Python with SSL on Steps: Download and install OpenSSL , if you don't have it already. Download Python source and rebuild Python (the usual steps of configure, make and make install). Python's configure script should be able to pick up your existing SSL libraries automatically and build a shared library _ssl.so. Some web sites suggest editing the file Modules/setup.dist , uncomment the lines starting with _ssl , and making changes to the SSL path. This would link the SSL library statically to Python.
# Socket module helper for socket(2) #_socket s...
Created by Fang on August 21, 2009 03:05:23 Last update: August 22, 2009 22:10:06
There are three built-in build lifecycles: default: handles your project deployment clean: handles project cleaning site: handles the creation of your project's site documentation Each of these build lifecycles is defined by a different list of build phases, wherein a build phase represents a stage in the lifecycle. The default lifecycle has the following most common build phases (among others): Phase Description validate validate the project is correct and all necessary information is available compile compile the source code of the project test test the compiled source code using a suitable unit testing framework. These tests should not require the code be packaged or deployed package take the compiled code and package it in its distributable format, such as a JAR. integration-test process and deploy...
Created by Dr. Xi on March 14, 2009 19:27:47 Last update: March 14, 2009 19:27:47
This tip was mentioned in a previous note . It is repeated here for better searchability.
SELECT type, name, line FROM user_source W...
Created by Dr. Xi on November 12, 2008 22:56:00 Last update: November 12, 2008 22:56:00
Set the PAGESIZE system variable to 0 to suppress headings in SELECT results. This is helpful when retrieving source code for packages or stored procedures:
SQL> set pagesize 0 SQL> show pages pagesize...
Created by Dr. Xi on September 22, 2008 01:35:02 Last update: September 22, 2008 01:35:02
Firefox uses its own viewer to display source when you "View Source" on a page. You can change the viewer by following these steps: In the address bar enter about:config Click I'll be careful, I promise! , if prompted In the filter box, type view_source Double click view_source.editor.external , set it to true Double click view_source.editor.path and enter the full path to your editor
Created by Dr. Xi on September 13, 2008 20:52:47 Last update: September 15, 2008 23:04:35
The text source of the stored objects (including stored procedures) are made available in Oracle by three views: USER_SOURCE describes the text source of the stored objects owned by the current user. This view does not display the OWNER column. ALL_SOURCE describes the text source of the stored objects accessible to the current user. DBA_SOURCE describes the text source of all stored objects in the database. These are the columns: Column Name Description OWNER Owner of the object NAME Name of the object TYPE Type of object: FUNCTION, JAVA SOURCE, PACKAGE, PACKAGE BODY, PROCEDURE, TRIGGER, TYPE, TYPE BODY LINE Line number of this line of source TEXT Text source of the stored object If you want to search for a certain keyword in the source,...
Created by Dr. Xi on September 07, 2008 03:56:00 Last update: September 07, 2008 04:05:51
The @Retention meta-annotation (annotations to annotate an Annotation Type) can have three values: RetentionPolicy.SOURCE - the annotation is source level, it's ignored by the compiler. RetentionPolicy.CLASS - the annotation is retained at compile time, but ignored by the VM at runtime ( this is the default ) RetentionPolicy.RUNTIME - the annotation is retained at runtime, you can use Java reflection to query the annotation For example:
import java.lang.annotation.*; // if @Target is...At runtime, a program can query the annotations through the java.lang.reflect.AnnotatedElement interface, which is implemented by java.lang.Class , java.lang.reflect.Constructor , java.lang.reflect.Field and java.lang.reflect.Method , among others. This is an example from Sun :
import java.lang.reflect.*; public clas...