« first day (627 days earlier)      last day (3406 days later) » 

11:05 AM
@skiwi I still have to see that.
Congratulations @skiwi, now you get to see all the trash even more trash!
3
 
All exams finished \o/
Now I can be productive and stuff
 
@SimonAndréForsberg So nice huh
@JeroenVannevel Haha, good joke!
We all know nobody is going to be productive after their exams
Even (most) teachers are not productive as it only takes a few months to get our graded work back :)
 
@skiwi @Nobody is not here, so I assume he is productive
@JeroenVannevel "and stuff"?
 
Meanwhile I can think and rubberduck about my issues with HearthMonitor
The log file isn't "clean", there's noise in between the logged lines, wondering how to filter that out
 
@SimonAndréForsberg "and stuff" being watching shows and travelling
Maybe I'll get my theoretical drivers license
 
11:12 AM
Two options I see are: 1) Let the client-side make a custom reader class (this defeats the point of the library-provided FileReader); 2) Let the library-side take a predicate to filter which lines are useful
@JeroenVannevel Wondering, why don't you have it yet? I was also very late with starting driving lessons
 
@skiwi Loglevels? Verbose - debug - release
@skiwi Too lazy and haven't really needed it yet
 
@JeroenVannevel It's a log reader though, I cannot control the loglevels
@JeroenVannevel Okay, pretty much same reason here!
 
do you control the writing to the log?
 
Nope, HearthStone (which (unfortunately) is not my game) controls that
 
Do log entries specify their loglevel?
 
11:14 AM
You wish :)
let me grab an example
oops, my browser almost crashed when pasting it, didn't realize it were 255K lines
> 413 Request Entity Too Large
Oh
 
At least you're thorough
 
1
Q: The grid looked at the menu and said "Something with class, please"

