Thursday, 4 June 2015

JIT (Just-In-Time) Compiler

JIT (Just-In-Time) Compiler

JIT compiles the IL code to Machine code just before execution and then saves this transaction in memory. 

---------------------------------------------
JIT compiler compiles is the integral part of CLR. the MSIL code to Native code and executes the batch of code Just in time which will be cached and next time when the code gets executed from cache in stud of compiling again.

JIT Execution process.
CLR class loader lodes MSIL code and metadata are loaded into memory; the code manager calls the entry point method which is WinMain or DLLMain method. The JIT compiler compiles the method to before its execution of the entry point method. The code manager places the objects in memory and controls the execution of the code. The garbage collector performs periodic checks on the managed heap to identify the objects which is not in use for the application.
At the time of program execution the type checker ensures that all objects and values, and the references of objects and values has its valid type. The type checker also makes sure that only valid operations are performed on the code other wise the exception will be thrown. The code is controlled by CLR at run time. CLR enforces security in following manner.
  • To control and access the system recourses like hard disk
  • To control and access the network connections
  • To control and access the other hard ware resources. 

------------------------------------------- 
A Web Service or Web Forms file must be compiled to run within the CLR. Compilation can be implicit or explicit. Although you could explicitly call the appropriate compiler to compile your Web Service or Web Forms files, it is easier to allow the file to be complied implicitly. Implicit compilation occurs when you request the.asmx via HTTP-SOAPHTTP-GET, or HTTP-POST. The parser (xsp.exe) determines whether a current version of the assembly resides in memory or in the disk. If it cannot use an existing version, the parser makes the appropriate call to the respective compiler (as you designated in the Class property of the .asmxpage).
When the Web Service (or Web Forms page) is implicitly compiled, it is actually compiled twice. On the first pass, it is compiled into IL. On the second pass, the Web Service (now an assembly in IL) is compiled into machine language. This process is called Just-In-Time JIT compilation because it does not occurs until the assembly is on the target machine. The reason you do not compile it ahead of time is so that the specific JITter for your OS and processor type can be used. As a result, the assembly is compiled into the fastest possible machine language code, optimized and enhanced for your specific configuration. It also enables you to compile once and then run on any number of operating systems.How JIT Works?
Before MSIL(MS Intermediate Language) can be 
executed, it must converted by .net Framework Just in time (JIT) compiler to 
native code, which is CPU specific code that run on some computer architecture 
as the JIT compiler. Rather than using time and memory to convert all the MSIL 
in portable executable (PE) file to native code, it converts the MSIL as it is 
needed during execution and stored in resulting native code so it is accessible 
for subsequent calls.

