Fixed a subtle bug in our code recently:
$options = array(); // method params $this->Foo->id = 'bar'; $this->Foo->baz($options); Setting ->id is fairly handy, but unexpected results occur when used in conjunction with ->find() and ->del(); e.g.,
$options = array('contain' => array()); $this->Foo->id = 'bar'; $this->Foo->find('first', $options)); // BUG Now for ->del():
$this->Foo->id = 'bar'; $this->Foo->del(); // BUG This is especially bad behavior when deleting a record, so take care to inspect the query log – we use Oracle 11g Release 2 here.
Got this error today whilst trying to install an RPMForge package, collectd:
error: Failed dependencies: rpmlib(FileDigests) <= 4.6.0-1 is needed by rpmforge-release-0.5.2-2.el6.rf.i686 rpmlib(PayloadIsXz) <= 5.2-1 is needed by rpmforge-release-0.5.2-2.el6.rf.i686 Googled about it for awhile, nothing forthcoming. Now, if you rpm -qa | grep rpmlib no results will return. The actual package name is rpm-lib.
So after awhile I noticed that the versions stated above were higher than the one I had installed, and I’d just done a yum upgrade.
Who doesn’t love a personality test?
This one’s from http://www.doolwind.com/blog/programmer-personality-test/:
You like coding at a High level. The world is made up of objects and components, you should create your programs in the same way. You work best in a Solo situation. The best way to program is by yourself. There’s no communication problems, you know every part of the code allowing you to write the best programs possible. You are a Conservative programmer.
First you’ll need MongoDB Server running on your system. It’s easy on Debian/Ubuntu.
Add 10gen’s package source to your /etc/apt/sources.lst. This one in particular is for Ubuntu Jaunty (9.4).
deb http://downloads.mongodb.org/distros/ubuntu 9.4 10gen Then download and install mongodb-stable; e.g.,
sudo apt-get update sudo apt-get install mongodb-stable ps should something like so:
$ ps -aef | grep mongodb . . . mongodb 8322 1 2 17:49 ? 00:02:59 /usr/bin/mongod --dbpath /var/lib/mongodb --logpath /var/log/mongodb/mongodb.
Received this error whilst make-ing OCI8 for PHP. It was a fresh install of 64-bit CentOS 5.4 w/ Oracle XE 10g installed; e.g.,
/usr/bin/ld: skipping incompatible /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so when searching for -lclntsh /usr/bin/ld: cannot find -lclntsh So I checked for /usr/lib/oracle/10.2.0.4/client/lib/libclntsh.so – it exists, but for some reason it was “incompatible”. Google is helpful once again. The problem was that the 10g RPM was 32-bit, but I was trying to compiling a 64-bit version of OCI8.
This set of commands helped me resolve this error quickly. First we need to find out the path to the appropriate datafile(s):
$ sqlplus sys as sysdba SQL> select name from v$datafile where name like '%system%'; NAME -------------------------------------------------------------------------------- /oradata/foo/system01.dbf 1 rows selected. There’s only one datafile, so we’ll need to check if /oradata has free disk space; e.g.,
$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda1 50G 47G 2.