@# Quotes DB     useful, funny, interesting





Google
 
Web www.quotesdb.info
Undernet  |  EFnet  |  Quakenet  |  Freenode  |  Dalnet  |  Ircnet  |  Galaxynet
Page: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19



Comments:

<0> std::ifstream in("foo.txt"); in.ignore(INT_MAX, '\n'); std::vector<char> buf(std::istreambuf<char>(in), (std::istreambuf<char>()));
<0> hey vawjrwrk
<1> howdies
<2> _m_ what was that?
<3> the code to do what you want
<0> code to copy into another file and code to read into a buffer, both skipping over the first line of input.
<0> C++ can be easy if you don't try to write code using C idioms.
<2> i havent read/used STL yet, so the vector<char> part iam unfamiliar with
<2> and I dont want to read 3line from a file into another file but from a buffer to buffer (char*)
<0> vector<char> behaves similar to an array of char, is easier to use, offers more features and is less error prone than arrays.
<3> define "buffer"
<0> "similar" includes the ability do use buf[position] expressions.
<2> ok
<2> nnp define buffer: buffer is memory area reserved for data like double, int char (* pointers)
<0> you'll have to fix a typo in my code: s/istreambuf/istreambuf_iterator/
<4> hey guys quick question i have a string that is a number in hex, i want to save that to an int type. can i just cast it to an int?



<0> (needs #include <iterator>)
<5> howdy victor :)
<0> JaZyOSx: no, you can't.
<0> JaZyOSx: you could use strtol()
<4> is that in the string lib?
<1> or use istringstream
<0> It's a C function in <cstdlib>.
<0> calc convert
<6> convert = Using the 'translators' built into the C++ stream libraries (which are extendable), a simple conversion technique is: #include <sstream> std::stringstream tempstream; tempstream << whatever; if ( tempstream >> whateverelse ) // conversion worked!;
<0> (insert std::hex as needed)
<4> thanks guys
<2> _m_ the vector<char> buf... part do i have to declare a vector buf before that state?
<3> p_al ...... im not sure if im the only one confused by what you're asking or not. I dont even think you know what you really want the code to do. _m_ has provided the code to read from one file to another and from a file to a 'buffer' in your program. What else do you want?
<2> nnp i understand that thanks.
<0> p_al: my code defines the vector<char>. You need #include <vector> for that to work.
<0> (defines a vector<char> _instance_)
<4> one more question, using the strting stream, can i chop up the hex to only the last 4 digits?
<4> \
<1> not sure what you're asking
<4> 0xbffff470 was my result ...
<4> oh wait.
<4> hold on
<4> i'm and id10t
<7> http://today.reuters.com/news/newsarticle.aspx?type=oddlyEnoughNews&storyid=2006-03-10T143508Z_01_L09177309_RTRUKOC_0_US-NIGERIA-ECLIPSE.xml
<7> good to see there are still people on this earth that don't understand an eclipse
<8> peterhu, in epistomological terms, do you really think you understand an eclipse?
<1> I'll bet he understands the physics
<8> that is your opinion
<3> ok, so what we have is an entire nation of people requiring a night-light?
<3> delightful
<1> put your money where your mouth (or keyboard) is
<8> i do not use a keyboard
<8> they are so primitive
<1> well, your voice to text can't spell
<8> i know, i am ironing out the bugs
<8> that's what you get for being on the forefront of technology and using electro-neural interfaces for input
<1> now _that's_ bull****
<8> that, again, is simply your opinion
<1> no no
<1> I've worked in that field
<1> sorry
<8> what have you done in that field?
<1> helped put more electrodes into a brain for a single experimental run that most people. we inserted 240 but only had reliable readings from around 200
<8> on a non-bull**** note, we do something similar to that here
<8> we use 'tetrode arrays'
<1> where is "here"? I was working with the guys as NSMA at U of Arizona
<8> but i don't think we ever get that many electrodes in
<1> I had a positioner that would position to 5 nanometers, but with repeatability of only 2 microns <sigh>
<8> cool
<8> 'here' is where i am. 'there' is where you are. it's all relative, of course.
<1> and we were using two cheetah 160s from Neuralinx (also in Tucson)
<1> to do the readings
<1> though Neuralynx was coming out with a 256 channel recorder when I left
<3> didnt think big cats we're the best at reading
<8> we have this semi-homegrown rtlinux system for the recording.. 256 channels on one box
<1> Casey (owner of Neuralynx) was kinda into cats... all the products were named after them
<8> so what was your part in this, vic? i didn't think you were a hardware engineer? or did you do the software piece?
<1> I'm a software guy now....started out in hardware
<1> useful combination for stuff like that
<0> It's quite often a useful combination.
<8> yeah definitely.. i am a software guy myself but i word with some really excellent hardware guys and am learning a lot actually..



