Pages

Showing posts with label Unix. Show all posts
Showing posts with label Unix. Show all posts

Sunday 14 September 2014

`gets' function is dangerous how to solve this error and why gets function is dangerous?

  `gets' function is dangerous how to solve this error and why gets function is dangerous?







Never use gets(). Because it is impossible to tell without knowing the data in advance how many characters gets() will
read, and because gets() will continue to store characters past the end of the buffer, it is extremely dangerous to use.
It has been used to break computer security. Use fgets() instead.

so we can use fgets():
In the C Programming Language, the fgets function reads characters from the stream pointed to by stream.
The fgets function will stop reading when n-1 characters are read, the first new-line character is encountered in s, or at the end-of-file, whichever comes first. Then the fgets function will append a null character to the string.

Syntax

The syntax for the C Language fgets function is:

char *fgets(char *s, int n, FILE *stream);
  
s is the array where the characters that are read will be stored.

n is the size of s.

stream is the stream to read.

The fgets function returns s. The fgets function will return a null pointer if an error occurs while trying to read the stream or the end of the stream is encountered before any characters are stored.

In the C Language, the required header for the fgets function is:

#include 
 

#include 
char * fgets(char *restrict s, int n, FILE *restrict stream);
Frightening, no? That’s because fgets() is a file function, which reads text from a file, as in “file get string.” That’s how programmers talk after an all-nighter.
Because the operating system considers standard input like a file, you can use fgets() to read text from the keyboard.
Here’s a simplified version of the fgets() function as it applies to reading text input:
fgets(string,size,stdin);
In this example, string is the name of a char array, a string variable; size is the amount of text to input plus one, which should be the same size as the char array; and stdin is the name of the standard input device, as defined in the stdio.h header file.
THE FGETS() FUNCTION READS A STRING
#include 
int main()
{
  char name[10];
  printf("Who are you? ");
  fgets(name,10,stdin);
  printf("Glad to meet you, %s.\n",name);
  return(0);
}

what is sudo tar -xzf? why it is used?



what is sudo tar -xzf? why it is used?

tar is basically The GNU version of the tar archiving utility for more information on tar got to the terminal and type
man tar
You will find out what exactly xzf is used for. Basically they flags (options) when you run a tar command.
[-]x --extract --get: -z --gzip: -f --file F:
The order of this command does matter though.
Basically your command sudo tar -xzf utorrent-server-3.0-ubuntu-10.10-27079.tar.gz will extract the tar.gz archive that you specify as (utorrent-server-3.0-ubuntu-10.10-27079.tar.gz) and will do so as root privileges.

how to check linux kernel is 32 bit or 64 bit




how to check linux kernel is 32 bit or 64 bit

uname -m. It seems like the uname -m actually gives
x86_64 ==> 64-bit kernel
i686   ==> 32-bit kernel

[ SOLVE] E-FAIL ERROR IN VIRTUAL BOX or VM ORACLE MACHINE



[ SOLVE] E-FAIL ERROR IN VIRTUAL BOX or VM ORACLE MACHINE


Runtime error opening 'C:\Users\COMPUTER_NAME\.VirtualBox\Machines\VM_NAME\VM_NAME.xml' for reading: -102 (File not found.).
D:\tinderbox\win-3.2\src\VBox\Main\MachineImpl.cpp[665] (Machine::registeredInit).
Result Code:
E_FAIL (0x80004005)
Component:
VirtualBox
Interface:
IVirtualBox {3f36e024-7fed-4f20-a02c-9158a82b44e6}



SOL:
I went into the folder "C:\Users\COMPUTER_NAME\.VirtualBox\Machines\VM_NAME\" and saw two xml files but for some reason they both had suffixes.
1. VM_NAME.xml-prev
2. VM_NAME.xml-tmp
So it simply just couldn't find "VM_NAME.xml" because it technically didn't exist.
I made a copy of the "VM_NAME.xml-prev" file and renamed the copy to "VM_NAME.xml"
Restarted VirtualBox and it worked just fine.
S0L2:
UPDATE VM AUTOMATICALLY  SOLVE THE ISSUE.

Friday 5 September 2014

what is the difference between and "stdio.h"

