Sper sa fie cu folos …

Archive for the ‘Programare’ Category

Cross domain and Firebug

Wednesday, May 5th, 2010 Posted in Programare, Web | No Comments »

Just a quick note: if you are playing with AJAX calls and you see in the Firebug console the request headers but the response is empty (no headers, no content) then most probably you have a cross domain issue. The domain and ...

Install PHP5 Xdebug for use with Eclipse PDT on Ubuntu 8.10

Wednesday, May 27th, 2009 Posted in Linux, Programare | No Comments »

If you use Eclipse PDT and you want to debug your PHP code using Xdebug just do this: 1. Install xdebug apt-get install php5-xdebug 2. Append to /etc/php5/conf.d/xdebug.ini xdebug.remote_enable=true xdebug.remote_host=127.0.0.1  ; if debugging on remote server, put client IP here xdebug.remote_port=9000 xdebug.remote_handler=dbgp xdebug.profiler_enable=0 3. Restast Apache /etc/init.d/apache2 restart 4.  Check to ...

Perl inarray function

Friday, April 18th, 2008 Posted in Programare | No Comments »

Taken from: http://assasiner.wordpress.com/2006/12/03/is-in-array/trackback/ You can use grep for this task like this: if(grep $_ eq $string, @array) or  if you want regular expressions: if(grep /$string/, @array) As an example: #!/usr/bin/perl my $string = "in_helm"; my @array = qw/full_plate manteau boots two_handed_sword fin_helm/; if(grep $_ eq $string, @array) { print ...