« first day (394 days earlier)      last day (1931 days later) » 

12:43 AM
lots of nice counter-points here - looks like the best way to fight a battle, is in the CR arena (i.e. not on meta!)
A: FileWriter supporting writing to multiple files

ckuhn203I'll start by saying that I like this. I like it a lot and I'll be doing this from now on. 'expose raised errors to clients: Public Enum FileWriterError InvalidFileName = vbObjectError + 42 End Enum But, if you plan on raising more than one error, you should use a constant to give your cla...

@ckuhn203 you got my instant upvote!
Thank you!, yeah. I know meta wasn't the best place, but I'm still not convinced it was off topic. Thank you for giving me a good opportunity to put that out there for the community. @Mat'sMug
One thing I don't like about your answer though, is that it introduces some UI concerns - showing a MsgBox with an error description isn't handling an error IMO; I have some updated code, you're right about the Err.Clear, it's essentially swallowing all errors, the current version simply rethrows (RaiseError Err.Number, Err.Description, ...), but I should wrap known errors into a FileWriterError enum value. What do you think?
I might post the updated code later on, I think you might have convinced me with using a ExitFunction: label and Resume ExitFunction in the error-handling subroutine...
pliable ... congrats!
and here, have a checkmark for addressing the tag! :)
1:11 AM
2 more badges!
You've earned the "Revival" badge (Answered more than 30 days later as first answer scoring 2 or more) for "Querying a warehouse database".

You've earned the "Revival" badge (Answered more than 30 days later as first answer scoring 2 or more) for "Looking to optimize SQL Server merge statement".
thank you!!!
3 hours ago, by Jamal
Trip to the One Vote Short query =
1:59 AM
@rolfl I'm not bending on the Hungarian Notation in / though.
A: Generating a collection of controls

ckuhn203I know we're supposed to use Hungarian notation in VBA, but it's useless with the modern IDE. Get rid of it unless you're working in VBScript. The only reason I say to bother with Hungarian notation in VBScript is because everything is a variant in that flavor of the language.

