Sunday, March 30, 2008

NullPointerException

Problem
*******************************************************************
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at it.codegen.tbx.reservationclient.presentation.treeutils.BookingTreeRenderer.getTreeCellRendererComponent(BookingTreeRenderer.java:150)
at javax.swing.plaf.basic.BasicTreeUI.paintRow(BasicTreeUI.java:1413)
at javax.swing.plaf.basic.BasicTreeUI.paint(BasicTreeUI.java:1203)
at javax.swing.plaf.metal.MetalTreeUI.paint(MetalTreeUI.java:152)
at javax.swing.plaf.ComponentUI.update(ComponentUI.java:142)
at javax.swing.JComponent.paintComponent(JComponent.java:742)
at javax.swing.JComponent.paint(JComponent.java:1005)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JViewport.paint(JViewport.java:728)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JSplitPane.paintChildren(JSplitPane.java:1021)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JLayeredPane.paint(JLayeredPane.java:559)
at javax.swing.JComponent.paintChildren(JComponent.java:842)
at javax.swing.JComponent.paint(JComponent.java:1014)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4963)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4916)
at javax.swing.JComponent._paintImmediately(JComponent.java:4859)
at javax.swing.JComponent.paintImmediately(JComponent.java:4666)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:451)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:114)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
at it.codegen.presentation.CGEventQueue.dispatchEvent(CGEventQueue.java:23)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
Return true...
at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

***************

Answer

Here the issue is one object returns a null value
In here node object returns null and getData() makes a NUllpointerException

to avoid this
make sure all the values are set before get those
in other words setters are well called before the getters

Connection to 192.168.0.16:9090 (ip ) refused

java.net.ConnectException: Connection to 192.168.0.16:9090 refused
at com.idoox.transport.http.client.HttpPool.newSocket(HttpPool.java:237)
at com.idoox.transport.util.SocketPool$SocketExImpl.open(SocketPool.java:143)
at com.idoox.transport.util.SocketPool$SocketExImpl.open(SocketPool.java:130)
at com.idoox.transport.util.SocketPool.get(SocketPool.java:343)
at com.idoox.transport.http.client.HttpClient.newConnection(HttpClient.java:164)
at org.idoox.transport.client.Endpoint.newConnection(Endpoint.java:1062)
at org.idoox.transport.client.Endpoint.newConnection(Endpoint.java:1029)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:235)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:375)
at com.idoox.wasp.wsdl.WSDLRepositoryImpl.getDefinition(WSDLRepositoryImpl.java:142)
at com.idoox.wasp.SOAPServiceInfoCache.getServiceInfos(SOAPServiceInfoCache.java:53)
at com.systinet.wasp.webservice.ServiceClientImpl.lookup(ServiceClientImpl.java:551)
at com.systinet.wasp.webservice.ServiceClientImpl.createProxy(ServiceClientImpl.java:433)
at org.systinet.wasp.webservice.Registry.lookup(Registry.java:168)
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:105)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
org.systinet.wasp.webservice.LookupException: Error obtaining WSDL definition from http://192.168.0.16:9090/TBXAdminService/wsdl
at com.systinet.wasp.webservice.ServiceClientImpl.lookup(ServiceClientImpl.java:553)
at com.systinet.wasp.webservice.ServiceClientImpl.createProxy(ServiceClientImpl.java:433)
at org.systinet.wasp.webservice.Registry.lookup(Registry.java:168)
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:105)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
Caused by: WSDLException: faultCode=INVALID_WSDL: Cannot get WSDL at 'http://192.168.0.16:9090/TBXAdminService/wsdl'.
Exception occured: java.net.ConnectException: Connection to 192.168.0.16:9090 refused:
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:263)
at com.idoox.wsdl.xml.WSDLReaderImpl.readWSDL(WSDLReaderImpl.java:375)
at com.idoox.wasp.wsdl.WSDLRepositoryImpl.getDefinition(WSDLRepositoryImpl.java:142)
at com.idoox.wasp.SOAPServiceInfoCache.getServiceInfos(SOAPServiceInfoCache.java:53)
at com.systinet.wasp.webservice.ServiceClientImpl.lookup(ServiceClientImpl.java:551)
... 11 more
java.lang.NullPointerException
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:131)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
it.codegen.tbx.agent.authority.AuthorityException: Can not get local configuration details
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:153)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
it.codegen.tbx.agent.authority.AuthorityException: Can not get local configuration details
at it.codegen.tbx.agent.authority.AuthorityHandler.authoizeAndConfiguration(AuthorityHandler.java:153)
at it.codegen.tbx.TBXClientApplication.initEnvironment(TBXClientApplication.java:43)
at it.codegen.tbx.reservationclient.ReservationClient.(ReservationClient.java:522)
at it.codegen.tbx.reservationclient.ReservationClient.main(ReservationClient.java:540)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)



