Yuri Perevoznikov's blog

Posts about programming by web developer

These functions show messages passed as param, but(!) if this param is number then php interpreter thinks that param is error code and doesn’t show it. So be careful again – convert param to string before you pass something to these functions.

It seems that these functions for escaping url in js are already deprecated! You should use functions with more longer names – encodeURIConmpnent(), decodeURIComponent(). Use them to encode/decode params for url.

http://www.w3schools.com/jsref/jsref_encodeURIComponent.asp

http://www.w3schools.com/jsref/jsref_decodeuricomponent.asp

The problem appears when you try to get items from block with style `overflow: hidden` because you cannot drag elements further than border of parent element. JQuery can almost everything and this task is accessible for its too probably it’s not so obvious – just look at fix in file:

draggable_fix.htm
continue reading…

Did you try to bind method of javascript class to event of html object?
That’s not so simple as it may imagine at first sign.

I almost ensure that you’ll try to write something like this first continue reading…

Hi to everyone.

Today we’ll talking about differences between singleton pattern and static class. Both of them uses for access to one resource in application, let say database or some api but this one represented as one exemplar (have the same properties while application is working).

So there are two general aspects – speed and convenience in use… continue reading…

Oh.. If that’s truth you should try use nice service: `MySQL Format Date`. It is place where you can create unlaboured mysql dateformats for your SELECTs.

Also you may follow them on the twitter

If you want to make one or more pages for wordpress that will be include only header, footer and common style of theme and you just started creating your first plugins for wordpress this article for you.

I just want to advise you use `template_redirect` filter and show how I realize it. continue reading…

I had problem with phpmyadmin couple days ago. I tried to execute not very simple sql query on remote MySQL server there was several JOINs and ON, WHERE statements but when I executed my script I caught error from MySQL – something like `this field doesn’t exists` etc.. Then I reduced complexity of query but error didn’t go anyway. This fact perplexed me because I checked `bad` field many times… continue reading…

I’ve been developing web application couple of weeks ago and catch the problem with limit of FQL requests. Facebook just was ignoring my requests and I receiving empty string instead XML. There was two days high transmitting data by FQL: I tried to get info from Facebook by 20-30 requests every 10-30 minutes (by cron job).

Also I didn’t find continue reading…

When you create page in kohana you use several general css/js and more or less files specific only for several pages on site. It’s important include different files to different pages. So I realized this by creating abstract template class (in <site_root>/application/controllers/template.php). continue reading…