Visit Our UNIX and Linux User Community

Search Results

Search: Posts Made By: Gunther
Forum: Programming 10-01-2009
16,995
Posted By Gunther
Ok, so here's the source: #include <stdio.h>...
Ok, so here's the source:

#include <stdio.h>
#include <sys/utsname.h>
#include <stdlib.h>

int main()
{
struct utsname name;
if(uname(&name)) exit(-1);
printf("Your computer's OS is...
Forum: Programming 09-28-2009
16,651
Posted By Gunther
I just tried and here's the (correct) result: ...
I just tried and here's the (correct) result:

Can you take a look again?
1,848
Posted By Gunther
Can you please learn the basics of shell...
Can you please learn the basics of shell scripting?
3,785
Posted By Gunther
I don't know about tcsh, but bash has different...
I don't know about tcsh, but bash has different comparison operators for numbers and strings. So, by applying an arithmetic comparison, I will receive an error message if the operands are strings....
1,848
Posted By Gunther
You can terminate programs by their PID with ...
You can terminate programs by their PID with
kill -9 $(pidof your_program)
Forum: Programming 09-19-2009
16,651
Posted By Gunther
I was bored, so I tried it myself. Here's the...
I was bored, so I tried it myself. Here's the complete program:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>

void fatal()
{
fprintf(stderr, "Usage:...
7,718
Posted By Gunther
You were right: it's the script's job to parse...
You were right: it's the script's job to parse the configuration file.

Furthermore, I also believe 'hdparm' doesn't have much of the characteristics that feature a daemon. So, I put

in my...
Forum: Programming 09-17-2009
7,426
Posted By Gunther
void read(string &data,int &type=0 /*or...
void read(string &data,int &type=0 /*or something*/) ;
It might look cleaner and more concise, but remember that passing a variable by reference means to change its *actual* value. Since type,...
7,718
Posted By Gunther
I'm sorry, I wasn't very accurate. I have...
I'm sorry, I wasn't very accurate.
I have restarted my system; without any effect.

Now, here comes the strange thing...
Running "sudo /etc/init.d/hdparm restart" gives me . The status remains...
Forum: Programming 09-16-2009
5,107
Posted By Gunther
I'm glad, if I could help. May I ask in...
I'm glad, if I could help.

May I ask in which kind of application this code is used?
7,718
Posted By Gunther
Adding hdparm to system start-up
Hi,

I have read about a vulnerability that allows to lock any IDE/SATA hard drive with a password, unless the BIOS "freezes" the drive's (no-password) status.
Even though less secure, this...
Forum: Programming 09-15-2009
3,717
Posted By Gunther
I haven't tried it out so far, but from general...
I haven't tried it out so far, but from general experience I dare to say that QSslSocket are probably pretty easy to handle.
Forum: Programming 09-15-2009
5,107
Posted By Gunther
I'm sorry that I'm answering only now, have been...
I'm sorry that I'm answering only now, have been on vacation.


What are you trying to do in line 253? Call the function? It looks like a wrongly declared function, e.g. template istream doesn't...
Forum: Programming 08-23-2009
5,107
Posted By Gunther
Maybe you could mark which lines of your code...
Maybe you could mark which lines of your code excerpt are the relevant ones.
Btw, where's the function body of your template specialization for "dataScanStatus"?

PS: I also suggest using gstlfilt...
Forum: Programming 08-12-2009
5,107
Posted By Gunther
Have you instantiated one yourself? Because if...
Have you instantiated one yourself? Because if you never "fill out" the template, you won't see one in the object code.
4,983
Posted By Gunther
Autofs, doesn't mount anything
Hi,

I know that this is probably quite a tiresome issue, but I can't get autofs to work.

I'm using udev rules to create symbolic links below /dev, that always point to the same devices...
1,704
Posted By Gunther
Something like this? (It's bash which has...
Something like this? (It's bash which has arithmetics built-in.)
#!/bin/bash

inc()
{
echo $(($1+1));
}

n=2
echo $n
n2=$(inc n)
echo $n2
Forum: Programming 08-10-2009
3,993
Posted By Gunther
> convert the Hexstring stored in a char* into...
> convert the Hexstring stored in a char* into hex and then prefixing it with "0x" and suffix it with ','
I'm not really sure what you're trying to accomplish with that. A C-string in hex format is...
Forum: Programming 08-09-2009
5,107
Posted By Gunther
The first several lines about the "export"...
The first several lines about the "export" keyword should be pretty clear: "export", used to enable a separation of declaration and definition of template classes/functions, is not supported by GCC....
4,167
Posted By Gunther
A solution using awk, just to make the group...
A solution using awk, just to make the group complete ;)
awk '{ if(NR > 4) print $0; }' input > output

---------- Post updated at 03:33 AM ---------- Previous update was at 03:31 AM ----------
...
1,819
Posted By Gunther
What if you compile it, using the debug parameter...
What if you compile it, using the debug parameter of your compiler and execute it step-by-step? That should give you a hint as to where the segfault originates from. Or maybe you passing an argument...
2,069
Posted By Gunther
What's the motivation behind this? Exclusive...
What's the motivation behind this? Exclusive access to the partition, so nobody can read the database files or so there can be enough space guaranteed for the database application?
If the former is...
3,285
Posted By Gunther
You say you want the uid and home directory of...
You say you want the uid and home directory of all users?
Try awk:
awk 'BEGIN { FS=":"; OFS="\ "; } { print $1, $6; }' /etc/passwd
2,169
Posted By Gunther
What you're forgetting is that these applications...
What you're forgetting is that these applications weren't meant to cooperate. Maybe SeaMonkey from Mozilla is what you're searching for. Apart from that, you're right: GUIs that display the...
3,477
Posted By Gunther
I don't want to be a nitpicker, but a bit more...
I don't want to be a nitpicker, but a bit more precise would be to use ^13\d*$ ;)
Showing results 1 to 25 of 37

 

Featured Tech Videos

All times are GMT -4. The time now is 10:47 AM.
Unix & Linux Forums Content Copyright 1993-2021. All Rights Reserved.
Privacy Policy