The runtime supplies another mode of compilation called install-time code 
generation. The install-time code generation mode converts MSIL to native code 
just as the regular JIT compiler does, but it converts larger units of code at a 
time, storing the resulting native code for use when the assembly is 
subsequently loaded and executed. As part of compiling MSIL to native code, code 
must pass a verification process unless an administrator has established a 
security policy that allows code to bypass verification. Verification examines 
MSIL and metadata to find out whether the code can be determined to be type 
safe, which means that it is known to access only the memory locations it is 
authorized to access.
JIT Types:
In Microsoft .NET there are three types of JIT (Just-In-Time) compilers which are Explained as Under: 

  • Pre-JIT Compiler (Compiles entire code into native code completely)
  • Econo JIT Compiler (Compiles code part by part freeing when required)
  • Normal JIT Compiler (Compiles only that part of code when called and places in cache


untitled.bmp

Description:

  • Pre-JIT COMPILER

    Pre-JIT compiles complete source code into native code in a single compilation cycle. This is done at the time of deployment of the application.
     
  • Econo-JIT COMPILER:

    Econo-JIT compiles only those methods that are called at runtime. However, these compiled methods are removed when they are not required.
     
  • Normal-JIT COMPILER:

    Normal-JIT compiles only those methods that are called at runtime. These methods are compiled the first time they are called, and then they are stored in cache. When the same methods are called again, the compiled code from cache is used for execution.

    These methods are compiled the first time they are called, and then they are stored in cache. When the same methods are called again, the compiled code from cache is used for execution.

Tuesday, 12 May 2015

How Internet Search Engines Work

How Internet Search Engines Work


"Spiders" take a Web page's content and create key search words that enable online users to find pages they're looking for.

Web Crawling

When most people talk about Internet search engines, they really mean World Wide Web search engines. Before the Web became the most visible part of the Internet, there were already search engines in place to help people find information on the Net. Programs with names like "gopher" and "Archie" kept indexes of files stored on servers connected to the Internet, and dramatically reduced the amount of time required to find programs and documents. In the late 1980s, getting serious value from the Internet meant knowing how to use gopher, Archie, Veronica and the rest.
Today, most Internet users limit their searches to the Web, so we'll limit this article to search engines that focus on the contents of Web pages.
Before a search engine can tell you where a file or document is, it must be found. To find information on the hundreds of millions of Web pages that exist, a search engine employs special software robots, called spiders, to build lists of the words found on Web sites. When a spider is building its lists, the process is called Web crawling. (There are some disadvantages to calling part of the Internet the World Wide Web -- a large set of arachnid-centric names for tools is one of them.) In order to build and maintain a useful list of words, a search engine's spiders have to look at a lot of pages.
How does any spider start its travels over the Web? The usual starting points are lists of heavily usedservers and very popular pages. The spider will begin with a popular site, indexing the words on its pages and following every link found within the site. In this way, the spidering system quickly begins to travel, spreading out across the most widely used portions of the Web.
Google began as an academic search engine. In the paper that describes how the system was built, Sergey Brin and Lawrence Page give an example of how quickly their spiders can work. They built their initial system to use multiple spiders, usually three at one time. Each spider could keep about 300 connections to Web pages open at a time. At its peak performance, using four spiders, their system could crawl over 100 pages per second, generating around 600 kilobytes of data each second.
Keeping everything running quickly meant building a system to feed necessary information to the spiders. The early Google system had a server dedicated to providing URLs to the spiders. Rather than depending on an Internet service provider for the domain name server (DNS) that translates a server's name into an address, Google had its own DNS, in order to keep delays to a minimum.
When the Google spider looked at an HTML page, it took note of two things:
  • The words within the page
  • Where the words were found
Words occurring in the title, subtitles, meta tags and other positions of relative importance were noted for special consideration during a subsequent user search. The Google spider was built to index every significant word on a page, leaving out the articles "a," "an" and "the." Other spiders take different approaches.
These different approaches usually attempt to make the spider operate faster, allow users to search more efficiently, or both. For example, some spiders will keep track of the words in the title, sub-headings and links, along with the 100 most frequently used words on the page and each word in the first 20 lines of text. Lycos is said to use this approach to spidering the Web.
Other systems, such as Alta-vista, go in the other direction, indexing every single word on a page, including "a," "an," "the" and other "insignificant" words. The push to completeness in this approach is matched by other systems in the attention given to the unseen portion of the Web page, the meta tags.  Learn more about meta tags on the next page.

Monday, 11 May 2015

15 Simple Things That Still Make You Happy

15 Simple Things That Still Make You Happy.

No matter how Old or Rich or Awesome or Famous you become, these 15 of the simplest things from everyday are bound to bring a smile to your face.
Life is full of surprises and surprisingly simple pleasures that money cannot buy. Well, technically money can buy most of them but that’s really not the point here. Real happiness is getting something when you least expected it. In all honesty, we all age.. But seldom do we grow up. And when it comes to the instances below we think it’s safe to assume that we all find a little bit of joy in most of the situations.

1). Mother Serving Your Favorite Food

1). Mother Serving Your Favorite Food
No matter how expensive the restaurant, no matter how critically acclaimed its chef, no matter how delicious the food… It will never ever in a friggin gazillion years come close to our mother’s ghee laden ‘Aloo ka parathas’ … Period!!

2). Driving Alone On An Open Stretch Of Road

2). Driving Alone On An Open Stretch Of Road
We've all done that... You see an open stretch of empty road, put on your favorite song and sing your heart out. Where else can you get this joy?

3). Finding Money In Your Jeans Pocket

