« first day (1025 days earlier)      last day (2978 days later) » 
00:00 - 17:0017:00 - 00:00

5:00 PM
@Mat'sMug Many more to come I'm sure ;)
 
:)
 
0
Q: remove last odd number from number list in Python

StidgeonThe simplified question is: given a list of numbers, write a Python script that will remove the last odd number from the list. One of the challenges is if the last odd number appears multiple times, some approaches will remove the first occurrence of that number, rather then the last. My soluti...

 
@Mat'sMug do you know a way to search for "whole word" match in a SSRS report field (from the user-facing end)?
 
Ctrl+F?
or do you mean a parameter?
 
Like I need to search for the acronym "MEC" but it matches things like "homecare"
 
5:09 PM
oh
use a case-sensitive collation?
 
Ah, I'd have to change the report then eh?
 
is the "word search" a parameter?
 
you shouldn't have to change/redeploy the report to do that... unless you have the T-SQL embedded in the report?
hmm, that's the report viewer's search functionality
 
Right
 
5:11 PM
tough luck I say
 
Sorry I didn't make that clear
lol thx
 
add a space after, perhaps
 
Maybe I'll export to Excel and see if I can do it from there
Yep that works
 
0
Q: Check if the user is 18 years old (upto days)

Em AeDateTime minAge = new DateTiem(); Days days = Days.daysBetween(entry.getDob(), minAge.minusYears(getMinimumAge())); //getMinimumAge() returns 18 [int] if (days.getDays()>=0){ System.out.println("User is at least 18 years older"); } I am not sure about my minAge.minusYears code.

 
5:31 PM
gosh, I was doing it wrong all along
38
Q: How is sushi supposed to be eaten?

CeleritasYesterday I was at a banquet that was serving sushi rolls. Some had rice on the outside and others had seaweed on the outside. I wasn't able to find chopsticks. In terms of etiquette is it alright to eat sushi by hand? If relevant I'm in North America. Also, I heard it's a North American thing t...

 
Wow me too
I don't eat sushi very often though and usually only at asian food buffets so I think I'm ok ;0
@CaptainObvious I voted UWYA
> System.InvalidCastException: Specified cast is not valid.
WEEE
 
5:48 PM
That exception message could be better.
Perhaps a better design would be if exceptions had id and message.
In fact most exception messages in the framework are pretty poor.
 
Well, there's more info in the full stack trace. I'm not debugging it anyways, just reporting it :)
 
meh, the message is pretty much always irrelevant. the type of exception and its stack trace is all that matters
higher-level API's are different though
 
Would still be nice to have a useful message.
 
a great example is Ninject's ActivationException messages
the cast failed.. what more information is needed?
 
Yep, Ninject has the nicest messages I have seen.
@Mat'sMug from type to type is relevant info.
 
5:51 PM
could be done, ....if the exception is handled and a custom one is thrown
 
yes but that creates a lot of noise
exceptions in themselves is perhaps not a very nice design.
 
@Mat'sMug After watching that video, I'm never going to eat sushi.
 
exceptions are tons better than error codes
or On Error GoTo ErrHandler
 
best SE answer ever:
2
A: Why do the Japanese eat a lot of raw fish?

DanBecause they like it that way.

 
6:09 PM
@Mat'sMug I DV... pretty crappy answer by Cooking.SE standards
 
IKR
 
Random tangent, but any of you guys familiar with smartwatches?
 
nope
 
Zak
6:24 PM
@Legato Not in any technical or ownership sense
 
@Mat'sMug Not.
 
@Mat'sMug :
0
A: Why do the Japanese eat a lot of raw fish?

PhrancisI did a little bit of digging on the topic and found this TapTrip blog post: A brief history of Sushi: why do japanese eat raw fish? It also references a Cultura Bunka article in Spanish called Uma breve história do sushi. To quote: During Muromachi Period (1336-1573), japaneses used to tra...

 
well done! raw!
 
