Saturday, 27 December 2014

How to add border outside a form in html ?

 and Tag

.here's the same form as above using the commands we'll hit today.

Step One: Personal InformationName: 
Email: 
Step Two: FavoritesFavorite Color: Red:  Blue:  Green: 
Favorite Toothpaste: Crest:  Close-Up:  Gleem: 
Step Three: Send it


The Tags

Take a good long look at the form above. You should be able to get it, and this text, on your screen at the same time. Notice that I grouped elements together by drawing a lined box around them. Remember that you can place as many form elements inside the lined box you want. The elements will react to HTML just like they always did, it's just that you've drawn a line around them.
In addition to the line, I've added a title in bold. The title text is placed in the upper left hand of the lined box by default. I used tags to make the text bold. Now the tags:
drew the lined box. set the title.
You can pretty much take it from here, but let's take a look at the code that created the first little section that surrounds the two text boxes:

Step One: Personal Information
Name:
Email:
draws the lined box. sets the title.
Follow that pattern again and again grouping form elements as you wish. No sweat.

Use A Table Too

I know this reads like it is in direct contradiction to what I wrote about tables and forms up above, but hear me out. Notice how the FIELDSET table is confined to only 375 pixels wide. It is that way because I surrounded the entire form with a single table cell with the width set to 375. Please note that I said a single table cell. That's the key.
It was done purely for aesthetics. If you don't surround the form with a table cell, the lined box runs the length of the browser screen. If there's a way to stop the box from doing that without using a table cell, I couldn't find it. Even examples on the MSIE site showed a table being used to confine the width of the box. My reference book suggests that the attributes ALIGN and WIDTH work with the FIELDSET tag. I tried to get them to work time and time again. No dice.
Maybe you'll have more luck. Enjoy the commands.

Sunday, 16 November 2014



What Is Multi-core Processor?


multi-core processor is a single computing component with two or more independent actual central processing units (called "cores"), which are the units that read and execute program instructions.
 at the same time, increasing overall speed for programs amenable to parallel computing. Manufacturers typically integrate the cores onto a single integrated circuit die (known as a chip multiprocessor or CMP), or onto multiple dies in a single chip package.