3). Finding Money In Your Jeans Pocket
Too much month at the end of your money? Wondering how to survive that one day until payday? ... Imagine finding a 500rupee in your jeans pocket!! What worldly pleasure can match that feeling?

4). Someone says, "I'll pay for you."

4). Someone says, "I'll pay for you."
What is better than beer? ... Free Beer!!! We all love it, don’t we? That one statement which puts a evil sly grin of content on our faces! What is the fun in buying your own beer!!

5). Realizing Someone Is Flirting With You.

5). Realizing Someone Is Flirting With You.
This one applies only to guys. Plainly because guys are normally the one’s chasing the women and not the other way around. It is not a everyday thing which is what makes it so special.

6). Jukebox Plays A Song You Know

6). Jukebox Plays A Song You Know
Friends have dragged you into a place which usually plays drab music. Something you don’t listen to and cannot associate with. But then suddenly the jukebox plays a tune you know or maybe a part in that long lyrical charade and this is exactly how you react.

7). Leaving From Work Early

7). Leaving From Work Early
Life is about finding those small packets of happiness even if it is something as simple as leaving from work an hour earlier!!

8). Someone You Like Gives You A Hug

8). Someone You Like Gives You A Hug
There is no better feeling in this world than getting a warm hug from the one you like.

9). Be In An Elevator With Hot Women/Men

9). Be In An Elevator With Hot Women/Men
Now that is a fantasy every man/woman is bound to have. We wish for these moments of glee in our otherwise uneventful life. Caught in a lift with hot women/men around, Bumping into an old fling, Sitting next to a beautiful/hot woman/man on the bus ride to work!!

10). Unwraping A Gift

10). Unwraping A Gift
It doesn't matter how old we are. Getting a gift and the suspense of unwrapping it turns us into adolescent young boys and girls. And that will never change!!

11). Bubble Wrap!

11). Bubble Wrap!
Need I say more?? It just doesn't and never will be a childish thing to do. You see bubble wrap and the first reflex is to grab the biggest sheet of it.

12). When You Have A Friend You Can Get Weird With

12). When You Have A Friend You Can Get Weird With
We love that 'One' friend we can get weird with. He not only understands us but shares our craziness!!

13). Meeting A Long Lost Friend

13). Meeting A Long Lost Friend
You know that person; you grow up together, literally shared everything in life together but eventually lost touch growing up. And one fine day, you meet him in the most unexpected way. Happiness?

14). Gossiping About Someone You Hate.

14). Gossiping About Someone You Hate.
It doesn’t matter if you’re a man or a woman… Both love to gossip and bitch about the one they hate. A sly form of happiness but happiness nonetheless!

15). Petrichor. 

15). Petrichor. 

Friday, 3 April 2015

20 Places You Need to Visit In India With Your Best Friend

1. Pangong Lake, Ladakh

m_12711370323_226128592d_o
Image Credit: Amit Rawat – Flickr
Transporting you to an ethereal place, the Pangong Lake is located in Ladakh. This is a place where unblemished azure water is fringed by rugged mountains while cotton candy clouds float above. Feel the serenity and magic envelope you!
[Also find out other places to visit in Ladakh]

2. Rafting and Camping in Rishikesh

14485312973_9c34147da8_z
With bursting of vitality and eagerness, twenties is the best time to indulge in adventure sports. Ride the mystical waters of Ganges with rafting in Rishikesh, which is the most famous place for this adrenaline pumping sport. For, you get to raft upon fierce frothing water pouring through rocky terrains and green stretches. To experience the landscape of this mysterious place you can also go camping and undertake other adventure sports.

3. Living Root Bridges, Meghalaya

m_7344205654_b9bc34f275_o
Image Credit: Ashwin Kumar – Flickr
What seems to appear straight out of a fantasy movie, the Living Root Bridges have to be seen to be believed! Some of these roots are more than hundred feet long and are strong enough to carry the weight of fifty people at one time. Located in Meghalaya, they are part of the UNESCO World Heritage Site.

4. Chadar – The Frozen River Trek

