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
public class PairMultiParamter<K,V> | |
{ | |
K key; | |
V val; | |
public PairMultiParamter(K key, V val) { | |
super(); | |
this.key = key; | |
this.val = val; | |
} | |
public K getKey() { |
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
public static <T extends Comparable<T>> int countGreaterThan(T[] anArray, T elem) { | |
int count = 0; | |
for (T e : anArray) | |
if (e.compareTo(elem) > 0) | |
++count; | |
return count; | |
} | |
////////// | |
Integer[] arr= new Integer[3]; | |
arr[0]=5; |
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
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { | |
response.setStatus(200); | |
response.getWriter().write("ALLAH KAREEM"); | |
} | |
////// | |
$("#b1").click(function(){ | |
$.post("/jquery/MySer", | |
{ | |
name: "Donald Duck", | |
city: "Duckburg" |
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
@RequestMapping(value = "/sendEmail", method = RequestMethod.GET) | |
public String sendEmail(Model model) | |
{ | |
try { | |
ReadDataForEmailsImpl rDFEmail = new ReadDataForEmailsImpl(); //// thread for read data | |
SendEmail sendEmail = new SendEmail() ; //// thread for send data | |
rDFEmail.start(); | |
sendEmail.start(); | |
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
public static void acceptObejct(Object ob) | |
{} | |
public static void printList(List<Object> list) | |
{ } | |
/// Main methods calling. | |
Integer a=90; | |
acceptObejct(a); // ok , not exception | |
//// |
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
public class User implements Serializable { | |
/** | |
* | |
*/ | |
private static final long serialVersionUID = 1L; | |
/* | |
* primary key user id | |
*/ | |
@Column(name = "user_id", nullable = false) | |
@Basic(fetch = FetchType.LAZY) |
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
@Column(name = "craftcms_id") | |
@Basic(fetch = FetchType.LAZY) | |
@XmlElement | |
String craftcms_id ; |
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
public class Country | |
{ String name ; | |
// getter and setter | |
@Override | |
public String toString() { | |
return "Country [name=" + name + "]"; } | |
} | |
public class GenMethd { | |
public static <T> boolean getGenrcs(T t) | |
{ |
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
RawType<Integer> rawBox = new RawType(); | |
rawBox.setT( 112); | |
Integer a = rawBox.getT(); | |
OlderNewer