Saturday, November 29, 2014

Solution: Mysql is not working in MAC OS Yosemite

Edit the below file, with this command on Terminal.app:
sudo vim /Applications/XAMPP/xamppfiles/mysql/scripts/ctl.sh
On line #59, delete this:
/Applications/XAMPP/xamppfiles/xampp startmysql > /dev/null &
and put this
/Applications/XAMPP/xamppfiles/bin/mysql.server start > /dev/null &
(save the file: ESC :wq!)
Restart All Servers on XAMPP.app (manager-osx)

Friday, August 1, 2014

How to Remove An Item from RUN Dialog Box History / MRU List in Windows?

All of us use Start menu RUN dialog box to enter frequent commands in Windows. It stores the entered commands in its history and suggests them whenever we enter them next time.
RUN_Dialog_Box_History.jpg
Although its a good feature but sometimes we might want to remove a particular item from the history list because of some obvious reasons.
Here is a simple and safe method to remove any desired item from RUN history / MRU (Most Recently Used) list:
1. Type regedit in RUN dialog box and press Enter. It'll open Registry Editor.
2. Now go to following key:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU
In right-side pane, you'll see various String values with the name a, b, c, etc and their value will be set to the command which you entered in RUN dialog box:
RunMRU_List_in_Registry.jpg
3. You just need to delete the String value which contains the command which you want to remove from RUN history list. e.g. if you want to remove "msconfig" command from RUN history, then delete the "b" String value.
4. That's it. Now the deleted command will no longer appear in RUN MRU list.

Wednesday, May 14, 2014

PHP Mavericks, XAMPP and Sendmail Oh My!

First back up the file we’ll edit -
cp /etc/postfix/main.cf  /etc/postfix/main_orig.cf
then edit it -
sudo vi /etc/postfix/main.cf
and set
relayhost = [smtp.theserver.edu]
you may be tempted to edit myhostname, or mydomain but just leave them commented out.
save the file
Back up your php.ini file -
cp /Applications/XAMPP/etc/php.ini  /Applications/XAMPP/etc/php_orig.ini
then edit it -
sudo vi /Applications/XAMPP/etc/php.ini
search for SMTP, it may be commented out, but change it to this -
SMTP=localhost
uncomment
smtp_port=25
then change
sendmail_path = /usr/sbin/sendmail -t -i
save the file

Wednesday, February 26, 2014

Deleted rows duplications in MSSQLsever



WITH CTE AS(
   SELECT N,asofdate,
       RN = ROW_NUMBER()OVER(PARTITION BY N ORDER BY N)
   FROM dbo.CSVCBC08TO0214 where asofdate='31012014'
)
DELETE FROM CTE WHERE RN > 1

Saturday, January 4, 2014

Count Column in SQLServer by sql statement

SELECT COUNT(COLUMN_NAME) FROM INFORMATION_SCHEMA.COLUMNS WHERE
TABLE_CATALOG = 'CB201312' AND TABLE_SCHEMA = 'dbo'
AND TABLE_NAME = 'Main_CSV_DEL_ERROR_TOUAT_2'