m_13495321073_3fa5afdd43_k
Image Credit: Christophe Roudet – Flickr
How often does one boast about walking on a frozen river in a dreamlike destination? Stamped as one of the most thrilling experiences for an adventure aficionado, the Chadar trek route connects villages in the Zanskar valley deep in the mountains with Chilling and the frozen Zanskar River.
m_13495185273_16d44a9080_k
Image Credit: Christophe Roudet – Flickr
Bringing back the vigour of younger days, the once-in-a-lifetime experience will make you come across breathtaking sights. It also gives you the much needed nudge to be physically fit before you even get there.

5. Andaman Islands, Scuba Diving Exploring the Coral Reefs

m_Diver-with-fish-by-Tim-Proffitt-White
Image credit: Tim Proffitt-White
If the white sandy beaches and pristine blue beaches have excited you, be prepared to be awe stricken as you witness what the waters of Andaman hold for you! The rich reefs will surprise you with their varied offerings. Colourful fish, sunken ships, prismatic sea life and some steeply undulating hills of raven volcanic lava, makes for an unusual diving experience. Think of this experience as that of getting a view of heaven underwater while experiencing one of the most remote places in India.

6. Manali-Leh Road Trip

m_Henrik-Johansson-As-our-worlds-collide
Image credit: Henrik Johansson
The ‘Mecca’ of all road trips in India, the Manali-Leh Highway has always been a favourite. Be it for the groups or solo travellers, this route outshines any other backpacking trips in India. All -you need to do: get geared up for some adventure, hit the road and reach nowhere! Passing mountains and villages, passing people who are going about their business in a more simple way what will get you appreciate both nature and simplicity.

7.  Manali, Himachal Pradesh

m_Over-the-hills-and-far-away-by-Leo-setä
Image credit: Paul Bratcher
Let your imagination take flight as you look at nature in its entire splendor. Be treated to a spectacular view of the Solang Valley as you soar in the sky. In seconds you’ll have your adrenaline rush and you’ll be spellbound by the spectacular sight you’ll behold. Go for paragliding in Manali and you will find one of the best ways to disconnect from the world.

8. Rann of Kutch, Gujarat

m_Kutch1
Image Credit: Anurag Agnihotri – Flickr
Imagine nothingness and then imagine it some more! Being one of the remote places in India and the largest salt desert in the world, the Rann of Kutch comes to life somewhere in October as the otherwise watered locale begins to dry up. Try making it to Kala Dungar (Black Hill) and experience a panoramic view from 458 meters above sea level.

9. Sandakphu, Darjeeling

m_2431086854_c79cce80a0_o
Image Credit: Nicolas Mirguet – Flickr
Among the 5 highest peaks in the world, Sandakphu makes for a dreamy location. Surreal natural beauty and spectacular views define this place. It is here one can spot around 600 myriad orchid-varieties and a remarkable diversity in nature which is not found anywhere else in the world.

10. Ganapatipule Beach, Maharashtra

m_5479175778_340d42170d_o
Image Credit: Hasnain Ali – Flickr
A hidden treasure of Maharashtra, we suggest that you visit Ganapatipule Beach before commercialization takes over. The ride on the way too is a delightful one. When at this sandy retreat, treat your eyes to 6km of unbridled clean sand flanked by greens of the cliff on one side and blues of the Arabian Sea on the other. Some hotels have opened up for accommodation. Those looking for a bit of entertainment can enjoy camel rides as well as water sports.


11. Tsomgo Lake, Sikkim

m_4304262038_77bbdea5bb_b
Image Credit: dacookieman
Lakes at high altitudes always make for fantastic viewing. That’s what Tsomgo Lake is too. The lake is situated at an altitude of more than 12,000 feet above sea level. The lake gets its water from the melting ice of the surrounding glaciers. About 40km from the capital city of Gangtok and 5km from the Chinese border, you need to take an arduous trek to the lake. Despite the hardships involved, the trek to the lake is truly worth it!

12. Tawang Town, Arunachal Pradesh

