- 博客(21)
- 资源 (5)
- 收藏
- 关注
原创 Using encodeURIComponent to avoid errors caused by special chars
var url = "/tryrest/analytics/addQuery?pid="+pid+"&qname="+encodeURIComponent(qname)+"&sqlstmt="+encodeURIComponent(qscript)+"&dtep="+encodeURIComponent(qedpt);
2012-04-30 21:02:54 584
原创 Get element by ID in SAPUI5
var homeItem = sap.ui.getCore().byId(current_pid); homeItem.destroy();
2012-04-27 21:26:26 1324
原创 foreach in Java
ArrayList listUser = new ArrayList();for(ADUser u:listUser){ System.out.println(u.getUID());}
2012-04-24 22:59:22 731
原创 REST - GET Parameter
@Path("/jsoncg") @GET @Produces({MediaType.APPLICATION_JSON, MediaType.TEXT_PLAIN, MediaType.TEXT_HTML}) public String getQueryDataByStatementGet(@QueryParam("sqlstmt") String sqlstmt) { DBHana
2012-04-19 22:37:28 705
原创 Ajax Initializer
function xmlhttpPost() { var xhr; var method = "GET"; if (window.XMLHttpRequest) {// code for IE7+, Firefox, Chrome, Opera, Safari xhr = new XMLHttpRequest(); if ("withCredentials" in xhr)
2012-04-19 21:44:21 428
原创 JSONP - jQuery, Passing by Cross Site Policy
JSONP - Json with Paddingfunction myfunction(data) { }
2012-04-19 20:36:00 506
原创 Get Data from Database without definited Structure
package tianye.test.rest.controller;import java.sql.Connection;import java.sql.DriverManager;import java.sql.PreparedStatement;import java.sql.ResultSet;import java.sql.ResultSetMetaData;import
2012-04-19 17:25:33 729
原创 D3 Drag
var dragstore;var dragCircle = d3.behavior.drag().on('dragstart', function() { //d3.event.sourceEvent.stopPropagation(); //console.log('Start Dragging Circle'); dragstore = d3.mouse(thi
2012-04-19 00:53:22 862
原创 D3, Bubble Sample
var svggraph;var divgraph;var svgwidth = 960;var svgheight = 960;function init(){ svggraph= d3.select("#graphdiv") .append("svg") .attr("width", svgwidth) .attr("height", svgheight); d
2012-04-18 23:47:16 1103
转载 AJAX Sample
Simple Ajax Examplefunction xmlhttpPost(strURL) { var xmlHttpReq = false; var self = this; // Mozilla/Safari if (window.XMLHttpRequest) { self.xmlHttpReq = new XMLHttpRequest
2012-04-17 22:33:16 662
转载 Data Driven Document - D3js
http://christopheviau.com/d3_tutorial/IntroData-Driven Documents, or D3 for short, is a new visualization library to build visualizations in SVG. But in my opinion, it's also the best javasc
2012-04-17 19:57:10 2476
原创 SVG xlink
http://www.w3.org/TR/SVG/linking.htmlModify the code from : http://blog.csdn.net/solaris_navi/article/details/7467480// draw a circle then add hyperlink on it String point ="" + "<ci
2012-04-16 23:40:44 935
原创 Draw SVG Graphics using Java
package tianye.test.rest;import java.util.Random;import javax.ws.rs.GET;import javax.ws.rs.Path;import javax.ws.rs.Produces;import javax.ws.rs.core.MediaType;@Path ("/draw")public class Draw
2012-04-16 21:51:28 819
原创 SVG Simple EXAMPLE
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN""http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink">
2012-04-16 16:53:16 1012
转载 SVG Reference
SVG ElementsElementDescriptionAttributesCreates a link around SVG elementsxlink:showxlink:actuatexlink:hreftargetProvides control over the glyphs used to render par
2012-04-16 15:51:47 888
转载 HTML5 New Elements
http://www.w3schools.com/html5/html5_new_elements.aspNew Semantic/Structural ElementsHTML5 offers new elements for better structure:TagDescriptionDefines an article
2012-04-16 15:29:51 821
原创 Sample RESTful Website - Contactbook
Model - defined for XMLpackage tianye.test.rest.model;import javax.xml.bind.annotation.XmlRootElement;import javax.xml.bind.annotation.XmlType;@XmlRootElement()@XmlType(propOrder = { "id", "
2012-04-13 00:56:01 1541
原创 Simplest Sample Class for Calling R from Java
import java.awt.Component;import javax.swing.JFrame;import org.rosuda.JRI.Rengine;import org.rosuda.javaGD.GDInterface;import org.rosuda.javaGD.JGDBufferedPanel;public class TryR6 extends GD
2012-04-12 20:55:29 865
原创 Create graphics via R + JavaGD (JRI) in Java
通过 JavaGD 创建 R 图像File 1import java.awt.BorderLayout;import java.awt.event.ActionEvent;import java.awt.event.ActionListener;import java.awt.image.BufferedImage;import java.io.File;import jav
2012-04-12 16:53:56 1329
原创 Macbook Pro Network Sharing via WiFi
If you want to share your internet connection via WiFi, you may actually find lots of articles through Google recommend you that you need to select "Airport", which basically some of Macbook Pro users
2012-04-08 07:10:50 1038
原创 Excute shell and read the output
import java.io.BufferedReader;import java.io.IOException;import java.io.InputStreamReader;public class Test1 { public static void main(String args[]) { try { Process p = Runtime
2012-04-03 21:45:52 507
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人