Henrik BohlinThis is a follow up on my previous question "A grid and a menu walked into a program" I integrated Classes into the mix. The program now asks how big you want the grid to be. Code import java.util.Arrays; import java.util.Random; import java.util.Scanner; class NumberGrid { private sta...

 
pastebin.com/8EeiBWH9 I'm only interested in the [Power] messages in this case
And as you see all other stuff is spammed through it
 
@skiwi looks like a job for filtering the unwanted stuff out
 
Can't you just ignore the lines starting with (Filename?
 
11:21 AM
Files.lines().filter([...]).forEach(LogReader::processLine);
 
I'm trying to figure out how to solve it best
@Vogel612 That's the job of a LogReader though
And the library provides several of them
 
1
Q: The grid looked at the menu and said "Something with class, please"

Henrik BohlinThis is a follow up on my previous question "A grid and a menu walked into a program" I integrated Classes into the mix. The program now asks how big you want the grid to be. Code import java.util.Arrays; import java.util.Random; import java.util.Scanner; class NumberGrid { private sta...

 
So I either want to ignore things starting with (Filename and blank lines, or only read [XXX] entries, but unsure in what part of my code to add that
I guess I'll just add an extra predicate to define what lines should be read, only downside is that it increases the complexity of the caller a bit
 
you could provide a default setting
so that caller code can be easier
 
11:38 AM
ok
Unfortunately this approach complates the easy approach of using an Iterator<String> to provide lines :(
I'll need to use a buffer somewhere as the iterator.hasNext() will need to actually read the line
 
Files.lines() provides a stream..
you could lazily evaluate the next item in that stream when you spliterate it
 
@Vogel612 Yeah but currently I'm doing it like this:
@Override
public boolean hasNextEntry() {
    return (!peekedLines.isEmpty() || readIterator.hasNext());
}
(I already do have a mechanism for the buffer available)
I must say that I haven't worked much with Spliterators though
Do you think there is a way to avoid actually reading the next element if you want to see if it maches some content?
 
aaaand XKCD integrated in yet another answer
3
A: The grid looked at the menu and said "Something with class, please"

Pimgdprivate static final int RANDOM_NUMBER = 10; Everyone knows the true random number is 4. Less jokingly, what's the RANDOM_NUMBER for? Consider adding comments to explain the purpose of your variables... or better yet renaming them (to RANDOM_NUMBER_MAX, perhaps). static Random rand = new R...

 
11:55 AM
Is spliterate a word?
 
no it's not really..
but java streams still support it
 
Spliterating is like counting the links a zipper goes by as you unzip something
I like the word, even although it's probably made some English major somewhere cringe... or perhaps all of them
 
It doesn't seem to be useful in this case though
 
> A Spliterator may traverse elements individually (tryAdvance()) or sequentially in bulk (forEachRemaining()).
 
Holy sh*t almost had a heart attack. We released last night and I had an email this morning that looked like possible data loss.
 
12:01 PM
Heh, I believe I have already implemented what I was just about to implement, just need to link a few ends together to get it working
 
Still a bug, but no data losz
 
Sometimes I believe I'm stupid and sometimes I'm just stupid.
6
 
0
Q: Game of life class

user59330I'm a beginner in C++, and i'd like you to review the class i wrote for the Game Of Life. All critics are welcome :) Here is GameOfLife.h: #include <vector> #include <iostream> using namespace std; class GameOfLife{ public: GameOfLife(void); GameOfLife(const unsigned &, co...

 
@skiwi My venn diagram generator is failing... do these two areas ever overlap?
 
@Pimgd When drawn on a timeline, they sometimes do!
 
12:11 PM
@Pimgd Nice, also, this Additionally, rand could be final should include private as well.
 
12:28 PM
1
Q: Summation of primes takes forever - Java

HappyDevI have resolved the Problem presented in Project Euler# 10 but this code takes too long before producing result, 12.4195167 minutes to be exact What should I do to optimize this code? public class summationOfPrimes{ public static void main(String args[]){ long sum=0; outerloop: for...

 
@rolfl no, that's what the preceding line does
It asks about visibility modifiers... that'd be the private
 
You're right, it does, and I guess that's OK. Apparently I would spell it out more explicitly.
 
@Pimgd there's more than rand that could be final there
 
> Additionally, rand could be final, because it's only set once and then never set again. Perhaps (hint: there are) some of the other variables could be final too.
fixed
@CaptainObvious what.
I have trouble believing that it doesn't end up in an infinite loop
Ahhhh wait
that's not a goto, that's a loop label
 
which is a goto in disguise
I'm on it already
 
12:40 PM
There's nothing wrong with loop labels
 
^^^ that
Well, they can be confusing, like any other language structure, but break/continue is not the same as goto.
 
wow fgitw....
 
Loop labels are good and let you do things you can't do without...
Other than using excessive sentinels...
 
@nhgrif I have never needed one.
 
Doesn't mean they're not useful.
 
12:48 PM
  System.out.printf("Sum of primes is: %d\n", Arrays.stream(new PrimeReserveInt().getPrimesTo(2000000)).sum());
153milliseconds.
 
I've never needed a linked list.
 
FGITW on CR =D
 
what's PrimeReserveInt()?
 
Oh, just a little code I had from before ... ;-) here:
 
GOOGLE "PrimeReserveInt"
 
12:50 PM
10
Q: Thread-safe prime number source

rolflI am working on some multi-threaded code that requires a prime-number source. The following code keeps an array of primes in memory, extending it as needed. It works in the 'int' domain, being careful to avoid overflows, and to keep the memory for storing the data relatively small. it uses a st...

 
from now on, rolfl is google
4
Actually, do we have a googlebot running on CR
I recall @BlueCheeseMonster doing weird things, but I'm not sure if it googled
 
ya it should've been able to do that.
CheeseMonster ran on Zirak's Javascript Chat Bot IIRC
@Pimgd there's the 7
 
whoa wat
 
ya... looks like a bug with lists and code
or probably
 
1:00 PM
@Vogel612 That's very odd. It does not resolve that way for me.
 
ya the 7 is lost in rendering
 
 
wut?
 
(the NEVER is highlighted because i searched for it)
 
not fixed with SOUP on
what browser are you using??
 
1:04 PM
Firefox 31.4.0 (IBM special build).
Works on FF35 on my other machine too.
 
Doesn't work on chrome-latest
 
Chrome Version 39.0.2171.99 m
 
yup
 
The 7 does not render for me on my mobile android app, but the 6 and 8 do.
 
what about 5
 
1:09 PM
also vanished
 
No 5.
Maybe, because it is a prime question, it does not reveal prime points.
 
bbut then the 3 should vanish as well...
 
2
Q: List numbers/bullets get skipped when a list item begins with a quote

doppelgreenerI was just now reading this answer on the Android app v1.0.51, and noticed a rendering error in its list styles. Compare the mobile app rendering, which has the 1. missing before the first list item: To the desktop site which shows where the 1 should be: It seems the mobile app skip...

3
Q: List bullet missing with code block as the first paragraph of a list (Chrome 12)

hammarWith a code block as the first paragraph of a list item, the list bullet goes missing in Chrome 12. With this markdown Ordered list: 1. <pre><code>test</code></pre> Unordered list: * <pre><code>test</code></pre> As second paragraph, it's fine: * first paragraph second paragra...

 
1:45 PM
Should this be ?
5
Q: Poker Game Java Code for Hand Rankings

here4learnI have tried to write a small part of a Poker game to check the Poker hand rankings. Please review and provide your feedback. package com.sa.test.conditions.poker; import java.util.Arrays; import java.util.HashMap; import java.util.Map; class Hand { Card[] cards; public Card[] getCard...

It seems to solve the same problem.
 
2:03 PM
@Pimgd both the recent titles have been my suggestions to @HenrikBohlin ;)
 
@SimonAndréForsberg stop ruining my happy worldview
4
 
I believe I have showed @HenrikBohlin the importance of a good title though :)
for the 2nd question, he did try a lot to come up with a good title.
 
2:18 PM
> What works for developers should work for a lot of other people, too, as long as they’re willing to think like developers, which is the best way to think.
Amen!
is "Marc Andreessen" our @Marc-Andre????
 
@Malachi depends, does he have $40m
 
"Andreessen Horowitz" is the one that used to have 40 million
 
@Malachi "One of us!", ...?
... =D How much punctuation can you use to convey meaning or form?
 
lol
 
Also I think that this "for a lot of other people​**,** too, as long as they're willing to" bolded comma is not needed
hmmh.
welp it can't be fixed
didn't chat come with mid-word emphasis?
 
2:31 PM
Nope
 
well that's stupid
 
need a space before, and only 1 punctuation after.
So, this works, but this.... doesn't
 
I see.
 
Oh, it does.
 
Except for the part where I see more than I'm supposed to see
 
2:32 PM
what's the 1-punctuation rule, pings, that's right..... I can ping with @Pimgd.
but not with @Pimgd....
(that did not ping, did it.... the 2nd one?)
 
But that's better than the part where I would have said "except the part where I can't see" because then I'd be blind
it's not red @rolfl.. @rolfl
test @rolfl @rolfl
do both turn red
 
yes
 
okay that removes the "only first instance of name" that I would have expected
 
Note the one with the 2 .. did not ping me.
 
I know, @rolfl.
=)
hmmh... keeping track of tasks assigned to servers by another server...
My first response was "use a database" but it seems wrong somehow to use a database for something that needs to be short-term and fast
but scalability and internal communication make not using a database pretty hard
Or maybe my idea of managing and delegating of tasks is too human
as in "okay server, lets see... you're only doing 500 things right now, according to my heuristic/statistics/whatever that's rather low, so I'm gonna add this to your task list"
...
Why am I designing a multi-server scaleable video recording service all on my own again
I'm getting this feeling that I'm trying to do another field's job on an advanced level with 0 experience
 
