@# Quotes DB     useful, funny, interesting





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



Comments:

<0> hello everyone. i'd like to use a function of a dynamic library i have. i know how many arguments it asks for, but im not 100% on what types it requires. is there a way to know?
<0> i ***ume the lack of response is an implied no
<1> "implied no", hehe
<1> good one
<1> (I don't know)
<2> weeeeeeee
<2> any1 hu have ava script installer??
<3> a what?
<4> BoYcRiTz: you looking for some really righteous hacking tools???
<2> yahh
<2> got 1??
<5> How can I get the size of a file in c?
<6> Closest you can get, portably, is open it in binary, read chunks and count 'em. If you read 500 chunks of 1,000 bytes and a final one of 203 bytes, it's 500,203 bytes long. Give or take.
<5> what about just sticking to linux
<3> fstat()



<3> whish is POSIX
<3> which, even
<5> seems better than ls -l filename | awk '{print $5}'
<5> :p
<5> or wc -c
<3> or du -b ;P
<6> Speaking of oddball things to do...
<6> #!/bin/bash
<6> i=1
<6> while [ $i -lt 254 ];
<6> do
<6> echo $i;
<6> ....
<6> i=`echo $i + 1 | bc`;
<6> done
<6> Can someone, please, explain that one to me? With little words and pictures and graphs? I just need to understand the mentality behind shelling out to bc to increment i...
<3> 'cause someone didn't know about "let"
<6> This goober set up the primary router for an ISP. Using that code.
<3> haha nice
<3> he should have done for i in 1 2 3 4 5 6 ... 254
<6> This may explain why it takes five minutes to build the firewall rules...
<6> Hell, that would prolly have worked better.
<3> haha
<6> Also been more reliable. "This is a router... don't need bc here..."
<6> Know anything a little quicker in processing tcpdump logs than wireshark? This thing is taking forever...
<3> I don't
<3> you might ask in ##networking on freenode
<6> Ta.
<5> Here is a weird question, why would printf("%s", buffer) and fprintf(fp,"%s", buffer) give different results by just a little bit sometimes...
<7> show an example
<7> and code
<7> use paste site in topic
<5> http://rafb.net/p/vSe6Ml97.html
<7> that's not a sufficient example
<7> i need output and input
<5> it is just random spaces missing every couple hundred lines
<5> http://rafb.net/p/JnH1bE77.html that is the input
<7> waht's the difference in out put?
<5> sigh when im pasting it to the paste site it looks different and the formatting correct
<5> however in emacs and when i run diff on it it shows it as being different
<7> www.imagebin.com screen shot
<7> essentially the functions are the same, the differences are in presenation i bet
<5> http://img408.imageshack.us/img408/4970/snapshot19aa.jpg
<7> line 324?
<5> yeah
<7> that's a presentation issue, tab stops, and insignificant 0's aren't printed
<5> arnt printed to where?
<5> diff says they are different
<5> and the little differences are making a difference when transfering image files
<7> what does diff show?
<7> nemo do not message me in private
<5> yawn if its actually the same file and im being dumb im going to be very upset at myself...
<5> ok maybe i was just sleepy...i swear it was different for an hour
<5> lastly, if im transfering a image file do i need to open it as binary, if so can i transfer text files still
<5> if i open it with wb, and rb
<8> I am trying to see the logic behind the function declarations and prototypes in plan9, but I couldnt get the method he is using to manage include files and function prototypes.. here is an example http://plan9.bell-labs.com/sources/plan9/sys/src/9/pc/apic.c
<9> Thank you - hi all
<8> dbtid u there ?
<10> hey.... do anyone of you have or know where can i find a softcopy of a book devoted for teaching c programming for beginners? help me pls.. pm me..
<8> c how to program, dietel & dietel
<11> primepie: even though plan9's c doesn't conform to the standard, most of it is the same, including #include's.



<10> are there any softcopy available for free donwload?
<11> primepie: so for example #include "io.h" includes the file @ http://plan9.bell-labs.com/sources/plan9/sys/src/9/pc/io.h
<8> aha
<9> *haha*
<11> primepie: and u.h is an ms windows style "most everything in a large bucket" include.
<8> twkm what I am not getting is why is he "extern"ing the functions in a x.h while they are implemented in x.c ... the fact that the prototype is in the .h without extern then they should be accessed publicly. right?
<8> yeah I noticed
<11> primepie: that's how you normally do it.
<11> primepie: a .h file to provide a declaration (what is often called the interface), and the .c file to provide the definition (the implementation).
<8> and should I always extern the functions in the interface?
<11> primepie: in c extern can be applied to a function, it just doesn't do anything different.
<8> I was trying to find a reason why it is there. the only thing I came up with is taht this x.h file could be included in another file like test.c
<11> some people put it there for uniformity.
<8> ah I see
<11> as it changes nothing -- for a function -- it doesn't matter.
<8> yes true
<8> I noticed that in plan9, there isnt too much function prototyping
<8> like if he doesnt want to export a function, he tend not to have it prototyped in its .c file by placing the func at the top
<8> twkm http://www.jetcafe.org/jim/c-style.html#need_extern checkout this
<11> why?
<10> hey.... do anyone of you have or know where can i find a softcopy of a book devoted for teaching c programming for beginners? help me pls.. pm me..
<10> are there any softcopy available for free donwload?
<8> written by rob pike hehe
<10> pdf
<12> pinsripes: stop repeating yourself
<12> go to your library and grab a copy of the kernighan and richie
<13> c-bot c tutorials
<14> Asmodee`, here you go: C tutorial for newbies : http://www.eskimo.com/~scs/ccl***/ | http://cprog.tomsweb.net/cintro.html | http://www.howstuffworks.com/c2.htm | http://directory.google.com/Top/Computers/Programming/Languages/C/Tutorials/ | http://cr***eux.com/books/ctutorial/index.html
<10> a million thanks!! ^^^
<10> lastly.. gimme a site where i kind find cool, simple c programs that beginners like me can understand.. like simpole games.. heheh
<10> hello?
<10> hei..
<11> pinsripes: why don't you start with the tutorials.
<10> i olredi knw d basics...
<10> cmon now..
<11> then why were you begging for a beginners book?
<10> just askin...and i was just askin for SIMPLE cool programs...stop with the attitude..if you dont wanna help then..fine
<8> I guess the attitude is coming from you pinsripes you r not being logical
<8> we don't read minds here
<10> ok.. sorry...
<10> just askin some help with the pros
<15> hello
<15> away
<16> is there a way to search for files in a directory that works both on windows and linux?
<13> c-bot opendir
<14> Asmodee`, here you go: opendir - #include <dirent.h> DIR * opendir (const char *dirname) Opening a Directory Stream (POSIX.1) see - http://www.msunix.co.uk/manual/glibc-2.2.3/html_chapter/libc_14.html#SEC270
<16> great :)
<13> well im not positive windows supports this..
<16> does it compile on VC too?
<13> I'm not sure
<16> hmz
<13> worst case you could use cygwin...
<17> _opendir
<17> (actually they removed the _ in the latest CRT, iirc)
<16> ok
<17> And if you can't find it, then FindFirstFile
<16> FindFirstFile works in linux too?
<11> no.
<18> opendir/readdir
<18> nm, i am slow
<13> haha
<16> so, I need to create some #ifdef with two cases, one for linux and one for dos
<16> or what?
<13> well i think opendir (or _opendir) is in visual studio... i dont know, but you could easily check
<13> if not then you'll have to go the #ifdef route
<13> or use cygwin
<16> ok
<16> cygwin will compile *for* dos *on* dos?
<16> (i'm developing a console app of course)
<13> cygwin provides a .dll on windows which allows you to use many functions that are available in linux, but not normally available in windows
<16> oh, nice
<13> btw you're not compiling for dos, you're compiling for win32 console, which is very different from dos
<8> I am reading source code in sqlite, and I noticed that he used long long int and not unsigned long long int for the record key. any clue why he did that ?


Name:

Comments:

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






Return to #c
or
Go to some related logs:

ir-razzet
yum install zip
lahwa cyber
#MissKitten
#linuxhelp
#linux
#MissKitten
unknown GCCause Allocation Failure
#linux
#MissKitten



Home  |  disclaimer  |  contact  |  submit quotes