get mouse deltas under linux (xorg)
Is there a convenient way to get mouse deltas (e.g. mickeys) under X/linux? I know that I could read from /dev/input/mice but that requires root access and seems a bit to low level for me. Any idea? ...
Is there a convenient way to get mouse deltas (e.g. mickeys) under X/linux? I know that I could read from /dev/input/mice but that requires root access and seems a bit to low level for me. Any idea? ...
I recently ran some penetration testing software on my web site and was surprised for it to report that one of my directory listings was publicly accessible. It is the directory of the root user which is available. http://www.example.com/~root/ Results in this page content: Index of /~root * Parent Directory * cgi-bin/ Pla...
I'm recently looking for some tools for code coverage, lcov satisfied my needs until I discovered that it doesn't cover dynamic linked code, there are some commercial products but I'd rather stick to free solutions, does somebody know a tool to achieve that? ...
I would like to convert a remote Perforce repository into a Mercurial repository on Linux. So I have installed Python and Mercurial on a Linux box. Then I test few hg (Mercurial's drive program) commands. All are working fine. Now without creating any hg repository on the Linux box I want to run hg convert on Linux, so that a Mercurial...
I have below sample file which has large values more than 10000000. date,value1,value2,value3,value4 2009-06-01,16100834.94,20891965.33,15271434.3,9923084.09 2009-06-02,15061830.06,17072556.28,12578230,10591562.41 2009-06-03,14508669.28,18841097.35,15536549.47,13583187.15 2009-06-04,13771192.1,15689469.39,24404897.6,10371282.63 I can ...
Hi, I am building an rpm please let me know where i am going wrong, My spec file is rpms.spec and the contents are: Summary: GNU indent Name: rpms Version: 1 Release: 1 Source0: %{name}-%{version}.tar.gz License: GPL Group: Development/Tools %description The GNU indent program reformats C code to any of a variety of formatting standar...
I want to create a shared library that uses functions from a 3rd-party static library. For example, foo and bar from libfoobar.a. I know that my main application is also using foo and will be exporting that symbol. So I simply want to link in bar to save code size and leave 'foo' unresolved (as it will be provided by main application). I...
Conventional wisdom states that OS kernels must be written in C in order to achieve the necessary levels of performance. This has been the justification for not using more expressive high level languages. However, for a few years now implementations of Common Lisp such as SBCL have proven to be just as performant as C. What then are t...
This problem is driving me crazy. Maybe the experts at Stack Overflow can help. I want to open an application in Xvfb and to have it always positioned at x,y=0,0 (Top left corner). The application does not take any parameters, allowing it to reposition the opened window itself. Is there a way to set the default window position in a X-...
Hi, I modified the block mapping in an inode and want to flush the page cache associated with the inode so that the new inode with new mapping will be loaded from disk. I tried below functions but it works some time and fails some other time. invalidate_mapping_pages() - for flushing non-dirty pages truncate_inode_pages() - for flushin...
I have some .h files as follows (on Linux) Source/Server/connect.h Source/Server/message.h ... I am developing another application that needs the two .h files but is in a different directory Source/App2/.. How can I include the connect.h file in the App2 application, considering that I use perforce and everyone else working on the ...
I really like the console and got recently hooked on programming console applications using nCurses mainly in conjunction with the C programming language. Unfortunately i think the ncurses API is totally borked and very hard to use, and the C++ bindings are undocumented. So my question is, what is THE API to use for C++ console applic...
Hi, I have a static class member class bar {...} class foo { public: static QHash<qint64,bar>* barRepHash; } Now I call a function which accesses this member within a shared library, I get a memory error whereas when I access the function through the main program, it works fine. I've tested this under a number of circu...
Right now i am loading a file then using gettimeofday and tracking the CPU time with tv_usec My results varies, i get 250's to 280s but sometimes 300's or 500's. I wrote usleep and sleep (0) and (1) with no success. The time still varies vastly. I thought sleep(1) (seconds in linux, not the windows Sleep in ms) would have solved it. How...
Note: I'm attempting to study a high-level overview of Virtual Memory allocation Is an entire process's virtual address space split into pages, of a particular size: .text .bss .data Does this also include heap space and stack - or is this always non-pageable? ...
Hello, everyone! I have a Plone installation in my home directory under Linux. ~/Plone. This was made from a default distribution of Plone from its website. So Plone compiled own python and is bundeled with Zope. Please tell me, which files are necessary to backup if I want to: 1) Backup the whole data ever stored in my Plone instanc...
I have this code that uses epoll and it has a problem. When I run it, it gives output: Server-socket() is OK... Server-bind() is OK... 3 4 accept: Invalid argument I'm running it on ubuntu linux, system updated, both as limited user and root what is wrong with the input to accept? What should I change? struct epoll_event ev, events[...
Hi, I am trying to set up a production environment for my grails application. So I have downloaded a VMWare Ubuntu image distribution (8.10) and I have installed Java/Groovy/Grails/Tomcat under this server. Everything worked fine until the moment I needed to share some files with my host computer (Windows Vista - Firewall Disabled). Th...
Consider this code: one.c: #include <stdio.h> int one() { printf("one!\n"); return 1; } two.c: #include <stdio.h> int two() { printf("two!\n"); return 2; } prog.c #include <stdio.h> int one(); int two(); int main(int argc, char *argv[]) { one(); two(); return 0; } I want to link these programs togethe...
i was palying with the ruby sockets, so i ended up trying to put an IP packet togather, then i took an ip packet and try to make a new one just like it. now my problem is: if the packet is: 45 00 00 54 00 00 40 00 40 01 06 e0 7f 00 00 01 7f 00 00 01, and this is obviously hexadecimal, so i converted it into a decimal, then into a binary...