Merci :)
And, insta-accept lol
Kinda unusual considering the OP posted that June 2015
 
not so weird considering OP is just about everywhere on SE :)
 
6:34 PM
This is both cool and scary at the same time - encryption keys can be extracted by detecting elecro-magnetic fluxuations in your computer as you decrypt messages: eprint.iacr.org/2016/129.pdf
 
@erip: Yes, no sane person would let something like that through code review, never mind writing it themselves. — Nemo 40 secs ago
 
http://www.commitstrip.com/en/2016/02/23/just-trust-the-ai/
CommitStrip
Just trust the AI
CommitStrip
1456252189
2
 
31
Q: Congratulations, you're graduating!

Grace NoteIt's a big day, and I know you folks have been waiting a reeeaaal long while. Double waiting, you might even say, since unfortunately we made you wait even longer after initial news. But, let's make it official! You've been cleared for graduation by the Stack Exchange Community Team! Programming ...

 
@CommitStrip Maybe don't trust all of them.
@Jamal Noooooooooooooo! But at least we were first.
5
 
(Bad) design idea: have a picture of Tiger Woods and a computer.
2
 
6:43 PM
"valuable resource that helps people", help how exactly? Write bad code? :) — Simon Forsberg 8 secs ago
Couldn't help myself.
@Jamal +1 for the pun.
 
@CommitStrip Look here. What if I don't have any history or anything? Sounds like you'll just brainwash me into your ideas by keeping other information away from me, huh?
 
@Hosch250 Having recently learned about recommendation systems, I know exactly how to solve that problem.
 
@SimonForsberg How?
 
Zak
Anagram VoteToClose --> CoolestVeto is pretty cool.
 
ಠ_ಠ, A single tear is shed as we finally learn of our graduation after 5 years of waiting. — Eridan 1 hour ago
 
6:49 PM
@Jamal ZOMG!
 
My swag came in! :D
 
@Hosch250 It will look at what other users have rated highly and recommend something of that to you.
 
i.e. cats
 
@SimonForsberg But average Joe is an idiot.
 
14 secs ago, by Mat's Mug
i.e. cats
 
6:50 PM
I have to be smarter than average Joe, or I won't have fulfilled my life goal.
 
@Hosch250 It might also be able to cateogize you into a particular cluster of users, such as programmers, and use that information to find something that is more suitable to you.
 
Apparently, Marky is Average Joe.
@SimonForsberg:
in The Nineteenth Byte, 2 mins ago, by Alex A.
Code Review moderator shows up, downvote on the post. SUSPICION ENSUES
 
Hey, I upvoted it for sportsmanship!
 
7:08 PM
Still off topic. This should be asked on code review because this is working code. You'd like some tips on how to improve efficiency. — rayryeng 43 secs ago
 
0
Q: Expression parser in Haskell using operator precedence table

JulesThis is my first non-trivial Haskell project, an expression parser implemented using the Pratt Parser's technique for managing precedence as a layer on top of Parsec. It simply builds an expression tree and then pretty-prints it using Text.PrettyPrint. Would welcome any comments, but am particu...

 
@user25004 If you are sure that your code is actually working and you're asking for improvement, ask at SE Code Review please providing the complete code please. — πάντα ῥεῖ 39 secs ago
possible answer invalidation by Zephyr Mays on question by Zephyr Mays: codereview.stackexchange.com/posts/120772/revisions
 
7:52 PM
@Duga Looks OK.
 
I agree with you that select 1 += 1 would be incorrect, because += is a compound addition/assignment operator and one cannot assign a value to the integer literal 1 - it's not a variable! However, if you try the usage I give in my answer (set @row_num += 1) you will find it works perfectly well provided @row_num has been initialised to a non-null value. :) I've updated my answer to provide a link to the official documentation of the += operator. — philosophicles 41 mins ago
TIL += works in T-SQL
 
-1
Q: Generate random 0xFFFFFF Color and display it

