Search found 126 matches

by mousewiz
Tue Dec 22, 2015 9:33 pm UTC
Forum: Coding
Topic: SQL Stuffs: Insert using Select cross Constants help
Replies: 6
Views: 3436

Re: SQL Stuffs: Insert using Select cross Constants help

Avoiding the use of a temp table can typically be accomplished by creating a subquery. I believe MySQL syntax allows for this, but somebody else might correct me: SELECT SQ.n FROM (SELECT T.n FROM Values T) SQ From there, it sounds like your list of values needs to be hardcoded somehow. Stackoverflo...
by mousewiz
Fri Oct 30, 2015 1:11 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1597: "Git"
Replies: 51
Views: 12951

Re: 1597: "Git"

The tar one I could not relate to, as it's not hard to memorize the few commands that I actually use.

This comic, though, describes my understanding of git perfectly.
by mousewiz
Thu Jul 23, 2015 7:18 pm UTC
Forum: Coding
Topic: Avoiding duplicate code
Replies: 20
Views: 4742

Re: Avoiding duplicate code

Oh, one other possibly relevant thing: what's the ratio of needed:total calculations going to be like for the most part? If you're typically going to be executing, say, 5 out of 100 possible calculations, then I could imagine it being worthwhile to put function pointers in a list outside the loop. A...
by mousewiz
Thu Jul 23, 2015 5:02 pm UTC
Forum: Coding
Topic: Avoiding duplicate code
Replies: 20
Views: 4742

Re: Avoiding duplicate code

I think if you need to get rid of a simple condition check for performance reasons, you need to either dynamically write the loop and then compile/execute it, or write something to statically generate all possible loops (or perhaps, just all possible sequences of calculations, and then dynamically p...
by mousewiz
Tue Jun 30, 2015 7:03 pm UTC
Forum: Computer Science
Topic: Deliberately bad algorithms
Replies: 120
Views: 46611

Re: Deliberately bad algorithms

Code: Select all

floor(float f) {
    for(int i = 0; i <= f; i++) ;
    return i;
}


Negative floors need not apply.
by mousewiz
Wed Mar 25, 2015 9:44 pm UTC
Forum: Religious Wars
Topic: Sorting small arrays: Algorithm fight!
Replies: 16
Views: 9039

Re: Sorting small arrays: Algorithm fight!

I'm not sure this is a religious war so much as it is solvable by empiricism? I vaguely recall insertion sort being the fast one on small arrays on modern PCs from my algorithm courses. So I picked that. But if I really needed to optimize a bunch of small array sorts, I'd probably just test and go ...
by mousewiz
Wed Mar 25, 2015 8:24 pm UTC
Forum: Religious Wars
Topic: Sorting small arrays: Algorithm fight!
Replies: 16
Views: 9039

Re: Sorting small arrays: Algorithm fight!

I'm not sure this is a religious war so much as it is solvable by empiricism? I vaguely recall insertion sort being the fast one on small arrays on modern PCs from my algorithm courses. So I picked that. But if I really needed to optimize a bunch of small array sorts, I'd probably just test and go w...
by mousewiz
Wed Feb 04, 2015 4:46 pm UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

Note: they've changed their minds and have apologized. The linked article mentions it at the top. My guesses for the initial decision: 1) "Garena Philippines eSports" -- how are the Philippines with these sorts of issues in general? I don't know. I feel like I've heard bad things, but I ca...
by mousewiz
Mon Feb 02, 2015 12:07 am UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

Public and Scientists Views on Science and Society (PDF) from Pew Research Center has a graph (page 6) showing the difference between the opinions of American Association for the Advancement of Science members and typical American adults. Some commonalities toward the bottom, but boy do we differ, ...
by mousewiz
Fri Jan 30, 2015 5:53 pm UTC
Forum: Hardware
Topic: New Desktop recommondations
Replies: 13
Views: 9964

Re: New Desktop recommondations

Canadian? Check out memoryexpress if they're in your area (calgary/edmonton/winnipeg/vancouver). Reasons: 1) They'll beat online prices on identical products. For prebuilt desktops that won't (I don't think) get you anything because they're selling custom offerings, but for any peripherals or upgrad...
by mousewiz
Thu Jan 15, 2015 3:56 pm UTC
Forum: Serious Business
Topic: Existence of the Patriarchy
Replies: 202
Views: 44496

