Limit memory on a Docker container doesn't work


Question I am running the last version of Docker on top of Ubuntu 13.04 (Raring Ringtail): root@docker:~# docker version Client version: 0.6.6 Go version (client): go1.2rc3 Git commit (client): 6d42040 Server version: 0.6.6 Git commit (server): 6d42040 Go version (server): go1.2rc3 Last stable version: 0.6.6 But when I start the container, root@docker:~# docker run -m=1524288 -i -t ubuntu /bin/bash root@7b09f638871a:/# free -m total used free shared buffers cached Mem: 1992 608 1383 0 30 341 -/+ buffers/cache: 237 1755 Swap: 2047 0 2047 I don't see any limiting from any kind, and my kernel has the cgroups memory limit enabled:…
Read more ⟶

Methods to detect public IP address in bash


Question As part of an installation script, I want to make an "educated guess" about the machines public IP address. It should be as robust as possible, working on a variety of hosts and platforms. Here is an example: https://gist.github.com/4669037 This script uses 3 methods and then defaults to the value of /etc/hostname. I have only tested this on Ubuntu so far. Will this be likely to work on other distributions?…
Read more ⟶

Install openblas via apt-get `sudo apt-get install openblas-dev`


Question Is it possible to install openblas via apt-get like sudo apt-get install openblas-dev? Seems on ubuntu 14.04 it can't find it. sudo apt-get install openblas-dev Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package openblas-dev Answer apt-cache search openblas libblas-test - Basic Linear Algebra Subroutines 3, testing programs libopenblas-base - Optimized BLAS (linear algebra) library based on GotoBLAS2 libopenblas-dev - Optimized BLAS (linear algebra) library based on GotoBLAS2 So sudo apt-get install libopenblas-dev solved the problem.…
Read more ⟶

Android Virtual Device(AVD) creation issue on Ubuntu 16.04


Question I am trying to create AVD in my Ubuntu 16.04 machine. I am using Android Studio. While i'am going to create AVD it showing "An error occurred while creating the AVD. See idea.log for details". I couldn't found anything at log file. Last few line generated at log file while creating AVD: 2017-03-10 11:27:01,806 [ 204460] INFO - attrs.AttributeDefinitionsImpl - Found tag with unknown parent: AndroidManifest.AndroidManifestCompatibleScreens 2017-03-10 11:28:42,656 [ 305310] INFO - tools.…
Read more ⟶

Ugly fonts in Java applications on Ubuntu


Question Help me, please. It's screen of my Netbeans: PyCharm: How can I fix it? I use Oracle Java 7. java version "1.7.0_25" Java(TM) SE Runtime Environment (build 1.7.0_25-b15) Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode) PS: For comparison my Sublime Text: Answer So... Seems my problem is solved. Step 1, Install and configure Infinality for better font rendering in Linux sudo add-apt-repository ppa:no1wantdthisname/ppa sudo apt-get update sudo apt-get upgrade sudo apt-get install fontconfig-infinality Step 2.…
Read more ⟶

How do I print the content of a .txt file in Python?


Question I'm very new to programming (obviously) and really advanced computer stuff in general. I've only have basic computer knowledge, so I decided I wanted to learn more. Thus I'm teaching myself (through videos and ebooks) how to program. Anyways, I'm working on a piece of code that will open a file, print out the contents on the screen, ask you if you want to edit/delete/etc the contents, do it, and then re-print out the results and ask you for confirmation to save.…
Read more ⟶

Where is the MySQL JDBC jar file in Ubuntu?


Question I have installed MySQL 5.5.32 via apt-get install into Ubuntu 13.04.I want to use it in a Java project.For this i must have MySql connector jar.I can not find it.I tried locate *mysql*.jar but it did not find anything.I looked into /etc/mysql but there is no jar in it.I don't want to download it from internet because i believe that it somehow exists in an MySQL folder.Does anybody have any idea where the connector jar went into Ubuntu 13.…
Read more ⟶