Archive

Archive for the ‘Computer and IT’ Category

Encode your JSON data before sending it

January 18th, 2012 No comments

A problem I was facing recently, that the JSON was being receive properly on Firefox 3.6 my work development machine. Finished the project and deployed it. I haven’t tested it on other machines, how clever am I?! I opened my laptop to see how it would appear on other browsers, and shockingly, it wasn’t working at all!

After spending hours trying to locate the line where the error occurs and find out what’s the problem it turned out that I have to decode the JSON output before sending it. I wasn’t using any PHP built-in functionality for JSON, that’s because at work, we are still using PHP4 which has none. I was basically writing the JSON output explicitly. The text output can contain some special characters that need to be encoded and escaped before sending it. After digging around a bit I found out a solution from this post. Everything is pretty much explained there.

In a nutshell, you’ll have to use json_encode() to encode the data from an array and then output it. A JSON library is provided along with that post. There is also a decoding function, but I haven’t use it since I’m receiving my data on a javascript.

Solution to getURL not working

February 22nd, 2011 No comments

A security enhancement was added to Flash Player sometime ago that disables getURL to function properly in Actionscript 2.0 of Adobe Flash. This could be an issue for some as in my situation when I created a banner for MET to celebrate the independence & liberation day of Kuwait.

The issue occurs if you are targeting a different domain than the current domain where the SWF/HTML file is hosted. I’ve also heard reports that it can occur if the SWF and HTML file are located at different location even if at the same domain host. I haven’t tested the latter so I can’t confirm or deny it.

Anyhow, to resolve this issue, all you have to do is change the allowScriptAccess attribute on the <object> tag to have the value “always”. You also have to add <param name="allowScriptAccess" value="always" /> or edit it to match it if it’s already there.

So at the end, your code has to look like this:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=10,0,0,0" width="955" height="88" id="SWFID" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="FILE.SWF" /><param name="quality" value="high" /><param name="bgcolor" value="#ffffff" /> <embed src="FILE.SWF" quality="high" bgcolor="#ffffff" width="955" height="88" name="SWFID" align="middle" allowScriptAccess="always" allowFullScreen="false" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" />
</object>

This issue is explained in more detail at the official knowledge base of Adobe here and here.

Releasing a New WordPress Plugin – WP Academic People List

October 12th, 2010 1 comment

My first WordPress plugin goes public. I’ve developed it for a research group in Kuwait University. Check out the WP Academic People List page for more information about this plugin. This plugin was built in a way that you can customize it for school alumni website.

BarCamp Kuwait 2010

October 5th, 2010 No comments

The first ever BarCamp in Kuwait.

BarCamp is an ad-hoc gathering born from the desire for people to share and learn in an open environment. It is an intense event with discussions, demos, and interaction from attendees, usually centered around design & technology topics.

For registration and more information check out the official BarCamp Kuwait 2010 website.

Microsoft Visual Studio 2010 Launch in Kuwait

May 12th, 2010 No comments

Microsoft are doing Visual Studio 2010 launch in Kuwait and then premiering the movie Robin Hood. That’s two days before the movie launch in Kuwait cinemas.

Location: Cinescape 360, 360 Mall
Date: May 18th, 2010

Agenda:
01:45 PM – 02:00 PM | Registration
02:30 PM – 05:15 PM | Presentations
05:15 PM – 05:30 PM | Break 
05:30 PM – 07:20 PM | "Robin Hood Movie"

Register and book your seat here.

MSFT_VS2010_launch

Q8CPC – Kuwait’s National Collegiate Programming Contest

April 18th, 2010 2 comments

[UPDATE: the competition has been postpond to September.]

For the first time, the ACM’s International Collegiate Programming Contest is coming to Kuwait by the American University of Kuwait. The contest will be held by May 1st, 2010. The opening ceremony and the practice session will be held two days earlier. More information will be revealed soon.

This contest is a good opportunity for students to prepare for the regional contest ACM ACPC formally known as (ACM ICPC ANARC).

Check the PDF for the “Call for Participation” letter: Q8CPC Call for Participation.

Categories: Programming Tags: , , , ,

Zune for International Users

April 7th, 2010 1 comment

So you are now one of those people who found out about Zune and got really turned down by Microsoft for preventing us to access the device and the Marketplace just because we do not live in the US? Don’t worry because I have the ultimate workaround.

zunesoftware

