Search found 202 matches

by bittyx
Fri Feb 26, 2016 8:22 pm UTC
Forum: The Help Desk
Topic: What hosting do you all use?
Replies: 8
Views: 5976

Re: What hosting do you all use?

I host my website(s) on WebFaction, which isn't free, but is pretty cheap - $10 per month - I guess you can consider this beer money. I don't know how much NFSN charges for hosting so I can't make a comparison, but I do host my domains with them. With NFSN, I love how transparent they are about *eve...
by bittyx
Sat Dec 19, 2015 12:20 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

I think this is what's meant by "snake-scrolling: http://jsfiddle.net/qkv5ubub/ - is that correct? I took the contents of the Wikipedia article on scrolling as an example. I didn't bother to deal with edge cases (such as getting to the "bottom" of the first column, which should in the...
by bittyx
Wed Nov 04, 2015 6:22 am UTC
Forum: Coding
Topic: Batch renaming files
Replies: 7
Views: 4454

Re: Batch renaming files

@WanderingLinguist: I use Sublime Text in combination with massren for doing the same thing. It doesn't solve all problems - in particular, generating new filenames isn't easy (e.g. 00000001.txt, 00000002.txt, etc.) but for renaming it's really awesome (you basically have all of Sublime Text's proce...
by bittyx
Fri Apr 03, 2015 10:34 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

Circular dependencies are not inherently a problem, and sometimes they are required, and are actually the correct solution - but more often than not, they can be a sign of bad design, at least in my experience (obviously this should be evaluated in each case). In the latter situation, you can look f...
by bittyx
Tue Mar 31, 2015 5:53 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

This might be absolutely silly, but how about simply outsourcing the contents from resource.py that resource_a.py needs to resource_d.py ? That's not an option. resource_a.py needs the resource loader defined in resource.py, and the resource loader needs resource_a.py because it can load resources ...
by bittyx
Sun Mar 15, 2015 3:29 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

My day job is programming a control system for vehicle emissions testing. According to EPA regulations, we need to produce output that is correct to seven significant digits (!). (We're actually given gas densities to eight significant digits, and need to use that exact value!) The problem is that ...
by bittyx
Fri Feb 27, 2015 5:16 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1492: "Dress color"
Replies: 362
Views: 62327

Re: 1492: "Dress color"

Also, the dress is obviously blue and black :D As for the gold, I can sort of understand how it might appear gold (because the color in the image certainly is such, when you check the RGB value, for example), but my mind immediately compensates that as awful lighting, and I am certain I am seeing bl...
by bittyx
Fri Feb 27, 2015 4:56 pm UTC
Forum: Individual XKCD Comic Threads
Topic: 1492: "Dress color"
Replies: 362
Views: 62327

Re: 1492: "Dress color"

There is a painted wall in London (maybe Marylebone High Street) which from any angle looks purple. However when you photograph it close up looking straight on the picture comes out sliver/grey. I've experienced this with two different cameras. This example is with an iPhone. No post processing has...
by bittyx
Sun Feb 22, 2015 1:59 pm UTC
Forum: Coding
Topic: Learning HTML and CSS
Replies: 76
Views: 34495

Re: Learning HTML and CSS

Does it mention when a header is a header? Like will the program say, "Headline: My Favorite Bazooka Joe Comics" for <h1>My Favorite Bazooka Joe Comics</h1>? 'cause I hate using header tags but I'll use them for accessability's sake. Just a quick note, since this is a personal pet peeve -...
by bittyx
Sat Feb 07, 2015 8:34 am UTC
Forum: Coding
Topic: Worse than RegEx: comments in mail addresses
Replies: 18
Views: 6978

Re: Worse than RegEx: comments in mail addresses

There's also this: http://blog.mailgun.com/free-email-validation-api-for-web-forms/ - I've never used it, as I haven't had a need for it, but I've heard about it, and it sounds okay. In the first comment on that article they also mention that they do not store any email addresses, but you'd still pr...
by bittyx
Fri Dec 05, 2014 6:16 am UTC
Forum: Coding
Topic: PHP/Javascript -- weird times with AJAX responseXML
Replies: 10
Views: 5133

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

Anyway, back on topic, just want to mention that JSON is not the same as how you'd write JavaScript objects - while JSON is *almost* a complete subset of JavaScript, it is not a strict one - http://timelessrepo.com/json-isnt-a-javascript-subset In addition to that, although the other way around, JS...
by bittyx
Thu Dec 04, 2014 9:40 pm UTC
Forum: Coding
Topic: PHP/Javascript -- weird times with AJAX responseXML
Replies: 10
Views: 5133

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 bittyx
Wed Dec 03, 2014 7:16 pm UTC
Forum: Coding
Topic: PHP/Javascript -- weird times with AJAX responseXML
Replies: 10
Views: 5133

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

Your code should be correct, but it's better to use "application/xml" (Google for reasons why). Additionally, you should also specify the charset, ie. header('Content-Type: application/xml; charset=utf-8'); You can use other charsets, but nowadays it's mostly recommended to just use UTF-8 ...
by bittyx
Sun Jun 29, 2014 8:15 am UTC
Forum: The Help Desk
Topic: New hotkeys for my keyboard?
Replies: 13
Views: 5946

Re: New hotkeys for my keyboard?

Oh, correct, I was thinking of US International, not US Extended - I actually haven't used Windows for a long time now, so I got confused with the name. And yeah, the dead keys are awful on that layout. After some Googling, it seems that US Extended actually seems to be a useful layout, too bad I di...
by bittyx
Thu Jun 26, 2014 6:19 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

Is C++ still worth learning? I know a dozen nice languages, and don't really expect (or hope) to have to use C++ at some point in my career, but it *is* one of the biggest languages. Other than its use and strength in industry, is there any good reason to learn the language? Absolutely yes. In addi...
by bittyx
Thu Jun 26, 2014 5:36 pm UTC
Forum: The Help Desk
Topic: New hotkeys for my keyboard?
Replies: 13
Views: 5946

Re: New hotkeys for my keyboard?

Switch your keyboard to the US Extended layout, then it's quite easy to type accented letters of all kinds. I "hate" that the default layout on most Windows machines I've used seems to be the US Extended layout, because I find it awful for typing, though perhaps that has something to do w...
by bittyx
Wed Jun 25, 2014 6:51 pm UTC
Forum: The Help Desk
Topic: New hotkeys for my keyboard?
Replies: 13
Views: 5946

Re: New hotkeys for my keyboard?

On Linux, you can use the Compose key (I have it bound to the right Ctrl key). Using the compose key is easy and intuitive, for example, the letter you need is written by pressing the compose key, the capital E, and the backtick ` (in sequence, not at once), and you get È easily. By "intuitive&...
by bittyx
Thu Jun 12, 2014 5:14 pm UTC
Forum: The Help Desk
Topic: Slow Insertion in SQL database
Replies: 4
Views: 3281

Re: Slow Insertion in SQL database

Also take a look at this, which should be the fastest way to import a bunch of data into a MySQL table at once. It's easy to import a CSV file like this, and it should be much faster than what you're doing right now.
by bittyx
Mon Jun 02, 2014 9:24 pm UTC
Forum: The Help Desk
Topic: Windows sorting vs Irfanview sorting.
Replies: 24
Views: 10950

Re: Windows sorting vs Irfanview sorting.

Actually, that kind of "natural" sort order makes more sense in the common usage scenarios - seriously, your image files have file names which are basically completely random strings (as far as you're concerned), and you're trying to figure out how to sort them? Why do you even care? If yo...
by bittyx
Sun May 11, 2014 5:19 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

Nothing wrong with display:table at all. Wanting to display things in an aligned grid with certain layout characteristics is valid for non-tabular data; it's just a layout mode, and should be applicable to anything. Yeah, that was just a subjective feeling, not a recommendation to others or anythin...
by bittyx
Fri May 09, 2014 8:24 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

If you don't like to use tables in this case because of semantics, don't forget the definition list - perhaps it makes more sense than two spans in a list item? EDIT: Also, I always kind of found `display: table` kinda hacky - like, okay, this is not a table, but it should look like one. Well what i...
by bittyx
Mon Apr 14, 2014 6:19 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

I instantiate class A. A creates class B as a property and B creates C. Actually, if possible, this sounds like a good place to use Dependency Injection - if you aren't familiar with the concept, it basically goes something like - a class shouldn't instantiate other classes, but rather, any instanc...
by bittyx
Sat Mar 29, 2014 2:56 pm UTC
Forum: Coding
Topic: Very Dumb PHP Redirect Question
Replies: 4
Views: 3648

Re: Very Dumb PHP Redirect Question

In fact, that's the bare minimum you need to achieve the redirect and end script execution - you need the "header()" obviously, so as to tell the browser where to go, and you need the "die" to stop executing the script (because the "header()" won't stop the script - wha...
by bittyx
Sun Jan 26, 2014 11:37 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

Sadly, my employer forces me to represent every column and escape every potential identifier, for the same stringent reasons as to why I have to use a 2-space-a-tab, 80-column-wrap coding policy. Now I'm trying to figure out how to do it when the table has 30+ columns... How come you don't use any ...
by bittyx
Sun Dec 22, 2013 8:26 am UTC
Forum: Coding
Topic: Combinatorial explosion magnitude?
Replies: 4
Views: 3819

Re: Combinatorial explosion magnitude?

This sounds like one of the many Alchemy games available for Android (and no doubt, other platforms, it's just that I've played these, so I know about them). Don't know if this helps, but perhaps you can see how/what they implemented, and maybe get some ideas?
by bittyx
Thu Sep 12, 2013 11:07 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

You, sir, name? wrote:http://www.youtube.com/watch?v=TdUsyXQ8Wrs

That's the most accurate decription of XML I've come across so far.
by bittyx
Thu Aug 15, 2013 5:05 pm UTC
Forum: The Help Desk
Topic: Controlling terminal color scheme with bash
Replies: 4
Views: 5812

Re: Controlling terminal color scheme with bash

By "color scheme" I guess I mean "palette." E.G. Solarized , or just something as simple as "the default palette, only replace make the default text color green for that greenscreen look, and make Dark Blue brighter so you can actually see it on black." PuTTY allows yo...
by bittyx
Tue Aug 13, 2013 5:03 pm UTC
Forum: The Help Desk
Topic: PHP invoke script on another server
Replies: 9
Views: 13615

Re: PHP invoke script on another server

So I would want, correct me if I am wrong:     //lets go ahead and get the filename    $name=$_FILES['midi']['name'];    //copy the file to a new directiry    if(!move_uploaded_file($_FILES['midi']['tmp_name'],"/home/joseph/mid/" . $name)){    die("Error copying file");    }  Also, instead of a has...
by bittyx
Sun Aug 11, 2013 7:47 am UTC
Forum: The Help Desk
Topic: PHP invoke script on another server
Replies: 9
Views: 13615

Re: PHP invoke script on another server

You have a few security-related bugs in your code there that you might want to fix. //lets go ahead and get the filename $name=$_FILES['midi']['name']; //copy the file to a new directiry if(!copy($_FILES['midi']['tmp_name'],"/home/joseph/mid/" . $name)){ die("Error copying file")...
by bittyx
Tue Aug 06, 2013 5:57 pm UTC
Forum: Site/Forum issues
Topic: [Fixed] What-If Feed Problems
Replies: 17
Views: 54724

Re: feed problems for What-If in Feedly

FWIW, I don't even *see* today's article in my Feedly feed, so... I'd say it's a Feedly bug. I've had such weird problems with it ever since I've started using it (including, for example, read articles suddenly being unread again, and similar), and for these few months since I've started using it, I...
by bittyx
Tue Aug 06, 2013 3:38 pm UTC
Forum: Coding
Topic: MYSQL Woes
Replies: 7
Views: 3891

Re: MYSQL Woes

bittyx pretty much has the name part covered, but even with that, I don't get what kind of results this query is supposed to give. There are game notes, a game status, game results, game type, etc., but no game id . Or, to put it another way, home team and away team are meaningless, without a game ...
by bittyx
Mon Aug 05, 2013 9:38 pm UTC
Forum: Coding
Topic: MYSQL Woes
Replies: 7
Views: 3891

Re: MYSQL Woes

INNER JOIN `ncfc`.`teams` AS away_teams ON (`results_fixtures`.`away_team` = `teams`.`team_id`) INNER JOIN `ncfc`.`teams` AS home_teams ON (`results_fixtures`.`home_team` = `teams`.`team_id`) Shouldn't that be: INNER JOIN `ncfc`.`teams` AS away_teams ON (`results_fixtures`.`away_team` = `away_teams...
by bittyx
Mon Aug 05, 2013 9:30 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

In reference to PHP woes from the previous page. Sometimes PHP can get murky. When I wrote this code it made sense to me, but when I look at it while editing this file I cringe. <?php echo '<a href="index.php'; if ($CS->N < 1) echo '?comic=1'; else if (!$CS->isComic($CS->N + 1)); else echo '?c...
by bittyx
Sun Apr 14, 2013 12:17 pm UTC
Forum: Coding
Topic: Can someone explain to me how to set up proper security?
Replies: 9
Views: 8464

Re: Can someone explain to me how to set up proper security?

if($database->getUser($_POST['username'])->getPasswordHash() == $_POST['password']){    $_SESSION['logged_in'] = true;}  Surely, you mean if ($database->getUser($_POST['username'])->getPasswordHash() == makeHash($_POST['password'])) {    $_SESSION['logged_in'] = true;}  where "makeHash()&...
by bittyx
Sun Feb 17, 2013 7:14 pm UTC
Forum: Coding
Topic: Git Interactive Tutorial
Replies: 1
Views: 5864

Re: Git Interactive Tutorial

Hey, thanks for sharing, this! I haven't had time to go through all of the levels, but from a quick test, it seems like a really fun and straightforward way to learn some Git basics - which is just what I need, as we have some trainees in our company that haven't done much version control previously...
by bittyx
Wed Feb 06, 2013 6:14 pm UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

Now that I think about it, that wasn't very well thought-out for this specific example - FWIW, I mainly use PHP at work, and, depending on the actual requirements (I'm not much of an RPG player, so take this with a grain of salt), I'd either have a class for modifiers (and one for basic attributes, ...
by bittyx
Wed Feb 06, 2013 6:18 am UTC
Forum: Coding
Topic: Coding: Fleeting Thoughts
Replies: 10016
Views: 2031313

Re: Coding: Fleeting Thoughts

Please, never do this. It makes your code harder to read, and it tends to screw up syntax highlighting, which makes it even more confusing. Yeah, when I was using VIM I saw the 'str' pop up as blue and I was like 'uh-oh'. I did decide to call the strength modifier 'str_mod' and so on--but I think I...
by bittyx
Sun Feb 03, 2013 8:55 pm UTC
Forum: Coding
Topic: Tetris variants: post em here!
Replies: 3
Views: 2793

Re: Tetris variants: post em here!

Well this thread has inspired me to try to create my own Tetris clone, in JavaScript (I'm a web developer, so this was my language of choice). There's still a bunch of stuff to fix, but the current version can be seen at http://js-tetris.levacic.net/ (as soon as the subdomain propagates - the IP is ...
by bittyx
Wed Oct 17, 2012 4:57 pm UTC
Forum: News & Articles
Topic: Softbank to Buy Sprint
Replies: 20
Views: 2873

Re: Softbank to Buy Sprint

Not to rail on the off-topicness too much, but as someone who is happily employed, doing what I like with nice people, it is still, in my opinion, a sale of labor - it's just that I'm "charging" my employer more than mere money - I'd consider the environment I work in, as well as the satis...
by bittyx
Sun Sep 02, 2012 10:02 pm UTC
Forum: Coding
Topic: How Do I Learn About [n]?
Replies: 183
Views: 387089

Re: How Do I Learn About [n]?

@Shivahn: I'm a PHP dev, and haven't had to do a task like this, but if I were to do it, I'd likely use Python as well (the basics of what I'd do are pretty much the same, just using different libraries/syntax) - a fine opportunity to learn a bit of Python as well :D First off, you should check whet...

Go to advanced search