ubuntu-12.04

db usage in nasm, try to store and print string

余生长醉 提交于 2019-12-12 01:58:25
问题 I was trying to store a few strings in my assembly, and use WriteString to print out on the screen. However, I only call one of the strings, it shows up all of them in one single line. Why does this happen? Is that anything wrong in my code? Thanks! Code here: %include "lib/libasm.h" SECTION .text global main main: call badrng ret badrng: push eax push edx mov edx, badrngstr call WriteString pop edx pop eax call failure ret failure: mov eax,1 int 0x80 ret SECTION .data nlstr: db "" badrngstr:

Increase httperf file descriptor size

一个人想着一个人 提交于 2019-12-12 01:55:19
问题 I'm trying to use httperf to make some tests on a server application that I made. I installed httperf via apt-get: sudo apt-get install httperf When I run any sample, httperf returns a warning like this: httperf: warning: open file limit > FD_SETSIZE; limiting max. # of open files to FD_SETSIZE I read that I have to change "__FD_SETSIZE" in "typesizes.h" but it´s not working though (event when I change it to "65532"): /usr/include/x86_64-linux-gnu/bits/typesizes.h Does anyone know the steps

How to make chdir() stay in the specified directory after the program finishes? [duplicate]

佐手、 提交于 2019-12-12 01:14:38
问题 This question already has answers here : Change directory of parent process after exit [duplicate] (2 answers) Closed 4 years ago . I have a program that calls chdir() to change the cwd. However, after the program finishes the cwd changes back to the directory that called the program instead of staying the in one specified by the call to chdir(). I made a program to test if chdir() is actually changing to the specified directory and found that chdir() is doing what I presumed: changing to the

template compilation error in Ubuntu and make

倾然丶 夕夏残阳落幕 提交于 2019-12-12 00:58:36
问题 I've got C++ functions written and compiled with MSVS 2008 in Windows. They have some templates. The functions are compiled and work just fine in Windows, but when I compile the same project in Ubuntu with "make", it generates errors. Here's the template template <class NumType> void drawCircles(cv::Mat& image, const cv::Mat_<cv::Vec<NumType, 2>> points, cv::Scalar color) { // added working for both row/col point vector Point2d p0; for (int i = 0; i < points.cols; i++) { p0.x = cvRound(points

mysql terminated with status 1?

久未见 提交于 2019-12-11 23:25:13
问题 This morning I noticed that my mysql server was not running. A look at the logs and I found the information below. While it is troubling that the mysqld service ran out of memory and was killed, it is more troubling that mysql could not restart. Any ideas on why mysql could not respawn? How can I test to make sure that if the process is killed it will respawn? Thank you. 387 Oct 10 06:37:09 ip-xxx-xxx-xxx-xxx kernel: [12218775.475042] Out of memory: Kill process 810 (mysqld) score 232 or

R scripting and command-line front-end

霸气de小男生 提交于 2019-12-11 19:52:17
问题 I am writing a R script to run the commands in the front-end in ubuntu: Rscript my_scripts.R my_file.txt output_file However, it gave me an error like "Error: unexpected symbol in "Rscript my_scripts.R" I came upon this post R command line passing a filename to script in arguments (Windows). and I quote the answers "As I said in my comment, I would use Rscript instead of R CMD BATCH:" So I found that in order to run this, I have to install sudo apt-get install littler according to this post

Eclipse's hadoop plugin not showing up on ubuntu

别来无恙 提交于 2019-12-11 19:43:52
问题 I'm trying to set hadoop up on Ubuntu to develop a project. I'm using Ubuntu 12, hadoop 0.18, java6 and Eclipse. Ubuntu OS is running on a virtual machine (VMware). I installed hadoop by following this guide: http://www.michael-noll.com/tutorials/running-hadoop-on-ubuntu-linux-single-node-cluster/ and everything works fine. Then I saw Hadoop provides a plugin for Eclipse. So, by following this guide: http://v-lad.org/Tutorials/Hadoop/13.5%20-%20copy%20hadoop%20plugin.html (even if it's for

Cannot create custom message

孤街浪徒 提交于 2019-12-11 17:39:59
问题 Hi i am currently trying to create a custom message for an exisitng package however i create Point_id.msg but when i included it as a header file in my code, i receive the following error /home/111/222/333/find_object_2d/src/objects_detected.cpp:7:41: fatal error: find_object_2d/PointObjects.h: No such file or directory compilation terminated. make[2]: *** [find_object_2d/CMakeFiles/objects_detected.dir/src/objects_detected.cpp.o] Error 1 make[1]: *** [find_object_2d/CMakeFiles/objects

Cordova: ant error code 1 when building android hello world app

拟墨画扇 提交于 2019-12-11 13:05:57
问题 Clean install of Cordova on an Ubuntu 12.04, then installed Android ADT bundle and added the platform-tools and tools to the path. Then created the hello app from toturial at apache Cordova. but it refuses to build. See the error I'm getting: aus@devhost:/opt/android_app/hello$ cordova build Running command: /opt/android_app/hello/platforms/android/cordova/build Buildfile: /opt/android_app/hello/platforms/android/build.xml -set-mode-check: -set-debug-files: -check-env: [checkenv] Android SDK

PHP can't open uploaded files

时光毁灭记忆、已成空白 提交于 2019-12-11 12:32:00
问题 I have Ubuntu Server with lamp. When i uploading files like xls or images it works fine, but when I trying to open it says me that the Excel file was broken. Same thing happens with images Is it possible that php changes the file? Permissions for /var/www/publick_html/uploads is 777 回答1: The problem was in versions of apache and php. Version of apache was 2.2 and php was 5.4 I upgraded my apache to 2.4 version and now it works fine. 回答2: well, I know,I use windows and maybe this is extremely