(i.e. I don't care if I'm supposed to use it, I'm not writing that!)
Thanks @rolfl for running this in Access.
Well, it doesn't work (and that's the first time I have run an access query this century.
2:33 AM
Q: Refine ruby code(has regexp)

user3580287I asked a question to stack overflow and the answer is following. But the guy who wrote this code said that this is quite un-ruby-like. So Is there anyone can help to refine this code?? Honestly, I don't know where is un-ruby-like code... def e2k(string) en_h = "rRseEfaqQtTdwWczxvg" reg_h =...

3:08 AM
Q: JavaScript Node - Private Module Functions

Lucien LachanceTo learn the language of JavaScript, I did a dojo exercise by Roy Osherove. Is there any way to make a function in JavaScript private within a module? module.exports = { add: function (string) { this._checkForError(string); this._checkForNegatives(string); return this._result(strin...

3:21 AM
Q: foreach to linq

momokjaaaaaI need a code review is this foreach foreach(var item in data) item.Inventory.type = ConvertTxnType(item.Inventory.type); equivalents to this linq var t = data.SelectMany(x => x.Inventory.type = ConvertTxnType(x.Inventory.type)); ? I don't think it is. Pls correct this....

@CaptainObvious OT?
Appears so
I'll answer with a comment
Q: Converting JDBC to CSV

hd1One of my first ever jython scripts lets me get comma-separated values out of an RDBMS. I submit it here in hopes that you'll rip me apart. Without further ado, have at it: from java.lang import System from java.sql import DriverManager, ResultSet import csv import cStringIO as StringIO import s...

2 hours later…
5:07 AM
Q: log4j in scala for logs

Govind Singhthis code i have converted from java to scala, so need reviews this works fine, but i am sure that some is wrong in this coding pattern. package models import org.apache.log4j.ConsoleAppender import org.apache.log4j.Level import org.apache.log4j.Logger import org.apache.log4j.PatternLayout impo...

1 hour later…
6:15 AM
morning all
6:30 AM
Hey there @chillworld
all well?
All good just shooting down some old MySQL questions on Stack Overflow
6:48 AM
Q: grep to search for array of location targets

Felipe AlvarezPlease review my short 65 lines of code: I'm wondering: is there a way to avoid eval (security??) is there a better way or place to use shopt -s nullglob does shopt -u nullglob always need to be unset through each iteration? is there a smarter way to do define a list of locations?

7:02 AM
finally pc works after long restart :)
7:14 AM
Q: Call method of specific parent class

KatsuThis question is related to this topic. Context: class OperationDevice(Device): def __init__(self): super(OperationDevice, self).__init__() def operation_start(self): # Do operation specific code self.start() def operation_stop(self): # Do operation...

7:49 AM
just looking at @vogels question, his scoping of the services are strange
1 hour later…
8:54 AM
A: Show Details of an Object while allowing interactions with it and dependent objects

chillworldScoping : In your controllers are all your services default scoped. In mine humble oppinion make them private, if you wish to have the default scope make getters and setters default scope. Why: You easily can forget the private before a global variable but getters/setters are mostly autogenerate...

Q: subarray with max sum for an array using java

AnkitIn an interview I was asked to solve the following problem:- find a subarray with max sum I have written a piece of code for the same which can be found below:- package com.ankit.rnd; public class MaxSubArrSum { int largestSum=0; int previousLargestSum=0; public static void ...

Q: Best way to handle multilple file uploads in jQuery

user43251I have this code which works for uploading multiple files (images) however, it obviously needs to be put into some sort of for loop, so I was just looking for the most efficient way of doing so, thanks! Code (for 2 uploads but there will be about 12 in total); function readURL1(input) { if (...

Q: DAL Returns a collection of business objects in MVP

ChathurangaIn Model View Presenter (MVP) pattern, it is said that our DAL always should returns business models. If I want to get a list of business objects from my DAL, is it acceptable to do it as follows or better to get a DataTable from DAL and then in the applications BLL, converts it to a List? pu...

10:01 AM
Does anyone else come here just to get away from SO? I find this a welcome reprieve from the insanity over there.
@ckuhn203 it's just nicer and calmer here then op SO.
10:18 AM
@CaptainObvious cv'ed
Morning Monking everyone
Monking @MadaraUchiha
Monking all!
Q: How to generalize method which use Deferreds?

VictorI've two similar functions and I want to use one generic function with two params, dialog and buttons. How to do it ? My functions: LanguageLogosView.showConfirmRemoveDialog = function () { var def = $.Deferred(); var buttons = { buttons: { "Remove": function () { ...

Bwa, Mmm. Eeeeh. Monking! just woke up
@SimonAndréForsberg: Monking, what time is it at your place?
10:33 AM
(At mine, anyway)
@rolfl 12:30 where @SimonAndréForsberg lives.
Beat it to ya :D
Time where I live is ...... BREAKFAST TIME!
Q: Javascript | Find and replace optimization

user889349I'm looking for some javascript code improvement and optimization. Is it possible to optimize this block of code (For example remove double array loop)? My code below: replace: function(ex, str) { var arr = str.match(/{add_([A-Z]+)}/gi); if (arr && arr.length) { arr.each(function...

10:36 AM
@Morwenn I also got tumbleweed on my first (and so far only) question over there.
@rolfl Ironically, it was breakfast time here as well just a few minutes ago. I really should wake up earlier, before I turn into @Jamal.
11:19 AM
Again I am late to the party but: msmvps.com/blogs/jon_skeet/archive/2009/11/02/…
did you read/see/hear this?
I didn't even know Jon Skeet had a blog.
I'll read it later. Working on a Java array question review
Mine.... done!
11:44 AM
@SimonAndréForsberg My first question got some votes. But since Math.SE is the second most active site of the network, I'm not surprised that the question got ignored.
@Morwenn: Isn't it called mathoverflow these days?
Q: Adding groups to ListView depending on the data in a list

GovsI have written a simple code which loops through a list object and create groups in ListView depending on the data in the list. I have a list object of type List where Assignment is a class as follows. public class Assignment { public TimeSpan Time { get; set; } public string Type { get;...

@rolfl Can you check my answer here? codereview.stackexchange.com/questions/52249/… I think we have a bit of a similar approach, but not sure what would be fastest. (Unfortunately I haven't written any code for my approach, yet)
Morning everyone
Good answer, Simon (must have had your ..)
11:52 AM
lol, yes. I did have my breakfast.
Your answerr already has my +1 .... mstly for all the good info on the style side of things ifyouknowwhatImean
Let me check the altrernative some more.
You are right, it's the better algorithm....
The only problem with it is that what if all the numbers are negative.
You can't skip them all.
That's true
So you'd always have to keep the least negative number in memory.
I considered that iussue as well, but was too lazy to code up the answer.
11:56 AM
I'll see if I can write up some code for this
@Nobody Math.SE and Mathoverflow are different sites.
wrote lol, but it was too quickly, saved by the 1-second delay
pffft done with all the network problems at work
@Nobody Questions on Mathoverflow are research-level math questions. Math.SE is about general math questions.
Q: Please look at my RSpec tests

user3265472I've just written my first full batch of RSpec tests and wandered if anyone comment at a glance on how they might be written easier, more readable, faster etc. There are some pending specs so excuse those, it should describe what they will test when I finish. I've given examples of models, contro...

11:57 AM
now at home cause there I had more no acces to mine remote pc then I did have acces
@SimonAndréForsberg - in the past i have found really cool ways to solve problems using fancy memoization algorithms. Thinsg that should have cut out lots of processing.
rolfl, voted your answer now ;)
then discovered that the memoization overhead exceeded the time of the eliminated logic.
@Morwenn: Thats what you get when only skimming around the sites, I should have noticed the different layout ^^
I would bet that, for all practical solutions, the additional computation and logic required to implement a smarter algorithm that does 'less work', will, in this case, do more work.
11:59 AM
@rolfl damn didn't think about that
@Nobody Actually, Mathoverflow may even be older. But it was independant at first (and use the SE 1.0 engine). It got rattached to the SE network when they updated their engine to use SE 2.0.
@chillworld You have a minor indentation incident in your answer
@rolfl Hmm, you may be right there. I'll see about this.
@SimonAndréForsberg tell me :)
@chillworld There's a } on the wrong indentation
@SimonAndréForsberg where exactly?
12:05 PM
@chillworld getMaxSumArray method
After throw new AssertionError("Precondition failed, null object or zero size array.");
.... Would have been quicker to just fix it myself :)
you are prob right, you know you may also do that
but fixed it
after reading your answers, mine solution seems bad :)
its really bad :s
didn't think of the -1 in the subarray is possible
damn, gonna edit mine question to remove mine solution
nah done
as I can see his logic isn't that great, I see by myself that mine logic wasn't that great either :s
@chillworld I haven't checked much of the algorithm in your code actually, but if there's one thing I've learned from @rolfl it's that using Lists and other object-oriented approaches tends to reduce the effectiveness of a 'primitive' algorithm.
@rolfl and @chillworld is an empty array a sub-array? Because if it is, 0 would be an acceptable answer. Or perhaps a sub-array needs to contain at least one element.
in mine code an empty array (or null object) throws a AssertionError
and lenght 1 returns directly the array back
But I mean if all the array contents are negative, would then the highest sub-array sum be 0 ?
i.e. is {} a sub-array of { -4, -2, -5 } ?
i.e. is {} a sub-array of { -4, -2, -5 } ?
12:19 PM
OK :)
P.s.: hi all :)
@SimonAndréForsberg actually it should be -2 then
Hey @Prizoff
@SimonAndréForsberg but the use case is to vague
@Prizoff hi there
@Prizoff as you might have seen, I removed my (somewhat negative) comment on your answer. Your answer is a much better version of what the OP had anyways, and I'm not yet sure of how fast my approach will be.
12:21 PM
what about { 1, 2 ,-5, 1, 1, 1 }
I will really up-vote all the answers on this question later.
return the 1-2 or the 1-1-1
There could be a good optimisation, actually..
@chillworld Does it matter? :)
there is no need to count sum for elements multiple times...
12:22 PM
@SimonAndréForsberg actually they want the subarray so yes, if they wanted the sum no
Oh, they want the sub-array? I thought they just wanted the sum.
example: lets suppose we have array elements with indexes in sum: 3,4,5. Now, We go to the next iteration and count sum for elements with indexes: 2, 3, 4, 5. But we already counted sum for 3,4,5 - so, we can reuse it.
And this would be great optimisation.
Depends on how you will store it. But I think it can be a good optimization, yes.
A: Find the subarray with the max sum

chillworldIt's hard to say but if I get this with an interview, you will not pass. On the other hand, I'll find it good you come to here to learn. Number 1 is really red flags. Let's start with the review. 1. No public static void main(String args) with logic. I removed the comment lines to point it ou...

i.e. if you use a HashMap and a lot of objects for storing the sum, then it's probably not that efficient :)
12:26 PM
title is the same as UC
but the question itself deserves more votes, as we are speaking a lot of it here
oke working in garden now
cu all
12:49 PM
Thanks CR, everytime I am on stackoverflow I start voting on low rep low vote questions/answers (which are still good) because I got so used to it around here
which makes my SO surfing even slower than it was before
(still not as distracting as this damned hot topics list)
Q: Can this source code be improved in terms of readability and/or good practices?

user1764094I'm aiming to get this program right as I might show it at a job interview. The code below runs fine but I would like to know if there's anything that can be improved in terms of readability, good practices and/or standards. The program asks a user to take money from a checking account and move i...

I came here to get away from SO some
I like to help people, and I like giving intelligent advice, but SO just doesn't seem to want it
@Nobody - big day for you?
user image
@Mat'sMug I think you're missing a display name in your var formerDisplayNames ( I know I'm very late in my response :P)
@rolfl: Not really, I only care for my rep when it comes to some privileges that I am missing
and networkwide rep does not really help there :)
12:59 PM
Had to hard reboot my pc and lots some tabs, yay
In hindsight I should've had somewhat more patience to avoid the hard boot
1 tag away from Generalist.
closes ones are and
The code for my sum-array approach is producing the correct results now for three test-cases. I need more test-cases.
Hey @SimonAndréForsberg, JavaFX expert yet?
Hey @skiwi. Far from it. Haven't used JavaFX yet.
1:15 PM
@SimonAndréForsberg: I hope you read up on:
In computer science, the maximum subarray problem is the task of finding the contiguous subarray within a one-dimensional array of numbers (containing at least one positive number) which has the largest sum. For example, for the sequence of values −2, 1, −3, 4, −1, 2, 1, −5, 4; the contiguous subarray with the largest sum is 4, −1, 2, 1, with sum 6. The problem was first posed by Ulf Grenander of Brown University in 1977, as a simplified model for maximum likelihood estimation of patterns in digitized images. A linear time algorithm was found soon afterwards b...
@Nobody "¤/%"=()!¤/()%=@
In other words: No, I haven't read that :)
@Simon: Having read your solution I bet you are pretty close to that algorithm
I think I'll put my code up for review and see what people say about it
I just gotta add some test-cases
And perhaps do a refactoring
I still remember the lesson when our theoretical CS prof started out with the O(n^3) solution to this problem and then gradually went down to O(n)
that really impressed me
1:20 PM
I think O(n^3) is somewhat what the OP originally had.
Anyone wants to give me some more views:
Q: How to do per node caching in a tree visitor

NobodyI have an application where a want to calculate different representations (mesh, voxelization, signed distance function, ...) of a tree of primitives (leaf nodes) that are combined via boolean operations (inner nodes). My first approach to this was to write an abstract base class with a virtual ...

@Nobody Views or votes? Here, have both.
Mainly views, I want to solve a problem (and the problem is not my low reputation ^^)
answers would be nice too ^^
I don't see how me giving you views will help you solve the problem.
It is not entirely c++ specific
1:28 PM
Perhaps I should give it a closer look later then
well at the end I need to solve it in c++ but I would also be interested in solutions in other languages
A question...
In my visual Console (that is just a TextArea + TextField) I noticed I have no get-methods so far (because it's visual), what get-methods would be expected do you guys think?
I can't follow the reasoning of
> I have no get-methods so far (because it's visual)
I didn't consider them yet.
And in unit testing I notice that I cannot actually test when someone types something
Would it be a good idea to expose the internal fields? As they are kind of external as being visible to the user anyhow
by user do you mean the programmer using your class or the one using the program where your class is used?
1:35 PM
The user as in the one using the program
Maybe a little picture can help
@skiwi End-user = guy using the program, us chatting here. User (when talking about a library) consumer of the library (someone using the chat API to make a bot)
Which is it?
I don't see why the visibilty to the user should break the encapsulation for the developer
@MadaraUchiha End-user
This is what the end-user sees
Yet the programmer cannot access the TextArea and TextField individually at all
@skiwi: Usually there are some requirements that justify the existence of getters/setters
I only made methods to directly print in the TextArea, to clear the TextArea and the TextField has a listener that on KeyCode.ENTER, it copies it's content to the TextArea and then clears itself
1:40 PM
I would say that it is not very useful
And this is working fine so far, that's not the issue, the issue is that I cannot really extensively test it now
it should be the user's (not enduser's) job to loop that input back into the output
@skiwi: Did you have a look at:
GUI testing tools serve the purpose of automating the testing process of software with graphical user interfaces. {| class="wikitable sortable" border="1" |- ! Name !! scope="col" width="150px" | Testing system requirement !! scope="col" width="150px" | System under test requirement !! Company !! GUI Test !! Automation !! Current version !! class="unsortable" | reference |- | AutoIt || Windows || Windows || AutoIt || || || || |- | CubicTest || Eclipse || Selenium and Watir || Open source || || || || |- | Dojo Objective Harness || || Web || Open source || || || || |- | eg...
Well the fact that I offer both textarea and textfield in one class is because it's visually a single component... And input looping is a thing a regular console does as well
I didn't take a look at that yet
Is it correct that the tools themselves have nothing to do with the programming language?
I see no problem with tieing them together (yet) but you should definitely output the text to the programmer when enter is hit and let him decide wether to feed it back to the output
@skiwi I have not yet tested them myself (always planning, never doing ^^)
I'll see if I can at least do some tests that check if no errors are thrown
1:53 PM
@Nobody That sounds like me.
Ideas > Time
You should see my todolist
It's interesting if I can even test word wrapping ;)
@Nobody You should see my todolist
We should totally start a todo-list-length battle (something like a "your mother" battle but where fatter is better :)
TODO: Make everyone who asks me to play Candy Crush via Facebook disappear.
1:56 PM
My todo list is so long that the counter shows -2147483647
@skiwi: It is your own fault being on facebook ^^
@Nobody But but nice girls post pics there...
Okay, it's really my own fault ^^
@skiwi: From what I have seen those that post pics there are not nice (or the pics are not nice)
linq people?
I am not fluent in Linq, but the code this person posted in an answer doesn't look like it does the same thing as the OP, anyone here that could tell me if I am missing something?
A: Adding groups to ListView depending on the data in a list

George HowarthIt's possible with the help of LINQ to reduce your code to this (assuming, of course, the version of .NET you're using will allow it): private void FeedDataToPane(IEnumerable<Assignment> assignmentList) { MonitorPane.BeginUpdate(); MonitorPane.Groups.Clear(); MonitorPane.SmallImageLi...

@Nobody Well... you've got to weed it out first ;)
@skiwi: your dutch, right?
2:01 PM
@Nobody Yes
that gives this sentence a nice ambiguity :)
I get it... I get it :P
Back to somewhat more serious
I just figured out that via other public getters and some casts you can get back the TextArea and TextField anyway... Do I then better not just provide getters?
I would not provide direct access to these two at all
TextArea textArea = (TextArea)console.getChildren().stream().filter(node -> node instanceof TextArea).findFirst().get();
Now I have my TextArea as well, knowing only one exists in each Console, withotu even knowing its position
So personally I think I'm more or less placing a burden on an API user by not providing it easily, but by having it accessible
(I think overriding getChildren() would break JavaFX in more ways than one)
2:17 PM
Q: Finding the sub-array with the maximum sum - my approach

Simon André ForsbergThis is the code I ended up with that implements the approach I described in a recent answer to another question about the same problem The basic idea here is to not loop through more things than necessary. I have also added a parameterized JUnit test. I would like to know what you think of th...

:( I just started BF3, #cantreview
BF3? Battlefield?
Was interested in trying it out again after not having played it long ;)
Q: Finding the sub-array with the maximum sum - my approach

Simon André ForsbergThis is the code I ended up with that implements the approach I described in a recent answer to another question about the same problem The basic idea here is to not loop through more things than necessary. I have also added a parameterized JUnit test. I would like to know what you think of th...

@SimonAndréForsberg: Do you have any restrictions on the width of your editing window? I find your code hard to read on CR when I constantly need to scroll horizontally
2:21 PM
@Nobody My todolist is so long that it exceeds the lines of code.
@Nobody Erhm... I just noticed that my edit window in Eclipse is 209 characters wide. I see that I have one line exceeding that though.
@SimonAndréForsberg: Yeah it would be nice if you could post the code reformatted to 80 width (which fits exactly into the code window on SE)
this would speed up reviews ^^
Hi all, and sorry for not being there these times :(
215 characters. I win. :-)
Admittedly though, I give the project panel lots of space. A full width editor would be ungainly.
@Nobody I think 80 width is antique...
So I think that the SE-platform should scale up to 120
@skiwi: Yes it is old but still very widely used
I can easily fit two 80 column windows next to each other on my smallest width monitor
2:30 PM
@Nobody I'll try to think about that in the future. Perhaps it's a feature I could add to my
@Mat'sMug 116 bottles of rep on the wall!
one-space indentations solve the problem of the 80 character limit.
Short and meaningful names too.
Also, avoiding deep nesting and over-complexity in functions does the trick.
Overall, good code correctly designed, written and indented should almost never reach the 80 characters limit :p
@Morwenn: And on old machines you could still try to rotate the image 45 degrees and use the full width of the diagonal to gain up to 100 characters width :P
2:47 PM
@Morwenn Perhaps we should golf our code before putting it up on review? That ought to reduce the line width.
Vertical golf then: golf with new lines to separate tokens.
Q: Parcelable Bitmap with the intention of uploading the bitmap

netineptI could really use another set of eyes on this. No one else in the office has a lot of experience working with Android, so I'm on my own with this one. The goal of this class is to encapsulate an image which can be sourced from a camera or file so that it can be uploaded to one of our servers us...

Q: Standard-layout tuple implementation (C++)

ChrisI have written a simple (read: incomplete) tuple implementation that, AFAICT, does not violate the standard layout requirements. It's largely based on Nish's implementation (http://voidnish.wordpress.com/2013/07/13/tuple-implementation-via-variadic-templates/) but I use a recursive hierarchy of n...

A: DAL Returns a collection of business objects in MVP

Mat's MugYour Question System.Data.DataTable lives under the System.Data namespace; one good way to start mixing concerns in your BLL is to reference System.Data, and then you don't even need a DAL anymore and can have your BLL directly access the database. Or worse, have some of your data access code co...

@Marc-Andre what name is missing? They're former display names; "Mat's Mug" is the current one ;)
@SimonAndréForsberg I know... at least I don't have 800 points to catch up with (yet) this week!
@Mat'sMug I'm dumb then :P
@Marc-Andre I didn't say that ;)
2:52 PM
@Mat'sMug It's ok :P I'm saying it :P
ugh.. my next tag badge is likely going to be .
candidate for comment of the day:
I see assignments to undeclared variables in a static method, and my spidey senses are off the charts. Shared static state, in a multi-threaded program no less: brace yourself for more memory leaks and heisenbugs and various other goodness. — abuzittin gillifirca 1 hour ago
I'm still wondering if I really want to start with GUI testing
3:13 PM
how much is it for a decent code performance profiler in the Java world?
(I don't even know why I asked)
@rolfl Do you have perhaps have experience with Java GUI testing or experience with people that have experience?
GUI <--- not my thing.
A reasonable choice ;)
3:16 PM
RedGate ANTS goes for $495, JetBrains' dotTrace for $199...
jvisualvm included with jdk.
M$ ships performance analysis tools with Visual Studio Ultimate
bah, I think my company has other issues to tackle before trying to optimize code performance..
but I might buy a dotTrace licence with a ReSharper upgrade for myself when I buy me a Visual Studio Pro license, somewhere before x-mas.
and then I can skip Holiday shopping and say I'm broke this year.
@Mat'sMug Or you can just switch to Java.
Yeah, but I don't like shopping ;)
I thought I was the last person refering to them as M$
3:25 PM
@rolfl Would you want to share your experience with making methods final when working on JDOM for example?
I tend to move towards making getters final (and setters too?), where they are really the trivial ones, as I don't feel like unit testing subclasses as well.
@ckuhn203 If they make me chose between a new IDE and a new guitar this year, I'm calling them M$ ;)
this one deserves a +1 for using yield (I really need to develop this reflex), I'm right now... :(
A: DAL Returns a collection of business objects in MVP

Xiaoy312You don't want to pull the entire Employee table unless necessary. public IEnumerable<Employee> GetNewEmployees() { string selectStatement = "SELECT Employee.Emp_ID, Employee.Initials + ' ' + Employee.Surname AS Name,..."; using (SqlConnection sqlConnection = new SqlConnection(db.GetCo...

3:38 PM
seriously, I need to start doing return IEnumerable<T> => yield return in my head. Now. Is there any reason why one wouldn't want to yield return their IEnumearble<T>?
A: A method which, given a string, returns a string in which each character is separated by an asterisk

Xiaoy312IMO recursion isn't best the way to solve this problem, you can read more about it here. Before all, let's just hack it for fun : public string InsertStringAfterEachCharacter(string input, string repeat) { return String.Join(repeat, input.Where(c => !char.IsWhiteSpace(c))); } Before w...

@SimonAndréForsberg - I was wrong ....
Fair enought @Mat'sMug. Fair enough.
3:53 PM
@rolfl You were wrong? What have you done now, monkey?
Hey @Mat'sMug! 141 bottles at the moment. What's that 800 rep you were talking about?
Array Sum Rolfl     => [-1, 1, 11, 9, 8, -1, 25, 28, 45769, 447857, 50645434] (hot 50.95695ms - cold 50.789ms (total 56082.850ms))
Array Sum SAF       => [-1, 1, 11, 9, 8, -1, 25, 28, 45769, 447857, 50645434] (hot 0.02366ms - cold 0.038ms (total 48.741ms))
Array Sum SAF Rolfl => [-1, 1, 11, 9, 8, -1, 25, 28, 45769, 447857, 50645434] (hot 0.01728ms - cold 0.029ms (total 22.938ms))
@SimonAndréForsberg last week at this time, was much more than 141 ;)
@SimonAndréForsberg - your code is about 250 times faster than mine.
@SimonAndréForsberg docs.oracle.com/javafx/2/best_practices/… I wish I could make this nice stuff
@rolfl Are you sure you are using the result somewhere? ;)
@rolfl My code is about 250 times faster than what someone who's working on Watson and whom I consider being one of the best programmers I know of when it comes to the performance aspect of programming? I gotta remember this.

« first day (394 days earlier)      last day (1931 days later) »