Shayne HartfordI'm making a Minecraft Hacked client. i have a text box with a color of 0xFFFFFF (white) and i want to make it generate a new color every time the client starts. i have the color code in a Main class file, so i can easily change code. but i need a section of code to generate a 0xFFFFFF code, then...

0
Q: List of tuples generated through list comprehension

Jackson JacobThe function returns a list of tuples which is generated through list comprehension: getUserRatings :: String -> [Film] -> [(String,Int)] getUserRatings search database = [(title,rate) | (Film title _ _ ratings) <- database, (user,rate) <- ratings, search == user] Film is defined as: type Rat...

 
8:12 PM
@Hosch250 what c# version are you using?
 
@DanPantry ty
 
I'm not sure.
I use C# 6 when possible, but I usually work on Rubberduck, which uses .NET 4.5
 
@AquaTart nice new name XD
 
you can compile to 4.5 with c#6
 
@Phrancis We have something of a username anagram meme over here at PPCG
Also we graduated
 
8:13 PM
Yeah I saw that meme before!
And congrats!
 
@Mat'sMug Do you see that?
@JohanLarsson And the result can run on Vista?
 
see what?
hmm
 
@Hosch250 can't see how it can't :)
 
interesting
 
never used vista ever though
 
8:16 PM
lol
 
@JohanLarsson I thought C# 6 required 4.5.2, or is that just the Roslyn compiler itself?
 
you didn't miss much
 
I started with 8, have used 8.1 and 10, and have 7 in a VM right now that I never use :P
 
@Hosch250 are you at home?
 
@JohanLarsson That's probably for the better.
 
8:16 PM
Yes.
I'm almost always at home.
 
@Hosch250 c#6 requires VS2015, Roslyn works fine for 4.5
 
try opening Rubberduck in VS2015, make sure you still target .net 4.5 (if that's indeed available), and give it a go
@JohanLarsson so, it could just as well target .net 2.0 then?
 
yeah I think so
never used anything other than 4.5
 
kids these days...
 
@Mat'sMug commit, and try upgrading and see if it works?
    public ICommand UriCommand { get; } = new DelegateCommand(Start);

    private static void Start(object uri)
    {
        Process.Start(new ProcessStartInfo(((Uri)uri).AbsoluteUri));
    }
4
Q: About Window in XAML

Hosch250I just redid Rubberduck's About window in XAML: I do not like my XAML very much. The way I place the StackPanel for the white pane over two rows, only to provide a margin to keep the copyright text out of it seems very hackish. Just as bad is the way I put the Hyperlink elements in a textbox...

^ clean imo
 
8:19 PM
right
..I'm still not sure I like that syntax though
but the ?. operator wins
 
@Mat'sMug why?
private ICommand _uriCommand;
public ICommand UriCommand
{
    get
    {
        if (_uriCommand != null)
        {
            return _uriCommand;
        }
        return _uriCommand = new DelegateCommand(uri =>
        {
            Process.Start(new ProcessStartInfo(((Uri)uri).AbsoluteUri));
        });
    }
}
compared to ^
 
I know
well, no
I assign it in the ctor
the getter does no work
 
noise reduced to zero, (not meaning there is anything wrong with @Hosch250's code)
@Mat'sMug yeah, same, pre c#6
also that syntax only works for static stuff
 
So, .NET 2.0 is an option...
 
8:23 PM
cool
 
private static void Start(object uri)
{
    var path = (Uri)uri;
    var startInfo = new ProcessStartInfo(path.AbsoluteUri);
    Process.Start(startInfo);
}
I prefer it like that for nicer debugging
but no biggie
 
Debugging wasn't needed there.
 
I often have framework stepping enabled
exposing myself to the nasty stuff in the guts of wpf :)
 
0
Q: Registering and looking up aliases

MantichoraI've taken a coding challenge as part of a job interview and the recruiting process. Sadly I didn't get through it and couldn't secure the job. I am wondering if anyone can help me out here and show me how it could've been done better. The problem was: The purpose of the class is to register ...

 
Seems to work.
Office just got a quiet upgrade. Some nice, new goodies, such as navigating and saving a file with a custom name without opening the file explorer at all.
And a Black theme.
And Funnel charts and new formulas for Excel.
 
8:31 PM
@Hosch250 eh, posted an answer.
@JohanLarsson haha yes, absolutely! (lol, I mentioned it in my review!)
actually, more like this:
private void ExecuteUriCommand(object parameter)
{
    Process.Start(new ProcessStartInfo(((Uri)parameter).AbsoluteUri));
}
 
parameter is a better name, +1
 
well, technically not - but given it's ICommand stuff...
 
I guess that is better...
 
But I'd at least cast on a separate line, then it is good if uri is available as name
 
The other way is much more convenient, though.
 
8:34 PM
the lazy way?
 
there's a pattern that's consistent throughout Rubberduck's ViewModels; commands are always private readonly ICommand _fooCommand;
and initialized in the constructor
 
0
Q: Text 'guesser' / tumbler like animation

JonathanI made a tumbler thingy... Do you see possible bugs in the code or any improvements I could do? var text = "0000 ASCII (Listeni/ˈæski/ ass-kee), abbreviated from American Standard Code for Information Interchange,[1] is a character-encoding scheme (the IANA prefers the name US-ASCII[2]). ASC...

 
Not always. You should have told me that back when I was doing the settings.
 
hmm
 
consistency is nice, consistency > preference
 
8:35 PM
I need to write less, review more
:)
 
