@# 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



Comments:

<0> substr in c++ ?
<1> boost's PURPOSE is to provide a portable well-designed and well-tested set of libraries with the goal of trying to get some approved into the standard library - which is happening, in the next version of the standard
<2> rdragon, ok
<2> that out of the way
<3> DrkMatter: well i just need a sub-structure within the private part of a cl***, that can contain functions and can access the parent cl***'s private stuff
<2> rdragon, Smarter to impliment a Thread Pool or just like a vector of threads (or something of that nature) ?
<1> what for?
<2> my MUD lol
<2> sorry
<1> you'll have to be specific
<2> it's a TCP server..
<1> server side?
<2> handling multiple client connections which interact with eachother
<2> threadpool, yeah server side
<1> yeah I understand how a MUD works ;)



<4> toast: Jsut check out the std::string documentation.
<1> there's lots of ways to do it
<2> rdragon, yeah, just asking ur opinion
<1> I personally have a separate thread that handles all networking, and the main thread sends/receives messages to/from it
<4> static3d_: That's your solution to the design problem. Why do you want to do this?
<2> rdragon, yeah. but i mean do you create a seperate thread for each client?
<1> no
<1> wasteful, imo
<2> i never
<2> figured out how to
<2> haha
<2> just have 1 thread :)
<2> haha
<2> i'm dumb
<2> i'll think on it :)
<2> thank you for that insight
<1> struct Net{ std::map< unsigned int, Client> clients; void Send( unsigned int client_id, Message const& message ); bool Recv( unsigned int client_id, Message& message ); };
<1> struct Client{ std::queue<Message> in; boost::thread::mutex in_mutex; ... };
<1> ...etc etc
<2> hrm
<2> k
<2> although
<2> why is the message que in the client?
<1> because theres a separate queue per client
<2> i don't want to do that though
<1> then dont
<2> yeah
<2> :)
<2> i figured as much XD
<2> i'm not _that_ stupid, close though :)
<2> did i ever tell you when i took the comp sci AP test, i never even looked at any of the standard library **** so i got a 1
<2> :)
<2> lol
<1> I think I got a 3
<1> since i was unfamiliar with all of the case studies
<2> oh
<2> yeah
<1> and I took it... probably in 98 or 99
<2> oh
<2> i took this last year
<2> it was hard
<2> i have the java manuals for all the maps, queues, etc..
<2> blech
<1> I never took a cl*** for it, they were just like 'hey, theres this computer test, wanna take it' and I said 'sure', heh
<2> lol
<2> this is what i get for skipping all that :)
<2> i ask you
<2> oh well
<2> rdragon, this site (http://www.cppreference.com) is soo nice :)
<2> if you don't like msdn
<1> www.rudbek.com/books.html is better
<2> i have the bjarne book
<2> but i never take it out
<2> i dunno
<2> like the internet kinda makes it not very useful
<2> unless you code away from a computer
<1> not a good book for learning, imo
<2> oh yeah
<2> i know
<2> :)



<2> i tried that once
<2> time to dig into a dictionary
<2> :O
<5> good evening... what is the maximum value of a float?
<5> is it 2^31-1
<6> numeric_limits<float>::max()
<6> (depends on platform)
<5> ok... do you happen to have the value for Windows at hand? :)
<6> no
<7> the numeric limits are there for a reason
<5> I'm setting a const float to 123456789.0000 and somehow it's storing it as 123456792
<7> HELLO!!??!!!
<6> vawjr, we can hear you :)
<8> I can hear you
<7> btw, the questions you asked had nothign to do with the numbers you showed
<9> !seen sirmaster
<5> ok, let me restate the question
<7> I was yelling at biyectivo
<8> I replyed to the ping
<7> the answer is also in numeric_limits<float>
<5> why would a const float set to 123456789.0000 would appear as 123456792.000000
<5> ok I will try numeric_limits<float> before you get a heart attack and die
<9> who know who is this man SirMaster
<9> ?
<7> I think it's called digits10 in this case
<9> who can` tell me who is that man ?
<5> thanks anyway
<10> would anyone mind looking at simple calculator source? I need to know if I calculated total interest correctly
<10> here's the url: www.deadquasar.com/testprg.cpp
<4> Enzo: Don't you have sample data to throw at it?
<10> well.. i know it's suppose to be $1000 debt... $50/month payments... and 1.5% interest
<10> they never told us what the output would be so we could check outselves =(
<7> 1.5% / year? that's very low
<10> 1.5% / month
<4> Well, can't you calculate it by hand to make sure your program gives the right output? =P
<10> i get $197.12 total interest -- after two years =/
<10> i tried and i'm getting the answers i think i should be getting... but last time i was this confident i lose 10 points XD
<11> What'd you lose the points on?
<10> bad calculation in interest rate =)
<10> -- apparently
<7> kinda hard to mis multiply .015 * remaining_debt
<10> my old app got $172 total interest
<10> i deducted the payment b4 adding the interest
<10> i think that's my prob anyways... these numbers seem better... but $197 dollars still seems too high =/
<7> 18%/year on 1000 ?
<10> yeah
<11> 173 you said?
<11> Compounded monthly, vic
<10> $176.70 actually
<10> yeah... compounded monthly
<11> 176.71
<10> (sorry about the mistype earlier)
<11> No wait, 176.701
<10> i get $197.12 now
<11> The 176 was wrong?
<10> yeah... i got 10pts off for having $176.70
<11> I guess it depends whether you make the $50 payment in the first month or not
<10> if you take the count the payment the first month is it $176.70?
<7> I was suggesting that the 197.12 doesn't seem all that high to me
<10> oh.. i c
<11> If the first month accrues the debt to 1015 before you start your payments
<11> It ends up around 191 in total interest, I think
<11> No wait
<11> Typo
<11> About 198
<11> And the 197.12 shows up around month 22
<11> But it takes another month or two to run down the debt completely
<10> uhm... after 24 months
<11> Yeah, you'd think that
<11> I'm just running this in excel
<10> yeah... my prog gets 2 years exactly for repayment with those constraints
<10> ooo.. excel . excellent idea
<7> then you've payed 1200 exactlyl


Name:

Comments:

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






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

#mirc
efnet arkangel
pentrunoi.ro
#php
#AllNiteCafe
nounouu
What country did artist Rene Magritte call home ?
#linux
#linuxhelp
#c++



Home  |  disclaimer  |  contact  |  submit quotes