« first day (2795 days earlier)      last day (2165 days later) » 
04:00 - 14:0014:00 - 21:00

4:00 AM
Please pardon me for asking a silly question. What does COM mean in COM objects of C#?
 
 
5:02 AM
Good morning people who will come in eventually! Hope you all had a great weekend :)
 
5:18 AM
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' squirrelerinos!
@Squirrelkiller Why are you here already you ex lazy prick?
 
2 days ago, by Squirrelkiller
Girlfriend had to leave early, so I joined her.
 
The alternative would have been to sleep for another 20-40 minutes...bu this way, I get to go home early :D
 
And girlsquirrel is still the correct terminology
 
What about Squirrelina though?
 
5:22 AM
Squirrelelina would be acceptable
 
posted on June 11, 2018 by Scott Hanselman

Open source ASP.NET Core 2.1 is out, and Architect David Fowler took to twitter to share some hidden gems that not everyone knows about. Sure, it's faster, builds faster, runs faster, but there's a number of details and fun advanced techniques that are worth a closer look at. .NET Generic Host ASP.NET Core introduced a new hosting model. .NET apps configure and launch a host. The host is

 
 
2 hours later…
7:09 AM
@Squirrelkiller wow, you're up early!
 
how can i insert greek letters with stackoverflow markdown in a question?
for example alpha ot beta or gamma
 
@yekanchi Copy paste from wikipedia?^^
 
alt+224 biαtch
(No Ωffense)
 
7:26 AM
^2^2Ó << happens here for some weid reason
 
α work for me on both english and german keyboards. Strange.
 
