Sunday 9 November 2014

Subtitle button doesn't work in XBMC when using the re-touched skin

The button no longer works after upgrading to Gotham.

On Windows go to C:\Users\<Name>\AppData\Roaming\XBMC\addons\skin.re-touched and in the folders 16x9 and 4x3Hirez rename DialogSubtitles.xml.xml to DialogSubtitles.xml (remove the extra .xml at the end).

Source: http://forum.kodi.tv/showthread.php?tid=196110

Thursday 7 August 2014

Chromium doesn't launch

The profile appears to be in use by another Chromium process (19846) on another computer. Chromium has locked the profile so that it doesn't get corrupted. If you are sure no other processes are using this profile, you can unlock the profile and relaunch Chromium.



Run rm -f ~/.config/chromium/SingletonLock. This will delete the singleton lock for chromium. The lock was left after chromium wasn't shut down properly last time.

Saturday 26 July 2014

SSH: WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!

 You get an error like this:

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@    WARNING: REMOTE HOST IDENTIFICATION HAS CHANGED!       @
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
IT IS POSSIBLE THAT SOMEONE IS DOING SOMETHING NASTY!
Someone could be eavesdropping on you right now (man-in-the-middle attack)!
It is also possible that the RSA host key has just been changed.
The fingerprint for the RSA key sent by the remote host is
[MAC Address]
Please contact your system administrator.
Add correct host key in [known_hosts folder] to get rid of this message.
Offending key in [line number in known_hosts folder]
RSA host key for [host you were trying to connect to] has changed and you have requested strict checking.
Host key verification failed.


There are two solutions (both are easy):
  1. Run ssh-keygen -R hostname. According to the man page this: "Removes all keys belonging to hostname from a known_hosts file."
  2. Manually delete the entry on the provided line number in your known_hosts folder. You can find known_hosts/ in .ssh/

For more details see here

Thursday 8 May 2014

Sunday 13 April 2014

Problem #6: iframe.contentDocument is null

Normally to access the contents of an iframe you've created you use iframe.contentDocument. However, sometimes it turns up null, even if there are clearly elements within the iframe. This is because of the Same-origin policy. In a nutshell, you're not allowed to access the contents of the iframe through js if it's from a different origin.

I feel that an more explicit warning would have saved me a lot of time. Although this is a fair policy, it's not always at the top of my mind while writing code.

Tuesday 25 March 2014

Problem #5: Prolog's "Out of local stack"

 






Description

You're running SWI-Prolog and you get something like the following:

Solution

Within validmove/3 I had the following code:

I was reading that you get this when you're in some sort of infinite loop. I didn't seem to have that problem because removing  the last line would get rid of the error. I resolved it by adding an exclamation mark.


I believe this is because Prolog is trying to unify MvList with an empty list ([]). Since the way I call validmove/3 would always give a non-empty list, Prolog kept trying to backtrack into moves to find an empty list. But since I don't know Prolog, what I just said could all be baloney.

Comments

The joys of Prolog.

Problem #4: Prolog is hiding part of my answer



 


Description

Your answers keep getting truncated with elipses.

Solution

Press "w" to expand it.


 Press "p" to truncate it again.

Comments

N/A

Problem #3: Prolog ignoring a predicate



Description

Prolog seems to be ignoring the second checkForPeriods
 

Solution

Prolog tries the  predicates in the order they're listed! Since the first predicate is still valid when C is 0, it gets used and C goes into the negatives. To solve this I just needed to reorder the two.

Comment

This caused me so many headaches. I was trying to do this, but it kept going negative until it ran out of stack. As you can probably tell, I have no background in Prolog. I'm learning it while I use it to complete this program.

Monday 24 March 2014

Problem #2: "Syntax error: Operator priority clash"



Description

Solution

Replace the comma on the last line with a period.
SWI-Prolog uses the term for illegal sequences of operators. I.e.
a :- b :- c. 
Quoted from: http://www.groupsrv.com/computers/about124076.html 

Comment

Even though I new to Prolog (this is my second program using it), I feel like I'll continue to make this mistake if I ever use Prolog again.

Problem #1: "Prolog-Interpreter /bin/plwin.exe not found. Please configure correctly."

Description

While trying to use SWI-Prolog-Editor the following error appears in the bottom pane:
Prolog-Interpreter /bin/plwin.exe not found. Please configure correctly.

Solution

You should double check to see which version of swi-prolog you installed (32-bit or 64-bit), because swi-prolog editor only works with the 32-bit version. If you tried using the editor with the 64-bit version, you'll get the error described above
Quoted from: http://stackoverflow.com/a/4811337


Comments

N/A