2:48 PM
sounds about right...
 
Because the question I'm struggling right now is "how to decide when to add a new server or when to just assign this request to an existing server" -> "how to build my own load balancer"
or even how to decide what server to assign the request to
okay lets go with a database and lets make it naive and say "well server A has 500 things to do and server B has 490 things to do and each server can support up to 600 things, so with 10% margin I can assign this task to B for now, and I don't need a new server yet"
... if I do that, does anything go wrong
 
When I'm thinking and I get frustrated
I start rambling into any textbox I can find
 
0
Q: Stack data structure unit testing

magullaWhat is you approach to unit test such contract. public Stack<T>{ void push(T object); void T pop(); int size(); } How should you test your size() and pop() in order to prevent bugs(underlying data structure in not being cleaned) in implementation like below: public StackImpl im...

 
well I think I need a database because if my management server falls over I have a problem
but then what's the database running on
can't be the same server
 
3:05 PM
Hey guys, very good answer here that seems to have been over looked.
1
A: Refactoring my Todo List was on my Todo List. How's my MVC?

HeslacherMVC Quoting from the provided wikipedia link Interactions In addition to dividing the application into three kinds of components, the model–view–controller design defines the interactions between them. A controller can send commands to the model to update the model's sta...

 
Anyone with a little web design knowledge... in CSS, is having a @media print, projection {} even worth the bother?
(as in, who prints code from websites, anyways?)
 
