Thursday, October 18, 2007

One liners..

A collection of One Liners ....

"Great spirits have always encountered violent opposition from mediocre minds"

"I do not know with what weapons World War 3 will be fought, but World War 4 will be fought with sticks and stones."

"Science without religion is lame, religion without science is blind."

"God does not play dice with the universe."

"Common sense is the collection of prejudices acquired by age 18."

"Nothing will benefit human health and increase the chances for survival of life on Earth
as much as the evolution to a vegetarian diet"

"Only two things are infinite, the universe and human stupidity, and I'm not sure about the former."

"Problems cannot be solved at the same level of awareness that created them."

"Few are those who see with their own eyes and feel with their own hearts."

"Peace cannot be achieved through violence, it can only be attained through understanding."

"When the solution is simple, God is answering."

"Where the world ceases to be the scene of our personal hopes and wishes, where we face it as free beings admiring, asking and observing, there we enter the realm of Art and Science"

"Watch the stars, and from them learn.
To the Master's honor all must turn, each in its track, without a sound, forever tracing Newton's ground."

"Things should be made as simple as possible, but not any simpler."

"Put your hand on a hot stove for a minute, and it seems like an hour.
Sit with a pretty girl for an hour, and it seems like a minute.
THAT's relativity."

"Gravitation can not be held resposible for people falling in love"

Tuesday, October 16, 2007

autonomous transaction

Autonomous transactions are commonly used by error logging routines, where the error messages must be preserved, regardless of the the commit/rollback status of the transaction. For example, the following table holds basic error messages.

CREATE TABLE error_logs (
id NUMBER(10) NOT NULL,
log_timestamp TIMESTAMP NOT NULL,
error_message VARCHAR2(4000),
CONSTRAINT error_logs_pk PRIMARY KEY (id)
);

CREATE SEQUENCE error_logs_seq;
We define a procedure to log error messages as an autonomous transaction.

CREATE OR REPLACE PROCEDURE log_errors (p_error_message IN VARCHAR2) AS
PRAGMA AUTONOMOUS_TRANSACTION;
BEGIN
INSERT INTO error_logs (id, log_timestamp, error_message)
VALUES (error_logs_seq.NEXTVAL, SYSTIMESTAMP, p_error_message);
COMMIT;
END;
/

For more info:
http://orafaq.com/node/1915

http://www.oracle-base.com/articles/misc/AutonomousTransactions.php

Friday, October 12, 2007

Going Green

courtesy:www.coned.com



Overview

1. Americans spend more than $160 billion a year to heat, cool, light, and live in their residences.

2. Heating and cooling use more energy and drain more energy dollars than any other systems in your home.

3. Typically, 45% of your utility bill goes for heating and cooling.

4. Heating and cooling systems in the United States emit 150 million tons of carbon dioxide into the atmosphere each year, adding to global climate change.

5. Heating and cooling systems generate about 12% of the nation's sulfur dioxide and 4% of the nitrogen oxides, the chief ingredients in acid rain.

6. Save 20% to 30% on energy bills with energy-efficiency improvements.

7. Cut your energy use and reduce emissions from 20% to 50% with proper insulation, air sealing, and thermostat settings.





Appliances

8. Many appliances continue to draw a small amount of power even when they are switched off. Unplug appliances after use.

9. The lower the wattage or amperage, the less energy consumed.

10. Replace older appliances with Energy Star-qualified appliances; they use less energy and can save you money.

11. Appliances account for about 20% of your household's energy consumption.

12. Learn more about Energy Star-qualified appliances at www.energystar.gov.

13. Use energy-saving settings on all appliances.

14. Electric kettles use less energy than stovetop kettles.

15. Run the dishwasher only when it's full.

16. 60% to 80% of the power used by a dishwasher just heats water.

17. Run your clothes washer only with a full load of laundry.

18. An Energy Star washer can save more water than one person drinks in a lifetime.

19. Wash your laundry with cold water to save energy and money.

20. U.S. households spend up to $135 per year in energy costs drying clothes.

21. Gas dryers are more efficient than electric ones.

22. Overloading the dryer makes it work harder.

