Prolog Programming in Ubuntu
Question I have an interest in playing and fuxing with prolog, I have installed the swi-prolog and added the repository, just in case anyone is interested on which one commands I used:
% sudo apt-add-repository ppa:swi-prolog/stable
% sudo apt-get update
% sudo apt-get install swi-prolog
How do I actually begin to write prolog codes on my linux machine? for my regular programming I use VIM to write/edit/debug and terminal to compile.…
Read more ⟶How to enable color for PHP CLI?
Question How do I enable the colors for output of CLI?
The below one is, running on Ubuntu.
If you see the screenshot, obviously the colors is enabled for terminal. And, if I call echo, it doesn't colorize the result, but if I use echo -e, it colorizes. I checked manual page of echo, and -e means enable interpretation of backslash escapes
How can I enable this option for PHP CLI?…
Read more ⟶pip is showing error 'lsb_release -a' returned non-zero exit status 1
Question I am trying to install packages using pip and it is throwing error. Command that I have used, sudo pip install selenium
The error it is showing, Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/usr/local/lib/python2.7/dist-packages/pip/commands/install.py", line 272, in run
with self._build_session(options) as session:
File "/usr/local/lib/python2.7/dist-packages/pip/basecommand.py", line 72, in _build_session
insecure_hosts=options.trusted_hosts,
File "/usr/local/lib/python2.7/dist-packages/pip/download.py", line 329, in __init__
self.headers["User-Agent"] = user_agent()
File "…
Read more ⟶How to close Android Studio using terminal in Ubuntu
Question I'm Ubuntu & Android beginner. I need help to close Android Studio using the terminal or a solution to resolve the error which is shown in this image:
Answer pkill java
Is the easiest one.
EDIT
Many people have made use of the command above, however, there is a drawback to using it: All Java applications running as your user will be killed.
To fix this, I've made a oneliner which will kill one Android Studio instance.…
Read more ⟶Call to undefined function curl_init() even it is enabled in php7
Question I've just installed php7 to my Ubuntu.
At first, there was no problem, my web site was working.
But suddenly, it started to return Call to undefined function curl_init() error.
Now, my pages contain curl codes do not work. In phpinfo(), it looks Curl is enabled.
There were similar questions but none of them handled it in php7.
I thought it should be something different than others.
Edit:
When I try php -i | grep curl in terminal, it returns /etc/php/7.…
Read more ⟶Why is the `git subtree` not working even though I have git 1.8.3.2 installed on Ubuntu 12.10?
Question I am about to deploy my AngularJS based static site as a Github Page with Yeoman. Step 3 of the deployment instructions tell me to do
git subtree push --prefix dist origin gh-pages
but when I enter that I get git: 'subtree' is not a git command. See 'git --help'.
This SO answer provided me instructions on how to upgrade to the latest git-core and ensure it always get upgraded to the latest stable release.…
Read more ⟶Xdebug stopped working, where do I look for errors?
Question I installed Xdebug and all was fine, until suddenly it stopped working. phpinfo() gives a nice XDebug output with all variables. php -m | grep deb
also gives twice XDebug (for Zend and PHP), so again looks just fine. My php.ini has these lines: zend_extension=/usr/lib/php5/20090626/xdebug.so
;extension=xdebug.so
xdebug.remote_host=localhost
xdebug.remote_enable=on
xdebug.remote_port=9001
xdebug.remote_handler=dbgp
xdebug.remote_connect_back=1
And yet, when running this code with should check XDebug (from Netbeans docs) it's just stuck. So No IDE is working with XDebug.…
Read more ⟶