Answer
************

This comes because the server is not started , Stopped
It's better to check the server is working
and restart the server
if it is linux server

./serverstart.sh > output.log 2>&1 &

Tuesday, March 25, 2008

Software architecture and engineering - From dog houses to skyscrapers

During my interviews of young newcomers into the IT field, I notice that many of them have trouble differentiating "coding" from the discipline of "software engineering."

This is unfortunate, for there is a hugely important difference between the two that young software engineers must appreciate. This article discusses some of these software engineering aspects, with learning's from Virtusa's Technology Office.

A statement by Booch is very relevant to the topic at hand: "Dog houses have been built. You can't build a skyscraper the way you build a dog house." The "engineering" part of software engineering becomes really important-neigh, critical-for large-scale complex projects-the software equivalent of skyscrapers. So what are the important engineering aspects of building the software equivalent of skyscrapers?

First, it's important to understand what attributes are expected from the skyscrapers of the software world. Besides accurately and fully supporting immediate business requirements, the software also needs to support future expansion and scale.

Future expansion translates to both increasing business volume and changing business requirements. The software also needs to adhere to industry best practices that helps future maintainability of the code.

The use of the proper software engineering practices can result in software that adheres to the above attributes, while at the same time facilitating the productive use of a large team to improve time-to-result and enhance productivity of the software development process itself.

Requirements

Requirements gathering is usually the starting point of the software engineering cycle. Verbal and informal methods of gathering requirements, while quick and useful in small projects, are insufficient for large-scale projects.

At the same time, the traditional waterfall method of first gathering all the requirements before proceeding to design and development tends to also fail in a world where time-to-result is becoming a prime differentiator.

Instead, modern agile development techniques tend to engage customers earlier and more frequently and also provide for shorter iterations, enabling customers to see the product earlier and decide implementation priorities. In our experience, agile methods are growing in acceptance and momentum, and are even becoming the approach of choice in offshore development projects.

Metrics, such as the Requirements Clarity Index and Requirements Stability Index, are useful measures of the requirements gathering and management processes. One interesting tool I've come across is an Automated Requirements Measurement tool from NASA.

The tool can scan a requirements document and capture many requirements-related metrics; for example, the usage of weak English phrases that lead to ambiguities, structural inconsistencies, etc. The output of this tool can be very useful to optimize manual requirements reviews.

Requirements gathering includes both business requirements and technical requirements.

The project architect is responsible for visualising the technical solution, and must therefore ensure that any technical requirements and constraints are fully captured during the requirements process.

Architecture and Design

For large projects to be delivered on-time, it is important to effectively engage a large team, and parallelise as much work as possible.

Software architecture provides the means to decompose a large project into smaller sub-systems or sub-projects. Decomposition involves identifying the functional modules, architectural layers and cross-cutting concerns.

Architectural layers focus on specific functions, such as the user interface, business logic or access to database/external systems.

By organising these layers such that, for example, the user interface layer can only access the business logic layer, and the business logic layer can only access the persistence layer, layered architecture reduces the interconnections between components and reduces the complexity of the resulting software. Cross-cutting concerns deal with common technical requirements that go across layers, such as security, error handling, transactions, etc.

A technical requirements checklist of the right questions to ask in these areas can help avoid expensive requirements gaps in new development engagements.

Defining the architecture requires broad and deep knowledge of technology choices and best practices. The team should leverage industry standards and best practices associated with its technology selections.

These standards should not be limited to the main programming language, but should also address user interface (HTML, accessibility, XHTML standards, etc.), database (database object naming conventions, SQL standards, etc.), and any other specific technologies in use. Virtusa's Technology Office provides a portal with all these specific standards and best practices, from which teams can select the subset they require for each project.

In many industries, existing blueprints are used to create new applications. So rather than architecting from scratch, it is often better to use established architecture blueprints as a starting point. Creating an architecture blueprint in code during the early stages of the design process is a highly-recommended best practice that results in better quality code aligned with the architectural vision.

This approach has the advantage of mitigating technical risks early in the project and describing the architecture in developers' language. This thin slice of code representing all the architectural layers can also be run through profiling tools to capture potential performance and scalability bottlenecks with the architecture.

