« first day (443 days earlier)      last day (3873 days later) » 

21:04
0
Q: Angular directive for unique username

dan colemanI looked at a bunch of angularjs directives checking for uniqueness of a username and decided to try for the simplest implementation. It does what I want but may not really be 'idiomatic' angular. Here is the form element: <input type="text" name="username" ng-model="form.username" u...

Hey @rolfl that answer that @Jamal undeleted and then let the community delete earlier, gave me a +1 and I don't think there was a corresponding -1 I don't know how a Mod would check this, but thought it should be something I bring up
Want me to take the +1 away again?
;-)
lol
I want to get my rep the right way
@Malachi That post wasn't properly flagged as offensive (only four flags), so I undeleted it so that I could properly flag it.
@Jamal I know why you did it and what you did, but I think it gave me an extra +1
I got a +1 when it was deleted again, but there wasn't a -1 when it was undeleted
21:08
It also barf'd @Simon's rep: codereview.stackexchange.com/users/31562/…
His numbers do not add up ... ;-)
off-by-one
0
A: Multiple dependent subqueries

PhrancisFormatting First, the way you wrote this makes it difficult to understand what you are trying to do. Here are a few points to improve it: Use indentation and line breaks that illustrates your nesting. I provided an example below. Use all caps for keywords (or all lover case, just be consistent...

^^ any comments?
Yeah, there's a way to do it with just a single join, and no subqueries, but I don't understand how the round() works, and mysql's use of group by is atrocious
@Malachi I guess there's a solution to that: from now on, don't bother downvoting spam/offensive answers since they will be deleted anyway.
@Jamal lol
^^^ What Jamal says
21:11
@rolfl Not the first time I get an off-by-one error :)
@rolfl MySQL is Atrocious
^^^ that too
MySQL is bad enough but something like that it should be able to crunch it much faster still, me say
The procedure may make a small difference (a few seconds most - 1%).
Getting rid of 20 subselects, will make a huge difference. 95%
this 3rd party application does some weird crap
21:13
You think my temp table idea is good? It sounds like he may be operating on very large dataset so I thought breaking it out in a smaller set would help. Also, his styling is atrocious
@Phrancis - also, even with the subselects, there is no need for the group-by condition on the subselects
Right
when a item is deleted and another one added it sometimes keeps the node and nests the new one inside the deleted one. ugh it's so ugly and a PITA to fix for the website I maintain
codereview.stackexchange.com/a/57621/31503 <-- @Phrancis ... your where clause is incomplete .... WHERE ... OR supply ..... what?
@rolfl do let me know when you post your answer, curious to see how a veteran handles it :)
Oh, good catch, I fixed it
21:18
"lover case"???
I was going to wait for a response to the expected behaviour for the round() math function that is being treated as an aggregate.
Seems odd to ROUND() a quantity type of column where I would expect a whole number, but perhaps his are decimal quantities instead of whole units, and he just wants a close approximation rather than exact quantity
I'll say good night. Cya tomorrow I guess :)
@Phrancis But, if there are 5 supply records for one item id, with 'supply' values of 1, 2, 3, 4, 5 what will be the result of select round(supply) from supply where itemID = x group by itemID
@SimonAndréForsberg later
21:26
night @Simon
@rolfl you're right, that makes no sense. Maybe he meant to write ROUND(SUM(supply))
The fact that MySQL returns a result, instead of an error, concerns me ;-)
It appears to return the round of the last record found... ;0
21:42
It looks like it returns every value if you do it on a column, at which point it would only be useful if the original values were decimal.
SELECT ROUND(Bar), CAST(Bar AS DECIMAL(2,0)) FROM Foo;
^^ These two give me exactly the same result
40 more rep on SO, and I'll have 777. :D Time to make 20 more edits...
2
Go @Jamal, Go @Jamal
Ugh, out of stars ;)
Maybe someday I'll reach 1K... slowly but steadily...
22:00
It's 2K you want to get to ;)
groan
The only way to do that is to post more answers, but I don't think that will be happening.
TTQW
Bye y'all see you later tonight
stackoverflow.com/questions/1075652/… See the comment on this one.
BURN
22:07
Oh, 1 vote to rep-cap!
@Phrancis I'll have something for you later tonight :)
@Mat'sMug ORLY?
Thanks @Santa!
ORLY??
Nice answer;0
Huh .... I go away for a week, and no-one runs: one-vote-short
:) thanks!
AFK, back later!
22:20
Wow. I have 19 answers with 4 upvotes here.
5 answers here that are 2 votes short of 10.
22:32
0
Q: Transform Bitmap object into jagged array of RGB tuple values

Kort PlecoI've been working on this module with the assistance of codereview, and based on the responses and my own research, this is my project so far. The goal behind the code is that it starts with a .NET bitmap object, extracts the byte array of image data from the bitmap, then transforms it into a squ...

Hey, @JerryCoffin! I've decided to answer one SO question today, but I have a feeling I've missed something.
23:25
Could use some help on this question:
0
Q: Animate SVG electron around ring

syb0rgI have the following .svg graphic: I am trying to animate the electron so that it moves (proportionally with the page when it is scrolled) along the curvature of the ring up until a certain point (probably the same point the electron would be at if it was flipped over the imaginary x-axis of t...

23:36
2
Q: Iterable enum class in C++11

LibsterFor a small project I'm working on, I've been looking for an iterable enum-like class in C++, since neither C-style nor scoped enums seem to support iteration in a way that isn't hack-y. I stumbled across this (relatively) old article, from which I've drawn inspiration to create a robust Enum cla...

Hey guys I just my url shortener safe
gus.netii.net try it
9
Q: PHP URL Shortener

matheussilvapbI just developed a URL shortener. index.php: <? $sql_host = "..."; $sql_db = "..."; $sql_user = "..."; $sql_pass = "..."; $conn_error = "Could not connect to database"; $con = mysqli_connect($sql_host, $sql_user, $sql_pass, $sql_db) or die($conn_error); $hash = ht...

@matheussilvapb Nice!

« first day (443 days earlier)      last day (3873 days later) »