I have a C++ library repeater.so that I can load from Python in Linux the following way:
import numpy as np
repeater = np.ctypeslib.load_library('librepeater.so', '.')
However, when I compile the same library on Mac OS X (Snow Leopard, 32 bit) and get repeater.dylib, and then run the following in Py...
Hi.
I'm working on a I/O verification tool based on Linux in a game project. It is written in C++, and,since using the same I/O module as our game, it's based on OIS 1.2. Thus, though all I need is to print users' inputs on the console, I still need to create a window for OIS.
So here comes my question: How can I create a mapped window ...
I'm using python right now. I have a thread that represents my entire program. I want to open another console window using os.system(xterm&) as a thread which works. The only thing is, is it possible to print to the new window while the other thread is printing to the older window?
import sys
import os
def my_fork():
child_pid ...
I have to execute any other program from my C program which is continuouslly giving messages
(intermediate result) on stdout.These messages(intermediate result) i can retrieve after exec finishes its execution(other program is terminated) but my problem is that
if execution of exec command is going on ,then how to retrieve these messag...
I've got a server running inside a screen session, and I want to send this program a command. I thought screen -X was my answer, but all that gives me access to is screen commands (title, exec, etc).
I need to be able to send the command as if I was typing it into the program. Any ideas?
...
I first zeroed out the first 512 bytes of the USB flash drive using
dd if=/dev/zero of=/dev/sdb bs=512 count=1
Then i saw that the output of
hexdump -n 512 /dev/sdb
and from within fdisk (the raw dump of the partition table) is different.
Specifically, hexdump shows that all bytes are really zeroed out. But, in fdisk I see that th...
Firstly, I use pthread library to write multithreading c program. Threads always hung by their waited mutexs. When I use the strace utility to find a thread is in FUTEX_WAIT status, I want to know which thread hold that mutex at the time. But I don't know how could I make it. Are there any utilities could do that?
Someone told me java v...
I created a cronjob with the command crontab -e:
*/1 * * * * /var/lib/tomcat/webapps/ROOT/WEB-INF/scripts/test.sh
This file test.sh should be executed every minute. But it doesn't work.
If I run the script manually it works fine. So I think the problem is the cronjob not the script ;)
Are there any permissions or something else w...
I am an windows developer with over 15 years experience. I have just started looking at the latest version of Ubuntu Linux. Could someone point me at a good beginners guide to Ubuntu (preferably from a developers prospective) which is aimed at a Windows user? I have found several using google, but unfortunately I know so little on this s...
I have written a Linux system wide C++ program /usr/bin/PROG_X that uses a configuration file /etc/PROG_X.conf and log file /var/PROG_X.log.
Now I need to call this program, after strong authentication, from the web using apache web server and php. Calling the program may involve changing configuration files and will change, of course, ...
I have a classifieds website, and when users post a new classified, they may chose to upload images.
My php code takes the chosen image, uploads it to a image folder, and names it accordingly.
The problem here is, I have to set the images folder to 777 in order for this to work.
My question is, what should the permissions be set to? A...
Upload speeds to one particular server of mine are drastically slower than expected, or tolerable.
I am moving a site to a new host; part of the functionality of the site is the upload of several large (>50Mb) files daily. The current upload speeds are unacceptably slow on the new server.
I am new to linux and apache server config...
Hi,
I would like to read the whatever metadata there might be in a DMG file. I don't need to actually install it, I just want to read any metadata (commentary, timestamp, manifest, whatever) there might be. I'm working on a Linux system, and I do not have superuser privileges.
I have read that it's possible to read a DMG file by mount...
I am doing training in LINUX OS and device driver programming (introduction). I need to work on a live project which can be completed within maximim 10 days days. This is part of my under graduation course requirement.
The project is compulsory and contributes to 70% of the total marks I get for this training. So a good project would c...
From what I've heard there was IronRuby and Ruby.NET and a few other variations. I've also heard that Ruby may not be supported anymore by Microsoft as they started to lay of much of that development group.
I'd like to know which implementation(s) of Ruby is likely to survive, and which one will be adopted into large enterprises.
It w...
What is the ideal rails server? Lets assume its on a VPS, such as Linode. Lets assume that any of the sites won't become the next twitter, but they should scale well. It must also support multiple sites and all sites are rails 3. And the database must be on the same server (for now).
Should it use apache or nginx?
Ruby Enterprise Editi...
I've built mingw32 for Linux and would like to use it with Eclipse IDE. However, the CDT plugin uses some predefined way to auto-detect toolchains (which, for mingw, seems to only work for Windows) and doesn't have a way to locate them manually. Is there any way to make it detect mingw under Linux?
...
Having more than one process read from a serial device (/dev/ttyXX) makes it so that both processes can't get all of the data -- the data will be split between them in some way. I'd like to write a program that reads from a serial device, creates several master/slave pty pairs, and then allows programs that were made to read from the se...
Hi,
I have a firewall appliance base on linux that have glibc-2.3.4, and have not gcc to compile a program for that.
when I compile a program by another linux machine, error message says: require glibc.x.x.x
how can I compile a c program in another linux machine for that version of glibc?
...
I use GDB to debug C/C++ programs very often, and I'm reasonably knowledgeable with how it works and what it can do.
However, every so often I run into problems where mysteriously I can't seem to get GDB to properly load symbols from a core file.
Currently, I have a binary executable in a shared NFS directory. The executable was def...