« first day (594 days earlier)      last day (3427 days later) » 

5:04 AM
monking
 
monking @janos :)
 
would you reckon this is too uncool:
Btw, if 4 people upvote your post and 5 people upvote mine, I'll get a hat that's really hard to get :D Keeping fingers crossed :p — janos 8 mins ago
hey @mjolka
 
@janos well OP took the comment well
 
I did save his ass
 
@janos You're trying for Red Baron?
 
5:08 AM
what's the hat you're going for/how do you get it?
 
You probably got the one for chosen answer and no upvotes too.
 
@mjolka now that you're here can I ask a quick wpf question
 
@Mehrad I know a bit of WPF too.
 
@hosch250 yes, hard
 
Sure... So I fire away
In my CollectioView I want to mark some parts as Ignored
 
5:10 AM
@Mehrad my wpf is pretty limited but give it a shot
 
the question was -3, I need it to become +3, and my answer +5
 
I won't be able to add this feature to the original data so I need to keep a list of Ignored parts
 
@janos Voted. They seemed good to me.
@Mehrad Can you give more detail?
 
then the nest time I open the app they get their tick on front of their Ignore
 
awesome, thanks @hosch250, remind me to reciprocate
 
5:11 AM
Why would you need it ignored?
Could it be as simple as a global boolean array where you check the value before you modify it?
 
I read from DB and export to CSV
 
Or something like that?
 
I want some parts to be ignored by users choice and don't make their way into the CSV output
 
I'm trying to improve the post to give you more reason to vote
 
I wish I typed the whole question in the same post. Now it's so scattered :D
 
5:13 AM
Well, I would keep a set of boolean values, and only work with/get/display/whatever the content/whatever if the boolean is set to true.
 
Does it make sense what I want to do?
 
what's the question exactly?
 
0
Q: Rotate image 90 degree clockwise recursively

MORTALprevious question Rotate image 90 degree clockwise In this code i have used tail recursive which is bad and time complexity is still O(N^2) which is worse case. only good part is memory complexity. How to improve recursive part of this code? #include <iostream> #include <iomanip> #include <al...

 
Question: Where to keep the list of the ignored parts then they will be available next time I open the app back up
 
@BallPython every time you do chmod 777, somewhere in the world a kitten dies — janos 58 mins ago
 
5:14 AM
Since i am not allowed to make alterations to DB
 
@Mehrad I would keep a list of boolean values in a file to read in when the app starts.
 
@Mehrad how about a property IsIgnored on the viewmodel
 
The property is all set up
 
Then, you could read it in to where ever you want those values, and set your properties.
 
However, since that property don't get reflected on the source of data (since I can't alter db values) they won't show up as ignored next time
 
5:16 AM
When the value is changed, you would need to write everything back out to the file for next time.
 
@hosch250 so you would recommend to store them in the file
 
right, but you have your model which you're not altering, and your viewmodel to which you can add properties like IsIgnored
 
@Mehrad Pretty much. I did that once.
 
@mjolka but what about when I close the app?
 
btw if I can get that hat I'll be tied for #1 on SE
 
5:17 AM
@Mehrad then save to a persistent store (file system, db, whatever)
 
that's all I wanted to know.
wanted to know which of the options would be preferred
 
That is what I am using now, instead of writing to file.
 
thanks @hosch250 and @mjolka
 
No problem.
 
Local App data... all I explained compressed in three words :D
 
5:21 AM
@hosch250 is that a WinRT-only thing?
i mean that API
 
I don't know.
I've only used it in the Windows Store context.
It is worth looking into.
 
emm good point
 
Sorry I didn't state that before.
Otherwise, I would write the data to a file.
 
Yep, I can't access ApplicationDataContainer in WPF as it seems
 
OK, I would probably write to a file then.
Before I figured out how to do that, I used a file, and it wasn't a problem.
 
5:27 AM
all good... still a good thing to keep it in mind
 
Yeah, especially for when Windows 10 comes around.
Almost midnight, so see you later.
 
night @hosch250
 
soo you later @hosch250
 
Reference to type 'System.Net.WebResponse' claims it is defined in 'c:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\.NETFramework\v4.0\System.Net.dll', but it could not be found
google around for a fix, fix says to install KB2468871v2
"KB2468871v2 does not apply, or is blocked by another condition on your computer."
find a 17 page thread about the issue on answers.microsoft.com
 
