« first day (1627 days earlier)      last day (1553 days later) » 
00:00 - 20:0020:00 - 00:00

12:00 AM
RELOAD!
[rubberduck-vba/Rubberduck] 11 commits. 10829 additions. 10436 deletions.
 
 
1 hour later…
1:15 AM
0
Q: "Pivoting" data with VBA

Michal RosaI've attempted to erite some VBA for this this question. The output is OK but the code is not very elegant. I'm happy-ish with creating unique list of names and certificates, but the rest seems rather ugly. I'd love to learn how to make it more elegant and programmer-like (and less amateur-...

 
 
2 hours later…
2:58 AM
[rubberduck-vba/Rubberduck] web-flow pushed commit 660986ec to next: Update CONTRIBUTING.md
 
3:12 AM
The question isn't so much "how" [to reverse-engineer or somehow re-implement Microsoft Excel's formula-parsing engine], but "why". I mean it's a very interesting challenge and I salute your efforts, but I'm stumped as to what problem is it that could possibly warrant a solution this complex. The cell addresses you get are absolute, because a Range references that specific cell. The address being referred to by a Range object isn't at the same abstraction level as the text string in the formula bar. The Excel OM/API doesn't need to expose the plumbing for that, ...and doesn't AFAIK. — Mathieu Guindon 7 secs ago
if this guy isn't making an Excel add-in...
 
 
2 hours later…
5:17 AM
> WIP: Some keys seem to have been accidentally duplicated during the Rubberduck.Resources move - I'll take this PR as an opportunity to clean that up.
 
@Duga but for now, sleep
 
5:37 AM
[rubberduck-vba/Rubberduck] build for commit 60dafe1e on unknown branch: AppVeyor build succeeded
 
 
1 hour later…
6:48 AM
Hello! Can anyone suggest me books on C++ and Java which are easier and simpler for beginners as Complete Reference by Herbert Schildt on C?
 
 
3 hours later…
10:08 AM
I've seen people use GitHub labels (like difficulty-02-ducky) here in chat as well as in GitHub issues. Is there a native way to do this? Or is it some inline-image trickery?
And when I say labels, I mean those colored variants as they show up on the GH issues. (I honestly can't imagine how the CRSE chat markdown engine would know about GH specifics, so I guess at least here it comes down to trickery?)
 
in here those labels are not colored.
in GH issue, I'm not aware of a way to actually properly refer to these labels, but they may have introduced it...
if you give me a link I can tell you how it's done though.
 
I don't have one readily available. I think the last time I saw it, FreeMan was using it. I'll have a look.
Seems I'm not sure what exactly I searching for and the recent posts by him don't show it either.
@Vogel612 So how did you do it in this case, then?
 
[tag:difficulty-02-ducky]
 
Oh, I see. That's basically a graphical variation of a link?
 
basically..
SE chat special
links to codereview's tags
because this room is parented to Code Review
there's also meta-tags. Those link to codereview.meta's tags
 
10:24 AM
Oh, lol. I saw the latter half of the link and just implicitly assumed the former half would refer to GitHub...
Then my confusion is lifted, I think. Thanks. :)
 
10:46 AM
> Can someone please assign me to this issue? I want see how far I can get with it. :)

I've done some research on the weekend and it seems to me that a functionality like *watermark*, aka *cue banner* is not natively supported by [`textbox` controls](https://docs.microsoft.com/en-us/dotnet/api/system.windows.controls.textbox?redirectedfrom=MSDN&view=netframework-4.7.2). (I initially assumed that all it would take to resolve this issue was to set a property - it now seems it's a bit more invol
 
10:56 AM
for some reason I can't assign you ...
 
Oh? Do I need to have a specific status or anything? But normally, everyone should be able to contribute, right?
 
I think you may need to have contributor status in the org
 
Ah, well. It shouldn't matter. It's not likely that someone else will grab it now, I guess. :) (Though maybe you could remove the ?)
 
Thanks!
Lunch break now.
 
11:05 AM
breakfast time for me...
#studentlife :D
 
 
1 hour later…
12:52 PM
@Inarion I sent you an invite =)
 
Just wondering - has anyone been able to use Live Visual Tree successfully with WPF? Or maybe any other debugging tools for WPF/XAML?
 
