I just mad the basic star triangle program with only templates. Show me what you got!#define TRIANGLE_SIZE 20
#include <iostream>
template<int x> struct fact{
enum{ value = x + 1 + fact<x - 1>::value};
};
template<> struct fact<0>{
enum{ value = 1 };
};
template<char... C> struct charlist{};
template<char left, typename charlist> struct toFront;
template<char left, char... right> struct toFront<left, charlist<right...> >{
typedef charlist<left, right...> value;
};
template<typename charlist, typename charlistx> struct combine;
template<char... x, char... y> struct combine<charlist<x...>, charlist<y...> >{
typedef charlist<x... , y...> value;
};
template<int length> struct makeRow{
typedef typename toFront<'*', typename makeRow<length-1>::value >::value value;
};
template<> struct makeRow<0>{
typedef charlist<'\n'> value;
};
template<int size> struct makeTri{
typedef typename combine< typename makeTri<size-1>::value, typename makeRow<size>::value >::value value;
};
template<> struct makeTri<0>{
typedef charlist<> value;
};
template<typename charlist> class consttri;
template<char... c> class consttri< charlist<c...> >{
public:
char value[sizeof...(c)+1];
constexpr consttri(): value{c..., '\0'}{}
};
void printstars(int x){
int y = 0;
while(y <= x){
for(int m=0; m<y; m++){
std::cout<<"*";
}
std::cout<<std::endl;
y++;
}
}
int main(){
std::cout<<"Compile time: "<<std::endl;
std::cout<< consttri< typename makeTri<TRIANGLE_SIZE>::value >().value;
std::cout<< "Run time: "<<std::endl;
printstars(TRIANGLE_SIZE);
}
>this much bullshit to generate a fucking triangle at compile time
>needing templatesimport std.stdio;
string stars(int x)
{ char[] ret;
int y = 0;
while (y <= x)
{ for (int m = 0; m < y; ++m)
ret ~= "*";
ret ~= "\n";
++y;
}
return ret.idup;
}
void main()
{ pragma(msg, stars(12));
writeln(stars(12));
}
>>61546464
>enum
>typedef
>constexpr constructor
You call that C++11 template metaprogramming? Absolutely disgusting.#include <utility>
#include <iostream>
template<char...>
struct static_string;
template<typename...>
struct static_string_cat;
template<char... C, typename... A>
struct static_string_cat<static_string<C...>, A...>
{
using value = typename static_string_cat<
static_string<C...>, typename static_string_cat<A...>::value
>::value;
};
template<char... L, char... R>
struct static_string_cat<static_string<L...>, static_string<R...>>
{
using value = static_string<L..., R...>;
};
template<>
struct static_string_cat<>
{
using value = static_string<>;
};
template<typename>
struct static_string_cstr;
template<char... C>
struct static_string_cstr<static_string<C...>>
{
static constexpr char value[] = { C..., '\0' };
};
template<char... C>
constexpr char static_string_cstr<static_string<C...>>::value[];
template<std::size_t N, char C>
struct char_repeat
{
using value = typename static_string_cat<
static_string<C>, typename char_repeat<N - 1, C>::value
>::value;
};
template<char C>
struct char_repeat<1, C>
{
using value = static_string<C>;
};
template<unsigned N>
struct stars
: public static_string_cat<
typename char_repeat<N, '*'>::value, static_string<'\n'>
>
{
};
template<typename>
struct triangle_aux;
template<std::size_t... I>
struct triangle_aux<std::index_sequence<I...>>
{
using value = typename static_string_cat<
typename stars<I + 1>::value...
>::value;
};
template<std::size_t N>
struct triangle
{
using value = typename triangle_aux<std::make_index_sequence<N - 1>>::value;
};
int main(void)
{
static constexpr std::size_t TRIANGLE_SIZE = 20;
std::cout
<< static_string_cstr<typename triangle<TRIANGLE_SIZE>::value>::value;
}
>>61547692
Please help I ran that and it formated my computer
Previous thread: >>61511149
IRC: #/tpg/ on irc.rizon.net
Other business laptops are also welcome in /tpg/ (e.g. Dell Latitude/Precision, HP EliteBook/ZBook).
>New to /tpg/ or looking for purchasing advice? (hint: use the advice request template, it makes life easier)
https://pastebin.com/nBqTEbHn
>If you're looking for purchase advice, READ THE BUYERS GUIDE FIRST. Then post, stating budget and requirements (e.g. size and performance).
>Don't buy anything OTHER THAN HP Elitebook (2570p, 8770W, 2170p), Dell Latitude/Precision (E6430, E6440, E7440) and P, T, X, and W SERIES if you want the Real Business Experience™
>Recommended models and mod guide:
https://pastebin.com/jVSuE175
>Used ThinkPad buyers guide:
http://ktgee.net/tpg
>xsauc buyers guide:
http://www.dankpads.com
>EPP discount for new ThinkPads (USA & Canada only, usually 15%+ off):
http://pastebin.com/JVwVGVTW
>Helpful links and resources (Wiki, lookup tools and wallpapers):
http://pastebin.com/DYjEnVq1
Hey, xsauc, wherever you are, do you still have your s70?
Would you be interested if I shoved a thinkpad pen up my pooper and took a pic?
not really
Is wayland finally ready as an X11 replacement?
>>61546364
wayland is, for most uses
the DEs/WMs/programs aren't
>tfw wayland will never replace x11 because of legacy hell
>>61546618
this
you finally are getting it now right?
X11 will NEVER fully go away.
NEVER >:DDD
Why are good laptops so expensive /g/
'cos they're gud
You can go buy a perfectly good gift-from-God/IBM used Thinkpad on eBay right now for under 200 dollars, I really don't understand what you're saying to be honest.
>>61546384
I want an x1 carbon to shitpost on but no one sells 3rd gens anymore
>being a poorfag
>being an used fx 8370 to replace my old phenom 1090
>more or less the same framerate as before on my games, still inconsistant and dropping under 60 fps
>now with just more HEAT and NOISE because my cpufan turns at 2800rpm
feels fucking bad man, at least i can still sell that shit at the same price i bought it.
>being an used fx 8370 to replace my old phenom 1090
meant buy, sorry
>>61546295
>being a poorfag
Then stop being poor Pablo
>>61546295
happy with a R7 1700 here
coming from a 4 thread i5
>We'll get back to you with more information soon.
Is this bullshit? Also what is the average response time after an interview?
Better start sending out more applications OP lol
>>61546275
Yeah I know, did 4 interviews last week, two this week. Really wish there was more honesty so I could just move on mentally
>>61546252
Yup, apply at all other positions that suit your skills.
And give them a call in a few days to ask about their normal application procedure. From what I've found, if you dont actively pursue that offer you'll never hear back.
>be 1969
>key breaks on Sanders Terminal keyboard
>unscrew the rear panel
>desolder keyswitch
>replace it with a new one
>reassemble
>be 1989
>trace breaks on Toshiba T3100e keyboard
>unscrew keyboard assembly
>bridge the connection with some spare wirewrap wire
>reassemble
>be 2009
>power switch breaks on Thinkpad X200 keyboard
>unscrew keyboard assembly and trackpoint
>remove battery and BIOS battery
>reconnect PSU to
>BIOS fortunately boots it without needing the switch
>back to repairing the keyboard...
>take plastic cover off the top switch assembly
>the power button is part of the membrane
>remove all the keys and switches to get to the membrane
>flip keyboard over
>peel off plastic sheet that covers the whole thing
>there's plastic rivets under it
>maybe 20 of them
>start cutting them off with a Stanley knife
>peel the membrane off
>peel the layers of the membrane apart
>bridge break in the connection with conductive pen
>start putting the membrane back
>put keys back
>superglue small offcuts of plastic to the rivet stems to secure it back
>put keyboard back
>screw it it
What happened, /g/?
>>61546249
only nerds and terrorists open things up.
>>61546249
So, what's the best font family and rendering you can get on leenux?
>>61546177
>posts a 4chan screenshot without a dozen reaction faces
Why bother?
>>61546177
Isn't the 'pain' part of the fun?
>>61546177
Noto sans and Ubuntu sans are pretty good
Click pic related to use vpn thinking it's perfect to feed my korean fetish. All pornsites are blocked. Worst Korea has no access to porn.
Also why do car rental agencies charge people from different countries differently?
VPN thread what interesting things have you found out while using one?
Porn is illegal there
I can only imagine the cultural impact bbc and cucking could have
t. Friendly neighborhood koreanman
>>61546205
>Porn is illegal there
Do you guys use a vpn for porn? I mean is it enforced enough where police will investigate a korean guy for looking at people fucking?
>>61546263
>Do you guys use a vpn for porn?
yes
>I mean is it enforced enough where police will investigate a korean guy for looking at people fucking?
no
Why did it never catch on?
>>61546033
isn;t that just stx with flattened dimms?
>>61546051
It's Mini-ITX but none of the components on the board exceed a certain height, the placement of all components is more strict, and it has more internal connectors. The idea was to kickstart do-it-yourself AIO's, laptops, etc. and yet nobody cared.
Still have to deal with cooler height, most coolers are over the height of even the tallest rear i/o anyway
Then comes the fact that theres lots of competition in that very niche market. STX and shit is way smaller and fits the bill for uSFF pc's much Theres a few YouTube videos on mini stx boards, an entire PC with a desktop processor and a proper GPU can fit inside something the size of an ATX power supply
Are there any other cases in this form factor?
I'm not the biggest fan of Cooler Master so I'm wondering if there's anyone else who makes cases like this.
https://www.newegg.com/Product/Product.aspx?Item=N82E16811119265
Corsair Air 540/240
Close, but not exactly:
https://www.newegg.com/Product/Product.aspx?Item=N82E16811139029
https://www.newegg.com/Product/Product.aspx?Item=N82E16811112471
>>61546031
You can turn them on their sides but they're not really designed to. You're either placing it on the window or if you flip it to the other face, you're blocking the PSU vent.
Hello friends.
Is anyone aware of a way to get around the 10 gb limit on the new verizon UDP? If I could get it so it was just the 22 gb deprioritization that would be great, but I can't justify dropping my shit dsl and switching to verizon unlimited unless I can get around the 10 GB limit. 600kbps is too slow (even though my dsl is around the same and significantly less reliable)
Thanks
give it back jamal
no you fucking pathetic nigger
>>61545812
Try a dns tunnel.
Wizards of /g/ I need your help. I recently moved to a new apartment and brought my desktop. Plugged it in -- no POST. The lights on the mouse and keyboard flash when the PSU is switched on.
I've checked the PSUs connection to the mobo and graphics card. I also checked to make sure the power button on the base is connected to the mobo. It all looks tight.
What could I have knocked loose on the ride over?
Pic unrelated
>>61545797
Is it your monitor? Does anything at all show up on your screen? If your monitor is hooked up fine then it has to be something with your mobo.
Unhook all your peripherals and just try getting into BIOS with your mobo, keyboard, mouse, and monitor connected to your integrated graphics (if you have it)
>>61545797
lmao'ing@ur life bro.
>>61545797
That's actually how you would translate that sign if it was Japanese, which leads me to believe someone is retarded.
>mfw American's internet will be shittier in one week from now
BAHAHAHAHA GET FUCKED
Except it's going to be exactly the same
>>61545978
B-but drumpf is deleting the internet in amerishit!
Just moved into a new house and wifi won't be set up until Friday. Can't get my porn to buffer enough to jerk one. Any bros got a password to bypass Xfinity
>>61545573
Doesn't work like that anon.
Use your mind like the savage you are.
You'll live without jerking off for one day, you masturbation-addicted neanderthal.
>>61545788
You can't bump your own thread, newshit. Saged.