Search found 147 matches

by Archgeek
Wed Apr 29, 2015 6:27 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1518: "Typical Morning Routine"
Replies: 126
Views: 16682

Re: 1518: "Typical Morning Routine"

A floor vent in a home? Is this a US thing? Does it have something to do with Thanksgiving? Where do the vents lead? Are the grills not user-removable? I too can vouch for the existence of vented floors. I once lived in a house bearing such vents, and with a foundation of the sort that animals can ...
by Archgeek
Fri Dec 05, 2014 4:01 pm UTC
Forum: Coding
Topic: PHP/Javascript -- weird times with AJAX responseXML
Replies: 10
Views: 4505

Re: PHP/Javascript -- weird times with AJAX responseXML

bittyx wrote:Yeah, perhaps this might not have been the best place for my "XML vs JSON" comments, as "Religious Wars" is better suited for that - I didn't really mean to initiate such a discussion :)

No worries--this has been a shard edifying.
by Archgeek
Wed Dec 03, 2014 10:51 pm UTC
Forum: Coding
Topic: PHP/Javascript -- weird times with AJAX responseXML
Replies: 10
Views: 4505

Re: PHP/Javascript -- weird times with AJAX responseXML

Out of curiosity, is there a reason why you aren't just using JSON? Largely because I've had experience editing XML messing with the FFXI windower plugin SpellCast, as well as rogue configuration/part trees in Kerbal Space Program. Also, I did not know JSON was that simple. Now that I know I can ju...
by Archgeek
Wed Dec 03, 2014 6:42 am UTC
Forum: Individual XKCD Comic Threads
Topic: 0936: "Password Strength"
Replies: 893
Views: 279218

Re: 0936: "Password Strength"

.DL wrote:A password for a flash game with mice and cheese won't need to be so complex, and if its not an important game you probably won't even remember it!


Transformice, eh? Gotta love those lousy french physics.
by Archgeek
Wed Dec 03, 2014 1:08 am UTC
Forum: Coding
Topic: PHP/Javascript -- weird times with AJAX responseXML
Replies: 10
Views: 4505

PHP/Javascript -- weird times with AJAX responseXML

So in the course of still working on the same application as the one in my dumb "Javascript - Slicing up AJAX uploads, now with progress bar" thread, I've seen fit to refactor my big long token-delimited AJAX responseText (status*msgType|message*msgType|message...) and change it to a respo...
by Archgeek
Tue Dec 02, 2014 5:16 pm UTC
Forum: Coding
Topic: Just what does it actually do when a user disables cookies?
Replies: 25
Views: 9668

Re: Just what does it actually do when a user disables cooki

...can't you just detect JavaScript on the error message page? In particular, have the server send the non-JavaScript-enabled error message always, and then have a script on the error page change it to the JavaScript-enabled error message. Ooof, now there's an idea. There is no error page as the er...
by Archgeek
Thu Nov 20, 2014 3:30 pm UTC
Forum: Coding
Topic: Just what does it actually do when a user disables cookies?
Replies: 25
Views: 9668

Re: Just what does it actually do when a user disables cooki

That won't work out because the script in question is Javascript, which is client-side, and the index page server-side in PHP. I need to get the answer to "is JS enabled?" sent from the client to the server. I could do this using AJAX, but I needed that information in a PHP class that's al...
by Archgeek
Mon Oct 13, 2014 7:27 pm UTC
Forum: Coding
Topic: Funniest/Most Annoying Code Comments
Replies: 662
Views: 132880

Re: Funniest/Most Annoying Code Comments

Ack, this hilarious thread filled with sigbait is drying up? I refuse to accept that! So here's some of my own Thomas Foolery: On a CSS trick for triangular arrows-- /*Blackest Sorcery: arrows are conjured from the aether by using the interior-facing borders of a zero-hight block with the thickness ...
by Archgeek
Fri Sep 19, 2014 9:58 pm UTC
Forum: Coding
Topic: Javascript - Slicing up AJAX uploads, now with progress bar
Replies: 10
Views: 5179

Re: Javascript - Slicing up AJAX uploads, now with progress

Oh neat, these forums are back up. I haven't been able to connect since a couple of days ago. So declaring the listener in the loop generates separate instances for each xhr? Nice. I'll have to try that, since it seems less dumb than a solution I stumbled upon via the crime of having the progress ha...
by Archgeek
Mon Sep 15, 2014 9:01 pm UTC
Forum: Coding
Topic: Javascript - Slicing up AJAX uploads, now with progress bar
Replies: 10
Views: 5179

Re: Javascript - Slicing up AJAX uploads, now with progress

