Search found 8012 matches
- Wed Jan 09, 2019 2:45 pm UTC
- Forum: Individual XKCD Comic Threads
- Topic: 2096: "Mattresses"
- Replies: 35
- Views: 3751
Re: 2096: "Mattresses"
↶ Very rarely do I not understand an XKCD or think that it doesn't apply to me............. but I have no experiences of mattresses, underwear or post offices in either online adverts or podcasts? Is this an American-only thing, or am I misunderstanding the comic? A lot of podcasts are sponsored by...
- Wed Jan 02, 2019 12:28 pm UTC
- Forum: Individual XKCD Comic Threads
- Topic: 2092: "Consensus New Year"
- Replies: 28
- Views: 2823
Re: 2092: "Consensus New Year"
↶ It's striking that only about 15% of the population enters the New Year later than London, despite there being almost half the planet between the Greenwich Meridian and the International Date Line. But the half between the Date Line and Greenwich contains the majority of the land masses, plus the...
- Wed Dec 05, 2018 2:01 am UTC
- Forum: Coding
- Topic: egyptian fractions
- Replies: 6
- Views: 1063
Re: egyptian fractions
There is a slight problem that: 1/2 + 1/6 + 1/18 + 1/126 + 1/1008 + 1/39389 + 1/1142281 + 1/164488464 = 12343/16881 ≠ 4131/5627 You should probably double-check your numbers... there's two arithmetic errors in your first line alone. What is the purpose here? Are you just doing this for fun, or do yo...
- Sat Oct 27, 2018 6:49 am UTC
- Forum: Coding
- Topic: avoiding coding "representation errors"
- Replies: 20
- Views: 9646
Re: avoiding coding "representation errors"
↶ But surely you should be able to do: $rawhtml = $safestart+$safemiddle+$safeend; $safehtml = clean($rawhtml); assuming you have a clean() function that does the proper escaping for the kind of HTML you need at that point, no? But how does your clean() function tell the difference between a good t...
- Thu Oct 25, 2018 2:11 am UTC
- Forum: Coding
- Topic: What does this MATLAB code do?
- Replies: 4
- Views: 2529
Re: What does this MATLAB code do?
Judging mostly based on the variable names, I'm guessing it's some sort of confidence interval calculation... Like, say you do a test 100 times, and get 75 successes. The thing you're testing probably has a probability of success somewhere around 3/4, but you can't be sure exactly where. But if you ...
- Sat Oct 13, 2018 9:02 am UTC
- Forum: Coding
- Topic: write a C++ please
- Replies: 18
- Views: 5625
Re: write a C++ please
The forums aren't here to do your homework for you... how about you talk more about what you've tried so far, and what you're getting stuck on?
- Sat Oct 13, 2018 5:03 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
It's less a bash feature and more a readline feature, so a lot of different CLIs from the GNU space have that sort of functionality.
- Thu Sep 27, 2018 12:46 am UTC
- Forum: Individual XKCD Comic Threads
- Topic: 2048: "Curve-Fitting"
- Replies: 19
- Views: 5254
Re: 2048: "Curve-Fitting"
↶ Is there a trick to the hidden text punchline? Lorentz was in theoretical physics, especially electromagnetism. Cauchy was a civil engineer working on a canal for Napoleon. Neither seem especially disreputable. It's a bit of an ambiguous pronoun, but I think it's supposed to mean that you'd want ...
- Sat Sep 08, 2018 12:01 pm UTC
- Forum: Computer Science
- Topic: a neat picture based on recursive number
- Replies: 11
- Views: 3785
Re: a neat picture based on recursive number
See also this thread over in Forum Games, which I suspect the OP is familiar with, but might not be familiar to others reading this thread...
- Wed Mar 07, 2018 11:58 am UTC
- Forum: Computer Science
- Topic: If HAL - 9000 Was Alexa
- Replies: 1
- Views: 3699
Re: If HAL - 9000 Was Alexa
Just curious, do you plan on posting any threads that aren't just links to your own blog?
- Thu Feb 22, 2018 9:41 pm UTC
- Forum: Coding
- Topic: My Hobby: Working around missing functionality
- Replies: 2
- Views: 3945
Re: My Hobby: Working around missing functionality
↶ What's the missing functionality? I was going to guess "waking up to my music", but the speakers are muted. Unless you mean the computer speakers are muted, so the wake-up light plays the bluetooth-to-fm of your playlist, in which case, cool. I presume the computer isn't in their bedroo...
- Wed Feb 14, 2018 11:18 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
As noted, it does look like you've re-typed your code here in the forum, rather than copy-pasting the code you're actually trying to run, and I think in the process of re-typing it there's been some typos introduced. So it's hard to tell exactly what errors are contributing to the bug you're experie...
- Mon Feb 05, 2018 9:21 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
Yeah, there's a lot of different options for how to store a multidimensional array, and they all have their pros and cons. Lists-of-lists (as before) # as comprehension cat = [ [ [ 0 for i in range(3) ] for j in range(5) ] for k in range(3) ] # as a literal cat = [ [ [0, 0, 0], [0, 0, 0], [0, 0, 0],...
- Sun Feb 04, 2018 3:58 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
↶ Thanks... I know python is really weird when it comes to white space... Python cares about whitespace for indenting statements, but that's about it. Within a line, or for indenting continuing lines of the same statement, it doesn't really care. Since you're inside the brackets it's all part of on...
- Fri Jan 05, 2018 1:03 pm UTC
- Forum: The Help Desk
- Topic: YouTube comment history weirdness
- Replies: 3
- Views: 4393
Re: YouTube comment history weirdness
Looks like I get the same behaviour you're describing.
I guess YouTube is a buggy mess? I mean that isn't that surprising.
I guess YouTube is a buggy mess? I mean that isn't that surprising.
- Wed Dec 27, 2017 11:15 am UTC
- Forum: Coding
- Topic: What sort of language do you think was used to make Xcom Apocalypse?
- Replies: 26
- Views: 10340
Re: What sort of language do you think was used to make Xcom Apocalypse?
This is going to be more of a general art advice post, than anything technical... but this is a very important discussion of advice for this , it's about 15 minutes long but I highly recommend listening to the whole thing. For which the jist is: make something , and get it done. Don't spend forever ...
- Mon Oct 30, 2017 2:03 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
Possible confounding factor here being that 30 Jan 1918 on the Gregorian calendar was a Thursday... but, 30 Jan 1918 on the Julian calendar was a Wednesday, so Russia had a Wednesday followed by a Thursday, nothing unusual there, just the actual date did weird things. There are also cases where a pl...
- Fri Sep 22, 2017 12:27 am UTC
- Forum: The Help Desk
- Topic: Wipe a folder from Android menu
- Replies: 10
- Views: 4757
Re: Wipe a folder from Android menu
This is the Help Desk, remember... please, less debates about filesystems, more actually answering the OP's question.
If you want to have a discussion about the finer points of phone filesystems, take that to RW.
If you want to have a discussion about the finer points of phone filesystems, take that to RW.
- Wed Sep 20, 2017 4:17 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
Xeio wrote:↶
It's weird when I'm reading the spec docs for the SWF file format.
Or... you could not?
Have you considered... just... not?
- Mon Sep 04, 2017 1:20 am UTC
- Forum: Coding
- Topic: View XKCD from a terminal.
- Replies: 5
- Views: 7375
Re: View XKCD from a terminal.
Clearly the obvious solution to that is to combine aalib with some sort of OCR, so that text in the original comic comes out as readable text in the terminal, but the drawings in the comic get the normal aalib treatment.
I'm sure such a plan will be simple and have no possible drawbacks.
I'm sure such a plan will be simple and have no possible drawbacks.
- Fri Sep 01, 2017 1:18 pm UTC
- Forum: News & Articles
- Topic: In other news... (humorous news items)
- Replies: 15072
- Views: 2482370
Re: In other news... (humorous news items)
To be fair: less "unpublished novels" and more random musings, works in progress, snippets of things, backlogged ideas... stuff that likely never would have seen the light of day even if the man had lived to be a million. Or if they would, they'd be very different than what you'd find by c...
- Mon Aug 07, 2017 2:12 pm UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
Is the goal here to allow people to enter arbitrary expressions in the config file? Or are you just trying to make it so they can enter numbers/strings/etc and have it load in as the appropriate types? Because in the latter case, it's probably going to be a lot cleaner to just read the values in as ...
- Thu Aug 03, 2017 12:27 am UTC
- Forum: News & Articles
- Topic: Police misbehavior thread
- Replies: 6515
- Views: 1026501
Re: Police misbehavior thread
The idea that the statute of limitations can expire while the crime is still in progress is baffling to me.
- Sat Jul 22, 2017 10:08 am UTC
- Forum: Religious Wars
- Topic: Graph theory terminology
- Replies: 16
- Views: 9035
Re: Graph theory terminology
Vertopodes.
- Tue Jul 18, 2017 9:50 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
But really, the ideal solution is to take full-motion video, convert it to GIF, and then take that resulting GIF and convert that to MP4. Because the dithering patterns from dropping to 256-colour do great things to MPEG compression. At least Twitter lets you upload actual MP4s and skip that whole s...
- Sat Jun 24, 2017 11:47 pm UTC
- Forum: Religious Wars
- Topic: Spaces in paths & filenames
- Replies: 45
- Views: 13438
Re: Spaces in paths & filenames
Yeah, but that would require me to think ahead, and type an opening quote mark before getting into this mess...
- Sat Jun 24, 2017 1:41 pm UTC
- Forum: Religious Wars
- Topic: Spaces in paths & filenames
- Replies: 45
- Views: 13438
Re: Spaces in paths & filenames
The one thing I try to avoid is having the names of two files be the same except for something after a space... so like "foo" and "foo bar"... because now to access "foo bar" from the CLI using tab-completion, I type "f[tab]" and it gives me foo, and now I hav...
- Tue May 23, 2017 11:01 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
Even better. As you guessed, Javascript will automatically add a semicolon at the end of a line if it makes syntactic sense. But then the brace becomes the start of a block statement, not the start of an object literal. Inside that block is the (useless) label "foo", on the (pointless) sta...
- Fri May 19, 2017 11:05 am UTC
- Forum: Site/Forum issues
- Topic: Login rememberence?
- Replies: 5
- Views: 5420
Re: Login rememberence?
There is an edge case with the remember-me login thing that happens sometimes. It can happen if your session cookie expires, and then when you come back, you load two pages at once. So for instance, maybe you left the forum open for a while, your session expired, and you click two links quickly. Or ...
- Thu Apr 27, 2017 12:54 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
Seen floating around Twitter: Compiling C to x86 using only printable ASCII.
Learn how to program a computer when you aren't allowed to use MOV. Or backward jumps.
Learn how to program a computer when you aren't allowed to use MOV. Or backward jumps.
- Fri Apr 21, 2017 10:39 am UTC
- Forum: Computer Science
- Topic: Logic for why NP is not closed under complement?
- Replies: 2
- Views: 6314
Re: Logic for why NP is not closed under complement?
OK, so it's been a while since I've dabbled in complexity theory so I'm a bit rusty, and I hit up Wikipedia for a quick refresher, and it helpfully says: Every deterministic complexity class is closed under complement, because one can simply add a last step to the algorithm which reverses the answer...
- Sun Apr 16, 2017 5:15 am UTC
- Forum: News & Articles
- Topic: In other news... (humorous news items)
- Replies: 15072
- Views: 2482370
Re: In other news... (humorous news items)
Coyne wrote:↶
The requests would all be identical, right down to voice, inflection and timing. Could Google have technology that detects such problems and automatically defeats them?
If Twitter isn't lying to me, I believe they already have.
- Thu Apr 13, 2017 1:55 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
ahammel wrote:Anyway: the good news is that I found a tool to statically find import cycles. The bad news that the dependency cycle in question is 41 modules long.
Godspeed, brave warrior...
- Wed Apr 12, 2017 12:07 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
↶ Node's handling of cyclic dependencies is probably the most maddening language feature I've ever had to deal with. "Surprise! That function is suddenly undefined! Good luck figuring out why." That sounds very similar to the way it works in Python ... except for that word "copy"...
- Sat Apr 08, 2017 6:45 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
In that case, why all the messing around with subclasses and whatnot? Why do you need separate UnboundObj and BoundObj? Can't you just have SomeObj which has an unbind method, and if you call it while it isn't bound, it does nothing or raises an exception or whatever? What's the benefit in making it...
- Fri Apr 07, 2017 11:43 pm UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
I don't think there's a good reason to be messing with __class__ here (or almost ever, really)... if you really wanted to do it that way, you could just set obj.unbind = lambda: binder().remove(obj) and then in remove just del obj.unbind Basically the only advantage of the automatic-subclassing stuf...
- Sun Apr 02, 2017 2:00 pm UTC
- Forum: Computer Science
- Topic: Deliberately bad algorithms
- Replies: 120
- Views: 53380
Re: Deliberately bad algorithms
(Very rough pseudocode...) for path in sys.path: for file in os.walk(path): __import__(file) for o in gc.get_objects(): if isinstance(o, types.FunctionType): try: o(seq) etc Every function. Who cares where it came from. Also, to go back a step... I've never seen "log² x" to mean "(log...
- Wed Mar 29, 2017 1:05 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
When I took CS theory, they called them "formal parameters" and "actual parameters", but they also said that "parameters" vs "arguments" gets some use.
- Sat Mar 25, 2017 1:47 am UTC
- Forum: Coding
- Topic: Coding: Fleeting Thoughts
- Replies: 9924
- Views: 1882886
Re: Coding: Fleeting Thoughts
Yeah, as Xenomortis alludes, the magic word here is single dispatch ... which method is actually called is based on the actual runtime type of the "this" parameter (ie: calling overridden methods in subclasses) but all of the other parameters are bound statically based off their declared t...
- Wed Feb 15, 2017 11:09 pm UTC
- Forum: Individual XKCD Comic Threads
- Topic: 1799: "Bad Map Projection: Time Zones"
- Replies: 70
- Views: 14429
Re: 1799: "Bad Map Projection: Time Zones"
↶ Maybe I'm misunderstanding something, but… why is Poland "reaching" to the east? It's in the same time zone as Germany and most of the Western Europe, and they observe DST the same way. Probably just so it can share a border with Belarus, which is two timezones away... ↶ I don't get tha...