C ,JAVA and TASM Programming Made Easy with Source Codes and Tutorials
This blog aims at helping you learn C, Java and TASM programming languages and thus enabling you to use its immense possibilities in the computing world.It features Step by step instructions on doing a C program ,Complete Source Codes of C, Java and TASM Programs ,sample program downloads,programming tutorials and general tips for programmers.
Microsoft has always known what its user needs and has attained massive success introducing products which full fills the trend and requirements.It has recently introduced the Windows 8 and Outlook.Both these products have a common feature the Metro look. So what is this Metro look and why have they used it?
The Metro is a User Friendly Minimalistic and Stylish Graphical User Interface(GUI) Unlike the predecessor Windows versions you can see that there is no Windows start Button and the detailed lists of icons.Everything is clean and minimal.This is a trend that has been absorbed from the growing Android Smartphone and Tablets Market.Windows 8 also aims the users who uses Mobile Devices with touchscreens.The Interface is good and is fluid.
Microsoft has also done a good job with their Online Mail Service,its also been ported to the Metro Look. Live.com and Hotmail.com has been revamped to the simpler and user friendly Mail Service Outlook.com
These are all very good and the Outlook Mail service is very attractive,Expect it could have been much faster or it could show the loading screen like Gmail do when you open your Mail account.
These all are revolutions in the IT Era-User interfaces are becoming simpler and simpler by time,user hardly needs to do something,its becoming very easy for the naive user.But advanced users might find these simplicity a little annoying as they may be interested to explore Details of the System.
These all make up an Efficient and Intelligent approach that makes Information Retrival and Information processing a Child's Play and the only doubts remains-Will a time come when computers do all the work that we think of ????
To learn the Basics of file manipulation in java ,the best way to start is by writing simple code to write some text to file.The following is a sample program that writes text to file using BufferedWriter Class It uses the File Class to open the File to the BufferedWriter Class,which writes some sample text to the file.The main class used is the Writer Class intended for writing stream data to files. Below is the complete source Code to implement a Simple File Writer in Java
import java.io.*;
public class FileWriter {
public static void main(String[] args)throws IOException{
String towrite = "Hello World";
Writer data = null;
File file = new File("myfile.txtt");
data = new BufferedWriter(new FileWriter(file));
data.write(text);
data.close();
System.out.println("Text Written");
}
}
There is an easy way to set the Java Compiler Path(javac.exe) and Java Interpreter path(java.exe)without typing long lines of command. The following are steps to set the JDK(Java Development Kit) path easily 1.Click on Start 2.Right Click on Computer>Properties 3.Click on Advanced System Settings 4.Click on Environmental Variables Button
5.Click on New
6.In the variable name field type PATH
7.In the variable value field enter the path in which JDK is installed (usually C:\Program Files\Java\jdk1.7.0_05\bin),include the bin folder. 8.Click on OK 9.Open CMD and type javac.exe or java.exe or the name of any executable,it will be launched. See the video tutorial for more information
Java Applets are easy to Implement Web Programs that can be
run on the browser without any installation or downloads. The only requirement
is that Java Virtual Machine(JVM) Should be installed on the END User Machine.
As you may know Java Applets are OS Independent it can be run on any system
supporting Java.
Simple Pencil Sketch Applet in Java
The following is a simple Java Example Applet that draws
Lines when a user clicks and Drags the mouse.
It uses mouseMoved, mousePressed events to Track mouse
clicks by using the MouseAdapter Motion Listener Class.The following is the
screenshot of the Applet
The following is the complete Example Source code for the
Pencil Sketch Java Applet
Microsoft had introduced 2 Variants of the .net Frameworks till .Net Framework Version 4,the Complete Framework and the Client Profile which was only a subset of the the Complete Framework.
Why did Microsoft do it?
Since the Complete Framework had a large size Microsoft did not want the END user's to consider it annoying to download the complete framework to run applications developed in .Net. Certain software's only used some parts of the framework.So client profile was created as a subset of the .Net Framework complete Edition.The client Profile did not support ASP.Net and the Advanced Web Programming.
Was Client Framework a Success?
The Straight forward answer is 'NO'.If you ask why just compare the size of the two packages.
.NET Framework 4 32BIT + 64 bit Full - 48.1 MB .NET Framework 4 Clint Profile- 41.0 MB
Just a 7MB Difference.So this is where it failed,the users will find it comfortable to download the full framework as the sizes have a small difference.This also created confusion among common users regarding the different terms used.
Starting with the .NET Framework 4.5, the Client Profile has been
discontinued and only the full redistributable package is available.
Optimizations provided by the .NET Framework 4.5, such as smaller
download size and faster deployment, have eliminated the need for a
separate deployment package. The single redistributable streamlines the
installation process and simplifies your app's deployment options.
Thus us Developers and END Users will find it comfortable to download a single version rather than getting confused with all different versions around.
C Language is the Base for all Softwares existing today,it is a powerful language for programming applications which require Low Level System Functions.The Object oriented successor of C is C++ which is considered much easier to program when compared to C because of its Object Oriented Nature.
It is Necessary for Every Programming Aspirant to learn C Language and C should be the primary language you learn because future languages apart from Functional Languages most Imperative Programming Languages use the structure similar to C.
There are Several Powerful and Completely free IDEs(Integrated Development Environments) Available for Developing C Programs which can be simultaneously used for other languages like C++.
Given Below is a List of the Best 4 Free IDEs for Developing Programs using the C Programming Language.
1)Eclipse-CDT(C/C++ Development Tooling):
Eclipse is Popular IDE for Developing Java Applications.It is mainly used for Developing Android Applications by Integrating the Android Plugin. Eclipse IDE has its C/C++ Counterpart called Eclipse CDT Which can be used to Develop both C and C++ Programs.The main feature of CDT is Code refactoring and Syntax Highlighting.
Pelles C is a good free Integrated development Environment for developing C programs. It is available in both 32 and 64 bit versions with support for Windows 7 64 bit editions.It is a good alternative for the Old 16 Bit Borland Turbo C Compiler(TC).
Dev-C++ is an Free IDE by BloodShed Software that can be used to Develop C and C++ Programs Dev-C++ IDE Supports GCC Based Compilers has Profiling Feature.It is also a good IDE Targeted for C/C++ Development.Dev-C++ supports GCC Based Compilers ,has Code Completion Feature and has Inbuilt Profiling.
Code::Blocks is a free C/C++ IDE which is Open-source and Cross Platform.The main feature its ability to maintain the look and feel across different platforms.It also has Plugin Support to extend the usability.
Selection sort is said to be an efficient algorithm when considering small computations involving limited memory/resource but it is quite inefficient when compared to other techniques when huge computations are required.Selection sort is said to be efficient for small list of items because of its simplicity.
The following steps Explains the working of the Selection sort Algorithm
Obtain the Item with the Minimal value from a List/Collection of items
Swap the item with the Item in the first position of the Collection/List
Repeat the Process for the rest of the Items in the Collection
The Following is the Complete Program Source Code in Java for Implementing Selection Sort Algorithm
import java.io.*;
import java.lang.*;
class array
{
DataInputStream get;
int a[];
int i,j,n;
void getdata()
{
try
{
get=new DataInputStream(System.in);
System.out.println("Enter the limit");
n=Integer.parseInt(get.readLine());
a=new int[n];
System.out.println("Enter the elements in the array");
for(i=0;ia[j])
{
temp=a[i];
a[i]=a[j];
a[j]=temp;
}
}
}
System.out.println("Elements in ascending order is:");
for(i=0;i=0;i--)
System.out.print(" "+a[i]);
}
}
class selectionsort
{
public static void main(String arg[])
{
array obj=new array();
obj.getdata();
obj.sorting();
}
}
RAR Files are common format for compression.It is likely that you forget a Encrypted RAR Password. RAR Files are secured by strong encryption so it is not easy to recover lost RAR File Passwords.
This Tutorial will teach you how to recover lost RAR File Passwords using a technique called Brute-Force Attack.In this method random passwords of varying length are checked againt the Encrypted Winrar Archive untill the correct password is obtained.This is similar to a person checking possible password,.
Follow these Simple Steps to Recover your Lost RAR File Passwords
2.Open the Encrypted Archive in RAR Password Recovery
3.Click on the Brute Force Tab and specify the settings,the default settings will check passwords ranging from 0-9 characters and a-z alphabets you can change this.
4.Click on Start Button to start recovery.Once the password is found you will be shown a window with the password
Quick-sort is a sorting technique commonly called divide and conquer algorithm. Quick-sort first divides a large array of items into two smaller arrays : the low items and high items(ie:all elements in first array is less than all elements in second).
Quick sort algorithm involves three steps
An n element, called a pivot is picked from the array.Pivot is commonly the middle element of the array
Rearrange the array elements such that all elements less than the pivot come before the pivot and all elements greater than the pivot come after the pivot,this step is called array partitioning
Then a recursive sorting of the partitioned arrays is done individually
Following is the complete source code for Quick-sort program in Java.
'IF -ELSE' Statement is commonly used in all programming languages to implement various logical operations. The control flows by checking a specific condition-if('cond) then expression if the condition is not satisfied the control flows to the else statement else-expression.
Parsing if-else statement is done by definitions of a grammar which uses Regular expressions.Compiler construction tools Flex(Lex) and Bison(Yacc) in Linux(Ubuntu) are used to define the grammar and basic operations .On compilation a c program is generated which is actually the parser for 'IF-ELSE' statement.A parser generates a Parse tree for Intermediate code generation.
Following are complete source codes for Flex and Bison programs to create a Parser for 'IF-ELSE' Statement which accepts valid 'IF-ELSE' Statements
/*PARSER FOR IF ELSE STATEMENT*/
//c-madeeasy.blogspot.com
/*YACC PROGRAM*/
%{
#include<stdio.h>
#include<stdlib.h>
%}
%token num alpha LT GT EQ LE GE NE AND OR INC DEC END
%left '+''-'
%left '*''/'
%right '^'
%right '='
%nonassoc UMINUS
%nonassoc IF
%nonassoc ELSE
%left GE NE LT GT LE EQ
%left AND OR
%%
S:ST END{printf("\n Accepted\n");exit(0);}
ST:IF'('F')''{'ST'}'%prec IF
|IF'('F')''{'ST'}'ELSE'{'ST'}'
|E';'
|E';'ST
F:C LO C
|C
LO:AND
|OR
C:E RELOP E
|E
E:alpha '='E
|E'+'E
|E'-'E
|E'*'E
|E'/'E
|E'^'E
|'('E')'
|'-'E %prec UMINUS
|alpha
|num
|alpha INC
|alpha DEC
RELOP:LT
|GT
|EQ
|LE
|GE
|NE
;
%%
#include"lex.yy.c"
int main()
{
yyparse();
yylex();
return END;
}
yyerror(char *s)
{
printf("\nError");
}
/*LEX PROGRAM*/
%{
#include"pgm4.tab.h"
%}
%%
"if" {return IF;}
"else" {return ELSE;}
"&&" {return AND;}
"||" {return OR;}
"<=" {return LE;}
">=" {return GE;}
">" {return GT;}
"<" {return LT;}
"!=" {return NE;}
"++" {return INC;}
"--" {return DEC;}
"==" {return EQ;}
[0-9]+ {return num;}
[a-zA-Z]+ {return alpha;}
[\t];
[\n];
"$" {return END;}
. {return yytext[0];}
%%
/*OUTPUT
if(i>0)
{
a=0;
c++;
}
else
{
h;
}
$
Accepted
if(a>l)
{
w;
}
$
Accepted*/
The Source Codes Published in this Blog can be used freely for Educational purposes but should not be reproduced on any other Blog or Website without the consent of the author.