rss feed blog search engine
 
Search rss blog search engine
 
Jayson Online - Articles & Projects  
Released:  8/30/2008 2:15:12 AM
RSS Link:  http://feeds.feedburner.com/jaysonj
Last View 3/21/2010 3:54:36 AM
Last Refresh 3/21/2010 3:54:36 AM
Page Views 814
Comments:  Read user comments (0)
Share



Description:



Google talk chatback badge no longer working in IE8.. Removing bios password in Toshiba Netbook NB200.. Objective C programming in Windows – GNUStep & ProjectCenter.. How to display twitter updates on WordPress – WP Tweets..


Contents:

Google talk chatback badge no longer working in IE8

google talk badgeIf you had visited my site earlier, you would have noticed the Google talk chatback badge on the right sidebar. This allows site visitors to instantly connect to me. Yesterday someone pointed out a bug in my Netconnect Meter tool through live chat and I was able to release a patch in a few hours time.

However since yesterday the Google talk chatback badge is no longer visible to IE8 users. This is because Google has started sending a new http header when it returns the badge code. This header is x-frame-options: sameorigin. Due to this header you will get the following error text in the iFrame,

This content cannot be displayed in a frame
To help protect the security of information you enter into this website, the publisher of this content does not allow it to be displayed in a frame.
What you can try: Open this content in a new window

The header instructs the browser not to display the content in the iframe if the content is not received from the same domain as that of the container. It is a way to prevent clickjacking.

It appears that Google rolled out this header for all the iframe powered badges without realizing that it will completely break the badge in third party sites! What is more surprising is that this priority one defect is open for more than 2 days! I am keeping the badge intact with the hope that they will fix it soon.




Removing bios password in Toshiba Netbook NB200

Toshiba NB200 Netbook Recently I bought a Toshiba Netbook NB200. If you use a computer mainly for email, browsing, music etc. this is a great machine. It has good performance with pre-installed Windows XP. The only problem I found was the power LED which is a major irritant during daytime.  Don’t even think of using a Netbook as your primary development machine.

Usually I don’t put a BIOS password on the computers I use. I normally keep my content protected and never felt the need to use a BIOS password. But when I got Netbook, I decided to put a BIOS password. A few days later I removed the BIOS password. After a few reboots suddenly the NB200 started asking for BIOS password. To my horror, it refused to accept the earlier password and after 3 attempts I got a nasty message on screen – “System Disabled. Error 0004” (Sometimes it was Error 0000).

The Toshiba Netbook NB 200 comes with a Phoenix BIOS named “phoenix trustedcore setup utility”. It probably has a bug related to password reset. I am not sure about the bug, but one thing is sure – Entering incorrect BIOS password three times causes some flag change in CMOS/EPROM and it permanently disables the system. The only option left was to take it to a Toshiba service centre with proof of ownership to get it unlocked! In short “trusted” means customer is screwed[If you own a NB200, I suggest you update the BIOS firmware immediately].

But then I realized that there are no Toshiba service centers in my area and the only option was to send it via courier. It meant that I may not see the NB200 for the next few weeks and it is sure to cause me a lot of headache. So the next thing to do was to see whether there is a way to either clear the password or bypass the password. After a bit of Googling I came to know that earlier Phoenix bios chips had backdoor passwords such as PHOENIX, CMOS, BIOS etc. Some Toshiba laptops had “Toshiba” as the backdoor password. However none of them worked on Netbook NB200.  So the only option was to open NB200 and see whether I could pull out the CMOS battery. I was pretty excited since it was a while since I did some hardware hacking!

Hacking Toshiba Netbook NB200

Step 1 : Getting the tools for the Netbook surgery 

Following is the toolset I used to disassemble Toshiba NB200. I had recently purchased a screwdriver set for mobile devices from Bangalore ($3) and it came really handy for opening NB200. I also used a multi-LED torch so that I can take a look at the edges to see how to open a specific section. A torch is must have if you don’t have the technician manual with you.

Tools required to open Toshiba netbook NB200

