Warning: strpos() [function.strpos]: needle is not a string or an integer in /home/customer/www/home.beardeddonkey.com/public_html/index.php on line 41
hOme.beardedDonkey - KVS Build Error Found character '}' (Unicode 7d) where an instruction was expected
KVS Build Error Found character '}' (Unicode 7d) where an instruction was expected 
There is an error that you can get when building your KVS code and it tells you it found a curly brace when it shouldn't.

This can happen if you start writing a section of code and then forget about it and lose track of where you were in the Code Editor. This error is saying to you, "you've left out a curly brace or a parenthesis or something" and it will report to you a line number but this is the problem. The line number given sometimes is not helpful. In my case, it said:
[15:11:46] [KVS] Compilation error: Found character '}' (Unicode 7d) where an instruction was expected
[15:11:46] [KVS] In script context "kvirc::corecall(run)", line 978, near character 5
[15:11:46] [KVS] Code listing:
[15:11:46] [KVS] 976 ...
[15:11:46] [KVS] 977
[15:11:46] [KVS] 978 }
[15:11:46] [KVS] 979 }
[15:11:46] [KVS] 980 ...
[15:11:46] [KVS] Window:
[15:11:46] [KVS] classeditor [ID: 24]

So I knew what the problem was, and I knew it was in my classes code ("Window: classeditor" but it said "script context kvirc::corecall(run), line 978". This is not that helpful because when you're using Code Editor inside KVIrc all the code is split into classes and functions so line numbers don't match what you're looking at.

How to find the location of the problem

The way to find where this problem is, is to do the following:
1. In Class Editor, click Save button
2. Next, opposite click the class in the Class Editor's hierarchical tree and export the classes code to a new temporary file somewhere (keep a backup of your old classes code just in case)
3. Now go to Scripting -> Execute Script in KVIrc and select the file you just exported. KVIrc will try to load the code but fail with the same error it found before. But this time it will give you a line number you can actually find. In my case it said:
[16:16:38] [KVS] Compilation error: Found character '}' (Unicode 7d) where an instruction was expected
[16:16:38] [KVS] In script context "F:/temp/classes.kvs", line 2598, near character 5
[16:16:38] [KVS] Code listing:
[16:16:38] [KVS] 2596 ...
[16:16:38] [KVS] 2597
[16:16:38] [KVS] 2598 }
[16:16:38] [KVS] 2599 }
[16:16:38] [KVS] 2600 ...
[16:16:38] [KVS] Window:
[16:16:38] [KVS] classeditor [ID: 24]

Now I could go to the exported file, line 2598, and see the section of my code that was causing the problem.


[ view entry ] ( 524 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 594 )
mysqldump gives Error 1045 access denied when using .my.cnf for automated backups using sh script 
I had to change my passwords recently and I found that after I did this for the credentials used to access my mysql databases that my automated backup scripts became broken. I finally found a fix for this.

It turned out that if you use special characters in your passwords like !@#$%^&*() this will confuse mysqldump when it's reading your login credentials from a my.cnf file.

The my.cnf file is used mostly when you want to create an automated method of backing up your mysql database contents. Since the process is automated and it needs a password, it's a security risk to just use the -p switch with mysqldump in your shell script because the password will be exposed in plain text in the process list of the machine while the mysqldump process runs.

The my.cnf file holds the login credentials on disk, but are set to be only readable by your user, so other users can see what's in the file. The mysqldump process can read the file to get the credentials, keeping them safe.

I found a forum posts here: https://www.virtualmin.com/node/21032 by chitoz that had a small mention about the character # being used in his password and it creates problems.

The fix for this was to edit the my.cnf file and enclose the password string in single quotes:

username = user
password = 'specialChars@$#&%'

[ view entry ] ( 623 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 800 )
HOWTO Fix Non-Removable Google Play Movies and TV Notifications on Android Phone 
For the interwebz:

1. Go to Google Play Store and update or install the Google Play Movies app
2. Open Google Play Movies & TV app
3. Once you open the app, the notifications should all disappear from your phone's notification curtain
4. In the app, go to Settings, under section "Get Notifications" untick the options you don't want to see

[ view entry ] ( 577 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 689 )
Mi Remote Android App and Aldi EasyHome Oscillating Fan Pairing 
We have a pedastal fan from Aldi which comes with remote control and I wanted to see if the MiRemote app that comes with MIUI Android phones like the Xiaomi range of phones worked with the fan.

The remote app doesn't list any brand names that looked familiar such as EasyHome or Aldi that could be found on the fan itself, so I thought I'd randomly try a Chinese brand fan and hope for the best.

The best is what I got by fluke. I chose Xiaoxiang brand fan from the brand's list in the app and the second (of 2) options pressing the power button worked for me.

I then tried all the buttons in the app and pretty much all of them worked. Power, fan speed, fan mode, oscillation all works.

[ view entry ] ( 655 views )   |  [ 0 trackbacks ]   |  permalink  |   ( 3 / 801 )

<<First <Back | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | Next> Last>>