And I copy/pastaed the first one from somewhere else in Rubberduck to see how it was done, so there is at least one other bad one out there.
 
the implementations are always private void ExecuteFooCommand(object parameter) and, when needed, private bool CanExecuteFooCommand(object parameter)
that makes the ctor initialization very clean I find
@Hosch250 to be clear: it's not bad ;-)
 
suggestion: make typed RelayComands: RelayComand and RelayComand<T>
 
they're actually DelegateCommand
 
I use RelayCommand when I design the framework, @Mat'sMug did these ones and did DelegateCommand.
 
8:38 PM
@Mat'sMug just a different name no?
 
maybe. it gets confusing lol
 
The implementation for manually raising is verbose but nice.
 
using CommandManager.RequerySuggested is not good
 
hmm
 
8:40 PM
works for small things but can be seriously slow for bigger things
 
interesting
 
wait a sec
    public override event EventHandler CanExecuteChanged
    {
        add
        {
            CommandManager.RequerySuggested += value;
            base.CanExecuteChanged += value;
        }
        remove
        {
            CommandManager.RequerySuggested -= value;
            base.CanExecuteChanged -= value;
        }
    }
 
you can grab the nuget if you want
 
you have that ^^
    public event EventHandler CanExecuteChanged
    {
        add { CommandManager.RequerySuggested += value; }
        remove { CommandManager.RequerySuggested -= value; }
    }
we have this ^^
 
8:41 PM
Retro Computing just moved to the commitment phase
 
wtf is the difference?
 
@Mat'sMug yep but that is not used for manually raising OnCanExecuteChanged
Wpf notifies there when something is clicked
 
yes
ah ok, I thought you were saying our commands were using that
 
Hi, @Rainbolt.
 
8:43 PM
Bye, @Rainbolt.
 
Hello friend!
 
Hi again.
Congrats on PPCG graduating.
P.S. I remember your first question and your first user name still.
 
Haha. Rusher and his zombies.
 
The one about the rain falling in the squares, and it could overflow.
There was John too.
And zombies are CR things ;)
 
8:46 PM
@Mat'sMug this can be slow if you use it to manually raise the event.
I use the relaycommand only very rarely, the asynccommand and conditioncommand is usually a better fit for our stuff
 
woot-woot, rep-capped :)
@Quill so, Tiger for Golf, his computer for Programming/Code, and I guess, his relationships for Puzzles?
4
 
