« first day (608 days earlier)      last day (2122 days later) » 

2:03 PM
has anyone seen an E-mail address like ...
> "Smith, Jane"@example.com
Never, but that doesn't mean it isn't valid.
I'm seriously amazed that the internet works at all.
I have 3 hats to get, and will probably never get them....Naruto, Red Baron, and tReasure Hunter
oh and the light bulb
That's pretty much where I'm at.
I have plenty of hats though. I'm a happy duck.
I think we should get someone like @rolfl to screenshot all the hats in high quality so that we can photoshop them into profile pictures whenever we want.
I've been taking snapshots of my avatar with hats on so I can wear different hats through out the year.
2:20 PM
@RubberDuck I have a screenshot of all the hats that I got this year, and they are all on a white background blown up so I can use them where ever. I just have to remove the white background...lol
hey @RubberDuck if I try to Add an empty value to a MailMessage.CC will it freak out?
this is what the code looks like, and I don't like it
if (!String.IsNullOrEmpty(Settings.Default.ErrorRecipientCc))
@Malachi I have no idea, but that does look a bit smelly.
and my first Y2K15 bug
Why would your default be null or empty?
Oh yeah? Do share.
it's not a default
it calls a settings file. which I am changing
I am making it call different resource files based on the compiler being set to release or debug
@Malachi At least MailMessage will alow this. See also
2:26 PM
@Heslacher thank you. that means some of those answers on my question are false
If the link is correct.
     * @throws  DateParseException  If the date could not be parsed
Yeah, Javadoc!
@Malachi Will throw an exception.
@skiwi hmmmmmm which one to star?
@Heslacher so I have to check whether it is null before I add it? can I send it an empty string?
2:29 PM
Yes, Nope
@RubberDuck Both, it is, indeed.
Yes for check, no for empty
I am going to have to use an isnullorempty function.....
which is what they are doing.
You can also wrap it in a nice positive function `HasValue()`

if (HasValue(Settings.Default.ErrorRecipientCc))
I think I am going to have to post this one....
@Heslacher that is pretty much the same thing
2:31 PM
But it looks nicer
@Heslacher yes it does
Monking @Phrancis
(and the others which I haven't monked)
monking @Phrancis
3:06 PM
Writing documentation is painful
@janos you could still get another hat.... business in the front, party in the back
Q: Looking for idiomatic template usage in C++

JT1I posted another snippet of code a few weeks back when I started learning C++. Here's my second try now that I have some time to play with this again. The goal is to write a generic algorithm for reversing the "words" of a container with a bidirectional iterator. Separators of words are any value...

@skiwi There has to be a reason to answer questions on code review ;-)
> I think I’ll sign up for an email address like phil.h\@\@ck@haacked.com and start bitching at sites that require emails but don’t let me create an account with this new email address. Ooooooh I’m such a troublemaker.
Hmm, a coworker of mine just asked me a question about Java 8, gave him an answer, he decided to use SO to read more about it, ends up reading my answer on SO, then points it out ;)
3:19 PM
@skiwi That's funny! Did you tell him that was you?
@Phrancis He knows my SO username :)
Aha ok
Q: A Markov text generator in JavaScript

vvyeThis is a Markov text generator I've created in JavaScript. I'm pretty sure the term "Markov" applies, anyway. The way the generator works is like this: it first divides the source text into unique "chunks" of length n (specified via the order parameter, greater = more coherent result), and, for...

Ha! Did you see this one @Malachi? haacked.com/archive/2007/03/07/…
> Specs are always a poor approximation of what the client really wants. All specs are broken to one degree or another
3:36 PM
@RubberDuck ain't that the truth
@RubberDuck good read
I am seriously beginning to hate our IM department. Why I can't get two identical test files in a row is a mystery to me...
And my wife wonders why I drink so much....
@Malachi Did you see this regex form the comments of your link ?
@Heslacher where is that?
Comments sorted by oldest answer to first comment
That's a complex task to solve!
IntelliJ seems awesome btw
I had a multi-module Maven project, and after setting SVN path and adding a JDK to IntelliJ, it just worked
Only trying to figure out how to build it lol
4:01 PM
Q: Method for changing strings to integers