Thanks, got it. :)
Strangely, the GitHub interface didn't show the invitation. Needed to get the link from the e-mail.
 
1:39 PM
There seems to be another oddity --- if XAML markup has been changed, the build locks up, and I must cancel it then restart the build.
 
2:35 PM
@this That, I believe, is related to the live-change support for WPF.
In full-WPF apps, you can change the XAML at will in debug sessions.
That locking-up started as soon as they released it; it doesn't seem to work well with embedded WPF controls.
 
so my options for debugging XAML are....
 
See if it works, kill it, rebuild, rinse, repeat.
Oh, the whole build locks up if you just change the XAML?
I was thinking you were debugging and changing it.
No, that's new to me.
 
yes that's 2 separate questions, sorry
i'm basically debugging the xaml blind
not exactly a stellar experience.
 
Well, same as you would with C#...
But yeah, in full WPF apps, it's really cool.
In WPF controls, it's harder because you have to restart it every time something changes.
But, same with changing C# code, so you can't complain too much.
 
i don't care about changing code
all I want is to actually debug and see what it's doing
as it is, I'm limited to just putting breakpoints on C# entry points and hope they get hit
 
2:48 PM
I'm not sure I get what's all going on.
 
but I have no idea why X isn't calling this piece of code or why it's passing bogus parameters. That's kind of the information I'm trying to find.
 
Oh, hmm.
 
OK, so I wrote a converter - but I'm getting unset value instead of the actual object
 
Probably your binding isn't set up right.
 
Obviously
 
2:48 PM
Why don't you post the XAML and the converter here.
 
ok -
 
Also, I'm kind of busy, so I'll need to back out shortly.
Sorry.
 
NP - ping me when you're ready
 
Just post it, and I'll get to it when I'm ready :)
Chat is async :)
 
alright. just didn't want to get buried under other clutter. :)
so - XAML snippet:
<Menu ItemsSource="{Binding BuiltInTemplates}">
                                    <Menu.ItemTemplate>
                                        <DataTemplate>
                                            <MenuItem Header="{Binding Caption}"
                                                      ToolTip="{Binding Description}"
                                                      Command="{Binding AddTemplateCommand, RelativeSource={RelativeSource TemplatedParent}}">
                                                <MenuItem.CommandParameter>
