-
The build path is used for building your application. It contains all of your source files and all Java libraries that are required to compile the application.
-
The classpath is used for executing the application. This includes all java classes and libraries that are needed to run the java application. A Classpath is mandatory, the default path is . which is used if the java virtual machine can't find a user defined path. (CLASSPATH environment variable, -cp flag or Class-Path: attribute in a jar manifest)
-
The classpath is the classic way to tell the Java compiler and the Java runtime where to find compiled classes. It is typically a sequence of JAR file names and directory names. The classpath used by the compiler and the runtime system don't have to be the same, but they typically "should be*, especially for a small project.
-
Buildpath is not classic Java terminology. It is the term for the richer way that a typical IDE specifies the relationship between the "modules" or "projects" that make up an
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
//create a paper | |
var paper = Raphael("paper", 500,500); | |
//create a line | |
var path = paper.path("M100,100L200,200").attr({fill: "orange"}); | |
//the identity matrix | |
var m = Raphael.matrix(1,0,0,1,0,0); | |
m.scale(2,1,100,100); | |
var pathString = Raphael.mapPath(path2.attr("path"),m); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* js files to be used | |
* <script src="http://canvg.googlecode.com/svn/trunk/rgbcolor.js"></script> | |
* <script src="http://canvg.googlecode.com/svn/trunk/StackBlur.js"></script> | |
* <script src="http://canvg.googlecode.com/svn/trunk/canvg.js"></script> | |
* <script src="canvas2image.js"></script> | |
* <script src="raphael.export.js"></script> | |
*/ | |
//Convert DOM RaphaelJS element SVG to correct XML (fix images export) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// loop through the 'paper' variable from Raphael JS and build up the JSON object describing all images and paths within it. | |
buildJSON = function(paper) { | |
var svgdata = []; | |
svgdata.push({ | |
width: 390, | |
height: 400 | |
}); | |
$.each(paper, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getPosition(element) { | |
var xPosition = 0; | |
var yPosition = 0; | |
while(element) { | |
xPosition += (element.offsetLeft - element.scrollLeft + element.clientLeft); | |
yPosition += (element.offsetTop - element.scrollTop + element.clientTop); | |
element = element.offsetParent; | |
} | |
return { x: xPosition, y: yPosition }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In JavaScript: | |
pageX, pageY, screenX, screenY, clientX and clientY returns a number which indicates the number of physical pixels a point is from the reference point. The event point is where the user clicked, the reference point is a point in the upper left. These properties return the horizontal and vertical distance from that reference point. | |
pageX and pageY: | |
Relative the to the top left of the fully rendered content area in the browser. This reference point is below the url bar and back button in the upper left. This point could be anywhere in the browser window and can actually change location if there are embedded scrollable pages embedded within pages and the user moves a scrollbar. | |
screenX and screenY: | |
Relative to the top left of the physical screen/monitor, this reference point only moves if you increase or decrease the number of monitors or the monitor resolution. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#element').mousedown(function(e) { | |
// You can record the starting position with | |
var start_x = e.pageX; | |
var start_y = e.pageY; | |
$().mousemove(function(e) { | |
// And you can get the distance moved by | |
var offset_x = e.pageX - start_x; | |
var offset_y = e.pageY - start_y; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.restlet.testcassandra; | |
import com.datastax.driver.core.*; | |
/* | |
* an simple exemple to use java drive to manipuler the cassandra | |
* */ | |
public class TestCassandra { | |
private Cluster cluster; //add a contact point | |
private Session session; //manage the connections | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.apispark.db; | |
import java.lang.reflect.InvocationTargetException; | |
import java.lang.reflect.Method; | |
import java.net.MalformedURLException; | |
import java.net.URL; | |
import java.net.URLClassLoader; | |
import java.util.ArrayList; | |
import java.util.Iterator; | |
import java.io.File; |
OlderNewer