« first day (765 days earlier)      last day (3258 days later) » 

8:03 PM
anyway I'm tired
catch you guys later
 
@rolfl I was thinking for some reason that the four spaces wouldn't show up as those tags. but that is just markup that is rendered as HTML... and then there is the SEDE Lag
 
1
Q: CodeLess Questions

rolflAs part of an exercise by Jamal to clean up old questions on Code Review that have no code in them, I helped by writing this query on Stack Exchange Data Explorer: CodeLess Questions select Id as [Post Link], CreationDate from Posts where PostTypeId = 1 --questions and Body not like '%</code><...

 
Would this do better on codereview? It seems like it would fit that stack exchange's style better. — Numeri 12 secs ago
 
@Numeri, yes I think this would be better suited on codereview.stackexchange.comshuttle87 55 secs ago
 
8:16 PM
@rolfl it seems like your query is faster. the fastest times that I have been getting with my where statement is 68 ms and yours is 61 ms
 
Are the results the same though (same outputs?)
I suspect they are...
but, sometimes Text columns can do funny things.
 
identical
 
hmmm... it's an nvarchar(max), not a text column.
good.
I prefer the charindex.
nice.
 
it looks much cleaner to me
 
This is why premature optimization is evil.
@SimonAndréForsberg +1 fair enoughalex 28 mins ago
5
Q: iterate trough all permutations of two variables

Anton HaraldI need to call the following function cross 4 times, for all permutations of the x and y variable with the values 1 and -1; my approach: var p = [-1, 1]; p.forEach(function(x) { p.forEach(function(y) { cross(x, y); }); }); Is there a shorter way of doing this?

 
8:29 PM
0
Q: Which of these methods is better to parse JSON data in Swift

ManicMonkOnMacWe're doing a project in Swift and JSON parsing is a hotly debated topic. My usual way of parsing is using the if let condition. One of my team members came up with this method parsing json using switch(key,value) class LineItem: NSObject { var id:NSNumber? var variantId:NSNumber? var lineItem...

 
@RubberDuck They create bad recommendations to post on Code Review?
 
@rolfl there is also a CONTAINS in T-SQL but it can't be used on the Body column because it is not full-text indexed
 
@SimonAndréForsberg Well, that too. But I was looking at all the "Let's obfuscate this code in the name of speed answers.*
 
I'm voting to close this question as off-topic because it belongs on Code Review. (no automatic migration) — Captain Giraffe 37 secs ago
 
and is it readable? — Simon André Forsberg 43 mins ago
you mean like that? ^^
 
8:32 PM
Exactly like that.
 
8:47 PM
 
@zengr Only if it's actually working. — RealSkeptic 1 min ago
nice, it's having an effect
 
I'm close/down voting this:
-1
Q: Which of these methods is Faster to parse JSON data in Swift

ManicMonkOnMacWe're doing a project in Swift and JSON parsing is a hotly debated topic. My usual way of parsing is using the if let condition. One of my team members came up with this method parsing json using switch(key,value) class LineItem: NSObject { var id:NSNumber? var variantId:NSNumber? var lineItem...

 
pimping because almost 146
 
@nhgrif Wouldn't this be off-topic for not being the OP's own code? "One of my team members came up with this method parsing json using switch(key,value)".
 
It's off-topic for not even seeking a review.
Code Review is not a horse race track.
 
8:58 PM
@SirPython Own or maintain.... that's the criteria. in this case, maintain is close enough
I'm on the fence.
I agree it is not well worded... It would be better if there was no mention at all about the competing horse
I presume Swift has JSON parsing built in natively, though.... as a modern language it should
Thanks all ye ho ho ho santas @146 now ;-) 4 to go
 
There's a way to turn a data object into a dictionary object natively. He wants to then map the dictionary to his class/struct whatever it was.
 
I have voted to close because this is a poorly formed question. It asks for a "comparative review" (which is better), but then only posts the code for one option. Additionally, the specific question is about performance, and that's easy to measure empirically, so there's no need for a code review. — rolfl ♦ 11 secs ago
 
He posted both options.
 
Bargh, crap.
Now I see.
 
0
Q: A library that interpolates polynomial and find a polynomial roots

user153438I need to know what library, compatible with C++, can be used to interpolate a polynomial. So given n point-value pairs it can recover the polynomial. The library must support big integer (multi-precision) values as my polynomial is defined over a polynomial ring R[x] where R is a 1024 bit number...

