GetASCII Application Download American Standard Code for Information Interchange,Hexadecimal,octal ,binary values of your character will be displayed in this GetASCII Android Application
Posts
Addition of two numbers in android
- Get link
- X
- Other Apps
Mainactivity.java public class MainActivity extends AppCompatActivity implements View.OnClickListener{ private EditText editText,editText2,editText4; int v1,v2,v3; String s="ans" ; private Button button; @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_main); button=(Button)findViewById(R.id.button); button.setOnClickListener(this); } @Override public void onClick(View v) { editText=(EditText)findViewById(R.id.editText); editText2=(EditText)findViewById(R.id.editText2); ...
Java code to send email
- Get link
- X
- Other Apps
import java . util .*; import javax . mail .*; import javax . mail . internet .*; import javax . activation .*; public class SendEmail { public static void main ( String [] args ) { // Recipient's email ID needs to be mentioned. String to = "abcd@gmail.com" ; // Sender's email ID needs to be mentioned String from = "web@gmail.com" ; // Assuming you are sending email from localhost String host = "localhost" ; // Get system properties Properties properties = System . getProperties (); // Setup mail server properties . setProperty ( "mail.smtp.host" , host ); // Get the default Session object. Session session = Session . getDefaultInstance ( properties ); try { // Create a default MimeMessage object. MimeMessage message = new MimeMessage ( session ); // Set From: header ...
calculate time of difrent zones in the world
- Get link
- X
- Other Apps
Calendar calendar = Calendar . getInstance (); TimeZone fromTimeZone = calendar . getTimeZone (); TimeZone toTimeZone = TimeZone . getTimeZone ( "CST" ); calendar . setTimeZone ( fromTimeZone ); calendar . add ( Calendar . MILLISECOND , fromTimeZone . getRawOffset () * - 1 ); if ( fromTimeZone . inDaylightTime ( calendar . getTime ())) { calendar . add ( Calendar . MILLISECOND , calendar . getTimeZone (). getDSTSavings () * - 1 ); } calendar . add ( Calendar . MILLISECOND , toTimeZone . getRawOffset ()); if ( toTimeZone . inDaylightTime ( calendar . getTime ())) { calendar . add ( Calendar . MILLISECOND , toTimeZone . getDSTSavings ()); } System . out . println ( calendar . getTime ());