« first day (475 days earlier)      last day (3545 days later) » 

8:21 AM
first you initiate a context by calling avcodec_alloc_context3, then you pass it into avcodec_open2
what the f**k are those numbers for
 
Thaanks @Santa
 
8:42 AM
Stored procedures in Entity Framework
also known as: "Today you're going to lose your sanity"
2
 
8:56 AM
0
Q: Refactoring classes to use generics

Erki M.I have written some code that handle restful service calls and parse the response XML into relevant JAXB annotated classes. At the moment I have seperate methods for each return types: public class RestBase { protected final RestClient restClient; public RestBase() { restClient ...

0
Q: Unit tests: avoiding overspecification

ThunderDevSay I have the following method that sends emails. I know I should have tests for the different status codes returned. I am also testing if the the methods CreateMail() and Send() are being called. I guess in the end what's important is if the success status is returned or not. Should I be testi...

 
9:13 AM
@Pimgd Keep it civil please. References to shooting/murdering anyone are not appropriateā€¦ and this is not the first time from you.
 
@200_success I must say, I understand him with that naming-scheme.
 
TT_TT I've gone past hate already, now it's just crying
2
 
I don't mind some swearing, but death threats crosses the line, I think.
 
hmm like that
 
9:36 AM
Crying is better
Monking
 
0
A: Resilient Wrapper for Robocopy in C#

HeslacherNaming The method StartCopy() implies that the copy process can also be stopped. So we should better rename it to CopyFiles(). Refactoring First step would be to refactor the composition of the commandline to a separate method which we will name ComposeCommandline. private static String...

Zombie
Monking @SimonAndréForsberg
Thanks @Santa
 
@Heslacher keep up the decimation ;)
 
9:58 AM
0
Q: Are Monte Carlo algorithms off-topic by definition?

NobodyOne of the key requirements for posting here is working code to the best of our knowledge Where working means that the code compiles and returns correct results. Where does that put Monte Carlo algorithms whose output may be incorrect with a certain (typically small) probability. Do...

 
10:22 AM
Monking @all
 
monking @Nobody
 
10:39 AM
3 day weekend, woohoo
 
0
Q: HashTable with double hashing and dynamic size implementation

RandolphI am trying to implement a HashTable but I can't design it so that it work properly. I know how it should work and the general idea, but I am not able to implement it and I would like to ask for help. My HashTable is intended to be of a dynamic size and with double hashing. Although it may look a...

 
Greetings, Programs.
 
@CaptainObvious: Offtopic
> but I am not able to implement
 
@Donald.McLean Greetings, User
 
11:03 AM
0
A: How to get KML color code from colordialog box more efficiently

HeslacherIn the System.Drawing namespace lives the ColorTranslator class which has an ToHtml() method which can be used here. A good way would be to create extension methods for this task. The first extension method will be named ToKMLColor and will expect an String parameter. By using dec.TryParse() and...

Zombie killing
Last for today
Monking @Nobody
Greetings User
Need some work done...
 
fixing spelling before I'm upvoting that =D
wow, it has bugs
 
@Pimgd Thanks for the edit
 
@Pimgd: I should have used a better example in my meta question it is too easy and does not raise the problems I wanted discussed
 
@Pimgd my answer ?
Thanks @Santa
 
@Heslacher Yeah
You used ToKLMColor at the end
 
11:16 AM
That count as spelling proble ;-)
@Pimgd Thanks also for the other edit.
 
hmm I should go through the rest of them, you make good points but your english twists them so they're wrong
"variable should be named camelCased" for instance
That means a variable shouldn't be called TimesBufferClear but camelCased
 
@Pimgd Changed
 
11:31 AM
@rolfl ... given a post id, how do I get SEDE to return a link to the post in a column?
 
Which meta @pimgd?
 
meta where
 
Oh shoot. That wasn't you. It was @Nobody.
 
well actually it was a very good example
because it made me think and realize that any metric is gonna lead to "where's the line"
so lets make the line go away
 
11:40 AM
@Pimgd: Okay, then it did exactly what I meant it to do
 
Ahhh. Yeah. A better example may have helped.
 
explain it for me why you'd use monte carlo algorithm. This applies to such small statements
because WHY would you even do such a thing
and big algorithms (why did you opt for this approach?)
 
The usual reason for Monte Carlo is because a deterministic algorithm would take too long
in that sense adding is not a good example
but I did not want to blow up the question with a realistic example
 
There's also an increasing amount of people doing stuff like project euler where it's more like "because I can"
 
I see nothing wrong with it personally. It's intended to give a result that is close, but not 100% accurate, so it's not broken.
 
