Friday, 5 September 2014

NPTEL Programming in c - Sums of Powers of Numbers

In this program, you are given an input N, which is a positive integer less than or equal to 40. Write a program to find the sums of fourth powers of the first N numbers.

Sample Input
2

Sample Output
17


Note : NPTEL follows gcc compiler which doesn't supports conio.h package and it always to be started as int main() and should return a integer value

NPTEL Programming in C - Pythagorean Triples

Three numbers form a Pythagorean triple if the sum of squares of two numbers is equal to the square of the third.

 For example, 3, 5 and 4 form a Pythagorean triple, since 3*3 + 4*4 = 25 = 5*5

You are given three integers, a, b, and c. They need not be given in increasing order. If they form a Pythagorean triple, then print "yes", otherwise, print "no". Please note that the output message is in small letters.

Sample Input
3
5
4

Sample Output
yes

Note : NPTEL follows gcc compiler which doesn't supports conio.h package and it always to be started as int main() and should return a integer value

Wednesday, 9 July 2014

How to Setup PHP Environment on our System ??

PHP Environment Setup

Hi friends in order to develop and run PHP, three vital components need to be installed on our computer system.
  • Web Server - PHP will work with virtually all Web Server software, including Microsoft's Internet Information Server (IIS) but then most often used is freely availble Apache Server. Download Apache for free here: http://http.apache.org/download.cgi
  • Database - PHP will work with virtually all database software, including Oracle , Microsoft Access and Sybase but most commonly used is freely available MySQL database. Download MySQL for free here: http://www.mysql.com/downloads/index.html
  • PHP Parser - In order to process PHP script instructions a parser must be installed to generate HTML output that can be sent to the Web Browser. Download PHP latest version for free  here:  php-5.5.14.tar.bz

PHP Parser Installation:

Before you proceed it is important to make sure that you have proper environment setup on your machine to develop your web programs using PHP.
Type the following address into your browser's address box.

 http://127.0.0.1/info.php 

If this displays a page showing your PHP installation related information then it means you have PHP and Webserver installed properly. Otherwise you have to follow some other procedure in addition to install PHP on your computer.


For both technical & non-technical doubts comment in the section given below.

Tuesday, 8 July 2014

Introduction to PHP

  • PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. 
  • PHP is designed to fill the gap between SSI (Server Side Includes) and Perl, intended for the web environment. Its principal application is the implementation of web pages having dynamic content.
  • PHP was installed on more than 240 million websites (39% of those sampled) and 2.1 million web servers according to a survey.
  •  Originally created by Rasmus Lerdorf in 1994, the reference implementation of PHP is now produced by The PHP Group
  • PHP originally stood for Personal Home Page,it now stands for PHP: Hypertext Preprocessor as a recursive acronym.
  • Its popularity derives from its C-like syntax, and its simplicity. The newest version of PHP is 5.5 and it is heavily recommended to always use the newest version for better security, performance and of course features.
BASIC TAGS 

Syntax : -  
<?PHP
// Your  Coding
?>

  1. When PHP parses a file, it looks for opening and closing tags, which are <?php and ?> which tell PHP to start and stop interpreting the code between them. Parsing in this manner allows PHP to be embedded in all sorts of different documents, as everything outside of a pair of opening and closing tags is ignored by the PHP parser.
  2. PHP also allows for short open tags <? and ?> (which are discouraged because they are only available if enabled with short_open_tag php.ini configuration file directive, or if PHP was configured with the --enable-short-tags option.
  3. If a file is pure PHP code, it is preferable to omit the PHP closing tag at the end of the file. This prevents accidental whitespace or new lines being added after the PHP closing tag, which may cause unwanted effects because PHP will start output buffering when there is no intention from the programmer to send any output at that point in the script.

<?php
       echo "Hello world";

// ... more code
echo "Last statement";
// the script ends here with no PHP closing tag

Any Doubts clarify it in the Comment Section.

Saturday, 5 July 2014

How to create a Windows 8 Phone App ?

Hi guys, lets see how to create your first Windows 8 Phone App. To create a windows 8 App, you need to download a SDK in order to built your Application. You may download the SDK Visual Studio 2012(Supports only in Windows8 OS) from Windows developers store.


Step 1: Open the VS 2012 and it looks alike the given below picture .


Step 2 : It will redirect you to your SDK start page after some seconds.

Step 3 : To create your first App, go to Menu and  then,
File-> New Project ->  select your programming language you wish to develop
from given list of language -> Select the type of your application -> 
Give a name and location to your project -> OK

 Step 4: Select the OS version you preferred as Windows8.

Step 5 : Now you can able to  design and develop your App on the Windows8 Phone template given as it is very easy to design & develop through drag & drop option. You may double click the controls you dragged to code them by specify your actions need to be performed by controlling their events.
VS 2012 App development


for further updates you required, just comment in the given section below.




Friday, 9 May 2014

Toast - Special Feature in Android

xample,Android Toast,Toast Image,Toast notification,android examples

Hi Guys already we have seen a little introduction about Android.Lets move to some of the features provided by Android. Firstly we are going to see about a concept of feedback or notification alike mechanism Toast.

A Toast provides simple feedback about an operation in a small popup. It only fills the amount of space required for the message and the current activity remains visible and interactive. For example, After sending a message it shows message send . Toasts automatically disappear after a timeout.

General procedure  to create a toast,
First, instantiate a Toast object with one of the makeText() methods. This method takes three parameters: the application Context, your message, and the duration for the toast. It returns a properly  Toast object. You can display it by toast followed by show(),as shown in the following example:


 


you may also write it as,



 In our next post we can see about how to create a custom toast alert etc.

Toast,toast alert,toast example,Android Toast,Toast Image,Toast notification,android examples

 
 

Saturday, 3 May 2014

Android - A Wizard of Mobile OS

What is Android  ?

Operating Systems have developed a lot in last 15 years. Starting from black and white phones to recent smart phones or mini computers, mobile OS has come far away. Especially for smart phones, Mobile OS has greatly evolved from Palm OS in 1996 to Windows pocket PC in 2000 then to Blackberry OS and Android. One of the most widely used mobile OS these days is ANDROID. Android is a software bunch comprising not only operating system but also middle ware and key applications.

Versions
 Why Many Versions ?


  • To eradicate bugs
  • To make improvements.
    Eg. Android Beam
     
Development Kit
To develop apps for Android devices, you use a set of tools that are included in the Android SDK. Once you've downloaded and installed the SDK, you can access these tools right from your Eclipse IDE, through the ADT plugin, or from the command line. Developing with Eclipse is the preferred method because it can directly invoke the tools that you need while developing applications.
However, you may choose to develop with another IDE or a simple text editor and invoke the tools on the command line or with scripts. This is a less streamlined way to develop because you will sometimes have to call command line tools manually, but you will have access to the same number of features that you would have in Eclipse.

How to Download SDK bundle ?

Step 1 : Go to Android Developers official Website

Step 2: Click the button download the SDK bundle for windows, after agreeing the terms and conditions choose the bit order for your computer as 32 or 64 bit

Step 3:  Unbundle the downloaded SDK and create your first Application.


You may also download the SDK from here,

For 32 bit,
http://dl.google.com/android/adt/22.6.2/adt-bundle-windows-x86-20140321.zip
For 64 bit,
dl.google.com/android/adt/22.6.2/adt-bundle-windows-x86_64-20140321.zip

All the Very best Guys, Best of Luck for your Success.