if somebody could upvote the OP, I think he'll be happy to upvote me (doesn't have enough rep yet) -> stackoverflow.com/q/27558740/641955
 
5:34 AM
@janos there ya go
i'm going to drink a beer and pretend that windows doesn't exist
 
0
A: Memory with a twist

rolflYES The game is cheatable. Like most software, the game is cheatable whenever there is a debugger available. In this case, I have loaded up FireBug in Firefox, and learned a few tricks. Here's how the game is cheatable. Note, this is based on playing the game from your source here: The gam...

Hehehe bounty answer?
 
thanks @mjolka, that helps!
son of a... I really wanted to crack that bounty!
 
Well, someone stole my Java attempt earlier ... ;-)
 
I didn't expect anybody else would go for it, so I was taking my time
congrats in advance on the hat too ;)
how's the daughter btw
 
I was surprised it was still available, frankly
The other bounty ones are way beyond me.
She's bounced back well... some pain killers, and a liquid diet....
11-yr olds can be like that
wants to go to school in the morning.
I took the day off in case... seems I will have a quiet day
(thanks for asking).
 
5:43 AM
good to hear. better start for today
 
Yeah... I still have to get to bed though ;-)
I have been irritable today... and yet another thing has got my goat.... but... in a more funny way.
 
oh it's still "today" for you?
 
0
Q: Makefile that places makefiles into an alternate directory (bin/)

hopeless_nerdI'm trying to learn how to use makefiles, and this is my attempt at making a makefile that compiles source files in a source directory (src/) into object files that are created in a bin directory. ########################################## # Editable options # #############...

 
for me it's tomorrow already, got a little mixed up
which is not a big surprise, after sleeping only 4 hours
 
No rep changes after posting that answer.... like, peeved at you for not actually +1 the bounty answer... then.....
I check, and there's been a fair bit, but I offered a bounty earlier...
 
5:46 AM
you actually seemed pretty much the same as usual yesterday :)
 
I am still in the negative ... so, no green notifications until I get 60-more rep... that explains it ;-)
 
yeah, I often get that mixed up too
 
I guess I should offer more bounties... ;-)
 
uhm, you reckon you could scratch my back on this one: stackoverflow.com/q/27558740/641955
 
looking
(have to put my SO glasses on before I vote...)
 
5:50 AM
by all means
 
Note, things in root's path, but not the user, are normally in either: /sbin, /usr/sbin, or /usr/local/sbin
Man, you were doing tech-support in those comments
 
well, for a Red Baron, I guess it comes at a price
uhm, with my update on the question itself, the answer should be more straight
 
That's a red-baron option... ? nice
 
well, the OP must be +3 and mine +5, and I still need serious pimping for both
at this point it's looking good though
 
Yeah, I just +1 the question now too (now that I 'get it')
 
5:56 AM
Matt/Simon/Malach would probably help
haha, thanks a lot
oh, @Heslacher still doesn't have his baron? I tried to get him yesterday
 
link?
 
not sure if the question has to be open, maybe not
oh but you probably really won't like to vote on that one
 
I imagine that the votes were not high enough when the post was closed.... (why did you vote to close it...?)
It would be a stretch for me to reopen it.... in cases that are 'margin calls' like this I tend to let the community decide.
There's one reopen vote at the moment.
 
I think he'll probably get the hat even if closed
I VTC in the first place because it looked hypothetical to me
and not enough context
 
The reopen review was a unanimous leave clsoed: codereview.stackexchange.com/review/reopen/31219
 
6:04 AM
then I noticed a comment by @Heslacher during the day he wasn't happy with the close vote
and his answer is great
so I reversed my position and VTR
 
Oh: You earned Warm Welcome on Stack Overflow!
 
wow. about time :)
 
I guess voting on a first-post is all it takes, I thought you had to do it from a review queue
Right, I need to sleep... I have one more easy-hat to earn tomorrow.... selfie.
 
yup, first post is all it takes
oh I thought you already had that
good night, and see you tomorrow
 
6:29 AM
Monking @all
@janos Not me, it was @RubberDuck
 
Monking @Heslacher
ah, maybe
 