Multicore processors may have:

  1.  two cores (dual-core CPUs, for example AMD Phenom II X2 and Intel Core Duo)
  2.  four cores (quad-core CPUs, for example AMD Phenom II X4, Intel's i5 and i7 processors)
  3.  six cores (hexa-core CPUs, for example AMD Phenom II X6 and Intel Core i7 Extreme Edition 980X)
  4. eight cores (octo-core CPUs, for example Intel Xeon E7-2820 and AMD FX-8350)
  5. ten cores (for example, Intel Xeon E7-2850), or more

Saturday, 15 November 2014

How to configure gcc in Notepad++ for C11


Configuring notepad++ to compile and execute C programs using gcc:

Notepad++ is a free open source editor that supports several languages. It is popular for its user friendly, higher execution speed and less size. It is developed for windows environment in C++. It consumes lower memory and CPU power. It can be used to write, test and execute programs of different languages. Now we will see how notepad++ can be configured to compile and execute C programs using gcc.
Step1: Download and install the latest version of notepad++ from its official website www.notepad-plus-plus.org for free of cost
Step2: Download and install MinGw gcc as explained in the previous session.
Step3: Configure notepad++ for gcc

Creating C compiler tool in Notepad++

→ Open the notepad++
 Select Run – Run (F5)
creating tools in notepad++
→ Type the following compiler script in “The program to Run” panel
gcc -o "$(NAME_PART)" "$(FULL_CURRENT_PATH)"
gcc is to call compiler
-o is to create executable file with the file name
“$(NAME_PART)” to specify the file name without extension
“$(FULL_CURRENT_PATH)” to specify the current file and its path
For example if we save the file with “hello.c“, then the run command replaces compiler script withgcc -o hello c:\…\…\…\hello.c
Compiling tool in notepad++
 Select save to create short-cut to compiler tool (ctrl+f9)
creating compiler short-cut in notepad++

Create the C execution tool:

 Select Run – Run (F5)
 Type the C program execution script in “The program to Run” panel
"$(NAME_PART)"
Here “$(NAME_PART)” is to specify the file name without extension to call the executable file.
For example if we save the file with “hello.c” then the execution tool replaces the execution tool script with hello
 Select save to create short-cut to execution tool (ctrl+f5)
Creating C execution tool in Notepad++

Executing a C program in Notepad++:

Type the program
1
2
3
4
5
6
#include
int main()
{
  printf("Hello World");
  return 0;
}
C program in Notepad++
Use Ctrl + F9 to compile the program
Use Ctrl + F5 to execute the program
Executing a C program in Notepad++

How to install gcc in Windows


gcc installation on Windows:

gcc is a C compiler implemented by GNU. It is generally available with different flavors of Linux as an inbuilt tool. Now gcc is also available for Windows. MinGW is a project whose goal is to provide runtime, headers and libs to develop window applications using gcc. The official web site of Equation Solution www.equation.com provides gcc compiler for Windows XP (32bit) and Windows 7/8 (64bit) as separate builds. The latest versions of MinGW gcc implement ISO/IEC C11 standards.
Now we will see step by step procedure of installation and usage of MinGW gcc on Windows.
Installation:
Step1: open the site of “Equation Solutions” by clicking on the link ww.equation.com
Select Home – Programming tools – FORTRAN, C, C++ from Navigation Tree
download link of mingGW gcc
Step2: Go down to the page and select proper gcc build according to your platform that is gcc 32bit for Windows XP or gcc 64bit for Windows 7/8.
different builds of mingGW gcc
Step3: Create an installation folder (c:\MinGW)
Step4: Double click on downloaded “gcc setup executable file”
installation of gcc
Step5: Accept the agreement
gcc agrement
Step6: Select “Browse” to select installation folder (Example: c:\MinGW) and  Select “install” to proceed installation in the selected folder c:\MinGW
gcc installation
Step7: Select “finish” to complete installation
finishing installation

Executing C program using gcc:

Step1: Open the text editor “Notepad” by selecting start button, typing notepad in command text field and press enter. In case of Windows XP select start – select run – type notepad – select open
opening notepad in windows 7
Step2: Type the program in the text editor (notepad)
1
2
3
4
5
6
7
8
9
#include
void main()
{
int x,y,z;
x=10;
y=20;
z=x+y;
printf("Sum of two numbers: %d",z);
}
simple c program
Step3: Save the program with .c extension under a particular directory by selecting file – save. Here, I am saving under d:\demo as first.c
saving c program
Close the editor by selecting file – exit
Step4: Open the command prompt to compile and execute the program by selecting start button, typing cmd in command text field and press enter (¿). In case of Windows XP select start – select run – type cmd – select open.
opening command prompt in windows 7
Step5: Compile the program using the C compiler gcc. The compiler translates the source code and produces equalant executable code with the name a.exe (produces a.out in case of Linux). It can be executed by giving its name directly at the command prompt.
d:\>cd demo
d:\demo>gcc first.c
d:\demo>a
gcc on windows
Here there is a problem with the executable file a.exe because the output of gcc for every C program is a.exe. The executable code of current program overwrites the executable code of previous program compiled. If we want to execute the previous program then need to be recompiled.
We can produce different executable files with different names by sending parameter –o to gcc while compiling.
The general form of –o parameter is
Syntax of gcc
d:\>cd demo
d:\demo>gcc -o first first.c
d:\demo>first
gcc on windows
Here option –o generated the executable file with the name “first.exe” instead “a.exe”. It is executed by giving its name at terminal prompt. Like wise we can generate different executable files for different C programs.