23. Front loaders generally conserve water and are more efficient.

24. Dryers with cool-down or perm-press cycles use cool air during the last few minutes; this saves energy.

25. Refrigerators, clothes washers, and clothes dryers are at the top of the energy-consumption list.

26. A dirty lint filter can use 30% more energy.



Air Conditioners

27. Air conditioning accounts for about 56% of your energy use.

28. Set your AC to 78 degrees. 75 degrees costs 18% more, and 72 degrees costs 39% more.

29. Keep air-conditioner filters clean.

30. Air-conditioner capacity should be the right amount for the size of the room.

31. Look for an air conditioner with built-in timers and thermostats.

32. In winter, close the air-conditioning unit, unplug, and cover.

33. For air conditioners, look for a high Seasonal Energy-Efficiency Ratio (SEER). The current minimum is 13 SEER for central air conditioners. Energy Star models are 13 SEER or more.



General Home Care

34. Energy-efficient homes are less costly to own, operate, and maintain, and they are more comfortable.

35. In the winter, set your thermostat at 68 degrees during the day and 60 degrees at night.

36. Inspect your cooling system in the spring and heating system in the fall.

37. Regularly clean or replace your furnace, air conditioner, and heat-pump filters.

38. Close curtains during hot summer months to block the sun.

39. Every year, more than $13 billion worth of energy leaks from homes through small holes and cracks. That’s more than $150 per family.

40. Seal drafty windows, doors, and holes around plumbing fixtures.

41. Water heaters consume 85% to 90% of the energy used to wash your clothes.

42. Turn down your water heater to the "warm" setting (120 degrees).

43. Turn off kitchen, bath, and other exhaust fans within 20 minutes after cooking or bathing.

44. Replace older exhaust fans with high-efficiency, low-noise models.

45. One thousand watt-hours equals 1 kilowatt-hour, or 1 kWh.

46. The average residential rate is 8.3 cents per kWh.

47. A typical U.S. household consumes about 11,000 kWh per year, costing an average of $900 annually.

48. A refrigerator uses almost five times more electricity than a television.

49. Across America, home refrigerators use the electricity generated by 25 large power plants every year.

50. Every time you open the refrigerator door, up to 30% of cold air escapes.

51. Position refrigerators away from direct sunlight and heat sources.

52. Pack items tightly in freezer.

53. Make sure rubber gaskets on refrigerator doors provide a tight seal.

54. Clean coils and remove dust from behind the refrigerator.

55. Recycling one aluminum can save enough energy to watch television for three hours.



Lighting

56. If we changed an incandescent light bulb for every child in America, it would prevent more than 30 billion pounds of greenhouse gas emissions and save enough money to light more than 15 million homes for an entire year.

57. Making improvements to your lighting is one of the fastest ways to cut your energy bills.

58. Look for the Energy Star label when purchasing lighting products.

59. Turn off lights when not home and buy a timer to turn them on 1/2 hour before returning home.

60. Lighting accounts for about 20% of the average home’s electric bill.

61. The average home has about 30 light fixtures.

62. Keep fixtures clean.

63. By using new lighting technologies, you can reduce lighting energy use in your home by 50% to 75%.

64. Replace your incandescent light bulbs with compact fluorescents (CFLs). They use 75% less energy and last 10 times longer.

65. Exterior lighting is one of the best places to use CFLs because of their long life.

66. Use brighter bulbs for reading and work areas; use 25- to 40-watt bulbs where only some light is needed.

67. Consider using 4-watt minifluorescent or electro-luminescent night lights.

68. Use dimmers.

69. Turn off the lights in any room you're not using, or consider installing timers, photo cells, or sensors to save money.

70. Instead of brightly lighting an entire room, focus the light where you need it.

71. Use fluorescent under-cabinet lighting for kitchen sinks and countertops.

72. Three-way lamps make it easier to keep lighting low when brighter light is not necessary.

73. Use four-foot fluorescent fixtures with reflective backing and electronic ballasts for your workroom, garage, and laundry areas.

74. You can save about $35 annually if you replace four standard incandescent lamps with CFLs.

75. Properly recessed down lights or high hats can now be used in retrofits or new construction with CFLs.