user3599420I am implementing an ID3 and I am using the method below to change the value of an attribute to 0,1,2 etc to avoid string comparison later on. //returns an integer corresponding to the symbolic value of the attribute. If the symbol does not exist in 'cons', the symbol is added to the contraints...

Q: quicksort function

morbidCodeI made a quicksort implementation based on this code. Please review my C++ version. template<typename I> I partition(I low, I high) { auto p = *low; I i = low, j = high+1; while (true) { while (*(++i) < p) { } while (p < *(--j)) { } if (i >= j) { ...

Q: Simple wrapper class for win32 console

MORTALbased on a library called Consoledefender V 3.3 http://www.coding-board.de/resources/c-lib-fuer-manipulationen-am-windows-consolefenster-v-3-3.30/ i made minimal class for personal usage based on this library by using C++11. it actually takes user input and prints it back on console Screen. it ...

5:03 PM
Q: Flying-balls on a canvas element - what could get better?

StreppelWorking example at http://jsfiddle.net/x09h2p21/ I have made this little program for fun, to add on my personal webpage. I remember seeing something like it some time ago, don't remember exactly where, and I tried to reproduce it myself. As it turns out, I figured out that it isn't quite fun...

@JeroenVannevel Would you mind if I asked a couple more questions about your answer when you have time?
in 12m49s
Q: PHP MIMEType Class

Ismael MiguelSince there isn't a very reliable way (in my opinion) to get the mime type of a specific extension, regardless of the file actually being of that type or not. This type of thing usually is used when sending a different Content-type when you intend to send, for example, an image. Here is the cod...

@JeroenVannevel That's oddly specific.
5:14 PM
Don't interrupt him.
It is probably a video or an exam or something.
S4E17 of Prison Break
What questions did you have in mind?
About the Resource file.
I just created one, and it would work perfectly, but for one thing.
For each menu item I have, I have a XAML page in a List<Type> too.
Right now, I have them in two lists maintained together, but I am making a class for them.
Anyway, how would I keep them together this way?
Q: Variable declaration in/before an if statement

PugsOverDrugsSo, I have an if statement that says something along the lines of if( a ) { string name = getName(); //do thing a with name } else if( b ) { string name = getName(); //do thing b with name } But there is always the option that both a and b are false, which means that the name v...

I'm not quite following what the problem is
What is in your resource file?
A Name value and a String value.
5:30 PM
Okay. What's the thing about List<Type>?
That contains the list of pages I navigate to in my DataFrame.
Like this:
        private static Type[] _pages = { typeof(WindowsData.Menu1), typeof(WindowsData.Menu2),
                                         typeof(WindowsData.Menu3), typeof(WindowsData.Menu4),
                                         typeof(WindowsData.Menu5), typeof(WindowsData.Menu6),
                                         typeof(WindowsData.Menu7), typeof(WindowsData.Menu8),
                                         typeof(WindowsData.Menu9), typeof(WindowsData.Menu10),
                                         typeof(WindowsData.Menu11), typeof(WindowsData.Menu12),
How do you use this to navigate then?
In code using my unfinished class:
private void NewSelect(object sender, SelectionChangedEventArgs e)
I haven't got my names finished, but those Items are two different objects.
ListBox: Items.SelectedIndex
VM list: Data.Items
What type is in the VM list?
how does MenuItem look?
This is MenuItem:
    public class MenuItem
        public MenuItem(string Title, Type Page)
            _title = Title;
            _page = Page;

        private string _title = "";
        public string Title
            get { return _title; }
            set { Title = value; }

        private Type _page = null;
        public Type Page
            get { return _page; }
            set { _page = value; }
Sorry for not posting this in the question, but I didn't realize it would become a review of my navigation.
5:35 PM
k, so you're working with Type instead of the enum
So far. I haven't got that implemented yet.
I need to have Type to navigate like this: DataFrame.Navigate(typeof(XAML page));
I still don't see where you use _pages or Pages() though
so why don't you just use DataFrame.Navigate(myMenuItem.Type);?
To initialize:
        for (int i = 0; i < GlobalVars.Menus().Length; i++)
            Items.Add(new MenuItem(Menus.ElementAt(i), Pages.ElementAt(i)));
I wouldn't do it like that
You're first creating 2 distinct collections and then iterating over them and grouping them into a single object
So, my question is where should I store my list of types, since the Resources file won't let me keep it in there?
5:38 PM
since you're going to write it all out anyway, you might as well just write them out by hand
don't store them in a collection
Just do this
Items.Add(new MenuItem("fleshlights", typeof(FleshlightPage));
// all others
where the menutitle can be retrieved from the resource file
it will also avoid problems where your title might be in index 5 but the corresponding page is defined in index 6
Why don't I just hardcode the menu title too?
because then you can't change it when you want add support for dutch
Oh, I see.
5:40 PM
The page file is static: that's always the same
the displaytext isn't
Now, one more question.
How should I display my menus/submenus then?
As in: in absence of a proper TreeView?
That is what I am currently doing.
Haven't really thought about it but one way to make it somewhat proper:
use a ListView for the menus as you do now but also add a breadcrumb to the top of the page
Basically, I have a bunch of lists for each menu, and add/remove them from Items programatically as needed.
5:42 PM
that lets you go back to an upper level
I'll look into it.
No problem
I'll go workout and shower now so I can finally put on clothes for today
6:05 PM
Q: HMSegmentedControl react to tapping on currently selected segment

hgwhittleI'm using HMSegmentedControl, an open-source UISegmentedControl subclass. I'm trying to react to the user tapping on the currently selected segment. HMSegmentedControl only supports reacting to a segment CHANGE, with either UIControlEventValueChanged or a block that executes when the index is cha...

Although you posted existing code, you're really asking for advice about code not yet written, which is off topic here. — RubberDuck 19 secs ago
6:28 PM
@Hosch250 - I got curious about the N-Queens problem....
I put together a generic solver for it, and, well, I can solve the 8-queens problem using brute-force, in..... 0.1 milliseconds.
The various size n-queens solve in:
Ran task: Size 1 in 0.022ms
Ran task: Size 2 in 0.003ms
Ran task: Size 3 in 0.004ms
Ran task: Size 4 in 0.006ms
Ran task: Size 5 in 0.008ms
Ran task: Size 6 in 0.009ms
Ran task: Size 7 in 0.031ms
Ran task: Size 8 in 0.100ms
Ran task: Size 9 in 0.410ms
Ran task: Size 10 in 1.730ms
Ran task: Size 11 in 8.897ms
Ran task: Size 12 in 51.413ms
Ran task: Size 13 in 359.036ms
Ran task: Size 14 in 2821.972ms
Ran task: Size 15 in 65391.642ms
My algo solver can solve it about that fast.
6:30 PM
That's less than 1 millisecond.... right...?
Do you want me to post it for a review or something?
Unless it is megaseconds.
Not unless you wanted to, but I was curious, and there was discussion, and jsut, well, I have never solved it before.
That would be Ms though.
How did you do it?
Did you just check combinations, not permutations?
I don't remember the rules of the assignment, but the point was we were studying heuristics and brute-force to see which is faster and that type of stuff.
6:44 PM
I am bored...
I'm busy and tired.
Don't you love that combination?
Me either, I was being sarcastic.
Id' rather have nothing to do and be energetic.
Well how was I supposed to hear sarcasm through the internet?
I know, I've read that the internet doesn't convey sarcasm well.
We need a sarcasm font.
What should it look like?
How about this: This is some sarcasm?
6:49 PM
Oh, really?
Just use the ` codes ticks.
I've always like italics for my sarcasm.
Bold sarcasm
Oh yeah, because that's soooo clear
6:52 PM
Soo, discussing N-queens problems recently? Interesting. I have also actually never written any code to solve that one.
I didn't do an N-queens solver, just an N=8-queens solver.
Actually, I did three of them.
They would probably be easy to port, but I'm not doing any more Java than I have to.
I'd rather do C++ or C#.
Java takes twice as much typing.
And X times more files.
@Hosch250 doesn't really matter which language you do it in IMO, algorithms will be algorithms.
I prefer Java over any other.
6:56 PM
@MannyMeng hmm any?
that's a bold statement
I know, but some languages take more text to express an algorithm.
pick the right tool for the right thing
@Hosch250 If you can't write concise java, you're still learning it
The algorithm principles is the in Java, C++, C#, Python, Brainfuck...
6:57 PM
oh you'd be amazed ;)
I was going to say @SimonAndréForsberg, you might want a different algorithm for a turing machine.
some things are boilerplate (getters and setters), but most of those are optional anyways.
and everything else is mostly a matter of naming and knowing the right library ;)
Well, I won't deny the learning part.
neither would I... though I feel that my java is getting into the realm of advanced
@RubberDuck well, an algorithm for a turing machine is obviously not the same as an algorithm for the N-queens problem... or did you mean "another language for a turing machine"?
6:59 PM
That's nice.
I think I'm sort of intermediate in C++ C#, but I don't really know.
It's good to be back and have something to star again, btw. How did I survive without stars?
Beginner intermediate, maybe.
hmm intermediate in c++ is usually helluva lot better than intermediate in java
@SimonAndréForsberg You missed a starstorm
@Hosch250 Are you using using namespace std; ? If you are not, you are at least intermediate.
7:00 PM
@SimonAndréForsberg I just meant that an optimal algorithm for the N-Queens problem might be different when you're using a Turing Machine to solve it.
since c++ doesn't hide that much of the memory and os carp from you
I had just learned abstraction/encapsulation when I stopped for college.
@skiwi a starstorm? As in... singular? I'm disappointed.
@SimonAndréForsberg Not anymore.
@RubberDuck oh definitely, that's true.
7:02 PM
Unless I want to write a 5-10 line script thingy just to test something or modify a file quick or something.
When you only use int main() kind of things.
@SimonAndréForsberg Go back to UTC 12:00 on Jan 1st.
Every message on our screens was starred.
I ran out of stars in about 10 minutes.
So I didn't have them for 23:50 hours.
@Hosch250 yeah, I did read that conversation a little bit. I posted something from Prague a few hours after - which also got starred
yesterday, by Simon André Forsberg
22000 people in Prague wishes everyone a happy new year!
Oh, yes.
Did you tell them all?
unfortunately no :)
7:20 PM
Hey! That means @Duga has a hat!
@RubberDuck I believe @Duga already has a hat
haha! You're right @SimonAndréForsberg. He's a Sumo Judge.
I hadn't noticed.
He has 4 hats.
@Hosch250 I'm pretty sure Duga is a she ;)
7:26 PM
I think it is an it.
@Duga is indeed a she. It is a female bot.
Q: N-Queens - Brute force - bit by bit

rolflA discussion in The 2nd Monitor made me realize I had never 'solved' the N-Queens problem. Additionally, as I read up on it, I realized that the 64-squares in a chess board would work well if represented as bits in a 64-bit long.... That was a nice thought, but it became complicated, and really, ...

@CaptainObvious Another Monkuestion!
7:50 PM
Q: Inside a loop: must check flag value and assign or just assign?

celernoInside a loop: must check flag value and assign or just assign? Scenario: I must turn on a value when at least one item from a collection meets one condition. I will stop the loop when an Item meets the second condition. var bAtLeastOne; var bAllValid; for (int i = 0;(i < collection.length &&...

@CaptainObvious Refusing to read it until I have implemented it myself in Brainfuck!
@rolfl don't you have a query for "wow" comments? It might help me find some Night and Day candidates.
8:21 PM
@ThorbjørnRavnAndersen, most important to us is probably getting them to reboot Firefly, ideally on Netflix, so we can binge-watch it. But after that, it's you guys. Stevve's description of "why MS would want to advertise here", is a different thing than "how can we improve this experience for our best users," which is always the top question. No one - MS included - will have much use for us without the efforts of users like you, and we never lose sight of that. — Jaydles ♦ 4 hours ago
8:33 PM
Q: CodeEval Interrupted Bubble Sort

RahulIn interrupt bubble sort, we need to stop the sorting based on the iteration count. Seems pretty straigtforward to me. I have a pseudo-code which seems to works fine in ipython. I am not sure, what is wrong in my complete code s = '36 47 78 28 20 79 87 16 8 45 72 69 81 66 60 8 3 86 90 90 | 2' ...

8:48 PM
Q: Move a line in a file

Philippe BlayoIn groovy 1.8.6 I need to move a line just before another one: fileToChange = new File('.classpath') linesToKeep = [] fileToChange.eachLine { if (it.contains('line to move')) { lineToMove = it } else { linesToKeep.add(it) } } fileToChange.withWriter { out -> lines...

@Hosch250 How? OP was saying that it was psuedo code before the edit, but suddenly somehow the code works and is real code even though the code hasn't been edited???
He says it runs in Python.
Hm, the code hasn't been edited.
Anyone want to check out a hot Security Question? --> security.stackexchange.com/a/77295/20208
Q: Could I write that python class with better readability?

carlitusCould I write that python class with better readability? Please, fell free to suggest a faster way to do the same or missed common practices in the OOP. CURRENT_LINE = 0 SIGNS = 1 class BaseError(Exception): def __init__(self, value): self.value = value def __str__(self): ...

9:26 PM
@Phrancis I know it is Python, but he said it had some indentation bugs.
He never posted the fixes.
Ah, indentation issues... that would change how the code behaves in Python (weird language)
Like F#.
A brilliant WPF guy likes F#, but I want C#.
I think we should kick off with a Whitespace version.
made it a bit more prettier. — Rahul 3 mins ago
It runs, but I have no idea if it does what it's supposed to. ideone.com/qfUZvR
I know.
Yanks hair out
I give up.
I left a comment with a link to the IDEOne. Flagged all the other comments as obsolete. I'm walking away from it.
9:49 PM
Wise ducky.
10:09 PM
@CaptainObvious Seems like the monkey has time on hands again! ;)
10:23 PM
@skiwi Perhaps... also answering high-visibility C++ questions now.
okay ;)
I had Netbeans, Eclipse and IntelliJ IDEA open at the same time
I'm tempted to try IntelliJ IDEA for rumors that it's a good IDE, and on top of that it seems to be the only one with proper support for Gradle build system, which I'm about to test
10:37 PM
Q: Basic Binary Tree in Go

mikuAs an exercise I have written a basic binary tree implementation in Go. Tree struct: type Tree struct { Key *int Value interface{} Left *Tree Right *Tree } func New() *Tree { return &Tree{} } It a annoys me a bit, that Key is a pointer, but this is needed at the moment...

10:54 PM
@nhgrif Nice to see you on Cooking.SE :)
I have also been on Cooking.SE for a long time but never participated. I guess that I'm more fit for Burning.SE :/
@Morwenn lol
I remember that one time when I got a one-meter flame while trying to cook mushrooms in a frying pan.
Oil spill?
Something like that. The oil was too hot by the time I managed to open the can (Paris mushrooms) and too much water went in the pan with the mushrooms.
11:08 PM
Ahh that sounds like the cause. Mixing very hot oil and cool water is dangerous!
I learnt that day.
TTQW finally.
Q: Small test project for basic C++ concepts

Yorick de WidIn a few months I'll work on a C++ project that could span a year or two. I've a strong C background and for the usual reasons I always chose C over C++ (please forgive me). To extend my capabilities and to move from C to some more powerful language, I felt the time has come to take a serious ste...

I have a better story about flames.
The guy who wrote my Advanced Chemistry book was in a lab once.
One student was working with an open flame on one side, and another student opened some highly-flammable mixture 40 feet away.
The vapor of the mixture floated across the room, and a 40 foot stream of flame shot out and burned the stuff right out of the can.
Nobody was hurt.
11:13 PM
@Hosch250 I learned the difference between concentrate and dilute HCl the hard way....
As a kid, in high-school, we did the standard 'collect hydrogen gas' byt putting magnesium in HCl.... producing H2 and MgCl.
Oh, just remembered. This was an ether.
You then collect the H2 in a test tube, and burn it, and it creates a 'squeeky pop'.
Fun, right?
I never did it.
Well, if you are in a practical, and do it yourself with your magnesium pencil sharpener...
Sounds interesting.
11:15 PM
and your teacher is not paying attention....
and you use Concentrate HCl instead of dilute, well...
The class room explode?
the dilute reaction with magnesium is exothermic, and the heat produces water vapour too....
and the water vapour moderates the burning hydrogen
With concentrate, there's no water vapour, and as a result, there's no regulation, so, like a twit, I put a match to the hydrogen, which exploded.
I know hydrogen is highly flammable.
with me holding the test tube in my hand....
11:17 PM
Remember that Hindenburg?
the test-tube flew out of my hand like a rocket, through the ceiling tiles, and dshattered against the concrete floor above that....
and I got detention for a week,.
I'll remember that.
I should go into the Hydrogen Rocket business.
Anyone want to try to improve this title?
Listen near the end for the squeaky pop.
Note, lighting it like that is dangerous.... I at least let the hydrogen collect in an upside-down test-tube (hydrogen is lighter than air). There was no acid in the test tube I put a match to....
Yeah, I figured that.
I would do that too.
Also, the fact that it flew UP was a huge tip.
11:22 PM
Oh, and hi. :-) I didn't come in earlier because I'm trying to conserve some airtime data.
@Jamal Tracking Eye Movements?
Ready to submit, if you like it.
I'm good with it
Any Linq whiz here?
@rolfl getting detention, that's a new one to me
It was better than getting caned.... Got caned a few times too ;-)
kids these days...
11:30 PM
Ouch at caning
I believe I haven't done much wrong myself...
Was a too brave boy in hindsight ;-)
@Hosch250 I'm more of a Cheez Whizz, but what's up?
@Mat'sMug Well, I actually halfway figured it out myself.
I have an ObservableCollection<MyType>
MyType is a container for <string, Type>
I want to use Linq to extract the string part and return it as an ObservableC, but I don't think I can.
Linq works off enumerables. But you can create an observable collection from an enumerable
11:41 PM
Linq has several methods that work in OC's, but I solved my problem.
They work off IEnumerable<T>, which the OC implements
OK. Anyway, I solved my problem, almost.
Now I need to tie in my changes.
I just used a foreach and added each half to a new OC.
I'd do a new ObservableCollection(items.Select(e => e.ThatStringIWant));
I want the Bugdroid hat.
Anyone able to recommend an android emulator?
(for windows)
No, I was thinking that myself, but I decided no.
11:45 PM
@MannyMeng Hats will disappear in a few days anyway.
I'll get another hat.
Nevah too many hatz
I could get two for posting with the app as well.
@Mat'sMug Thanks, that is exactly what I was looking for.
I had been trying to use .Where, but that returns a boolean.
11:48 PM
Select makes a projection, and returns another enumerable of the type you're selecting. Very very useful ;)
Yes, I'll remember that.
I'm getting quite good with my lambdas now.
You can project a selection into an anonymous type too, and that's useful for groupings (.GroupBy)
all my lambdas have crowbars and HEV suits
11:53 PM
'Night @Morwenn
@Mat'sMug Thank you, see you later :)
Note to self: not using a laptop for a year, makes a truckload of Windows updates to install.
seems like if I even go a few months without, I have to download multiple gigabytes of updates :|
[retailcoder/Rubberduck] 0 commits. 6 issues opened and 0 closed
@Duga yeah baby!

« first day (608 days earlier)      last day (2122 days later) »