11:42 AM
Well the adding example is clearly broken
 
Yes. The example is off topic, but the questions themselves aren't.
 
 
I was speaking generally.
 
Inverse Monte Carlo!
 
Lol
 
11:43 AM
@Pimgd: Nope, this is too deterministic
 
Now it's not
 
:P
The problem that I see is the following: If there is an implementation of a Monte Carlo algorithm and it behaves incorrectly but only slightly then it is broken code
but you cannot tell because you expect the algorithm to sometimes give wrong results
 
The thing is, what you're asking can scale really dangerously
You bring up addition
I present you another example: NP-Complete problems.
Non-bruteforce solutions don't give you the best result.
So would all of those algorithms be off-topic? Seems a bit unfair
 
I did not say the best solution is the correct one
 
...
I'm translating your problem as "measuring is hard, lets estimate instead" = Monte Carlo
is that correct?
 
11:48 AM
I am fully aware of that, in fact it is what I wanted to poster child with this question
 
So why would code producing estimates be offtopic
 
because the "working code" formulation can be misinterpreted in this way (hence the )
and because I find it is poorly understood when such questions are offtopic
the best we have is to say: your code does not correctly implement the algorithm, go to SO and get that fixed
 
@Nobody How does a Monte Carlo algorithm behave incorrectly?
 
@SimonAndréForsberg: That is part of the question :)
On the one side of the scale are Monte Carlo algorithms that are clearly wrong like the add example
(unless you define that as working)
@Pimgd: You wanted to remove the line. How do you want to achieve this?
 
@Nobody what add example?
 
12:00 PM
@SimonAndréForsberg: See the updated question
 
@Nobody Remove the line by not making some arbitrary "is correct/complicated enough" question. Just explain it, and if there's no reason to actually use it, you'll be whacked over the head with it during a review. Basically: Monte Carlo demands context.
 
@nhgrif You select a column that has a Post ID or reference to an ID, then you alias the output column select Votes.PostId as [Post Link]
The [Post Link] column name triggers the conversion in to special links.
There are a few other magic column names: data.stackexchange.com/help
 
@Pimgd: Okay, but why do we make this "is correct" question with "normal" code?
 
@Nobody int add(int a, int b) { return rand(); } is not a proper Monte Carlo algorithm.
 
Because if code was broken, then it'd need to be fixed? No...
Because a fix changes the code? No...
Because we don't like broken code? No...
 
12:14 PM
@SimonAndréForsberg: Yeah, come up with a proper Monte Carlo algorithm that is clearly broken and I will use that as an example ;)
 
Because it's easier to review code when you can rely on it being correct?
Maybe?
 
@Nobody "a proper Monte Carlo algorithm" cannot be "clearly broken"
 
@Pimgd: And that does not apply to Monte Carlo algorithm code?
 
Because you can compile it to see what it does? Maybe...
 
@SimonAndréForsberg: But the code could be broken, couldn't it?
 
12:16 PM
@SimonAndréForsberg a recap, of my Zombie Kills
 
@Nobody Substracting the memory location of the first and the last node of a linked list to get it's size instead of iterating over it?
 
If it was about adding numbers, then I'd have an algorithm that would add 10000 numbers within a certain range - properly, then I do it the Monte Carlo way and I would just return the average of the real addition of those 10000 numbers. Monte Carlo for adding numbers however does not make sense
 
bleh
 
@Pimgd: Clever :)
 
That's not clever, that's really scary hax
 
12:18 PM
For me clever code has clearly a negative meaning and that was what I meant with clever.
 
I know why we don't allow bork code but I have trouble formulating it
 
@SimonAndréForsberg: Regarding a proper, obviously incorrect Monte Carlo algorithm: How about an implementation of the Solovay-Strassen-test that returns the exact opposite of the real result. It is a constructed example but it is definitely broken and definitely a Monte-Carlo algorithm
@Pimgd: Because code review/refactoring is not about changing behavior. We are only allowed to make the code return the same wrong result faster/more beautiful
 
