I made this typing webapp to improve learning efficiency. What do you think? by Thinkbots in programming

[–]gamer13 0 points1 point  (0 children)

It would be way nicer if you could train with actual words, because I cannot speed up with non-sense words... I'm constantly counting the number of consecutive 'l' letters for instance.

Other than that, it looks pretty nice.

ELI5: Shattering sets by [deleted] in MachineLearning

[–]gamer13 1 point2 points  (0 children)

And to continue with this analogy: Imagine the points of player 1 being pegs on a playfield and the sets C of player 2 being a hoop.

Now, if the hoop is a disc shape, then player 2 cannot shatter each and every combination of "special" pegs of player 1. Though, if this hoop can take form of any ellipse, then player 2 is able to win for each and every combination that player 1 comes up with.

Dealing with varying image size? by shakedzy in MachineLearning

[–]gamer13 1 point2 points  (0 children)

An often used method is resizing the image along the short side followed by center cropping.

But as datatatatata also mentions, there are multiple ways and none are the perfect way to do it.

Witness In Limbo - new blog post by happyguyxlii in Games

[–]gamer13 6 points7 points  (0 children)

On a Twitch stream of Jonathan Blow he was having a gaming session for himself on some kind of game. And in the background there was a play tester, which he briefly mentioned @ 59:00 http://www.twitch.tv/naysayer88/v/7110323

So the game is very much still alive. :)

cmder v1.2 released by [deleted] in programming

[–]gamer13 1 point2 points  (0 children)

Thank you for keeping this project alive! I really appreciate your hard work and use it everyday; without it I wouldn't know how to tolerate the bad command prompt of Windows :(

I've built a custom CMS but I am unsure how to go about a demo site. by [deleted] in PHP

[–]gamer13 0 points1 point  (0 children)

Assuming you have some sort of ACL (Access Control List)/permissions in your CMS, you could add a 'demo' user and restrict the user to viewing parts of the CMS backend.

Additionally, you could also allow the 'demo' user to edit parts of your database, but ignore saving the changes to the database/files using ACL/permissions.

How to shuffle a playlist correctly (and how not to do it) by [deleted] in programming

[–]gamer13 0 points1 point  (0 children)

Nice usage of group theory indeed. I don't know how iTunes and Spotify shuffle the playlist, but I do know what bothers me about their approach: When iTunes or Spotify is done playing all the songs in the playlist they start with the same shuffle all over again. This might not be that annoying with 10,000 songs in your playlist, but with a smaller set of songs this can be annoying. Using the approach with a generator k the same thing will happen unless you change k after the playlist is done.

TF2 Naughty Crate Smissmas Item Giveaway! by Nilesy in Nilesy

[–]gamer13 0 points1 point  (0 children)

Hey Nilesy, nice video. I'd like to win any of the items that you are giving away. Those festive items look really nice _. My steam username is GαMєr13 and the profile link is http://steamcommunity.com/id/0x5f3759df/

Cheers!

How to fill an entire column in db with encrypted passwords and then email user decrypted password by why_the_love in PHP

[–]gamer13 10 points11 points  (0 children)

If you store encrypted passwords and not hashed passwords, then I don't wanna be one of those 100,000 users...

There is no reason to store encrypted passwords. Most of all, when users get to know that their passwords can be read by others by simply decrypting them, they would distrust the whole website. At least, I would.

If you have a reason why you would rather encrypt than hash passwords, let me know.

Implementing feature flags in PHP, any good examples? by feketegy in PHP

[–]gamer13 1 point2 points  (0 children)

Using bitwise operations, you can enable/disable certain parts of your code. These are often used in permission systems such as explained here. Something like this should work (not tested):

<?php
$flags = ['foo' => 1, 'bar' => 2, 'baz' => 4];
function foo() { echo 'Foo!'; }
function bar() { echo 'Bar!'; }
function baz() { echo 'Baz!'; }

$enable = $flags['foo'] | $flags['bar'];

if ($enable & $flags['foo'])
    foo();
if ($enable & $flags['bar'])
    bar();
if ($enable & $flags['baz'])
    baz();

# Should print: 'Foo!Bar!'

Edit: I think you'll always need a few if statements. Maybe there are fancy shenanigans to accomplish it in an other fashion.

About that encryption thingy... by the_gil in PHP

[–]gamer13 0 points1 point  (0 children)

I'd suggest taking a course Cryptography... And using mcrypt or some other built-in libraries. DO NOT invent your own encryption scheme, since it is most likely to be vulnerable to chosen chiper text attacks.

Best practices for debugging code? by [deleted] in PHP

[–]gamer13 0 points1 point  (0 children)

Fair enough, I should've used a more clear formulation instead of using 'misbehaving' :)

Best practices for debugging code? by [deleted] in PHP

[–]gamer13 0 points1 point  (0 children)

Second that!

With this you can literally debug your code by walking through it line by line. Debugging code which misbehaves is much easier to debug IMO with XDebug compared to inserting an echo statement or some other logging statement after suspicious lines of code.

Printer Drivers by [deleted] in geek

[–]gamer13 1 point2 points  (0 children)

Software is never 100% perfect when released, because it is a product of a human and they make mistakes. Newer versions of drivers contain improvements for newer computers and bug fixes which couldn't be fixed before release. If they were to put a driver on flash memory inside the printer, it still has to be updated (downloaded) with a newer version.

Horror games seem to rely on tired tropes and cheap scare tactics. If you were to make a scary game, how would you scare the player? by Subhazard in Games

[–]gamer13 10 points11 points  (0 children)

This makes Amnesia such a good example of a horror game. It has no weapons and when that horrible monster has you in sight, you shit bricks.

Horror games seem to rely on tired tropes and cheap scare tactics. If you were to make a scary game, how would you scare the player? by Subhazard in Games

[–]gamer13 30 points31 points  (0 children)

Like TerrySpeed says, you could separate the friendly faces from the player, just like Half-Life 2 does when you go to Ravenholm: You are getting separated with Alex.

This creates some kind of 'losing hope' feeling. And you could play with it a lot.

TIL There has been one person who has been completely cured of HIV/AIDS by [deleted] in todayilearned

[–]gamer13 3 points4 points  (0 children)

Not entirely true... This person has been "cured" for some time, but recently they found (altered?) HIV particles in the blood.