Recent Posts

Sunday, 22 November 2015

Creating Views in android in loops ( Java )

Creating Views in android in loops ( Java )

Here goes a small code for looping in android using java. Layout to which we add views <LinearLayout      xmlns:android="http://schemas.android.com/apk/res/android"   android:layout_width="match_parent" android:layout_height="wrap_content"   android:orientation="vertical" android:id="@+id/content"> </LinearLayout> Lets create views in for loop and add to above layout LinearLayout content=(LinearLayout)findViewById(R.id.content); int[5] x={1,2,3,4,5}; for(int i:x) {   Button butn=new

Sunday, 6 September 2015

Compressing images as like WhatsApp in Android

Compressing images as like WhatsApp in Android

package com.smartapps.ImageResolution; import android.content.Intent; import android.content.SharedPreferences; import android.content.pm.ActivityInfo; import android.database.Cursor; import android.graphics.Bitmap; import android.graphics.BitmapFactory; import android.net.Uri; import android.provider.MediaStore; import android.support.v7.app.ActionBarActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.ImageButton; import android.widget.ImageView; import android.widget.Toast; import java.io.ByteArrayOutputStream; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class Details extends ActionBarActivity {

Tuesday, 30 June 2015

Finding Factorial using the BigInteger in JAVA

Finding Factorial using the BigInteger in JAVA

Up to Schooling we may only find factorial up to 25 but in real engineering we may have to deal with the largest numbers where the usual datatypes may not work. In Java , BigInteger is the pre-defined class we use in order to deal with those numbers.
Converting Numbers to Different Numerical Systems in JAVA

Converting Numbers to Different Numerical Systems in JAVA

You may have to change the numbers from one format to other format, as like from decimal to hexagon . Here i have tried the different approach where you can convert from one numerical system to other numerical system using the digits in that numerical system. For Example

Sunday, 7 June 2015

Validating IPAddress in Java

Validating IPAddress in Java

This is the part of the java Regular Expressions, Validating,searching the data using the matches function This is mostly used in analyzing the data. To know further about it read about JAVA Regex   import java.io.*; public class ValidIP{      public static void main(String []args){        String IP="000.12.12.034";

Sunday, 31 May 2015

Basic Steps to Create your WebSite

Basic Steps to Create your WebSite

WebServer: The computer which serves the requests from the client (webbrowser) is called webserver.  WebClient: The computer from which the clients request the services (webpage) is called webClient. The application used in webclient to access the webserver is called WebServer.  To make the business, internet is the best

Tuesday, 26 May 2015

Tuesday, 19 May 2015

Fetching the data from  MYSQL server using PHP prepared Statements

Fetching the data from MYSQL server using PHP prepared Statements

Generally developers use the prepared statement in order to connect to the MYSQL server in order to prevent the SQL Injections from the hackers from the user forms. Here is the code for connecting to the server and selecting the database. Here i am using the database "newsonspot".

Sunday, 17 May 2015

Buttons styling using CSS

Buttons styling using CSS

In order to have good look for the website Cascading Style Sheets(CSS) plays very important role. Let us now discuss about the styling of the "buttons" using CSS. First, create the html file and place the following code. //index.html <html><head><title>Styling buttons using CSS</title></head> <link rel='stylesheet' href='style.css' type='text/css'/> <body><!--

Friday, 15 May 2015

Network commands in Windows Command Prompt

Network commands in Windows Command Prompt

netstat :   This is the command which lets you to get the active networks. ipconfig :   This is the command which lets you to know about your ip address for each network adapter. getmac :   This is the network windows command which is used to
Dealing with cookies using javascript

Dealing with cookies using javascript

Hello guys, I am designing a website for project NEWSONSPOT, there i am going to use the cookies. I planned to write two default functions to set the cookies and get the cookies. Here is the two functions setCookie and readCookie.   Assuming you know the basics of

Thursday, 14 May 2015

Getting the Locaiton in the web browser using JavaScript (GeoLocation)

Getting the Locaiton in the web browser using JavaScript (GeoLocation)

we can get the location of the user only with the permission of the user. So when you execute the code in the browser . The browser asks the permission of the user to access his location. OK, Lets start the code ! First create the html file
Removing ShortCut Virus in USB ( pendrive )

Removing ShortCut Virus in USB ( pendrive )

You may observe that there is a shortcut virus in the USB in Windows OS. To remove that first mount the USB ( put the pendrive to laptop or PC ). Next run the command prompt (shortcut : windows-key + R and type cmd in the run) .

Wednesday, 13 May 2015

#define

#define

#define is the preprocessor used to define the constants and macro definitions. #define MAX 50 This says that compiler that where ever there is MAX , the compiler replaces it with 50

Tuesday, 12 May 2015

C Preprocessor #include

C Preprocessor #include

Pre-Processor as the name saying these are the actions occurs before compilation. Some possible actions are including the file, defining the symbolic constant, macros. All preprocessor directives begin with #Let us first study about #include #include is used to include the files, generally header files.#include<studio.h> is the statement which
Factorial of the number

Factorial of the number

#include<studio.h> void main() { int num,sum=1; Printf ("Enter the number:"); scanf("%d",&num); While(num--!=0)   sum*=num; printf("factorial is %d",sum); }

Monday, 11 May 2015

Reverse of a Number

Reverse of a Number

Reversing of the number #include<stdio.h> #include<conio.h> void main() { int a,r,sum=1; printf("enter the number"); scanf("%d",&a); while(a!=0) { r=a%10; sum=sum*10+r; a=a/10; } printf("the reverse number is %d ",sum); getch(); }

Sunday, 10 May 2015

Hello World C Program

Hello World C Program

Here goes my first post, letting you to know about C basics. Let's write the basic C programm to print "hello world" #include<studio. h> /* includes standard input/output library */ void main() { Printf("hello world"); }
Pages (4)1234

 
biz.