Re: Existence of the Patriarchy

If I doubted her answer I certainly don't after today. Today I saw my niece open her Christmas presents. Seeing all the barbies and princesses and kitchen sets. Damn. We might as well be hanging a banner that says "shoot no higher than being a wife and mother." For Christmas, my wife and ...
by mousewiz
Thu Jan 15, 2015 3:42 pm UTC
Forum: News & Articles
Topic: British Prime Minister wants to ban encryption.
Replies: 29
Views: 7035

Re: British Prime Minister wants to ban encryption.

thing is: there's a non-trivial cost to breaking each individual implementation. encrypt with some well known and well tested system, then wrap that in your own using seperate keys etc and even if there's some subtle weakness in your implementation it's going to take human time to get through it ra...
by mousewiz
Wed Jan 14, 2015 10:51 pm UTC
Forum: News & Articles
Topic: British Prime Minister wants to ban encryption.
Replies: 29
Views: 7035

Re: British Prime Minister wants to ban encryption.

Also a typical college sophomore majoring in math ought to be able to make a cryptosystem that the government could not break. You cant put the genie back in the bottle Typical? No, most cryptosystems that have been made by even above average people have either had serious weaknesses in their desig...
by mousewiz
Wed Jan 14, 2015 3:50 pm UTC
Forum: Religious Wars
Topic: Is 0 a natural number?
Replies: 35
Views: 17200

Re: Is 0 a natural number?

Way back when, I learned that "whole" numbers are {1, 2, ...} and natural numbers are {0, 1, ...}. Or maybe it was the other way around. Maybe I should say "I was taught" instead. :-) I'm in the same boat, along with the slight uncertainty if it was the other way around or not. ...
by mousewiz
Tue Jan 13, 2015 10:38 pm UTC
Forum: Religious Wars
Topic: Is 0 a natural number?
Replies: 35
Views: 17200

Re: Is 0 a natural number?

Oh wow, I didn't know this was a thing. But wiki tells me it's a thing. So it must be a thing.

I agree, the answer is obviously yes.
by mousewiz
Tue Jan 13, 2015 10:36 pm UTC
Forum: Religious Wars
Topic: Best keyboard switch?
Replies: 43
Views: 18944

Re: Best keyboard switch?

I've been using my Logitech G15 for a good number of years now and have no real complaints about rubber domes. But I assume the mechanical things are popular for a reason, so I wonder what I'm missing. Plus the G15 is getting a little old... who needs a little display when you've got 3 monitors thes...
by mousewiz
Mon Jan 12, 2015 9:38 pm UTC
Forum: News & Articles
Topic: Plastic Soup
Replies: 111
Views: 23205

Re: Plastic Soup

That's not completely true. There are increasing extraction costs to consider. Shale oil isn't new, it was, until recently, hard to get. As for bag substitutes, has anyone considered cardboard boxes? Aldi encourages people to use their leftover boxes as grocery containers. There's a supermarket whe...
by mousewiz
Mon Jan 12, 2015 5:17 pm UTC
Forum: Serious Business
Topic: “Could you say Senator instead of Ma’am?”
Replies: 139
Views: 32079

Re: “Could you say Senator instead of Ma’am?”

mcd001 wrote:(After all, he's a white, male officer in the U.S. Army. He *has* to be a sexist pig, right?)

Well she's a female, liberal, senator, so that's *got* to be what she was thinking, right?
by mousewiz
Wed Dec 24, 2014 7:02 pm UTC
Forum: Gaming
Topic: Hearthstone
Replies: 590
Views: 122374

Re: Hearthstone

I think we now have, for the first time, at least one non-class legendary card being strictly superior to another card at the same cost (Dr. Boom vs War Golem). Boom vs Golem is probably about as close as we've gotten to strictly better, but: - I actually got burned in an arena run (11-3) featuring...
by mousewiz
Tue Dec 23, 2014 9:08 pm UTC
Forum: Religious Wars
Topic: Engineering Typesetting
Replies: 8
Views: 8108

Re: Engineering Typesetting

Pen and paper. Two reasons: 1) Since "note taking" was the example given, I'm much more likely to look at my own paper notes than in a text (or whatever) file. Dunno why, I just am. So even if the notes are *really* text heavy, and typing would be significantly easier than hand writing, I'...
by mousewiz
Mon Dec 15, 2014 5:36 pm UTC
Forum: News & Articles
Topic: Obama doubles down on standardized assessment of teachers
Replies: 32
Views: 8585

