Search Results

Search: Posts Made By: tornow
Forum: Programming 09-18-2013
2,366
Posted By tornow
This has helped me with pointers and pointers...
This has helped me with pointers and pointers arithmetic: http://www.eskimo.com/~scs/cclass/notes/sx10.html but i can't say i have mastered it yet, au contraire. You probably know that there is a...
57,083
Posted By tornow
Probably: ~/.local/share/Trash but i think i...
Probably: ~/.local/share/Trash but i think i just read something which made me wonder (in other words: don't bet on it. I had to look it up myself and found it with: find . -name '*trash*' but...
Forum: Programming 09-10-2013
3,806
Posted By tornow
Thanks. Your explanation and example makes it...
Thanks. Your explanation and example makes it more clear (also thanks for pointing out it may not be best praxis, but for now i just try to understand the general idea).

I think you say that:...
Forum: Programming 09-09-2013
3,806
Posted By tornow
Thanks so much, it seems clear now. I got...
Thanks so much, it seems clear now. I got another question about header files. Say i got checkr.h with: void check_argc(int, int); and the function in checkr.c: void check_argc(int argcount, int...
Forum: Programming 09-09-2013
3,806
Posted By tornow
C header file and extern
In the header file data.h i got:
const char ack_msg[] = "ack: received your msg\n";
In the code file server.c i got:
extern const char ack_msg[];
And else it is only used in a function call:
...
Forum: Programming 09-04-2013
1,883
Posted By tornow
The C Programming language might be the bible,...
The C Programming language might be the bible, but it really is tough. Steve Summit has a good intro online: C Programming Notes (http://www.eskimo.com/~scs/cclass/notes/top.html) One level above...
Forum: Ubuntu 05-29-2013
8,066
Posted By tornow
In /etc/ssh/sshd_config PermitRootLogin yes ...
In /etc/ssh/sshd_config
PermitRootLogin yes

But as a first quick test what the problem is you can simply run: ssh username@192.168.1.4

Anyway: I would disable root login (or keep it...
Forum: Programming 05-26-2013
1,845
Posted By tornow
No, any additional info is very welcome. Both,...
No, any additional info is very welcome. Both, pointers and the whole subject of memory, is very hard for me, in general.

Reading the FAQ about name[3] and *name i think this: I am quite sure that...
Forum: Programming 05-25-2013
1,845
Posted By tornow
Ok, thanks a lot. You explained it very good. I...
Ok, thanks a lot. You explained it very good. I ran into the problem a couple of times, but nothing i found really made it clear. I think i got it now.
Forum: Programming 05-25-2013
1,845
Posted By tornow
Thanks, that makes it clear, especially all the...
Thanks, that makes it clear, especially all the comments. Main problem seems to have been to set the last element to NULL.

Divide sizeof the list by sizeof the first element i can remember. It...
Forum: Programming 05-25-2013
1,845
Posted By tornow
Pointer arithmetic for list of strings
When i want to use a list of strings
char *list[]; i never understand it well.

Here is an easy example. It took me long to figure it out, searching the web didn't help much:

#include...
Forum: Programming 05-20-2013
2,458
Posted By tornow
Ok, thanks to both of you. And thanks to...
Ok, thanks to both of you. And thanks to Corona668 for explaining it detailed.
Forum: Programming 05-20-2013
2,458
Posted By tornow
Q.1: ok, thanks. y Q.2: Inside of the...
Q.1: ok, thanks. y

Q.2: Inside of the function make_list() i declare a struct num_list tmp, but i don't allocate any memory. I allocate memory to the list, depending how much elements it will...
Forum: Programming 05-17-2013
2,458
Posted By tornow
Thanks for your answer. I like the idea. The...
Thanks for your answer. I like the idea.
The following is how i implemented it, asking if that would be the way you proposed it:

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


struct numlist {
...
Forum: Programming 05-17-2013
2,458
Posted By tornow
C: lenght of array
Doing some training code with arrays i run into the following issue: If i ask the user how long the array is supposed to be, malloc it and then ask for the values inside the array and return the...
Forum: Debian 02-09-2013
7,870
Posted By tornow
Debian releases - more or less - every two years...
Debian releases - more or less - every two years a new stable.. After another time there will be no more security upgrades, so you can't run any stable version much longer than 3 years. I wouldn't...
Forum: UNIX and Linux Applications 02-09-2013
4,148
Posted By tornow
If i use tightvncserver, ssh to the server then...
If i use tightvncserver, ssh to the server then start it:
tightvncserver
and then connect with a client, i get the default gui (xfce in my case. I don't use a display manager, so i can't say...
Forum: Programming 02-07-2013
2,501
Posted By tornow
Using the full path would work: require...
Using the full path would work:
require '~/Build/build_mini_magick/ruby-mini-magick/ruby-mini-magick/test/test_helper'But if i understand this correct:
Ruby require local file problem - Ruby Forum...
Forum: Programming 02-04-2013
7,342
Posted By tornow
On another note the headers, on Gnu/Linux, are to...
On another note the headers, on Gnu/Linux, are to be found at /usr/include. If you get an error you can do "man 3 printf" (if the function you use is printf) and the man page will tell you which...
Forum: Programming 01-30-2013
2,501
Posted By tornow
Run ruby test and include require
I want to run a test for the gem mini_magick:
https://github.com/minimagick/minimagick

I got the directory lib, inside of which i got:
- mini_magick.rb
- mini_gmagick.rb

and inside of the...
Forum: Programming 05-20-2012
2,734
Posted By tornow
Ok, thanks. I know in what direction to look. ...
Ok, thanks. I know in what direction to look.

I also found this and had some ideas (but like you say: it really can be hard to understand)

Using *retptr = p; in allocstr and &copystr in the...
Forum: Programming 05-20-2012
2,734
Posted By tornow
Thanks. With strcpy(linelist[index], line); ...
Thanks. With
strcpy(linelist[index], line);
it works. But i think i had to add +1 to:
linelist[index] = malloc(len+1);

I still fail to understand why.
To me it looks like the while loop...
Forum: Programming 05-20-2012
2,734
Posted By tornow
C; storing strings in an array
I am trying to get userinput from stdin and store the lines in an array.


If i do this:
using a char **list to store strings
allocate memory to it
#include <stdio.h>
#include <stdlib.h>

...
Forum: Programming 12-08-2011
3,007
Posted By tornow
Thanks to both of you, i understand it much...
Thanks to both of you, i understand it much better now (now fully, but i am on my way). Yes, siva shankar, what you just explained is exactly what i did not see.
Forum: Programming 12-08-2011
3,007
Posted By tornow
Ok, thanks. What i don't understand: Is there a...
Ok, thanks. What i don't understand: Is there a difference between
0 * 0
1 * 0
...
10 * 0
in C ? Different: is the 10 arbitrary, or is it chosen for a reason?
Showing results 1 to 25 of 30

 
All times are GMT -4. The time now is 07:45 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy