« first day (389 days earlier)      last day (3620 days later) » 

7:00 PM
just realized I'm getting really close to catching up with @SimonAndréForsberg
@SimonAndréForsberg if tomorrow is like today, I might steal your spot #7 in the user rankings :)
(at least for a couple of minutes)
oh look: codereview.stackexchange.com/… and codereview.stackexchange.com/… | I beat you for year & quarter :)
 
Then I realised I can also add an isDead() method
 
@200 has lost his 'accept' on the doorknob answer, and the accept has been given to a whipper-snapper answer from 4 hours ago:
 
@SimonAndréForsberg GWT you'll have to do in Java because it isn't real Java (it doesn't compile to JVM bytecode). Android you're probably fine on since it has a real JVM.
 
3
A: Why do door knobs still exist?

Phil PerryDoor knobs are standard in US homes for the same reason that exterior doors open inwards* -- it's "always been done that way". People grow up used to knobs, and specify knobs on new work, and thus this inferior mechanism is perpetuated. For some buildings (not private homes), some building codes ...

Now, it has a score of 3, but, if that whipper-snapper gets upvoted to 11 .......
I get populist ;-)
And, 200 too.
 
+1'd
 
7:08 PM
@SimonAndréForsberg Your 15 minutes was pretty accurate, we've got an interesting game going on here though:
private final PlayerConfiguration playerConfiguration = new PlayerConfigurationBuilder()
        .hitpoints(100)
        .turnAction(player -> player.decreaseHitpoints(10))
        .handCapacity(5)
        .fieldMonsterCapacity(5)
        .deckCards(Arrays.asList(new MonsterCard("Test", 5, 5, MonsterModus.HEALING)))
        .build();
 
0
Q: Pointers for struct in c++ and `for`

user2898122I'm learning c++. I know 'something' about pointer but I'm trying to check my knowledge on a sample. If somebody can check that my code is good. I don't think that I should use pointers in these structs. The second question is: Can I use for loop like this: for(DLList* i=first; i!=0; i=i->next) i...

 
@rolfl Well, I got 100 ;-)
 
@ChrisW has been gone a while
 
@Donald.McLean I'm not sure I would call Android's Dalvik VM a "real JVM", but I get the point :)
@rolfl Populist can only be awarded once per question
 
may I whore some votes while I'm rep-capped? codereview.stackexchange.com/a/31117/23788
 
7:12 PM
@SimonAndréForsberg Hmmm .... that would be ... sad.
The accepted answer is .... substandard though (compared to the other answers)... so we shall see.
 
@skiwi .turnAction(player -> player.decreaseHitpoints(10)) does that mean that the player loses 10 hitpoints each turn?
@BenVlodgi I agree. He has been gone a bit long now. I used to see him as my main reputation competitor a while, now I've won on walkover.
 
@SimonAndréForsberg Yes :)
That is "the game" they are playing right now
 
@skiwi What are the actions available each turn then? None?
 
(or not)
 
@SimonAndréForsberg perhaps he's on vacation.... I know I was gone 10 days a few weeks ago
 
7:15 PM
Just that action
 
0
Q: This login page is safe and it can be optimized?

