@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2



Comments:

<0> denk: bingo
<1> nity
<2> how I can get my ip address? I tried gethostname(name,255); host=gethostbyname(name); memcpy(...); inet_ntoa(...); but it gives me 127.0.0.1 :/
<3> what os?
<3> you can have many interfaces in computer
<3> and every of those interfaces can have multiple ip addresses
<2> linux
<3> man ioctl
<4> good morning...
<5> antifreeze: ip addr list
<2> hmm
<5> antifreeze: besides why do you have to know your ip address?
<5> antifreeze: most protocols (except ftp afaik) don't need it
<2> well, I need to create multicast client, which sends message's containing own ip address.. (school work)
<5> ioctl SIOCGIFADDR ?
<2> maybe i will try to use ioctl



<6> instead of including your ip address in the upper level data, let the ip header do its job.
<5> ditto.
<2> http://www.hungry.com/~alves/local-ip-in-C.html <- well, maybe I will use some of those things.. need to still understand why first one does return 127.0.0.1
<2> other ones i have not tested yet
<6> antifreeze: because your systems hostname resolves to 127.1.
<2> if I send data to multicast address, I receive data after few seconds and the from address contains my real internet ip address. I guess, that I should be able to send my internet ip address in first message. but actually i have no idea how multicast things works. maybe i should read some manuals.
<7> oh, this one's clever.
<8> moin
<9> oh, her
<10> is someone familiar with mpi?
<10> woo, just a simple question: from the network transfer point of view is the mpi is used to transfer small chunks of data or more likely streaming transfers are issued in the communication?
<10> i know that depends on the data, etc.
<9> you can do both explicitly afair
<9> but in the end it more depends on your interconnection
<10> but in general, i would guess for generic applications the network latency does matter more, is that correct?
<9> depends
<9> sending more data reduces latency
<9> but also might block connectins
<10> yep
<9> +o
<9> it depends on you what you send
<9> you can distribute a lot of small chunks
<9> or one big chunk
<10> basically (if we can call it like this) the commands are short chunks of data
<10> ?
<9> ?
<9> what is a "command" for you?
<10> not the competiton data :)
<10> u
<10> basically the program code what i meant
<9> the code isn't distributed at runtime
<9> every node has its own local copy of code
<10> okay
<9> and it's done prior to executing it, so it doesn't affect the runtime of your algorithm
<10> thank you
<9> lorindol will tell you the fee
<10> :>
<10> why not you?
<8> # appears as QUARTERMASTER
<9> *fear*
<11> do you know when i could find file systems benchamrks [ not only linux filesystems ]
<11> ?
<9> I'd try before 15pm
<9> I mean 3pm, sorry
<12> yeah
<12> they're closing after that
<12> especially on fridays
<6> just be sure to check them, as they are no longer allowed as carry on.
<10> :)
<13> :)
<10> :-P
<14> a little off topic, how i execute a binary from a makefile ?
<6> put it in a target's command list.
<14> yes it works, but the ide devc++ return a build error at the end of copile process
<14> prob my exe do'nt return correctl from the main
<4> did you write void main()? :)
<14> no_maam, but i was returning 1, so makefile don't like it
<14> :)
<14> thanks :)
<15> in C programs, nonzero return value generally means that the program failed



<4> try to write: your_prog || echo $? >/dev/null
<16> Hmm, isn't there something like +foo or @foo, dunno which, that makes make ignore the return value and think of it as successful?
<4> @foo means don't print foo before running foo
<4> in other words: don't print the command name
<9> echo off
<9> praise dos batch
<17> autoexec.bak
<9> .batman
<17> blobman
<9> and his son, longtext-dood
<18> hey
<18> is anyonethere
<13> weve gotyour spacekeynow
<18> yo
<18> hey sh gykr vagy
<18> bye bye :)
<9> finaly
<9> *phew*
<19> Hey people, how can I test whether a SOCKET is (still) connected to a server?
<20> Don't. Operate as if it was always connected and handle errors.
<20> If you really want something than you probably should use KEEPALIVE option.
<19> Ok, thx, I'll try it
<21> hello, i have a question. how can i printf() a #define witch doesn't have quotes? i have #define a b, and want it to be printed to the screen
<19> depends on what b is. is it a number or what?
<19> or a macro?
<22> dude_: linux (kernel) uses some macro magic for this, see stringify.h
<21> b is b, a string (or in this case a char)
<21> domen: i am a freebsd user
<22> dude_: doesn't matter, code is not linux specific (in fact, it might even not be gccism, just plain c99)
<19> try this #define MAKESTRING(s) #s
<21> rapha: thank you, it works fine
<19> np
<21> no, wait, it doesnt
<21> MAKESTRING(aaa) makes a string out of aaa, and not from the #define aaa
<22> dude_: you really should look at stringify.h. it solves exactly this problem :-)
<21> but i do not have that file in my system
<22> oh. then i can't help you really. i'm not a google interface nor kernel.org mirror
<19> http://www.koders.com/c/fid168FAC6D9DAA6F6251DFEE8CB9C040EE254EBEA9.aspx
<19> it realy is macro magic :)
<21> thank you
<21> but this trick stringifys the argument, and it is not expanded to the value of the #define
<19> it should expand the value, have a look at the comment: For example, compile with -DFOO=bar, __stringify(FOO) * converts to "bar".
<21> have you tried it?
<22> not now, but it worked like a year ago. show us your code
<19> hm, doesn't work here
<21> #include <stdio.h>
<21> #define A ddddddddddddddddddddddd
<21> #define a(x) #x
<21> main()
<21> { printf("%s\n", a(A));
<21> }
<22> how's that similar to stringify trick?!
<22> geez
<19> the stringify trick doesn't seem to work with visual c++ ^^
<21> isn't it? #define __stringify_1(x) #x
<22> rapha: file a bug report :-)
<9> c++? wuzzat?
<22> dude_: read the 336 bytes of stringify, it explains why there are two macros
<19> gcc works fine
<21> ah, right! i am very sorry
<21> thank you very much for the help
<4> SM_Barbie: somebody got C and corrupted it, and now it calls c++
<4> next corruption was made in the deep core of MS
<9> there's only Perl
<4> interpreter?
<4> are you crazy? :)
<23> ci fai il terzo progetto?
<4> eWeR`delu`malli: jawohl! :)
<12> eWeR`delu`malli seems to confirm that
<23> Wou3d3 u do the third project?
<23> 34+
<12> yes, 34+
<12> absolutely


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #c
or
Go to some related logs:

#html
how looks an advertisment
#worldchat
#nuernberg
#metal
#worldchat
#worldchat
#worldchat
#sicilia
Marvellous at Ircnet



Home  |  disclaimer  |  contact  |  submit quotes