To connect to a MySQL database from Django or a python script you have to install MySQLdb. The installation of the package on MacOSX is not straightforward, so here is a small howto.
mysql_config.path = "mysql_config" to mysql_config.path = "/usr/local/mysql/bin/mysql_config"
Note: you have to specify the path to your mysql_config unless you have installed mysql.com package for mac
python setu.py clean python setup.py build sudo python setup.py install
If you get this compile error
/usr/include/sys/types.h:92: error: duplicate ‘unsigned’ /usr/include/sys/types.h:92: error: two or more data types in declaration specifiers
edit the _mysql.c file and comment this line
#define uint unsigned int
I’m releasing a new version of the plugin. This release is stable enough and fix a major bug dealing with scrollbar in IE but another major bug popup this time with safari, the list just doesn’t appear when you click on the replaced select box, I tried the latest Webkit build (r31623) and it works properly, if someone can point me to a debugging tool for Mac Safari I’ll be thankful !
If you’re trying to import an sql file using symfony propel-insert-sql and you get this error :
ERROR 1005 (HY000): Can't create table 'Table.frm' (errno: 150)
check this command output it’s really helpful :
mysql>SHOW ENGINE INNODB STATUS;
it will give you the detailed explanation about the most recent innoDB foreign key error.
If you are using a mysqldump file add these commands at the top and bottom of the sql file
SET FOREIGN_KEY_CHECKS = 0; -- TOP SET FOREIGN_KEY_CHECKS = 1; -- BOTTOM
that will disable constraints check
I’ve just released a new version of Selectbox replacement plugin which fix the highlight issue and added escape keyboard binding. A new css class has been created for the selected element - previously I was using the hoverClass - so now we have 2 options hoverClass and selectedClass.
You can view a working example here
Gedit snippets plugins allow smart code completion ala Textmate. Here is how to configure gedit to enable this feature :
1/ Download this file it contains symfony smart completion code
2/ Click “Edit” > “Preferences” and then select the plugins tab, scroll down unitl you found “Snippets”, Check it
3/ Go to “Tools” > “Manage Snippets” and click on the import button you should now see the new snippets.
NB : The triggers are the small words between parentheses, for example for link_to(…) just type linktoTAB and tab again to move from first parameter to the next one. I’ll update this post soon with a full list of triggers.
A quick note to let you know that I’ve released a new version of the jquery selectbox replacement plugin, this is mainly a bug fix release. I would like to thank ‘pawel maziarz’ for his contribution.
I’ve received a request to make a license modification and I did :) , so now the plugin is licensed under a dual license GPL/MIT
This is an unobtrusive jQuery plugin that allows you to replace the HTML select box with a styled dropdown menu.
As most of us, I hate IE6 but I have to deal with it. At work, our users use exclusively IE6 so you can imagine the nightmare! I came across the IE bug where the select box stay always on top of any div even if you define a z-index value, more on the subject can be found here and here. So this plugin try to resolve the problem by replacing the select box by dropdown menu.
You can view a working example here
NB: A new version can be located here
The long awaited feature has been added to the PHP repository yesterday using the Dimitry Stogov’s implementation.
Define a namespace :
namespace Zend::DB;
class Connection
{
//code
}
function connect()
{
//code
}
You can import namespaces or class name like this:
require 'Zend/Db/Connection.php'; import Zend::DB; import Zend::DB::Connection as DbConnection; $x = new Zend::DB::Connection(); $y = new DB::connection(); $z = new DbConnection(); DB::connect();
After 4 long years, Oracle will launch their new version “Oracle 11g” tomorrow (July 11) with a live stream from New York.
This version will contain no less than 482 new features (more details) seen in the beta version revealed 9 months ago like data compression, Speed boost, the ability to create a standby snapshot for regression testing, online application upgrade (hot patching), a native Java & PL/SQL compilers and the more interesting feature for me is a re-engineered driver for PHP.
a little while ago, a friend wrote the pin plugin based on prototype and since that time I decided to move to jquery so I decided to update it.
The goal of this plugin is just to remember field’s values when needed by the user.
Imagine that you have a (big) form that it’s extensively used and for some reasons the value of some fields are repeated every time, the plugin can solve this (writting/selecting) issue by providing a mechanism to choose and save some fields.
Like other jquery plugins you just have to call :
$(element).pin();
Not yet