Lukaz11<?php $page = 'Login'; session_start(); include 'header.php'; $user_error = ''; $pass_error = ''; $login_error = ''; if(isset($_SESSION['username'])){ header('location: control-painel.php'); } if(isset($_POST['login'])){ $username = $_POST['username']; $password = $_POST['password']; $cost = '1...

0
Q: (out of memory error) Get distinct Combinations of numbers using LINQ C#

SEDThe below code returns all distinct combinations based on the logic that 1,2,3 = 3,2,1 = 2,3,1, so it only returns 1 instance of that set of numbers. However, I want to change that logic so that it returns ALL instances of all number sets. What do I need to do to the LINQ query below "GetPowe...

 
I'm trying to figure out how to get full coverage on a while loop, shouldn't be too hard but for some reason I only get one branch covered
Nevermind, 1 missed* out of 4
 
@BenVlodgi He was last seen 5 days ago on CR.
 
he's dead
 
@SimonAndréForsberg I think you should tell this guy how you **really** feel about concatenating SQL into PHP script lol.
http://codereview.stackexchange.com/questions/51421/how-is-my-injection-protection/51447#51447
 
7:16 PM
@CaptainObvious read carefully before casting a close vote
 
@skiwi I think the final branch is when the while-loop is never true even the first time it is checked.
@BenVlodgi Let's hope not...
2
 
@SimonAndréForsberg indeed
 
I'll write him a nice little PROCEDURE here in a bit.
 
is @CaptainObvious a bot?
 
@BenVlodgi sort of not even. it's just the user under which the RSS feeds get posted
 
7:18 PM
@SimonAndréForsberg I doubt that... I did get an email, presumably from Travis, that's a bad sign
Broken: skiwi2/TCG#38 (master - 9773dba)‏
 
@Phrancis Haven't I already done that?
 
@Mat'sMug, soooo bassically
 
Is that the same dude as the other one??
 
a chat bot... notification system
 
nah, a chat bot is funnier than that
 
7:19 PM
Ugh, I shouldn't have uploaded the files without GameTest
 

 BlueCheese Monster's Home

place for Debugging Cheese Monster
 
Are there any chat bots in here?
 
@SimonAndréForsberg it was a different poster (DeviantDamien)
 
@BenVlodgi having a conversation with one right now ;)
 
@Mat'sMug how did you know!
 
7:27 PM
Answer removed. I'm not sure why I even posted it. :-P Welp, back to thinking about Deus Ex.
 
0
Q: Refactor .each where each is redirected into a hash

notaceoWhat would be the best way to refactor this : @busy.each do |b| title = b.title @events << { :id => b.id, :title => title, :start => b.busy_start_time(b.start_date,b.start_time), :end => b.busy_end_time(b.end_date,b.end_time), :allDay => false...

 
Fixed: skiwi2/TCG#39 (master - c419448)‏
 
7:42 PM
@Phrancis You linked to this question: codereview.stackexchange.com/questions/51421/… and I have posted an answer to that question already
@Jamal s/Deus Ex/Java/
 
0
Q: memory leak? -arm7 core

user43313I'm programming ARM Cortex-M3 microcontroller. I try to implement message que. Messages are added into que inside interrupt handler (add_to_que), then processed inside main(). Unfortunatelly after some cycles of write/process malloc don't want to allocate memory, even que is empty. Does somebody ...

 
@CaptainObvious ?
 
@SimonAndréForsberg Hm... why don't I try to program a Deus Ex game in Java? :P
 
@Mat'sMug I think
 
@SimonAndréForsberg My bad. Try this one lol. codereview.stackexchange.com/questions/51930/…
 
7:45 PM
What do you guys think about this... Feels offtopic
3
Q: Get distinct combinations of numbers

SEDThe below code returns all distinct combinations based on the logic that 1,2,3 = 3,2,1 = 2,3,1, so it only returns 1 instance of that set of numbers. However, I want to change that logic so that it returns ALL instances of all number sets. What do I need to do to the LINQ query below "GetPowe...

 
@Phrancis Perhaps I should just copy this old answer
 
@BenVlodgi - That is belongs on SO, IMO.
He's asking CR to write/modify code for him that does something different, that's not what CR is for is it?
 
@BenVlodgi This works as I want it to, returning the result set I want. But it is slow and has performance issues. I'm also open to suggestions on how to make it better. -- sounds like CR to me
 
btw @SimonAndréForsberg, this was the changeset to add hitpoints: github.com/skiwi2/TCG/commit/…
 
@SimonAndréForsberg However, he goes on to say: The ANSWER I am looking for is: how to achieve this result set I want , but using LINQ and C# to do it, in a way that is faster and more efficient than the current "foreach" way I have posted?. This part seems better for SO.
 
7:48 PM
@SimonAndréForsberg Yes, it's C.
 
@skiwi a) final String name, final int hitpoints, final TurnAction turnAction, final Hand hand, final Field field, final Deck deck, final Graveyard graveyard b) increaseHitpoints vs. decreaseHitpoints
 