Architecture blueprint generators exist that can generate the early architecture blueprint for new applications.

The architecture blueprints generated by these tools already adhere to best practices and can be a huge boost to both quality and productivity. Virtusa's Technology Office provides a custom blueprint generator for the standard Java/Spring technology stack, and also provides a list of recommendations and guidance for different sets of technologies.

Architecture blueprint generators can go a long way to ensuring that the technologies and standards used in an enterprise are consistent.

Virtusa has also created custom architecture blueprint generators for customers, based on their unique technology decisions and nuances.

Automated Unit Testing

As teams start doing parallel development work, a good team infrastructure and rigorous engineering practices are needed to ensure that conflicts are avoided, and any defects are caught early.

Defects that are caught later in the lifecycle cost much more to fix than those that are caught early in the lifecycle. Also, as the code base starts to grow in the thick of the construction cycle, there is a growing risk of developers not considering dependencies sufficiently and breaking functionality that worked earlier. Such defects can be extremely destabilizing and can easily reduce the productivity of both development and quality assurance (QA) teams to the breakpoint.

Dependency-based defects can be easily avoided by creating a suite of automated unit tests. In fact, developers must be informed that development is not considered complete until their code is sufficiently covered by automated unit tests.

Frameworks, such as JUnit for Java and NUnit or MSTest for Microsoft .NET, can be used to create and run automated unit tests. Code coverage tools, such as Emma for Java and NCover or MS Code Coverage for .NET, provide valuable information about exactly how much of the code is covered by the unit tests.

They point out which lines of code are covered and which lines are not covered by the unit tests-valuable information, indeed, for technical leaders assessing test coverage and thus stability of the code base.

Having a suite of automated unit tests can also be a huge benefit for the maintenance phase of the lifecycle, as it ensures that defect fixes or enhancements don't end up causing instability in the system.

An interesting side note is the relationship between code complexity and unit testing. Code complexity can be measured using McCabe's Cyclomatic complexity metric, which effectively counts the number of conditional branches through the system.

A rule of thumb is that the number of unit tests should at least be equal to the Cyclomatic complexity. Another interesting metric, called the CRAP metric (Change Risk Analyzer and Predictor), provides a measure of the maintainability of software. The CRAP metric increases as the complexity increases, and decreases as the code coverage from unit tests increases.

A high CRAP count can be lowered either by refactoring code to reduce complexity, or by increasing test coverage using more unit tests.

Team Infrastructure

Standard team infrastructure includes source control and defect/change tracking systems, team collaboration portals and continuous integration (CI) build servers. CI servers promote frequent code integration, by "listening" to the source control system, building the code automatically at frequent intervals, and, if automated unit tests exist, executing these unit tests.

CI servers are usually configured to send an email to the team on each build or if a build or unit test failure occurs. Having a CI server ensures that any integration failures are caught early and are therefore much easier to fix.

A defect tracking system can provide useful information on the trending of defects and the readiness to release software to the customer-typically, the number and density of defects decrease and the time to find a defect increases as the system moves closer to release.

Code Analysis

The percentage of defects caught before delivery to the customer as a percentage of the total number of defects (also called the defect removal efficiency) can provide a very useful indicator of the overall efficiency of the QA processes.

Configuration and release management is a well defined activity that can reduce conflicts and ensure a smooth transition of code and other artifacts between the Development, QA and production support teams.

Automation is key to ensuring software quality in a large project. Code analysis tools, such as Checkstyle and Findbugs for Java or FxCop for NET, automatically check code against coding conventions and best practices.

Virtusa's Technology Office provides an integrated development environment (IDE) based on Eclipse that bundles the Virtusa coding standards and conventions, as well as a standard set of code-analysis plug-ins.

Developers are expected to run these tools and correct any errors reported before code is checked in. Another custom tool provided by the Technology Office is installed on the build servers, analyses the code base and publishes metrics to an enterprise-level metrics dashboard.

These metrics are available for technical leadership to analyze and act upon, providing an additional safety net for code quality. Such infrastructure can reduce the subjectivity of code assessments and can focus manual code reviews on higher-order activities, such as finding logical and design-level issues with code.

Software development is often seen as an industry with low barrier to entry. While this may be true for small projects, complex projects that leverage large teams require a very high degree of professionalism and engineering discipline to be successful.

This is especially true as customers also become more sophisticated, demanding high quality solutions to complex business problems with significantly reduced time-to-results.