Ocelots and chicken lamps, I'm becoming a real pest around here. I apologize for bumping this thread with a new question, but the code above is mostly relevant to the new issue. I unfortunately am now trying, having gotten the above to work swimmingly, complete with dynamic chunks every 8MB or 10 fi...
by Archgeek
Fri Sep 12, 2014 10:25 pm UTC
Forum: Coding
Topic: Javascript - Slicing up AJAX uploads, now with progress bar
Replies: 10
Views: 5179

Re: Javascript - FormData objects and slicing up AJAX upload

Aardvarks and stoats, I am among the Dumbest of Guys. ...and so is this PHP server. I've torn my code to shreds hunting this bug, but it turns out I was just running afoul of the max post size directive, which is set to a mere 8 megs. I should've gotten suspicious when I noticed one specific set of ...
by Archgeek
Fri Sep 12, 2014 4:33 pm UTC
Forum: Coding
Topic: Javascript - Slicing up AJAX uploads, now with progress bar
Replies: 10
Views: 5179

Re: Javascript - FormData objects and slicing up AJAX upload

Well this is just getting odd. The handler works nicely now, but something's going very wrong with the requests themselves in a manner so unpredictable I'm suspecting a race condition. I've got it set to ignore valid files in the filelist after the 20th, and put the first 10 in one request and the n...
by Archgeek
Thu Sep 11, 2014 4:56 pm UTC
Forum: Coding
Topic: Javascript - Slicing up AJAX uploads, now with progress bar
Replies: 10
Views: 5179

Re: Javascript - FormData objects and slicing up AJAX upload

Oops, 'just noticed I'm assigning xhr.length to chunksCompleted in that if statement. I'll have to fix that after lunch.
by Archgeek
Thu Sep 11, 2014 4:54 pm UTC
Forum: Coding
Topic: Javascript - Slicing up AJAX uploads, now with progress bar
Replies: 10
Views: 5179

Re: Javascript - FormData objects and slicing up AJAX upload

HAH, it turns out the this pointer actually knows where to look, so just //let's have an array party xhr = []; for(var i = 0; i < formData.length; i++){ xhr.push(new XMLHttpRequest()); xhr[i].upload.addEventListener("progress", progressHandler, false); xhr[i].open("POST", documen...
by Archgeek
Thu Sep 11, 2014 2:56 pm UTC
Forum: Coding
Topic: Javascript - Slicing up AJAX uploads, now with progress bar
Replies: 10
Views: 5179

Javascript - Slicing up AJAX uploads, now with progress bar

Working on a drag-and-drop screenshot upload module at work, I've run into a curious set of circumstances. The server will reject an upload of over twenty files out of hand and silently, without even admitting the request contained anything, which is easy enough to deal with by having the script che...
by Archgeek
Wed Aug 20, 2014 2:33 pm UTC
Forum: Coding
Topic: Filesize unit conversion algorithm
Replies: 9
Views: 3298

Re: Filesize unit conversion algorithm

Thesh: It's academic really, I'm just curious. Woah, exponents are right in the instruction set? I thought they were loops of multiplications. 'Guess the x86 folks went nuts on saving instruction fetches. PHP's an interpreted language, though, so I've no guarantee it's being cool enough to use those...
by Archgeek
Wed Aug 20, 2014 4:26 am UTC
Forum: Coding
Topic: Filesize unit conversion algorithm
Replies: 9
Views: 3298

Re: Filesize unit conversion algorithm

It's O(log(n)). Integer division by a power of 2 if fast because it translates to a bitwise shift. It doubt that there is anything faster than an unrolled divide-and-check approach. Dang, really? I thought it was O(n) as the worst case involves a division for every power of 1024, up to 9 in the dan...
by Archgeek
Tue Aug 19, 2014 10:40 pm UTC
Forum: Coding
Topic: Filesize unit conversion algorithm
Replies: 9
Views: 3298

Filesize unit conversion algorithm

So upon poking around at how to format a decimal number in PHP to a certain precision, I ran into various ways of calculating the appropriate suffix for a given magnitude of file size, with my two favourites below: $byteUnits = array(' B',' kB', ' MB', ' GB'); $base = floor(log($size)/log(1024)); //...
by Archgeek
Mon Jul 14, 2014 5:20 pm UTC
Forum: Coding
Topic: Javascript Widget losing focus for some reason
Replies: 1
Views: 1509

Re: Javascript Widget losing focus for some reason

Hmm. I see my question may've been a bit scattershot. After a lot of analysis and solving a related problem such that the content buffer divisions (what I'm now calling old/newContents) don't need to be removed anymore, perhaps I can ask a more clear-cut query--though I can see the problem with call...
by Archgeek
Mon Jul 07, 2014 4:46 pm UTC
Forum: Coding
Topic: Javascript Widget losing focus for some reason
Replies: 1
Views: 1509

