I have been looking for a radiator flush and fill for my car for the last couple of months. Dealers are insane when it comes to service your cars. After searching through a couple of forums, I decided to do the flush and fill myself.
My biggest problem was to locate the drain cock. Almost all websites says "locate the drain cock and drain the coolant". I looked under the radiator, back and front, still no luck. Some sites mentioned to remove the protective plastic/metal frame from under the hood so that you can see the drain cock. When I looked under the hood, there are almost 15 screws you need to remove to remove the protective frame. Since so many people are doing the flush and fill as DIY, I thought there has to be an easy way to flush and fill the radiator. I put my hand under the radiator and searched for any kind of connections and there it is!
CAUTION: Unless you want a face transplant, before even opening up the hood, please make sure that your car is completely cooled off. Serious injury can occur if you remove radiator cap or drain cock when the engine is hot. And remember to properly dispose the used coolant in a recycling center.
Now let's get back to the drain part.
Drain:
Once you locate the drain cock, put a 2 gal pan under the hood. Remove the radiator cap and then unscrew the drain cock slowly. As you turn, coolant will start flow through the drain valve. Don't remove the drain cock fully. Let it sit half way until no more coolant is flowing out. Remove the drain cock completely and allow the drain to complete.
Remove the coolant reservoir from the body. Unscrew 3 bolts and lift the reservoir. Remove all coolants from the reservoir. Secure the reservoir back and fill with fresh coolant.
[If you really want to get rid off all the old coolant, you should drain the engine block. To do this, locate the engine drain cock. This is at the back side of the engine. Remove this drain cock and drain the engine block completely]
Fill:
Fill the radiator with fresh coolant (50/50) or add water (Toyota manual says "preferably distilled water") to coolant concentrate to make it 50/50.Make sure you squeeze the top/bottom radiator hose so that trapped air can escape.Top off your radiator and start the engine without the radiator cap. Run for 15-20 min, top off the radiator, close radiator cap, fill reservoir. Take her for a test drive, keep an eye on the engine temperature gauge. Park the car and walk away. Top off the radiator and reservoir after the engine is completely cooled down(couple of hours).
Next >> Car Detailing: The Clay Way
-paul
Monday, December 22, 2008
Wednesday, November 5, 2008
Wood Working: Hanuman, The God of Strength
As I was looking for an item to build for my charity fund raiser, I considered the Hindu God Shiva for my second item. Recently I saw an episode in Discovery channel "Lucy: Mother of Man". Lucy was discovered in 1974 in Ethiopia. What makes her the mother of man was the fact that she routinely walked upright on two legs (Bipedalism) which is "the most distinctive, apparently earliest, defining characteristic of humans."
As I was watching this episode, I remembered a Hindu God, Hanuman, an incarnation of Shiva the God of Destruction and Death. Hanuman's story is depicted in Ramayana as a monkey god who fought with God to defeat the Evil. In one of the stories, he lifted an entire mountain "Dronagiri (in Himalaya)" and in another, he jumped the India ocean to Sri Lanka to fight a war with the king.
During his childhood, Hamunan wanted to learn vedas, so he approached Surya, the Hindu Deity of Sun. Surya refused to accept him as a student, said to Hanuman that it is impossible to learn from Him effectively because He has to be in constant motion. Undeterred, Hanuman raised his body over earth by stepping on the east and west mountains and faced Surya all day. Pleased by his persistence, Surya accepted him as a student.
Almost 400,000 years ago, Humans diverged from Neanderthal (Homo sapiens neanderthalensis) and conquered the world. Neanderthal were much stronger, taller and well built than humans. One theory is the Modern Humans killed all Neanderthals, another suggest a natural extinction. Whatever the case may be, when I saw Neanderthal and Hanuman pictures, in my mind Hanuman is a symbolic missing link between the Humans and the Creator, just like the Neanderthals who link Modern Humans to the "Australopithecus Afarensis", Lucy.
For me, Hanuman represents :
- The Persistence for Learning
- Courage to fight the Evil
- Not everything have an easy way out
- You need to be committed to whatever you do
- One can either quit or dig their heals deeper to reach the next level
- Victor not a Victim
This piece measures 24"x14", made with MDF, 2 coats of black paint and one coat of wipe on polyurethane.
-paul
Friday, October 10, 2008
Wood Working: What would I have done?
Often time when people are faced with a touch decision, you hear them say "What would Jesus Do?". Have you ever wondered what would you be doing if you were living 2000 years back in ancient Jerusalem?
If you were on the King's side, you may be seeing a man, who is accompanied by the poor and sick, as a rebel to the Kingdom and probably say he deserve to die on the cross.
If you were on Jesus's side and believed he is going to start a new kingdom, you probably would be disappointed, sad and angry to hear that tomorrow is the last day of a man you followed, listened and hoped to save you and your family.
No matter which side I am in, there is going to be an image playing over and over in my head of a man on a cross:
- A Man with no chance of escaping the certainty of death.
- A Man who is going to loose everything in a matter of hours.
- A Man bleeding, hungry and thirsty probably falling unconscious but awaken by the screaming of the vultures circling over his head
- A Man mocked, ridiculed and judged by a group
- A Man looking like a failure in the eyes of the people he loved, cared, cured and taught
- The helplessness on a blood covered face
If you were on the roadside while the Procession went to Calvary for the Crucifixion, you still can hear the cries from his beloved, the laughter from the solderers and the carelessness of others. If you close your eyes, you can see the vultures circling over his head, hear their screaming intermingled by the cries of his mother.
I don't think I will go and see the crucified man on a cross. It will be too hard to watch especially when he is about to die. You will be reminded of the eventuality of one day you will have to go through a similar situation. This is how I think I will see him, in my mind, watching from far far away probably in the last hours of the sunset.
Inspiration for this creation is from this photo that I took in in 2004, Iglesia de la Virgen de Guadalupe church in Velarde, New Mexico
I am planning to build two more of these and plan to auction in local churches to raise money for a charity (which takes care of mentally challenged and orphaned kids and adults). 100 percent of the money will go to the charity to feed the inmates and feed other similar patients in hospitals near my village. This is a tribute to my two mothers, One taught me to be compassionate of the sick and poor, Other doing the same even today.
Your visit to this page itself is encouraging and rewarding for me.
-Paul
Wednesday, October 1, 2008
Wood Working: Swing
Couple of years back, I saw a picture of a similar swing in a movie. At first I was not sure I can complete this project. It took almost 4 months, mostly weekends to complete the project. Since I didn't have any measurements or never saw a similar swing in real, it took a lot of trial and error, cutting and re-cutting and a lot of sanding to make this one. Needless to say, I made a lot of Saw Dusts :)
I am a big fan of The New Yankee show and Norm Abram. After watching the show for almost 5 years, I decided it is time for making some saw dusts. I took inspirations from one of Norm's famous projects Highboy and the original movie frame to build this swing.
This is my second wood working project and first time ever using many of the power tools. Backboard is cut with a jig saw. Most of the joints are Mortise and Tenon with minimal mechanical fasteners.
The root on the round table is another project that I did earlier. During my house's construction, I saw an old oak tree root in my property. After peeling off the skin, trimming, filling, sanding, polishing and staining, it turned out to be a good showpiece. It took almost a month mostly weekends to finish the project
Hope you like this as much we do!
-Paul
Sunday, September 21, 2008
c#: Service Trace
Often time we need to monitor the health and activities of a long running service. In this article I am employing a new technique to query the service in an asynchronous and disconnected fashion.
1. Start a master socket with a port and wait for clients to connect. Once the client is connected, add the client socket to the list of client sockets for sending data
2. Send Trace Data in an asynchronous fashion. Loop through the client sockets and then send the data. If the socket is closed, remove it from the list of client sockets
3. In the client application, start a client socket and connect to the host with the port defined in step 1. Once connected, wait for master socket to send data to this client.
4. Asynchronously receive data from the socket. You define a callback handler and as the data comes from the master socket, this handler will get invoked.
5. Wire up an event handler to the socket's receive event handler
6. Wire up this event handler to a web page or a windows application to show the data. Remember to use Control.Invoke method coupled with UpdateTextCallback to update the Windows Form Control texts
You can use a normal text/log writer to log the activities to a flat file instead of the socket implementation that I showed here. However if you are disconnected or to see the log as it happens, this is one of the ways to achieve that.
download code
-Paul
1. Start a master socket with a port and wait for clients to connect. Once the client is connected, add the client socket to the list of client sockets for sending data
2. Send Trace Data in an asynchronous fashion. Loop through the client sockets and then send the data. If the socket is closed, remove it from the list of client sockets
3. In the client application, start a client socket and connect to the host with the port defined in step 1. Once connected, wait for master socket to send data to this client.
4. Asynchronously receive data from the socket. You define a callback handler and as the data comes from the master socket, this handler will get invoked.
5. Wire up an event handler to the socket's receive event handler
6. Wire up this event handler to a web page or a windows application to show the data. Remember to use Control.Invoke method coupled with UpdateTextCallback to update the Windows Form Control texts
You can use a normal text/log writer to log the activities to a flat file instead of the socket implementation that I showed here. However if you are disconnected or to see the log as it happens, this is one of the ways to achieve that.
download code
-Paul
Wednesday, September 17, 2008
jsf: hidecontent tag - same as aspnet's placeholder
While working on a java project, I needed to hide certain contents and functionalities from a subset of users. I couldn't find a built-in tag to accomplish this functionality.
Here is a sample page that uses this tag to show Access Denied message when a non-privileged user try to access a page
For example consider a simple application with 2 roles.
Editor role can add/remove items (say products). Admin role approves new/edited items, publish for sale on website and can view all reviews of the products.
Assume that we have 3 sections in our web page, one for Product Details (Editor Role has full privilege), Admin (Admin Role has full privilege), Review ratings(Admin Role has full privilege).
This placeholder component is a perfect fit for such a scenario. This is a very simple component which uses a div tag's visibility attribute to hide contents.
Here is how to make such a component. See jsf documentation on a more detailed explanation of each of these items
1. Create a Render Class. I am using 2 properties to check the privilege (just to show you that you can have as many properties as you like to do business logic checks)
2. Create the Tag Class. Nothing fancy here, couple of getter and setters
3. Create Tag Descriptor. Think tld as an explanation of the properties of our tag.
4. Add to faces-config.xml. Add to faces-config to consume in our web pages
5. Add to Page. Add the taglib prefix and set the variables.
download code and rename to .zip
[Child controls' required attribute need to be changed to false if you are enabling a form post for non-privileged users]
That's it!
-Paul
Here is a sample page that uses this tag to show Access Denied message when a non-privileged user try to access a page
For example consider a simple application with 2 roles.
Editor role can add/remove items (say products). Admin role approves new/edited items, publish for sale on website and can view all reviews of the products.
Assume that we have 3 sections in our web page, one for Product Details (Editor Role has full privilege), Admin (Admin Role has full privilege), Review ratings(Admin Role has full privilege).
This placeholder component is a perfect fit for such a scenario. This is a very simple component which uses a div tag's visibility attribute to hide contents.
Here is how to make such a component. See jsf documentation on a more detailed explanation of each of these items
1. Create a Render Class. I am using 2 properties to check the privilege (just to show you that you can have as many properties as you like to do business logic checks)
2. Create the Tag Class. Nothing fancy here, couple of getter and setters
3. Create Tag Descriptor. Think tld as an explanation of the properties of our tag.
4. Add to faces-config.xml. Add to faces-config to consume in our web pages
5. Add to Page. Add the taglib prefix and set the variables.
download code and rename to .zip
[Child controls' required attribute need to be changed to false if you are enabling a form post for non-privileged users]
That's it!
-Paul
Monday, August 11, 2008
Sql: Convert Number to Digit
I worked on a project that needs to convert numbers to digits and display to the users. For example display $100.00 as "one Hundred Dollar and Zero Cents"
I couldn't find any system defined sproc or func in Sql Server to handle this request. So I set out to build a simple func to return USD in digits.
[This was one of my earliest Transact Sql sprocs that I wrote in Sql Server 5.0, I just converted the sproc logic to funcs in Sql 2000 here. There are CLR functions out there to do this job (for Sql 2005) however the Sql server instance was 2000, so I was not able to use Sql CLR function for this.]
Here are the main logic
1. Convert 0 to 9 to digits(1 to 'One', 2 to 'Two'...)
2. Convert 10 to 19 to digits (10 to 'Ten', 11 to 'Eleven'...)
3. Convert 10*2 to 10*9 to digits (20 to 'Twenty', 30 to 'Thirty'...)
4. Convert 100*x by appending step 1 result with 'Hundred' (100 to 'One'+' Hundreds'..)
5. Convert thousands, millions etc by appending appropriate labels. This is based on how the numbers are grouped to obtain thousands, millions etc in the requested currency
6. Take 2 decimal points and apply step 1 or 2 and append the result
7. Wrap all these funcs into an entry point function, loop through the numbers and append the results to a string.
You can easily alter the logic to add more currencies or port this to other RDBMS that supports funcs.
You can change the funcs with sprocs if your rdbms doesn't support funcs
That's all there to it!
download
-Paul
I couldn't find any system defined sproc or func in Sql Server to handle this request. So I set out to build a simple func to return USD in digits.
[This was one of my earliest Transact Sql sprocs that I wrote in Sql Server 5.0, I just converted the sproc logic to funcs in Sql 2000 here. There are CLR functions out there to do this job (for Sql 2005) however the Sql server instance was 2000, so I was not able to use Sql CLR function for this.]
Here are the main logic
1. Convert 0 to 9 to digits(1 to 'One', 2 to 'Two'...)
2. Convert 10 to 19 to digits (10 to 'Ten', 11 to 'Eleven'...)
3. Convert 10*2 to 10*9 to digits (20 to 'Twenty', 30 to 'Thirty'...)
4. Convert 100*x by appending step 1 result with 'Hundred' (100 to 'One'+' Hundreds'..)
5. Convert thousands, millions etc by appending appropriate labels. This is based on how the numbers are grouped to obtain thousands, millions etc in the requested currency
6. Take 2 decimal points and apply step 1 or 2 and append the result
7. Wrap all these funcs into an entry point function, loop through the numbers and append the results to a string.
You can easily alter the logic to add more currencies or port this to other RDBMS that supports funcs.
You can change the funcs with sprocs if your rdbms doesn't support funcs
That's all there to it!
download
-Paul
Tuesday, August 5, 2008
c#: nmap in c#
nmap is a very useful network discovery tool. In a recent project I needed to enumerate all windows computers in a subnet. After searching through a couple of sites, I couldn't find anything that suited my need. So I decided to build a library to use in my project.
[If all your computers are in a domain, you can very easily enumerate all computers by DirectoryServices class. However when you have domains and workgroups in your network, this may be the only way to get the machine list]
Here is how I tackled the problem.
1. Scan the entire subnet and enumerate active devices.
2. Resolve ip address to host names by our trusted System.Net.Dns namespace
3. telnet to 3389 on these enumerated devices. This will give all windows machines in the network. (check msdn for other standard windows port in case you want to use a different port)
4. Use multi-thread in the enumeration process to speed up the whole thing.I am using a utility class to hold the data for multi threading
5. Populate a struct with the name and ip value and return as a List<>
If you are going to use this a production environment, monitor the thread usage and adjust it either pulling from a config file or from registry/database.
P.S. I am using a wrong coding convention for method name here because I am extending a library that was already standardized in this coding convention
download
That's it!
-Paul
[If all your computers are in a domain, you can very easily enumerate all computers by DirectoryServices class. However when you have domains and workgroups in your network, this may be the only way to get the machine list]
Here is how I tackled the problem.
1. Scan the entire subnet and enumerate active devices.
2. Resolve ip address to host names by our trusted System.Net.Dns namespace
3. telnet to 3389 on these enumerated devices. This will give all windows machines in the network. (check msdn for other standard windows port in case you want to use a different port)
4. Use multi-thread in the enumeration process to speed up the whole thing.I am using a utility class to hold the data for multi threading
5. Populate a struct with the name and ip value and return as a List<>
If you are going to use this a production environment, monitor the thread usage and adjust it either pulling from a config file or from registry/database.
P.S. I am using a wrong coding convention for method name here because I am extending a library that was already standardized in this coding convention
download
That's it!
-Paul
Saturday, August 2, 2008
java: Pass parameters by name to Sql sproc
If you are using sproc to access data and your programming language is java, you might be interested in this small utility to pass parameters by name to any sproc or function in Sql Server (v7.0, 2000 and 2005 are tested)
I was developing a java application and all our business logics were in sprocs. Data access and manipulation were done by sprocs and functions. We were using Microsoft JDBC driver and everything was fine until we realized the clunkiness of passing parameters by position restriction.
In java to call a sproc, you need to use CallableStatement stmt = connection.prepareCall("{call sp_name(?,?,..)}")
There is no way to pass the name of the parameter to the sproc. I borrowed a technique from aspnet's DeriveParameter implementation to fix this issue. DeriveParameters calls sp_sproc_columns and then dynamically build the parameters with proper data type and data size
1. Define a SqlParam object with Name, Value, Type and IsOutput properties.
2. Create a method to get the sproc's parameters by calling sp_sproc_columns system sproc. Get the resultset, loop through the resultset and then build an arraylist of SqlParam object. (you can persist this in an application scoped object to improve performance)
3. In the calling function, you build the SqlParam arraylist with the same parameter name as the proc and the parameter values.
4. Loop through the derived param list and build the callable statement like {call sproc (?,?..)}.
Loop through the derived param list then match the parameter name to the calling param list and then build the actual parameter collection. This ensure that the order in which the parameters are added to the parameter collection matches the sproc parameter position.
5.Loop through the derived parameters and build the output parameters' value into your calling param list (so that you can access this from the calling method)
6. Build parameter name and value to debug/error log in the catch section
To Call a Function
1. You need to exclude "@RETURN_VALUE" and "@TABLE_RETURN_VALUE" in the buildParameter function
2. If the function is a table valued function, then use "select * from(?,?)" statement.
3. If the function is a scalar valued function, the use "select from function(?,?)" statement
download code
That's it!
Paul
I was developing a java application and all our business logics were in sprocs. Data access and manipulation were done by sprocs and functions. We were using Microsoft JDBC driver and everything was fine until we realized the clunkiness of passing parameters by position restriction.
In java to call a sproc, you need to use CallableStatement stmt = connection.prepareCall("{call sp_name(?,?,..)}")
There is no way to pass the name of the parameter to the sproc. I borrowed a technique from aspnet's DeriveParameter implementation to fix this issue. DeriveParameters calls sp_sproc_columns and then dynamically build the parameters with proper data type and data size
1. Define a SqlParam object with Name, Value, Type and IsOutput properties.
2. Create a method to get the sproc's parameters by calling sp_sproc_columns system sproc. Get the resultset, loop through the resultset and then build an arraylist of SqlParam object. (you can persist this in an application scoped object to improve performance)
3. In the calling function, you build the SqlParam arraylist with the same parameter name as the proc and the parameter values.
4. Loop through the derived param list and build the callable statement like {call sproc (?,?..)}.
Loop through the derived param list then match the parameter name to the calling param list and then build the actual parameter collection. This ensure that the order in which the parameters are added to the parameter collection matches the sproc parameter position.
5.Loop through the derived parameters and build the output parameters' value into your calling param list (so that you can access this from the calling method)
6. Build parameter name and value to debug/error log in the catch section
To Call a Function
1. You need to exclude "@RETURN_VALUE" and "@TABLE_RETURN_VALUE" in the buildParameter function
2. If the function is a table valued function, then use "select * from
3. If the function is a scalar valued function, the use "select
download code
That's it!
Paul
Subscribe to:
Posts (Atom)