@Phrancis old ladies
wait, print code?
 
@Phrancis a colleague of mine ran into a rather surprising MySQL "feature". I found a work-around, but I find it rather convoluted/ugly. If you have a few minutes, feel free to check this out:
0
A: Prevent MySql from mangling queries by casting string to int

retailcoderGotta love MySql ;) I searched Stack Overflow for a MySql equivalent to some isnumeric function, and found this. Assuming no Id is -1, this rather convoluted WHERE clause would return the expected 0 rows: where Id = case when concat('','3R100C'*1) = '3R100C' then '3R100C' else -1 end The ide...

 
Looks like Shog9 still has his head buried in the sand....
68
Q: Remove the limitation that stops comments from starting with +1 or -1

MikeI recently realized that a new limitation has been introduced to comments that prevents us from starting with +1 or -1 (or at least it's somewhat new -- earliest mention I can find is a post from November 2014). You get the below message: I disagree with this for many reasons, all which appear...

 
3:23 PM
16
A: Remove the limitation that stops comments from starting with +1 or -1

Shog9This change was certainly... controversial. It's been running for about two months now, and I've collected quite a bit of data. I liked the stats Kendra put together from the initial set of data, so I tried to collect some similar aggregate numbers for the full two months: Total GaveUp Truncat...

 
look at the expanded percentage!
I think that it was a good thing
 
@Malachi I hope I could be as successful as him but no It's not me :P
 
@Mat'sMug Wow, WTF
 
yeah. notice the quotes around "feature" ;)
 
3:28 PM
I gave up on MySQL long before I ran into that "feature" but I could see how it could be a major head-scratcher
 
'123abc' == 123 in
 
hi
 
hi!
 
I need to write code to run other people's (java) code and check they give the right output given some input
is there a lovely and clean way to do this? I am currently just hacking python as if it was bash
this is an autograding "system".. although not really a system yet
 
@Lembik Couldn't you just use Java?
 
3:30 PM
@Phrancis wouldn't the java also basically be doing system calls and regex's?
I mean why would it be easier?
 
Not sure, not very good with either Java or Python, but it would just seem logical to use Java to test Java?
 
not sure why... I mean they are just executables
 
@Malachi expansion is the natural reaction to having your content rejected for filtering reasons, the information contained stays the same, but the message changes
like replacing "+1" with "I agree"
 
Or replacing +1 with +1 ....
2
 
see the doubled %?
That's really really low.
People aren't adding much more than a few characters.
 
3:34 PM
2
Q: Optimize huge text file search

MikGI was directed here from Stack Overflow after a comment to my earlier question http://stackoverflow.com/questions/27921985/ I will try to explain as best as I can, so sorry for the long explanation below. I have several huge 100MB text files that I need to scan through to pick out certain fram...

1
Q: Reading Values From Enviromental Monitor XML Feed

tornupI have written the below code to handle accessing and parsing the data presented in XML format from our server room environmental monitor. The plan is to call this class from a controller/view handling the "dashboard" on our Intranet page. Is there any way I could optimize the class? should the...

 
3:57 PM
"The management server also needs the ability to boot new instances of servers"...
Hmmh
My requirements include self-replicating servers.
Soon everything will be computers.
 
Skynet ftw
 
I'm designing my requirements to fit the implementation right now because I don't have a lot of requirements
I'm also semi-terrified of having to write that code
a few mistakes and you're renting 1000 servers from amazon
 