Monking @janos
 
-1
Q: How to express this pseudocode nicely in Python?

winerdHow to express this pseudocode nicely in Python? label 'Question1' Answer1 = ask(Question 1?) label 'Question2' Answer2 = ask(Question 2?) if Answer2 == 'mistyped': goto 'Question1' label 'Question3' Answer3 = ask(Question 3?) if Answer3 == 'mistyped': goto 'Question2' Answer4 = ask(Submit?) ...

 
it's a pity the question still didn't get enough votes
trust me, I tried!
 
monking @all
 
6:33 AM
I like my helmet. Btw. it wasn't RubberDuck either. My answer just had been posted as it started with the votes to close, which are kind of valid btw but I would say it is a grey area.
Monking @chillworld
 
6:51 AM
anybody knows how to copy to clipboard compiler error message text in IntelliJ ?
 
no
 
thanks anyway
 
0
Q: How to express this nicely in Python?

winerdHow to express this Basic code nicely in Python? 100 Answer1$ = ask(Question 1?) 200 Answer2$ = ask(Question 2?) 210 if Answer2$ = "mistyped" then goto 100 300 Answer3$ = ask(Question 3?) 310 if Answer3$ = "mistyped" then goto 200 400 Answer4$ = ask(Submit?) 410 if Answer4$ = "mistyped" then got...

 
7:39 AM
someone knows the Supplier from google?
23
Q: Thread-safe cache of one object in java

iimuhinlet's say we have a CountryList object in our application that should return the list of countries. The loading of countries is a heavy operation, so the list should be cached. Additional requirements: CountryList should be thread-safe CountryList should load lazy (only on demand) CountryList...

I use this approach to in mine project to cache a table what almost never changes.
but how you know when the cache "refreshes"?
or better, where can I set the time unit?
 
no idea
 
ha me neither :D
I'm thinking I didn't use the "correct" stuff atm
 
could somebody please be so kind and give the OP one vote? stackoverflow.com/q/27558740/641955
 
7:57 AM
done
 
thanks a lot!
ttgtw, see you all later
 
see ya
 
done
ha found it
for mine probleù
 
@janos Got Civic Duty on SO
 
8:48 AM
That was interesting to watch.
A guy builds a toaster from scratch.
And when I say scratch, I mean this guy goes down to a mine to get iron and builds his own smelting pot to smelt it.
and so on for various other components.
 
0
Q: How to randomly pick element from the list of an object?

WebbyI have a POJO as shown below which will have hostname and other attributes. public class MachineInfo { private String hostname; // getters and setters here } I have my below method from which I need to randomly pick a hostname which is up for more than 10 minutes from machines list....

 
9:13 AM
0
Q: Parallel for loop in Java - follow-up 2

coderoddeThe previous iteration at Parallel for loop in Java 8 - follow-up. The changes are as follows: MyTask is removed. Synchronization removed. Now the user is assumed not to tamper with the input list concurrently while some forp is working on it. Actual forp implemented using Java 8 -facilities. ...

 
9:32 AM
0
Q: Insert new node in tree

Mary StarI have to write a function for the constitution of a new asteroid with identifier "as" at the planetary system "solid". "gap" is the gap between the new asteroid and the object of the planetray system "solid". The new asteroid should be added in the appropriate position, in respect of the "gap", ...

0
Q: Given an array of integers, return all numbers that add up to 100

Jan DrewniakI was recently given this programming challenge on an interview, and I decided to use javascript to solve it. I did, but I'm not happy with my implementation. I can't help thinking there must be a better way of doing this. The exercise goes like this: Given an array of integers, write a funct...

 
 
1 hour later…
10:40 AM
0
Q: Fastest way searching specific files

greenhoornI got thousands of files with a specific file extension in thousands of sub folders. Now, what is the fastest way to search with a pattern? I tried the method DirectoryInfo.GetFiles(rootfolder) (~8 Minutes) and a recursive custom method (~5 Minutes). private void WalkDirectoryTree(DirectoryInfo...

 
Monking
 
monking @skiwi
 
10:56 AM
Monking @skiwi
 
monking @skiwi
 
monking @skiwi
I'm gonna break chain, but hay @chillworld, I have the feeling that I didn't see you in months :D
 
Thank god, @Morwenn, because I was so annoyed at @Heslacher's capitalization.
@rolfl It surely looks like you will be given a bounty.
 
@SimonAndréForsberg You should make @Duga be able to detect combos and then write "C-C-Combobreaker!" if a combo got broken
 
@SimonAndréForsberg what ?
 
11:02 AM
@SimonAndréForsberg I'm flattered, but you don't need to call me a god :3
 
@Heslacher s/Monking/monking/ :)
 
Nor a goddess for what it's worth.
 
@skiwi and have @Duga join in
 
ok, but skiwi started it ;-)
 