Ripe zombie; open question with answers, at least one answer having score 0, no answer having score > 0: Factory dependency injector
 
the revised version is somehow worse
 
9:02 PM
@Mat'sMug Let's see if SE will be giving out CG-branded golf clubs as swag. ;-)
 
If you are looking for code review, you might want to take it to the code review SEidjaw 26 secs ago
 
somehow I can't help but seeing that {} as a wink to CR (that's our badges icon... golfed)
Look! They golfed our badge icon!
I love the new phone chat
"file operation failed, you are borked" - I wonder if Jon Skeet is going to become active on CR one day. I find it thoroughly awesome that we have Eric Lippert reviewing code :)
 
9:37 PM
I've posted the complete service on CodeReview: codereview.stackexchange.com/questions/120914/…G. Deward 28 secs ago
I've posted the complete service on CodeReview: codereview.stackexchange.com/questions/120914/…G. Deward 31 secs ago
 
1
Q: Dependency injection with asp.net identity and property injection with dbcontext

RodI configure asp.net identity using simple injector var container = new Container(); container.Options.DefaultScopedLifestyle = new WebRequestLifestyle(); //Identity container.RegisterPerWebRequest<AppDbContext>(); container.RegisterPerWebRequest<IUserStore<User, int>>(() => new UserStore

0
Q: Member-Specific Object Cache for Angular

G. DewardI'm trying to build a reusable object cache for Angular. The goal is to: Cache objects by type; Prevent collisions and conflicts; Find objects by like property; and, Ensure caches are separated by the logged in user. I am using Satellizer to determine if the user is logged in. Each object's...

 
possible answer invalidation by Mantichora on question by Mantichora: codereview.stackexchange.com/posts/120905/revisions
 
0
Q: Playing with light switches

MagirldoogerWhen you were a little kid, was indiscriminately flicking light switches super fun? I know it was for me. Let's tap into that and try to recall that feeling with today's challenge. Imagine a row of N light switches, each attached to a light bulb. All the bulbs are off to start with. You are going...

 
possible answer invalidation by Jonathan on question by Jonathan: codereview.stackexchange.com/posts/120906/revisions
 
@CaptainObvious @Phrancis remember "Flash tes lumières"? :D
 
9:50 PM
@Mat'sMug LOLOL, JMP haven't heard about him in a long time
 
he's still around
 
Wow really?
 
well, not the show, the guy
 
Right... lol
 
This would probably be better on codereview.stackexchange.com — Jason S 12 secs ago
 
9:52 PM
Does he do stand-up comedy or something like that?
 
yeah
 
Cool I'll look him up tonight
 
why are VBA devs such masochists?
2
Side question: if g_RS3 contains headings, then why isn't it called rsHeadings or something? — Mat's Mug 1 min ago
 
possible answer invalidation by Mantichora on question by Mantichora: codereview.stackexchange.com/posts/120905/revisions
 
Because g_RS3 is being reused in many cases — FatBoySlim7 17 secs ago
cringes
My deepest sympathies. — Mat's Mug 5 secs ago
 
10:00 PM
@Mat'sMug Refactor > Rename they need a Rubberduck
 
yes. and a chief monk to slap 'em
 
@Duga This does not seem OK... Somebody up for a rollback or two?
 
I wasn't sure
go ahead if you think it's not legit
 
Done
 
1
Q: Averaging a signal to remove noise with Python

