Monmonja

Music and Tech at your hand

How to disable textfield on AS3

Posted on September 7th, 2008 in Programming | No Comments »

This took me 2 hours to find out how to disable textfield on AS3, its not the perfect solution but it seems to be the only solution.

private var txtField:Textfield;

this.txtField = this.getChildByName(”txtField”);
this.txtField.mouseEnabled = false;
this.txtField.tabEnabled = false;

and to turn it enable again:
this.txtField.mouseEnabled = true;
this.txtField.tabEnabled = true;

While this sound cheap coz you have to disable the mouse and the tab of that component and not the component itself, it seems to be the only solution. Thanks Adobe!!!!!!!!

Google Chrome and its significance to computing

Posted on September 7th, 2008 in Google | No Comments »

Google chrome was released last week and its already got around 2-4% of US market share, while its sounds so small, actually it a lot, if you compare it to opera or safari which took them years to get to 4% it only took google one week or even a day. I really hate the news when i saw it before the day it was released, and the reason was we web developers have to cater another browser with different javascript engine.

But this move brings significance to the whole computer industry, of course its not just Google Chrome but other stuff that make news this few week. One of them is JIT or Just in Time Compiler, thanks to Adobe for opening their Javascript JIT engine, we can see the result of these in TraceMonkey, the javascript engine of the next version of firefox and V8 the javascript engine of Google Chrome, so whats so good about it? The source are now compiled like java or .net and the browser need not to download binaries, this will make javascript to be executed a lot faster, 4-10% of the current speed.

Another thing which i believe google will do in the long run is the instant on linux(SplashTop) feature and they might even release a computer of their own, with this one feature sort of a cloud book but with no operating system except the prebuild linux and their android team will help them achieve this goal. Currently SplashTop includes firefox as the build in browser, but i’m looking at the opportunity that once Chrome reached the linux land they will make a dell with them or they will make their own.

Is this the end of MS? I don’t think so but i do hope that its the end of IE, ahha. Coz after IE8 is released we have to cater 3 browser from MS and that sucks. This is actually good for MS coz now their force to do better but the question now is that will IE8 commit to its promise of being standard or web programmer will just ignore them in the long run when firefox, safari, chrome and opera (all comply to the standard) reached over 50% of market share?

Google Android will be big because of China

Posted on September 1st, 2008 in Google, Technology, android | No Comments »

Why China? Have you guys seen any phones from china that looks exactly like the real phone except the ugly interface? I personally believe that would change because of android. Why? Here are some of my reason.

* Operating System - These small mobile company made their own mobile os simply because they could not use Symbian or Windows Mobile os or Apple due to the license stuff, dont know about Symbian now that they are open source. So it would be wise for these company to stop making their own and just use something that is already build then just remodify some part of it.

* Cost - Making your own mobile os with all the programmers that you will hire to do all the stuff that will make your mobile work is way too expensive for these company compare to using something that is already build. Not just they have to pay for their people to do the software, they also have to pay over the maintenance of it, translation of the manual and some technical support to their client???

Musicnotes.com

* Revenue - Over the 3rd world countries, mobiles from China are hot, why? Not just because their cheap but because of the features but some people especially the one who can afford to buy 2nd class phones would not buy them, why? Not because they think its cheap but because they hate their first experience they had with these phones because of the interface. So using android would make them more richer.

* Innovation - This is purely my imagination, but i forecast that the Chinese people will not just make android on smart phone but on different gadget as well, like PMP, PDA, and Laptop computer (they might port it, these people are freakin awesome and insane)

I believe that smart phone will be huge and China will pay a major role on it. But what’s with Google on this? The more android phones they got, the more people will have use their services, the better standing they will get not just in China but over the globe. So its better for everyone after all.

Hide Adsense/Ads on Admin in Wordpress

Posted on August 30th, 2008 in Google, Programming | No Comments »

You have wordpress and you put ads on it, like this blog (sorry if you feel its too much, haha), and you want to hide your ads when you and the other admins are viewing the site. Here is a small script that might help you.

Go to the location of your ads, it could be found on your template if you add it manually (if you use plugins your on your own)

For example you add an ads on your sidebar, you can access this page through the admin’s Design Tab -> Theme Editor -> Sidebar (sidebar.php). Enter this code:
<? if(!current_user_can('edit_users')): ?>
Your Ads here
<? endif; ?>

SecondSpin.com