Re: Obama doubles down on standardized assessment of teacher

The traveling salesman problem is a notable problem for a reason. Drivers certainly do need creativity and thinking skills at times. Service? Cmon, the service sector needs these skills in spades. I'm not sure that the decisions faced by drivers are the reason it's a notable problem. I think it's a...
by mousewiz
Mon Dec 15, 2014 3:12 am UTC
Forum: News & Articles
Topic: Police misbehavior thread
Replies: 6424
Views: 936499

Re: Police misbehavior thread

The County Executive of a Maryland county recently discussed his encounters with the police: http://www.washingtonpost.com/local/md-politics/montgomery-county-executive-recounts-his-own-police-profiling-incidents/2014/12/11/cc65aa28-80a8-11e4-81fd-8c4814dfa9d7_story.html One thing that got me about...
by mousewiz
Thu Dec 04, 2014 6:05 pm UTC
Forum: News & Articles
Topic: The Thread To Remind Me We're Living In The Future
Replies: 1816
Views: 302501

Re: The Thread To Remind Me We're Living In The Future

The "bots: no lying" form of captcha has now become a reality: http://www.pcmag.com/article2/0,2817,2473062,00.asp I must be missing something, while this is obviously an improvement for human usability, how does it deter bots? Quickly looking at the BBC: http://www.bbc.com/news/world-eur...
by mousewiz
Fri Nov 28, 2014 9:47 pm UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

Sizik wrote:China bans puns.

This time, the East has gone too Far.


I wonder how many people there enjoy Kool-Aid, drink of the children.
by mousewiz
Wed Nov 26, 2014 4:59 pm UTC
Forum: News & Articles
Topic: Police misbehavior thread
Replies: 6424
Views: 936499

Re: Police misbehavior thread

For the consideration of this esteemed body. http://heckphilly.tumblr.com/post/103549547269/darren-wilson-the-16-second-lie That entire argument hinges upon whether or not two unrelated clocks are synchronized to some particular degree. I don't like that the issue isn't mentioned at all in the post.
by mousewiz
Thu Oct 30, 2014 3:32 am UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

Oh yes, such terrible animal abuse. How dare they. You should only abuse animals in socially accepted ways! Don't shoot them! Instead lock them up in tiny cages for their entire living, occasionally hacking off body parts, then use electric shocks to herd them to a place where you slowly led them b...
by mousewiz
Tue Oct 21, 2014 4:47 pm UTC
Forum: Serious Business
Topic: Ethics of AdBlock
Replies: 639
Views: 119242

Re: Ethics of AdBlock

I run NoScript because it is basically necessary from a security perspective. I don't even whitelist sites I browse frequently unless some feature I want to use (eg, comments) *at that moment* requires it. If I don't care about comments at the moment, they stay hidden. This results in a ton of ads e...
by mousewiz
Tue Oct 14, 2014 9:42 pm UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

There are towns named "Moosejaw" and "Hell" in North America, and you Europeans get hung up on Mobile. I'm not sure why you'd pick "Moosejaw" of all names to single out... it does not seem to be on the same level as "Hell". If you want a better one, there's a...
by mousewiz
Wed Oct 08, 2014 7:05 pm UTC
Forum: Religious Wars
Topic: Underscores vs CamelCase
Replies: 107
Views: 62717

Re: Underscores vs CamelCase

I use the Javaish conventions, but I don't really have strong feelings either way so long as the code base is consistent. It's annoying when it isn't. I'm used to camel, so reading it isn't a strain compared to underscores, plus it's less keystrokes. I also find it slightly easier to remember identi...
by mousewiz
Sat Oct 04, 2014 7:13 pm UTC
Forum: Religious Wars
Topic: Not Equals
Replies: 91
Views: 61956

Re: Not Equals

