Uncategorized

installing ruby mysql with native extensions on mac osx (64 bit)

getting an error `<main>’: undefined method `query’ for #<Mysql:0x00000100913e20> or sort (also for methods init, each etc’) are common for mysql ruby driver that is not installed correctly or without native extensions.

to fix this issue just run the following commands:

1. brew install mysql-connector-c

2. sudo gem install mysql — –with-mysql-lib=/usr/local/mysql/lib

(/usr/local/mysql/lib is my local mysql installation folder)

 

my stack is

rvm / ruby 1.9.2

gem 1.8.5

mysql  Ver 14.14 Distrib 5.5.12, for osx10.6 (i386) using readline 5.1 (64 bit dmg installation from mysql website)

mac 10.6.8

hope it helps .

 

 

 

Show the Current GIT Branch and Tag in Your Command Prompt

Following Eran’s post on showing current git branch, here is an improved version including branch or tag number (which is helpful in repositories like nodejs) .

in order to differentiate between branches and tags the script prints branches in braces () and tags in square braces [].
[gist id=988852]

Apologies

viagra sales in india

continuing  lesson one is Lesson 2 :) Picture 1
lesson 2 is mostly about Objective C , object oriented programing , language syntax , and memory management.

this episode has 8 min intro

then minute 10 to  17-43 is basic oop and cocoa

where they talk about the cocoa framework , in summary Objective C is loos type language with dynamic type id.

afterwared they talked about 2.0 Syntax addition (dot notation synthesis etc’) and naming conventions

43-47 dynamic typing

47-49 nil (null object)

49-50 bool (yes/no instead of true)

50-52 selector - this one is interesting – it’s a way to hold the name or promise of a function as an object , you can check if it exists on an instance invoke in etc’ .

52-53 introspection – objective c name for reflection

53-57 working with oject

57-end overview of the cocoa framework data types.

I’m attaching my assignments as reference.

Is Google the next Apple killer ?

apple-iie-2Apple is known for its innovation.  At the late 70′s and 80′s it ruled the world of microcomputers with the Apple pc. but somewhere things went wrong.

It began with Microsoft striking a deal with IBM. Then with a bit of luck, greed, reverse engineering, and legal sorcery, Compaq made the first IBM PC clone. Then the road was open to ever cheaper clones, and Microsoft’s hardware support strategy opened the gate to versatile configurations. It was what we call today (and maybe even then, but I was too young to know) a disruptive technology. Microsoft changed the way the computer business worked. Up until that time, software was sold as part of the hardware itself and not separately. Microsoft technology broke through.   Respect.

As a side note, until now Apple holds ground regarding selling hardware and software combined , which might be a limitation in the PC business but surely comes to its advantage on the mobile world.

Back to our story, for years Apple wandered in darkness , until the big break through in the form of the IPod and its successor the IPhone. It may be that it all went the wrong way since Steve Jobs left Apple, and things got back on track upon his return. Major parts of Apple’s new business are based on NeXT technology (Jobs’s company that was eventually acquired by Apple), and his involvement in product development is infamous.

If it is so then Apple is truly a one man show.

This time the battle is about services (or SaaS) .The IPhone and IPod are clients to the ITunes SaaS.  But with Apple’s restrictions on application runtimes (in effort to control the store) and banning of innovative applications it is heading the wrong path again.

Like it was in the 70′s Apple defined the market but will Google with its  mobile computing and mobile communication take over it ?

Don’t get me wrong I LOVE my IPhone, but I’m starting to feel that it would be my Ivory tower. Like a 90′s Mac.

wordpress silverlight plugin – suggestion

Tim Heuer released a silverlight plugin for wordpress.

In the never ending process of setting up my blog I added his plug-in.

When playing with it and trying to write a post I had a problem adding multiple embeds, so I took the liberty to poke through the code.

I was quite impressed with simplicity of the plug in management in Word Press.

WP has an easy to change and quick to deploy development story , that interpreter based languages has – It’s a joy.

But back to SL plug in , i tinkered with it and found out that Tim already had 99.9% of the way.

what basically the plug in does is parse the post code and replace a some special markers with silverlight embed code.

the function that does the work has a stop condition on line 4, and to enable multiple embeds I changed the return value to be recursive (line 29)

function silverlight_the_content($content)
{
	$found_pos = strpos($content, SILVERLIGHT_META_START);
	if(!$found_pos) return ($content);

	$embedded = substr($content, 0, $found_pos);
	$meta = explode(",", trim(substr($content, $found_pos+strlen(SILVERLIGHT_META_START), (strpos($content, SILVERLIGHT_META_END, $found_pos) - ($found_pos+strlen(SILVERLIGHT_META_START))))));

	$output = $embedded . SILVERLIGHT_TARGET;
	$paramHolder = SILVERLIGHT_INITPARAMS;
	$url = trim($meta[0]);
	$width = trim($meta[1]);
	$height = trim($meta[2]);
	$initparams = trim($meta[3]);
  $minver = trim($meta[4]);
	if(!strpos($url, "http://")) $url = get_option('silverlight_standard_location') . $url;
	if(strlen($width) <= 0) $width = get_option('silverlight_standard_width');
	if(strlen($height) <= 0) $height = get_option('silverlight_standard_height');
  if(strlen($minver) <= 0) $minver = get_option('silverlight_standard_version'); 	$output = str_replace("###URL###",  $url, $output); 	$output = str_replace("###WIDTH###", $width, $output); 	$output = str_replace("###HEIGHT###", $height, $output);   $output = str_replace("###MINVER###", $minver, $output); 	if(strlen($initparams) > 0) {
    $initparams_parsed = str_replace("#", ",", $initparams);
    $paramHolder = str_replace("###INITPARAMS###", $initparams_parsed, $paramHolder);
    $output = str_replace("###PARAMHOLDER###", $paramHolder, $output);
  }
  else {
    $output = str_replace("###PARAMHOLDER###", "", $output);
  }
	$output .= "
" . substr($content, strpos($content, SILVERLIGHT_META_END, $found_pos)+1);
  return silverlight_the_content($output);
//return ($output);
}

musix

MUSIX a project I’m involved in, was launched on TV and online campaign.

it’s so cool to see my work on TV.

virtual remote plugin update

Virtual Remote 1.1 update released.

now you can edit the event code sent from the remote by pressing and holding the desired key for one second.

a dialog will pop and you will be able to edit the event code.

[kml_flashembed publishmethod="static" fversion="8.0.0" movie="/blog/wp-content/uploads/2009/07/2009-07-30_1858.swf" width="514" height="416" targetclass="flashmovie"]

Get Adobe Flash player

[/kml_flashembed]

Virtual Remote Plug-In for Firefox

Download Virtual RemoteVirtual Remote integrates with Firefox to assist IPTV UI developemnt. Now you can run and debug web based IPTV applications on the PC.

The plgu-in is in development ,use the comments facilities in this post to send bug reports ,comments , remarks and thoughts .


Virtual Remote emulates remote controls key press events and sends them to the browser,

helping you develop & debug a web based IPTV solution on your PC.

The installation is quite simple go to the  Download page ,  install, restart , and open the plugin from the

tools menu and you are ready to go.

enjoy,

d.

remote and tools menu

HaaHa show @ DotNetRocks

The most hilarious DotNetRocks ever,  my colleagues didn’t understand why i burst in lough while coding .

pure fun

download page

Go to Top