http://msysgit.googlecode.com/files/Git-1.7.0.2-preview20100309.exe
this is for window.
when it asks for something like "how would you like to run git, say "use git bash"
export http_proxy=http://username assword@proxy_address roxy_port
Showing posts with label tip. Show all posts
Showing posts with label tip. Show all posts
Friday, 2 April 2010
Monday, 7 September 2009
Tuesday, 23 June 2009
[MS-SQL] port setting
Micorsoft SQL Server > Configuration Tools > SQL Server Configuration Manager
* check SQL Server "Running"
* check TCP/IP "running"
- SQL Server 2005 Network Configuration > Protocols for SQLEXPRESS > TCP/IP >
right button click > properties >
+ TCP Dynamic ports : (delete data)
+ TCP Port : 1433
(IP1 , IP2, IP All)
* check SQL Server "Running"
* check TCP/IP "running"
- SQL Server 2005 Network Configuration > Protocols for SQLEXPRESS > TCP/IP >
right button click > properties >
+ TCP Dynamic ports : (delete data)
+ TCP Port : 1433
(IP1 , IP2, IP All)
[Remote Desktop Connection] - copy file
* copy file by remote desktop connection
Start > Remote Desktop Connection > Click "local resource" > click "More Detail" under local device and resource > check "drive"
Start > Remote Desktop Connection > Click "local resource" > click "More Detail" under local device and resource > check "drive"
Thursday, 4 June 2009
Thursday, 21 May 2009
Saturday, 28 March 2009
[SQL] compaire data type
DB NAME : testDB
column's NAME : createDate
real data : 2009-02-07 15:15:43.000
compare
select * from testDB where cast(convert(char(10),createDate,101)as datetime) >= cast(convert(char(10),'2009-02-05',101) as datetime)
column's NAME : createDate
real data : 2009-02-07 15:15:43.000
compare
select * from testDB where cast(convert(char(10),createDate,101)as datetime) >= cast(convert(char(10),'2009-02-05',101) as datetime)
Tuesday, 17 March 2009
[Eclipse] Auto line change
== 3.3 version ==
이클립스에서
1. help
2. software updates
3. find and Install
4. Search for new features to install
5. New Remote site
Name: Virtual Word Wrap
URL: http://ahtik.com/eclipse-update/
=== 3.4 version ===
http://ahtik.com/eclipse-update/
이클립스에서
1. help
2. software updates
3. find and Install
4. Search for new features to install
5. New Remote site
Name: Virtual Word Wrap
URL: http://ahtik.com/eclipse-update/
=== 3.4 version ===
http://ahtik.com/eclipse-update/
Wednesday, 11 February 2009
[Hibernate] many-to-many
There are 3 tables
=== Table1 ====
fooId
a
==== Table2 -====
barId
b
==== Table3 ==== (This table is joined from Table1 and Table2)
fooIdEx
barIdEx
===== a.java ===
....
private int foodId;
private String a;
private Set[b] bEnitty;
.......
===== b.java ======
......
private int barId;
private STring b;
............
===== a.hbm.xml (Mapping xml file) ======
.......
......
please refer to http://www.xylax.net/hibernate/manytomany.html
=== Table1 ====
fooId
a
==== Table2 -====
barId
b
==== Table3 ==== (This table is joined from Table1 and Table2)
fooIdEx
barIdEx
===== a.java ===
....
private int foodId;
private String a;
private Set[b] bEnitty;
.......
===== b.java ======
......
private int barId;
private STring b;
............
===== a.hbm.xml (Mapping xml file) ======
.......
......
please refer to http://www.xylax.net/hibernate/manytomany.html
Monday, 2 February 2009
[ExtJs] Simple Tree Example (Json as JSP)
=========== test2.html =================
[html]
[head]
[link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css"]
[script type="text/javascript" src="../adapter/ext/ext-base.js"][/script]
[script type="text/javascript" src="../ext-all.js"][/script]
[script type="text/javascript" src="reorder2.js"][/script]
[title]Insert title here[/title]
[/head]
[body]
[div id="tree-div" style="overflow:auto; height:300px;width:250px;border:1px solid #c3daf9;"][/div]
[/body]
[/html]
=============== reorder2.js ====================
Ext.onReady(function(){
// shorthand
var Tree = Ext.tree;
var tree = new Tree.TreePanel({
el:'tree-div',
useArrows:true,
autoScroll:true,
animate:true,
enableDD:true,
// rootVisible: false,
containerScroll: true,
loader: new Tree.TreeLoader({
dataUrl:'json.jsp'
})
});
// set the root node
var root = new Tree.AsyncTreeNode({
text: 'Ext JS',
draggable:false,
iconCls:'conthruAr',
id:'source'
});
tree.setRootNode(root);
// render the tree
tree.render();
root.expand();
});
================ json.jsp =================
[%@page import="java.util.Enumeration"%]
[%
Enumeration ss = request.getParameterNames();
String value;
while(ss.hasMoreElements()){
String key = (String)ss.nextElement();
value = request.getParameter(key);
System.out.println(key+" : "+value+" ");
}
String getS = request.getParameter("node");
System.out.println("ss : "+getS);
if (getS.equals("source")){
%]
[{"text":"1","id":"1","cls":"folder"},{"text":"4","id":"4","leaf":true,"cls":"file"},{"text":"3","id":"3","cls":"folder"},{"text":"2","id":"2","leaf":true,"cls":"file"}]
[%
} else if(getS.equals("3")) {
%]
[{"text":"7","id":"7","leaf":true,"cls":"file"},{"text":"8","id":"8","cls":"folder"}]
[%} %]
[html]
[head]
[link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css"]
[script type="text/javascript" src="../adapter/ext/ext-base.js"][/script]
[script type="text/javascript" src="../ext-all.js"][/script]
[script type="text/javascript" src="reorder2.js"][/script]
[title]Insert title here[/title]
[/head]
[body]
[div id="tree-div" style="overflow:auto; height:300px;width:250px;border:1px solid #c3daf9;"][/div]
[/body]
[/html]
=============== reorder2.js ====================
Ext.onReady(function(){
// shorthand
var Tree = Ext.tree;
var tree = new Tree.TreePanel({
el:'tree-div',
useArrows:true,
autoScroll:true,
animate:true,
enableDD:true,
// rootVisible: false,
containerScroll: true,
loader: new Tree.TreeLoader({
dataUrl:'json.jsp'
})
});
// set the root node
var root = new Tree.AsyncTreeNode({
text: 'Ext JS',
draggable:false,
iconCls:'conthruAr',
id:'source'
});
tree.setRootNode(root);
// render the tree
tree.render();
root.expand();
});
================ json.jsp =================
[%@page import="java.util.Enumeration"%]
[%
Enumeration ss = request.getParameterNames();
String value;
while(ss.hasMoreElements()){
String key = (String)ss.nextElement();
value = request.getParameter(key);
System.out.println(key+" : "+value+" ");
}
String getS = request.getParameter("node");
System.out.println("ss : "+getS);
if (getS.equals("source")){
%]
[{"text":"1","id":"1","cls":"folder"},{"text":"4","id":"4","leaf":true,"cls":"file"},{"text":"3","id":"3","cls":"folder"},{"text":"2","id":"2","leaf":true,"cls":"file"}]
[%
} else if(getS.equals("3")) {
%]
[{"text":"7","id":"7","leaf":true,"cls":"file"},{"text":"8","id":"8","cls":"folder"}]
[%} %]
Monday, 19 January 2009
[Error] Could not open Hibernate Session for transaction
[Error Message]
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader
Please insert org.hibernate.jdbc pacakge in MENIFEST file
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session for transaction; nested exception is java.lang.IllegalArgumentException: interface org.hibernate.jdbc.ConnectionWrapper is not visible from class loader
Please insert org.hibernate.jdbc pacakge in MENIFEST file
Monday, 5 January 2009
[Error] can not start MS-SQL Service
* Can't start MS-SQL service
- there are some error message that ms-sql can't start
+ Please open control panel > Service
Change running logon user
- there are some error message that ms-sql can't start
+ Please open control panel > Service
Change running logon user
Thursday, 6 November 2008
[Error - Rest] com.noelios.restlet.Engine createHelper
====== Error message (Rest) ======
com.noelios.restlet.Engine createHelper
No available server connector supports the required protocols
==== Solution ======
need "com.noelios.restlet.ext.jetty_6.1.jar" file
org.mortbay.jetty.ajp.jar
org.mortbay.jetty.https.jar
org.mortbay.jetty.jar
org.mortbay.jetty.util.jar
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/Connector
=== Solution ===
need "org.mortbay.jetty.jar" file
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/component/LifeCycle
=== Solution ===
need "org.mortbay.jetty.util.jar" file
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/ajp/Ajp13SocketConnector
=== Solution ===
need "org.mortbay.jetty.ajp.jar" file
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/security/SslSelectChannelConnector
=== Solution ===
need "org.mortbay.jetty.https.jar" file
com.noelios.restlet.Engine createHelper
No available server connector supports the required protocols
==== Solution ======
need "com.noelios.restlet.ext.jetty_6.1.jar" file
org.mortbay.jetty.ajp.jar
org.mortbay.jetty.https.jar
org.mortbay.jetty.jar
org.mortbay.jetty.util.jar
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/Connector
=== Solution ===
need "org.mortbay.jetty.jar" file
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/component/LifeCycle
=== Solution ===
need "org.mortbay.jetty.util.jar" file
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/ajp/Ajp13SocketConnector
=== Solution ===
need "org.mortbay.jetty.ajp.jar" file
=== You might see other error message ====
Exception in thread "main" java.lang.NoClassDefFoundError: org/mortbay/jetty/security/SslSelectChannelConnector
=== Solution ===
need "org.mortbay.jetty.https.jar" file
Monday, 3 November 2008
[Error] NoClassDefFoundError org/apache/commons/codec/DecoderException
==== Error Message ====
NoClassDefFoundError org/apache/commons/codec/DecoderException
==== Solution =====
You need org.apache.commons.codec.jar file
NoClassDefFoundError org/apache/commons/codec/DecoderException
==== Solution =====
You need org.apache.commons.codec.jar file
[Error] java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
=== Error MEssage ===
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
== Solution ===
you need "commons-logging.jar" file
java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory
== Solution ===
you need "commons-logging.jar" file
Monday, 13 October 2008
[JSTL] - if / else if (when)
[c:choose]
[c:when test="${commnad == 'scheudleList'}"]
[json:object]
[json:property name="total" value="${totalCount}"/]
[json:array name="data" var="task" items="${utilSchdule}"]
[json:object]
[json:property name="id" value="${task.id}"/]
[json:property name="taskName" value="${task.taskName}"/]
[json:property name="applicationSymbolicName" value="${task.applicationSymbolicName}"/]
[json:property name="endTime"]
[fmt:formatDate value="${task.endTime}" pattern="dd.MM.yyyy HH:mm"/]
[/json:property]
[json:property name="nextTime"]
[fmt:formatDate value="${task.nextTime}" pattern="dd.MM.yyyy HH:mm"/]
[/json:property]
[json:property name="userId" value="${task.userId}"/]
[json:array name="selectedIds" var="selectedId" items="${selectedIds}"]
[c:out value="${selectedId}"/]
[/json:array]
[/json:object]
[/json:array]
[/json:object]
[/c:when]
[/c:choose]
[c:when test="${commnad == 'scheudleList'}"]
[json:object]
[json:property name="total" value="${totalCount}"/]
[json:array name="data" var="task" items="${utilSchdule}"]
[json:object]
[json:property name="id" value="${task.id}"/]
[json:property name="taskName" value="${task.taskName}"/]
[json:property name="applicationSymbolicName" value="${task.applicationSymbolicName}"/]
[json:property name="endTime"]
[fmt:formatDate value="${task.endTime}" pattern="dd.MM.yyyy HH:mm"/]
[/json:property]
[json:property name="nextTime"]
[fmt:formatDate value="${task.nextTime}" pattern="dd.MM.yyyy HH:mm"/]
[/json:property]
[json:property name="userId" value="${task.userId}"/]
[json:array name="selectedIds" var="selectedId" items="${selectedIds}"]
[c:out value="${selectedId}"/]
[/json:array]
[/json:object]
[/json:array]
[/json:object]
[/c:when]
[/c:choose]
Tuesday, 7 October 2008
Get All parameter (key and value)
Enumeration ss = request.getParameterNames();
while(ss.hasMoreElements()) {
String key = (String)ss.nextElement();
String value = request.getParameter(key);
System.out.println(key + " : " + value+"
");
}
// if value is array type such as check box
/*
String test[] = request.getParameterValues("test");
if(test != null) {
for(int i=0; i < test.length; i++) {
System.out.println("test[" + i + "] : " + test[i] );
}
}
*/
while(ss.hasMoreElements()) {
String key = (String)ss.nextElement();
String value = request.getParameter(key);
System.out.println(key + " : " + value+"
");
}
// if value is array type such as check box
/*
String test[] = request.getParameterValues("test");
if(test != null) {
for(int i=0; i < test.length; i++) {
System.out.println("test[" + i + "] : " + test[i] );
}
}
*/
Sunday, 5 October 2008
Simple List to Json example
Download 6 package jar files
commons-lang 2.3
commons-beanutils 1.7.0
commons-collections 3.2
commons-logging 1.1
ezmorph 1.0.4.jar
json-lib-2.2.2-jdk15.jar
Download all
=== Test source from List to Json ====
============== JsonTest =======================
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class JsonTest {
public void Bean2Json(){
MyBean myBean1 = new MyBean();
myBean1.setId(1);
myBean1.setName("a");
MyBean myBean2 = new MyBean();
myBean2.setId(2);
myBean2.setName("b");
List mybeanList = new ArrayList();
mybeanList.add(myBean1);
mybeanList.add(myBean2);
JSONArray jsonArray = JSONArray.fromObject(mybeanList);
System.out.println("==== : "+jsonArray);
Map map = new HashMap();
map.put("beanlist", jsonArray);
JSONObject jsonObject = JSONObject.fromObject(map);
System.out.println("==== json :"+jsonObject);
}
}
======= MyBean.java =======
public class MyBean {
private int Id;
private String Name;
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
}
===== runtTest.java =========
public class runTest {
/**
* @param args
*/
public static void main(String[] args) {
JsonTest jsonTest = new JsonTest();
jsonTest.Bean2Json();
}
}
commons-lang 2.3
commons-beanutils 1.7.0
commons-collections 3.2
commons-logging 1.1
ezmorph 1.0.4.jar
json-lib-2.2.2-jdk15.jar
Download all
=== Test source from List to Json ====
============== JsonTest =======================
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
public class JsonTest {
public void Bean2Json(){
MyBean myBean1 = new MyBean();
myBean1.setId(1);
myBean1.setName("a");
MyBean myBean2 = new MyBean();
myBean2.setId(2);
myBean2.setName("b");
List
mybeanList.add(myBean1);
mybeanList.add(myBean2);
JSONArray jsonArray = JSONArray.fromObject(mybeanList);
System.out.println("==== : "+jsonArray);
Map
map.put("beanlist", jsonArray);
JSONObject jsonObject = JSONObject.fromObject(map);
System.out.println("==== json :"+jsonObject);
}
}
======= MyBean.java =======
public class MyBean {
private int Id;
private String Name;
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public String getName() {
return Name;
}
public void setName(String name) {
Name = name;
}
}
===== runtTest.java =========
public class runTest {
/**
* @param args
*/
public static void main(String[] args) {
JsonTest jsonTest = new JsonTest();
jsonTest.Bean2Json();
}
}
Tuesday, 5 August 2008
Ms-sql : auto generate primary key value
Open table design
Check properties on the right side
Table Designer > Identity column : please select primary key column name
Then ms sql will generate primary key value automatically.
Check properties on the right side
Table Designer > Identity column : please select primary key column name
Then ms sql will generate primary key value automatically.
org.hibernate.HibernateException: No Hibernate Session bound to thread
error message : org.hibernate.HibernateException: No Hibernate Session bound to thread
You did not insert "annotation" in the source.
such as
"@Transactional"
"@SuppressWarnings("unchecked")"
"@Transactional(readOnly = true)"
You did not insert "annotation" in the source.
such as
"@Transactional"
"@SuppressWarnings("unchecked")"
"@Transactional(readOnly = true)"
Subscribe to:
Posts (Atom)