Javascript Widget losing focus for some reason

So I've been extending, hacking, and otherwise screwing with this accessible datepicker , doing stuff like extending the keyboard navigation to the months and years views, and altering the keyboard behaviour to act like the win7 calendar (notably enamoured of ^up/^down for moving between views) all ...
by Archgeek
Mon Apr 28, 2014 4:59 pm UTC
Forum: The Help Desk
Topic: [linux] unreasonable difficulty getting gcc on SUSE
Replies: 5
Views: 2579

Re: [linux] unreasonable difficulty getting gcc on SUSE

Well this is getting interesting. So many dependencies. I may have replaced libgcc46-4.6.1_20110701-0.13.9 with libgcc_s1-4.7.3_20130411-89.1.x86_64, but zypper still complains of a glibc provider dearth. Attempting to resolve that with a glibc-2.18-2.ram0.98.x86_64.rpm made this happen: Problem: gl...
by Archgeek
Mon Apr 28, 2014 3:02 pm UTC
Forum: The Help Desk
Topic: [linux] unreasonable difficulty getting gcc on SUSE
Replies: 5
Views: 2579

Re: [linux] unreasonable difficulty getting gcc on SUSE

Fixing zypper would be nice, but this virtual server is what I've been allowed to work with and it seems suse_register desires an activation code which I blatantly do not have. I can bug the admin about it, though.

I'll try that rpm in the meantime, though.

Thanks for the advice!
by Archgeek
Fri Apr 25, 2014 5:58 am UTC
Forum: Individual XKCD Comic Threads
Topic: 1360: "Old Files"
Replies: 108
Views: 23141

Re: 1360: "Old Files"

Ah, good old Elastomania. So many hours of highschool CS class wasted when the class wasn't playing Quake 3 Arena or Brood War. I'm surprised he didn't squeeze Pocket Tanks in there.
by Archgeek
Thu Apr 24, 2014 9:54 pm UTC
Forum: The Help Desk
Topic: [linux] unreasonable difficulty getting gcc on SUSE
Replies: 5
Views: 2579

[linux] unreasonable difficulty getting gcc on SUSE

Virtual server I'm accessing with PuTTY running SUSE Enterprise Server 11_2 (x86_x64). I'm trying to get the tomcat7 commons-daemon-1.0.15 up and running, but this insane thing came without any ANSI c compilers. ./configure complains that neither gcc, cc, a second instance of cc?, nor cl are present...
by Archgeek
Mon Apr 14, 2014 9:21 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1355: "Airplane Message"
Replies: 84
Views: 19344

Re: 1355: "Airplane Message"

[snip]Adam[/snip]... But as I posited, I'm guessing it refers to someone whom we have physical evidence of, not just scholarly conjecture. Adam's apple . That is all. Not sure if serious. Tongue in cheek. Technically, it is physical evidence, coming to us by means of (medieval?) folk wisdom - just ...
by Archgeek
Mon Apr 14, 2014 4:19 pm UTC
Forum: Coding
Topic: Letting a server know that a tab has closed
Replies: 4
Views: 3256

Re: Letting a server know that a tab has closed

Good to know, that. Wow...that is public transport reducingly special. I'll keep it in mind though, in case the existing code generates frequent failures. Indeed there is not, which is why I've padded things a bit. An array of tabs is being tracked, and it can have a max size set. When there are too...
by Archgeek
Thu Apr 10, 2014 6:34 pm UTC
Forum: Coding
Topic: Letting a server know that a tab has closed
Replies: 4
Views: 3256

Re: Letting a server know that a tab has closed

Hahah, nevermind, I've fixed the problem and answered my questions with SCIENCE. It turns out the browser (IE 8, blugh) in question uses an MSXML2 ActiveX object and not the proffered XMLHttpRequest, in spite of that comment there...so I needed a block like this: if (window.XMLHttpRequest) { // Mozi...
by Archgeek
Thu Apr 10, 2014 3:48 pm UTC
Forum: Coding
Topic: Letting a server know that a tab has closed
Replies: 4
Views: 3256

Letting a server know that a tab has closed

AJAX seems to be kicking my butt, here. I'm using a javascript with onbeforeunload and a few filters (http://eureka.ykyuen.info/2011/02/22/jquery-javascript-capture-the-browser-or-tab-closed-event/) to catch when a browser window (probably a tab) has been closed; however I cannot seem to get the mes...
by Archgeek
Wed Apr 09, 2014 10:09 pm UTC
Forum: Coding
Topic: Very Dumb PHP Redirect Question
Replies: 4
Views: 3252

Re: Very Dumb PHP Redirect Question