0
Q: Simple recursive function to find missing number in a permutation

Jules RiesIt's short and simple Python. It expects a sorted permutation of integers n1..n2 in list format, with a single step missing (e.g., [10,11,13]). I know it does nothing to check errors. That's intentional; it expects a well-formed argument. Here's the code: from __future__ import division from ma...

 
9:08 PM
But the main point here... he's asking which is faster.
He can either find out on his own, or go ask on SO how to find out on his own.
 
I figure it is still unclear if I could not see the two alternatives ;-)
 
0
Q: Formatting dates in CSV when importing into MySQL database

Juan BattiniI'm developing an application manipulate a database used for storing Patient EEG records. The columns in the table are: EEGNo, SubjectLastName, EEGDate, DOB, Age, Sex, LevelOfConciousness, WaveType The two date variable are EEGDate and DOB, in the CSV file they are formatted month/day/year but...

 
9:32 PM
Monking, @QPaysTaxes.
 
0
Q: VBA Excel Vlook up

BLkrnWhat I am having trouble with is a twist to regular Vlookup vba code. Here, I have a table from G2:H9 in Sheet1. All of the cells listed in Column G2:G9 has tranposed values (Header) as the ones in the first row of Sheet3. When I run a macro, a value in H2, which corresponds to G2 will be copied ...

 
I'm here.
 
0
Q: Class to create complex object

myolI am learning OOP. Coming from a procedural background I can't help but feel everything should now be in a class / methods. Examples seem to define objects then write a few lines of 'procedural' code below it to actually manipulate the code. class ObjectExample { public function methodSetEx...

 
Make that three people.
Hello, @JulesRies.
 
Hello all °/
 
9:43 PM
Hello, @DJanssens.
 
hey
 
How are you all doing tonight/today? :)
 
great. rainy mondays are the best.
how are you, @DJanssens?
 
aw, we had some sun over here today.
I'm good. Reading some papers and watching this new serie on netflix :D
 
which series is that? did ya watch GoT last night?
 
9:47 PM
Nah, I hope to watch it later tonight when me gf is back home.
Already read some spoilers <,<
I'm currently watching Sense8
 
I'd never heard of it before, it actually looks kinda cool
 
@JulesRies I haven't watched this season at all yet. I'm waiting for it to be finished and then I will watch the entire season at once.
 
It's from the creators of the Matrix
haha @SimonAndréForsberg then you have to beware for spoilers at all times.
 
@DJanssens Haven't got any spoilers yet at least.
 
@nhgrif - I have reopened, edited, and decided it passes my give-te-benefit-of-the-doubt sniff-test.
 
9:52 PM
@SimonAndréForsberg, Do you by any chance know something about the SE db layout (SEDE)
 
-1
Q: Fast parse of JSON data in Swift

ManicMonkOnMacWe're doing a project in Swift and JSON parsing is a hotly debated topic. My usual way of parsing is using the if let condition. One of my team members came up with this method parsing JSON using switch(key,value) class LineItem: NSObject { var id:NSNumber? var variantId:NSNumber? var lineItem...

 
yeah @SimonAndréForsberg. that's more or less what I did for the first 4 seasons, though. i wasn't very productive those few weeks :P
 
Btw you guys watched the WWDC15?
 
not me
 
°/ @rolfl
 
9:53 PM
Hey ;-)
@DJanssens Worldwide Wrestling Dropzone Chinwag?
 
@DJanssens there's a Meta question on MSE that gives the full details... not sure where exactly. maybe @rolfl knows
 
@DJanssens There's "documentation":
138
Q: Database schema documentation for the public data dump and SEDE

Stu ThompsonStack Exchange releases "data dumps" of all its publicly available content roughly every three months via archive.org, and also makes that information queryable over the Internet at the Stack Exchange Data Explorer (SEDE). Over time, as new features and other bits of data are introduced to Stack ...

 
You are the man I need! I wasn't aware you were online. @rolfl do you by any chance recall which table contains the review votes of people? I read the documentation and PendingFlags seems to be it.
But a count of the table only returns 34k, which is incredibly low.
@rolfl the World Wide developer conference (apple keynote thing)
 
34K may not be that wrong
@DJanssens Really?
5 hours ago, by rolfl
Why Would Developers Care?
5 hours ago, by rolfl
When Wozniacs Date Computers?
 
