jQuery documentation doesn’t display correctly in phpStorm when using Yii

phpStorm supports jQuery very well since its 2.1 version. You just need to set it up properly and you’ll have the documentation displayed for every function. Very convinient. But if you use Yii, all phpStorm says about the jQuery functions is “have no idea”. We can fix it by simply marking /web/js/jquery.js file as plain text (right-click the file in the Project Explorer, choose “Mark as Plain text”). Well, before that, phpStorm was trying to find the documentation in that file, not in the one we specified in the settings.

A simple SELECT query crashes mysqld

I’ve spent the whole day today trying to solve the problem. A simple SELECT query executing about 3 times in a row (jQuery) leads to crash of the mysqld process. And it’s only true for executing it from the php script:

 $limit = 10; $s = OutputProcessing::encodeString($term); $query = "SELECT name label, name value, id id FROM items_base_description WHERE name LIKE '%$s%' LIMIT 0, $limit"; $result = mysql_query($query, $connection) or die(mysql_error($connection) . "\n" . $query);

The reason was that I didn’t add an index to the ‘name’ field. After adding the index, everything worked fine.
BTW, I use PHP 5.3.3 and MySQL 5.1 for development environment.

Перевод с китайского – соус

image

Очень интересный соус, китайский. Перевод надписей на нем повышает настроение за обедом. Предлагаю внимательно их прочитать :)

Читать дальше »

(Русский) Короткая статья увеличила посещаемость в два раза

Sorry, this entry is only available in Русский.

Поздравляю с первым днем зимы!

Сегодня 1 декабря. Поздравляю всех читателей с первым зимним днем 2011 года!

(Русский) Этапы создания проекта ASP.NET MVC 3 + Fluent NHibernate + Castle Windsor

Sorry, this entry is only available in Русский.

(Русский) 1С: Отбор по “Объект не найден” в запросе

Sorry, this entry is only available in Русский.

(Русский) 1С Бухгалтерия: представление номеров документов с префиксами при печати

Sorry, this entry is only available in Русский.

(Русский) День рождения смайлика :-)

Smile

Sorry, this entry is only available in Русский.

ASP.NET MVC Custom Error 404 (Not Found) Page

I recently had to create a custom 404 Error Page in my ASP.NET MVC project. I thought I would do that in minutes. 6 hours later I found 2 ways to solving the problem. Читать дальше »

(Русский) Подсветка 1С для SyntaxHighlighter

Code

Sorry, this entry is only available in Русский.

(Русский) Поиск съемного носителя (флешки) в 1С

Флешка

Sorry, this entry is only available in Русский.

(Русский) ВКонтакте в 2006 и сейчас

Sorry, this entry is only available in Русский.