Broken code tends to use a wrong approach. Reviewing this wrong approach is a waste of time because the fix (which is mandatory, remember, bork don't work) will replace the reviewed code.
well if you know all the answers why don't you post a self-answer already
by that definition the question's answer should have been obvious already
 
it is a discussion and I am not sure myself on how to approach this
 
also partially wrong; it's encouraged to point out bugs with very big characters
If a function float div(float a, float b){ return a/b; } goes bork at b = 0 then you should say so
 
12:30 PM
@Pimgd: What do you refer to with "also partially wrong"? "If a function ..." you mean as OP?
after browsing a bit of meta I would say the main reason for requiring that the code must not be broken is to avoid overlap with SO
 
@Nobody Well, if it does not return the result a real Monte Carlo algorithm would return, then it's broken, yes.
 
@SimonAndréForsberg: So we can agree that there is a spectrum from broken to non broken
and on this spectrum there is a line (or a grey zone) where it flips over
 
I think it's more of a black/white "Is it a correct Monte Carlo Algorithm?". Code that returns the opposite of what a real MCA would return is not a correct MCA.
boolean isTrue(boolean value) {
    return !value;
}
 
okay, but I would not expect the possible errors to be always as easy to spot as the negation
 
^^ That's broken
 
12:38 PM
I have seen many times that (good) reviews are given and then someone comes along and says: The code is broken because of xy
 
@Nobody Then let's discuss the possible errors when they appear, and deal with them as they come. Let's try to not construct them in advance.
 
And then I wonder: Should this be moved to SO now?
 
@Nobody Which question?
 
Everybody else has covered everything I wanted to say. BUT they all missed the error. Boo ha ha. After the first iteration this return end; is unlikely to be the actual end iterator (it is the end of the current range which has been subdivided many times). eg: finding 2 in [1, 3, 4, 5] will return the iterator for 3. — Loki Astari yesterday
That is just the last one that I remembered, I am pretty sure that you have seen similar things happen
 
@Nobody The OP was probably not aware of that flaw, so I see no reason to move it to SO. Especially not when it has answers here already
 
12:42 PM
So the rule is: If we know the fault before any answers are posted it goes to SO?
 
@Nobody well usually just VTC
and make OP go to SO..
there's not many migrations away here.
 
Okay the effect is the same: There are no answers on CR for these questions
 
Faaancy
 
IoC -> Inversion of Casing.
 
12:47 PM
because caps
2
 
Cool I did not know this page exists
 
@Nobody it's a little hidden and there's nothing really unknown there..
but it's a centralized place for cool information..
 
@Nobody partially wrong because if you see a bug, you should point it out, instead of blindly optimizing what there is.
why is it black
 
Hacker Vision extension
invert the complete color-scheme
 
Code Review <ILLEGIBLE>
2
Maybe it says bota
 
12:52 PM
I like the mse chatroom more though..
 
pictuuure
 
they initially had a blue ribbon, but:
the orange one is waaay cooler.
I turned it off on all sites that initially had a dark background theme though...
 
Yeah but that chat contains spam =D This one doesn't
 
@Pimgd it isn't spam
It's a game. and that room is reserved only for that game..
 
You're right, it's only pm
 
12:55 PM

 Wizards Den

Place for all wizards to share spells, words, and having fun w...
> Quote of the day: "Boobs to men are what laser pointers are to cats"
3
 
> :-D
 
1:10 PM
Hello everybody! :)
 
@Morwenn Hola
 
Is there any git guru aroung?
 
I am certainly no guru but maybe I can help nonetheless?
 
Thanks :)
A friend of mine has a project. He created a C++11 branch in his repo. I want to help him with the C++11 branch. Therefore, I wanted to fork not the whole repo but only the C++11 branch.
I don't really know how I would do that.
 
You could create a separate repo..
and checkout only the C++11 branch with tracking back..
or rather just pull this branch only.
 
1:15 PM
I am not aware of being able to setup a remote for a branch only
 
By creating a separate repo, you mean cloning the original?
 
however you could try to pull only the branch from the remote
 
@Morwenn well you could create your own repo
as a separate one..
then git remote add his-repo <git-url>
 
88
Q: Clone only one branch

max_I would like to know how I could clone only one branch instead of cloning the whole Git repository.

 
and go for git pull his-repo <branch>
but only push to your own repo.
 
1:17 PM
So I have to do it as a clone, not as a mere fork. Ok.
 
@amon: Nice, I did not know this one yet
 
Thanks for your help everyone. I'll ask the aforementioned friend whether he's ok with that :)
 
Note that cloning just one branch is not going to make much of a difference, as the history of that branch contains most earlier history as well. Branches in Git aren't heavy-weight data structures, they are just pointers to various commits.
 
yet branches can diverge heavily
 
or rather, cloning the whole repo and just using one branch is about the same, as long as you don't pull it...
@Nobody as long as you don't pull anything, you should be good to go.
fetches just get you the pointer, and the heavy lifting is done by the pull anyways.
 
1:22 PM
pull in which direction?
 
assume you got one repo, with multiple independent branches.
 
@Morwenn: What is your reason not to clone the whole repo?
 
