Vasiliy Selivanov

  • RSS

unix best commands

Posted on Monday, July 6th, 2009

check site http://www.commandlinefu.com and you will get list of commands sorted by voting. Fx: Run the last command as root 1sudo !! Serve current directory tree at http://$HOSTNAME:8000/ 1python -m SimpleHTTPServer change to the previous working directory 1cd – Bookmark on Delicious Digg this post Recommend on Facebook share via Reddit Share with Stumblers Tweet [...]

continue reading

symfony ahDoctrineEasyEmbeddedRelations plugin, IE and Compatibility View Mode

Posted on Friday, March 18th, 2011

I have found interesting bug with symfony ahDoctrineEasyEmbeddedRelations plugin when you use IE Compatibility View Mode. Always save only 2 instance and never more. So lets find why it is happen. so you have embeded relation 1234567$this->embedRelations(array(      ’MyRelation’ => array(              …..             [...]

continue reading

Reinhold Weber – 40 Tips for optimizing your php code

Posted on Friday, April 4th, 2008

If a method can be static, declare it static. Speed improvement is by a factor of 4. echo is faster than print. Use echo’s multiple parameters instead of string concatenation. Set the maxvalue for your for-loops before and not in the loop. Unset your variables to free memory, especially large arrays. Avoid magic like __get, [...]

continue reading

Zmags, Flash object and internal link

Posted on Thursday, March 24th, 2011

If you are using Zmags, and what to add internal link (go to some other page) into flash object. You could use this code in flash ( actionscript 3.0)

1
2
3
4
5
6
7
import flash.external.*;
but.addEventListener(MouseEvent.CLICK, function(e:MouseEvent) {
    var curUrl:String =  String( ExternalInterface.call(" function(){ return document.location.href.toString();}"));
    curUrl = curUrl.replace(/\/([0-9]+)$/,'/'+YOUR_PAGE_NUMBER);
    var myURL:URLRequest = new URLRequest(curUrl);
    navigateToURL(myURL,"_self");
});

where YOUR_PAGE_NUMBER – is page number you want to go after click on button with instance name “but”

Posted in: Flash.