One way to fast update all records in a MongoDB collection is to send an update with multi flag true. Example:
db.my_collection.update({},{ $set: { "Price" : 100 } }, false, true );
One way to fast update all records in a MongoDB collection is to send an update with multi flag true. Example:
db.my_collection.update({},{ $set: { "Price" : 100 } }, false, true );
I use below script to show current module, controller, action name in Zend view.
$request = Zend_Controller_Front::getInstance()->getRequest(); echo 'Module: '.$request->getModuleName().' '; echo 'Controller: '.$request->getControllerName().' '; echo 'Action: '.$request->getActionName().' ';
To show which processes are listening to which ports on a Linux machine you can use:
netstat -atp | grep -i "listen"
On Mac OS X you can use:
lsof -i | grep -i "listen"
If you have attached an external mouse to your laptop, you may not need touchpad which may be accidentally touch. I’ve made a short script to disable and enable the touchpad.
1: Disabling the TouchPad
#!/bin/sh dev=`xinput --list | grep PS/2 | grep Generic | cut -f2-2 | cut -c 4-10` export DISPLAY=:0 xinput set-int-prop $dev "Device Enabled" 8 0 echo "Device id=$dev has been disabled"
2: Enabling the TouchPad
#!/bin/sh dev=`xinput --list | grep PS/2 | grep Generic | cut -f2-2 | cut -c 4-10` export DISPLAY=:0 xinput set-int-prop $dev "Device Enabled" 8 1 echo "Device id=$dev has been enabled"