It's the SelectedItem that's not working. the Name is working fine, though.
and the converter:
    public class TemplateCommandParameterToTupleConverter : IMultiValueConverter
    {
        public object Convert(object[] values, Type targetType, object parameter, CultureInfo culture)
        {
            (string templateName, CodeExplorerItemViewModel model) data = (
                values[0] as string,
                values[1] as CodeExplorerItemViewModel);
            return data;
        }

        public object[] ConvertBack(object value, Type[] targetTypes, object parameter, CultureInfo culture)
the Convert does get calls, but in the values parameter, I'm only getting the object[0] populated correctly. The object[1] is unset, and as a consequence, the 2nd part of the tuple is null, which prevents the command from going through.
 
2:54 PM
That sounds more/less accurate.
Wait, NVM.
 
I suspect it's the RelativeSoruce that's wrong.
 
Did you try removing that?
 
I did try Ancestor with getting type of SelectedItem
I could but that'd be wrong.
because of ItemsSource="{Binding BuiltInTemplates}
the SelectedItem belongs to the VM
incidentally the BuiltInTemplates property is also on the VM. But I'm now inside the menu, so I don't think I can access VM's properties without using RelativeSource.... right?
 
Did you try {RelativeSource Self}?
 
uhhh, no.
 
2:57 PM
<MenuItem Header="{Resx ResxName=Rubberduck.Resources.CodeExplorer.CodeExplorerUI, Key=CodeExplorer_OpenDesigner}"
      Command="{Binding OpenDesignerCommand}"
      CommandParameter="{Binding SelectedItem}"
      Visibility="{Binding Path=IsEnabled, RelativeSource={RelativeSource Self}, Mode=OneWay, Converter={StaticResource BoolToVisibility}}">
    <MenuItem.Icon>
        <Image Style="{StaticResource ToolbarIconStyle}" Source="{StaticResource OpenDesignerImage}" />
    </MenuItem.Icon>
</MenuItem>
 
trying it now.
if that's the answer, I'm going to feel moronic.
I mean, I read Self to mean itself
 
<ContextMenu DataContext="{Binding DataContext, Source={x:Reference CodeExplorer}}">
We are using the same data context in the context menu.
So, yeah, Self, should be right.
 
ok, maybe this is a dumb question - but why do we even need a Self? If it's itself, then we don't need a relative source?
 
I'm not sure, but it's something to do with telling it how to find the datacontext (which is the VM.)
 
ahh morning gents
 
3:07 PM
nope. still unset.
 
@this :(
Last suggestion:
Try RelativeSource ContextMenu.
 
that's not an option?
 
Oh.
Well, I'm lost then.
 
tried it anyway; got it as red.
that's why I thought one had to use Ancestor
to go up further
 
Hmm.
 
3:10 PM
but that didn't seem to work.
anyway that's what made me wonder what debugging tools there were to analyze what WTF WPF is doing in the background
because randomly trying things isn't very productive.
 
AncestorType
 
yep that's waht I tried
 
RelativeSource={RelativeSource AncestorType={x:Type ContextMenu}}
 
hm, not what i tried
i used CodeExplorerViewModel or something like that
i'll try ContextMenu
 
That tells it the datacontext is on the context menu.
Or something like that.
 
3:15 PM
nope. still unset
 
Sorry, I won't be able to help then. I'm at the limit of my memory here.
In the sequel to Infinity War, they should show Thanos all the trouble he caused by killing people like that.
 
No worries. TBH, I really want to understand more of WPF for myself. Not having a good debugging tool makes it too much of a black box.
 
Everyone who's now a single parent, or saw everyone die and decided life was cheap and turned into a murderer, the planet or few with a low population and didn't have enough to survive after he killed half of them...
Everyone who lost a parent, a lover, or a friend.
 
Hello! Can anyone suggest me books on C++ and Java which are easier and simpler for beginners as Complete Reference by Herbert Schildt on C? Anyone...
 
Programming Principles and Practice using C++.
It's not easy, but it's one of the few really, really good ones.
Just take your time and work through it bit by bit.
It's by Bjarne Stroustrup--the creator of the language.
For Java, just forget about it :P
<-- Not a Java fan.
 
3:29 PM
My bad , any java user might help though ...
 
Vogel might, but really, I think you might be in the wrong room.
 
@Hosch250 btw , the book seems well organized ..thanks for suggestion .
 
@NehalSamee It's what I first started learning programming from. Just went back and finished the second half.
It's really good.
 
@Hosch250 why wrong room ? Any special room ?
 
We are the VBA Rubberducking room.
It's for discussing VBA, C#, and the OSS project Rubberduck.
 
3:31 PM
oww..
 
Rooms have topics just like sites :)
Try The 2nd Monitor, maybe? That's the main Code Review room.
 
ok.
 
3:46 PM
this inspection needs publicity
FYI the latest version of Rubberduck includes an inspection that could have prevented this from happeningMathieu Guindon 1 min ago
 
3:57 PM
Hi, @ThunderFrame!
 
4:09 PM
Hi, @SonGokussj4!
Getting ready to update the Czech translations?
 
I want to try that tool, just don't have a personal windows (stupid millennial with a mac) and I can't put rubberduck on my work station in case you try to hack my screen and report that I spend 30% of my workday on Stack Overflow @MathieuGuindon (I'm on to you) — urdearboy 48 secs ago
LOL
 
~sigh
 
@MathieuGuindon Just came here to post that! LOL indeed!!
 
I really wonder what the (hours spend on SE reading random Q&A) / (hours saved thanks to SO) ratio looks like... :D
Smaller or greater than 1?
 
interesting. I clicked Mug's link to embiggen the image and I got a note that 100000 imgur accounts were hacked in 2013 and an offer to check "Firefox Monitor" to see if I was among them. My account post-dates that, but I was curious, so I clicked.
 
4:16 PM
so today... i made a silly upgrade to a script
 
Looks like "Firefox Monitor" is a haveyoubeenpwned.com copy-cat
 
for( $v = 1 ; $v -le 99;$v++){
	if ([IntPtr]::size -eq 4 ){
		$acc = "C:\Program Files\Microsoft Office\Office$v\MSACCESS.EXE"
	}else{
		$acc = "C:\Program Files (x86)\Microsoft Office\Office$v\MSACCESS.EXE"
	}
	if(Test-Path -path $acc){
		break
	}
}
its trying to ascertain access' path
and yeah, i know, i probably could have started at like.. 10 or whatever
but it was funny to start at 1
 
that seems fragile
CTR won't be in that path, IIRC
 
whys that?
ctr?
 
click-to-run
 
4:18 PM
:D
I wrote a whole class dedicated to that purpose. (It also provides an environment where I can execute VBA code residing in a DB file from other hosts...)
 
if we used click to run
 
aka subscription license where you download & install your office
 
that might matter
 
yeah that script'd break if you started using CTRs. I believe that with 2019, everything'll be CTR, even perpetual licenses.
 
we evaluated office365, and my boss and hte owner decided it was too expensive compared to what we already use
oh? well that sucks
i honestly didnt know it installed in a different directory
 
4:20 PM
yeah it's all part of their "sandboxing"
 
ah yeah. the root folder
i see it now on my machine at home
 
It lets you install more than one version at once.
 
thats bound to be handy
 
for some value of "handy"
 
heh
i know it also doesnt cover when its a 64-bit install
but the day we go 64 bit...
well i just dont ever see it ACTUALLY happening
till microsoft says yeah, you should
 
4:24 PM
> For certain destinations or activities you'd still use a car (say, weekly household groceries, moving furniture or most distances above 15Km, or destinations without good public transportation).
Discussing bike use in Europe.
 
heh
the public transport where i live is pretty trash
 
I prefer my bike here unless it's below 40 F, over 16mi, or raining.
 
whats rain?
 
I don't have bike gear, and when I wear jeans, my chain eats the leg and tears it.
 
we dont get that sort of thing here
 
4:25 PM
So, I have to ride in shorts, hence the 40 F limit.
@KySoto It's when there's more water in the air than on the ground.
Unless it's just a fog.
 
thats impossible
 
You've not seen MN rain.
 
oh, we used to get fog
back when the water fell from the sky
 
I've had times when it's coming down so hard it literally starts piling up on the ground faster than it can roll downhill.
 
ive wished i could move to an area with rain
its my favorite weather
 
4:28 PM
And it's so heavy that using your windshield wipers doesn't really make a difference.
 
it puts me in a really good mood
 
And it slows traffic down to 5mph or slower.
I like rain too, but not when I'm trying to drive to work :)
 
@Hosch250 You might want to try something to keep your jeans' leg away from the chain - from my experience they work quite well.
 
Hmm, might work.
But still, I wouldn't be able to ride much anyway.
Work is too far (33mi), and the trails aren't cleared, and my bike doesn't have a fat tire.
And my city uses a snow "melting" spray that doesn't work and eats things.
It ate a pair of shoes and part of our concrete driveway and the concrete basement where we keep our boots.
And it's supposed to be greener than salt...
 
Uh, sure. I'd pass on 33mi as well. I find 30km already being a stretch. (I'm not used to biking.)
Salt is pretty green, I'd say. Just too much will have some implications. Anything more sophisticated is bound to be less natural, imo.
 
4:43 PM
@this how about..
for( $v = 1 ; $v -le 99;$v++){

	$acc = "C:\Program Files\Microsoft Office\Office$v\MSACCESS.EXE"
	if(Test-Path -path $acc){
		break
	}
	$acc = "C:\Program Files (x86)\Microsoft Office\Office$v\MSACCESS.EXE"
	if(Test-Path -path $acc){
		break
	}
	$acc = "C:\Program Files (x86)\Microsoft Office\root\Office$v\MSACCESS.EXE"
	if(Test-Path -path $acc){
		break
	}
	$acc = "C:\Program Files\Microsoft Office\root\Office$v\MSACCESS.EXE"
	if(Test-Path -path $acc){
		break
	}
}
man, im looking forward to frituseday
2 day work weeks can be nice
 
Hmm. If we aren't ruling out cannibalism, tutor/trout and rosti/tiros would be on the list as well as others. — Hugh Meyers Jul 25 at 14:01
@KySoto Huh?
What is "frituseday"?
Hi again, @ThunderFrame!
@Inarion I generally do a couple 8mi rides at the start of the season before I go back to 16mi.
 
@ThunderFrame Insomnia again or longing to float with the ducks?
 
i have wed thurs and friday off
so tuesday is muh friday
 
@IvenBach bit of both. Might even open the laptop on Tuesday.
 
@KySoto Oh, I get it now.
@ThunderFrame Nice!
@KySoto I have Thurs/Fri off.
Going to spend Thursday avoiding company.
 
4:58 PM
I wish I could RD but at work I can't build the solution.
 
I think we need to rollback the DLL changes for Core.
 
I dislike being the ugly duckling for that.
 
That reminds me, IIRC, there was some discussion around good laptops here a while back. I've had a Dell XPS 13 9350 i5 8GB, which I loved, but handed to my wife), and got an HP Spectre x360 i7 16GB, which I also love. My daughter's school requires her to have a Lenovo Yoga ThinkPad i5 8GB (which she and I both hate).
 
IIRC, that was for @FreeMan.
 
I preferred the keyboard and trackpad on the Dell, but I'm very happy with the HP's extra power, and have it suitably decorated.
It's OK, there isn't a HTML5/CSS sticker... I haven't turned hipster on you guys.
 
5:13 PM
Where's your RD swag sticker?
 
LOL.
 
I've never been fond of stickering up laptops. Something about it rubs me the wrong way.
 
Good question, there was one on the Dell
 
@IvenBach Same. My dad has a toolbox plastered with stickers.
It looks weird. Especially when they start wearing off.
@ThunderFrame What's the raven for?
 
@Hosch250 Library Genesis - I'm a firm believer that publicly funded research should be publicly available. LibGen makes millions of journal articles available online, for free.
 
5:18 PM
Yeah, agree.
Because the journal fees don't really cover the research costs anyway.
If not being free shifted the price scale so the research cost less to uninterested people, but more to those who wanted to exploit the knowledge, I'd say it was just the people who wanted to use it paying for the research.
But, it doesn't really.
 
@MathieuGuindon FYI I used a company called StickerYou to make some of those stickers. They were very good, and AFAICT, their pricing was very competitive. They could handle a RD transfer sticker (where you peel off the glue sheet, apply the label's intricate part, then remove the top sheet. They also had great prices and volume discounts.
@Hosch250 researchers can end up paying $40 just to see one sentence, or whether the article is even relevant to their research. Citing documents becomes an expensive business.
 
Yep, but then, these articles are heavily used by industry for profit, too, and aren't applicable to most people other than through industry.
I'd be more interested in a type of licensing where researchers could get it free, but industry and non-researchers can't.
 
When using Range.Characters.Text why does a RTE 1004 come up when the Range object contains a numeric?
 
More like a licensing where universities and non-profits can get free access.
And everyone else has to pay.
 
I have a Sub for formatting numeric formats inside a string, like 3/8, to have the numerator/denominator sup/sub-scripted respectively. It doesn't play well with numbers and I'm curious why.
 
5:27 PM
@ThunderFrame IIRC the sticker business went to "Sticker Canada" or something like that.. didn't really shop around, I'll see what price I can get for a peel-off transfer sticker. The new 2.3 ducky will make a much nicer sticker than the fugly old banner :)
 
@Hosch250 well I underwent treatment that I'm convinced extended my outlook by 3-6 months, because I downloaded the paper from LibGen, and gave it to my doctors. There's no way they would have read it had I not forced it on them, but I can't afford $40 every time I find an article that might be useful.
 
Hmm.
Well, it goes both ways, I guess :)
 