@Phrancis
CREATE FUNCTION `isinteger`(v nvarchar(255)) RETURNS bit(1)
BEGIN

    RETURN CASE WHEN CONCAT('', v * 1) = v THEN 1 ELSE 0 END;

END
madness
 
=D
How well does that function handle this?
12345678901234567890123456789012345678901234567890123456789012345678901234567890‌​123456789012345678901234567890123456789012345678901234567890123456789012345678901‌​2345678901234567890123456789012345678901234567890123456789012345678901234567890
(24x 1234567890)
 
actually...
returns 0...
...
 
4:11 PM
=D why
 
silent overflow error I guess
 
huh, I wonder what it caps at
 
whatever MySQL int caps at ;)
 
MySQL?!
 
yeah
 
4:12 PM
Well okay, its your funeral
2
 
grown-up RDBMS have an isnumeric function built-in ;)
@Pimgd well I'm just helping a colleague here, my stuff is on SQL Server!
 
I have a feeling MySQL would silently convert that to bigint
 
perhaps 255 characters is too many in any case...
bah
Note that this function will return 0 in the event of an integer overflow.. which isn't technically wrong ;) — retailcoder 20 secs ago
 
Now, I have a feeling if you tried in INSERT that massive integer into an int column, it might break something. Or convert the whole column to bigint (which is not-so-good)
I would hope it would throw an error and not convert the column
I'll test it out on fiddle here in a bit
 
hmmm
 
4:17 PM
@Pimgd I see....
 
What's v * 1?
if v is a string?
Like... "test"
 
@Mat'sMug Idk about that. Oracle is pretty grown up and to my knowledge, it doesn't have one.
 
yeah
 
because if it's something like "TypeError"
Then I wonder what that function will do if you stick "TypeError" in
 
@RubberDuck not even something similar?
51 mins ago, by Mat's Mug
'123abc' == 123 in
 
4:19 PM
Might be, but I know our IT guys wrote one that we use. Could have been added since 8i too.
 
@Mat'sMug so 'test' == 0?
 
Are you all discussing this SQL still: select * form cloths where id = "3S100C" ?
 
13 mins ago, by Mat's Mug
CREATE FUNCTION `isinteger`(v nvarchar(255)) RETURNS bit(1)
BEGIN

    RETURN CASE WHEN CONCAT('', v * 1) = v THEN 1 ELSE 0 END;

END
we advanced a bit
 
should probably take that to SQL Helpline
 
@rolfl yeah... sorry off-topic
 
4:21 PM
Well, perhaps, but I am interested too ... ;-)
I want to know what the type is for the id column.
 
This is now SQL-code review
 
lol
 
and now this:
I'd be worried by the performance of calling a custom function (performance penalty that, if any, I don't know). A benchmark of both solutions would be interesting. — watery 1 min ago
geez
@rolfl it's an autoincrement, my bet is on int
 
@Mat'sMug I'd create an actual isinteter function to abstract away this sheer madness -> integer not inteter ;)
 
OK, so you are comparing an int = string, so the system is trying an auto-cast of the string-to-int, instead of casting the int-to-string
 
4:23 PM
oops
 
The Mysql documentation probably indicates that it will parse only the first X digit chars of a string when casting it to an int.
it will also probably specify that the implicit conversions between string and int, will favour the int.
So, the right solution is to just manyally cast the int-side as a varchar, and be done.
where Cast(id as varchar) = "3C100C"
 
actually I'm wondering why OP is even trying to use the id field as a search fallback, period. id shouldn't have any business value. that smells.
 
Except if doing weird shit with string * int will cause any other output than errors
 
@rolfl why... didn't I think of that?
 
so far I can't make sqlfiddle do what I want so I can't test
 
4:26 PM
Why is id not an int?
 
It is an int, and that's the problem.
 
> In my program's code, I have a load function. First thing it does is check the richter_code field for the search parameter. If it doesn't return anything, it then goes on to search the on the ID field for the same parameter.
and this fallback search isn't returning the expected results because of that behavior.
 
@Mat'sMug - you going to update your answer?
 