what is the difference between

    and "stdio.h"

 

#include"ownheader.h"(own headerfile):

                  compalier will be  look  like as a local directory

#include:

                compalier searches as a standard libraries with in the system.



Saturday 14 June 2014

BEST FREE PREMIUM BLOGGER TEMPLATES DOWNLOAD

BEST FREE PREMIUM  BLOGGER TEMPLATES DOWNLOAD :

TYPE OF TEMPLATES:VIDEO,PREMIUM,PROFESSIONAL

 

video setup professional blogger template download

                                                 LIVE DEMO AND DEMO  CLICK HERE


 

                           


BlogTube Video Blogger template download

                                     LIVE DEMO AND DEMO  CLICK HERE

 

 

download sky blue free premium blogger template

                                     LIVE DEMO AND DEMO  CLICK HERE

 

 

GoGreen blogger template download

                          LIVE DEMO AND DEMO  CLICK HERE

 

 

Blue Blog blogger template download

                           LIVE DEMO AND DEMO  CLICK HERE

 

  


canyon blogger template download

                               LIVE DEMO AND DEMO  CLICK HERE

 


bs xtreme blogger template download

                                 LIVE DEMO AND DEMO  CLICK HERE

 

 


word plus blogger template download

                            LIVE DEMO AND DEMO  CLICK HERE

 

 

 


 .............................HIGHLANG.BLOGSPOT.COM.......................................................

 

 

 

 

 

 

 

 

 

 

 

 

Thursday 3 April 2014

Free XUS Pc Lock Software Download here ( include crack)

XUS PC Lock offers a new and fun way for you to lock your computer. Before using XUS PC Lock, you have to define your lock pattern. The next time you will see the lock screen, You trace your mouse in the pattern you drew before and your computer will unlock. Any other pattern and in any other order will not unlock the computer. XUS PC Lock can lock the whole computer. This is the most feature rich lock computer application available today with lots of customization options. XUS PC Lock is the ultimate customizable lock computer application allowing you to pick custom images for the lock screen. XUS PC Lock can auto-lock the computer when windows startup and computer inactivity. XUS PC Lock allows you to set an alert mode when the incorrect pattern is entered a maximum times. If you want to lock your computer as lock a touch smartphone, Please try our XUS PC Lock. It is really awesome!

IMPORTANT REMINDER: 1. Please don’t forget your lock pattern! 2. It’s best if you’ll also set a password in your computer for maximum security.

Benefits & Features


* A new & fun way for you to lock your computer.
* Support Multiple Monitors.
* Anti Key-Logger. XUS Dynamic Password Technology makes your computer more secure.
* The funniest, most customizable way to lock your computer!
* Have 3 built-in patterns: 3x3, 4x4, 5x5 you can choice.
* Locking and Unlocking animation effect.
* Be able to disconnect internet access when system is locked.
* Back up pattern feature.
* Auto-lock the computer when Windows startup or in idle mode.
* Set a timer to turn off monitor automatically.
* Show Time and Date on locked screen.
* Make your computer has Windows 8's lock feature.
* Alert if the incorrect pattern is entered a maximum times. Completely customizable.
* Custom background image, and lots of customization options for the look of the locked screen.

click here download

Sunday 29 September 2013

INTRODUCTION TO JAVA AND JAVA EDITIONS AND NUMBER SYSTEMS IN JAVA


java

HISTORY OF JAVA AND DOWNLOAD(PDF)


what is java:
            java is a object oriented,platform independent programming language from sun micro system which is released into the marked on the name of development of the distributed applications.
 what is java slogan:
                      "Write Once Run Anywhere "(WORA)
java is a platform independent programming language.it means that program is written once and the program is executed irrespective of the operating system.
 why java is suitable for internet:
     security problems on internet are eliminated through java.java is a system independent,java is executable on any platform
JAVA HISTORY:
  IN 1990,sun microsystems inc., USA is developed software for remotes..in 1993,oak language is developed,by that time some company is registered oak name,for this reason they named as "java".
in 1995,sun world conference has given entire details of java.

javajavajava software all copy rights are purchased oracle



CLICK HERE DOWNLOAD PDF DOCUMENT 


