Our Blog

Mobile App development with Corona SDK

by sly May 02, 2011 08:22

Technoponics has selected the Corona SDK technology for its iPhone, iPad and Android projects.

Created in 2007 par the minds behind Adobe Flash, Corona SDK is first and foremost a game development tool. But since we believe that every mobile application should have a gaming aspect to it, Corona SDK is a perfect fit.

Corona SDK also allow simultenous development of both the iOS and Android environment.

We will publish on this blog our experiences in this new world we call Corona SDK !

 

 

 

 

 

 

 

.

Tags:

English | Software

JQUERY 1.5

by sly February 14, 2011 08:43

Just released : Jquery 1.5 , with the new Deferred option for multiple callback...woohoo

http://blog.jquery.com/2011/02/07/jqcommunity-updates-feb2011/#jqreleased 

Plus a preview of the official Jquery UI Grid.

Tags:

Coding | English

CSV Strings in SQL

by BillyTheKid August 18, 2010 06:35

I’m working on a webservice that will receive a comma separated list of ID’s and return XML and was concerned about the performance of the function I had been using in SQL to split a string into a table to join and select records.

I have been using a pretty basic iterative function that uses CHARINDEX and SUBSTRING, acceptable for small strings, but it was not going to work for this project.

Thankfully I found a CLR function in c# which has amazing performance.  Credits to Adam Machanic over at SQLBlog.  Find the code in his post here

http://sqlblog.com/blogs/adam_machanic/archive/2009/04/28/sqlclr-string-splitting-part-2-even-faster-even-more-scalable.aspx

To use his code, the first thing you will need to do is copy the class into a .cs file and compile it:

csc /target:exe sql_split_clr.cs

If the c sharp compiler is not in your path, add it.  For SQL 2005 you want to use the framework version 2.

set path=C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;%PATH%

CLR functions and procedures are disabled by default in SQL 2005.  If you have not yet enabled it, use the following

sp_configure 'clr enabled', 1
GO
RECONFIGURE
GO

 

You will then need to create the assembly and functions in SQL like this:

CREATE ASSEMBLY SQL_Split
FROM 'c:\clr\sql_split_clr.dll'
GO

CREATE FUNCTION string_to_list(@list nvarchar(MAX),@delim nchar(1) = N',')
RETURNS TABLE (item nvarchar(4000))
AS EXTERNAL NAME SQL_Split.UserDefinedFunctions.SplitString_Multi
GO

Now the new CLR function should be ready to use

SELECT * FROM dbo.string_to_list('a,b,c,d,e',DEFAULT)

As a final aside, what’s with having to specify the DEFAULT keyword to use the default parameter value on functions.  You don’t have to with stored procedures.

Tags: , ,

Coding | English

More on Videos and HTML 5

by BillyTheKid June 15, 2010 08:37

After my last blog post on videos Encoding H264 for the iPhone I ran into a little issue with the videos I was encoding when trying to stream to the iPhone it would say "Movie could not be played".   The only difference I could see between one that I found that would play and mine was the codec, which was set to ISOM, instead of mp42 for one that worked.

It was quite a simple fix actually, just changing -f mp4 to -f ipod in the ffmpeg command line changes the format to M4V which the iPhone will stream without issue.  FFMpeg makes a minor complaint about using a .mp4 extension with m4v format, but it all works fine.  Credits to the Metal Toad Media blog for the fix.

Now we have H264 encoded .mp4 files which can be streamed to Safari or Chrome, as well as the iPhone.  Here is a very simple example of the HTML 5 video tag.

<html>
<head>
<title>Video Testing</title>
</head>
<body style="background-color:#FFFFFF; ">
<center>
<video controls>
<source src="http://www.technoponics.com/media/expo67.mp4" type="video/mp4">
</video>
</center>
</body>
</html>

Encoding H264 video for iPhone streaming with ffmpeg

by BillyTheKid May 21, 2010 05:43