hmm, then it really are only the 'pending' votes.
I was hoping to find also a list of all votes ever cast for closing questions.
because in the post history table you can find if something get's flagged
but once it's flagged it still needs 5 (probably 4 votes) iirc
 
10:00 PM
@DJanssens like that? ^^
 
6 - Close (since 2013-06-25 close votes are ONLY stored in the PostHistory table)
see VoteTypeId
 
I believe so. There should be a way to query that in SEDE, no? Like one can query up votes and down votes, even though they are stored anonymously
@Vogel612 does that mean that a closed question will have 5 close votes with votetypeid=6 ?
 
depends..
keep in mind mod votes are binding
 
they only need one vote.
 
for data before 2013 - 06 you can check the PostFeedback I think.
 
10:03 PM
As far as I know, there;'s no way to associate close votes to people unless the close is successful
you can see close votes in pendingflags.
 
for data after that it's definitely the PendingFlags
 
I see.
 
since PostFeedback is associated with a post, you could group closevotes by post
 
and, for post history type 10 (close) the Text column will contain the names of the close voters.
@DJanssens hmmm... That was meant to be for ^^^
> Text: A raw version of the new value for a given revision
If PostHistoryTypeId = 10, 11, 12, 13, 14, or 15 this column will contain a JSON encoded string with all users who have voted for the PostHistoryTypeId
I have to run
 
And (something less related) what about the PostLinks table, what does that contain? The documentation only states: linktypeid = 1. Linked 3. Duplicate
 
10:06 PM
linked as in: "the post body contains links to these other posts"
 
I read that 'linked' posts on SE are posts that contain the same url.
 
it shows up in the sidebar
 
But again the amount of rows seems so low for that to be true.
 
166
Q: Why we're not customer support for [your favorite company]

Robert HarveyWhy can't I ask customer service-related questions here, like: How do I get my Facebook developer account confirmation code? Will Apple approve my app, and under what conditions? Where can I download the developer kit? Can I ask questions about using their API? How is that different? Return...

^^ see that for example.
it might not contain data since the beginning of "time"
 
I take that back. seems the amount of rows is high :D
2.2 mil linked entries. I thought it were only 100-200k. Ok that clears some things :à
 
10:08 PM
for just SO?
That's less than I expected...
 
2.2mil
 
then again deleted questions aren't in the dump...
 
Yeah, tbh I also expected more, since questions often have a list of 5+ linked questions suggested
 
9 mil questions
consider the excessive backlinking throughout SO ...
 
I have one more question, perhaps you can help me out on that one aswel @Vogel612
:)
 
10:10 PM
perhaps...
 
select count(*) from postlinks where linktypeid=3 returns 237622 rows of duplicates
 
but it doesn't match up with the posts closed as dupes?
 
while if you use post history and look for duplicates there by checking the type being 101 or 10 (I don't remember the correct types) it returns like 170k rows of questions with duplicates
Indeed
My guess is that the post links table also contains links for deleted questions
 
questions closed as duplicates are still subject to roomba
yes, I'd guess that, too
 
roomba?
 
10:12 PM
cleanup script
 
haha, did they call the script the same as the vacuum cleaning robot? :D
 
93
Q: How can we stop premature deletion?

Shog9 Update: discussion on specific changes to how deletion works is here: Turbocharging the Roomba: solutions for premature deletion This needs to stop: http://stackoverflow.com/posts/15348333/revisions It doesn't help to improve close descriptions or encourage fixing and reopening if clos...

yes kinda..
 
thanks for the info @Vogel612 :)
 
I think the links aren't deleted because it would be too much of a hassle..
and also because the deleted questions aren't deleted from the DB anyways, so FK relations remain intact
even deleted dupes can serve as signpost for anonymous users
 
hmm
deleted questions, seem detailed from the database to me. At least in SEDE
 
10:17 PM
since they do a 302 HTTP Status code to the dupe-target for anon-users
detailed?
 
If I do a right join on posts and postlinks, there are like 50k that don't have a matching post anymore
 
on SO?
that can't be....
which postlinks column did you join?
if you just used the target column, I'd understand... but.. the PostId column should show a larger discrepancy..
then again... not that many dupes are actually deleted... they just vanish from the frontpage, often with an answer and some upvotes
 
that's bananas
 
my query seems bad indeed, sec
select * from posts p right join postlinks pl on p.id=pl.postid where p.id is null is the correct one
50k+ have no question linked to it.
So I guess those are removed from the database
 
10:28 PM
wut??..
 
spikes :p
 