<8> work*
<8> but in this type of work it helps to have as many cross-cl*** skills as possible, to borrow a gaming term
<0> (I'm a little biased though, since I also started with hardware before doing software)
<1> have you seen any of the probes from Michigan University? the ones w/ 16 sensors on them.. on a rigid probe?
<0> Beware, though, that many hardware people do not have a clue about how to write software well.
<8> yeah in my experience hardware guys make some pretty rigid software
<1> it's very nice to have actuall known spatial relationships between sensors... tetrodes are so "sloppy" in that sense
<8> honestly i wouldn't be an expert on this..
<0> I wonder how you dealt with so small sensors, vawjrwrk.
<1> _m_ the absolutely best engineer I ever worked with couln't code to save his soul...but he _listened_ to what the programmers needed/wanted and made it for us
<0> The chemical reactions on the service of a sensor have a severe impact on the signal.
<8> yeah vic i know engineers like that.. very very good at thinking like engineers.. i don't even care if they can't code..
<0> s/service/surface/
<0> (bear with me, I haven't slept much)
<1> _m_ the MU ones I played with had 16 sensors embedded in silicon substrate on 25micron centers in a square array
<1> KrispyKreme I don't either, as long as the stuff does what we need
<1> we were getting read to work with some 56 (not sure why that number) sensor devices when the NIMH decided we weren't making progress (sigh)
<0> I know that even the rather large electrodes you use for EKG are affected by signal loss due to a "rotting" surface of the sensor.
<0> Maybe, the wet environment in the brain helps.
<8> vawjrwrk, so they just cut funding?
<1> I think the reviewers couldn't understand WHY it might be important to have both electrical signals AND gene-expression slices where we could correlate the neurons
<8> well.. half the battle is just packaging your grant properly
<1> KrispyKreme I worked on the proof of concept...but as I said, the reviewers didn't seem to think it was worthwhile to merge the two "lines" of research
<8> it's rather like writing pop fiction
<1> so we never got part two
<8> damn
<8> i have seen less worthy work get funded
<1> ditto
<8> just because of good grant writing abilities on the part of the researcher and/or connextions
<1> it didn't help that I couldn't get the "camera" working until about 3 weeks before the next proposal and that _everything_ we tried to mark the physical edges of the probe in the brain tissue never really suceeded
<3> what type of operating systems did ye code this kind of stuff on?
<8> well, you can always *lie* in your grant.. heh. people do it all the time
<8> knowing victor.. something he wrote himself
<1> our chief scientists's wife managed to slice our test brain beautifully and we could discern the edge of the probe...but it wasn't what I'd like to have been able to present
<1> oh we were using win2k
<1> the 3d positioning code was mine, the clustering was Peter & Thane's
<1> Thane's wife was also a Ph.D. in neurobiology (which is why she was so good at slicing...... he favors the "gene expression" theory of learning, Thane was the electro meausrment guy)
<8> how'd you manage to control servos and stuff using win2k? or is that where dsp's or dedicated microcontrollers come in?
<3> i havent had a conversation go this far over my head in a long while. Congrats to you all ;)
<1> the servos weren't controlled live
<8> yeah i don't really understand it either actually haha
<8> i am not a neuroscientist, i just pretend to be one and thus far have not been exposed
<1> the array of probes was "locked" into a device that had 4 microprositioners that talked rs232 on it
<1> I drove that in response to 3d joystick input
<0> Medical measurement techniques was the most intersting stuff I learnt while studying CS.
<1> and helped position it so the scientists couldn't mash the "pusher" against the array
<1> well, 3d joystick and a "to do" list in a file
<1> one of the trickier problems to overcome w/ the "pusher" was that the array never locked in the same place ... not close enough for what we were trying to do anyhow
<0> hmm, the array was supposed to stay in the brain, once positioned?
<1> another was the pusher wasn't exactly "square" nor were the different axis scaled exactly the same
<0> Or was there a puller, too?
<1> _m_ yes, it was cemented to the skull of the rat
<1> and it weighed about 50 grams, maybe a little more
<1> when an experimetn was run some vrey light ribbon cables were connected to the array (which contained amplifiers) then ran to the data collection device
<1> ftp://rudbek.com/pub/DSCF0190.JPG
<1> there's a picture of the pusher
<1> but the array (and rat) are NOT "locked" in... the array was clamped by putting it between the piece of metal you can see jutting out towards the joystick and the biece w/ the knurled nob on it
<1> I may have a picture of the array, lemme look
<1> I do at home, but none posted it appears
<3> any chance of getting the rat hooked up to the joystick?
<3> could help p*** the lunch hour ;)
<4> does c++ have 'exit' like vb c#?
<4> like exit a certain struct
<1> exit a struct????
<4> welll not struct but if, while, ext
<7> does that thing make jullien fries?
<3> a struct in c++ is a data type
<3> break
<4> yeah i know
<4> i caught my self
<1> break
<4> ah, yes good ole break; cheers
<9> Where can i get information about converting a music file in my source (may'be hex) and just have 1 .exe distribution so that once executed it populate's the music file?
<1> peterhu no, it moves a wire you cannot see very well to absolute precision of about 2 microns, relative precision of 1 micron w/ a resolution of 2 nanometers


Name:

Comments:

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






Return to #c++
or
Go to some related logs:

#linuxhelp
^witch^ pauli undernet
#evilkittens undernet
packet someone linux
convert unsigned char* to wstring
Kem inti vera sabiha
#linux
#linuxhelp
smp conflicts
pastebin henny



Home  |  disclaimer  |  contact  |  submit quotes