so, what do you guys think of if (!Boolean.TRUE.equals(foo(bar))) ? (relatively honest question, since i just recently came to java from c#) Please don't ever write that again. This is preferred Java syntax: if(new Boolean(Boolean.TRUE.equals(foo(bar))).equals(Boolean.FALSE)){ //stuff } (or, just d...
by mousewiz
Fri Oct 03, 2014 8:14 pm UTC
Forum: Religious Wars
Topic: Not Equals
Replies: 91
Views: 61956

Re: Not Equals

so, what do you guys think of if (!Boolean.TRUE.equals(foo(bar))) ? (relatively honest question, since i just recently came to java from c#) Please don't ever write that again. This is preferred Java syntax: if(new Boolean(Boolean.TRUE.equals(foo(bar))).equals(Boolean.FALSE)){ //stuff } (or, just d...
by mousewiz
Fri Oct 03, 2014 8:05 pm UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

Yablo wrote:So basically, ignore exactly everything that makes Tetris what it is.

You need to be fair to the Type A music. It's not as important as the game play, but it's certainly some chunk of what makes Tetris, Tetris.
by mousewiz
Fri Oct 03, 2014 3:16 pm UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

At first I was a little excited (because I liked Battleship, in its own stupid way... plus this one has the Mortal Kombat pedigree, which is my favourite adaptation). But then I thought for a moment and decided that: 1) Computers are better at Tetris than people. 2) The best humans are so good/fast ...
by mousewiz
Thu Sep 25, 2014 10:13 pm UTC
Forum: News & Articles
Topic: CVE-2014-6271: Remote Exploit Vulnerability found in BASH
Replies: 19
Views: 7586

Re: CVE-2014-6271: Remote Exploit Vulnerability found in BAS

I wonder if it would be possible to seriously make an impact by writing a worm to patch vulnerable systems. Three things: 1) I bet some malware author will do exactly that. Except that they'll be doing to stop others from interfering with their worm, and not for benevolent purposes. This is far fro...
by mousewiz
Thu Sep 25, 2014 8:57 pm UTC
Forum: Religious Wars
Topic: stop walking on the escalators
Replies: 104
Views: 33398

Re: stop walking on the escalators

Unless you run into them at the bottom of the escalator, and the rest of the escalator is clear sailing, it seems like by the time you force them to move, the trip will be basically over. Not that I ever stand around blocking the escalator, but I would be mildly annoyed with someone who felt the ne...
by mousewiz
Thu Sep 25, 2014 8:35 pm UTC
Forum: Religious Wars
Topic: stop walking on the escalators
Replies: 104
Views: 33398

Re: stop walking on the escalators

...but if other people are standing on it blocking your way, you probably shouldn't spend energy worrying about it... Or... just say 'excuse me'... Unless you run into them at the bottom of the escalator, and the rest of the escalator is clear sailing, it seems like by the time you force them to mo...
by mousewiz
Thu Sep 25, 2014 7:54 pm UTC
Forum: Religious Wars
Topic: stop walking on the escalators
Replies: 104
Views: 33398

Re: stop walking on the escalators

running up stairs is not an option if you're not a teenager anymore. also, i believe i can walk up an escalator faster than the average person can run up stairs. I'm not sure of your definition of teenager, but at 30, I have no trouble running up the stairs *much* faster than walking on the escalat...
by mousewiz
Thu Sep 25, 2014 7:22 pm UTC
Forum: News & Articles
Topic: Police misbehavior thread
Replies: 6424
Views: 936499

Re: Police misbehavior thread

Surprised this hasn't come up yet... New York police under investigation after officers tackle visibly pregnant woman to the ground. She claims she was also struck in the stomach with a police baton. I dunno about this one because the video is absolutely awful. My thoughts, though, are that it look...
by mousewiz
Mon Sep 22, 2014 2:06 pm UTC
Forum: News & Articles
Topic: In other news... (humorous news items)
Replies: 14855
Views: 2316230

Re: In other news... (humorous news items, etc)

This is under the etc - it's not really humorous, but don't think it's enough for it's own thread. I don't understand why gay marriages would be easier to do as sham marriages than straight marriages. Do they think gay people don't have as much in the way of photos and evidence? Do they think gay m...
by mousewiz
Mon Sep 15, 2014 8:22 pm UTC
Forum: News & Articles
Topic: The Darker Side of the News
Replies: 4117
Views: 546116

Re: The Darker Side of the News

Does that suggest the world values African lives less? Or that it values strangers' lives less? Or illegal immigrants' / refugees' lives. Or it could have less to do with the lives and more to do with the story (Malaysia flights both had mystery; the Korean ferry is perhaps more relatable as many p...

Go to advanced search