58692
dupe-linked only..
320907 ...
@DJanssens just from the dump..
because the sede data doesn't include deleted posts, but the prod db does.
 
seems logical :) It was just confusing.
wait what are those numbers? :D
 
a count over pl.Id
hmm... that doesn't seem right..
hmm... wat
changing that join from right to left drops the count to 0..
too tired to think...
 
10:43 PM
nvm :) Thanks anyway
 
select distinct Count(pl.postid) from posts p
    right join postlinks pl on p.id=pl.postid
    where p.id is null
soo... I hope this works the way my tired brain thinks it does..
 
0
Q: Persist values for a known set of keys in Python

kuzzoorooUse case: I sometimes write programs that want to store a little state between runs, e.g., "What was the last file selected last time this program ran?" I wanted a convenient way to track this state. Python's built-in shelve module is pretty good but I wanted a way to restrict the possible set of...

 
You are from germany it seems. So also around 1 am at your place. Sleepy time!
 
yes, definitely
g'night
 
11:22 PM
Morning all
 
Monking @Mehrad
 
Morning, @Mehrad.
Ever use a searchbox in WPF?
AFAICS, I can't bind the commands to the VM.
It appears I have to go into the code-behind.
My view doesn't know about my VM, but my VM knows about my view.
 
Hey @Hosch250 - we keep passing like ships in the night ....
Monking!
 
Hi.
 
@Hosch250 Like search functionality ? Cuz if there is a component called search box I am not aware of it
 
11:25 PM
Not been ere a whole lot.
@Mehrad Yeah, there is a component called searchbox.
At least, in Windows Store apps there is.
 
thought you said WPF
 
It's the traditional search box with a text box and a search button.
WPF is a superset.
 
0
Q: How do i use dataprovider with apache poi

Alexy DesouzaPlease help!. Am newbie with Selenium frameworks, I have a method that accepts 5 parameters for booking a party; it uses dataprovider to read from excel file. The problem is(as shown below) it uses JXL imports which only supports XLS files (excel 2003 or older). I need help with a similar code th...

 
@DJanssens Or votes for duplicates that were never "confirmed" by majority
 
11:28 PM
Yeah, it appears WPF doesn't have it.
@mjolka Thank you so much.
 
np :)
 
@rolfl which ones u are talking about?
 
1 hour ago, by DJanssens
My guess is that the post links table also contains links for deleted questions
People can vote to close as dup, but that does not mean it is actually closed as dup
 
hmm
 
The link will be recorded even if the post is not closed
 
11:30 PM
I agree
so a link si made on the moment it's flagged as s-duplicated?
 
yup. I believe so
 
that explains :)
 
> Possible duplicate of: .....
My daughter is 12 today... somewhat distracted.
What's scary, is that people a year older than her have been mods.....
3
 
It works! Thanks again, @mjolka
 
glad i could help :)
@rolfl so what you're saying is, she only has 12 months to become stack exchange's youngest mod?
you need a training montage
 
11:36 PM
Well, technically she can only sign up for an account when she's 13, and then she'd have to earn respect.... somewhere but, yeah
 
@rolfl Ethan is only 14 :P (Young people everywhere :P)
 
0
Q: Constructor that splits a text into lines to match a specific width of the whole text

MalaxizThis is C++/SFML CChatBubble::CChatBubble(std::string text, CEntity* target, std::string fontKey, int type) : _target(target), _type(type), CGuiText(0, 0, text, fontKey), _r(0), _g(0), _b(0), _rB(220), _gB(220), _bB(220) { int textSize = 20; int letterPerSecond = 5; bool instantText...

 
I wonder if the OP even knows what this code does. Maybe it has something to do with walking into exploding bear traps.
 
"I don't think it's necessary to describe what the program really does, because it works fine, although there are some special occasions that can result in a crash." wat
that's like... I don't think it's necessary to introduce myself, because I eat my vegetables, although there are some special occasions where I don't eat my vegetables and I die.
4
 
"It works perfectly but it has some problems"
 
11:45 PM
@Jamal
 
Hello, I'm back.
@Quill TS
 
@Quill I haven't downvoted it yet since I'm already out of votes. I wouldn't expect anyone to be able to fix that title. Where's that random title generator...
 
@Jamal Please review this buggy code (but I can't tell you what it does)
 
@Jamal Program Explodes
void explode(char* str, int* output){
Really ....
 
RELOAD!
 

« first day (765 days earlier)      last day (3258 days later) »