Showing posts with label a. Show all posts
Showing posts with label a. Show all posts

Monday, March 28, 2016

Battery Dr saver a task killer





---Extend your Battery life---
Do you want to make your battery stronger?Dr.Battery can help you to save power.Download the battery app now!
Improve your Battey life!Max your Battery life.Make your phone faster and smoother.
?Help you to kill tasks quickly and reset your phone easily!
?Show battery health,temperature,talktime etc.
?To improve your phones battery,you should kill running tasks,adjust screen brightness(volume),turn off wifi, gps, bluetooth,Auto-sync etc.
?Battery Dr saver is the best Battery Improver/Battery Booster/battery saver tool.As your Battery Helper,it helps you to improve battery life .
?Icludes: Power Management(Battery Management),Battery Notifier, Battery Monitor,Power Control,task killer.








 
Read More..

Thursday, April 3, 2014

Partitions of a number in java

This application generates the partitions of a number. For example, for no. 3 will display:
1 1 1
1 2
2 1

-------------------------------------------------------------------------------------------------------------
import java.io.*;
public class partitii_nr {
private static int[] sol=new int[20];
private static int n,i,s;
private static void back(int k){
if(s==n){
for(i=1;i<k;i++)
System.out.print(sol[i]+" ");
System.out.println("");
}
else{
sol[k]=0;
for(i=1;sol[k]+s<n;i++){
sol[k]++; s+=sol[k]; back(k+1);s-=sol[k];
}

}
}
public static void main(String[] args){
try{
BufferedReader input=new BufferedReader(new InputStreamReader(System.in));
System.out.println("Input number:");
n=Integer.parseInt(input.readLine());
back(1);
}catch(Exception e){e.printStackTrace();}
}
}
-------------------------------------------------------------------------------------------------------------
Read More..

Monday, March 31, 2014

And today I launched my website on a free server

Last summer I worked on my website and one of my wishes was to upload it on a server.
Thanks to a friend I heard about a nice free server (cause I like free things) that supports PHP and MySql databases and I uploaded there.
Ok, but what about this blog? I will still publish articles here, that website will be just an "intro" to this blog and also there Ill publish links to my projects. It was just one of my dreams to create my website from sketches and to publish it on a server...
So HERE it is! And was created with PHP, MySql Databases and just a little bit HTML & CSS! And visit my site: http://23ars.site50.net
Read More..

Sunday, March 30, 2014

Set a link into TextView In Android

Description:
This example will let you set a link in textview will will switch to your phone’s browser and will open the link specified in browser. Also you will be able to dial a number by clicking a link set in the view.
Algorithm:
1.) Create a new project by File-> New -> Android Project name it TextViewLinkDemo.
2.) Write following code into your main.xml
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
             android:orientation="vertical"
             android:layout_width="match_parent"
             android:layout_height="wrap_content">

   <TextView xmlns:android="http://schemas.android.com/apk/res/android"
           android:id="@+id/text1"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           android:autoLink="all"
           android:text="@string/link_text_auto"
           />
   <TextView xmlns:android="http://schemas.android.com/apk/res/android"
           android:id="@+id/text3"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           />
   <TextView xmlns:android="http://schemas.android.com/apk/res/android"
           android:id="@+id/text4"
           android:layout_width="match_parent"
           android:layout_height="match_parent"
           />
</LinearLayout>
3.) Write following code into strings.xml
<resources>
    <string name="hello">Hello World, TextViewLinkDemoActivity!</string>
    <string name="app_name">TextViewLinkDemo</string>
 
    <string name="link_text_auto"><b>text1:</b> This is some text.  In
      this text are some things that are actionable.  For instance,
      you can click on http://www.gmail.com and it will launch the
      web browser.  You can click on google.com too.  And, if you
      click on (415) 555-1212 it should dial the phone.
    </string>
</resources>
4.) Build and run your code and check the output given below in the doc.
Steps:
1.) Create a project named TextViewLinkDemo and set the information as stated in the image.
Build Target: Android 2.3
Application Name: TextViewLinkDemo
Package Name: com.org. TextViewLinkDemo
Activity Name: TextViewLinkDemo
Min SDK Version: 9
2.) Open TextViewLinkDemo.java file and write following code there:
package com.org.TextViewLinkDemo;
import android.app.Activity;
import android.graphics.Typeface;
import android.os.Bundle;
import android.text.Html;
import android.text.SpannableString;
import android.text.Spanned;
import android.text.method.LinkMovementMethod;
import android.text.style.StyleSpan;
import android.text.style.URLSpan;
import android.widget.TextView;
public class TextViewLinkDemoActivity extends Activity {
    /** Called when the activity is first created. */
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        TextView t3 = (TextView) findViewById(R.id.text3);
        t3.setText(
            Html.fromHtml(
                "<b>text3:</b>  Text with a " +
                "<a href="http://www.gmail.com">link</a> " +
                "created in the Java source code using HTML."));
        t3.setMovementMethod(LinkMovementMethod.getInstance());
        SpannableString ss = new SpannableString(
            "text4: Click here to dial the phone.");
        ss.setSpan(new StyleSpan(Typeface.BOLD), 0, 6,
                   Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        ss.setSpan(new URLSpan("tel:4155551212"), 13, 17,
                   Spanned.SPAN_EXCLUSIVE_EXCLUSIVE);
        TextView t4 = (TextView) findViewById(R.id.text4);
        t4.setText(ss);
        t4.setMovementMethod(LinkMovementMethod.getInstance());
    }
}
3.) Compile and build the project.
4.) Run on simulator and click onto the links shown in the view. It will open browser and browse the link you have clicked in text view.
Output
Read More..