Well then, that's just plain convenient. Thank you all for the help -- exit() it is.
I would've expressed my thanks earlier, but I got distracted by the Madness and forgot about this post.
by Archgeek
Mon Mar 31, 2014 10:13 pm UTC
Forum: General
Topic: Mod Madness 2014 : The Announcement
Replies: 542
Views: 116410

Re: Very Model Of A big man ting General Furious Doodling 20

Mayhaps now this thread here can resume discussion of the ambient creole-flavoured instance of the BananaParty class.
by Archgeek
Wed Mar 26, 2014 7:38 pm UTC
Forum: General
Topic: Mod Madness 2014 : The Announcement
Replies: 542
Views: 116410

Re: Mod Madness 2014 : The Announcement

Curious results so far: " none the fewer nonethefewer", "more or fewer", or "<adjective>fewer". FTFY Ah, blastsalads, I was afraid of that. Other amusing ones then: "lesser demon", "lesser dragon", "lesser burning sphere". Curiously: "...
by Archgeek
Wed Mar 26, 2014 6:51 pm UTC
Forum: General
Topic: Mod Madness 2014 : The Announcement
Replies: 542
Views: 116410

Re: Mod Madness 2014 : The Announcement

I get the sense that the Reckoning has already begun, judging from places wherein it says "fewer" in places where I'd suspect entities mean "less", or rather "ssel" reversed... Curious results so far: "none the less", "more or less", or "<adject...
by Archgeek
Wed Mar 26, 2014 4:47 pm UTC
Forum: Coding
Topic: Very Dumb PHP Redirect Question
Replies: 4
Views: 3252

Very Dumb PHP Redirect Question

In the case that one wants to bounce straight to another page when a certain condition is met without running the rest of the php script, but plans to come back after doing some things, is there a better way to ensure this happens than using die;? It's currently formed like if(condition){ header('lo...
by Archgeek
Mon Mar 10, 2014 10:17 pm UTC
Forum: Coding
Topic: Just what does it actually do when a user disables cookies?
Replies: 25
Views: 9668

Re: Just what does it actually do when a user disables cooki

Okay, this is getting plain weird. 'Not sure if it's due to PHP or IE8 (blugh), but a test hack indicates the cookie does come through ...but only if it is set to true. The redirect in question is of the header(location:) sort, so there is another request happening...I think, and all cookies are set...
by Archgeek
Mon Mar 10, 2014 7:54 pm UTC
Forum: Coding
Topic: Just what does it actually do when a user disables cookies?
Replies: 25
Views: 9668

Re: Just what does it actually do when a user disables cooki

Well that's just plain interesting. I'm going to have check out that link with a few configurations...it seems legacy systems are amusingly unique. However, I'm not worried about privacy concerns here--I'm operating from the server side and trying to figure out if I can redirect from an index page t...
by Archgeek
Mon Mar 10, 2014 6:56 pm UTC
Forum: Coding
Topic: Just what does it actually do when a user disables cookies?
Replies: 25
Views: 9668

Re: Just what does it actually do when a user disables cooki

Ah, so if PHP sends a cookie in the request and the client doesn't have them enabled or supported, it just won't send it back on the next request, then? That's about what I was starting to suspect. But if the page wants to redirect to another page with a piece of information that's not a session var...
by Archgeek
Mon Mar 10, 2014 5:25 pm UTC
Forum: Coding
Topic: Just what does it actually do when a user disables cookies?
Replies: 25
Views: 9668

Re: Just what does it actually do when a user disables cooki

Is client cooperation absolutely required, though? Say in some odd case where we don't want to start session but need to carry some information across a page redirect, will a cookie set in PHP be available a few requests later if the client has cookies disabled?
by Archgeek
Mon Mar 10, 2014 3:25 pm UTC
Forum: Coding
Topic: Just what does it actually do when a user disables cookies?
Replies: 25
Views: 9668

Just what does it actually do when a user disables cookies?

I'm wondering if cookies can still be used server-side, for various odd reasons, when the client-side browser has them disabled. Does disabling cookies only cause client-side scripts to refuse to set and read cookies, while the server can do as it sees fit, or does it also prevent cookies set by the...
by Archgeek
Mon Mar 10, 2014 12:57 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1340: "Unique Date"
Replies: 140
Views: 28634

Re: 1340: "Unique Date"

Ah the Long Now. Has that clock been built yet? Ever since reading about them in a science magazine, I've dated checks and college papers with a leading zero on the year. Oddly, no one ever mentions it.
by Archgeek
Wed Jan 29, 2014 1:45 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1323: "Protocol"
Replies: 37
Views: 11452

Re: 1323: "Protocol"

I was expecting Mallory to show up and steal everyone's credit cards via session hijacking.

Go to advanced search