- About Setfunction - 5 Updates
- Best way to use enum with classes - 12 Updates
- And the mythical man month rears its ugly head again - 1 Update
tharaphioowendy@gmail.com: Oct 16 03:14AM -0700 Raising a number x to a power y (xy)is the same as multiplying x by itself y times. Write a function called xpowerY() that takes a int value for x and int value for y,and returns the result as a int value. Use a default argument of 3 for y, so that if this argument is omitted, the number x will be cubic. Write a main() function that gets values from the user to test this function. (Behint the x of y is at the top) extra letter |
"Alf P. Steinbach" <alf.p.steinbach+usenet@gmail.com>: Oct 16 01:11PM +0200 > omitted, the number x will be cubic. Write a main() function that > gets values from the user to test this function. (Behint the x of y > is at the top) extra letter Easy peasy! :) Your professor will be impressed by this solution: [code] #include <iostream> #include <string> #include <stdlib.h> using namespace std; auto foo1( int const x ) -> int { return x + 1; } auto foo2( int const x ) -> int { return x - 1; } auto foo3( int const x, int const y ) -> int { return (x == 0? y: foo1( foo3( foo2( x ), y ))); } auto foo4( int const x, int const y ) -> int { return (x == 0? 0: foo3( foo4( foo2( x ), y ), y )); } auto foo5( int const x, int const y ) -> int { return (y == 0? 1: foo4( x, foo5( x, foo2( y ) ) )); } auto xpowerY( int const x ) -> int { return foo5( x, 3 ); } auto xpowerY( int const x, int const y ) -> int { return foo5( x, y ); } auto main( int n_args, char** args ) -> int { try { if( n_args != 3 ) { throw "Uh oh!"; } cout << xpowerY( stoi( args[1] ), stoi( args[2] ) ) << endl; return EXIT_SUCCESS; } catch( ... ) { return EXIT_FAILURE; } } [/code] Invoke it like this: [example] [C:\my\forums\clc++\041] > g++ foo.cpp [C:\my\forums\clc++\041] > a 5 3 125 [C:\my\forums\clc++\041] > _ [/example] Cheers & hth!, - Alf |
Mr Flibble <flibbleREMOVETHISBIT@i42.co.uk>: Oct 16 08:59PM +0100 On 16/10/2016 12:11, Alf P. Steinbach wrote: > return EXIT_FAILURE; > } > } Your coding style makes my eyes hurt and your use of -> on main() is the egregious icing on your really bad cake. /Flibble |
Wouter van Ooijen <wouter@voti.nl>: Oct 16 10:12PM +0200 Op 16-Oct-16 om 9:59 PM schreef Mr Flibble: >> } > Your coding style makes my eyes hurt and your use of -> on main() is the > egregious icing on your really bad cake. In this specific context that is high praise :) Wouter "Objects? No Thanks!" van Ooijen |
"Öö Tiib" <ootiib@hot.ee>: Oct 16 01:44PM -0700 On Sunday, 16 October 2016 23:12:45 UTC+3, Wouter van Ooijen wrote: > > Your coding style makes my eyes hurt and your use of -> on main() is the > > egregious icing on your really bad cake. > In this specific context that is high praise :) Yes! However function names like 'fun1', 'fun2' are likely more enjoyable, lively and pleasant to professor than the odd 'foo' used. ;) |
"Öö Tiib" <ootiib@hot.ee>: Oct 15 04:22PM -0700 On Saturday, 15 October 2016 23:59:24 UTC+3, Jerry Stuckle wrote: > First of all, I never said I was the only one who wrote the code. I've > led many multiple-programmer projects, and kept rights to use the code I > designed over that time. In United States of America? Other programmers wrote it, company got the executable but source code became yours. :D I knew its worth to talk with you for more jokes. > Second of all, even your math is off. It's > nowhere near 30KB per day. My math seems Ok. Right here was a good place of you to show "correct math". What is the correct number "nowhere near 30000"? > And BTW - all of that code is heavily commented. I didn't say it was > all code; there are comments in the code, also. > Sorry, your show your ignorance. What percentage was comments? :D When you are in such a sad hole then stop digging. |
Ian Collins <ian-news@hotmail.com>: Oct 16 02:12PM +1300 On 10/16/16 03:38 AM, Öö Tiib wrote: >> That's exactly what you're doing when you have to write code from >> scratch with every project. > Yes and I do not see where I suggested that. The joke of it is the arse doesn't realise agile development practices (especially XP) naturally produce reusable code. You do have to remember that jerryworld is stuck somewhere in the 90s. -- Ian |
Jerry Stuckle <jstucklex@attglobal.net>: Oct 15 10:52PM -0400 On 10/15/2016 9:12 PM, Ian Collins wrote: > The joke of it is the arse doesn't realise agile development practices > (especially XP) naturally produce reusable code. You do have to > remember that jerryworld is stuck somewhere in the 90s. Wrong again, Ian. Even the other trolls here claim that Agile development doesn't allow for reusable code. But then you're is exactly the type of comment I would expect from someone who claims to have 10GB in their office - with 100GB coming. You are even more clueless than the typical troll. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
Jerry Stuckle <jstucklex@attglobal.net>: Oct 15 10:54PM -0400 On 10/15/2016 7:22 PM, Öö Tiib wrote: > In United States of America? Other programmers wrote it, company got > the executable but source code became yours. :D I knew its worth to > talk with you for more jokes. Once again you show you have no idea what copyright law is - in the United States or otherwise. Fortunately, i do. >> nowhere near 30KB per day. > My math seems Ok. Right here was a good place of you to show "correct > math". What is the correct number "nowhere near 30000"? Much less than 1/2 of that. And that is bytes, not LOC. But once again you don't seem to know the difference. >> Sorry, your show your ignorance. > What percentage was comments? :D When you are in such a sad hole then > stop digging. Enough to make the code clear. You're right. You've gone past the bottom. You should have stopped digging long ago. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
Ian Collins <ian-news@hotmail.com>: Oct 16 05:05PM +1300 On 10/16/16 03:52 PM, Jerry Stuckle wrote: >> remember that jerryworld is stuck somewhere in the 90s. > Wrong again, Ian. Even the other trolls here claim that Agile > development doesn't allow for reusable code. Citation please, no one using an agile methodology would make such a claim. > But then you're is exactly the type of comment I would expect from > someone who claims to have 10GB in their office - with 100GB coming. Why do you find that such a hard concept to grasp? [root@kvmhost (Home) /]# dladm show-phys LINK MEDIA STATE SPEED DUPLEX DEVICE rge0 Ethernet up 1000 full rge0 e1000g0 Ethernet up 1000 full e1000g0 ixgbe0 Ethernet up 10000 full ixgbe0 ixgbe1 Ethernet up 10000 full ixgbe1 -- Ian |
Jerry Stuckle <jstucklex@attglobal.net>: Oct 16 08:24AM -0400 On 10/16/2016 12:05 AM, Ian Collins wrote: >> Wrong again, Ian. Even the other trolls here claim that Agile >> development doesn't allow for reusable code. > Citation please, no one using an agile methodology would make such a claim. Read the messages in this thread. > e1000g0 Ethernet up 1000 full e1000g0 > ixgbe0 Ethernet up 10000 full ixgbe0 > ixgbe1 Ethernet up 10000 full ixgbe1 ROFLMAO! Stoopid is as stoopid does! That is NOT 10G ethernet - much less 100G! You wouldn't know the difference between that and a 1200 baud modem. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
"Öö Tiib" <ootiib@hot.ee>: Oct 16 05:59AM -0700 On Sunday, 16 October 2016 05:54:40 UTC+3, Jerry Stuckle wrote: > > talk with you for more jokes. > Once again you show you have no idea what copyright law is - in the > United States or otherwise. Fortunately, i do. Me? I did never contract you. :D My company is small, nowhere fortune 500. These were "fortune 500" companies that contracted you but did not know laws. Each have huge legal department but still agreed with contract where all source code, even that other people wrote for them is yours to reuse forever anywhere. It was because your brillant knowledge of copyright laws trumped them. :D > > math". What is the correct number "nowhere near 30000"? > Much less than 1/2 of that. And that is bytes, not LOC. But once again > you don't seem to know the difference. Ok, lets try with that. Since you give no numbers I have to calculate with most favorable to you extremes. So ... "1/2" of 30 000 that I claimed is 15 000 bytes per day. "Much less" is lets say as extreme 5 less so 15 000 - 5 is 14 995 bytes per day. You as extreme do not have weekends, vacations, sick leaves nor national holidays so as 365 days per year you write 14 995 * 365 is 5 473 175 bytes per year. "30 years" you claimed makes 30 * 5 473 175 what is 164 195 250 bytes per 30 years. Smallest from the "hundreds of megabytes" you claimed is as extreme 2 hundreds megabytes that is 209 715 200 bytes. So however favorably I try to calculate there are 45 519 950 bytes missing. That is more than 43 megabytes missing. You can't calculate, mate, sorry. I don't know what "software designer" you are, but sounds funny. :D > Enough to make the code clear. > You're right. You've gone past the bottom. You should have stopped > digging long ago. Oh you can't tell any numbers. That indicates that the weird code-base resides within your fantasies. |
Jerry Stuckle <jstucklex@attglobal.net>: Oct 16 09:55AM -0400 On 10/16/2016 8:59 AM, Öö Tiib wrote: > contract where all source code, even that other people wrote for them > is yours to reuse forever anywhere. It was because your brillant > knowledge of copyright laws trumped them. :D You're the one who claims to know everything about United States copyright law. That's the law that rules here. And you know even less about United States contract law. But you claim it is a joke. The only joke here is you. > most favorable to you extremes. So ... "1/2" of 30 000 that I claimed > is 15 000 bytes per day. "Much less" is lets say as extreme 5 less > so 15 000 - 5 is 14 995 bytes per day. And now you've just proven you can't even do simple arithmetic. What do they teach in your schools? > per year. > "30 years" you claimed makes 30 * 5 473 175 what is 164 195 250 bytes per > 30 years. Ah, you do know arithmetic. And that is about 64% more than 100MB. Can you compute that? > Smallest from the "hundreds of megabytes" you claimed is as extreme 2 hundreds > megabytes that is 209 715 200 bytes. So however favorably I try to calculate > there are 45 519 950 bytes missing. That is more than 43 megabytes missing. Yes, and much of that is also code I haven't written personally - but have rights to from the contracts I've worked on. > You can't calculate, mate, sorry. I don't know what "software designer" you > are, but sounds funny. :D You have zero clue, that's obvious. You should try working on larger projects. For instance, when you have > 100 programmers on a project, you get a LOT of code written every day. Multiple megabytes every week, in fact. Properly designed, much of that code is reusable. And I have rights to use all of that code that I designed, even when others wrote the code. It's in my contracts. But you also know everything about U.S. Copyright and contract laws, so I know you'll just blow that off, too. >> digging long ago. > Oh you can't tell any numbers. That indicates that the weird code-base > resides within your fantasies. The only fantasy here is your concept of the real world. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
"Öö Tiib" <ootiib@hot.ee>: Oct 16 08:30AM -0700 On Sunday, 16 October 2016 16:55:52 UTC+3, Jerry Stuckle wrote: > copyright law. That's the law that rules here. And you know even less > about United States contract law. But you claim it is a joke. The only > joke here is you. I claim only that you are clowning. Rest is your own nonsense bragging and fantasies. > > so 15 000 - 5 is 14 995 bytes per day. > And now you've just proven you can't even do simple arithmetic. What do > they teach in your schools? Right here was good place again to show the ways you calculate. Unfortunately no. You only talk groundless patronizing noise and it is uninteresting. :( > > 30 years. > Ah, you do know arithmetic. And that is about 64% more than 100MB. Can > you compute that? You swallowed 365 day work-years without a blink? :D No, I can't compute what you claim. Your "library hundreds of megabytes of code" is still quoted above. 100MB is "hundred of megabytes" so at least 2 times less than that. Also I can not imagine how you reached 64% unless you claim 56.59% being "about 64% in your universe". 164 195 250 bytes is 156.59% of 100MB so it is about 57% more than 100MB. > > there are 45 519 950 bytes missing. That is more than 43 megabytes missing. > Yes, and much of that is also code I haven't written personally - but > have rights to from the contracts I've worked on. You are again claiming how you trumped your fortune 500 companies with your wicked contracts. Such empty claims are out of proportions uninteresting. ... snip rest of bragging. Sorry, you are getting repetitive and uninteresting. |
Ian Collins <ian-news@hotmail.com>: Oct 17 07:33AM +1300 On 10/17/16 01:24 AM, Jerry Stuckle wrote: >>> development doesn't allow for reusable code. >> Citation please, no one using an agile methodology would make such a claim. > Read the messages in this thread. I have and no one has made such a claim. >> ixgbe1 Ethernet up 10000 full ixgbe1 > ROFLMAO! Stoopid is as stoopid does! That is NOT 10G ethernet - much > less 100G! Let's see: # man ixgbe NAME ixgbe - Intel 10Gb PCI Express NIC Driver So you disagree with Intel as well now? -- Ian |
Jerry Stuckle <jstucklex@attglobal.net>: Oct 16 03:56PM -0400 On 10/16/2016 2:33 PM, Ian Collins wrote: >>> claim. >> Read the messages in this thread. > I have and no one has made such a claim. You don't read very well, do you? > NAME > ixgbe - Intel 10Gb PCI Express NIC Driver > So you disagree with Intel as well now? Fine - that's a NIC driver. It says nothing about your LAN/WAN connection. I have set up a lot of 1G LANs for clients - even though they only have 100MB connectivity. But you don't know the difference. You've already proven that. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
Jerry Stuckle <jstucklex@attglobal.net>: Oct 16 04:04PM -0400 On 10/16/2016 11:30 AM, Öö Tiib wrote: >> joke here is you. > I claim only that you are clowning. Rest is your own nonsense bragging > and fantasies. Nope, you claimed a lot more. But I know you won't own up to it. >> they teach in your schools? > Right here was good place again to show the ways you calculate. Unfortunately > no. You only talk groundless patronizing noise and it is uninteresting. :( I don't need to show how wrong your basic arithmetic is. >> Ah, you do know arithmetic. And that is about 64% more than 100MB. Can >> you compute that? > You swallowed 365 day work-years without a blink? :D I never said anything of the sort. But you're so stoopid that you can't even see how out of range your ideas are. > 2 times less than that. Also I can not imagine how you reached 64% unless > you claim 56.59% being "about 64% in your universe". 164 195 250 bytes > is 156.59% of 100MB so it is about 57% more than 100MB. Ah, now you're back to trolling. And you don't even know how much 100MB is. It has been 100,000,000 bytes for most people ever since hard disks > 10MB came out in the middle 80's (when disk manufacturers vied as to who had the largest disk). 164,195,250 bytes is 64.195250% greater. > uninteresting. > ... snip rest of bragging. > Sorry, you are getting repetitive and uninteresting. No "trumping" and no "wicked contracts". Pure business - and they know it, also. But you know nothing about business, either. In the United States, smart businesses keep control of code and license its use. Microsoft is a great example. -- ================== Remove the "x" from my email address Jerry Stuckle jstucklex@attglobal.net ================== |
woodbrian77@gmail.com: Oct 16 12:43PM -0700 On Saturday, October 26, 2013 at 2:35:47 AM UTC-5, Bo Persson wrote: > Yeah, that's the point - everyone is covered. > The argument that some of you could get better care if others get > nothing doesn't really bite on non-Americans. Twila Brase does a good job of explaining alternatives to Obamacare and Medicare www.cchfreedom.org/about.php Twila Brase for President. Brian Ebenezer Enterprises - Obama==Hillary==Trump==sucks. http://webEbenezer.net |
You received this digest because you're subscribed to updates for this group. You can change your settings on the group membership page. To unsubscribe from this group and stop receiving emails from it send an email to comp.lang.c+++unsubscribe@googlegroups.com. |
No comments:
Post a Comment