VISIT-TO-SELA-LAKE-TAWANG-LOC-NEAR-CHINA-BORDER-BOMDILA-ARUNACHAL-PRADERSH-INDIA-127-by-rajkumar1220
Image credits: rajkumar1220
Moving onto the North Eastern part of India, you will find one of the most serene and magnificent hill stations. Tawang, a sparsely populated hill town in Arunachal Pradesh also outshines other hill stations in India. Azure sky, lofty clouds, snow clad peaks and stunning views of the hills, mountains and the valleys make it a pristine hill station to visit in India.

13. Caves of Meghalaya

Long-and-dark..-by-Seema-Krishnakumar1
Image credit: Seema Krishnakumar
An exhilarating adventure in Meghalaya include exploring the many caves, this beautiful terrain has to offer! Laced with magnificent caves like Krem Mawmluh, Krem Phyllut, Krem Liat Prah, Mawsynram, Mawsmai and Siju, this North-Eastern state also has some of the hidden marvels. Natural formations, scenic hills and the mesmerizing beauty of the valleys make for an interesting backdrop to explore the interesting flora and fauna of the region. Come Meghalaya, discover one of the most remote places in India.

14. Rajasthan, Dune Bashing

dune-bashing-6
Don’t miss out on a quintessential rustic desert experience when in Rajasthan. The best regions of Rajasthan for a typical desert safari are Osian, Bikaner and Jaisalmer. You get to travel to some remote places of Rajasthan during the desert safari and explore some interesting ruins of the place. There is a story associated with the ruins and forts of Rajasthan, stories that captivate you from the word go.

15. Almora, Uttarakhand

Almora-view-by-Allan-Hopkins
Image credits: Allan Hopkins
Almora; the perfect meeting ground of culture, history, heritage and natural beauty, is located in the Kuamon region of Uttarakhand. Situated in one of the eastern corners of Uttarakhand, it is the home to some of the notable temples like Nanda Devi, Asht Bhairav, Rudreshwar Mahadev Temple and many more.

16. Havelock Island, Andaman

m_4578123298_71bab9ab3a_z
Image Credit: Sankara Subramanian
Havelock Island is one of the largest islands of Andaman and Nicobar, spread across an area of about 113.93 square kilometers. A trip here is riveting, with its lush greenery and azure waters. There are quite a few fantastic diving and snorkelling sites in Havelock, which make it a great place for avid divers.

17. Khajjiar, Himachal Pradesh

m_170259657_11fe6f7fba_z
This beautiful place bears a very striking resemblance to Switzerland’s topography, the well-known romanticizing location. Khajjar is located at the foot of Dhauladkar, in the lap of Himalayas and is 2000 meters above sea level.

18. Roopkund Trek, Himalayas

8789906030_55d74a847f_o
Image Source: Soham Sarkar – Flickr
Become one with nature and experience serenity with the Roopkund Trek, Himalayas. This trail provides an all-encompassing experience and visions of snow, ice, gushing streams, untouched forests, delightful stretches of meadows and scenic camping places. Need we say more?

19. Wagah Border

6753225-Wagah_Border_Flag_Lowering_Ceremony_Lahore_Lahore
Get a feel of patriotism and nationality at a younger age. Head to Wagah Border which is on the only crossing road border of Punjab and Pakistan. Celebrate along with thousands the extravagant ceremony that occurs here every day before the sun sets.

20. Indian Ghost Town of Bhangarh, Rajasthan

bfci6
The Indian Ghost Town of Bhangarh, Rajasthan is one of the scariest places in India to visit, in addition to being one of the most abandoned places in India. However, this tag has not perturbed visitors from making frequent trips to this ghost town.
Located near a famous forest in the area, this town is now slowly luring visitors from around the area, and country, to visit it. However, it should be noted that if you decide to visit the town after sunset, you will be not be allowed. In fact, there is a strict warning that it is out of bounds after the sun sets.

Wednesday, 18 March 2015

10 dotNET Articles you should not miss

Multi-Lingual Language Translations for ASP.NET
Here are a few free (paid for by me) language translations of common software terms for use in your multi-lingual ASP.NET application. This is particularly helpful if you want to create a list of available languages in Spanish, German, Chinese, etc... The language translation spreadsheet has generic term translations for Spanish, English, German, Italian, French, Chinese-Simple, and Japanese. The language name translations also includes Dutch, Korean, and Russian.

