Byte Code Vs Machine Code

Posted by Tushar Bedekar
Generally, "machine code" refers to the data that can be executed by a certain computer, while "byte code" refers to data that can be executed by a virtual machine. The virtual machine takes the byte code and produces machine code appropriate for the actual machine it is running on.



Machine Code:-

Machine code or machine language is a set of instructions executed directly by a computer's central processing unit (CPU). Each instruction performs a very specific task, such as a load, a jump, or an ALU operation on a unit of data in a CPU register or memory. Every program directly executed by a CPU is made up of a series of such instructions.


Numerical machine code  may be regarded as the lowest-level representation of a compiled and/or assembled computer program or as a primitive and hardware-dependent programming language. While it is possible to write programs directly in numerical machine code, it is tedious and error prone to manage individual bits and calculate numerical addresses and constants manually. It is therefore rarely done today, except for situations that require extreme optimization or debugging.


Almost all practical programs today are written in higher-level languages or assembly language, and translated to executable machine code by a compiler and/or assembler and linker. Programs in interpreted languages[1] are not translated into machine code however, although their interpreter (which may be seen as an executor or processor) typically consists of directly executable machine code (generated from assembly and/or high level language source code).

Byte Code:-

Byte code, also known as p-code (portable code), is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, byte codes are compact numeric codes, constants, and references (normally numeric addresses) which encode the result of parsing and semantic analysis of things like type, scope, and nesting depths of program objects. They therefore allow much better performance than direct interpretation of source code.

The name byte code stems from instruction sets which have one-byte op codes followed by optional parameters. Intermediate representations such as byte code may be output by programming language implementations to ease interpretation, or it may be used to reduce hardware and operating system dependence by allowing the same code to run on different platforms. Byte code may often be either directly executed on a virtual machine (i.e. interpreter), or it may be further compiled into machine code for better performance
.

Since byte code instructions are processed by software, they may be arbitrarily complex, but are nonetheless often akin to traditional hardware instructions; virtual stack machines are the most common, but virtual register machines have also been built.Different parts may often be stored in separate files, similar to object modules, but dynamically loaded during execution.


Source:-Wikipedia 
Read More

File Input/output In "C" Programming

Posted by Tushar Bedekar

The Standard I/O Library provides similar routines for file I/O to those used  for standard I/O.

The routine getc(fp) is similar to getchar()
and putc(c,fp) is similar to putchar(c).

Thus the statement

            c = getc(fp);

reads the next character from the file referenced by fp and the statement

            putc(c,fp);

writes the character c into file referenced by fp.

       Basic Program me:-

/* file.c: Display contents of a file on screen */

#include <stdio.h>

void main()
{
            FILE *fopen(), *fp;
            int c ;

            fp = fopen( “prog.c”, “r” );
            c = getc( fp ) ;                        
            while (  c != EOF )
            {
                        putchar( c );              
                        c = getc ( fp );              
            }

            fclose( fp );
}

         Description:-

In this program, we open the file prog.c for reading.

We then read a character from the file. This file must exist for this program to work.

If the file is empty, we are at the end, so getc returns EOF a special value to indicate that the end of file has been reached. (Normally -1 is used for EOF)

The while loop simply keeps reading characters from the file and displaying them, until the end of the file is reached.

The function fclose is used to close the file i.e. indicate that we are finished processing this file.

We could reuse the file pointer fp by opening another file.



This program is in effect a special purpose cat command. It displays file contents on the screen, but only for a file called prog.c.
Read More

C File Handling

Posted by Tushar Bedekar
Often it is not enough to just display the data on the screen.This is because if the data is large, only a limited amount of it can be stored in memory and only a limited amount of it can be displayed on the screen.It would be in appropriate to store this data in the memory for one more reason.Memory is volatile(RAM) an its contents are  lost once the program me is terminate. so if we need the same data again it would have t either entered through the key-board again or would have to regenerated pragmatically.obviously both these operations would be tedious.At such times it become necessary to store the data in the manner that can be later retrieved and displayed either in part or in whole.The medium is usually "file" or "disk".


Basic Introduction:- 

We frequently use files for storing information which can be processed by our programs. In order to store information permanently and retrieve it  we need to use files.

Files are not only used for data. Our programs are also stored in files.

The editor which you use to enter your program and save it, simply manipulates files for you.

The Unix commands cat, cp, cmp are all programs which process your files.

In order to use files we have to learn about File I/O i.e. how to write information to a file and how to read information from a file.

We will see that file I/O is almost identical to the terminal I/O that we have being using so far.

The primary difference between manipulating files and doing terminal I/O is that we must specify in our programs which files we wish to use.

As you know, you can have many files on your disk. If you wish to use a file in your programs, then you must specify which file or files you wish to use.

Specifying the file you wish to use is referred to as opening the file.

When you open a file you must also specify what you wish to do with it i.e. Read from the file, Write to the file, or both.

Because you may use a number of different files in your program, you must specify when reading or writing which file you wish to use. This is accomplished by using a variable called a file pointer.

Every file you open has its own file pointer variable. When you wish to write to a file you specify the file by using its file pointer variable.

You declare these file pointer variables as follows:


FILE  *fopen(), *fp1, *fp2, *fp3;


The variables fp1, fp2, fp3 are file pointers. You may use any name you wish.

The file <stdio.h> contains declarations for the Standard I/O library and should always be included at the very beginning of C programs using files.


Constants such as FILE, EOF and NULL are defined in <stdio.h>.

You should note that a file pointer is simply a variable like an integer or character.

