Mind Games Add this to your Christmas list! Neuro-engineering company Emotiv Systems have developed a headset that will allow you to control your electronic games using your thoughts alone. It's expected to market for around $299 next Christmas.

According to company president Tan Le, Emotiv's software algorithm "unfolds the cortex and takes us closer to the source of the signal." According to their website company overview: "while Emotiv Systems is currently focusing on the electronic gaming industry, the applications for the Emotiv technology and interface span an amazing variety of potential industries -- interactive television, accessibility design, market research, medicine, even security -- and plans for introducing Emotiv into these realms and more are already in the works".

All I can say is that if this communication channel is fully duplex, do not buy one for the wife!

Check the full story on Discovery.




Pondering... I recently started work on my first website to integrate with PayPal. The client needed it done relatively quickly. What started out for me as a mental picture of a products Web form with a "Buy Now" button, somehow turned into a full-blown e-commerce application complete with custom shopping cart. Talk about feature creep! And most of it was my own fault because I failed to anticipate the minimal requirements for the job. I'm still in the thick of it and have just implemented an admin back-end for the merchant to add products, complete with images, to the database. Then, I had to create an HttpHandler to stream the images...

They do say it's the simple things that get you stumped. For all of you ASP.NET developers out there who have yet to integrate a site with PayPal, just wait until you finally get to add that button to your form to pass the transaction details over to PayPal... In short, it won't work! The button HTML from the PayPal site is embedded in a form tag. You can only have one form on an ASP.NET page and ASP.NET provides its own. If you have a master page, then the form tag is in there and it is applied to every page in the site when they are merged with the master at runtime.

Thinking Irishman PayPal support does not offer a practical solution. They may try to get you to download their ASP.NET SDK which is 1.1 and uses Web Services. Most people have failed to get it to work with 2.0. Then they may tell you to put the form tag "outside" the main tag or on a separate HTML page, etc. I have seen endless hacks, most of which were too stupid to even consider; IFrames anyone?!!

I trudged through the forums and saw that ASP.NET developers have been asking how to get around this for the last three years or so. PayPal refuses to acknowledge the problem and seem more inclined to offer support for the PHP community. There is something radically wrong with this mindset from a business point of view.  Can PayPal not afford to pay some contractors to go in and develop an ASP.NET 2.0 SDK that will work with both NVP and Web Services? Nothing like speed to kill. Then PayPal had the temerity to invite me to complete a survey on how good I found their support service...

The Light Goes On So I turned to Google. I spent days concocting search strings that would bring that elusive nugget I needed to solve the problem. I thought I had found it when I came across the nested master page hack - keep the outer master page stripped of any form tag and then just use it for the page with the PayPal button. It would probably work, but if you don't get a code smell from that one, you may need to get your sinuses reamed out. The search continued. You know you're desperate when you start entering your grannie's middle name in the search query string :-O

Persistence finally paid off. I found an elegant solution on Jeremy Schneider's blog that consists of a custom HtmlForm class that can have the form tag rendering toggled on and off. The class is called GhostForm and has a property, RenderFormTag. When RenderFormTag is set to false, it doesn't render the opening or closing tags, but does render all of the contents. Reference the custom GhostForm class and in the code-behind of the form on which you are placing the button, place the following in the Page_Load to disable the master page form tag:

public partial class Products : System.Web.UI.Page
 {
     protected void Page_Load(object sender, EventArgs e)
     {
         GhostForm mainForm = new GhostForm();
         mainForm.RenderFormTag = false;
         .....     
     }
         // Send your data to PayPal :-)
     .....
 }

kick it on DotNetKicks.com   PHP, ASP, .NET, JSP Resources, Reviews



New MSDN Code Gallery

by agrace 3. March 2008 13:04

Are you looking for some free code samples? Microsoft recently launched the MSDN Code Gallery. It differs from the CodePlex site in that it is more geared towards developers who are starting out. It is a true community site where you can create your own resources page in the shape of a wiki and share your own code samples with the community. You can keep it in edit mode for 30 days before sharing your code masterpieces with an unsuspecting public ;-)

I had a surf around the new site and came up with a gem of a new tool for Visual Studio 2008. It's called StickyNotes and it is a Visual Studio package that provides sticky notes capabilities to project and project items inside Visual Studio 2008.

StickyNotes

This is so much neater than the standard Task List that comes with VS, although I can see myself using both. StickyNotes is ideal for jotting down reminders of things to do at a file level. I usually load my code pages with comments in the early stages of a project and this tool is sure to free up my code files. Thanks to Pablo Galiano for this wonderful new tool :-)

kick it on DotNetKicks.com