@MathieuGuindon IIRC, it was a flat $10 to Australia. Might be cheaper still to Canada.
 
@Hosch250 Yup, it was. Thanks, @ThunderFrame!
 
@MathieuGuindon and I gave them an Illustrator file, for high quality results, which meant swapping emails, but their service was good (live chat if same time zone). There are often discount codes if you just use their PNG service
 
5:33 PM
I've settled on an MSI GF63 (even though I'm not a gamer, I got dragged down that route) or an ASUS ZenBook 14. I sent the links to the wife to let her make the Christmas gift purchase.
 
@FreeMan I always go to the gaming laptops.
More power for less price.
Business is always low power, high price.
Consumer is low power, low price.
 
@MathieuGuindon Here's the Transfer Stickers page
 
That was my first choice, but then I hit on a good deal on the ASUS - Similar performance, lighter weight, much longer battery life, similar price.
Only drawback is the DDR3 is soldered on so I'm stuck with the 8GB & can't upgrade it.
 
@Hosch250 you didn't ask about the red/white ball? That's a Commodore Amiga reference.
 
Test drove some keyboards at my local Fry's. Those 2 also had the best feeling keyboards (to me). Didn't really like the Dell keybaord
 
5:37 PM
@ThunderFrame Oh, I figured it was some local sports team.
I think two of them are from Hacktoberfest?
What's the C thing?
 
