You cannot write outside of the /home/ directory by default. Also sudo is a command, you cannot execute a command from a BufferedWriter. So, launch your jar with sudo java -jar yourJar.jar or launch your IDE in root (for eclipse sudo eclipse). And try something like that: import java.io.BufferedReader; import...
java,events,ubuntu,terminal,mouse
Check that your buffer size is correct. In recent Linux kernels size of input_event structure is dependent on many things, but mainly on cpu architecture. Here's its declaration: struct input_event { struct timeval time; __u16 type; __u16 code; __s32 value; }; On 32-bit systems it's very likely that your buffer...
php,mysql,ubuntu,azure,virtual-machine
1) change my.conf (whatever your mysql conf file is called). And set bind-address to 0.0.0.0 as it is prob 127.0.0.1 2) stop/restart mysql daemon Connections now are not limited to those from localhost (what you are when you ssh). The default is localhost for obvious security reason until dev guy...
Best practice usually suggests adding these lines to your Apache config to disable directory listing: <Directory /> Options -Indexes Order allow,deny Allow from all </Directory> But this will simply deny users access to the URL example.com/img. If you'd like to redirect as well, you could add an index.php file to...
Heuristics suggest that this is an m3.large or r3.large instance, and /dev/xvdb is your 32GB SSD ephemeral volume, also known as an instance store volume. http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/InstanceStorage.html If this is true, you definitely need to familiarize yourself with ephemeral disks before you continue using it for whatever you are using it...
linux,unix,ubuntu,storage,diskspace
Here's an awk script I wrote years ago to do this very thing. Just put it in cron to run at a specified schedule. #!/bin/sh /bin/df | \ /usr/bin/awk '{if($5 ~ "%" && $6 !~ "proc") {used=$5} else {used=""}; \ sub(/%/, "", used); \ if(used > 80) print $6 "...
Install sudo apt-get install libapache2-mod-php5 if you didnt before.
Here val deviceOutput = new CUdeviceptr() cuMemAlloc(deviceOutput, SI) you are allocating SI bytes - which is 4 bytes, as the size of one int. Writing more than 4 bytes to this device pointer will mess up things. It should be cuMemAlloc(deviceOutput, SI * numElements) And similarly, I think that the...
linux,ubuntu,ubuntu-14.04,julia-lang
You can install different versions of Julia in different locations and set separate symlinks. For example, you could download the v0.3 Linux binaries and install them to one location, then clone the GitHub source for v0.4 and install that in another location. Then set symlinks such as julia3 for v0.3...
Ubuntu has moved from to Upstart to Systemd in version 15.04 and no longer respects the limits in /etc/security/limits.conf for system services. These limits now apply only to user sessions. The limits for the MySQL service are defined in the Systemd configuration file, which you should copy from its default...
Probably your issue is with the path you're passing as an argument. I've tried your script with the following changes: import shutil import os loc = "testfolder" path = os.getcwd() + '/' + loc + "/" dirs = os.listdir( path ) for file in dirs: name = file shutil.make_archive(name, 'zip',...
According to Alex Bleasdale/David Ennis, download the CentOS version; then: Ubuntu and other Debian based distributions use DEB packages and CentOS or RedHat use RPM packages. To convert an RPM to DEB in a somewhat reliable way, one can use the 'alien' command. You install and use alien as follows:...
Make sure, that you checked the following points: - the mod_rewrite module is enabled - you allow the htaccess to overwrite the settings you want (check, if the AllowOverwride directive is set, e.g. (that would be the easiest value) to all, see http://httpd.apache.org/docs/current/de/mod/core.html#allowoverride # your directory definition AllowOverwride All #...
OK, I think I fixed the problem. The conftest.c seems to be looking for cuda.h in /usr/include, instead of the supposed /usr/local/cuda/include. The problem is solved once I created a soft link of cuda.h and cuda_runtime_api.h.
I've used camicri to download a package with all of its dependencies.
As per Mathias comment in my question I found the answer here... How can I open Sublime Text 2 files from the command line in linux to a tab, not a new window...
ruby,ubuntu,gem,install,nokogiri
I tried the following commands and I've got it. Thanks to Mr.Kumar $ sudo apt-get update $ sudo apt-get install libxml2-dev $ sudo apt-get install libxslt-dev $ sudo gem install nokogiri -v '1.4.7' $ gem list nokogiri *** LOCAL GEMS *** nokogiri (1.4.7) ...
ruby-on-rails,ruby,ubuntu,twitter
You are getting this error because there is no ruby development environment installed. Development environment is needed to compile ruby extensions, You should install development first using command below: $ sudo apt-get install ruby-dev ...
java,eclipse,ubuntu,terminal,virtuoso
I have had a hard time trying to get commands run using Runtime.exec() in the past. Anyways I have shifted to using ProcessBuilder as follows: ProcessBuilder pbuilder = new ProcessBuilder("bash", "-c", <<your command as string>>); File err = new File("err.txt"); try { pbuilder.redirectError(err); Process p = pbuilder.start(); p.waitFor(); } catch...
python,user-interface,ubuntu,permissions
Well, the answer is: do not use same home directory for all users! It is bad idea in the first place. Instead place the file .xsession in the directory all users have access to. (ex.: /usr/local/common/) So to have same application running for all users of the system (instead of...
You don't need the echoes or the back quotes. Just: #!/bin/bash conky -q & plank & This should also work: #!/bin/bash echo `conky -q` & echo `plank` & So you put in background the whole command....
ubuntu,networking,terminal,virtualbox
I looked around and realized I needed to use the sudo command so I added sudo before the "tc qdisc..." I'm fairly new to linux so I don't know many stuff. My bad!
ubuntu,cmake,g++,cross-compiling,beagleboneblack
Yes, you need the boost libraries which are not header only built for ARM. This SO question covers that: cross compile Boost 1.57.0 on ubuntu for arm To make things like find_package work for cross compilation you should set CMAKE_FIND_ROOT_PATH. Suppose you set CMAKE_FIND_ROOT_PATH to /opt/beagleboard. CMake will then look...
myreponame.git doesn't exist on the server currently, but I'd like to be able to add it automatically just by using the remote add origin command. That is not how you add a new repo with gitolite. You need to modify your conf/gitolite.conf file of your gitolite-admin repo, in order...
android,ubuntu,android-studio,ubuntu-14.04
As given here The bug seems to be triggered by some missing synchronization between IBus (the server) and Xlib + AWT (the client JVM), exposed by a combination of a quick succession of key presses and the client’s slower event handling. The 2 workarounds that helped me were : Workaround...
ubuntu,python-3.x,pip,virtualenv,mod-wsgi
If they had activated the Python 3 virtual environment and its bin directory was in there path, then likely they could simply run 'pip' rather than 'pip3'. You should run 'which pip' to verify whether it was coming from the virtual environment you expect. The 'mod_wsgi-httpd' package is specifically for...
Ok, I found the solution. It was simple. I just have chosen wrong version of GTK# library. It should be a 2.12.* version, but on GTK# master it is 2.99.*. When I changed the version (by git checkout), everything was compiled as it should. Mono.Addins will compile with 2.99.* of...
just make a loop executing the command you have with #include <stdlib.h> int system(const char *command); That´s all you need ...
mongodb,ubuntu,amazon-web-services,apache2
When I went through the logs, I saw a message that there was insufficient room for "journal file." I rebooted my AMI on an EC2 instance with more storage and reinstalled Mongo. That did the trick. I had uploaded a few files to the instance after updating my Apache2 settings,...
ubuntu,android-studio,ubuntu-14.04
oh I've solved this problem, I install Oracle JDK 9 when android studio runs on JDK 6 or JDK 7 (if I'm not mistaken). so I uninstalled Oracle JDK 9, then download and install the JDK 7...
You are writing on stdout which is buffered by default, and as I cannot see any break, return or exit in your loop, I assume that you quit your program with Ctrl-C. And all the values that were buffered until there are simply discarded. You should simply fflush stdout after...
python,windows,ubuntu,vagrant,virtualbox
What I'm looking for is a way to run Ubuntu on this machine, for development work AND for personal use VirtualBox should be able to provide everything that you need. You can create a VM of your choosing, with or without a GUI and use it for whatever you...
It's your wrong autoloading definition. You want to use the class PicoCore\Rest\ApiInitializer And you have these files: api/index.php api/vendor/... (with your required external dependencies) api/composer.json (with the autoloading mentioned in your question) api/core/PicoCore/rest/ApiInitializer.php And you have this autoloading configured: "autoload": { "psr-0": { "PicoCore\Rest\" : "PicoCore/rest" } } This is...
linux,bash,ubuntu,sublimetext,build-system
The problem was this build system was killing itself first, because its own commandline matched java.*MySketch. Solution: Replaced \"java.*$file_base_name\" with \"java.*$file_path\\$\" Details: Looked at the commandline of the process I want to kill and saw that it ended with --sketch-path=~/Sketchbook/MySketch, whereas the build system's commandline ends with --force. Used (blabla)$...
You should not provide a full path when trying to execute a class with "java". The "java" command expects to receive just the class name as an argument. That's why this works properly: java HelloWorld But this does not: /usr/bin/java /home/shivajividhale/cloudOccular/HelloWorld To make the latter work, you need to provide...
While porting I missed the _gettid in __bootstrap_inner method. I think it is required to be called in the context of the thread. In my case earlier it was getting called in the context of the main thread, hence the result.
The errors that you are getting are because the cout is not in the global namespace rather it is in std namespace. Well instead of writing using namespace std; after #include <iostream> try using: using std::cout; since using first option is a bad practice. You can refer to Why is...
Before beginning these instructions, I'd unmount the external HDD in order to start fresh. We're going to modify the fstab configuration file, located in /etc/fstab. We'll need to first find your HDD's UUID, so we can correctly configure fstab. To do this, run sudo blkid and note your HDD's UUID....
To build upon Hi-Angel's answer: Under Windows 7 The local Git config is inside the .git directory at the root of your repository/project. The global Git settings are in C:\Users\<user_name>\.gitconfig. The SSH keys you generated are in C:\Users\<user_name>\.ssh (at least, this is the standard). Under Ubuntu/Linux The local Git config...
There's no need to use alien. There is an official deb package as well. s3://aws-codedeploy-us-east-1/latest/codedeploy-agent_all.deb You should use the install script at s3://aws-codedeploy-us-east-1/latest/install to automatically download the latest release of the agent. Here's the user data example for Ubuntu in us-east-1 here: #!/bin/bash apt-get -y update apt-get -y install awscli...
linux,ubuntu,elasticsearch,pid
Until elasticsearch fixes it , one possible workaround is to adapt the file /etc/init.d/elasticsearch change PID_DIR="/var/run/elasticsearch" to PID_DIR="/var/run" the PID file will now be created directly in the run folder. https://github.com/elastic/elasticsearch/issues/11594...
ubuntu,cuda,ubuntu-14.04,nvidia
304.xx is a driver that will support CUDA 5 and previous (does not support newer CUDA versions.) If you want to reinstall ubuntu to create a clean setup, the linux getting started guide has all the instructions needed to set up CUDA 7 if that is your intent. I believe...
I recommend you to use --log-file=<filename> option. From manual: --log-file=<filename> Specifies that Valgrind should send all of its messages to the specified file. If the file name is empty, it causes an abort. There are three special format specifiers that can be used in the file name. %p is replaced...
java,linux,ubuntu,hadoop,distributed
My problem is now solved. Actually the problem was in my network settings. Unfortunately, the Hadoop system could not locate the right machine at the time of reduce due to my faulty network settings. The correct network settings should be: At /etc/hosts file the following info should contain: localhost 127.0.0.1...
It doesn't seem to be configurable at the moment based on this open issue. However, you could always fork the project and modify the start script to use your own custom docker image. If so, make sure you make it: FROM meteorhacks/meteord:base ...
To answer your direct question, unless you produce a static binary (by default linker will produce a dynamic one), there are default libraries to link with (libc, for one). Specifying -L does tell the linker to first look in the directories specified. It's not gcc thank links, but ld, gcc...
javascript,node.js,ubuntu,ssh,node-mysql
This can actually be simplified if all you need to do is tunnel MySQL connections from inside your application. The mysql2 module has (better) support for passing a custom stream to use as the database connection, this means you do not have to start a local TCP server and listen...
ubuntu,installation,mercurial,tortoisehg
You can find out where in your path an application exists using the type command like this (when using bash): [email protected]:~$ type -a hg hg is /usr/local/bin/hg It's possible it was installed as a python package in which case the command would be: pip uninstall mercurial but it might just...
Magic number is the term for the first two bytes of an executable file. It is used to determine how the executable should be loaded. The magic number is also used in *.pyc files that are compiled from the *.py files. It says what version of bytecode is used inside....
Installation from github have helped me. pip3 install git+https://github.com/codelucas/newspaper.git...
Parallel processing I'd use GNU/parallel. It isn't distributed by default, but can be installed for most Linux distributions from default package repositories. It works like this: parallel echo ::: arg1 arg2 will execute echo arg1 and and echo arg2 in parallel. So the most easy approach is to create a...
I wouldn't leave library paths to chance like that: require_once(__DIR__ . '/libraries/Stripe/init.php'); This would make sure you include the script using the absolute directory path of the currently running script. Update Failed opening required '/var/www/html/libraries/Stripe/init.php' Well, then the file is simply not there; if this file was generated by some...
You would use --fork or an init script to make this run as a service post terminal session shut down. If the process goes down then your application cannot connect to the sharded set. It will be unable to connect at all to your DB. This is (not the only...
ruby-on-rails,ruby,apache,ubuntu
As I can see you are having PG error, you can make these changes: sudo nano /etc/postgresql/9.1/main/pg_hba.conf Change => local all all ident To => local all all trust if still do not work change to=> local all all md5 Then restart your postgres server sudo /etc/init.d/postgresql restart ...
The following applies to Linux (at least): The status of a process can be found in /proc/[pid]/status. For a zombie the file /proc/[pid]/cmdline is empty, that is reading from it returns 0 bytes. For details please see here: http://man7.org/linux/man-pages/man5/proc.5.html...
You can also do that using gcore: Generate a core dump of a running program with process ID pid. Produced file is equivalent to a kernel produced core file as if the process crashed (and if "ulimit -c" were used to set up an appropriate core dump limit). Unlike after...
It looks like you are missing the m4 package. On Ubuntu, you can install it by doing sudo apt-get install m4 ...
You're propably mixing up FTP and TFTP. I think you're searching for an instruction to set up a normal ftp server. Try this tutorial. If the server is reachable from the internet: Use a strong password, setup TLS / SSL and use your favorite FTP client software (e.g. FileZilla for...
ruby-on-rails,ubuntu,ruby-on-rails-4,deployment,capistrano
I suppose that the RSA identity is not added to the authentication agent. To add the identity, just run the command ssh-add ~/.ssh/id_rsa...
css,google-chrome,ubuntu,fonts
Well I'll be damned. It was AdBlock. AdBlock usually displays a little badge showing how many elements are being blocked on each page. It didn't show anything! I hadn't noticed these styles being inserted until now: ::content a[title="Connect with us on Twitter"], ::content a[title="Connect with us on Youtube"], ::content a[title="Facebook"],...
ubuntu,redirect,ssl,nginx,rewrite
Your web server is setup with Strict-Transport-Security max-age=16070400; includeSubdomains. This will tell the web browser to request your domain using https only. If you want the subdomain blog to be accessed through insecure http, you will need to remove includeSubdomains from the HTTP Strict Transport Security (HSTS) and use a...
This is a known issue in Chrome 43.0.2357.124 for Linux. It is fixed as of Chrome 43.0.2357.125. See this issue in their bug tracker, opened 2 days ago (June 9 2015). You should update Chrome to the latest version: sudo apt-get update && sudo apt-get install --only-upgrade google-chrome-stable If updating...
mysql,email,ubuntu,sendmail,ubuntu-14.04
You are very close. You can use mail command to send 1 attachment as follow (you'd better TAR / ZIP your files before sending): echo "$2" | mail -s "$1" -a /path/to/file.tar.gz [email protected] Next, if you want to have more features, you can use mutt (install with apt-get install mutt):...
I think i have find the problem. The problem is the RST tools to convert in html. In pyreport, when you choose the math mode, the program will do the sentence in a bock .. raw:: LaTeX But in the new version of rst2html, this command doesnt work, it's replace...
Yep, but it's a pain. Most of the time it's because you have to use the full path to the phantomjs executable. Also, make sure phantomjs is properly installed on your server too, like, does it work if you just run the phantomjs command in a terminal? ...
c++,templates,ubuntu,inheritance,g++
In Derived.hpp, you need to add: #include "Base.hpp" at the top. Otherwise, the compiler doesn't know what Base refers to when compiling this file....
It depends on your VirtualBox network settings for that VM. If you have set the networking up for bridging and have forwarded your ports directly to the VM, you're done. If you are using NAT, then you need to forward ports from your host to the guest OS using the...
ruby-on-rails,apache,ubuntu,amazon-web-services,storage
You only have 7.5G of total space. Your /etc folder is using up 3.7G, which seems like waaaay too much, and your home directory is 1.3G. Use du -sh * on each of these directories to find out what is using so much space in them and delete them if...
Try netstat -tlp | sed 's,[0-9]\+/,,' ...
c++,ubuntu,singleton,dynamic-linking,boost-unit-test-framework
Got it! Ubuntu seems to use the --as-needed linker option by default, where as Fedora may not. Turning it off will add libcase.so library to the needed list for unittest. After deploying the library (or using LD_LIBRARY_PATH) the unittest works now. unittest: libcase.so g++ -o unittest test_main.cpp -Wl,--no-as-needed -L. -lcase...
I had to add extra paths to my LD_LIBRARY_PATH environment variable to get things working. The test here in the conda build script actually shows those variables. export LD_LIBRARY_PATH=$PREFIX/lib:$PREFIX/jre/lib:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$PREFIX/jre/lib/amd64:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$PREFIX/jre/lib/amd64/server:$LD_LIBRARY_PATH export LD_LIBRARY_PATH=$PREFIX/lib/python2.7/site-packages:$LD_LIBRARY_PATH $PREFIX here is the path to the anaconda folder. I currently install miniconda at /usr/conda...
python,django,apache,ubuntu,nltk
I am using the same web-stack as you and I had the exact same problem. This normally happens when you run multiple Django projects from the same server. You need to set WSGIApplicationGroup to %{GLOBAL} in your site's config settings WSGIApplicationGroup %{GLOBAL} I actually read this here: django apache mod-wsgi...
You can try sed: sed -e 's/^.*bucket://' | sed -e 's/[a-zA-Z]*:$//'...
python,opencv,ubuntu,install,ubuntu-14.04
You should be importing is cv2 not opencv, there is also no highgui. You might want to check out the docs
ubuntu,hadoop,installation,yarn
Add these lines in .bashrc: export HADOOP_HOME=/path/to/your/hadoop/installation export PATH=$PATH:$HADOOP_HOME/bin As for, I don't see any folder "bin" inside Hadoop installation Check whether you have binary distribution or source. Download hadoop-2.6.0.tar.gz from Hadoop Distributions, in case you have source distribution....
ubuntu,haskell,vim,ubuntu-14.04,cabal
Your $PATH variable seems to be broken. In a comment you said it was /home/me/google-cloud-sdk/bin:/.cabal/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games This means that your shell (assumed to be bash) will look in the following directories /home/me/google-cloud-sdk/bin /.cabal/bin /usr/local/sbin /usr/local/bin /usr/sbin /usr/bin /sbin /bin /usr/games /usr/local/games when looking for executable. If you look at the second...
c++,ubuntu,linker,cmake,protocol-buffers
As @frymode pointet out in his comment, linkage to NewGeneratedMessageReflection means that the compiler generated code that uses Protobuf version 3 (as I used that version in my .proto files). However, the library files installed from the ubuntu package pulled version 2 onto my system, that's why the methods could...
java,linux,ubuntu,libgdx,server
I've answer my self this question for anyone who's looking for this. First, added these two libraries in the build.gradle file: compile "com.badlogicgames.gdx:gdx-backend-headless:$gdxVersion" compile "org.mockito:mockito-all:1.9.5" Then, I've started my libGDX as following: HeadlessNativesLoader.load(); MockGraphics mockGraphics = new MockGraphics(); Gdx.graphics = mockGraphics; HeadlessNet headlessNet = new HeadlessNet(); Gdx.net = headlessNet; HeadlessFiles...
c++,multithreading,ubuntu,asynchronous,serial-port
Didn't specify a fd_set to read. Try this: fd_set readfs; /* file descriptor set */ FD_ZERO(&readfs); /* clear the set */ FD_SET(fd, &readfs); /* put the fd in the set */ int ret = select(fd + 1, &readfs, 0, 0, &tv); Edit: That should also solve your other question. Each...
java,swing,ubuntu,jframe,location
I don't have Ubuntu to test with, but I've used something similar to this on both MacOS and Windows import java.awt.Container; import java.awt.Point; import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; import java.awt.event.MouseMotionListener; import javax.swing.JFrame; import javax.swing.SwingUtilities; public class Test { private static JFrame mainFrame; public static void main(String[] args) { SwingUtilities.invokeLater(new Runnable() {...
First of all this is not a proper way to ask questions. You must do some research before asking question here. Since you asked the question already, let me answer this. You cannot(and you shouldn't) access database server directly from an android device. You need a web service in order...
I fixed this issue by changing the Linux kernel version to 3.10 from 3.16.
I got help from some experts close by: add 3 lines to /etc/profile export http_proxy=http://[username]:[password]@[webproxy]:[port] export https_proxy=http://[username]:[password]@[webproxy]:[port] export ftp_proxy=http://[username]:[password]@[webproxy]:[port] For a similar error (apt-get update was not reaching some repositories), I edited /etc/apt/apt.conf: Acquire::http::proxy "http://[username]:[password]@[webproxy]:[port]"; Acquire::https::proxy "https://[username]:[password]@[webproxy]:[port]"; Acquire::ftp::proxy...
ubuntu,vagrant,virtual-machine,docker-swarm
As show swarm/discovery in comment: # on each of your nodes, start the swarm agent # <node_ip> doesn't have to be public (eg. 192.168.0.X), # as long as the swarm manager can access it. $ swarm join --addr=<node_ip:2375> token://<cluster_id> node_ip it's the ip address of the new node of the...
"input file /home/raghuveer/Downloads/hadoop-2.6.0-src/hadoop-common-project/hadoop-common/target/findbugsXml.xml does not exist" A resource file usually should reside in <your project>/src/main/resources/ to be copied to /target during the build. See Maven, Introduction to the Standard Directory Layout and Apache Maven Resources Plugin: The Resources Plugin handles the copying of project resources to the output directory. ...
python,linux,ubuntu,virtualenv
Why not just use VirtualBox to virtualize a 32 bit Kubuntu whenever you want to develop in 32 bit Python. That way you have the best of both worlds: your 64 bit system for normal use and a 32 bit system that you can fire up whenever you need it...
If the program is reading from your terminal instead of stdin, you'll find that it ignores any data you send in using file redirection. If that's the case, then you can use a program like expect to automate interactions with the terminal using a pseudy-tty. This is exactly the sort...
ruby-on-rails,postgresql,ubuntu,heroku,sqlite3
Do you have PostgreSQL installed locally? If not, that might be the reason for that (having gem 'pg' is not enough to install it locally). You will have to run sudo apt-get install postgresql postgresql-contrib to install. You do not need it installed locally to push to Heroku though...as long...
It was a problem with the database and not the Qt application, the connection refused if a password was used.
window.setBounds(100, 100, SCREENW, SCREENH); was missing!...
python,django,ubuntu,django-admin
You have misspelled startproject as startprojekt. Try: django-admin startproject mysite ...