In an increasingly competitive industry, it's the "architecture and engineering" aspect of software engineering that separates the men from the boys.

Wednesday, March 19, 2008

Correct posture

Here are some correct postures which should be used while using a computer to reduce stress and other ill effects.

Image

Image

Image

Image

Image

Image

Image

Image

Please take good care of your wrist while using the keyboard and mouse of your computer.

Long term repetitive action stress can lead to Carpal Tunnel.
You could end up going under a surgery that looks like this:

n i d o k i d o s




Carpal Tunnel Syndrome and Manual therapy
Exercises for relief from Carpal Tunnel Syndrome


While you are receiving treatment for Carpal Tunnel Syndrome regular exercise sessions can help your rapid recovery. We have included some photos and explanations of recommended exercises.
The following exercises may be prescribed by your healthcare provider in conjunction with Low Level Laser therapy. In the photos you will see below, the right wrist is the one being exercised. If your left wrist is affected, do the same exercises with the left hand.

When doing each of these exercises, the hand should be flexed until a sensation of stretching is felt in the arm. The position should be held fo r 10 to 15 seconds for each of 10 repetitions. Try to this set of exercises three times a day.

Exercises 1 and 2 flex and extend the hand and stretch the wrist. Bend the hand as shown in the photos and apply moderate pressure to it with the other hand.



n i d o k i d o s
Exercise 1 - Wrist Flexion Bend the hand being exercised backward (palm away from you ), as shown in the photos. With the fingers of the other hand, apply pressure.
(Click on photo for larger view)



n i d o k i d o s
n i d o k i d o s
Exercise 2 - Wrist Extension Bend the hand being exercised forward ( palm toward you ), as shown in the photos. With the fingers of the other hand, apply pressure.

Exercises 3 and 4 are similar to 1 and 2 except that an object, such as a pad provides the resistance to the hand, instead of your other hand.


n i  d o k i d o s
Exercise 3 - Wrist Flexion against surface With your arm held vertically, press your hand, palm down, on a firm surface, as shown in the photo.



n i d o k i d o s
Exercise 4 - Wrist Extension against surface With your arm held vertically, press your hand, palm up, on a firm surface, as shown in the photo.



Exercises 5 and 6 involve the side to side range of motion of the hand.



n i d o k i d o s
Exercise 5 - (Radial Deviation) Place your hand palm downward. Grasp the fingers of the hand to be exercised with your other hand (as shown in the photo) and twist the hand toward you. Keep the hand horizontal.



n i d o k i d o s
Exercise 6 - (Ulnar Deviation) Place your hand palm downward. Grasp the fingers of the hand to be exercised with your other hand (as shown in the photo) and twist the hand away from you. Keep the hand horizontal.





















Tuesday, March 11, 2008

NUTRITION UPDATES


NUTRITION UPDATES

TO PREVENT STROKE DRINK TEA!
Prevent buildup of fatty deposits on artery walls with regular doses of tea. (actually, tea suppresses my appetite and keeps the pounds from invading....Green tea is great for our immune system)!