The first thing you need to know is that to stream a video to the iPhone using progressive downloading you will need to use 2 pass encoding.  There is something called the MOOV atom which needs to be at the beginning of the file, but can't be created until after the encoder has been through the entire source file at least once.  Pres umably bitrates, metadata etc, need to be pre-calculated, but that's just a guess.  If you come across something called qt-quickstart which will move the MOOV atom, avoid it, just take the time/cpu cycles to do a 2 pass encoding, the videos look better anyway.

Make sure you have a recent build of ffmpeg which has the ffpresets directory.  I'm currently using Rev 18639 from Tripp's unofficial win32 builds.  One thing to note, on Windows, you have to specify the full path to the preset file, in the -vpre parameter, and put it in double quotes, like in my example below. 

On the first pass ffmpeg will create a log file in the current directory that it uses during the second pass.  You will see examples on the internet for 2 pass encoding that have an output file for the first pass, but it is unnecessary, we only need the log file so you should specify NUL to save the hard drive I/O.  On Linux you’d use /dev/null.

For this little test, I have downloaded a 60 second public domain newsreel clip from 1967 discussing the opening of the world expo held in Montreal that year.  Head on over to the National Film Board (NFB) website to get any number of videos you can try converting.  The NFB video was 720x480, but the iPhone supports only 640x480 video up to 1500k bitrate.  In my example I’m scaling the video down to 640x428 and padding the top and bottom with 26 pixels. 

Here is the command for pass 1:

ffmpeg -y -i Expo67.mpg -f ipod -pass 1 -vcodec libx264 -s 640x428 -padtop 26 -padbottom 26 -r 30000/1001 -vpre "D:\utils\ffmpeg\ffpresets\libx264-fastfirstpass.ffpreset" -vpre "D:\utils\ffmpeg\ffpresets\libx264-ipod640.ffpreset" -b 250k -bt 50k -bf 0 -an -threads 0 NUL

The b and bt parameters are bitrate and bitrate tolerance, which you might want to increase for your video.  The –bf 0 parameter turns b-frames off, the iPhone does not support H.264 b-frames.  Adding it here prevents an error when encoding the 2nd pass.  The –an parameter turns audio off, which we won’t encode until the second pass.

Here is the command for pass 2:

ffmpeg -y -i Expo67.mpg -f ipod -pass 2 -vcodec libx264 -s 640x428 -padtop 26 -padbottom 26 -r 30000/1001 -vpre "D:\utils\ffmpeg\ffpresets\libx264-hq.ffpreset" -vpre "D:\utils\ffmpeg\ffpresets\libx264-ipod640.ffpreset" -b 250k -bt 50k -acodec libfaac -ab 56k -ac 2 -ar 22050 -async 1 -threads 0 Expo67.mp4

The trick here is to use two ffmpeg presets at the same time, fastfirstpass/ipod640 then hq/ipod640 for the second pass, always specifying the ipod640 preset second.

Here is a link to the Expo67.mp4 video, which should stream directly to your iPhone using progressive download.

Apple's magical iPad - [insert bad name-related joke here]

by SuperMike January 27, 2010 11:20

For anyone who wasn't paying attention, Apple finally announced its fabled tablet device today - the somewhat unfortunately named "iPad". If you don't believe me, do a quick Twitter search for #iPad, and prepare yourself for the onslaught of bad jokes and puns.

I have to say that, while I'm at least marginally interested in everything Apple does, I wasn't that excited about the tablet. All rumours indicated a big iPhone with an equally big price tag. The interest I did have was somewhat tempered by my equal-or-greater fear of another "revolutionary" gadget requiring me to sell my soul to a carrier for three years.

All in all, there weren't a whole lot of surprises from Apple today.
The Apple rumour machine proved itself fairly accurate: Steve & Co. essentially brought us a 10-inch iPod Touch, with a few notable tweaks, including the new iBook store, and some seriously prettified menus. The biggest surprise of the day was the price point- Long expected to start in the $1000 range, the base model of the iPad (16GB, WiFi only) was announced at just USD$499, putting it pretty close to the land of netbooks and e-Readers (As I write this, I'm still feeling rather relieved that I didn't splurge on that Kindle DX). Folks, this is the couch potato's Mac.