Toshiba cover design is such that without technician manual, it is very difficult to open the Netbook. Also the screws are not tough enough and if you don’t select a correct screw driver bit you may damage the screws and then you are completely stuck. I had to saw the inner cross section of one of the screws after it got damaged by a wrong screwdriver bit.

Step 2 : Getting the Netbook NB200 ready for the surgery

Toshiba Netbook NB200

Before opening the Netbook ensure that you have removed the battery. It is very important and initially I forgot to do that. Luckily nothing bad happened.

Step 3 : Opening the back cover of Toshiba NB200

Step1: Opening Toshiba Netbook NB200

To remove the battery unlock the switches indicated above as B1 and B2 and then pullout the battery on top. Then remove screws indicated as C1, C2 and C3. It is fairly easy to remove the plate behind C1/C2. However removing C3 plate requires some effort and requires you to pull it out hard. Behind C3 plate you will find RAM module and behind C1/C2 you will find hard disk and WLAN card.

Step 4: Removing hard disk, WLAN card and memory module

Step2: WLAN, Hard Disk and Memory card in NB200

To remove memory module, press out the locks indicated as 1 and 2 and then pull out the memory card. To remove hard disk push the hard disk as indicated. Removing WLAN card requires you to remove two screws. Unless you want to completely dismantle Netbook, it is better not to touch WLAN card. The red circle indicates the screw damaged due to wrong screw bit.

Step 4: Removing BIOS password on Toshiba Netbook NB 200

Removing BIOS password - Toshiba Netbook NB200

After removing the memory module I noticed a paper sticker behind it. So I removed the paper sticker and then noticed the jumper as indicated by the red circle. To remove the CMOS/BIOS password all you need to do is to short circuit the jumper leads. Use a screw driver to do that and keep it short circuited for 10 seconds.

Now you may be wondering how I found this without the technician manual. To be frank it was pure luck. From a couple of other sites I came to know that resetting password required short circuiting some jumper. For example, the instructions to reset BIOS password on Toshiba Satellite L10 is,

- Open Wi-Fi Cover
- Locate & Short Out JP1 for 15 Seconds

I think the same technique might work on other Toshiba Netbooks namely NB100, NB205 etc.

Step 4 : Dismantling Netbook completely

Removing keyboard in Toshiba NB200

If you want to dismantle the NB 200 completely you need to remove all screws marked as F6 and F4 at the back cover. Then you can remove the top cover over the power light as shown above. After removing the cover above, pull out the keyboard completely. Before pulling it out  ensure that you remove the keyboard connector.

Step 5 : Final steps

Dismantling LCD in NB200

Now to dismantle NB200 completely you need to remove a number of connectors including monitor connector (top left with white sticker) and a number connectors on the right. Then you need to remove four screws on both sides of the monitor lid. This way you can completely detach LCD screen from the Notebook base. By this stage I had already spent about 5 hours on it and hence assembled it back.

Last week I sold NB200 since I realized that a Netbook is not something I needed. It is too big to replace a mobile device and was not good enough to replace a laptop.




Objective C programming in Windows – GNUStep & ProjectCenter

I have been toying with the idea of getting into full fledged iPhone application development for sometime now. To get into iPhone development, you need to be familiar with Objective C language and Cocoa framework. But the iPhone development environment is only available for Mac platform (which includes Xcode IDE and iPhone simulator). If you want to run iPhone development environment without a Mac machine, you have two options,

  • Use a virtual machine platform like VMWare to run OSX under Windows – However it is not legal to run OSX under non Apple hardware.
  • Another option is to use OSx86 which allows you to install Mac OS on top of your Intel or AMD computer.

But if you just want to learn Objective C language or Cocoa framework programming, you don’t need any of the above. You just need the GNUStep and ProjectCenter tools. This article explains how GNUStep can be configured as a Objective C development environment on Windows.

Objective C Programming in Windows using GNUStep

GNUStep is a free, object oriented development environment with built in tools such as a compiler. The C/C++ compiler included (gcc) also supports compiling Objective C programs. It also has a graphical development kit with API similar to Cocoa framework (since both of them were derived from the old OpenStep framework). So installing GNUStep on Windows gives an instant development environment for Objective C programs. An extension to GNUStep is the ProjectCenter (Xcode equivalent) using which graphical programs can be built.