What does this do, it will check if the user can edit users which means it will check if the current user is an admin, another thing to notice here is that i didn’t use curly brackets on PHP’s if, so if you didn’t know yet PHP is quite a messy language, it can have C syntax and some Basic kinda like syntax, usually i use Basic kinda like syntax on view. Why? Coz using the if-endif,for-endfor,foreach-endforeach of it seems to be more readable then curly brackets when combined with html tags.

Microsoft: No more Windows Live Mail crashes with IE8 Beta 2

Posted on August 30th, 2008 in Links | No Comments »

When i read the news i couldn’t help but laugh, man will IE8 be the next zune? Where MS products don’t communcate properly. On the list of items is hotmail, another MS product, this does mean these sites didn’t follow the standard? I don’t know but its really funny and the fact that this is beta 2 not alpha release makes it more funny. You can read the rest of the story here.

http://www.computerworld.com/action/article.do?command=viewArticleBasic&articleId=9113900&intsrc=hm_list

Claytronics - Physical Dynamic Rendering

Posted on August 28th, 2008 in Technology | No Comments »

This stuff is so cool and this could be the future of tech and business.

Demo Robot

Posted on August 27th, 2008 in Technology | No Comments »

This robot is amazing.

Mysql REGEXP on Cakephp

Posted on August 27th, 2008 in Programming | No Comments »

Here is a small tutorial on how to use mysql’s regular expression RegExp on cakephp 1.1 or 1.2.

The regular expression will find the records that start with the value of $letter followed by any number of Alphanumeric, space or quote.

Using Query
$condition = "1=1 AND Artist.name REGEXP
'^[$letter][A-Za-z0-9 \']*’”;
$this->paginate(”Artist”,$condition);

Using Array
$condition = array('Artist.name'=>"REGEXP
^[$letter][A-Za-z0-9 ']*”);
$this->paginate(”Artist”,$condition);

The Black Ghost helicopter at Firebox.com
Using Find Method
1.2 (Tested)
$data = $this->Artist->find("all",array("condition"=>
array('Artist.name REGEXP'=>"^[$letter][A-Za-z0-9 ']*”)));
1.1: Tested before don’t know if it still works
$data = $this->Artist->findAll(array(’Artist.name’=>
“REGEXP ^[$letter][A-Za-z0-9 ']*”));

Hope this helps :)

Yahoo and their cool sites

Posted on August 25th, 2008 in Technology | No Comments »

Just when people think that yahoo is the thing of the past, then came their cool sites, some are build within and some are brought by acquisition. Here are some of their cool sites.

Delicious - A Social Bookmarking site, no need for further introduction. An interesting note here is that this site is a search site in disguise, i usually search cool stuff here since the search feature here is a lot better than digg.And btw I got to admin i love the new interface more then the old one, and unlike other programmer i don’t care what language they use as long as the service is good.

Flickr - Online photo management and sharing application, certainly one of the best photo sharing sites out there. I’m just glad they killed yahoo photos for this site.

Yahoo Answers - Ask a question and people will answer you. This site is incredible for finding answer to some of your question, and like delicious this is a search site in disguise.


Yahoo Buzz
- Digg like site. This site is fast becoming the number 1 digg like site (I like reddit the most).

Yahoo Live - Live video streaming, something like ustream or justin.tv. I think this site will have a strong presence on the video space but not as big as youtube, the interface is a lot better than other video streaming site.

Yahoo Shine - This is sometimes have some good article about something that you may not know. What i dont like about it is that they have 2 search box at the top.

Yahoo Upcoming - Event management site, this site is cool coz you can invite everyone on an event, so if your throwing a party and you want to invite everyone then this is a good site to consider.

VerticalResponse, Inc. for small business


Yahoo Pipes
- A powerful composition tool to aggregate, manipulate, and mashup content from around the web. This site help ease of mashing out sites.

Omg - Daily celebrity gossip, good interface.

Fire Eagle - Twitter like site. I don’t know the use of the site, i just think its cool because of its interface. haha

Here are some that use to be cool for me.
Yahoo Groups - Nothing changed since 1998? haha. Full of nonsense groups.

Geocities - Everything is the same??? as when i first use it back in 2000, well except the colors from blue to purple?

Other yahoo sites can be found at
http://everything.yahoo.com/

Javascript JIT makes javascript very fast

Posted on August 24th, 2008 in Programming | No Comments »

For years, many of us have been salivating over the idea of JIT’ed JavaScript in the browser. Adobe’s JIT’ing Flash VM showed a preview of tremendous speed gains to be had, but we’ve had to wait until SquirrelFish from WebKit to see anything dramatic happen in the browser.

More on http://ajaxian.com/archives/javascript-jit-the-dream-gets-closer-in-firefox