Skip to content

Instantly share code, notes, and snippets.

View Silambarasann's full-sized avatar

Silambarasan N Silambarasann

  • Bangalore
View GitHub Profile
@Silambarasann
Silambarasann / Date Converter
Created November 24, 2015 10:34
Convert server time to local time javascript
function convertTime(serverdate) {
var date = new Date(serverdate);
// convert to utc time
var toutc = date.toUTCString();
//convert to local time
var locdat = new Date(toutc + " UTC");
return locdat;
}
@Silambarasann
Silambarasann / Emailattachmentreceiver
Created December 26, 2014 14:00
Java code to read email and download attachments
import java.io.File;
import java.io.IOException;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.NoSuchProviderException;
@Silambarasann
Silambarasann / Emailattachmentreceiver
Created December 26, 2014 14:00
Java code to read email and download attachments
import java.io.File;
import java.io.IOException;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
import javax.mail.Multipart;
import javax.mail.NoSuchProviderException;
import java.io.File;
import java.io.IOException;
import java.util.Properties;
import javax.mail.Address;
import javax.mail.Folder;
import javax.mail.Message;
import javax.mail.MessagingException;
@Silambarasann
Silambarasann / Email request with calendar integration
Created December 26, 2014 13:51
Sending Email request with calendar integration using Java
/**
* method to send mail request along with calendar intergration for interview
* @author simbu
* @param emails
* @param string
* @param subject
* @throws Exception
*/
public static void eventRequest(List<String> emails, String string, String subject) throws Exception {
final MimetypesFileTypeMap mimetypes = (MimetypesFileTypeMap) MimetypesFileTypeMap.getDefaultFileTypeMap();