as long as you just pull one of those and none of the others, it shouldn't make too much of a diefference to just cloning the --single-branch
 
well, your initial clone makes the difference
 
@Nobody Once it has been cloned, does it still appear in the original repo fork diagram?
 
1:24 PM
just don't run a git pull repo
 
@Morwenn: You are talking about github?
 
@Nobody Yes :p
 
Then it does...
 
That is another story
 
I cloned the repo to my github, but it still shows in the network.
 
1:26 PM
That's nice. I love how it makes keeping track of things visually easy :)
 
@Morwenn you bet ;)
 
-1
Q: Overloaded Operators

BRIAN MMOTLAMay someone please help me with the following problem on overloaded operators: Consider the mathematical construct of a matrix (http://mathworld.wolfram.com/Matrix.html) Create an Abstract Data Type for representing a matrix of arbitrary dimensions using an underlying two dimensional dynamic ar...

 
I think I'll be going for a git clone -b then^^
 
@Morwenn if you got github, you can even go via web-interface
 
I'm almost as lost with the web interface as I am with the command line actually xD
 
1:30 PM
top right inside a repo when logged in
 
Haha, I just understood that forking and cloning were basically the same thing xD
Since I only ever forked with the interface, I totally forgot that there is no git fork command.
That's probably one of my most stupid mistakes this month.
 
@Morwenn me too, I am learning a little bit here and there though.
 
Since I generally use git for my own repos where nobody contributes, I tend to forget how to use it when there are several other contributers.
 
1:47 PM
0
Q: LinQ query performs poor according Perfrormance analyzer VS2012

AlexI've a Linq query that performs poor. var minuteValues = ValuesInMemory.Where(o => o.Key.Day == tmpValue.QuoteDate.Day && o.Key.Hour == tmpValue.QuoteDate.Hour && o.Key.Minute == tmpValue.QuoteDate.Minute && ...

 
'ello guys
 
Monking!
 
I'm sure that's an inside joke
 
Monking
12
A: What's a Zombie? And what are the many other memes of Code Review?

Vogel612Meme: Monking Originator: Morwenn Cultural Height: The 2nd Monitor Background: A morning greeting to the Monkey doing his monkey-business, in other words: monking Examples: A small chat search

@DanPantry
 
AHhhh. Unfortunately it is teh afternoon here, but thanks all the same
 
1:50 PM
Monkernoon @DanPantry
 
Aftermonk doesn't quite have the same ring to it
 
@DanPantry additionally after Monk is somewhere around midnight..
 
that's about the time here
 
Monknight!
 
0
Q: Javascript/jQuery Image Slider

Tom HartI've just wrote this class for an image slider(? It cross fades rather than sliding, so a class rename may be beneficial). It's my first proper attempt at javascript OOP. Can anyone see any real issues with this? // Wrapper is the container element, in this case $('#sliderWrap'). // images is an...

 
1:54 PM
Monking!
 
sounds like a Buddhist version of Batman
 
what have I started :\
 
nothing that wasn't probably inevitable anyway
 
@rolfl ... Monking ;-)
 
I need to flesh out a github portfolio I feel to show to potential employers
I have nothing to wave about due to no formal education in programming
What do
 
1:56 PM
depends where you live and who you're applying to
 
I will follow you @DanPantry
 
Wales, so it's pretty barren.
I'm not lookign to apply to anyone in particular. I just want to build up a portfolio :-)
 
Go to the programming puzzles SE and write code to solve the challenges. You need some sample code
 
Doesn't really matter what it does
 
1:57 PM
2 full rows!!!
 
@MattGiltaji I was thinking about that. I'm not much of a golfer but I could probably do the rest
@Malachi: github.com/DanPantry ~
 
I've honestly never been asked. I've put it on my resume, but I doubt it's ever been looked at
 
Well, I've never been asked either
But I have nothing else to back myself up other than 1 year experience lol
Because I have no degree
 
@DanPantry I know that feeling. Completely self-taught myself.
 
I've been thinking about joining some OS projects but I always feel like I can't really contribute to them ;-;
 
1:59 PM
@DanPantry You started programming one year ago?
 
Looking at the people who are around me in university I would say the degrees are overrated
3
 
Kill Shot?
0
A: Does this simple memory pool use too much memory?

Malachiyou should always use Curly Braces around if statements and for loops. it's the safe thing to do, especially when you are dealing with Memory Management. something small like this: if(temp == NULL) return NULL; Can be one lined if(temp == NULL) {return NULL;} Returning in an if sta...

 
I did nothing but math in uni
 

« first day (475 days earlier)      last day (3545 days later) »