[Edit1:]
For the seqName, I declare it as a global parameter at the beginning of the file as
char seqName[20];
[Edit2:]
Aren't those number of passing to the program during the actual execution? I got the following message just by using the valgrind tool. The command I input is:
jl@ubuntu:~/work/dsr_analysis$ valgrind --tool=memchec...
I write two pieces of c programs like following, during memcheck process using Valgrind, a lot of mem leak information is given.
int
GetMemory(int framewidth,
int frameheight,
int SR/*, int blocksize*//*,int ALL_REF_NUM*/)
{
//int i,j;
int memory_size = 0;
//int refnum = ALL_REF_NUM;
int input_search_...
Hi,
I am learning some embedded programming. I am using Linux as my platform and I want to create a daemon program that will check if a particular device(magstrife, keypad, etc) is active. Like for example, my daemon program is running in the background, then when I make a keypress event, my deamon app will do something.
What implem...
I use mysqld Ver 5.1.37-2-log for debian-linux-gnu
I perform mysql calls from c++ code with functions mysql_query.
The problem occurs when mysql_query execute procedure, procedure locked on locked table, so mysql_query hangs. If send kill signal to application then we can see lock until table is locked.
Create the following SQL table ...
This is sample program from "Beginning Linux Programming" book:
#include <stdio.h>
#include <term.h>
#include <curses.h>
#include <stdlib.h>
int main()
{
setupterm("unlisted", fileno(stdout), (int *)0);
printf("Done.\n");
exit(0);
}
Running it, I have this result:
./badterm
'unlisted': unknown terminal type.
Accordi...
Hi
I would like to write a piece of code which checks, for each network device (e.g. eth0, lo, master devices) some statistics and configuration data about that device.
I could find the statistics data (and most of the configuration data) in /sys/class/net/..., however, I couldn't find any C/C++ API or any entry in procfs/sysfs listing t...
Hi,
I have written some simple inetd-Service in C. It reads a string from the user, compares it to another string and then terminates.
At least, this is what I want it to do. After reaching the return(0);-statement in main(), it simply restarts and presents me a new prompt.
Is there any way to tell inetd that it should terminate the co...
In my university there's a certain wlan network open for the students and employees. To use it, however, one must first log in via a website using your own username and password. This can also be done by submitting a http request with the right POST-data to the same website. I already have a shell script that does this but I'm still curi...
Hi,
I use the v4l2 api for video capture and image applying image processing algo' on each frame.
I wish to be able to suspend the video capture.
I see that there are 2 options for ioctling (new verb, its gonna catch) the stream.
VIDIOC_STREAMON, VIDIOC_STREAMOFF will start and stop the stream.
Is there a way to suspend \ resume it? ...
Hi all!
For some part of my project I need a process-local scheduling system that will allow me to delay method execution on few seconds. I have thousands of “clients” of this system, so using threading.Timer for each delay is a bad idea because I will quickly reach OS thread limit. I've implemented a system that use only one thread for...
The minor number is used by the kernel
to determine exactly which device is
being referred to.
The above explanation is just two abstract, can someone illustrate?
...
When I use
current->pid on ancicent platforms they doesn't support current->pid
does *FILE has something equal to pid that ican use ? some we can call it process "key" ?
...
I have a classifieds website. Each classified is linked like this originally:
mydomain.com/ad.php?ad_id=Bmw_M3_M_tech_113620829
What RewriteRule should I use to make this link look like:
mydomain.com/Bmw_M3_M_tech_113620829
Also, what do I need to add to my .htaccess file?
This is what I have so far:
Options +FollowSymLinks
...
two shared libraries liba.so and libb.so. liba.so uses libb.so. All c files are compiled with -fPIC. Linking uses -shared. When we call dlopen on liba.so it cannot find symbols in libb.so...we get the "undefined symbol" error. We can dlopen libb.so with no errors. We know that liba is finding libb because we don't get a file not fo...
i wrote a program that needs to continuously run. but since im a bad programmer it crashes every so often. is there a way to have another program watch it and restart it when it crashes?
...
I have a C++ project that due to its directory structure is set up as a static library A, which is linked into shared library B, which is linked into executable C. (This is a cross-platform project using CMake, so on Windows we get A.lib, B.dll, and C.exe, and on Linux we get libA.a, libB.so, and C.) Library A has an init function (A_i...
1- Does mod_rewrite means that if I make this url:
domain.com/ad.php?id=8498292
INTO
domain.com/8498292
that all links on my website will have to be changed to the later above?
example the link: domain.com/ad.php?id=8498292 wont work now, unless I replace it with domain.com/8498292 ?
Or will the server know that they are the s...
When i dump a table with uppercase letters using mysqldump it comes out as lower case in my > dump.sql file. I found a report here in 2006, almost 4 years old http://bugs.mysql.com/bug.php?id=19967
A solution here suggest making linux insensitive. I rather not if possible. Whats the easiest way to copy a win32 db into linux?
...
The relevant part of the code looks like this:
pids = []
for size in SIZES:
pids.append(os.spawnv(os.P_NOWAIT, RESIZECMD, [RESIZECMD, lotsOfOptions]))
# Wait for all spawned imagemagick processes to finish
while pids:
(pid, status) = os.waitpid(0, 0)
if pid:
pids.remove(pid)
What this should be doing is spawning ...
I have a removable device setup so it autoruns when plugged into a Windows machine and pops up a message giving the owner's information, so it can be returned if lost. Is there a way to do this in Linux as well? It doesn't need to be complex, it can be an option in a right-click menu, or a splashscreen, or anything.
...