JavaScript: Convert String to Integer (int)

To convert strings (text) to integer (number) in JavaScript use the parseInt function.

For example:

document.write(parseInt("23 years"));

Will return the number 23, the function ignores the string “years” and return the integer 23 only.

Another common example is:


If you enter 4 and 5, the script will return “45”  instead of 9.  To fix use the parseInt function as follows:



PHP: Check If Two Strings Are Similar

In php, to check the similarity between to strings (text) use the similar_text for example:

Here’s a PHP function that’ll help you check if two strings (texts) are similar. If the strings are 50% similar then the function will output “Duplicate Entries”.

 0) {
	if (count($result)>(count($array1)/2)){
		echo "Duplicate Entries";


issimilar ( "Hello World Foo Bar Baz", "Hello Foo Bar Baz");


Free Online Website Performance Testings Tools

Here is a list of 10 of my favorite website / web page performance testing tools. The tools test things such as load time, load speed and web server stress, many of them provide helpful tips on how to increases website performance.

GTmetrix | Website Speed and Performance Optimization


Broswer Mob Website Performance Test Web Page Performance Test


Pingdom Tools – Test the load time of a web page


Load Impact


Gomez Web Site Performance Test


Web Page Analyzer – 0.98 – from Website Optimization


Benchmark your website or test the speed of your web connection.


Gomez Instant Test Center


Webserver Stress Tool – 30 Day Free Trial Software



Disable Auto Zoom in Internet Explorer or Safari Using HTML

To disable page auto zoom (auto scale)  in Internet Explorer, Safari or any other browsers, place the following META tag in the head section of your page:

<meta name="viewport" content="width=device-width, user-scalable=no" />

Mr. Speaker: Debating Business Issues in Less than 200 Words

The third of three debates that I wrote for a business class a few years ago. The purpose of the assignment was to debate a business issue in less 200 words. I hope some Business Administration students will find this helpful.

Debate 3: Should the House Bail Out Big Businesses

Mr. Speaker, we are here today to debate the resolution that the House should bail out big business. As side government, we support this resolution and believe strongly that it must stand.

When the failure of a major corporation would reverberate through not only its own sectors but across several sectors, causing wide-spread unemployment, the government should intervene, buying shares in the company and monitoring its operations. Moreover, as a condition of its investment in a troubled corporation, the government should conduct a thorough investigation and audit to ascertain whether the company’s financial shortfalls result from criminal fraud or negligence, prosecuting managers and executives as evidence against them warrants.

“We used to say, ‘As GM goes, so goes the nation,’” North American GM President Mark Reuss quoted the old adage as he spoke with reporters in January. In General Motors, we see a compelling example of a government bail-out’s benefit. Within eighteen months of the government’s investment in GM, the company streamlined its operations, sold-off its unsuccessful ventures, won wage and benefit concessions from the unions, and returned both to profitability and market leadership. Emerging from bankruptcy and bailout as an industry leader, the “new” General Motors repaid its debt to American taxpayers with substantial interest. Timely government intervention in a large corporation’s troubled finances has exactly the remedial effects workers and shareholders want.

Side government, Mr. Speaker, would like to thank the House for its time and, for the reasons stated, reiterate that we believe strongly this resolution must stand.

Thank you, Mr. Speaker.


Calello, P. & Wilson, E. (2010). From bailout to bail-in. Economist, 394(8667).
Retrieved from

Morley, R. (2011, January 24). The Subprime Nation. The Trumpet.
Retrieved from

Ruggles, D. (2010). How, Why We Saved Detroit?. Ward’s Dealer Business, 44(7). Retrieved from