Bachstelze,
You've been very helpful.
Thank you.
Type: Posts; User: Rany Albeg; Keyword(s):
Bachstelze,
You've been very helpful.
Thank you.
I see,
So for conclusion I understand that there is no way to make a generic code both for strings and other data types that will implement 'rds_vecotor_add' ?
I think I should choose another...
Thank you, this certainly clarifies the problem.
And yes, if I call 'rds_vector_add' with a third parameter equals to 7 Valgrind doesn't give the "Invalid read of size 1" error.
But this is...
This is the loop
for(i=0;i<vec->vp;++i)
{
printf("%s\n",(char*)vec->objs[i].data);
}
But, I get same error even if I just printf a single element, say at index 0
Hi, thanks for the feedbacks.
I read here http://www.cprogramming.com/debugging/valgrind.html , under "Finding Invalid Pointer Use With Valgrind" that the reason to this error is because I'm trying...
Hello all,
I'm using Valgrind to test a short program I just wrote.
Valgrind say that there are not memory leaks and that the heap summary is fine, which is what I was looking for to see, but it...
Thank you.
First, thank you for responding to my question.
Problem is partially solved.
I tried to free a memory that I didn't even allocated.
I ran the program with valgrind as suggested and I can see...
It has been a long time since I wrote something in C, and I'm trying to build a vector.
I wrote its constructor and its 'add' method.
Now I want to test it and free the allocated memory after using...
This is my version, assuming that the contents of the zip files is files names with the prefix 'Zoom Karaoke - '.
It will rename the all zip files in the current directory to the name of the first...
There is a -c option for unzip to extract file to stdout.
I suspect that the output will show you only a representation of files and not file names themselves.
So just like you do not parse 'ls'...
Extensive use of echo && echo bla , instead of printf "\n%s" "$arg".
printf and echo are both Bash built-ins.
I got pretty bored while trying to read this script.
Try to be more specific.
rany:~/Desktop$ grep -o "http://[^\']*" your_text
http://www.example.com/url_a.php
http://www.example.com/url_a.png
http://www.example.com/images.php?src=url_b
http://www.example.com/image.png...
This is how you can store the output of a command in a variable
output="$(command 2>&1 >/dev/null)" # Save stderr, discard stdout.
output="$(command 2>&1 >/dev/tty)" # Save stderr, send stdout...
WTF, are you on drugs?
This is just a syntax.
echo "${array[@]}" will output all array elements properly quoted, and
echo "${#array[@]}" will output the number of elements.
You might want to check the difference...
It is shorter but not necessarily better.
If you'll check ''man test'' you'll see:
Your solution seems to work but it doesn't look good.
Maybe someone more experienced than me will also tell...
Hello.
First of all you missed the space after '[' and before ']'.
Second, I suggest you to use [[ instead of [ if you are writing for Bash.
No word splitting or glob expansion will be done for [[...
strupr is unknown.
you can use something like:
void upcase(char *p)
{
while(*p != '\0')
{
if(*p >= 97 && *p <= 122)
*p -= 32;
Real is wall clock time - time from start to finish of the call. This is all elapsed time including time slices used by other processes and time the process spends blocked (for example if it is...
I think the problem is by invoking another instance of Bash.
.
nvteighen,
You should get a medal on this explanation, thank you!
If it is CLI manipulated the best way is to write a Bash script for this task.
Good luck, and come back if you need help with that.
Taken from ''curl --help''
-u/--user <user[:password]> Set server user and password
I don't recommend you to hardcode your password.
curl -u username --silent "https://mail.google.com/mail/feed/atom" | perl -ne 'print "\t" if /<name>/; print "$2\n" if /<(title|name)>(.*)<\/\1>/;'
Will prompt the user for a password and will...