INSOMNIA (CAN'T SLEEP?) HONEY!
Use honey as a tranquilizer and sedative.



ASTHMA? EAT ONIONS!!!!
Eating onions helps ease constriction of bronchial tubes. (when I was young, my mother would make onion packs to place on our chest, helped the respiratory ailments and actually made us breathe better).

ARTHRITIS? EAT FISH, TOO!!
Salmon, tuna, mackerel and sardines actually prevent arthritis.
(fish has omega oils, good for our immune system)



UPSET STOMACH? BANANAS - GINGER!!!!!
Bananas will settle an upset stomach.
Ginger will cure morning sickness and nausea.



BLADDER INFECTION? DRINK CRANBERRY JUICE!!!!
High-acid cranberry juice controls harmful bacteria.



BONE PROBLEMS? EAT PINEAPPLE!!!
Bone fractures and osteoporosis can be prevented by the manganese in pineapple.

PREMENSTRUAL SYNDROME? EAT CORNFLAKES!!!!
Women can ward off the effects of PMS with cornflakes, which help reduce depression, anxiety and fatigue.



MEMORY PROBLEMS? EAT OYSTERS!
Oysters help improve your mental functioning by supplying much-needed zinc.



COLDS? EAT GARLIC!
Clear up that stuffy head with garlic. (remember, garlic lowers cholesterol, too.)

COUGHING? USE RED PEPPERS!!
A substance similar to that found in the cough syrups is found in hot red pepper. Use red (cayenne) pepper with caution-it can irritate your tummy.



BREAST CANCER? EAT Wheat, bran and cabbage
Helps to maintain estrogen at healthy levels.



LUNG CANCER? EAT DARK GREEN AND ORANGE AND VEGGIES!!!
A good antidote is beta carotene, a form of Vitamin A found in dark green and orange vegetables.

ULCERS? EAT CABBAGE ALSO!!!
Cabbage contains chemicals that help heal both gastric and duodenal ulcers.



DIARRHEA? EAT APPLES!
Grate an apple with its skin, let it turn brown and eat it to cure this condition. (Bananas are good for this ailment)



CLOGGED ARTERIES? EAT AVOCADO!
Mono unsaturated fat in avocados lowers cholesterol.



HIGH BLOOD PRESSURE? EAT CELERY AND OLIVE OIL!!!
Olive oil has been shown to lower blood pressure.
Celery contains a chemical that lowers pressure too.



BLOOD SUGAR IMBALANCE? EAT BROCCOLI AND PEANUTS!!!
The chromium in broccoli and peanuts helps regulate insulin and blood sugar.



HEADACHE? EAT FISH!
Eat plenty of fish -- fish oil helps prevent headaches.
So does ginger, which reduces inflammation and pain.

HAY FEVER? EAT YOGURT!
Eat lots of yogurt before pollen season.
Also-eat honey from your area (local region) daily.

Kiwi: Tiny but mighty. This is a good source of potassium, magnesium, Vitamin E &fiber. It's Vitamin C content is twice that of an orange.

Apple: An apple a day keeps the doctor away? Although an apple has a low Vitamin C content, it has antioxidants &flavonoids which enhances the activity of Vitamin C thereby helping to lower the risks of colon cancer, heart attack & stroke.

Strawberry: Protective fruit. Strawberries have the highest total antioxidant power among major fruits &protects the body from cancer causing, blood vessels clogging free radicals. (Actually, any berry is good for you..they're high in anti-oxidants and they actually keep us young.........blueberries are the best and very versatile in the health field........they get rid of all the free-radicals that invade our bodies)

Orange: Sweetest medicine. Taking 2 - 4 oranges a day may help keep colds away, lower cholesterol, prevent & dissolve kidney stones as well as lessen the risk of colon cancer.



Watermelon: Coolest Thirst Quencher. Composed of 92% water, it is also packed with a giant dose of glutathione which helps boost our immune system. They are also a key source of lycopene - the cancer fighting oxidant. Other nutrients found in watermelon are Vitamin C &Potassium. (watermelon also has natural substances [natural SPF sources] that keep our skin healthy, protecting our skin from those darn suv rays)

Guava &Papaya: Top awards for Vitamin C. They are the clear winners for their high Vitamin C content. Guava is also rich in fiber which helps prevent constipation.

Papaya is rich in carotene, this is good for your eyes. (also good for gas and indigestion)

Tomatoes are very good as a preventative measure for men, keeps those prostrate problems from invading their bodies.

Thursday, February 21, 2008

Upcoming Google OS


The google seems to be taking all over IT world
There upcoming OS looks stunning
more like Mac OS and Ubuntu, Linux versions

Let's see how good they will be in the future.........

American SUV s converted for export markets in Sri Lanka

Lankan News Photo From : American SUV s converted for export markets in Sri Lanka


Overseas Vehicles Sales Limited will relocate their plant from Negombo Road, Peliyagoda to Kirimandala Mawatha, Narahenpita.

The company is engaged in converting large US built vehicles made by General Motors from left hand to right hand drive for the export market. The vehicles they import are essentially 4-wheel drive Sports Utility vehicles (SUVs) of the Cadillac, GMC and Hummer brands.

Chairman of Overseas Vehicles Sales Limited Peter Hill, an Australian national, decided to locate his plant in Sri Lanka as he has many family friends in the island. This was the main selling point, he added.

The latest vehicle to be converted is the Hummer, the popular civilian version of the vehicle, which is used extensively by the United States military. The conversion from left to right hand drive is a very extensive task, as the vehicles have to be completely taken apart and rebuilt.

The company produces many of the parts which are used in this conversion such as right hand drive dashboards, windscreen wiper panels, centre consoles, electric seats, heater boxes, bracketing for air conditioning, steering boxes and the brake system.

Since the company was established in Sri Lanka in 2003, the project is not new, but the decision to relocate the plant to a larger facility at Kirimandala Mawatha, Narahenpita is an indication of the growing demand for such vehicles.

There are currently 52 right hand drive countries in the world, so the market potential for these converted vehicles is considerable.

Hill, is very optimistic about the market potential for these large and very luxurious SUVs. The economic growth in Asian countries has resulted in increasingly discerning customers who are attracted by the powerful performance, luxurious fittings and near indestructible bodyworks of the American vehicles.

According to Hill his primary export markets will be India, Malaysia, Hong Kong, South Africa, Indonesia and Fiji. The 50 workers employed have been trained to man very advanced equipment needed in the process of converting the vehicles.

The conversion plant at Kirimandala Mawatha, Narahenpita is an ISO standard quality workshop. Hill is confident that the plant will convert about 300 vehicles every year.

He also added that he would like to see his vehicles on Sri Lankan roads. The vehicles he said are ideally suited for Sri Lanka, especially those in the Chevrolet range.

Wednesday, February 13, 2008

Convert String to Date

DateFormat df = new SimpleDateFormat("dd-MM-yyyy");

DateFormat df1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

try
{
Date today = df.parse("20-12-2005");
Date t1 = df1.parse("2008-05-12 08:40:00");


System.out.println("Today = " + df.format(today));
System.out.println("t1 = " + df1.format(t1));

System.out.println(t1);
} catch (ParseException e)
{
e.printStackTrace();
}

for more info http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html

M&M to set up $ 100 mn IT centre in Sri Lanka

Mahindra and Mahindra on Tuesday entered into an agreement with the Board of Investments of Sri Lanka to set up a 100 million dollar IT-ITeS centre in the Economic Processing Zone at Katunayake near here.

The MoU was signed between M&M Executive Director Arun Nanda and Sri Lankan Minister of Enterprise and Investment Sarath Amunugama, in the presence of visiting Indian Minister of State for Commerce Jairam Ramesh.

The centre, to be developed on 53 acre land, would generate 25,000 IT jobs in the island country, Nanda said.

Besides the IT unit from M&M, efforts would be made to rope in top national and global clientale of the Indian company into the Sri Lankan facility, he said.

The work for the IT centre will start within the next six months, he said, adding that the job opportunities provided by the centre would also have a spillover effect on employment in other areas.

Board of Investments is a statutory agency responsible for promoting and facilitating foreign investments in Sri Lanka.

Jairam Ramesh announced that besides the IT centre, the Mahindra group has also decided to set up a manufacturing facility over 900 acre of land at Trincomalee in Eastern Sri Lanka.

He said the agreement to this effect will be reached soon.

Speaking on the occasion, Amunugama said while the IT project will provide employment opportunities, the Trincomalee manufacturing base would act as an integrating point for Sri Lankan communities as this eastern province had equal ratio of Tamil, Sinhala and Muslim population.

Convert String to Date

DateFormat df = new SimpleDateFormat("dd-MM-yyyy");

DateFormat df1 = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");

try
{
Date today = df.parse("20-12-2005");
Date t1 = df1.parse("2008-05-12 08:40:00");


System.out.println("Today = " + df.format(today));
System.out.println("t1 = " + df1.format(t1));

System.out.println(t1);
} catch (ParseException e)
{
e.printStackTrace();
}

Thursday, February 7, 2008

BIGGEST LIE OF USA TILL DATE


Wireless sensor networks - Mobile robots as gateways



This is a new venture that is focused on intelligent mobile robots that are used in flexible environments, not automated toolsets in fixed locations. For example, Intel-based mobile robots will be used at the James Reserve by the Center for Embedded Networked Sensing (CENS) to map terrain and monitor habitats.

Intel silicon for robotics applications is also being used by researchers, such as professor Tucker Balch at the Georgia Institute of Technology. Professor Balch is exploring how robots can organize and perform like social insects, such as bees and ants. Future projects may include the possibility of building a ground-based Robonaut, as well as the brains of the 2009 Mars Rover.


Intel's focus is not on the mechanical aspects of robots -- the wheels, motors, grasping arms or physical layout. Instead, this venture is focused on the silicon and software that give a robot its capabilities and intelligence. Intel's role is to assist researchers in putting powerful, sophisticated intelligence into small, standardized packages for mobile robotics. With wireless technologies now practical and available, this is a novel area for research and investigation.


To assist researchers, Intel is offering inexpensive, standards-based hardware, an open-source operating system, and drivers for use in robotics environments. The open-source package lets researchers take advantage of leading-edge Intel XScale microprocessors and Intel Centrino mobile technology, while reducing the overall costs of developing robotics systems.

What is a robot?



Robotics is not a new field. It has been around for decades. In fact, most people have robots in their own home, even if they don't recognize the robots as such. For example, a dishwasher automatically washes and dries your dishes, then grinds up the rinsed-off food so the organic matter doesn't clog your drains. A washing machine soaks, soaps, agitates, and rinses your clothes. Down the street, the car wash-n-wax cleans, brushes, washes, and waxes your car, all for a few dollars. One of the better known home-oriented robots is iRobot's smart vacuum cleaner, called the Roomba, which has already won the Good Housekeeping Award for efficiency and ease of use.


More sophisticated robots are used in manufacturing plants and warehouses. Car makers use automated machines to position car frames, bolt pieces together, and even do welds and priming. In wafer communications, test systems position themselves along grids, take measurements, and then correlate the data into graphs. Robot-assisted heart microsurgery is now performed routinely in the U.S.


To some extent, we have become so used to robots that we no longer pay attention to the automated machines. We look only at the tasks they complete, and we think of them simply as tools. It is easy to think this way: most of today's robots are stationary tools in fixed locations, like a fruit sorter in a cannery, or an alarm sensor that triggers a call to security.

Robots growing in sophistication


Although we are surrounded by robots that we think of as automated tools, there are some sophisticated robots already in use (photo below). A remote telepresence is one of the most common applications that today's mobile, autonomous robots provide. Intelligence for these robots is handled via an embedded microcontroller that manages internal systems, and by a laptop that is attached to the robot. Humans control the robot through wireless communications. In this way, humans can tell the robot to change directions, shift a camera angle, take measurements, grasp objects, and so on. For example, mobile robots can let security personnel stay in a central office and still check out unsupervised areas in a warehouse or other remote site.



Carnegie Mellon University's TagBots use Intel boards



With advances in microchip design, nanotech sciences, software architecture, and mini-power cells, robot systems can be more than just another pair of eyes. They are already being tested and used in a variety of applications. They can traverse different, even dangerous environments and perform complex tasks on their own. For example, mil-spec iRobot Packbots have been used in Afghanistan to detect and map the locations and contents of caves. Another iRobot rover was used in the historic exploration of both the southern and northern shafts that led to the Queen's Chamber in the Great Pyramid at Giza (Egypt). The rover was able to illuminate areas beyond the blocking stones in the shafts, which had last been viewed by human eyes some 4,500 years ago.

Robot mobility issues

Regardless of a robot's design or tasks, there are still three main issues with its mobility:



  • Localization: How does a robot know where it is in its environment?


  • Mapping: How does the robot know the details of its environment?


  • Navigation: How does a robot traverse its environment?


Intel works closely with researchers to identify novel ways for a robot to perform its mobility tasks. Intel is particularly interested in machine-vision libraries that can be used to perform localization and mapping based on monocular- or stereo-vision systems. For example, right now, most robots navigate by using infrared or radio waves to avoid objects in their paths. However, Intel software researchers recently developed several libraries that are very applicable to robotics systems. Intel's computer vision library is already used extensively by vision researchers.



Intel has also released a test version of a technical library for building Bayesian networks to support machine-learning activities. Bayesian networks are a form of probability-based artificial intelligence. Such a network would let a robot navigate by matching sensor data to a map stored in its memory.

Gateways into sensor networks

Two technologies in particular seem to be moving toward an interesting convergence: mobile robotics and wireless sensor networks. The two main questions here are:



  • Can a mobile robot act as a gateway into a wireless sensor network?


  • Can sensor networks take advantage of a robot's mobility and intelligence?


One major issue with a mobile robot acting as a gateway is the communication between the robot and the sensor network. Sensor networks typically communicate using 900 MHz radio waves. Mobile robots use laptops that communicate via 802.11, in the 2.4- to 2.483-GHz range. Intel hopes to prove that a sensor net can be equipped with 802.11 capabilities to bridge the gap between robotics and wireless networks.

Intel recently demonstrated how a few motes equipped with 802.11 wireless capabilities can be added to a sensor network to act as wireless hubs. Other motes in the network then use each other as links to reach the 802.11-equipped hubs. The hubs forward the data packets to the main 802.11-capable gateway, which is usually a laptop. Using some motes as hubs cuts down on the number of hops any one data packet has to make to reach the main gateway. It also reduces power consumption across the sensor net.

Intel believes that one of the most interesting technology convergences will be in designing mobile robots that can act as gateways into the wireless sensor networks. For example, Intel recently installed small sensors in a vineyard in Oregon to monitor microclimates. The sensors measured temperature, humidity, and other factors to monitor the growing cycle of the grapes, then transmitted the data from sensor to sensor until the data reached a gateway. There, the data was interpreted and used to help prevent frostbite, mold, and other agricultural problems.

The agricultural example shows just how a sensor network could take advantage of a mobile robot's capabilities. Over time, sensors need to be recalibrated, just like any other measuring equipment. If a robot could act as a gateway to the sensor network, it could automatically perform tasks such as calibration. For example, a robot could periodically collect data along the network, determine which sensors are out of tolerance, move to the appropriate location, and recalibrate each out-of-tolerance device.

To look into using mobile robots as gateways to such wireless sensor networks, Intel is bringing in a Ph.D. candidate from the University of Southern California, under the guidance of professor Gaurav Sukhatme. This person will work with Intel on integrating wireless sensor networks into robotics research for localization techniques. This type of collaboration is just one example of how Intel is promoting the convergence of microelectronics and robotics.

Numerous collaborations on robotics projects

Overall, Intel is working with approximately 20 robotics research groups, including Carnegie Mellon University (CMU), University of Southern California (USC), University of Pennsylvania, Northwestern, and Georgia Tech. Intel is also in discussions with universities and robotics manufacturers, such as Sony, about robotic dogs, and Honda and Samsung on using Intel silicon to build robotic humanoids. Intel is also in discussion with NASA and DARPA (the Defense Advanced Research Projects Agency) on several major projects.

Other pilot projects include professor Sebastian Thrun's CMU research into an aerial mapping helicopter (photo below), which is currently about 4 feet in length and which has been demonstrated in certain DARPA programs. Acroname is also using Intel's open-source robotics package in their latest commercial robot, called Garcia (see photo at beginning).




Sebastian Thrun's aerial mapping helicopter




In other collaborations, professor Balch of Georgia Tech is using Intel technology to develop hundreds of mobile robots in order to model the swarm behavior of insects. Professor Vijay Kumar is using Intel's XScale boards (photo below) and open-source software for off-road robot investigations. Professor Illah Nourbakhsh is teaching mobile robot programming using new robotics systems with Intel XScale boards and the Linux operating system.




Intel boards are being used in a number of robotics projects



Robotics task force



The thrust of Intel's robotics effort is to reduce the cost and engineering required to build small, powerful, sophisticated robots. This thrust, however, requires standards and protocols. Right now, robotics standards and protocols are in their infancy. With technology convergence becoming increasingly important in Intel's areas of interest, Intel is leading industry efforts for the Robotics Engineering Task Force (RETF).



The RETF is modeled after the Internet Engineering Task Force (IETF). RETF allows government and university researchers to work together to establish standard software protocols and interfaces for robotics systems. Currently, government representatives include researchers from NASA, DARPA, and NIST (National Institute of Standards and Technology). All told, approximately 35 government and university researchers are already participating in the RETF.



The most pressing issue for the RETF is devising standards for commanding and controlling the mobile robots. The task force has already defined a charter to develop standards for robotics systems. A working draft of the first framework document is now being reviewed for comments.



The task force has also begun work on standards for bridging networks, on protocols, and on application programming interfaces (APIs). Current issues being discussed include intellectual property rights and copyright. The task force hopes to begin work on full specifications as soon as the framework document is approved. The task force expects to publish its work as open-source code when the work is complete, something it hopes to finish in about two years.

Standardized building blocks



As one of the industry leaders of the RETF, Intel is devising low-cost reference designs for relatively small robots. The reference designs are based on silicon for Intel's XScale microprocessor and Intel Centrino mobile technology, flash memory, and 802.11 wireless networking with built-in support for wireless sensor networks. The designs give researchers an intermediate scale between the embedded microprocessors currently used in internal robotics and the large-scale laptops used for mobile intelligence.



The robotics package also includes the open-source Linux 2.4.19 operating system, as well as a multitude of open-source drivers. Drivers include vision-system drivers for sensing infrared, drivers for ultrasonic devices that measure the distance from a robot to objects in the robot's environment, and so on. The software platform also supports Java applications, and integrates USC's Player device server for robotics systems. All elements in the open-source robotics package are wirelessly connected using 802.11 networks.



With internal robot systems standardized, researchers and developers will not have to redesign the wheel for each robot's brain. Instead, developers can spend more time on mobility, visual recognition systems, and the software for artificial intelligence (AI).