I need this colleague to sign up on CR, and convince him to post his over here
@rolfl and take credit for your work?
 
Sure, I'll go and post an answer....
 
4:29 PM
I don't really care about my DBA rep ;)
oh, I lost an upvote :(
 
@Mat'sMug Funny how : I don't really care about my rep, and the next phrase is : oh, I lost an upvote :P
3
 
isn't it ;)
maybe my post sounds a bit too anti-mysql ...
 
1
A: Prevent MySql from mangling queries by casting string to int

rolflThe problem here is that MySQL is doing an implicit conversion from the string to an int when doing the comparison.... SELECT * FROM cloths WHERE id = "3R100C" making the conversion explicit, this is what MySQL is doing: SELECT * FROM cloths WHERE id = CAST("3R100C" as int) Instead, what yo...

 
@Mat'sMug @Pimgd here is my test:
CREATE TABLE test
(
  myNumber INT
);
INSERT INTO test (myNumber) VALUE
(
  123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789123456789
);
> Out of range value for column 'myNumber' at row 1
Good thing I guess that it throws an error :)
 
@rolfl apparently it's horrible performance-wise...
I still believe the solution is to not fallback-search on Id, and leave Id in the backend where it belongs
 
4:38 PM
@Mat'sMug probably.
 
4:50 PM
0
Q: TCP Chat (Server/Client)

Daniil MolchanovI'm looking for some hints or advises regarding efficiency, performance and some good coding practices. Also I'm curious about synchronization. The server is multithreaded, so I think some operations should be synchronized. HttpServer.java import java.io.IOException; import java.io.InputStream;...

 
I'm surprised no one else wrote an answer to the question, so I had to write one.
0
A: The grid looked at the menu and said "Something with class, please"

Simon André ForsbergField Visibility Restrict field visibility as much as possible. Use private final Using this. in constructor In your constructor, you can use this. to assign your fields. This will allow you to use the same parameter name as field name. For example: public NumberGrid(int numberRows, int num...

 
the XKCD "random number" is priceless
oops, wrong answer ;)
 
Thanks @rolfl for your answer, it looks a little beyond my current Python expertise at the moment, I shall have to take some time to research this and get back to you. — MikG 1 min ago
Not my intention.
 
@Mat'sMug I think that's the case ;-)
 
Funny story - my wife makes a really good lasagne, but, it's normally very 'runny'.... so...
 
4:58 PM
well, I'm anti-mysql anyway
 
... now she makes a really good soup, with all the same ingredients as lasagne, and runny is the way it's meant to be.
MMmmmm.... delicious.
 
lol
4
lasagnasoop
 
Soupsagna
 
^^^ that, and it's what we call it... Lasagne Soup
 
and all this time I thought "lasagne" was the French word for "lasagna"
it's also a good word for "layered spaghetti code". mix that with "soup" and you certainly get... a mess a good CR post
3
 
5:04 PM
> 1995 - At a neighborhood Italian restaurant Rasmus Lerdorf realizes that his plate of spaghetti is an excellent model for understanding the World Wide Web and that web applications should mimic their medium. On the back of his napkin he designs Programmable Hyperlinked Pasta (PHP). PHP documentation remains on that napkin to this day.
5
 
1
Q: Lvl2 upgradeable attributes

Nick UdellThis is a follow up to: Lvl 1 upgradeable attributes From before: I've built the groundwork for an attributes (as in Strength, Intelligence, not as in DebuggerHidden, TestMethod) framework for my game. Each attribute can be upgraded and downgraded individually as well as part of a b...

0
Q: Text-based Snake game on Window - follow-up 2

MORTALPrevious question: Text-based Snake game on Window - follow-up Summary of improvements: Corrected the names of classes and members data Implemented Console class to re-size console window and its font size along with title and window position. Implemented drawSrting() to display characters i...

 
@Phrancis epic!
 
IKR
 
@Phrancis where did you find that... did you perchance happen upon the napkin?
3
 
5:16 PM
> 1940's - Various "computers" are "programmed" using direct wiring and switches. Engineers do this in order to avoid the tabs vs spaces debate.
lol
 
2
Q: Shoot The Messenger Part 4