it is flippy floppy, I can see some room for review
he is open to review, but the primary reason for his posting seems to be to get a new implementation with linq
 
@BenVlodgi definitely
 
@SimonAndréForsberg What is the a) and b)?
 
@DarinDouglass I think if we post it over to SO they might just send it right back here. Perhaps it would fit better on SO but I don't consider it off-topic on CR.
 
7:50 PM
@SimonAndréForsberg good point
 
@skiwi a) code-smell: Too many parameters. b) Code duplication
 
@SimonAndréForsberg I disagree (as usual). For first case a PlayerConfiguration is offered, in second case you would have a modifyHitpoints that has some kind of delta, which I think is quite dirty
 
@skiwi I would use just modifyHitpoints, do the bounding check inside it to make sure it doesn't go below zero. (Although, what's wrong with having negative hitpoints? The game's over when a player has <= 0 anyway, right?)
 
Well... most games are
But consider this, in case of MonsterCard which also uses hitpoints similarly
target.decreaseHitpoints(this.getAttack());
Wouldn't
target.modifyHitpoints(-this.getAttack());
be a code smell?
 
@rolfl I wonder how that would look if it were adjusted for commonality of the tag... like percent of zombies in that tag instead of total
 
7:56 PM
@skiwi I don't think of that modifyHitpoints as a code smell. What smell would that be? It is specified that the hitpoints is going to be modified, it's specified that it's negative, and it specifies that it's changed by this.getAttack()
This code will not work in it's current form. For example, where is MAX_MSG_SIZE defined? You should include all of the necessary code in order for this to work. — syb0rg 4 mins ago
 
-2
Q: Pdf highlight is not working on web browser using dtSearch

VijayI have created an application in c# with mvc2 which performs the search in pdf files and then open that file it highlights the e searched text. For this Here I am using dtSearch for indexing and for highlighting as well. I am using 7.72 version of dtSearch with adobe readerXI and I have followed ...

 
gah, shouldn't have posted that last answer.
 
There is no actual requirement that ALL the code has to be included, is there? (Although it would help, this doesn't make it off-topic IMO)
 
And this is why you should never have all your code behind a link.
 
7:57 PM
@SimonAndréForsberg The minus can easily be missed in my opinion
 
@SimonAndréForsberg so true ;)
 
@skiwi Then consider having a decreaseHitpoints method that calls the increaseHitpoints/modifyHitpoints method with a negative number.
 
@SimonAndréForsberg Then the invariants would fail, and if code were to be unduplicated in a private modifyHitpoints, then there's still the invariant maintainance ;)
 
@SimonAndréForsberg Do you have an example of what you dub 'prepared statement' in regards to PHP/SQL? I'm thinking you're refering something like using CALL sp_someprocedure within PHP, is that correct?
 
@skiwi I strongly suggest you change your isDead method to also make a player dead when he has negative hitpoints, even though you cannot have negative hitpoints right now, you never know when someone (either another programmer or yourself) might want to change that
 
8:01 PM
@SimonAndréForsberg There's no such thing as dead cards/players in my implementation (so far) though... So that would be not trivial to change
 
@Phrancis I don't know what's going on behind the scenes, but here's what the PHP documentation say: php.net/manual/en/mysqli.quickstart.prepared-statements.php . To me, it is not the same thing
 
Question = Edited. now is actually looking for a review, I also posted a comment informing the OP of the changes, and how to better use the site
4
Q: Get distinct combinations of numbers