Disappointments? Apparently a fair number of people were anticipating a camera on that shiny new iPad. Personally, I don't think it's essential. That said, MY main complaint is the lack of non-iPad announcements today! I was expecting iPhone 4.0! And maybe some shiny new Macbook Pros! And where's my multitasking?! Still, none of this makes me any less inclined to run, not walk to my nearest Apple Store and give my $499 to the nearest hipster in a coloured shirt. I'm not sure I would use the word "magical" (with any degree of seriousness) to describe a piece of hardware, but Steve Jobs wants to know whether we think there's a space between our iPhones and our laptops for yet another kind of computer. I think there is - But I guess we'll have to wait until April to know for sure.

Tags:

English

Photobomp

by sly November 23, 2009 09:57

 

Photobomp is my new favourite Internet by-product.  A Photobomb is a picture that is ruined (or improved) by an external force (passer by, drunk friend, etc).  Check out this site http://thisisphotobomb.com to start you on your journey.

 

Tags:

English | Software

Some thoughts on Adobe's BrowserLab

by SuperMike October 06, 2009 07:17

Earlier this summer, Adobe started letting users in to test their new BrowserLab web application. I was pretty excited to see what Adobe could come up with (I've really enjoyed some of their other web-based applications, like Kuler...), and particularly interested to see what kind of integration they could offer with their existing products, in particular, Dreamweaver, which happens to be my editor of choice.

After a little poking around, it seems like BrowserLab is pretty darned easy to use:

  1. 1. Address Bar: Type in the address of the website you want to test.
  2. 2. Browser Sets: BrowserLab lets you create and edit "sets" of browsers, and switch between them easily, and the list of available browsers is pretty vast. Choose between Firefox 2 and 3 on XP or OSX, IE6, 7 and 8 on XP, and Safari 3 and 4 on OSX. It would be nice to see Opera and Chrome in here for the sake of completeness, but really, the available list has you covered for most of your basic cross-browser testing needs.
  3. 3. Views: This is probably my favourite feature. BrowserLab gives you the option to choose from 1-Up, 2-Up, and Onion Skin views. While 1-Up and 2-Up are pretty much exactly what they sound like, I thought that the "Onion Skin" option, which overlays all of your screenshots transparently on top of one another, was pretty innovative, as well as useful for tackling those smaller issues that wouldn't necessarily be obvious in a side by side view.
  4. 4. Delay: Basically this option lets you specify how long BrowserLab should wait before taking the screenshot of the web page you requested. Adobe's website FAQ says that you might find the feature useful if you only want to take a screenshot after an animation completes, or something similar. So far, I haven't had an occasion to use it, so I guess it's up to you to determine how useful it is.

browserlab.jpg

Finally, for those of you looking for tight integration with your CS4 applications, there are a couple of Dreamweaver extensions available (Get them here). Unfortunately, anyone using a Mac, and who has also upgraded recently to Snow Leopard, will be out of luck for now. I was unable to install the extensions, and a quick pass through the BrowserLab FAQ informed me that Adobe currently does not recommend installing the Dreamweaver extensions if you're running 10.6. I'm fairly disappointed about this since Dreamweaver integration was one of the main selling points for me.

My verdict:

I still think BrowserLab is a really useful product at an especially attractive price (free, so far). It seems pretty similar to Litmus, and would probably be an excellent option for Litmus users who need more flexibility than the free membership offers (50 tests/month and only two browser options), but don't want to shell out for the premium memberships (which range from USD$24 for a day pass to USD$199 for a monthly "team" membership).

That said, BrowserLab is really only useful for checking out how things look across browsers. Anyone who who needs to check how things work will still need to check sites on another computer, or using some kind of virtual machine. I will definitely use BrowserLab to check for HTML and CSS consistency on the fly (and especially if Adobe can get those Dreamweaver extensions working in 10.6), but for the heavy lifing, I'll still have to trust Parallels!

Some links -

Check out BrowserLab, or signup for an account:
http://browserlab.adobe.com/

Instructions for updating the Adobe Extension Manager, and installing Dreamweaver extensions:
http://help.adobe.com/en_US/BrowserLab/

Tags:

English

Steve Wozniak at Concordia University

by BillyTheKid September 10, 2009 23:09

Today Sylvain and I went to Concordia University to see Steve Wozniak who was doing a question and answer in the big room on the main floor of the hall building.  I received an email a few weeks back inviting students and alumni to see Woz, and being a student at Concordia (more on that later) I decided to register.  Sylvain is an alumni so I asked him if he remembered his student number, he said yes, rhymed it off, so I forwarded him the email and he registered as well. Steve Wozniak at Concordia University

The Woz was there from 2-3 and we arrived a bit early and got a pretty good seat.  Check out the pic, sorry about the poor quality, the lighting was dim and the iPhone wouldn't take a nice photo.  Steve arrived on stage and proceeded to talk a little before taking questions.  He described the environment in Silicon Valley in the late 70's and the course of events leading up to the creation of Apple. Most of us know the story but it is interesting to hear it told by Woz himself.  Like many other super geeks, he discovered an aptitude and interest in technology at an early age.  Oh, and he's a bit of an idealist.  He talked about having designed the Apple I and having given the designs away at the computer club he attended.  This inherent desire that programmers have to share is at the heart of why there is an open source movement today.

The audience was then allowed to ask questions and you can imagine with a group of university students, they were quite varied.  Several of the questions were about Apple and the early years.  Someone asked him about his accident in his Beechcraft airplane.  The student who went and read Steve's book just for the occasion, easily spotted, they always start their question with "in your book ..."  Other than that, patents, intellectual property, hacking/phreaking, and oh of course, someone had to ask him about dancing with the stars, which garnered a few laughs.

Anyway, it was kinda cool.  I guess being a student has some benefits.  Oh yes, the student thing.  I have been taking a few courses part-time for fun and exercise for the brain.  I was actually back at Concordia this evening for my ECON 201 class.

Tags:

English

iMac Surgery

by BillyTheKid September 08, 2009 09:02

So my brother came over the other day and said that his iMac (late 2006 core2duo) was not working.  I asked him what was wrong with it when he says that a few weeks earlier it had started making some “clicky” sounds and being all “slow and weird”.  Now when he turns it on, it just shows a picture of a folder with a question mark on it.  I fairly quickly diagnosed it as a hard drive failure, at which time I asked him if he had a backup, which of course he did not.  I guess I shouldn’t complain, if the hard drive dies in my personal machine, I probably wouldn’t have a current backup either.  There is a suitable expression here somewhere, oh yes, “people who live in glass houses shouldn’t throw stones”.

Initially I think my brother was a bit worried about letting me open up his iMac, but after the local Apple store on St. Catherines street told him it would be $400 for the replacement hard drive and another $170 for installation he seemed more willing to let me do it.  And what’s with that Apple store anyway, they wanted me to make an appointment to give me a quote for a hard drive, which I could only get after talking to a blue shirt person, who makes you put your name on a list with an orange shirt person first.  Sure the stores are shiny, but what a horrible retail experience.

Anyway, I went to a local Microbytes store and picked up a 640GB Apple branded Western Digital hard drive for $79 and proceeded with the installation.  They sure don’t make them easy to take apart.  There are a few torx screws on the bottom which allows the top to come off, from the bottom pulling it off on a slight angle, being very careful of the connections to the built-in iSight camera at the top.

pauly_imac_hd_changeThe next part was the most difficult which was getting the screen taken out.  The screen is taped all around with a metallic tape that you need to slowly peel the lip back and pull off the sides of the screen to get it out.  I unhooked 4 connectors from behind the screen on the left side and rested it against the foot.  Now I was able to access the hard drive, which was relatively easy to change.

It took me over an hour to get the whole thing apart, change the drive and put it back together.  It was definitely a better deal for my little brother than the Apple store.  I didn’t charge him our (quite reasonable) hourly rate, and I even paid for the replacement hard drive.

If you happen to be in the same situation with hard drive issues, take a look around the net, you’ll find a few sites, and at least one youtube video showing you how.