Sunday, December 18, 2005
Food As Medicine
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.
TO PREVENT STROKE DRINK TEA
Prevent build-up 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 help! s 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 SYNDRO! ME ? EAT CORNFLAKES
Women can ward off the effects of PMS with (alpha-Q@yahoogroups.com) 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 estrogens at healthy levels.
LUNG CANCER ? EAT DARK GREEN & 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.
Kiwifruit: But mighty. This is a good source of potassium, magnesium, Vitamin E & fibre. 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 c! ancer 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.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.
Note : This is an extract from a forwaded mail
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.
TO PREVENT STROKE DRINK TEA
Prevent build-up 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 help! s 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 SYNDRO! ME ? EAT CORNFLAKES
Women can ward off the effects of PMS with (alpha-Q@yahoogroups.com) 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 estrogens at healthy levels.
LUNG CANCER ? EAT DARK GREEN & 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.
Kiwifruit: But mighty. This is a good source of potassium, magnesium, Vitamin E & fibre. 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 c! ancer 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.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.
Note : This is an extract from a forwaded mail
Thursday, December 15, 2005
Java Code for Oracle CLOB
//this program is for writing to clob and reading from clob column.
//for running this program include ojdbc14.jar available in oracle site.
class TestOraCLobInsert {
public static void main (String args []) throws SQLException {
try {
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@server:1521:sid", "uid", "pwd");
PreparedStatement ps = conn.prepareStatement("INSERT INTO CLOBTABLE VALUES (?)");
oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(conn, false, oracle.sql.CLOB.DURATION_CALL);
newClob.putString(1,"This string, up to 4 gigabytes will be inserted into the CLOB");
ps.setClob(1, newClob);
int rowcnt = ps.executeUpdate();
System.out.println("Successful update of "+rowcnt+" row");
ps.close();
// for reading the data from the clob data type
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from t_temp");
while(rs.next()){
int i = rs.getInt(1);
oracle.sql.CLOB objClob = (oracle.sql.CLOB)rs.getClob(2);
InputStream objIS = objClob.getAsciiStream();
ByteArrayOutputStream objByteArrayOutputStream = new ByteArrayOutputStream(objIS.available());
byte b[] = new byte[1024];
int intReadBytes;
while((intReadBytes=objIS.read(b, 0,objIS.available() )) != -1) {
objByteArrayOutputStream.write(b, 0, intReadBytes);
}
System.out.println(objByteArrayOutputStream.toString());
}
conn.close();
}
catch (Exception e) {
System.out.println("Java Exception caught, error message="+e.getMessage());
}
}
}
//for running this program include ojdbc14.jar available in oracle site.
class TestOraCLobInsert {
public static void main (String args []) throws SQLException {
try {
DriverManager.registerDriver (new oracle.jdbc.driver.OracleDriver());
Connection conn = DriverManager.getConnection ("jdbc:oracle:thin:@server:1521:sid", "uid", "pwd");
PreparedStatement ps = conn.prepareStatement("INSERT INTO CLOBTABLE VALUES (?)");
oracle.sql.CLOB newClob = oracle.sql.CLOB.createTemporary(conn, false, oracle.sql.CLOB.DURATION_CALL);
newClob.putString(1,"This string, up to 4 gigabytes will be inserted into the CLOB");
ps.setClob(1, newClob);
int rowcnt = ps.executeUpdate();
System.out.println("Successful update of "+rowcnt+" row");
ps.close();
// for reading the data from the clob data type
Statement stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery("select * from t_temp");
while(rs.next()){
int i = rs.getInt(1);
oracle.sql.CLOB objClob = (oracle.sql.CLOB)rs.getClob(2);
InputStream objIS = objClob.getAsciiStream();
ByteArrayOutputStream objByteArrayOutputStream = new ByteArrayOutputStream(objIS.available());
byte b[] = new byte[1024];
int intReadBytes;
while((intReadBytes=objIS.read(b, 0,objIS.available() )) != -1) {
objByteArrayOutputStream.write(b, 0, intReadBytes);
}
System.out.println(objByteArrayOutputStream.toString());
}
conn.close();
}
catch (Exception e) {
System.out.println("Java Exception caught, error message="+e.getMessage());
}
}
}
Sunday, December 11, 2005
Oracle Cursor : Java Resultset
This program shows how to return the cursor from the oracle function and how to access it in java as a resultset
ORACLE CODE
------------
step 1
package TestORA;
CREATE OR REPLACE PACKAGE TYPES
AS
TYPE cursorType IS REF CURSOR;
END;
step 2
package TestORA;
CREATE OR REPLACE FUNCTION temp_comp RETURN TYPES.cursortype
AS
l_cursor TYPES.cursortype ;
BEGIN
OPEN l_cursor FOR SELECT USER_GROUP,company_code FROM COMPANY;
RETURN l_cursor;
END;
JAVA CODE
----------
import java.sql.*;
import oracle.jdbc.driver.*;
class TestResult{
public static void main(String args[]){
TestResult objTestResult = new TestResult();
}
TestResult(){
try{
String driver = "oracle.jdbc.driver.OracleDriver";
String constr = "jdbc:oracle:thin:@ipaddress:1521:servicename;
Connection conn;
Class.forName(driver);
conn = DriverManager.getConnection(constr, "username", "password");
String query = "begin :1 := temp_comp; end;";
CallableStatement cstmt = conn.prepareCall(query);
cstmt.registerOutParameter(1,OracleTypes.CURSOR);
cstmt.execute();
ResultSet rset = (ResultSet)cstmt.getObject(1);
while (rset.next ())
System.out.println( rset.getString (1) );
cstmt.close();
System.out.println("Coonected to data base");
conn.close();
}catch(ClassNotFoundException eClassNotFoundException){
eClassNotFoundException.printStackTrace();
}catch(SQLException eSQLException){
eSQLException.printStackTrace();
}
}
}
ORACLE CODE
------------
step 1
package TestORA;
CREATE OR REPLACE PACKAGE TYPES
AS
TYPE cursorType IS REF CURSOR;
END;
step 2
package TestORA;
CREATE OR REPLACE FUNCTION temp_comp RETURN TYPES.cursortype
AS
l_cursor TYPES.cursortype ;
BEGIN
OPEN l_cursor FOR SELECT USER_GROUP,company_code FROM COMPANY;
RETURN l_cursor;
END;
JAVA CODE
----------
import java.sql.*;
import oracle.jdbc.driver.*;
class TestResult{
public static void main(String args[]){
TestResult objTestResult = new TestResult();
}
TestResult(){
try{
String driver = "oracle.jdbc.driver.OracleDriver";
String constr = "jdbc:oracle:thin:@ipaddress:1521:servicename;
Connection conn;
Class.forName(driver);
conn = DriverManager.getConnection(constr, "username", "password");
String query = "begin :1 := temp_comp; end;";
CallableStatement cstmt = conn.prepareCall(query);
cstmt.registerOutParameter(1,OracleTypes.CURSOR);
cstmt.execute();
ResultSet rset = (ResultSet)cstmt.getObject(1);
while (rset.next ())
System.out.println( rset.getString (1) );
cstmt.close();
System.out.println("Coonected to data base");
conn.close();
}catch(ClassNotFoundException eClassNotFoundException){
eClassNotFoundException.printStackTrace();
}catch(SQLException eSQLException){
eSQLException.printStackTrace();
}
}
}
Subscribe to Comments [Atom]