ubuntu-14.04

How to compile and run C in sublime text 3?

拟墨画扇 提交于 2019-12-17 15:26:23
问题 I would like to compile and run C program in sublime text 3 on ubuntu 14.04. Currently the program is being compiled with gcc using sublime text 3 executing a command (see below code), but I was wondering if it's possible to have the program execution output to appear on sublime text console as well. Here's what I currently have to compile C program with sublime text 3 c_compile.sublime-build { "cmd" : ["gcc", "$file_name", "-o", "${file_base_name}"], "selector" : "source.c", "shell":false,

Docker-compose: node_modules not present in a volume after npm install succeeds

别来无恙 提交于 2019-12-17 03:51:55
问题 I have an app with the following services: web/ - holds and runs a python 3 flask web server on port 5000. Uses sqlite3. worker/ - has an index.js file which is a worker for a queue. the web server interacts with this queue using a json API over port 9730 . The worker uses redis for storage. The worker also stores data locally in the folder worker/images/ Now this question only concerns the worker . worker/Dockerfile FROM node:0.12 WORKDIR /worker COPY package.json /worker/ RUN npm install

Docker-compose: node_modules not present in a volume after npm install succeeds

非 Y 不嫁゛ 提交于 2019-12-17 03:51:51
问题 I have an app with the following services: web/ - holds and runs a python 3 flask web server on port 5000. Uses sqlite3. worker/ - has an index.js file which is a worker for a queue. the web server interacts with this queue using a json API over port 9730 . The worker uses redis for storage. The worker also stores data locally in the folder worker/images/ Now this question only concerns the worker . worker/Dockerfile FROM node:0.12 WORKDIR /worker COPY package.json /worker/ RUN npm install

Capistrano Could not locate Gemfile or .bundle/ directory?

让人想犯罪 __ 提交于 2019-12-14 03:58:56
问题 I try to use Capistrano in my rails app on Ubuntu server , and run cap production deploy got this message: Could not locate Gemfile or .bundle/ directory here is my setting: lock '3.4.0' `ssh-add` # need this to make key-forwarding work set :application, 'beaconserver' set :repo_url, 'my git' set :deploy_to, '/home/john/projects/beaconserver' set :log_level, :debug set :keep_releases, 5 set :linked_files, %w(config/database.yml config/secrets.yml) set :linked_dirs, fetch(:linked_dirs, [])

Rails Deploy Digitalocean ActiveSupport::MessageEncryptor::InvalidMessage:

痞子三分冷 提交于 2019-12-14 03:44:44
问题 I'm deploying an app on digitalocean following this guide: https://www.digitalocean.com/community/tutorials/deploying-a-rails-app-on-ubuntu-14-04-with-capistrano-nginx-and-puma#prerequisites When I deploy with cap cap production deploy:initial --trace I keep getting this error The deploy stops here: 01 ~/.rvm/bin/rvm default do bundle exec rake assets:precompile 01 rake aborted! 01 01 ActiveSupport::MessageEncryptor::InvalidMessage: ActiveSupport::MessageEncryptor::Inva… 01 and when I run

MySQL error access denied

ε祈祈猫儿з 提交于 2019-12-14 03:15:57
问题 I'm trying to configure MySQL server on Ubuntu 14.04 . After installing it, it worked fine, both shell mysql and MysqlWorkbench. After I had the system rebooted everything stopped working. If I try to connect with the shell I get this: ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES) I get this error with any user... Even with the --skip-grant-tables option I don't have access to anything. The connection test from the Workbench does not work either, although

Running stem with tor gives “Process terminated: Timed out”

让人想犯罪 __ 提交于 2019-12-13 18:50:45
问题 While trying to run Stem's To Russia With Love example, I am getting the following error: ~$ python practice.py Starting Tor: Traceback (most recent call last): File "practice.py", line 49, in <module> init_msg_handler = print_bootstrap_lines, File "/usr/local/lib/python2.7/dist-packages/stem/process.py", line 266, in launch_tor_with_config return launch_tor(tor_cmd, args, torrc_path, completion_percent, init_msg_handler, timeout, take_ownership) File "/usr/local/lib/python2.7/dist-packages

sqlite3 error “attempt to write a readonly database”

a 夏天 提交于 2019-12-13 17:24:06
问题 I'm sure this will be a silly question for those who know python but I'm trying to debug a python script and I can't find out something. I'm getting the following error: (sqlite3.OperationalError) attempt to write a readonly database [SQL: u'INSERT INTO samples (file_size, file_type, md5, crc32, sha1, sha256, sha512, ssdeep) VALUES (?, ?, ?, ?, ?, ?, ?, ?)'] I know that to fix this what I have to do is to change the DB access to write, but I don't know where this DB is located. The DB is

What's the difference with opencv, python-opencv, and libopencv?

一个人想着一个人 提交于 2019-12-13 16:06:07
问题 I'm new to opencv and using ubuntu 14.04 , I'm confused of the difference with opencv , python-opencv , and libopencv , as I have libopencv and python-opencv installed in my system, but I there is no cv interface accessible, so I have to install opencv which is much hard than python-opencv and libopencv . 回答1: libopencv is the debian/ubuntu package while python-opencv is the python wrapper and can be accessed using cv2 interface like COLDSPEED mentioned 回答2: I would like to add to Andika's

Docker. Assign IP from the same range as Host

◇◆丶佛笑我妖孽 提交于 2019-12-13 12:43:59
问题 I am playing with docker. Now I want to assign IP to container from the same IPs range as my host OS has. My Host has IP address 192.168.1.50 (192.168.1.0/24 network). And I want to use for example 192.168.1.51 from the same network for Docker container. For this I`ve installed bridge-utils (I am using Ubuntu 14.04) and reconfigured my interfaces: auto lo iface lo inet loopback # The primary network interface auto eth0 iface eth0 inet manual auto br0 iface br0 inet static address 192.168.1.50