Installing GNUStep on Windows

GNUStep is available as a Windows installer from the official page.  I recommend downloading and installing GNUStep System, GNUStep Core and GNUStep Devel. Note that the latest version available as of October 2009 is 0.23.0 and this version is not compatible with ProjectCenter 0.50.  If you are planning to use ProjectCenter I recommend that you download 0.22.0 version of GNUStep from the download page. Here is a summary of what is required,

  • Objective C programming only – GNUStep 0.23 (System | Core | Devel)
  • Objective C Programming and ProjectCenter 0.50 -  GNUStep 0.22 (System | Core | Devel)

You can download pre-compiled version of ProjectCenter 0.50 for Windows from here.

image Once you install all the binaries above, you will have GNUStep shell under Programs->GNUStep (See figure). Click on the Shell to invoke the command line interface. This shell is based on MinGW (collection of gcc compiler and command line tools) and using it you can compile and run Objective C programs. The command line is similar to Unix/Linux command line and you can navigate to any folder in your windows machine. Using the built in gcc program you can compile and run Objective C programs.

Compiling and running Objective C programs in GNUStep on Windows

Create the following program and save it with the name helloworld.m using notepad,

#import <Foundation/Foundation.h> 
 
int main (int argc, const char * argv[])
{
  NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
  NSLog (@"Hello World!");
  [pool drain];
  return 0;
}

Now using GNStep shell navigate to the folder where helloworld.m is stored (in my case it is cd w:/prg). Type in the following command to compile helloworld.m.

gcc -o helloworld helloworld.m -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries -lobjc -lgnustep-base -fconstant-string-class=NSConstantString

Please note that the various switch options such as -lobjc should appear at the end of the command. the -o switch specifies the name of the executable created (helloworld.exe) in this case. Following is the result of compilation,

Info: resolving ___objc_class_name_NSAutoreleasePool by linking to __imp____objc

_class_name_NSAutoreleasePool (auto-import)

Info: resolving ___objc_class_name_NSConstantString by linking to __imp____objc_

class_name_NSConstantString (auto-import)

W:ToolsGNUstepmingwin..libgccmingw323.4.5........mingw32inld.e

xe: warning: auto-importing has been activated without –enable-auto-import spec

ified on the command line.

This should work unless it involves constant data structures referencing symbols

from auto-imported DLLs.

You can see that helloworld.exe is generated in the same folder (Ignore compiler output and warnings or use -enable-auto-import switch to fix them). To run the program type in ./helloworld.exe at the command prompt,

image

Common Errors during Objective C compilation

  • error: cannot find interface declaration for `NXConstantString’ – This means that you haven’t added the switch -fconstant-string-class=NSConstantString to the gcc command line.
  • Foundation/Foundation.h: No such file or directory – This means that gcc is unable to find Foundation header classes. Use the switches -I /GNUstep/System/Library/Headers -L /GNUstep/System/Library/Libraries
  • stray ‘@’ in program – This means that you have the wrong double quote in your source code. Use " instead of .

Now you are all set for Objective C programming and a bit of Cocoa programming on Windows. Good luck! and buy a Mac machine when you are ready to write iPhone programs.

Further Reference




How to display twitter updates on WordPress – WP Tweets

twitter iconI have recently added twitter updates to the sidebar of this blog. While this blog contains details about my projects and articles written by me, my twitter updates give micro updates on stuff I work with or the interesting things that I come across. That is the beauty of twitter – you can share stuff without actually going through the trauma of writing a full fledged blog post! :-)

To add twitter updates I ended up writing my own plugin named WP Tweets. This is a very lightweight plugin which directly pulls twitter updates from the client side. It is also easy to customize the appearance of this widget by changing few lines in the plugin css file. And best of all I can help if you are stuck with style customization.

You can WP tweets from project homepage or from the official WordPress plugin repository.








Home  
 



Link to us




RSS Feed of new blogs                                                   Home        Feed Map        Submit Feed      Link to Us       Contact