true, but @skiwi didn't ping @skiwi
 
11:04 AM
Monking @skiwi!
 
monking(self)
 
@Heslacher @janos it was me, but it wasn't that question.
 
monking
 
@Heslacher: My previous edit went wrong and broke the code. I fixed it. — Ucodia 25 mins ago
 
@rolfl Point taken about your comment
Still would be surprised to see such thing in production
 
11:18 AM
Never mind. That question is quickly becoming a mess
 
@skiwi So am I
 
0
Q: Simulating a GUI windowing system

coderoddeI was eager to learn the implementation details behind windowing GUI systems. Because I am mostly a high level programmer having no much experience in low-level stuff, I had to simulate it instead of implementing the actual one such as Windows Explorer, KDE, Gnome, X11 and Mac OSX Aqua. There is...

 
@rolfl So then you are saying that it's more likely that someone would synchronize over all classes in an application, then to synchronize over all fields of all classes obtained via reflection?
 
No, want to know the most likely problem?
 
Yep
 
11:26 AM
.... he creates another method 6 months from now in the same class, and it needs to be synchronized too, and because he has these bad habits, he chooses something convenient, like the class.
@SimonAndréForsberg Did you manage to debug it too?
 
@rolfl Ah, I see, that could be, yes
 
After I posted, I retraced the process, and I had to hit f5 a few times before the script[9] appeared
 
Its winterbash, so
0
A: High - Low Number Guessing Game

HeslacherI have voted to close, but hey it's winterbash. BUG and unexpected results Your code does can't escape this loop, unless you are hitting STRG + C while (playAgain == true) { printHeading(money, min, max); playGame(money, max, min, percentage); } because playAgain is never cha...

 
@Heslacher What are you aiming for? Red Baron?
 
yes, the question had -3 before I posted
and hosh250 would be happy too
 
11:34 AM
@rolfl I haven't debugged it yet, I've just read your answer. You wanna try debugging an obfuscated version as well? :) (I do wonder a bit how much harder it would be...)
 
@Heslacher I don't believe it will work, I think it has to be at <-3 when you answer.... but I'm happy to try.
 
"answer +5 a -3 question that goes to +3"
this should do
 
11:46 AM
Anyone here familiar with actually designing programs before you start coding?
 
@skiwi depends on what you mean :D
 
Starting with creating an URD and SRD might work...
URD = User Requirements Document: What the users need to be able to do
SRD = Software Requirements Document: What the software needs to be able to do
 
well... sorry no :D
 
Hey guys, there have been some serious improvements to this post. I don't think it's a -5 question anymore.
-4
Q: Cycles of pointers