Since the released of Zune Software 4.0 and the integration of Zune Marketplace to the Xbox 360, Microsoft has stepped a big leap forward into the Music and Entertainment industry. The Zune Software 4.0 is user-friendly and much more responsive than its competitive the iTunes in the Windows platform and the Zune HD device is awesome and feels much more robust than the current iPods. And thanks to the Zune Pass, the Zune Marketplace now provides unlimited number of music at the tip of your hand to listen to or download, of course, with DRM lock. The Zune Pass cost only $15 USD monthly but the problem is that if you are not based in the US, you won’t be able to enjoy the Zune Marketplace, heck, you won’t even be able to buy Zune. To be fair to the Microsoft folks, I think those roadblocks were necessary for license music in the Marketplace whether the Zune team really wanted to block international users or no.

In this article I’m going to talk about how to own a Zune HD and get yourself hooked up with the Zune Marketplace with the full features of Zune Software 4.0 just like living in the states.

Get the Zune HD

Officially the Zune HD is supported and sold only in the states but you could find sellers in ebay that would happily sell it and ship it to your country but for an extra profit.

Zune HD

Another alternative is to buy Zune HD through Amazon or any other retailer and ship it to a “shipment forwarder company” in the states that ships anything they receive under your name to your home address. Basically, those types of companies will provide you with a US mailbox and an address, and if anything is mailed/shipped to that address it will be forwarded and shipped to your home. I personally use Aramex’s Shop&Ship but if you cannot use Aramex for any reason, you could always use DHL since they provide a very similar service. This kind of shipping service is available in my country and I’m not sure if it is available everywhere.

Grasp the Full Potential of the Zune Marketplace

Zune HD can play all music and videos in that’s already in your hard disk and playable by Zune Software 4.0. Now, here what really made me ditch iPod and iTunes, it is the Zune Marketplace. The main reason I made the move from iTunes to Zune Software is that I can get unlimited music with Zune Pass as I mentioned previously.

Now it is time to do some changes in your computer. Follow the next instructions before opening the Zune Software for the first time. You can download Zune Software from here.

Accessing the Zune Marketplace

zuenmarket In a typical non-US computer you won’t see the Marketplace & the Social tab in Zune Software, however, you could easily solve this by setting your location to US. To do that, go to Control Panel –> Clock, Language, and Region –> Change location, then select your location to “United States” [Windows 7].

Now you should be able to see the Marketplace tab after restarting the Zune Software.

Get a Windows Live Account

Now you need to register for a Windows Live ID which is the generic account for all Microsoft services, or you could just grab a new Windows Live or Hotmail email which is also considered as a Windows Live ID. You could use your existing Live email.

Just ensure that in your profile your home address is set to US. You could use any US-based address you want. Heck, you can use any of Microsoft offices address 😀

If you followed previous instructions you should be able to browse the Zune Marketplace and play with it. But wait! We are not done yet. Follow next instructions if you want to be able to buy Music and download them.

Note: To login successfully in your Zune Software, your PC location has to match the location in your Windows Live profile which should be US by now.

Purchasing Music from the Zune Marketplace

xbox point cardTo purchase Music from the Zune Marketplace you’re going to need Microsoft Points which is the currency being used for the Zune Marketplace and it is also the same currency being used for the XBox 360 Marketplace. You can purchase Microsoft Points online by the Zune Software but the problem is that Zune Marketplace only accepts US-credit cards. Fortunately, I was able to overcome this roadblock with the Xbox point card.

You can purchase an Xbox point card by either asking a friend from US to buy one for you and send you the card code, or you could head to ebay and buy one. Some sellers in ebay will just email you the card codes regardless of your location which is perfect for a fast solution. I personally buy from GSG online retailer because I’ve bought several Microsoft Points from him already so I trust him, and he usually send the code in less than 24 hours.

Now that you have the card codes, launch Zune Software in your PC then go to Settings –> Account –> Redeem code. Enter the code and you’ll be redeemed with Microsoft Points which can be used to buy anything in the Zune Marketplace.

You could also use those points to purchase videos on the Zune Marketplace but you’ll need to workaround it more to download videos. I’ll talk about it later.

Zune Pass

Want to enjoy the ultimate experience of Zune? Then Zune Pass is your salvation.

zuenpass

Again, the Zune Marketplace will not accept a non-US credit cards so you won’t be able to purchase Zune Pass on your own. It took me a lot of Googling (Bing suck!) to figure out alternatives which is the Zune Pass Anywhere retailer. It provides you with a Zune Pass but for a higher price and they will need to access your account so you’ll have to submit your password. Basically, they will access your account and buy a Zune Pass.

Alternatively, if you have a friend in the states you can ask your friend to buy you a Zune Pass card from Best Buy for $15 and email you the card code.

Videos

So far you should be able to download music yourself with no problem. The experience is not complete without the ability to purchase videos from the Zune Marketplace or downloading it. Easy, get a VPN (aka Virtual Private Network) for as low as $40/year from some firms.

