Firefox 3.5.7 slow DNS resolution on windows

by Marcell 21. January 2010 04:26
Bookmark and Share

Recently I've had a problem with firefox. It would take up to 10 seconds for each DNS request making browsing to any site extremely slow.

I tried clearing caches, changing settings in about:config but nothing worked.

The only thing that worked was to create a new default profile for Firefox and copy all the bookmarks, extenstions, etc over to the new one.

 

Tags: ,

Firefox

Comparing SQL Datetime with input Datetime parameters

by Marcell 8. September 2009 17:06
Bookmark and Share

I ran into an issue recently while comparing a datetime entry from an HTML form to a DateTime field in SQL. When .NET parses the entry into a DateTime object and the Time is omitted, it throws off the comparison when it gets to the SQL.

For instance, a user enters "9/8/2009" instead of "9/8/2009 5:00 PM"

To get around this, I came across this little hack for SQL which strips off the time from the SQL datetime when doing the comparison :

 

(SELECT CAST(FLOOR(CAST(someDate AS float)) AS datetime)


What this does:

1. Casts someDate to a float which truncates the time on conversion.
2. Casts back to a datetime which leaves you with a date like 9/8/2009 00:00:00

Tags:

SQL

Javascript Phone Number Entry

by Marcell 4. July 2009 07:35
Bookmark and Share

Here is a small function I wrote to only allow numeric values to be entered into text boxes used for phone number entry.

 

function numbercheck(n){
	var code = n.charCode? n.which: n.keyCode;
	if(code !=8 && code !=9){//allow backspace & tab
		if(code<48 || code > 57){
			return false;
		}		
	}
}

In the second line, n.charCode isn't valid in Internet Explorer, so this provides a quick browser check. If n.charCode returns a value this must not be IE, therefore n.which is also valid.Other than that, IE uses n.keyCode. Since we want to allow tab and backspace, we check for 8 or 9 which are the Javascript key codes tied to those buttons. We also want to allow for key codes between 48 and 57 which are all of the number keys.

 

We tie this function to the input boxes onKeyPress attribute like the example below and thats it.





Tags:

Javascript

My love- My 2006 Nissan Sentra SER Spec-V Turbo

by Marcell 3. July 2009 17:25
Bookmark and Share

So.. I have a turboed Sentra and it is GREAT.

I bought this car in late 2008 bone stock. I decided not to go my normal route and put lowering springs, tint, intake etc...

Sometime in March, april?, A friend of mine from myspecv.com came over and pretty much did most of the install since it was my first time but I definately learned alot from it. I got my kit used but it was in good condition. Here are the details:

Turbonetics T3/T4 .57 Trim .63 A/R Stage 3 turbo

Treadstone intercooler piping kit.

38mm Tial Wastegate &  Tial Blow off Valve

VAFC 2 for tuning from my maxima alongside a Zeitronix Zt-2 Wideband.

Check out my photogallery for pics of the internals.

Anyway, the install took about 2 days. both days we started around 6pm and went to almost 6am. I would do it again anyday!

Few weeks later I went to add on a full 3-inch exhaust system and a vacuum manifold kit but thats little. After about 10k miles, I'm still running the stock clutch and it still grabs great. I even took it to the track.

On to the Vids:

 

 

 


Tags:

Cars

Powered by BlogEngine.NET 1.5.0.7
Theme by Marcell Scarlett


My name is Marcell. I am 21 years old and I work full time as a Web Developer. I love computers, cars and the Web.

Social Networks

  • facebook
  • myspace
  • twitter
  • linkedin
  • youtube


Tag cloud

Page List