C= ...that's the Commodore logo
 
Oh, nice.
See, I'm a young punk who grew up without a computer, then went right to quad-cores :P
 
You're supposed to start with a toaster and knife first...
 
I did that too. But I remembered to unplug the toaster before putting the knife in.
 
#DoingItWrong
 
5:42 PM
Reminds me of what my horse-riding teacher said:
> There are three types of people. Those who learn by reading. Those who learn by doing. And those who've got to piss on the electric fence.
 
@Hosch250 lol, no, had the C64, my dad had an Amiga 1000, then I got an Amiga 500 with a Mac emulator (Classic Macntosh), then went PC in 1994 with a DX4-100 (last DX before Pentium). Stayed with PC ever since (except for Linux on Raspberry Pi.)
 
You guys do a lot of code review?
 
I used to :)
 
looks at host site for the chat-room
:)
 
5:51 PM
@AaronHall Welcome to the pond.
 
Just curious! It's been about 24 hours since I posted some Haskell code, and I've gotten one rather weak response... :)
 
Doesn't Vogel use Haskell?
Sometimes it takes a while before you get any views let alone a response.
 
6:12 PM
@AaronHall 24 hours on CR isn't very long though
 
CR ≠ SO
 
@MathieuGuindon ok! the sands of time will take care of me then! :)
 