I use Witopia but there are many other companies that provide VPN and you probably could even find lower prices. But you have to ensure that the VPN is based in the states. By the time I write this article it seems that the video download works even when the VPN service provide you with an anonymous-IP.

As soon as the video starts downloading, you won’t need VPN anymore. If your VPN connection is slow, you could pause the download then disconnect your VPN connection and resume the download with your regular connection.

After doing the first download, it doesn’t seem to need VPN anymore to download any additional videos. I don’t know the actual reason behind it but I can guess that because I have already purchased a Zune HD and linked it to my account.

Finally…

What Microsoft has done with Zune HD and Zune Software 4.0 is really incredible. If you were one of those lucky people who own a Zune HD and Zune Software, you officially own the modern device and software. They are both much user-friendly, easy to use and feels much more modern than the iPod-like interface. If you are a tech-savvy you are probably bored from the iTunes and iPod interface which feels really out-dated. You would also notice the big gap in performance with Zune Software 4.0 compared to iTunes 9.1.

You can connect to my profile:

Happy Zunning!

Novatel Mifi 2352 with Viva

April 3rd, 2010 18 comments

Purchasing the Novatel Mifi 2352 is a procurement that I’m never going to regret. Not only I can access the Internet with my phone through a wifi router that can fit in my pocket, but I can also use my PDA and Zune HD to access the web at the same connection (subscription) while on-the-go. Sharing my connection with my Internet-savvy friends is also a big plus. In this post I’m not writing a review about the device but a quick test. Why should I write another review when there are a lot of reviews online?

 

01042010303

The following test is based on my connection which is an HSDPA connection from Viva Telecom in Kuwait. According to the carrier, my subscription speed can reach up to 7.2 Mbps. I bought the device from Cameo store which is located in Hawalli, Kuwait, for 72KD. And it comes with various wiring options and a small how-to-get-started print.

 

Speed Test

Here comes the speed testing in Salwa area, but keep in mind that lots of variables can game here. I just want to give you a sense on what this device is capable of. I’m not doing a scientific or geekish connection test, I’m just doing the regular method of quick speed testing for a regular web citizen to understand.

 

Capture4

 

I’m going to do the speed testing with both the Mifi 2352 and my old USB dongle Huawei E180 for comparison. I’ll use the same sim card on both connections. Note that both devices supports up to HSPA speed, that’s up to 7.2 Mbps for both devices and it’s stated on the datasheets of both devices.

 

Capture2 The image above represent the status of the connection on the Mifi 2352 device. As you can see, it is connected by HSPA technology (HSDPA & HSUPA). I did the test to a server located in Washington DC by Speakeasy. The first test of the Mifi 2352 resulted about 1.74Mbps download and 0.27Mbps upload. I switched back to the Huawei USB dongle and the tested result was 2.19 Mbps for download and 0.24Mbps for upload.

 

I did both tests again and the result was:

  • Novatel Mifi 2352: Download 1.09Mbps – Upload 0.28Mbps
  • Huawei E180: Download 2.92Mbps – Upload 0.21 Mbps

Definitely there are differences in the performance of both devices. It seem that the USB dongle is faster on downloading. Again, this is a quick-test to have a sense of what to expect from the Mifi 2352. It’s not a scientific test and it is not reliable testing method and I’m doing this in uncontrollable testing environment.

 

I’ll do more testing later and then I’ll report back.

Categories: Computer and IT Tags: , , , , , ,

Senior and Fresh Graduates Job Oppotunity from Microsoft

March 31st, 2010 No comments

 

Microsoft has a program called MACH (Microsoft Academy for College Hire) to hire fresh graduates. As a Microsoft Student Partner, Microsoft has informed me that they are looking for fresh graduates and senior students in Kuwait University who would like to take part in this program. Participants will be offered a full time employment opportunity at Microsoft.

In order to qualify you have to meet the followings:

  • Be a final year student of an IT-related degree (2009 graduates will also be eligible)
  • Have a GPA equivalent to 3.0 or above
  • Be able to demonstrate a passion for technology
  • Speak and write fluent English and Arabic
  • Possess excellent communication and presentation skills as well as strong interpersonal skills
  • Be a strategic thinker
  • Be able to balance individual creativity with working as a team
  • Have a high degree of customer focus
  • Be available from July 2010 to take part in our summer internship.

For more information and to apply, read this document: Job opportunity from Microsoft

Wix – Build a Flash Website for Free

January 1st, 2010 No comments

Ever wanted to create a beautiful Flash website? Wix is a great place to start. It provides a set of flash layouts that you can customize and build your website to the final touch. It’s simple, easy and fast! Best of all, you do not need to have any knowledge in Flash.

Get Adobe Flash player