java editions:


Sun micro systems provides ,with the advent of java,new versions had multiple configurations built for different types of platforms.those are
  • JSE
  • JEE
  • JME.
JSE:java platform,standard edition:
JSE stands for java platform,standard edition,it is specification used to develop fundamental
java application they may be standard or network.

JEE:java platform,enterprise edition:

 JEE stands for java platform, enterprise edition,it is specification used to develop business
solutions for network (or)JEE is specification that provides an environment to run the web components and the enterprise components.

 JME:java platform,micro edition:
JEE stands for java platform, micro edition,it is specification used for developing wireless and
embedded system.embedded system is software,which directly installed into hardware.
java software:
             java software is cotegorized in to two types
                JAVA=JDK+JRE
  JDK
           it stands for java development kit
JRE:
          it stands for java runtime environment 
          JRE=JVM+JAVA LIBRARY

if java programs have to run we required the jvm and java library.jvm will starts execution of java
program from main method only.
  • in java every statement must end with semi colon(;).
  • java is case sensitive programming language.
In this real world we have 4 types of number systems they are:
1.binary number system           [format:0,1]
2.octal number system             [format:0,1----7]
3.decimal number system        [format:0,1-----9]
4.hexa decimal system             [format:0,1---9,a,b,c,d,e,f ] 
genarally we use the decimal number system in any programming language.

  In java we can represent the binary values by giving ob infront of the number
ex: int ob10;(correct)
     int x=o4235;(wrong)

representation of the binary number feature is introduced in java 1.7


we can represent the octal values in java programming language by giving o infront of the number
ex: int i=o24;(correct)
        int k=o248;(wrong)[because octal range 0-7]

we can represent the hexa decimal values in java programming language by giving ox infront of the number
ex: int i=ox123;(correct)
        int k=ox245a;(wrong)
         int k=123a;(wrong)

note:JVM takes the binary data ,octal data,decimal data,hexa decimal data convert in the form of decimal format and give the output as adecimal
example programme:
  class ndemo
{
public static void main(String args[])
{
  int i=24;
int j=o72;
int k=ox2a;
int l=ob10;
System.out.println(i);
System.out.println(j);
System.out.println(k);
System.out.println(l);
}
}
note:this programme run java 1.7 or above versions because binary values format does not suppport java 1.7 below versions.
output:
24
58
42
2

Monday 20 May 2013

C LANGUAGE INTRODUCTION

The only way to learn a new programming language is by writing programs in it. The first program to write is the same for all languages:
Print the words:hello, world

In C, the program to print ``hello, world'' is
#include
main()
{
printf("hello, world\n");

}
Just how to run this program depends on the system you are using. 

complie the program click the alt+F9.and dispaly errors and warning.errors and warnings must be zero and next run the program click ctrl+F9 to display the output
As a specific example, on the UNIX operating system you must create the program in a file whose name ends in ``.c'', such as hello.c, then compile it with
the command
cc hello.c
If you haven't botched anything, such as omitting a character or misspelling something, the compilation will
proceed silently, and make an executable file called a.out. If you run a.out by typing the command
a.out
it will print
hello, world

ANOTHER EXAMPLE:
An example of simple program in C
#include
int main(void)
{
          printf(“HAI HOW ARE YOU\n”);
          printf(“FINE ”);
          printf(“you know the trick\n”);
          return(0);
 
The previous program will produce the following output on your screen 
 HAI HOW ARE YOU
 FINE you know the trick
 
a C program line begins with # provides an instruction to the C preprocessor
It is executed before the actual compilation is done.
Two most common directives :
#include
#define 
In our example (#include) identifies the header file for standard input and output needed by the printf().
 
Identify the start of the program
Every C program has a main ( )
'main' is a C keyword.  We must not use it for any other variable
 
Identify a segment / body of a program
The start and end of a function
The start and end of the selection or repetition block.
Since the opening brace indicates the start of a segment with the closing brace indicating the end of a segment, there must be just as many opening braces as closing braces  (this is a common mistake of beginners) 
 
Each statement in C needs to be terminated with semicolon (;) 

Each statement in C needs to be terminated with semicolon (;)