Nick UdellThis is a follow up of: Messenger supporting notifications and requests Shoot the Messenger pt. 2 Shoot the Messenger Part 3 I've written a lightweight (I think) class that acts as a messenger service between classes for both notifications (fire and forget updates to other classes) and...

0
Q: JQuery custom plugin binding events

IndieRokI'm currently learning to write my first jquery plugin for a custom slider. For now, I'm halfway there, but it seems it doesn't bind any of my events. I'm trying to wrap my head around why I can't seem to bind my 'keyup' and 'mousewheel' events. Of course my plugin is depending on the Jquery mo...

 
@CaptainObvious Man that program ought to be really optimized by now after all those reviews!
 
@Phrancis That is hilarious!
 
Looks good, move on! — Mat's Mug 6 secs ago
my first "looks good" answer!
 
5:33 PM
@Mat'sMug Flagging as Not An Answer - it is a comment
 
0
A: Shoot The Messenger Part 4

Mat's MugThere isn't much to pick on, really - code is clean, naming is unambiguous, scopes all have their braces, you're yielding enumerables, comments are useful, and you even have XML documentation everywhere... I can't find anything in the code itself that's off-putting, confusing, or just wrong. Noth...

flag me, increase your "declined flags" count ;)
 
^^^ helpful
 
wut!
 
@Mat'sMug oh great, now he will remove those XML documentations for that field and post part 5 !
3
 
Hmm, the exact same repo I used from home in Chrome, doesn't work correctly with IE. Hrm.
 
5:38 PM
Thanks guys for pointing. Sorry for you time. Now I've fixed. Please review. — magulla 1 min ago
 
@SimonAndréForsberg added a bit about the IDictionary which could be a ConcurrentDictionary
 
I gotta run, and I don't know what to do with that anyway....
 
Nick writes good code and better answers.
 
@Mat'sMug oh great, that's part 6 !
 
@SimonAndréForsberg You think the above-monkey-referenced question should be re-opened?
 
5:46 PM
@Phrancis after my recent edit, I personally think it can. I'd be interested to hear @rolfl's opinion about my edit though.
 
1
Q: WPF Button Commands MVVM

Dan SewellFirst post! I have a WPF C# application that I want to move to a MVVM pattern. My first step is to remove the button click handlers from the code behind of the UI. I've found some exmaples online and then modified them to my needs. Is the following code a good way to use buttons without the co...

 
@Phrancis lol!
Free Windows 10, here I come :)
 
@SimonAndréForsberg Your edit is not as concerning as the existing answer.
 
I don't think it any longer matches the "code not yet written" close reason, at least... thoughts?
 
@anyone did I do something wrong with the <!-- language: ____ --> hints? the C# code highlighting doesn't look right.. or is it OP's code?
2
Q: From event handler to command: on my way to MVVM

Dan SewellI have a WPF C# application that I want to move to a MVVM pattern. My first step is to remove the button click handlers from the code behind of the UI. I've found some examples online and then modified them to my needs. Is the following code a good way to use buttons without the code-behind cli...

 
5:54 PM
It does, if I rollback the edits.
 
@Mat'sMug Prettify should pick up very easily on any C-like language without specifying it
(that's what it's primarily designed for)
 
@rolfl I don't think the existing answer is that bad though. It does say what he would do, and looking at the question, the OP does not do all those things already. In one way, it can be seen as a comment about the code.
 
@Mat'sMug Yes, you did.
 
mess up?
 
The command is <!-- language: lang-cs -->
 
5:56 PM
ah!
 
To do all the code, do language-all:
 
I have 2 minutes before a meeting, @Simon. I'm on the fence but happy to go on the 'trust the trusted users' side.
 
I fixed it.
 
still the getters are off. weird
 
@skiwi Wait for me!
Hmm.
 
5:57 PM
@rolfl it's only one re-open vote so far though. we could leave it for a while and see what others think
 
thanks for the edit anyway ;)
 
What about Office Touch, anyone?
BTW, @Mat'sMug, you also had the xaml wrong, it should have been lang-xaml.
 
@SimonAndréForsberg Reopened, and ta-ta-4-now.
 

« first day (627 days earlier)      last day (3406 days later) »