76. Take advantage of daylight by using light-colored, loose-weave curtains on your windows to allow daylight to penetrate the room while preserving privacy.

77. Decorate with lighter colors that reflect daylight.

78. Replace torchiere fixtures with halogen lamps with compact fluorescent torchieres.

79. Compact fluorescent torchieres use 60% to 80% less energy. They produce more light and produce less heat.



Outdoor Lighting

80. Use outdoor lights with a photocell unit or a motion sensor so they go on only at night or when someone is present.

81. A combined photocell and motion sensor will increase your energy savings even more.

82. Turn off decorative outdoor natural gas lamps; just eight such lamps burning year round use as much natural gas as it takes to heat an average-size home all winter.

83. Try outdoor solar lighting systems. They convert sunlight into electricity.

84. If you live in a cold climate, buy a lamp with cold-weather ballast, since standard CFLs may not work well below 40 degrees.

85. Consider high-intensity discharge (also called HID) or low-pressure sodium lights.



Computers

86. Turn off your computer monitor when not in use for more than 20 minutes.

87. Turn off your computer when not in use for more than two hours.

88. Unplug your cell phone and blackberry chargers when they're not being used.

89. A laptop uses half the energy of a desktop computer.

90. Use a power strip/surge protector for your computer, monitor, printer, and other computer accessories.

91. To maximize savings with a laptop, put the AC adapter on a power strip that can be turned off or that will turn off automatically.

92. Turn off the switch on the power surge strip when the equipment is not in use.

93. Using rechargeable batteries for products like cordless phones and PDAs is more cost effective than throwaway batteries.

94. An Energy Star computer uses 70% less electricity.

95. If left inactive, Energy Star computers enter a low-power mode and use 15 watts or less.

96. Working in low-power mode saves energy, and helps equipment run cooler and last longer.

97. Screen savers on monitors do not reduce energy.

98. Switch to the sleep mode or manually turn monitors off to save energy.

99. Inkjet printers consume less electricity than laser printers.



Visit

100. Visit the following sites for more information:

Thursday, October 11, 2007

Eclipse Java Home set up

While compiling the new project you'll have to set up class path variables,

You do so by rt click on the project --> properties

here is the screen shot

Setting up Eclipse workspace

1) SVN checkout to the folder..
2) step 1 will create all the reqd folders for your project
3) EX: if its an Enterprise proj, will create app, app-ejb, app-web
4) In your eclipse switch to the new workspace point to the directory just created
5) Create a new project in Eclipse (If its an enterprise proj, select enterprise project or just select java project)
6) Enterprise project will ask you to create 3 folders, appname, appejb and appweb
7) Name these projects same as the folders checked out from svn, (doing so will import all ur files and folder structures from the directory)

Setting Class path:

Rt click on the webproject and properties, in the build path and libraries, copy all the jar's from your webroot/web-inf/lib to here.

Also copy JRE jars from the apt location, usually from the server (so that ur server and ur eclipse use the same version of java)

In source tab make sure you have the project--> Src directory there. Or you will see complation errors (in eclipse) for all import stmts in ur java files


Some screen shots:




Create a folder in ur local machine, where you want to set up the workspace

Wednesday, October 10, 2007

eclipse filter on error window

Filter is found as an small iconon the error window

Click on the icon and

unchcek the defualt check box

1) Set the radio button to On selected elements and its childern

Uncheck the following
1) JSF config problems
2) JSP schematic problems
3) Validation message
4) XML schema problems

doing so will reduce errors in ur eclipse error window :)

FTP to server from Command prompt

Learning to FTP a file to your server from command prompt

From start--> run --> cmd

cd to the folder where you have the file to transfer from (from your local)

type in ftp

here ftp cmc452432

type in user id and pwd

cd to the folder where you want to copy

type bin <>

type put

you are done.. =)

FTP is complete

Screen shot

Wednesday, October 3, 2007

Wanna know traffic to your website..

sooo cool.. just type in any web address and u can see the # of hits in last 3 mo to 1 yr

http://www.alexa.com/data/details/traffic_details

Enter : listentosonu.blogspot.com