G0867532I'm really inexperienced with cycles, so I want to make this code shorter. As far as I know, I've made a recursive cycle. for (Pointers[0] = 0; Pointers[0] < 8; Pointers[0]++) if (AdjM[Pointers[0], VertStart + 0]) { for (Pointers[1] = 0; Pointers[1] < 8; Pointers[1]++) { ...

 
It gets awfully silent in this chat when I talk about designing before coding!
2
 
12:00 PM
it already was quite quiet
 
Uh yeah @skiwi I am.
 
@skiwi not really...
 
Kind of at least. I do something similar. I sit down with the users and figure out what they want, then go away and write up a URD. Send it back to them.
Wash rinse repeat until they have a friggin' clue about what they want.
2
 
@skiwi What is your question about it ?
 
@RubberDuck I've been taught that that can be quite a tedious process
@Heslacher I'm wanting to do proper design before starting to code on a project... I first thought about starting with a class diagram, but that doesn't make too much sense imo. Now I'm thinking about an URD/SRD first, but don't know what's after that and I'm still looking for advice or tips on how to approach it
 
12:10 PM
Only if you let it be @skiwi. My advice is to go them with what you think it should do and let them adjust from there.
And don't go for one of those big 20 page URD templates that IT depts use. Your URD should fit on one piece of paper. (front & back if need be)
Keep it simple. Simple simple simple.
3
 
@skiwi I'm familiar with it, buuuuuut I don't do it.
 
It's also important when to say enough is enough, we need to start building it. I work in this bastardized hybrid of waterfall/agile that works really well for me.
 
The user should evaluate what he **wants**.
You will evaluate what the user **needs** and any problems which can arise.
You will match them together.
Probably starting at top.
Then you can start doing UML's
 
-1
Q: This my code in view page. I set 3 rows as default and i want to add a new row when click add button. can anyone help me pls

Jeni <table class="table table-striped terms" id="terms"> <thead> <tr> <th><h4>Name</h4></th> </tr> ...

0
Q: Divide certain distinct row values into seperate columns - performance

St0fferThis might be difficult for me to describe clearly but I will try anyway. Also note that this is entirely speculative; it might not even be able to run any faster (that is why I am asking). So this is a question directed at performance. I have been trying to improve the performance of a method ...

 
Ahem What the user thinks they want.
 
12:22 PM
Right
 
@RubberDuck I'm intending to make a simple Github wiki page for those
 
0
Q: WCF duplex service is ignoring custom username authentication

PhoenixI have a WCF duplex service that is using the WSDualHttpBinding. It is set to use custom username/password authentication via a UserNamePasswordValidator. The service works fine and never generates any errors. The problem is that I am able to connect to it without any authentication. This tells...

if anyone has any idea, that would be great :)
 
That's a really good idea @skiwi.
Speaking of, has anybody found a good way to embed UML into a GitHub wiki? I've been searching to no avail.
 
When a WCF service is hosted in Internet Information Services (IIS) using transport-level security and the UserNamePasswordValidationMode property is set to Custom, the custom authentication scheme uses a subset of Windows authentication. That is because in this scenario, IIS performs Windows authentication prior to WCF invoking the custom authenticator.
you are talking about this?
yep i have missed to add that to the question
the service is self hosted using wpf app for now... i am going to switch to a windows service later
i will update the question
oh and also using message security
 
12:34 PM
No, below this
The following example shows the <serviceCredentials> fragment to this point.
 
give me a minute to update the question... explaining in chat is not the best thing :)
ok updated @Heslacher .. sry for a being a bit clear, hope i have cleared it up now
unclear* lol (can't edit more than once?)
 
can't edit after 2 minutes
 
i see
 
1:02 PM
0
Q: Yet another smart pointer implementation for learning

arcomberI based this implementation on CountedPtr in The C++ Standard Library book by Nicolai Josuttis (page 222) and also available online here: http://www.josuttis.com/libbook/cont/countptr.hpp.html. I know that I can use the C++11 smart pointers but this is a learning exercise and also for some proje...

 
The OP is not asking for a recommendation on logging tools. If log4net somehow allows you to log errors without having to place try/catch blocks everywhere, then please update your answer to include how. — Grant Winney 8 mins ago
^^^^ I agree
 
seems like i haven't understood the question correctly then
oh well... what hats did you say i can get for downvotes of answers ?:D
 
Wait for -3, delete your answer, and get a badge too
 
kk thanks :D
 
1:08 PM
The title of the question is a bit misleading
the last paragraph is the real issue: It works, but I'd then need to encapsulate every single method in a try/catch. Is there are simple way to do this?
 
Business in the front party in the back hat :D
 
I think, right now, is a special time on stack exchange, it is both Friday, and Saturday....
Let me experiment for an hour..... Fun! Fun! Fun!
3
 
Monking!
 
Monking!
 
Hey @All .... keen to race me for a badge ... ;-)
not a badge, a hat!
By my calculations.........
WInterbash clock is not the same as the regular SE clock... some days in winterbash are 48 hours long.
 
1:15 PM
Sure
TTGTW though
 
What hat are we racing to @rolfl? I've got my eye on one atm already.
 
28
A: Why didn't (or did) I or some other user get a hat although the requirements were (or weren't) fulfilled?