LaGuilleI am working on a small project in the lab with an Arduino Mega 2560 board. I want to average the signal (voltage) of the positive-slope portion (rise) of a triangle wave to try to remove as much noise as possible. My frequency is 20Hz and I am working with a data rate of 115200 bits/second (fast...

0
Q: Parsing function that injects test cases to TestRail

JonBThis function has the purpose of injecting test cases into TestRail, it was written in bit of a hurry and I know there is room for improvement, any input will be appreciated. def add_sections_and_test_cases(self, new_project_id, new_test_suite_id): """ """ new_sections_l...

 
10:33 PM
That LINQ debugger visualizer is absolutely amazing
 
10:48 PM
This is a question for Stack Overflow, in my opinion:
1
Q: List of tuples generated through list comprehension

Jackson JacobThe function returns a list of tuples which is generated through list comprehension: getUserRatings :: String -> [Film] -> [(String,Int)] getUserRatings search database = [(title,rate) | (Film title _ _ ratings) <- database, (user,rate) <- ratings, search == user] Film is defined as: type Rat...

The code is short, and the question is specific.
Second opinions?
 
Not much experience in haskell, but it looks like a simple and short algorithm that doesn't need a whole lot of changing
Dunno if it would be a good question on SO either
 
Woot got swag.
 
11:14 PM
This would probably be a better question for codereview.stackexchange.com. However, if there are required config options, I don't see how there is much choice but to force end users to initialize with their options. — Rob M. 10 secs ago
 
-1
Q: Creating exportable JavaScript module

Lubos MenusI am trying to create a JavaScript module that would animate typed text in a similar fashion like the Slack homepage. My CodePen can be found here. My goal is to create a library that would be easy to implement, so you'd download the final .js file and just reference it in the index.html file fo...

 
Hmm, a box... :D
 
@Cap off-topic for code not included
 
11:29 PM
I've not got any swag :'(
 
@Mat'sMug I wonder whether he got sent CR swag
 
I got my swag today!
 
my 5th recommended badge is [badge:peer-pressure] ....
 
is there a site that will teach me how to use Git Command line? kind of a beginner question, but I would like to get the basics down before monday
 
11:40 PM
@Malachi gitanswers.stackexchange.com
 
I'm not sure, but if you have questions about git you can ask on Super User.
 
Do you know how to use git gui?
 
@nhgrif that's looking good!
 
the employer wants me to know how to use the command line
 
@Malachi How about this?
 
11:41 PM
and I don't know the workings of Git that well either, enough to get by
@SirPython thank you.
 
Zak
​​​​​​​​​​​​​​​ — Alexander O'Mara yesterday
 
@SirPython ooh nice! bookmarked
 
I am going to learn AngularJS, Git Command line, Linq and MVC before Monday...
 
Zak
Ah non-printable characters. Such a pain.
 
@Malachi Hey! I think I got this broken chat thing working!
Nope. Lost the menu.
 
11:43 PM
????
 
@Mat'sMug the topic came up
 
mobile chat...
 
lol
 
!!‮ kc̠̬u̲̖̤s͇ s̼̬͚̬ͅn̜̘̘̞̩̻o͎͈i͇̖̣̥t͓͍͖ci̯̬̪̟̖͔r̯t͉̪s͕e̦̣̖͇r͕̯͔͈̳̘̗ ͍̼͇ͅyr̩̻͍̼̤̘a͙͈̙̗͕r̮͔̟̦̹̣̳t̯̲̺i̦̗̮̼b̜̦̻̻̞ͅr̘̯̦̯̬a̪ ,̤͍͈͎h͔͔̪̩͇̗a̖͚̝͎e̤͇Y̟ — JonasCz yesterday
 
@JohanLarsson well, I haven't had issues since I registered the event in my CommandBase implementation.. but it's good to know I guess
 
11:47 PM
^^ If you read and understand that you're not just good at git, you're frigging awesome
 
how do I attach Linqpad with SQL Express?
 
possible answer invalidation by Lubos Menus on question by Lubos Menus: codereview.stackexchange.com/posts/120925/revisions
 
@Duga seems okay. answer may have been premature and wasn't present when the edit happened
 
I am just thinking out loud...or not out loud... I have an idea is what I am trying to say.
 
TTFQW
 
11:57 PM
lol 7pm, go home
 
00:00 - 17:0017:00 - 00:00

« first day (1025 days earlier)      last day (2978 days later) »