6:29 PM
I've seen that question, but I didn't get to review it yet.
you could ask Zeta
Maybe Gurkenglas will get to it, I haven't seen them around recently, though.
 
7:06 PM
I have some Const that are used as weights in a calculation:
Public Const a As Long = 1
Public Const b As Long = 2
Public Const c As Long = 3
I'm thinking about converting to an Enum:
public Enum Weights
  a = 1
  b = 2
  c = 3
End Enum
is using that in Result = (CountA * a) + (CountB * b) + (CountC * c) an abuse of Enum, or is that a Good Thing™?
or at least and OK Thing™
 
this makes me wonder why
 
@this makes me wonder why he said that...
why switch from Const to Enum?
 
feels like a bit too much cognitive load, TBH
no more specifically the formula that uses enum
feels weird to be mutlplying some data with enum values then adding them up
 
I'm working through cleaning up some code and the thought that might be a way to go.
I guess it's "a" way to go, but not so much "a good" way to go...
 
considering that enums are basically fancy-pant constants, the difference is almost nil
it's just that typically when one says "enum", I think of either well, enumeration or bitmasks.
not a bunch of constants that are used in formulas.
 
7:39 PM
eh. fair enough. I'll give 'em better names, but otherwise leave it as is.
 
7:53 PM
depends. Weights.Light, Weights.Neutral, Weights.Heavy could reasonably make sense as enums... although I do agree that using enums' underlying value in calculations is off-standard and rather weird. go with consts
 
59
Q: Defence methods against tailgating

LithilionThis is a follow-up question to this one: Roles to play when tailgaiting into a residential building How do you protect yourself or your company against tailgaters? What is the best answer when you are asked by, let's say the delivery guy, to let you in?

I have a great solution for this.
Put up a huge poster on the door that letting unauthorized person in will result in charges for being an accessory to burglary. And they will be additionally charged as an accessory to any crimes committed by said person.
And then actually follow up on it.
Use cameras to monitor who lets people in and out.
 
youch ...
 
@Vogel612 I think it would work, and I know it would be legal.
Nothing scares people like the law.
Except for death.
 
good luck getting employees
 
@MathieuGuindon Still wouldn't be hard if it was a good job.
 
7:59 PM
there's no company in the world that has enough money to pay me to work for them and have such a policy. If the company can't solve their security issues without getting into my business at the company, it's their own damn fault, and there's no reason I have to pay for it. — Andrei yesterday
 
00:00 - 20:0020:00 - 00:00

« first day (1627 days earlier)      last day (1553 days later) »