knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: Upload csv file at Google Cloud Storage using java
http://knowledge-serve.blogspot.com/2014/10/upload-csv-file-at-google-cloud-storage.html
IT Knowledge Sharing Interview questions. Thursday, October 9, 2014. Upload csv file at Google Cloud Storage using java. First do all required pre requiste as per google doc. Https:/ cloud.google.com/appengine/docs/java/googlestorage/. Now see the sample code for a csv file uploader using latest api. Public String uploadFileUsingGCSClient(String csvDate,. String fileName, String dirName,String bucketName) throws IOException {. Init the bucket access. AddUserMetadata("myfield1", "my field value"). Session...
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: Swing-Java: Get current date and time using swing
http://knowledge-serve.blogspot.com/2011/11/swing-java-get-current-date-and-time.html
IT Knowledge Sharing Interview questions. Monday, November 21, 2011. Swing-Java: Get current date and time using swing. Here is the example where you can get current time and date using frame in swing. Import javax.swing.*;. Import java.awt.*;. Import java.awt.event.*;. Import java.text.SimpleDateFormat;. Import java.util.Calendar;. Public class DateTimeDemo extends JFrame implements ActionListener{. Public static final String DATE FORMAT NOW = "dd-MM-yyyy HH:mm:ss";. Public static String dt;. Javaxmail&...
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: Struts 2 - struts tag with boolean property
http://knowledge-serve.blogspot.com/2014/08/struts-2-struts-tag-with-boolean.html
IT Knowledge Sharing Interview questions. Tuesday, August 12, 2014. Struts 2 - struts tag. Struts 2 - struts tag s:if test= "booleanVaue" with boolean property. Always remember two points -. 1) Check your bean (.java) file for getter, setter for boolean type value. Private boolean isTest;. Private boolean hasCheck;. Public boolean isTest() {. Public void setTest(boolean isTest) {. Public boolean isHasCheck() {. Public void setHasCheck(boolean hasCheck) {. Subscribe to: Post Comments (Atom). Javaxmail....
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: Get real client ip-address using java / getRemoteAddr() is giving 127.0.0.1 as client ip address in java
http://knowledge-serve.blogspot.com/2011/12/get-real-client-ip-address-using-java.html
IT Knowledge Sharing Interview questions. Wednesday, December 21, 2011. Get real client ip-address using java / getRemoteAddr() is giving 127.0.0.1 as client ip address in java. Getting real client ip-address using java (if Apache redirection is used.). You can use ,. If you have configured Apache redirection. If you will use. It may return 127.0.0.1. Has been configured at your deployment server. Subscribe to: Post Comments (Atom). Knowledge Serve- We make Leaders. Session timeout interceptor in struts 2.
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: December 2014
http://knowledge-serve.blogspot.com/2014_12_01_archive.html
IT Knowledge Sharing Interview questions. Tuesday, December 16, 2014. Generate Random file name in Java. You can create a random string for a file name using following code snippet. Public static String getRandomString(String fileName) {. Char fileNameArray[] = fileName.toCharArray();. Int fileNameLen = fileNameArray.length;. Int c = 'A';. Int r1 = 0, z=0;. StringBuilder pw = new StringBuilder(" );. For (int j = 0; j 25; j ) {. R1 = (int) (Math.random() * 4);. C = '0' (int) (Math.random() * 9);. For deta...
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: How to match date filed in Google Datastore
http://knowledge-serve.blogspot.com/2014/10/how-to-match-date-filed-in-google.html
IT Knowledge Sharing Interview questions. Thursday, October 9, 2014. How to match date filed in Google Datastore. How to match date filed in Google Datastore. Suppose you have an 'Employee' entity with updatedOn field (Date or timestamp type). You can use Date function to parse date string and filter your data. In GQL, you can use:. SELECT * FROM EmployeeObj where updatedOn Date. Similarly in objectify, you can use filter. Objectify obfy = OfyService.ofy();. Filter("updatedOn ", Date('2014-09-25'). Here ...
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: Upload File using in struts 2
http://knowledge-serve.blogspot.com/2011/10/upload-file-using-in-struts-2.html
IT Knowledge Sharing Interview questions. Wednesday, October 5, 2011. Use struts2 required lib jar files and see the following files also. 1) Here is the action file. Package com.example.common.action;. Import java.io.File;. Import com.opensymphony.xwork2.ActionSupport;. Public class FileUploadAction extends ActionSupport{. Private File fileUpload;. Private String fileUploadContentType;. Private String fileUploadFileName;. Public String getFileUploadContentType() {. Public String getFileUploadFileName() {.
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: October 2014
http://knowledge-serve.blogspot.com/2014_10_01_archive.html
IT Knowledge Sharing Interview questions. Thursday, October 9, 2014. How to match date filed in Google Datastore. How to match date filed in Google Datastore. Suppose you have an 'Employee' entity with updatedOn field (Date or timestamp type). You can use Date function to parse date string and filter your data. In GQL, you can use:. SELECT * FROM EmployeeObj where updatedOn Date. Similarly in objectify, you can use filter. Objectify obfy = OfyService.ofy();. Filter("updatedOn ", Date('2014-09-25'). List ...
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: Maven :: Include servlet-api only at local maven install not during building war
http://knowledge-serve.blogspot.com/2014/12/include-servlet-api-only-at-local-maven.html
IT Knowledge Sharing Interview questions. Wednesday, December 10, 2014. Maven : Include servlet-api only at local maven install not during building war. Include servlet-api only at local maven install not during building war. Add scope element with value as ‘Provided’. Now maven will not include this jar in lib whiling. Building war file so that you can deploy it on tomcat. GroupId javax.servlet /groupId. Version 2.5 /version. Subscribe to: Post Comments (Atom). Knowledge Serve- We make Leaders. Here is ...
knowledge-serve.blogspot.com
IT Knowledge Sharing | Interview questions: Generate Random file name in Java
http://knowledge-serve.blogspot.com/2014/12/generate-random-file-name-in-java.html
IT Knowledge Sharing Interview questions. Tuesday, December 16, 2014. Generate Random file name in Java. You can create a random string for a file name using following code snippet. Public static String getRandomString(String fileName) {. Char fileNameArray[] = fileName.toCharArray();. Int fileNameLen = fileNameArray.length;. Int c = 'A';. Int r1 = 0, z=0;. StringBuilder pw = new StringBuilder(" );. For (int j = 0; j 25; j ) {. R1 = (int) (Math.random() * 4);. C = '0' (int) (Math.random() * 9);. Struts 2...
SOCIAL ENGAGEMENT