SEDThe below code returns all distinct combinations based on the logic that 1,2,3 = 3,2,1 = 2,3,1, so it only returns 1 instance of that set of numbers. public void GetPowersets() { List<int> ints = new List<int>() { 1,2,2,3,3 }; var results = G...

 
@skiwi Would changing isDead from return (hitpoints == 0); to return hitpoints <= 0; be a non-trivial change? Seriously?
 
@SimonAndréForsberg Ah I thought you were talking about making a player dead...
 
@BenVlodgi technically turning a foreach loop into a LINQ query doesn't (shouldn't) change what the code does...
 
8:03 PM
Like adding extra variable, tracking, etc.
 
@skiwi I haven't seen any code for when you make a played dead, other than that method.
 
players should never have negative hitpoints, but you have a point there
 
@Mat'sMug those were his words... not mine
He said it like 3 times, I reduced it to once
 
@SimonAndréForsberg Actually an even stronger point is that isDead should be the negation of an isAlive method, which would be implemented as > 0
 
@skiwi If isDead should be the negation of isAlive (which I didn't see that you had), isDead should be defined as !isAlive() and nothing else.
 
8:09 PM
But there is no isAlive :) Purely theoretical
 
@skiwi cant. stop. watching.
 
@DaggNabbit Interesting thought. .... will play
 
Is there a SEDE query that shows how many questions here have never been edited?
 
@skiwi Do you really want such a query to fall into my hands?
 
@Jamal Well... It would be nice to see for one time only!
 
8:15 PM
I'll just ignore it myself, then. ;-)
 
@Mat'sMug I'm surprised that you didn't suggest this one, perhaps you haven't used yield enough?
0
A: Get distinct combinations of numbers

Simon André ForsbergI'm not sure how your algorithm works, but I can give you a couple of suggestions about modifications that you should to do. First of all, I think that you should have separate methods. One for returning all possible combinations of a fixed size and one for all possible combinations of all sizes...

^^ Answer #200
:15779410 No, that's why I'm suggesting that he should change to return IEnumerable instead. There's no way that code will work without OutOfMemoryError as long as he uses List
(removed) :)
 
IDK, I guess I was too focused on trying to figure out exactly what he's doing.. there's so much redundancy in there...
 
@SimonAndréForsberg how would you write the PHP prepared statement for example if the MySQL script was only: CALL sp_SomeProc('ABC') with ABC being the variable that PHP sends to the server?
 
should be tagged with
 
@Mat'sMug I have barely looked at his current algorithm, I just noticed that he's returning a list and all he's doing is iterating over it apparently, which makes a perfect use-case for yield
 
8:23 PM
@rolfl @Jamal @200 If I delete my answer and undelete it after midnight UTC, will I get the lost rep back? Or is that cheating?
 
@Phrancis Probably something like $stmt = $db->prepare("CALL sb_SomeProc(?)"); and then $stmt->setParam(1, $value); (don't remember exactly what the methods are called)
 
I feel like trying, just to document it :)
 
@Mat'sMug Remember that when you delete it, you will lost some rep and not be rep-capped anymore for the day
 
(but I won't, because it feels like cheating)
no, I was already capped when I got the non-[+20] from that answer
 
@Mat'sMug I believe rep is always recalculated after deletions and undeletions.
 
8:26 PM
@skiwi What is assertConstructed(); ?
 
so that would... work. is that gaming the system?
 
I'm not quite sure.
 
again, I won't.
 
@skiwi Nevermind. I see now. Although I don't see any reason for the status variable. game == null seems to be the same.
 
@SimonAndréForsberg True, it's for future extension
 
8:36 PM
couldn't help:
0
Q: Rep-Capped, Keeps Answering

retailcoderI hit the rep-cap today (+230, including 2 checkmarks, no bounties), and then I answered an interesting question that I couldn't help but answer anyway. As "lost rep" from the upvotes started accumulating, a thought occurred to me: If I delete this answer now, and un-delete it after midnight ...

 
@Mat'sMug It's an interesting abuse (if possible), yet not a real problematic one, as the worst you'll get is every day repcapped... And the rep still is not for free
 
@Mat'sMug I thought you didn't like A vs. B questions!
 
@sim lol
TTQW
later!
 
Interesting answer here
16
A: Does a Rep Cap discourage participation?

Jeff AtwoodSee Podcast #72 The daily reputation cap is partly there to encourage programmers to take a break. The goal isn’t to be on Stack Overflow, but to generally do things that make you a better programmer. While that certainly includes the fractional time slices of questions and answers that progr...

 
@Mat'sMug TS (I'm out)
 