Weird... When i hit ALT + 2 this happens `^2, when i release the ALT then the sign wich i would expect appears: ☻
 
2? alt+2 does nothing for me o.O
 
alt 1 = ☺ alt 2 =☻
ALt 3 = ♥
 
☺☻♥ I was just stupid and pressed the num row
 
7:31 AM
Even weirder, accent circonflexe only appears when i hit the middle keys of my numpad.. --> 258
^2☻^5♣^8◘
 
Your keyboard is strange
 
No, it's the stack overflow chatbox
In notepad++ nothing happens
 
SO chatbox is normal for me though
SO be Ok yo
 
morning
 
Morning Hector
 
7:34 AM
so be no okay
 
Ready for some VB6 :D ?
 
@Squirrelkiller Oh hell no, that's a yesn't from me.
 
7:46 AM
hi guys
and girls
 
I have to ask how do you guys make estimations on tasks you don't know 2 shits about.
Like I was asked for a time estimation on a Crystal Reports task where I have to modify 10 reports.
 
Be honest.
"No fucking clue dawg"
 
Take a peek to see what you think it'd take to modify one report. Then x10.
 
Oh great, the problem is I don't know how long that might take because those reports are broken and I have to modify them so they match a different report that has nothing to do.
Along the lines of "Hey we liked your WebAPI, now take those CrystalReports trash and follow the same logic".
 
Tell them you'll have to write from scratch, and instead of estimating, use the actuals from the project when they were created to begin with
They will not be too happy with that so tell them you'll be 20% more efficient than the last guy and multiply your estimate by .8
 
7:57 AM
Doesn't work because boss of boss of boss who is up there godmode already sold them this.
 
Am i right flagging thi as moderator attention required? stackoverflow.com/questions/50792093/…
That dude is trying to bypass anticheat features in a game
 
There's nothing mods can do about that, your flag will probably be rejected.
 
That guys attitude is probably illegal, kinda sad it could be rejected
 
g'morning.
 
goooood morning c#ers
 
8:01 AM
I would close/delete the question
 
It sounds logic that they might be able to do something because... well we are getting into illegal stuff, but they don't give 2 straight fucks about whether something's illegal or not unless you directly target something explicitly abusive like porn, terrorism or religious/political trash.
 
Not at all sure this is illegal. It might violate a game's terms of service, but that's a civil matter, not criminal.
 
Exactly.
 
@Squirrelkiller Did you know of the existance of PrivateObject in MSTest?
 
And in the comments he mentions using it on a private server, which means the TOS probably don't apply anyway.
Nothing illegal, not even breach of unenforceable and often draconic TOS.
 
8:03 AM
@Avner I need your avnerium knowledge on this:
14 mins ago, by Héctor Álvarez
I have to ask how do you guys make estimations on tasks you don't know 2 shits about.
 
@HéctorÁlvarez Badly.
I tend to be overly optimistic about work estimates.
The only technique I've found which helps is trying to break it down as much as possible. Even if I have no idea what the task will entail, I, at least, know that it will take 1) Preliminary research, 2) Initial implementation, and 3) Reiterate design after initial implementation and polishing up.
So I try to estimate. Badly.
 
@bradbury9 read comments
Also if private it might be for testing his own crap to "unhackable"
@HéctorÁlvarez this might help you
Bit long
 
Might be his own game (possible, though I doubt it), but this is what private servers are for - to play without the community standards of the official game server. You don't get patches and updates, you don't get moderators and community managers kicking off assholes and cheaters. You run your own server, do whatever you want.
 
But good tips for estimating
 
I'd love to break it down into smaller tasks, but that's not possible as far as I know. Editing a VB6-embedded SQL sentence so it outputs different results doesn't look like something you can really do, it's just one big pile of rubble.
 
8:09 AM
@HéctorÁlvarez Not necessarily. You have the existing code, right? First step is reading it to make sure you understand what it does and how. That's one task.
 
@HéctorÁlvarez you ask for time (some hours probably) to make a correct estimate, by making a quick prototype of what you are expected to do.
 
@AvnerShahar-Kashtan Right.
 
Next is refactoring it. Refactoring is a great way to make sure you understand the code. Refactor it and see if it still does the same thing, keeping in mind the changes you wil lhave to make.
Next comes changing it to return different results. Since you just refactored it, it should probably be relatively easy - it won't be a mess, but cleanly separated into the bits that don't have to change, and the ones that do.
 
Hmmm I hadn't thought about it that way.
 
Remember the credo: always leave the code in better shape than you found it.
 
8:13 AM
That should amount to, at least, 3 days.
Including tests.
Oh well, let's see where this goes.
It was pretty enlightening.
 
Fine. Three days, then. Avoid the temptation to underestimate to avoid making hte task look too big.
or yourself too slow.
It's easy to go there.
 
can anyone check if this compiles?
 
@HéctorÁlvarez Give a date range (another thing that video talked about)
 
@Squirrelintraining Regarding this, I have 50 days worth of work load, assigned by 7 different PMs. They'll come to me once every 3 days and try to push their tasks to the top of my list so they get done by the end of this month.
 
8:18 AM
And the rule in this company is "when someone makes something look very important, it gets the priority".
 
@AvnerShahar-Kashtan dotnet fiddle doesnt know C#7
or 6
or whatever the => was introduced with
(i already tried that :D)
 
I'm lucky I managed to fix this week's assignment.
 
@HéctorÁlvarez I hope they pay you well
 
@Wietlol Change it to Roslyn, on the left.
 
6 i think @Wietlol
 
8:21 AM
for me it doesnt compile :(
HashSet<T> implements IReadOnlyCollection<T> though
or wait... maybe it doesnt
 
Compiles fine in dotnetfiddle under Roslyn 2.0
Under RoslynPad as well. Intellisense shows that it behaves as expected.
using System;
using System.Collections.Generic;

interface ITest
{
    IReadOnlyCollection<String> Values { get; }
}

class Test : ITest
{
	public HashSet<String> Values = new HashSet<String>();

	IReadOnlyCollection<String> ITest.Values => Values;
}

var test = new Test();
test.Values.Add("test");
ITest t2 = test;
t2.Values.Add("test2") // <-- doesn't compile - readonly.
 
@Wietlol it shouldn't allow it, because you would be able to cast it to a not-read-only. You can probably return a new ReadOnlyDictionary<T>(yourCurrentDictionary);
@AvnerShahar-Kashtan huh. interesting
 
@Default No reason why it shouldn't allow it. HashSet<T> implements IReadOnlyCollection<T>. It's a superset of functionality, sure, but it can serve as a read only collection if you need it to.
 
can the last line be written as ((HashSet<String>)t2.Values).Add("test2");?
 
we use .net framework 4.5
 
8:31 AM
@Default It can, yes.
 
since 4.6, it implements IReadOnlyCollection<T>
before, it didnt
 
Ok. Fair enough.
Not a breaking change.
@Default But that's "breaking through" the contract.
 
but when i go to declaration, i see the latest version :(
 
No different than using reflection to read or write a private field.
 
I just feel it's easily fixed by returning a new ReadOnlyDictionary/Collection taking the current as parameter
 
8:33 AM
I do have to say that IReadOnlyCollection does have a wrong name then
since it implies that its implementation is immutable
rather than that you can only access it by reading operations
@Default ussually, you dont care that much about it being immutable
you mostly just care about not accidentally mutating it
 
if you return a ReadOnlySomething you care about immutability
 
therefor, interfaces that only have read operations are really useful
@Default nope
 
IReadOnlyCollection != IImmutableCollection.
Though it can be confusing.
For instance, IEnumerable exposes only read operations, but is not guaranteed to be immutable.
 
kotlin might introduce true immutability
but they havent shared their approach yet afaik
with marker interfaces, you would require union types
which would also be quite interesting, but they try to postpone that feature because of its complexity
 
Returning a read only interface means that you are asking the consumer of the method not to modify the contents
If they try to anyway, then all bets are off
You've made it bothersome for them to actually do it, but not impossible in many cases
 
8:51 AM
Again, in the case of IEnumerable, in their usage as generators - you only have a read-only interface, but it's expected that the enumerable's content will change.
 
9:07 AM
@Squirrelintraining No.
 
Feels daut man
 
I am using Microsoft.Office.Interop.Excel to generate excel
but this is not working
    style.HorizontalAlignment = HorizontalAlignmentStyle.Center;
error under HorizontalAlignmentStyle
This is the reference
https://www.gemboxsoftware.com/spreadsheet/help/html/P_GemBox_Spreadsheet_CellStyle_HorizontalAlignment.htm
I got it
 
9:23 AM
If I get a 500 error, that means there was an error in my c# stuff, yes?
If so, why does nothing error in the Debug session?
How can I work out what's causing it?
 
@Lemonade1947 Logging.
At the very least, you should wrap your controller endpoints in try/catch and log any errors they catch to disk. This is the entrypoint to your code, so all code will flow through the controller methods. So if you wrap all controller methods, you should be able to see the error.
 
@Squirrel indeed I did not know about PrivateObject. Gotta check that aftter the meeting.
 
@Squirrelkiller Seems to be simple refletschion
 
9:52 AM
Does Lemonade 71years old?
 
@nyconing Yes, yes he is. He is a 71 year old rabbit.
 
Maybe. Maybe he's 1947 years old. Or maybe that's when the real Lemonade was invented.
 
He was born in the aftermath of World War II, the first baby born in his village after the war. A beacon of hope in shattered Europe.
 
Hate to pop your bubble but he said the other day he was born in '97
 
9:55 AM
Don't listen to the butler
 
All a part of the plot to avoid questioning. If the man heard about a 71 year-old rabbit, he would be taken for questioning.
 
He isn't even a real butler!
 
And we all know what that means.
 
10:15 AM
Shim und Stub schon mal gehört? Have you heard of Shim and Stubs?
 
Nope.
Have you heard about shadows die twice?
 
Learn german and watch that video >min 40
Nope I always pull the trigger faster than my shadow.
 
@Squirrel nope, not gonna watch videos at work
 
@Squirrelkiller It's called "Fortbildung"
Link it to your chefchen, and tell her it's from me.
She'll understand
 
10:44 AM
I've got a question, why do packages like Microsoft.IdentityModel differ when using asp.net core on linux and on windows? On win I get a NU1701 - resolved with .net framework, which is essentially a different package. Why doesn't it target .net core when on linux it does?
 
@Squirrel we don't have time for fortbildung or any of that modern stuff
 
I just heard someone close to be deciding to use MD5 for all the passwords in a certain environment, because as long as the user doesn't know what algo is being used they can't know how to decrypt it.
Oh god, how did this guy become a boss of anything.
 
Just tell him bcrypt is stronger, faster, better to use, and throw something technical in there I'm sure you'll think of something
 
@HéctorÁlvarez Tell him you can use gzip to encrypt the passwords. As long as they don't know the algorithm, it's safe!
 
11:02 AM
I am new here and I have a query
can I ask question here?
 
@AvnerShahar-Kashtan store the password like this: user.password += "OMGWTFBBQPWHAX";
nobody will be able to decript because it has random characters, and they are all half equal, half different!
Even better, a feminazi hacker will stop hacking inmediately and demand you set every password 100% equal.
@Squirrelkiller Wait, a succinct solution in this company? NOT TODAY.
 
@SumanKumar sure.
 
!!welcome-c# SumanKumar
 
@SumanKumar Welcome to the C# chat! Please review the room guidelines and tips. If you have a question, just post it, and if anyone's free and interested they'll help.
 
11:08 AM
We really have to add the "Don't ask if you can ask" to the welcome message here.
It's pretty recurrent.
 
@RudiVisser Not cool. You know it's a joke, but a newcomer doesn't. End result: the room was rude and unwelcoming.
 
Was responding to another message
 
cool :) I have two projects in one solution, Primary is C# and secondary is VB.net..what I want to do is do some stuff in c# which generates some data..I want to use that data in VB.net..then comeback again to c# and do some stuffs...I am able get data from c# -> go to other project do some stuffs there...>But not be able to get back from there...I want to do it using only one Button....let me know if any query if there is some miscommunication from my part.
 
@RudiVisser sorry, then. It came up right after.
 
It did look like you were responding to him though.
 
11:12 AM
I apologise for your misconstrual
 
#Drama
 
Its cool guys :-)
 
Oh a riddle!
 
lol..is my query lil confusing?
 
I'll start guessing. Mmmmhmmmmm... do you await the result from your VB.NET app?
It's not confusing, it's overly broad.
can be summed up as "My 2 programs which should communicate don't work, why?"
 
11:14 AM
I have used timer..to trigger methods
in vb.net
once form of vb.net is loaded...it runs...it gets result..but how do i get back to c# code?
continuously?
What I want is once all result is loaded in vb.net..it goes back to c# and use that result in c# code
 
I don't understand
 
result is in excel file, so can be extracted from both project
 
Lol my boss just flat our refused the concept of guuids
 
Why?
 
ok let me try this way ..I have a method in c#, other in vb.net (second project)....first execute c# then go to vb.net (do some stuffs) ->then again back to c# to hit other methods?
Only issue I am having is coming back to first project
I can do it using two buttons
but not able to do using only one
let me know guys which part is not clear from my side I will try my best to elaborate
 
11:39 AM
I'm getting really bored of writing these docs now
 
Dude I'd never known it was a photo if you hadn't noted it down.
@Lemonade1947 What's a "GUUID"?
 
There's more quality stuff like that
 
Oh and by the way, guys, did you check any E3 conferences so far?
 
I'm watching EA now, dull and boring as every, I watched the MS one live and the Bethesda just before
 
I didn't check Bethesda's, didn't really want to waste 2 hours of my life seeing Skyrim toaster edition.
 
11:43 AM
It wasn't toaster edition
 
"FUS RO DAH your toast to your dish directly with the new voice commands! FOR TOASTERS!"
 
It was Etch-a-sketch edition
And alexa edition
And pager edition
 
@HéctorÁlvarez wat
 
@LeeButler just says he doesn't like them
 
EA pumped out their usual roster of SPORTS and then a couple of random other things
 
11:46 AM
So I'm making a webservices that works off incremental integer IDs
 
Use GUIDs
 
I know
I want to use guuids
 
What is it for? But also use them anyway
 
it's the first time I've really been loud in a meeting, being that he's head of IT and I'm a lowly code monkey
I was like "look you're asking for a data breach"
He's like "look maybe we'll use them one day, but to start with we're not"
And I think he only said that to shut me and my colleage up.
 
Well what are you not using them for
 
11:50 AM
a web services for requesting customer info
(and all other info in db eventually)
 
OH GOD
 
@Hector actualy the "Don't ask if you can ask" loop thingy was in there....before Kendall changed it.
 
Damn you kendall
!!giphy shake harder
 
11:56 AM
KEK
 
Has anybody seen rlemon lately‽
 
ʇ,uǝʌɐɥ I 'oN
 
He is sleeping with the Fishies
 
has any1 seen shims before?
[TestMethod]
public void ShimmingAround()
{
	//create a new context during wich code gets "redirected"
	using (ShimsContext.Create())
	{
		//redirect DateTime.Now to 01.01.2000
		System.Fakes.ShimDateTime.NowGet = () => new DateTime(2000, 1, 1);

		//Assert that DateTime.Now relly gets set to 01.01.2000
		Assert.AreEqual(DateTime.Now, new DateTime(2000, 1, 1));
	}

	//assert that now that the context is over it doesn't get set anymore
	Assert.AreNotEqual(DateTime.Now, new DateTime(2000, 1, 1));
Aswell I've learnt that in order to test async methods asynchronously, just return Task instead of void
 
That using...looks suspiciously like one of many in our codebase.
They build a new context, then use that context for the magicVars and stuff, and close it.
Sometimes they g 3 layers deep, each one with its own context
shudder
 
12:03 PM
Welp at the end of the ShimsContext, the redirection of System.DateTime stops
And this was intendend to use for testing :)
 
The SqlContext too was intended only for DB access. Turns out it's everywhere now.
 
hi
 
hi breathing
 
when I am generating an excel file it seems to be converting time say 22:22:22 into a number!
why could be that?
hey @Squirrelkiller :)
 
12:07 PM
Because...it's a number?
 
actually in decimal
 
Depends on how you generate it I guess? Dunno, never built excel stuff in C#, except for that manuel csv thingy
 
Go to the vamp room you two :)
 
You're just jealous :P
ALso I'm getting coffee, brb
 
Nah I only can see a squirrel talking to himself, always confuses me at first glance
Anyways mr squirrel, ma'am,
Shim has been arround for 2 years and no abuse to be found yet.
 
12:16 PM
Hi. Is it possible to genrate C# code for a class based upon an interface?
eg, I could have an interface which has
void DoThis()
I'd like to do something in visual studio which would create a class skeelton with this method
Does such a thing exist?
 
class myClass : IDoThis { }

Now hit ctrl + . on the squiggly red line and hit "Implement Interface"
Voilá
 
Or do I simpl,y have to to implemnent after creating the class
ha ha, you beat me to it
Basically, my question is, can I avoid that 1 little step
 
You know what, i have no Idea
 
I don't think it is
but thought I'd ask :)
 
Did you ask Dr. google already?
 
12:20 PM
Yes
and SO is obviously the first hit
and it suggested no BUT... things change quickly in dev
and often, the correct answers can be out of date
The SO post also said as you did
 
I seem to be applying HorizontalAlignment = Microsoft.Office.Interop.Excel.XlHAlign.xlHAlignCenter; in a loop
which is causing my time and duration field to show weird values?
 
Are you doing that in code behind or in the designer?
 
12:44 PM
VS used to position the currently executing test at the top of the test list. After updating, it no longer does. How do I get that functionality back?
 
I come back from lunch and everything's on fire. I clicked a button and it's all good now. Everyone looks at me like "WTF did you break that you knew how to fix in 10 seconds". Aaaaaand everyone else is gone to have lunch.
 
Is this to broad for a SO question?:
Header: Benefit of using the ClassInitializeAttribute over a static Constructor
 
Probably classified as opinion-based, althought I always thought there has to be an actual better choice.
I suppose it's up to your way of asking it.
 
har har

I can feel the rep raining down on me already

::feelsgoodmeme::
 
REP: 154 as of now.
 
12:55 PM
Kek
Probebly 152 by tommorow
 
Maybe we should have done this in the sandbox. Can someone clean up for us please?
 
Sorry for disturbing. I'm new to this. My question is: Is there any Windows API equivalent of Get-AppxPackage command?
 
Hey there. No idea, but it sounds like google would help.
 
1:13 PM
!!googleme get app package windows api
 
Good Eve guys!
 
What Eve?
 
This Eve!
 
Oh, this one.
Merry Christmas eve guys.
 
1:18 PM
@HéctorÁlvarez thx babe
 
Smooch.
 
I have a silverlight app where I need to find the width of a control where the width is determined by the contents. It's giving me an ActualWidth that's half of what's showing on the screen.
 
A quick Q
If I have DataGridTextColumn amtColumn = new DataGridTextColumn();
amtColumn.Header = "Kogus";
amtColumn.Binding = new Binding("FirstName");
amtColumn.Width = new DataGridLength(1, DataGridLengthUnitType.Star);
 
@Hypersapien Why do you use silverlight at all!
 
any way to have the column auto size to fit it's header in addition to being a star width?
 
1:27 PM
Because management is dragging their feet replacing this fucking thing
I'm supposed to start working on an MVC replacement, eventually.
 
@RandoHinn I am personally against editing a XAML-based view from code. If you need automatic width do it from the view.
This company did the same thing and the product is now half-assed. I warn you, be careful with Silverlight.
 
@HéctorÁlvarez how to get the same in xaml, then? Fit header contents, but also be relative width to other cols (just one growing to fill remaining width would be fine too)
 
Wow you're fast removing stuff.
 
Accidentally hit Enter before I was finished.
 
@RandoHinn That's probably available in the docs for your particular control. In a standard grid you can do it very easily using auto, * and stuff like 3* to render a cell 3 times bigger than the standard *.
You can hit the up arrow and edit it instead. Like this, do you see? I can do it more and more. And more. Period.
Then you can also click the message history and see what it used to be.
 
1:39 PM
Maybe I'm going about this in a way that's making it harder than it has to be.I have a set of controls in a container (search controls). I want the controls to wrap around if the user resizes the browser too small for all of them to be in one line. But I also have a GridSplitter just below the container, and I want the controls to automatically change their height as the user resizes the container so they are 1/(number of rows the controls are currently wrapped to) the height of the container.
 
o/
\o
\o/
wassup coders for living!
Guys, this is nice
You can directly host your asp.net core 2.1 on Windows Service without even the need of IIS
 
Always could 👍
 
I came up with the idea of having a grid in the container, and on the Resize event I check the width of the controls and re-assign them to different rows in the grid. The problem is that some of the controls have variable widths and when I get their absolute width it comes out wrong.
Like, one has a screen width of around 300, but the AbsoluteWidth says 150.
Probably because it has a MinWidth of 150
When I take out the MinWidth, both the Width and AbsoluteWidth are NaN
 
1:58 PM
Can I publish an asp.net core MVC app to windows service too?!
 
"Again, no need for IIS, and you can host whatever makes you happy." Scott hanselman stated :D
Yes @Squirrelkiller
 
04:00 - 14:0014:00 - 21:00

« first day (2795 days earlier)      last day (2165 days later) »