Satle4u

Saturday, December 26, 2009

Dot Net vs. Java

There are many controversies as regards the difference between Dot Net and Java. There are basically two environments for fielding application for the World Wide Web as it remains today. They are called Java Platforms and .NET platform. If you devote a considerable amount of time exploring the environments then you can easily see that .NET is far more efficient and perfect than any others and in the competition it can be ranked in the group of first three.

.Net and Java as extensively used development environment for construct web applications:

.Net and Java are said to be the two extensively used development environment to construct web applications. It is very hard to predict as to who will appear the winner, but the clear sign is there that the large enterprises who have been using Java for a prolonged period of time or the enterprises who use different platforms, will certainly continue their relationship with Java. As far as .Net is related, the enterprises who have Windows platform and who is seeking faster development time will go for .Net. With Microsoft based solutions like .Net there is a restricted possibility for scalability for huge scale deployments than it does with any Java application. Furthermore, today if you select any Microsoft based solution you select the hardware without reservation, operating systems, and middleware. This is in difference with the Java, which is autonomous of any operating system and middleware.

Java used as cross platform because of Java Virtual Machine (JVM):

Java is generally used cross platform because of Java Virtual Machine (JVM). JVM helps in the translation of the code to bytecodes and then complies it to machine code according to the operating system. In the same way, now, .Net has developed Common Language Runtime (CLR) engine that converts the program code into Microsoft Intermediate Language (MSIL) and then “just in time” the MSIL is translated to the native code. .Net is now able to support more than 20 languages. It has in built data types in classes known as Common Type System (CTS) that mechanically understands the types of other languages and implements simultaneously. Therefore, when .Net supports numerous programming environment, Java, alternatively, we can say that it is focused on only one programming language that supports multiple environments.

Thus, it is very difficult to argue which platform is finest unless the enterprises appreciate their needs. By and large, these two platforms are here to stay as prospective e business development environments. .Net Development will influence on Rapid Application Development (RAD) solutions, while Java will rule the large scale “enterprise” projects.



