[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/sci/ - Science & Math

Search:


View post   

>> No.9471183 [View]
File: 115 KB, 850x800, 1454458646875.png [View same] [iqdb] [saucenao] [google]
9471183

>>9471032
>using a fucking class for box
This is why people who have ever coded in java should be lifetime banned from /sci/. Just fucking use a fucking typedef "using Box = array<Ball::color, 2>;"
>int otherballidx = ballidx == 0 ? 1 : 0;
Pajeet, my son, this isn't /g/. If you can't see 1-ballidx then you need to get the fuck out and stay out.
>random_device r;
You don't need it for more than on call so just use "default_random_engine e1(random_device()());"
>distrib2(e1)
You go out of your way to make the code more readable and then call with generators? Learn to std::bind
auto distrib3 = bind(uniform_int_distribution<int>(0,2), ref(e1));
auto distrib2 = bind(uniform_int_distribution<int>(0,1), ref(e1));
or just
auto distrib3 = bind(uniform_int_distribution<int>(0,2), default_random_engine(random_device()()) );
auto distrib2 = bind(uniform_int_distribution<int>(0,1), default_random_engine(random_device()()) );

>> No.9351275 [View]
File: 115 KB, 850x800, 1439062216981.png [View same] [iqdb] [saucenao] [google]
9351275

The only reason anybody goes to university for an undergraduate degree is the artificial value it has. The internet and free market have completely rendered university obsolete as an educational tool, so when will it finally fucking die already?

>> No.6633688 [View]
File: 115 KB, 850x800, 1404472474735.png [View same] [iqdb] [saucenao] [google]
6633688

>>6633682

Navigation
View posts[+24][+48][+96]