balphaLeeway on date-based hats Unless the requirement mentions a specific timezone, hats that are date-based are often awarded for 12 hours before and 13 hours after the specified date in UTC, to accomodate people everywhere in the world. This means you can earn such a hat even though for you it's no...

 
Oh wait! It's Saturday?!
Shit.... work.... hat.....work...hat.....
 
Sorry, false alarm: Bill Lumbergh is Saturday UTC!
 
So, that's like 7 EST tonight.
 
1:17 PM
yes..... I should have been more careful before I posted.
 
Getting me all excited like that.... lol
 
Yeah, thing is, I was excited longer than you.... I was the 'biggest loser'.
 
LOL. Ahhh it's all good. I have another hat to earn.
If people would check the review queue at least....
 
I don't believe there is much more to say than what I have already said there. You want me to copy paste the tutorial? This is just my opinion. You can downvote as much as you wish. I wont stop you. — Phoenix 21 mins ago
@Phoenix Just a note: That ^^^ attitude will only give you more downvotes.
I had to downvote you as well
 
@SimonAndréForsberg noted
 
1:26 PM
that comment was honestly what tipped me over the downvote-edge.
Link-only answers are totally frowned upon on SO, and on SE in general.
for the same reason that we want to embed code inside the questions.
Sooner or later, all links must die.
3
 
1
Q: Note taking app (saves notes to an array) - How to make more object-orientated?

Jonny ShanahanI created the following app (only saves the notes in an array so no a proper note taking app). I would like to know how I would make this code more object orientated please? Thanks JSFiddle: http://jsfiddle.net/ektyL5hg/ script.js: $(document).ready(function() { var notesArray = [], ...

 
Or as Dominic would have said it: All links die at the end. (@rolfl and @Donald.McLean knows who I am talking about)
 
@SimonAndréForsberg It really wasn't a link only answer though. The point of the answer was to recommend the usage of Log4Net, not to link to a tutorial.
 
@SimonAndréForsberg Mini!
 
On the good side, I am a downvote away from my hat xD
 
1:30 PM
It's not a hat, it's a badge.
 
Ok. Badge
 
Hey @rolfl there's some weirdness going on here in the suggested edit queue codereview.stackexchange.com/review/suggested-edits/31261
 
@Phoenix There's still a whole bunch of reasons why the answer isn't a good one. Without the link, it's only a recommendation to use Log4net. And as noted in a comment, that won't solve the fact that you need try-catch statements - which is what the question is really about.
 
> Updated code to match updated question
 
@SimonAndréForsberg Ok.
 
1:32 PM
Looks the question was closed for being broken after there were already answers.
Now OP is suggesting an edit to an answer. No idea what to do with it.
 
@RubberDuck I rejected that edit.
 
@Phoenix go get your badge.
 
:D
 
Please stop continously updating your question. See our meta question Can I edit my own question to include revised code? for what you can do after having received answers to your question. — Simon André Forsberg 8 secs ago
 
@RubberDuck Gotta leave ... you guys are all trusted, right ... ?
 
1:34 PM
@RubberDuck I guess the OP is not aware of that ^^
 
Yeah @rolfl. It was just an odd situation. A bit over my trusted head is all.
See ya later!
 
BBL .. probably ;)
 
@SimonAndréForsberg I rolled it back.
 
@RubberDuck thanks, I also wanted to do that but didn't find which revision to roll back to...
 
I think the last one before re-opening was okay. I think
 
1:39 PM
Zombie (almost) down
0
A: C# Multi-checkbox validation MVC4

TopinFrassiI'll answer your second question first! The fact that one of your your checkboxes needs to be checked is a validation that is more about your class than one of your checkbox. I mean, individually, a checkbox doesn't need to be checked, but your model requires one of them to be. Which is why I wou...

 
@TopinFrassi Nice answer
 
Thanks :)
 
My answer was deleted :(
http://meta.stackexchange.com/a/245717/262429
Guess I was wrong then.
 
And Breaking Bad!
Bam!
 
Bounties don't seem to be as effective on CR as they are on SO... I know that has been discussed on Meta before, just realizing it now.
 
1:50 PM
You really have to put up a big bounty to get attention. We're pretty good at voting, so it's easier to gain rep.
 
Hmm
 

« first day (594 days earlier)      last day (3427 days later) »