ubuntu-12.04

Adding modules to Python3

大憨熊 提交于 2019-12-11 11:50:55
问题 I am trying to use the library matplotlib, but can't get it to work with python3. The python 2.7.3 interpreter I have finds it without a problem though. What steps do I need to take for python3 to have access to this library? 回答1: To handle your Python packages, I suggest you rather use pip than your OS package manager. To install pip, just follow the instructions. wget https://bitbucket.org/pypa/setuptools/raw/bootstrap/ez_setup.py python ez_setup.py wget https://raw.github.com/pypa/pip

Symfony: 'zlib extension' missing

大城市里の小女人 提交于 2019-12-11 11:09:53
问题 I wanted to start with Symfony, but I even fail a the Quick Tour... $ php -r "readfile('http://symfony.com/installer');" > symfony.phar $ sudo mv symfony.phar /usr/local/bin/symfony $ chmod a+x /usr/local/bin/symfony $ symfony PHP Fatal error: Uncaught exception 'PharException' with message 'zlib extension is required for gz compressed .phar file "/usr/local/bin/symfony"' in /usr/local/bin/symfony:9 Stack trace: #0 /usr/local/bin/symfony(9): Phar::mapPhar('default.phar') #1 {main} thrown in

Xlib XSendEvent click event do not work inside of some windows on Ubuntu 12.04

末鹿安然 提交于 2019-12-11 10:52:13
问题 i'm trying to send mouse click event using xlib in a ubuntu 12.04, all works when i do the click in the desktop bar icons and works when i do click in the title bar of each window (close, minimize, maximize window) but in some windows doing a click inside do not work, only work in my qt creator window but when i click in, for example, Home folder icon then move the mouse inside the folder, i can't do any click in folders or menu bar, only works in the title bar of the windows. Maybe is a bug

Executing a system command from mysql

怎甘沉沦 提交于 2019-12-11 09:23:46
问题 I am trying to execute a shell command from within mysql (from within a procedure or a trigger or the command line for mysql). I have added lib_mysqludf_sys to the mysql plugins and created the functions that are available with the library. (the library) home page The library has 5 functions. sys_set - to set $PATH - this works and stores the $PATH which i can later check. sys_get - to get the stored value of $PATH - this also works and returns the value that I have stored. sys_exec - to

How is your workflow when you develop a web app in Ubuntu knowing that the font you are using will look different on Windows?

别说谁变了你拦得住时间么 提交于 2019-12-11 09:05:23
问题 I recently started using Ubuntu 12.04 and I found it very cool and easy to use for web development, but I have a problem with FONTS! Why do they look so ugly in Ubuntu? If you check a website in Firefox Ubuntu and one in Firefox Windows 7 you realize that on Windows looks better every time. Even with ttf-mscorefonts installed will look ugly. My question is how is your workflow when you develop a web app in Ubuntu knowing that the font you are using will look different on Windows. Do you

ffmpeg gives an error Option movflags not found

自闭症网瘾萝莉.ら 提交于 2019-12-11 07:51:25
问题 In Ubuntu 12.04 LTS I have used -movflags frag_keyframe+empty_moov in my ffmpeg command: ffmpeg -i http://filesbe.vocativ.internal.net/03/44/SN/q1/xg/xl/0344SNq1xgxl.flv \ -crf 32.0 -g 250 -keyint_min 25 -aspect 4:3 -movflags frag_keyframe -vcodec \ libx264 -acodec aac -strict experimental -ar 44100 -ac 2 -b:a 128k -map 0:0 \ -map 0:1 -f flv -y test.flv ffmpeg version 0.8.6-4:0.8.6-0ubuntu0.12.04.1, Copyright (c) 2000-2013 the Libav developers built on Apr 2 2013 17:02:36 with gcc 4.6.3 ***

No such device or address: '/dev/stdout'

一笑奈何 提交于 2019-12-11 06:56:07
问题 I'm executing a python script from within node using execSync like this: execSync('python myScript.py -o "/dev/stdout"'); My script will send the result to the file specified at -o in this case /dev/stdout . I get the error message " No such device or address: '/dev/stdout' ". If I execute the command manually from the terminal it runs fine, but not when started via node. I'm running Ubuntu 12.04. 回答1: When you run the command in a terminal, /dev/stdout redirects to the terminal stdout . When

Install glibc2.16 in Ubuntu 12.04

走远了吗. 提交于 2019-12-11 05:28:28
问题 I'm using Ubuntu 12.04 and the binary I'm trying to run needs glibc2.16, I tried updating glibc by using apt-get install libc6 but only glibc2.15 got installed , can someone suggest me how to get glibc 2.16 in my machine. Sorry if this question doesn't belong here, but I couldn't find any resource. 回答1: You need to upgrade to a newer Ubuntu version, or recompile the software which currently needs glibc 2.16 specifically for Ubuntu 12.04, so that it will work with that older glibc version.

CakePHP 2.x virtual host file for Apache2

别说谁变了你拦得住时间么 提交于 2019-12-11 04:39:16
问题 Has anybody got a good example of a production server / test server virtual host file for CakePHP 2.x and Apache2? I had hoped it would have been covered in the Cake docs, but the closest I could find was this; http://book.cakephp.org/2.0/en/installation/advanced-installation.html. Thanks 回答1: try this: http://www.dereuromark.de/2011/05/29/working-with-domains-locally/ 来源: https://stackoverflow.com/questions/12131560/cakephp-2-x-virtual-host-file-for-apache2

Getting Image from the server while ignoring the file's case sensitivity

你离开我真会死。 提交于 2019-12-11 04:38:44
问题 How can i make my code to get image "_filename.JPG" not only "_filename.jpg"? string picUrl = "http://MyServer/" + _filename + ".jpg"; Image webImage = global::MyProject.Properties.Resources.ImageNotFound1; try { WebRequest requestPic = WebRequest.Create(picUrl); WebResponse responsePic = requestPic.GetResponse(); webImage = Image.FromStream(responsePic.GetResponseStream()); } 回答1: Case sensitivity is enforced by server - your client side code can't influence server's behavior. It is unusual