CsharpLanguage and JavaLanguage:

  • Both have single ImplementationInheritance and multiple InterfaceInheritance.
  • Both have automatic GarbageCollection.
  • There is a broad overlap of common operators and keywords (41 of 43 operators; 38 of 50 keywords, 46 if you allow for synonyms).
  • Java is defined through the JavaCommunityProcess. C# is an ECMA standard.
  • PassByReference
    • Java only has CallByValue.
    • C# has CallByValue and CallByReference. CallByValue is the default. Marking a parameter with the ref keyword indicates that it is passed by reference. Marking a parameter with the out keyword indicates that it is returned from the method.
  • Delegates
    • More powerful than FunctionPointers (which don't exist in Java).
    • Represents a bound method with a given signature and invokes it polymorphically.
    • C# has a built-in delegate mechanism.
    • Java uses AnonymousInnerClasses for the same uses
    • Described as "fully object-oriented", which is a totally meaningless statement. Anonymous inner classes are arguably more "object oriented" than delegates.
    • See http://www.onjava.com/pub/a/onjava/2003/05/21/delegates.html for delegates in Java.
  • MicrosoftWindowsApi
    • It may be easier in C# to design for Windows.
    • This may not be a universal advantage.
  • OperatorOverloading
    • C# can overload some operators.
    • The C# String type has its == operator overloaded to provide value semantics.
    • When you overload ==, and != will work as expected.
    • When you overload ++, both prefix and postfix forms work as expected.
  • switch on "strings"
    • This can be done in Java using a series of if () {} else if () statements.
  • GoTo
    • C# has it; Java doesn't.
    • Does C# have labelled breaks? No, break and continue can't have a label.
  • struct
    • In C#, a struct is a ValueObject allocated on the stack.
C# structs are dangerously and cryptically implemented: See CsharpQuestions (search on word 'struct')
    • You can use NullableTypes to allow such types to support null values.
    • Java has no analogue at the language level but the JVM is able to allocate objects on the stack when it determines that they do not live longer than the method activation that creates them.
  • Preprocessor
    • C# has a preprocessor similar to the CeePreprocessor.
    • You can't do some things like #define private public. It's simply a means to create symbols for conditional compilation.
  • Attributes
    • Allow you to embed meta-data in the compiled binaries.
    • This is an enhancement of reflection.
    • Attributes were introduced in C# but are now also supported in Java 5.
  • Calling native code
  • ExceptionHandling
  • Properties
    • In Java, getName and setName are methods for manipulating properties, per JavaBeans.
    • In C# the property Name wraps get and set methods and is explicitly defined as a property.
    • (Contributors: BrettMcNamara)
    • Properties can be little misleading, though, as they can be mixed with data members within methods of same class. (For other classes, this is not a problem because there should be no public data members.) One can easily create a property that performs a HTTP request to return value, somehow forget that it's not a data member, and then wonder why performance is so bad. To some extent, this can be fixed by profiling, but anyway that's unpleasant. (See also SyntacticallyEquivalentMembersAndProperties)
  • Both languages support BoxingConversions.
    • C# autoboxes values to heap-allocated values of the same type.
    • Java autoboxes values to heap-allocated objects of a different type. This complicates reflective code.
  • Closures
  • InnerClasses
  • EnumeratedTypes
    • C# has enumerated types similar to those in CeePlusPlus. Each enumerated value resolves to an integer constant.
    • Java's enumerated types are actually immutable classes. Each enumerated value is an immutable object, complete with polymorphic methods.
  • Events
    • C# has language support for publish/subscribe style events
    • Java uses coding conventions to implement publish/subscribe events with listener interfaces and methods to add and remove listeners.
  • Generics
    • C# has real generic types: generic types exist at compile time and at runtime.
    • Java generic types are compiled away: only non-generic types exist at runtime.

Thursday, December 10, 2009

List of phobias



Achluophobia Fear of darkness.
Acousticophobia Fear of noise.
Acrophobia Fear of heights.
Agoraphobia Fear of open spaces or of being in crowded places.
Ailurophobia Fear of cats.
Alektorophobia Fear of chickens.
Alliumphobia Fear of garlic.
Allodoxaphobia Fear of opinions.
Altophobia Fear of heights.
Amaxophobia Fear of riding in a car.
Ambulophobia Fear of walking.
Ancraophobia or Anemophobia Fear of wind.
Androphobia Fear of men.
Anglophobia Fear of England, English culture, etc.
Anthrophobia Fear of flowers.
Antlophobia Fear of floods.
Anuptaphobia Fear of staying single.
Apeirophobia Fear of infinity.
Aphenphosmphobia Fear of being touched.
Apiphobia Fear of bees.
Apotemnophobia Fear of persons with amputations. Arachnephobia/Arachnophobia Fear of spiders.
Arithmophobia Fear of numbers.
Arrhenphobia Fear of men. Arsonphobia Fear of fire.
Astraphobia/Astrapophobia Fear of thunder and lightning.
Astrophobia Fear of stars/space.
Ataxophobia Fear of disorder or untidiness.
Atelophobia Fear of imperfection.
Athazagoraphobia Fear of being forgotton or ignored or forgetting.
Atychiphobia Fear of failure.
Aurophobia Fear of gold.
Automatonophobia Fear of ventriloquist's dummies, animatronic creatures, wax statues
Automysophobia Fear of being dirty.
Autophobia Fear of being alone or of oneself.
Aviophobia/Aviatophobia Fear of flying.

Bacillophobia Fear of microbes.
Bacteriophobia Fear of bacteria.
Bathmophobia Fear of stairs or steep slopes.
Batophobia Fear of heights.
Batrachophobia Fear of amphibians (like frogs)
Belonephobia Fear of pins and needles.
Bibliophobia Fear of books.
Botanophobia Fear of plants.
Brontophobia Fear of thunder and lightning.

Cacophobia Fear of ugliness.
Cainophobia/Cainotophobia Fear of newness, novelty.
Caligynephobia Fear of beautiful women.
Carnophobia Fear of meat.
Catagelophobia Fear of being ridiculed.
Catoptrophobia Fear of mirrors.
Cenophobia / Centophobia Fear of new things or ideas.
Ceraunophobia Fear of thunder.
Chaetophobia Fear of hair.
Chionophobia Fear of snow.
Chiraptophobia Fear of being touched.
Chirophobia Fear of hands.
Chorophobia Fear of dancing.
Chrometophobia/Chrematophobia Fear of money.
Chromophobia/Chromatophobia Fear of colors.
Chronomentrophobia Fear of clocks.
Cibophobia/Sitophobia/Sitiophobia Fear of food.
Claustrophobia Fear of confined spaces.
Climacophobia Fear of stairs.
Clinophobia Fear of going to bed.
Coimetrophobia Fear of cemeteries.
Coulrophobia Fear of clowns.
Cyberphobia Fear of computers.
Cyclophobia Fear of bicycles.
Cymophobia Fear of waves.
Cynophobia Fear of dogs.

Demophobia Fear of crowds.
Dendrophobia Fear of trees.
Dentophobia Fear of dentists.
Didaskaleinophobia Fear of going to school.
Dipsophobia Fear of drinking.
Dishabiliophobia Fear of undressing in front of someone.
Dromophobia Fear of crossing streets.

Eisoptrophobia Fear of mirrors.
Elurophobia Fear of cats.
Emetophobia Fear of vomiting.
Entomophobia Fear of insects.
Ephebiphobia Fear of teenagers.
Epistaxiophobia Fear of nosebleeds.
Equinophobia Fear of horses.
Ergophobia Fear of work.

Felinophobia Fear of cats.

Gamophobia Fear of marriage.
Geliophobia Fear of laughter.
Genophobia Fear of sex.
Gephyrophobia, Gephydrophobia, or Gephysrophobia Fear of crossing bridges.
Gerascophobia Fear of growing old.
Glossophobia Fear of speaking in public or of trying to speak. Gynephobia/Gynophobia Fear of women.

Haphephobia/Haptephobia Fear of being touched.
Harpaxophobia Fear of being robbed.
Heliophobia Fear of the sun.
Hemophobia/Hemaphobia/Hematophobia Fear of blood.
Hierophobia Fear of priests or sacred things.
Hominophobia Fear of men.
Hylophobia Fear of forests.

Iatrophobia Fear of doctors.
Ichthyophobia Fear of fish.

Judeophobia Fear of Jews.

Keraunophobia Fear of thunder and lightning.
Kymophobia Fear of waves.

Lachanophobia Fear of vegetables.
Ligyrophobia Fear of loud noises.
Limnophobia Fear of lakes.
Liticaphobia Fear of lawsuits.
Lockiophobia Fear of childbirth.
Logizomechanophobia Fear of computers.
Logophobia Fear of words.
Lygophobia Fear of darkness.

Macrophobia Fear of long waits.
Mageirocophobia Fear of cooking.
Maieusiophobia Fear of childbirth.
Megalophobia Fear of large things.
Melissophobia Fear of bees.
Methyphobia Fear of alcohol.
Microphobia Fear of small things.
Misophobia Fear of being contaminated with dirt/germs.
Monophobia Fear of solitude or being alone.
Motorphobia Fear of automobiles.
Musophobia/Murophobia Fear of mice.

Necrophobia Fear of death / dead things.
Neophobia Fear of anything new.
Nosocomephobia Fear of hospitals.
Numerophobia Fear of numbers.

Ochlophobia Fear of crowds or mobs.
Ophidiophobia Fear of snakes.
Ophthalmophobia Fear of being stared at.
Ornithophobia Fear of birds.

Pedophobia Fear of children.
Peladophobia Fear of bald people.
Phasmophobia Fear of ghosts.
Placophobia Fear of tombstones.
Plutophobia Fear of wealth.
Pogonophobia Fear of beards.
Potamophobia Fear of rivers or running water.
Pteronophobia Fear of being tickled by feathers.
Pupaphobia fear of puppets.
Pyrophobia Fear of fire.

Rhytiphobia Fear of getting wrinkles.
Rupophobia Fear of dirt.

Scolionophobia Fear of school.
Selachophobia Fear of sharks.
Sesquipedalophobia Fear of long words.

Tachophobia Fear of speed.
Technophobia Fear of technology.
Telephonophobia Fear of telephones.
Testophobia Fear of taking tests.
Theophobia Fear of gods or religion.
Trypanophobia Fear of injections.

Venustraphobia Fear of beautiful women.
Verbophobia Fear of words.
Verminophobia Fear of germs.
Vestiphobia Fear of clothing.

Xenoglossophobia Fear of foreign languages.

Zoophobia Fear of animals


Wednesday, December 9, 2009

Paper battery offers future power

Paper battery offers future power
Paper battery. Photo credit: Rensselaer/Victor Pushparaj
The black piece of paper can power a small light
Flexible paper batteries could meet the energy demands of the next generation of gadgets, says a team of researchers.

They have produced a sample slightly larger than a postage stamp that can store enough energy to illuminate a small light bulb.

But the ambition is to produce reams of paper that could one day power a car.

Professor Robert Linhardt, of the Rensselaer Polytechnic Institute, said the paper battery was a glimpse into the future of power storage.

The team behind the versatile paper, which stores energy like a conventional battery, says it can also double as a capacitor capable of releasing sudden energy bursts for high-power applications.

While a conventional battery contains a number of separate components, the paper battery integrates all of the battery components in a single structure, making it more energy efficient.

Integrated devices

The research appears in the Proceedings of the National Academy of Sciences (PNAS).

"Think of all the disadvantages of an old TV set with tubes," said Professor Linhardt, from the New York-based institute, who co-authored a report into the technology.

"The warm up time, power loss, component malfunction; you don't get those problems with integrated devices. When you transfer power from one component to another you lose energy. But you lose less energy in an integrated device."

You can implant a piece of paper in the body and blood would serve as an electrolyte
Professor Robert Linhardt

The battery contains carbon nanotubes, each about one millionth of a centimetre thick, which act as an electrode. The nanotubes are embedded in a sheet of paper soaked in ionic liquid electrolytes, which conduct the electricity.

The flexible battery can function even if it is rolled up, folded or cut.

Although the power output is currently modest, Professor Linhardt said that increasing the output should be easy.

"If we stack 500 sheets together in a ream, that's 500 times the voltage. If we rip the paper in half we cut power by 50%. So we can control the power and voltage issue."

Because the battery consists mainly of paper and carbon, it could be used to power pacemakers within the body where conventional batteries pose a toxic threat.

"I wouldn't want the ionic liquid electrolytes in my body, but it works without them," said Professor Linhardt. "You can implant a piece of paper in the body and blood would serve as an electrolyte."

But Professor Daniel Sperling at University of California, Davis, an expert on alternative power sources for transport, is unconvinced.

'More difficult'

"Batteries and capacitors are being steadily improved, but electricity storage is much more difficult and expensive than liquid fuels and probably will be so forever," he said.

"The world is not going to change as a result of this new invention any time soon."

Professor Linhardt admitted that the new battery is still some way from the commercial market.

"The devices we're making are only a few inches across. We would have to scale up to sheets of newspaper size to make it commercially viable," he said. But at that scale, the voltage could be large enough to power a car, he said.

However, carbon nanotubes are very expensive, and batteries large enough to power a car are unlikely to be cost effective.

"I'm a strong enthusiast of electric vehicles, but it is going to take time to bring the costs down," said Professor Sperling.

But Professor Linhardt said integrated devices, like the paper battery, were the direction the world was moving.

"They are ultimately easier to manufacture, more environmentally friendly and usable in a wide range of devices," he said.

The ambition is to produce the paper battery using a newspaper-type roller printer.

Graphic: Paper battery
Electricity is the flow of electrical power or electrons
1. Batteries produce electrons through a chemical reaction between electrolyte and metal in the traditional battery.
2. Chemical reaction in the paper battery is between electrolyte and carbon nanotubes.
3. Electrons collect on the negative terminal of the battery and flow along a connected wire to the positive terminal
4. Electrons must flow from the negative to the positive terminal for the chemical reaction to continue.


Tuesday, December 8, 2009

Burst Alert! March 19th was an exciting day for NASA. We know “why” it was special, but we don’t know “why why” it was special. They finally explain the why why today, and you can read all about it in Nature tomorrow.

There was something amazing about GRB 080319B and the other cosmic bursts that NASA’s Swift satellite detected that day. (See NASA's animation of what they think happened).

"Even by the standards of gamma-ray bursts, this burst was a whopper," says Swift lead scientist Neil Gehrels of NASA. "It blows away every gamma ray burst we’ve seen so far."

Here’s the why (we'll get to the why why in a second):


Artist's interpretation of GRB 080319B. Credit: NASA/Swift/Mary Pat Hrybyk-Keith and John Jones.

The optical afterglow was 2.5 million times more luminous than the most luminous supernova ever recorded, making it the most intrinsically bright object ever observed by humans in the universe. It was so bright that immediately after the blast, Swift's UltraViolet and Optical Telescope and X-Ray Telescope indicated they were effectively blinded, originally leading researchers to think something had gone wrong.

"For a few precious seconds, the luminosity was a million times that of the whole galaxy," explains Dieter Hartmann, a Professor at Clemson University.

And on top of that, the burst shattered the record for the farthest object that’s ever been visible to the naked eye. The previous record was a spiral galaxy called M33, which is thousands of times closer than the March 19 explosion.

The explosion, which took place halfway across the universe, was so far away that it took its light 7.5 billion years to reach the Earth. In fact, the explosion took place so long ago that neither the Earth nor the Sun had come into existence.

If something like this happened closer to home, we would be in deep trouble. David Burrows, NASA's Swift X-ray Telescope leader at Penn State, says, "if it happened in our own galaxy, it could cause chemical changes that cause something like a nuclear winter. We don't believe there are any stars in our galaxy that are likely to become gamma ray bursts, but it is possible that an event like this may have happened in our galaxy in the past and lead to mass extinctions."

If you're having trouble grasping the magnitude of such an occurrence, don't feel bad. Hartmann explained that you can't really come up with an analogy to put the amount of energy that's being released into terms that 'normal' people would understand. "Those numbers are staggering," he says.

And 'normal' isn't used pejoratively. Even astrophysicists are blown away. Grigory Beskin, the Relativistic Astrophysics Group Head at the Special Astrophysical Observatory, said, "this is a true miracle to see such an optical flare."

Astronomers began their scientific analysis beginning 30 minutes before the explosion, and after following its afterglow for months, they’re ready to talk. Until recently they didn’t know the why why: why it was so powerful, and why the afterglow was so much brighter than other afterglows.

It turns out that a jet of material shot out from this dying supernova almost directly toward the Earth at 99.99995 percent the speed of light.

Judith Racusin, a graduate student at Penn State and one of the presenters at the NASA press conference today, explained that through unlikely circumstances, we got a chance to see something amazing with this jet, and it's changing the way astrophysicists are thinking.

"What's interesting about this burst, is that both the optical afterglow and the X-ray afterglow are inconsistent with our current theoretical understanding of how these objects work. It's forced us to really test our understanding of these objects, and as a result we've had to come up with an alternative explanation."

So NASA scientists have come up with a two-component jet model, in which there is both a wider outer jet (characteristic of what we usually see with these objects), and a narrow inner jet.

Hartmann says the narrow jet was just 0.4 of a degree across, while the less-energetic, wider jet was about 20 times wider.

"The narrow jet just happened to be pointed almost precisely at the Earth this time, which makes us think that most of the time, the narrow jet just isn't pointed directly at us. It's allowed us to see these objects in a new way," says Racusin.

The NASA scientists realize that sometimes better data spell trouble for simple models.

"But on the bright side," says Hartmann, "it's leading to new theoretical models!"



Related: Even NASA astrophysicists have self-doubt! Interview with NASA Dr. Kathy Flanagan.

Sunday, November 1, 2009

Windows 7 Sins: The case against Microsoft and proprietary software

The new version of Microsoft's Windows operating system, Windows 7, has the same problem that Vista, XP, and all previous versions have had -- it's proprietary software. Users are not permitted to share or modify the Windows software, or examine how it works inside.

The fact that Windows 7 is proprietary means that Microsoft asserts legal control over its users through a combination of copyrights, contracts, and patents. Microsoft uses this power to abuse computer users. At windows7sins.org, the Free Software Foundation lists seven examples of abuse committed by Microsoft.

1. Poisoning education: Today, most children whose education involves computers are being taught to use one company's product: Microsoft's. Microsoft spends large sums on lobbyists and marketing to corrupt educational departments. An education using the power of computers should be a means to freedom and empowerment, not an avenue for one corporation to instill its monopoly.

2. Invading privacy: Microsoft uses software with backward names like Windows Genuine Advantage to inspect the contents of users' hard drives. The licensing agreement users are required to accept before using Windows warns that Microsoft claims the right to do this without warning.

3. Monopoly behavior: Nearly every computer purchased has Windows pre-installed -- but not by choice. Microsoft dictates requirements to hardware vendors, who will not offer PCs without Windows installed on them, despite many people asking for them. Even computers available with other operating systems like GNU/Linux pre-installed often had Windows on them first.

4. Lock-in: Microsoft regularly attempts to force updates on its users, by removing support for older versions of Windows and Office, and by inflating hardware requirements. For many people, this means having to throw away working computers just because they don't meet the unnecessary requirements for the new Windows versions.

5. Abusing standards: Microsoft has attempted to block free standardization of document formats, because standards like OpenDocument Format would threaten the control they have now over users via proprietary Word formats. They have engaged in underhanded behavior, including bribing officials, in an attempt to stop such efforts.

6. Enforcing Digital Restrictions Management (DRM): With Windows Media Player, Microsoft works in collusion with the big media companies to build restrictions on copying and playing media into their operating system. For example, at the request of NBC, Microsoft was able to prevent Windows users from recording television shows that they have the legal right to record.

7. Threatening user security: Windows has a long history of security vulnerabilities, enabling the spread of viruses and allowing remote users to take over people's computers for use in spam-sending botnets. Because the software is secret, all users are dependent on Microsoft to fix these problems -- but Microsoft has its own security interests at heart, not those of its users.

You can help!

Free software operating systems like GNU/Linux can do the same jobs as Windows, but they encourage users to share, modify, and study the software as much as they want. This makes using a free software operating system the best way for users to escape Microsoft and avoid becoming victims of these seven sins. Software and computers will always have problems, but by using free software, users and their communities are empowered to fix problems for themselves and each other.

You can get more information about each of the sins and how to escape them at windows7sins.org. Please sign up there for campaign news and action alerts to help raise awareness about Microsoft's abuses, the problems with Windows 7, and the importance of free software!