8:40 PM
I'm reporting all of you for upvoting one of your friends! :P
 
Forward that TS, I'm also out for a few hours
 
@hichris123 Who invited you?!? >.<
 
@Jamal When I saw that meta post, and it had 4 upvotes already, I knew there was a voting ring. So then I realized that retailcoder == Mat's Mug... so... :P
 
Fucking Meta Effect...
 
heh
 
8:43 PM
@SimonAndréForsberg cool. I just thought of a way to build into a SQL proc a protection against injecting SQL operators from a PHP script.
SELECT * FROM MyTable WHERE MyColumn = 'ABC' AND MyColumn NOT IN ('%=%', '%<%', '%>%');
 
@Jon I don't think you can use your experience as a guide. I'm sad to say that a link only answer from you would get 10 upvotes before a fully rounded answer from someone like me got one. On Stack Overflow your name is enough for people to click on that up arrow. — ChrisF Jun 14 '12 at 19:32
 
@hichris123 I have no idea what you're talking about.
 
Oh, really? :P
 
@Phrancis I'm not sure what that is doing / supposed to be doing...?
btw @Phrancis, I answered that question you pointed me to:
0
A: Search script code efficiency

Simon André ForsbergEfficiency Nothing to worry about. It's only a linear script, there are no loops anywhere. You don't need to worry about efficiency. Security and best-practices horrible practices I should really have you write down this sentence 100 times on a piece of paper: DO NOT USE THE MYSQL_* FUNCTIONS...

I'm impressed at the new ways I can come up with to write the same thing over and over again.
 
TTGTB
 
8:55 PM
Do not use `using namespace std`.
Stop using `using namespace std`.
I f&%$ dare you to use `using namespace std` one more time.
 
@Jamal TS :)
 
mysqli?
 
@SimonAndréForsberg that would prevent SQL operators such as = , <, > or ; from being used as input value (it would return 0 rows)
 
why not pdo
 
@DaggNabbit I guess it's easier for mysql_* users to get the hang of mysqli, but absolutely, PDO is also a valid choice. I'll add that
 
8:57 PM
idk if mysqli does parameterized queries
 
@DaggNabbit It does. I've used them.
@Phrancis I don't think that's a good way to protect against SQL injection. Besides, if you would be able to break the SQL statement and perform another one, it doesn't matter how many rows gets returned or not.
 
@SimonAndréForsberg I certainly wouldn't use that as the only protection, I'm not sure if PHP has something simpler built in to prevent operators to be passed to SQL
I'm sure you could code a front end error to be raised if these characters were used right into PHP though.
 
@Phrancis Prepared statements / Parametrized SQL.
 
OK cool. I'll jump on there shortly and write him a proc to optimize his SQL and remove his query from prying eyes in the PHP script.
 
... where is the SQL injection in that post? Yes, it's bad form (very bad form) to treat an integer as a string, but strictly speaking there's no SQL injection as far as I can see.
 
9:07 PM
@Corbin For me, everything that's not parametrized SQL is vulnerable to SQL injection.
I trust prepared statements 1000 times more than mysql_real_escape_string
 
That's technically wrong.... but probably a well founded belief anyway. (Especially considering the theoretical implications of a charset mismatch between the server and client)
I just think it's a little premature to jump down the guy's throat for SQL injection when there's not any SQL injection. Just a proneness to SQL injection.
 
@SimonAndréForsberg ^^^^ that's true for any language (not just PHP), but, also remember, that SQLInjection could be 'secondary' ... as in you can make the store of the value safe using parameterization, but, then, what if that value is then concatenated in some other system that assumes values already-stored are safe.
 