Dependency Injection using Spring.NET
Spring.NET is one of the popular open source framework ported from Java platform. It offers lot of functionality and in this article I will discuss about Dependency Injection and how it is supported in Spring.NET

Obfuscation and Packaging of .NET Applications via Compressed Embedded Assemblies
Shows a technique for embedding all the assemblies for an application as compressed, embedded resources into a single stub loader executable, extracting, decompressing and loading into the AppDomain at startup.

WPF & PowerShell - Part 7 (Sharing Hosts)
Well here we are at the end of a week of WPF. We've learned how to create basic, simple user interactive interfaces. We've seen a brief glimmer of the golden UI layer that is WPF, and have seen how we can use PowerShell to add easy interactivity to XAML. You've seen tricks to help you work your way through .NET code, and help you unwrap the mysteries of WPF. We've seen how we can use PowerShell's list processing technology allows for simple binding to WPF's controls, and how WPF applets can help you present a simple front ends to PowerShell functionality. We've gotten a very brief taste of what the pipeline can bring to User interfaces, and we've showed you how to make controls that run in the background so you can build your control in PowerShell and still use PowerShell.

Patterns in Practice - The Open Closed Principle
This is the first installment of a new MSDN® Magazine column on software design fundamentals. My marching orders are to discuss design patterns and principles in a manner that isn't bound to a specific tool or lifecycle methodology. In other words, my plan is to talk about the bedrock knowledge that can lead you to better designs in any technology or project.
I'd like to start with a discussion of the Open Closed Principle and other related ideas popularized by Robert C. Martin in his book, Agile Software Development, Principles, Patterns, and Practices. Don't be turned off by the word "agile" in the title, because this is all about striving for good software designs.

How to Find Memory Leaks With CLRProfiler
We all know managed code can have memory leaks. You can find a good example here: A .NET memory leak you did not think about. Microsoft provides us with the CLR Profiler, an open source tool for analyzing the behavior of your managed application, which you can download here. It contains very good documentation about the different functions of the tool, however I still find it a bit hard to start with, so here is a simple step-by-step example of how to use it.

Animation in-depth with Silverlight 2.0 Beta - Part Four
In this example I'll show you how animations can be performed using a VideoBrush. This is one of the examples that attracts the users attention by completing the animation at the right time. The video will be clipped and rotated during the animation.

IronRuby on Rails. Microsoft makes it happen.
Now... No more doubts about Open Source Support by Microsoft. The first ever Open Source Project comes live now.
Mr. John Lam, the person behind IronRuby has provided more information on his blog here...
http://www.iunknown.com/2008/05/ironruby-and-rails.html Here are the Highlights of his blog.

Optimization Tips: Using HTTP Compression
I know it has been a few weeks since the last installment in this series, and with TechEd on the horizon it'll probably be a couple 'til the next, but as long as there is some time in between let's explore another area of performance optimization with the RadControls for ASP.NET AJAX. This week, we're going to take a look at HTTP compression and how this simple technique can deliver a valuable performance boost to your website.

ASP.NET Memory: Thou shalt not store UI objects in cache or session scope
Surprisingly the issue I wrote about in "the eventhandlers that made the memory baloon" (Jan 2006) is something that still happens very frequently, I reference it in cases at least a few times a month. Just this last week I had different variations of it crop up in different cases so in this post I will show a different variation, what to look out for and how to identify it.


Windows 10 Coming This Summer

Microsoft will release its newest operating system, Windows 10 this summer. The operating system is expected to be released in 190 countries in 100+ languages.
The announcement was made by Terry Myerson, CVP Microsoft, at the Windows Hardware Engineering Community (WinHEC) Summit in Shenzhen, China.


“Windows 10 will be released this summer” 
Windows 10 will be a free upgrade for hundreds of millions of users. Windows 10 will also run on Windows Phones and tablets.

Monday, 16 March 2015

Begin of tech blog era

Hi All,

Today I started, New beginning of blog era.

Firstly I would like to thank all readers who reached in my blog.
I will tell you some tech news, tech problems, also we will figure out with news technology.
I will share with you my experience in IT industry.
Also, I will tell you some tips to write good code.