Monday, October 31, 2011

JavaScript Performance Testing

Recently I found a site which enable us to compare the performance of different JavaScripts that we write. This makes us choose the best code when we have several ways of doing the same thing because we can compare the performance of the script that we wrote easily.

If you are interested, go to http://jsperf.com/ to start testing.

You need to just put in “Presentation code HTML” and the required JavaScripts as test cases. Then after saving you can run the tests to check for performance.

Another feature of this site is that you can share your tests with others since you can access the tests using the shown public URL.

imageimage

Saturday, September 17, 2011

TechEd Australia – Videos

As you might know TechEd Australia ended few weeks back. I am sure lot of you might not have the chance to visit it. The good thing is you can watch the recorded sessions online now by visiting the following site.

http://channel9.msdn.com/events/teched/australia/tech-ed-australia-2011

I think this will be mostly useful to people who didn’t visit TechEd and also to people who visited it to refresh their minds.

Monday, August 29, 2011

Installing a Telephone Connector

In the current place I am living I didn’t have a telephone connection, when I applied for a connection and got the connection I found that some of the line wiring and connectors are out of shape. So I had to replace some items and rewire. When doing it I faced few issues since the connector was a legacy connector. So I thought to put an article on how to correctly get it done.

The connector I found in my place is the old Australian connector which is sometimes named as legacy Australian connector or 610 socket. Following are some images to correctly identify it.

imageimageimage

 

 

 

 

 

 

To get it correctly fitted first you need to identify your correct wire pairs, luckily in mine only one pair was working (meaning only one line was present). So I just used my multi meter to find the correct wire pair. Since phone wires will have DC current remember to put your multi meter into DC mode before measuring. Also note that phone lines may conduct 24v-50v DC current normally. When ringing this will change to 75v-90v AC.

IMPORTANT - If you touch them directly you might get an electric shock even though it is not deadly so always make sure you are wearing gloves or adequate footwear since if you do not like to get shocked.

Even though the old phone cables only had 4 wires the new ones are having more. Sometimes this can even be 50. When there are more wires it means that the wire can be used to connect more lines. For example a cable with 4 wires can be used for 2 lines. A cable with 16 wires can transmit 8 phone lines. To identify the pairs correctly phone wires inside a cable are color coded. Since I am not an expert in this area I will only talk about 6 wired cables. The following will be helpful to find the correct wire pairs for you.

  • Pair 1 ring (Blue) 6
  • Pair 1 tip (White) 2
  • Pair 2 ring (Black) 1
  • Pair 2 tip (Red) 5
  • Pair 3 ring (Green) 3
  • Pair 3 tip (Orange) 4

Now you may be wondering few things, wait I will try to explain.

In the above cable since it has 6 wires it can accommodate 3 phone lines or pairs. For example first pair is White and Blue wires, second pair is Black and Red wires and third pair is Green and Orange wires.

The words ring and tip are like live and neutral or + and –. Ring is battery negative and tip is ground. Since some answering machines do need these correctly hooked in it is always good to connect them correctly to get the ultimate from your equipment.

The last digit in Black represent the place the wire should be connected in the phone socket. To explain this more I will use the following picture I took on 610 socket after removing its cover.

image

If you closely look into the socket you will see there are numbers from 1 to 6 (sorry they are not visible in the image) marking the pins. The numbering starts from right to left in the image. So the Red wire in the image is connected to pin 1 and Blue wire is connected to pin 6.

After identifying the pins in the socket and wire pairs the next step is to correctly connect them. You just need to connect the pairs as per the last digit shown in the bulleted list above. If you correctly got it it should end up like this.

From right to left on the socket.

  • Pair 2 ring (Black) – Pin 1
  • Pair 1 tip (White) – Pin 2
  • Pair 3 ring (Green) – Pin 3
  • Pair 3 tip (Orange) – Pin 4
  • Pair 2 tip (Red) – Pin 5
  • Pair 1 ring (Blue) – Pin 6

Then replace the socket cover and plug in the compatible plug (605) into the socket.

image

As you see in my plug only four contacts are there meaning I only can use 2 phone lines (pairs), but since I only have one line this is not an issue to me. So make sure to find the correct plug if you are trying to utilize all 3 pairs.

I know there must be many unanswered questions. Even though I am not an expert on this area let me know if you face any problems, I will try to help you.

Thursday, July 28, 2011

Comparing Content Management Systems

Recently I needed to compare the features of different Content Management Systems (CMS) and came up to the following site which has a huge list of Systems with the ability to compare their features.

http://www.cmsmatrix.org/

Thursday, July 07, 2011

Came Back to Australia

Since last May I was back in Australia with my wife, so didn’t had a chance to update my site for a long time. This time I will be staying in Adelaide for long.

Thought to share some pictures I took on my way here through Singapore.

Following are some photos I took while we were in some indoor gardens at Singapore Airport.

IMG_2819IMG_2826IMG_2894IMG_2896IMG_2897IMG_2900IMG_2901IMG_2904IMG_2887

Some photos I captured while we were in Singapore City.

IMG_2841IMG_2852IMG_2853IMG_2856IMG_2866IMG_2867IMG_2868IMG_2871IMG_2872IMG_2875IMG_2876IMG_2882IMG_2884

Even though this was my second time in Singapore I will never be bored being in Singapore due to vast variety of facilities Changi airport is providing.

In flight to Adelaide, Australia on Singapore Airlines Airbus A330.

IMG_2918

Tuesday, April 26, 2011

Database Not Accessible

Recently after restoring a database backup which I got from another server I repeatedly encountered an error when logged in using a user who is given permission. But when ‘sa’ account is used I could work with the database without any problem.

The error message was “The database DATABASE NAME is not accessible. (ObjectExplorer)” which was not helpful since it didn’t give any clue to figure out the issue.

image

Later I found that the issue is because the user in the restored database is not properly mapped to the user in the new server and the resolution for this is to run the stored procedure sp_change_users_login to correct the orphaned user.

  • sp_change_users_login 'update_one', 'USER', 'LOGIN' – Links the given user in the current database to the specified login.
  • sp_change_users_login 'auto_fix', 'USER' – Links the given user in the current database to the login having the same name in the current server.

After running this you will be able to access the restored database without any issue using the mentioned database user.

Sunday, April 03, 2011