Plus I think it's bad practice period to script autocommit SQL into anything other than SQL client, stored procedures are the way to go as far as SQL is concerned IMO.
 
@Corbin Technically I don't say that the code is vulnerable to SQL Injection per se.
 
Especially anything that is directly exposed to end-users such as JS, PHP, etc.
 
9:11 PM
Well, you don't but between your post and Phrancis' comment, it's pretty heavily implied.
 
@Corbin Honestly, I'm not sure the OP is aware about what SQL Injection is either... But it doesn't matter IMO. mysql_* is wrong, and I see absolutely no reason whatsoever to not use prepared statements.
 
@skiwi concerning that modify hitpoints thing. How about public boolean modifyHitpoints(int value, ModType type) with ModType as enum {DAMAGE, HEAL}??
 
@DaggNabbit Play with this 'normalized' query: data.stackexchange.com/codereview/query/197582/…
 
@Corbin I'm no security expert, perhaps mysql_real_escape_string is just as safe as Prepared Statements. I don't know. I prefer prepared statements either way.
 
mysql_real_escape_string isn't inherently insecure or broken. It's just harder to use correctly. Prepared statements are idiot proof; mysql_real_escape_string (or more specifically interpolation or concatenation based query building) is not.
So you're completely correct in terms of best practices (especially since mysql_* is being hard deprecated). I just have a pet peeve for people bashing the mysql_ extension as being insecure.
 
9:15 PM
@Corbin What's the hard part about using m_r_e_s method?
 
