How could I print the top 10 users on a linux distribution by the number of processes they have running? I have managed to do this using a shell script, but now I'm interested at how I can do this using Python.
...
I have been looking for weeks for a way to do this:
I am working on a music player, and would like something like this:
Library >
Music (6)
Videos (2)
Playlists >
new playlist...
And so on. I am using mono and gtk#. I can't find a tutorial or anything, if someone could help me find on...
I own a Razer Naga Mouse, essentaly it has a small numpad on the side of it. I want to remap these keys to different unused keys or to bash commands. I can do this easily by using xev to grab the keycode (for instance the "1" on the mouse is keycode 87) and then I can use xmodmap to bind the keycode to a different key.
However the numpa...
The application I'm using only plays sounds after enough sound has been generated. Say I click the mouse 10 times, with no sound, and then after those ten clicks I'll hear ten mouse click sounds (for example)
The only way I've found to alleviate this problem is to set a very short buffer size, which I don't want to do.
I've been trying...
Hi, when I use bash to run the following code, it will assign the value 5 in to the var1.
var1=$(awk '$1>$3{ print "5"}' newfile2)
echo $var1
But when I use this same code in banana or something, it gives me error. Can some one please tell me if there is some other way I can write this code, so I can run it using the C or Korn shell ...
Does GTK (on GNU/Linux) support Arabic localisation, if so how can it be done?
...
I have 3 files Head.cpp , Head.h and Hello.cpp . I am trying to build a make for the compilation process. My makefile is make.w
Hello : Head.o Hello.o
g++ -o Head.o Hello.o
Head.o : Head.cpp
g++ -o Head.cpp
Hello.o: Hello.cpp
g++ -o Hello.cpp
every time I type the command make make.w - I get " Nothi...
Hi all,
I am accessing network drive (Z:\stream) on windows. Now the permission set on stream folder is like chmod -R 777 streams/ means all the files inside stream is at 777 but now i am copying some files from windows to this streams folder but permission on those files are not 777 ,i would like to have permission 777 on those files t...
We have a repository running on subversion 1.6.6 on Ubuntu server. While adding a new file to the working copy and committing it to the repo, we get the error
Can't open file '/var/svn/mobilesync/db/txn-current-lock': Permission denied
What is the issue and what can I do about it ? Is it a matter of a lock created by a previous proces...
Hello,
I have both EASEUS Partition Master and Paragon Partition Manager, but both do not let me alter my Linux partition. I cannot increase the size from the Linux partition itself since it is mounted. I currently do not have a free USB drive handy, so I cannot run Linux from it and open up gparted. How can I go about increasing the siz...
I'm getting this error when
softweb:~ # mysql
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: YES)
I'm not even inputting the password and its telling me that I'm giving one.
in the my.cnf file there is no login saved.
If I change the password to the one I had before I can log in without writing -pXXXX
...
Hi,
Suppose I have 2 static Libs S1 and S2 which are different versions of the same lib and have the same C (not C++) interface though implementations are different. 2 shared libs D1 and D2 each of which links to S1 or S2 only. Suppose an application A links with S2 which is the more recent of the static libs and dynamically loads bo...
Is there a way to trigger/fire the UP key in the command line?
Instead of me having to press UP key.
...
How do I use the "history" command to fire the last run command?
...
Hello there,
Last week I installed Ubuntu and tried to get it to boot with Wake On Lan.
I rerouted all incoming packets at port 9 to the server. When it's the magic packet the server will boot. All went well until I tried it the next day from a different location. It wouldn't work. So I started googling and did some tests and found out...
Hi,
I need to copy a table from one database to another. This will be a cronjob. Which one is the best way to do it? PHP script or Shell Script. The problem with PHP, both databases has different usernames and passwords so I can't do it like this.
CREATE TABLE db1.table1 SELECT * FROM db2.table1
Should I just connect first DB get all r...
Do these two structs have the same memory layout? (C++)
struct A
{
int x;
char y;
double z;
};
struct B
{
A a;
};
Further can I access x, y, z members if I manually cast an object of this to an A?
struct C
{
A a;
int b;
};
Thanks in advance.
EDIT:
What if they were classes instead of structs?
...
I am coding on my laptop, and watching online video on an windows pc. the suck video site can't turn to fullscreen mode back after goto next video, so I want to use laptop(linux) to remote control the windows.
But... when I using rdesktop login to the windows, the current session was logout, ...
So , what can I do, is there any client...
In one side I have a Java client writing ints into its outputstream:
int a = 20;
dataout.writeInt(a);
dataout.flush();
From the other side I have a C server listening the connection:
int client = accept(...);
How to read the int sent by Java?
If I had a Java server, i could easily write:
int a = dataIn.readInt();
How to do this in C...
Why there are two so similar command in Linux? and normally what are the circumstances to use each of them?
...