It does not point to a file or the data in a file. It is simply used to indicate which file your I/O operation refers to.

A file number is used in the Basic language and a unit number is used in Fortran for the same purpose.

The function fopen is one of the Standard Library functions and returns a file pointer which you use  to refer to the file you have opened e.g.

            fp = fopen( “prog.c”,  “r”) ;

The above statement opens a file called prog.c for reading and associates the file pointer fp with the file.

When we wish to access this file for I/O, we use the file pointer variable fp to refer to it.


You can have up to about 20 files open in your program - you need one file pointer for each file you intend to use. 

For More Sessions Please visit the link Given below:-

                                                                                                                                                                                                                         

                                                           
Read More

Search Engine Optimization In Mobile Phone

Posted by Tushar
In the Present Era Due To the advancement in the technology such smart-phones many of the user make use of internet and are access the internet from their mobile phones and smart phones.so it become necessary for all the webdesigners to improve their Webpage design compatibile for all the mobile phones also i.e webpages must look good when they are being opened in the mobile phones.

Mobile sites not only use a different format from normal desktop sites, but the management methods and expertise required are also quite different. 
Verify that your mobile site is indexed by Search Engine
Search Engine Such As Google And Bing crawl your site before it can be included in our search index. If you just created the site, we may not yet be aware of it. If that's the case, create a Mobile Sitemap and submit it to Search Engine Such as Google And Bing to inform us of the site’s existence. A Mobile Sitemap can be submitted using Webmaster Tools, just like a standard Sitemap.
The crawler for mobile sites Would not Crawel. If you'd like your site crawled, please allow any User-agent to access your site.

Running desktop and mobile versions of your site
Redirect mobile users to the correct version. One of the most common problems for webmasters who run both mobile and desktop versions of a site is that the mobile version of the site appears for users on a desktop computer, or that the desktop version of the site appears when someone accesses it on a mobile device.
For the Solution of the above problem follow as listed below


(1) Redirect mobile users to the correct version
Google notices the relationship between the two versions of the URL and displays the standard version for searches from desktops and the mobile version for mobile searches.
(2) Switch content based on User-agent
Some sites have the same URL for both desktop and mobile content, but change their format according to User-agent. In other words, both mobile users and desktop users access the same URL (i.e. no redirects), but the content/format changes slightly according to the User-agent. In this case, the same URL will appear for both mobile search and desktop search, and desktop users can see a desktop version of the content while mobile users can see a mobile version of the content
Read More

Ram Booster For Android

Posted by Tushar Bedekar
Smart Booster - Free Cleaner - screenshot
The best optimization tool. This is former Smart RAM Booster.


Highlights of Smart Booster:-

► Smart RAM Booster: small widget to adaptively boost RAM from anywhere 
Smart Booster - Free Cleaner - screenshot► Fast cache cleaner: one click to clean cache
► Quick SD Card cleaner: efficiently scan and clean junk created by million apps
► Advanced application manager: optimize your devices by hibernate, disable, auto-start apps



Basic Description:-

Smart RAM Booster
The most beautiful part of this app is a small, configurable widget that places on top of any app and one-click to RAM boost. 
Most of Android devices bundle with limited memory. Android task manager will selectively kill low priority tasks in order to 
reserve memory to higher priority task. That’s not always run at an appropriate time, causing low responsive apps, lagging, 
especially when you launch a new app after heavily browsing web pages. It causes a worse experience.

RAM Booster comes with auto-boost in 4 levels: aggressive, strong, medium, gentle.
☆ Aggressive: kill most of low priority apps
☆ Strong: Kill apps that is low priority as well as consume lightly below an “average”
☆ Medium: kill apps that consumes memory above an “average”
☆ Gentle: kill only apps that uses considerable memory


There are 5 ways to boost:-

☆ Auto-boost: boost automatically under RAM available & timing conditions
☆ Overlay widget – Enable RAM Booster overlay widget (on by default), adjust widget’s position, and tap on widget to boost anytime you want
☆ Home screen widget – one tap to boost (long-press your home screen>Widget to add RAM Booster widget)
☆ Notification bar – one tap to boost (toggle notification bar visibility in app’s setting)
☆ Boost Now – tap this button from app’s main screen

Fast cache cleaner
☆ 1-click to clean cache
Smart Booster - Free Cleaner - screenshot☆ Show detail internal cache and external cache
☆ Select apps that use most cache
Quick SD Card cleaner
☆ Show SD card partition
☆ Scan for junk folder, big files, orphaned files
☆ Nice photo cleaner, music cleaner
☆ Notify for low storage usage
Advanced application manager
☆ Easily backup, uninstall unused apps
☆ App2SD - recommend apps to move to sd card
☆ Hibernate rarely used apps to save battery
☆ Disable system apps
☆ Scan auto-start apps
☆ Manage backup (.apk) files
ram booster, memory booster, battery saver, ram manager, memory manager, boost, faster app, smart battery, task killer, ATK, fast reboot, one tap, 1-click clear cache, floating widget



                                                                                                                                                                                                                           
                                                           

Warning 

  • We are not responsible for any damages that may happened by using this Techniques. 
  • Use this guide at your own risk. We shall not have any liability or responsibility for whatever happens to you and your device by using the instructions in this guide.
  • The instructions provided in this tutorial for educational purpose only. There is no guarantee that these steps will work for your device.
  •  Applying this guide to any other device or any other model may produce many problems.
  • Read and Understand the whole tutorial first, before going to perform the steps.
  • At the same time this content is not to harm any one but it is only for educational purpose.

Source:- Google Play Store

Read More
back to top