(Although what really triggered this wasn't your post, but that Phrancis' comment is incorrect -- there is not any SQL injection)
@SimonAndréForsberg what happens if you forget it?
What happens if character encodings mismatch? (Usually nothing... there's some very, very border cases though where it matters)
 
@Corbin KAPUTT!
 
Basically m_r_e_s is prone to human error
 
That's what I thought, then. That it's just about the matter of remembering to use it.
 
Yup. And that 95% of people don't understand what mysql_real_escape_string is really used for... Every time I see "SELECT * FROM blah WHERE id = " . mysql_real_escape_string($id) I die inside.
 
9:17 PM
0
Q: Small football table builder in Ruby

MohamadPlease review this small program I wrote to create a World Cup Group Table. You feed the program match info, and it builds a table based on that info. def table_for(matches) # Defaults that each team in the table should have defaults = { goals_for: 0, points: 0 } # Using the match...

0
Q: Truncate those Decimal Places

ScottIn one finance application I'm working on the requirements call that I truncate a decimal value at certain number of places and not round. example: 11.685 truncated to 2 decimal places should be 11.68 I wrote this extension method, but was wondering if someone knew of an easier way. public st...

 
@SimonAndréForsberg LOL
 
@Donald.McLean You really haven't seen that one before?
@Corbin Hmm... what exactly is wrong with "SELECT * FROM blah WHERE id = " . mysql_real_escape_string($id) ?
@Corbin By the way, I find mres a horribly long function name to write (which is why I'm just writing mres right now)
 
WTF?
 
Imagine if you pass it O'Reilly for some weird reason. You get: SELECT * FROM blah WHERE id = O\'Reilly. You get a syntax error instead of foiled SQL injection. mysql_real_escape_string operates on strings and only strings. It takes in a string and returns a string. It was never meant to be used with integers. If you consider its roots in a strict typing environment (where an int can't just magically become a char*) this makes sense.
In short, m_r_e_s is for strings and strings only. If you're using it, there better well be quotes around it ("SELECT ... WHERE ... = '" . m_r_e_s() . "'"). Integers and other numbers should be put into the query un-quoted, otherwise MySQL just converts them anyway and there's rare situations where that can actually matter.
 
0
Q: I have a recursive element in my code and when I try to use the recursive function it errors

zoyafrom gurobipy import* m=Model("cons_test") # My data defined as a multidict combo, oi = multidict({ (1,1,6,1,1,1): 100, (1,1,6,1,1,2):200, (1,1,6,1,1,3):200, (1,1,6,1,2,1):50, (1,1,6,1,2,2):70, (1,1,6,1,2,3):70, (1,1,20,1,1,1):400, (1,1,20,1,1,2):450, (1,2,6,1,1,1): 100, (1,2...

 
9:24 PM
@corbin You may be correct, I'm not PHP expert, I'll delete my comment thanks for pointing it out
 
(This of course means you need to validate non-strings [i.e. ctype_digit or something] before blindly chucking them in the query)
 
@SimonAndréForsberg No, I haven't. There are lots of things I haven't seen yet.
 
@Phrancis in all honesty, it might be good to scare him. mysql_* has been shit for years (since it's creation as a PHP extension -- get that C crap out of PHP), but it's only recently with the whole "mysql_ is insecure!" panic that people have started to care... :/ lol
 
So @Corbin if I understand, mysql_real_escape_string would prevent operators or characters that would otherwise cause a SQL syntax error from being passed to SQL?
 
Maybe just a rewording could be the best of both worlds: "While your code is technically secure, mysql_real_escape_string is incredibly prone to human error. Prepared statements provide both a better, more natural interface and they are very hard to misuse." or some crap
 
9:27 PM
@Corbin Then you really need to be sure that a variable is a string and nothing but a string, and given that PHP is a dynamically typed language, I find that assertion is often very hard.
 
@Phrancis no. It simply escapes characters that would cause interference with a string. It's essentially a glorified str_replace("'", "\\'", $str).
 
@Donald.McLean Apparently there are things I also haven't seen, this was the first time I noticed the "title"-attribute of it: Her daughter is named Help I'm trapped in a driver's license factory.
 
Gotcha
 
@SimonAndréForsberg I have seen very little Grumpy Cat, for example. My life is infinitely richer for that.
 
(Bonus fact: it does nothing to escape %, ? and family. So "SELECT * FROM users WHERE name LIKE '" . mysql_real_escape_string($query) . "%' is prone to a fun little form of DOS attack where you can just use % for the param and have it do a full table scan. This is also an issue with prepared statements though :/)
 
9:31 PM
@Donald.McLean "Grumpy Cat"? Judging by the name, sounds like I haven't missed much there.
 
Is that why so many database systems run on linux(well apart from performance of OS that is...)??
 
@SimonAndréForsberg No you haven't. And also shipping, such as Dramione.
 
@Vogel612 is what the reason?
 
DOS attack only work on Windows or am I talkin BSright now?
 
@Vogel612 DOS attack can work everywhere. Although Windows might be a bit more vulnerable to it
 
9:34 PM
@Vogel612 ah, the situation I was talking about is MySQL specific, not Windows, linux, etc specific.
 
I remember the "good old days" when you could flood-ping a Windows machine in a LAN. It made it lag like crazy. Don't remember the Linux-command exactly though.
 
Potential clarification: DOS as in denial of service, not disk operating system
 
Ohhhh that explains..
Well either way TTG2B...
Oh before I go..
Someone plese remind @BenVlodgi to give a bit more context on stuff like Do it!
 
@BenVlodgi, @Vogel612 says that you should give a bit more context on stuff like Do it!
@Vogel612 Done! Anything else?
 
@Corbin With % being a reserved character in SQL I wonder how this could be built into a SQL script.... WHERE MyValue = '%' would indeed do a full table scan but I don't think <> '%' would even prevent this if it were built in
 
9:40 PM
No, WHERE MyValue = '%' wouldn't cause a scan. It's the LIKE condition that causes it.
You just have to be careful when building LIKE queries to properly escape % and whatnot your use :/
 
@rolfl interesting, someone killed a lot of js zombies
 
Yes, they did, and that would be konijn.
he killed ..... a lot.
Check out his badges (revival and necromancer
 
lol wth is ABAP
 
It's the language used to build SAP applications....
There was a time where ABAP programmers were literally worth their weight in gold.
(kidding).... but they...
 
wow never heard of it
 
9:45 PM
were the most in-demand people and highly paid consultants
 
oh it's one of those kind of acronyms
got you
i thought it was like a platform or a language or something
 
ABAP (Advanced Business Application Programming, originally Allgemeiner Berichts-Aufbereitungs-Prozessor, German for "general report creation processor") is a high-level programming language created by the German software company SAP. It is currently positioned, alongside the more recently introduced Java, as the language for programming the SAP Application Server, part of its NetWeaver platform for building business applications. The syntax of ABAP is somewhat similar to COBOL. Introduction ABAP is one of the many application-specific fourth-generation languages (4GLs) first developed...
 
oh ok i thought it was a title for a second e.e
 
abap actually doesn't look that bad
not as bad as cobol
wow wtf
 
9:51 PM
Now you wonder why @konijn is messing with JavaScript ;-)
 
js is just fun to mess with
 
There are other languages that few people know of, that get high $$$ incomes.... siebel comes to mind.
 
news.ycombinator.com/item?id=7812133 well that's pretty weird
 
proprietary stuff
 
more attention here? no accepted answer yet.
11
Q: Simplifying a repetitive event handler

Jrags87Is there a more efficient way of writing this? It seems like so much redundancy that this can be greatly reduced. Basically the only difference is if isNodeWebkit is true then run a function using key code 113 or 112 if (isNodeWebkit) { $(document).keyup(function (e) { if...

 
9:55 PM
@Malachi We can't do anything about lack of accepted answers. I find that the highest-voted answer should be accepted. If that doesn't happen? There's nothing I can do.
 
but you can do something, you can vote!
 
Thanks for the god answer. Yeah I'm sorry for the unit-test tag, it should not really have been there as it is more of a integration test. — user1776562 27 secs ago
Now that's acceptable appreciation
 
LOL
 
@SimonAndréForsberg I am trying to get Generalist Badge
 
10:01 PM
@Malachi Sooner or later, you will.
 
I need to learn Linq
 
INSERT INTO Time(Now) VALUES ('TTQW');
Bye guys TTYL tonight
 
@rolfl This is even more fun : indeed.com/salary?q1=SAP+ABAP+Developer&l1=NYC
 
1
A: Search script code efficiency

Simon André ForsbergEfficiency Nothing to worry about. It's only a linear script, there are no loops anywhere. You don't need to worry about efficiency. Security and best-practices horrible practices I should really have you write down this sentence 100 times on a piece of paper: DO NOT USE THE MYSQL_* FUNCTIONS...

@Phrancis UPDATE Time SET Now = 'TTGTB';
possibly should have added WHERE timezone >= 'GMT+01'
 
10:14 PM
@konijn: Did you momentarily create ? ;-) codereview.stackexchange.com/questions/51902/…
 
I did ;)
I could not help myself
 
@konijn but then you factor in cost of living and realize that 147k in NYC is probably less than 107 anywhere else :D
 
lol
3
 
@Corbin True, but, living in NYC : priceless
 
NYC has a cost of living 32% higher than the national average. Like.... wtf?!
 
10:16 PM
yeah, NYC is crazy, especially if you are yourself crazy and have 4 kids
but I love NYC, so I dont care
 
It would be amazing to live in NYC. I don't know if I could do it though. I live in Kansas City and hate the "big" city aspects of it sometimes. And Kansas City compared to NYC makes KC look tiny :/ lol
 
10:44 PM
;) Subways are crazy full, the city smells in the summer, it's expensive, other than that all is well
 
And, you still work at the UN?
So you have to deal with the occasional threats ... ;p
 
"the city smells in the summer" -- well that's disturbing. I guess that's bound to happen though when you cram 20 million people and their trash into a tiny area though lol
 
Actually, Friday is my last day
Going back to private
 
11:04 PM
Good luck with that.
 
11:58 PM
@Vogel612 follow the reply link :P
@SimonAndréForsberg ;) noted
 

« first day (389 days earlier)      last day (3620 days later) »