« first day (2662 days earlier)      last day (2509 days later) » 
01:00 - 18:0018:00 - 00:00

01:37
posted on January 29, 2018 by Scott Hanselman

Last year I found a company called SunFounder that makes great Raspberry Pi-related kits and stuff. I got their Raspberry Pi 10" Touchscreen LCD and enjoyed it very much. This month I picked up the SunFounder PiCar 2.0 kit and built it with the kids. The kit includes everything you need except for the Raspberry Pi itself, a mini SD Card (the Pi uses that as  hard drive), and two 18650 rec

 
4 hours later…
05:34
not really a c# question but can anyone tell me the difference between EncodeXML and EncodeXMLSubject
 
2 hours later…
07:22
ohayou
GoodMorning!
morning pluto
07:38
Good morning sharperinos!
Hope you had a nice weekend?
08:24
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
hey hey heyo
good morning
Morning
@user5500750 If something takes an hour to test, than make a MCVE.
On github I'm checking some statistics and found the following sentence: "Contributions to master, excluding merge commits". Is that excluding the 1 merge-commit or excluding the 5 commits within that merge-commit?
08:43
I'd expect exluding the one merge-commit, as that one is no actual contribution but the 5 merged commits are contributions.
JRO
JRO
09:44
Goodmorning all :)
Anyone that could help me with this issue?
0
Q: Outlook treats MSG as Plain Text while it's properties shows otherwise

JROI've developed an Outlook Add-in which has the ability to save e-mails to our software. The e-mails are stored on a networkdrive. But the problem is, when re-opening the MSG in Outlook, Outlook treats the MSG as Plain-Text while it's underlaying properties show that it's HTML. PR_RTF_COMPRESSED...

g'day
I am not able to access a remote location using windows service
But it is accessable If I am using console application
I have searched in the stackoverflow for the same
10:36
@JRO no idea about outlook stuff, sorry
@Nerdintraining'questionmark' waddddddup
@Kieran not PUBG wit you :<
How to remain one thread while debugging?
I try to dry run but it keeps going one way or another before returning back
Good question, did you ask google?
10:48
In the threads view, You can switch back to Your thread in any debug point.
Thats not what he was asking for ntohli :P
but it's still a helpful info.
I show most of my peers that window
I 'activated' it but that didn't really changed anything
sorry I mean a see a lot of worker threads
11:11
just in case anyone's proficient in RDP management, I have the following issue that I want to solve on my end
in this company we use a single user to connect to remote desktops. We don't log in with our user, but instead there's one for each department
the problem comes when e.g. I'm connected to a particular desktop and someone else connects to it, I get insta-kicked because it's the same user, so it assumes you are the same person logging it from somewhere else
I would like to get the same message you get when logging in with a different user, where you have 30 seconds to grant/deny access, and if you fail to accept you are deemed AFK and the request is automatically granted
is it possible to do this on my end?
do you guys know if there are any such powerful arcane magics?
That just works if you have different users
Since, when oyu login as the same user, you ARE the same person
Just have one AD group per department, instead of one user, and add everyone to that group
(If you can do such a thing, permission-wise)
11:27
i can't because I'm not the network manager
I'm just a small developer in this company
back when I was in a small company, just 10-ish of us devs in there, we used to hack all sorts of crap into things because it was fun
we blew our project manager's tool (it was a shitty drupal that didn't really work, so we took it down by force) through a bunch of SQL injections
To be honest, what kind of product blows up when you enter as a task comment "Added script';DROP DATABASE master;"
11:49
One that doesn't use SQL params.
Good call. Showed your boss what can happen if you don't intercept SQL injection.
There's a solution for your RDP Management
Do it the right way and get users for each person
Sorted
Or the easy way, add a login for each user in the AD, so they log in using their own credentials, just in case someone screws up and you can blame someone for their sloppiness
then again I was handed the user and password in a TXT file along with another 50 credentials for other places, and was told to take whatever I need
and discard the rest
It's also not ISO 27001 compliant to have a user that is used by several people
Well you know what you have to do on your last day there
11:54
I bet I could deploy a coin hive in here and nobody would notice
Important: Do it with a script that waits 4 months before doing anything
Can't have them track it back to you
12:05
why 4 months?
it will still leave traces whenever it starts working
will there be any competence to track something > 4 month old?
I doubt someone would be able to trace anything over 5 minutes old
around here I mean
Why when I define the add and remove blocks for an event, I can't fire it like OnChanged(...)
there's this error:
The event 'OnChanged' can only appear on the left hand side of += or -=
@MohamedAhmed Because you have to fire the underlying field in that case
12:19
@KendallFrey What I understand from this is that it's designed so, because firing the delegate is left to the developer, and it might not be provided within the add and remove blocks, right?
@MohamedAhmed It doesn't even make sense to be able to fire it, since there's nothing to fire.
The 4 months were more about people noticing that something's fucked the day after you leave. That's just too obvious.
@KendallFrey doesn't firing mean executing the add block?
No
It means running the event handler(s)
@MohamedAhmed because OnChanged is a list of actions that happen when the event is raised, and you have to subscribe the event so everything happens at once, and everything's tidy
12:26
@KendallFrey doesn't events eventually converted to add&remove blocks?
@MohamedAhmed What does that even mean?
oh. yeah.
in the IL code^
And look right below it
There's the field
12:30
yes, so there is a mechanism that tight both event and its delegate together, rather than explicitly split them to private field and a add/remove event?
Yes, just like auto properties and their getter and setter
@KendallFrey thanks @KendallFrey, great illustration , helped me get it far better :)
13:04
I hereby submit to .NET Core, time to get started with it
should I read anything in-depth before putting my hands on it? I've noticed it's pretty different from WPF
I need your advice on this
@HéctorÁlvarez Why would you compare it to WPF? It's not a UI framework.
I'll need to map an excel and a database, check some data and insert it somewhere, how does EF Core handle this stuff?
@KendallFrey sorry I meant UWP
not Core
user5500750
@HéctorÁlvarez EF doesn't handle Excel files. You'll have to map it yourself.
13:22
@HéctorÁlvarez I hate myself for even suggesting this but you want SSIS.
When doing TDD should I create a TestClass for each class that has public methods? Is it usually best practice to have a matching test file or do some clump them into the same file?
13:56
@BillGreer best practice is test only public methods by default. You don't have to expose every private method, just the effects on the output of public methods.
You can see that only Of(long number) is tested in a video there> vimeo.com/249775141
also there is a Mock class created to expose some inner counter.
I've only used SSIS during a course on advanced MSSQL management
however, I've used Talend before, which is a shittier Java implementation
@user5500750 I didn't think about that
so... do you all agree SSIS is the way to go here?
the biggest issue I might have here is that I don't know what version of MSSQL it will be
@ntohl Do you typically create a test class for each of your classes that have public methods? For example, if I have a class called Car and a public method of Drive and I have a class called Plane with a public method of Fly should I have two separate files in my test project? One called TestCarClass and one called TestPlaneClass? I'm just wondering best practice for organizing.
I usually find that a test class per logic class is best.
Files are cheap.
Classes are cheap.
@HéctorÁlvarez Once you've settled on SSIS all other questions become irrelevant. The only remaining question is "how much longer before I just kill myself"
@ProfessorSquirrel Talend didn't kill me, I won't die to the same principle with a different disguise
@BillGreer yeah. I do. Not long ago I read about how good it would be, to have tests in the same assembly as the main classes. The standard is to have tests in different .csproj, but I don't follow that.
14:21
@HéctorÁlvarez SSIS is more powerful than you can possibly imagine.
"I'm sorry, you've been diagnosed with SSIS. I'm afraid it's not good."
@ntohl There are reasons (in .net) to have tests in separate assemblies. Mostly to do with binary size, which drives startup time.
@nothl @Zarenor I would think you would not want to deploy your tests with your final product.?.?.? Or do some people not mind?
@BillGreer in my last project I hardcoded to run tests after first run of the .exe
In Entity Framework, if you get a fresh DbContext, does that also get a new connection?
14:34
@ntohl Just the first time? How would you have your application handle a test failure? Log and Exit with Email Notification?
@MattThrower Generally, yes. The Dbcontext constructor connects to the database
(which is why the string-parameter version takes the connection string as it's parameter)
@Zarenor That's what I thought. I'm baffled by an ongoing issue I'm having with a windows service losing connection to a MySql DB via EF. I've tried refreshing the DbContext on each call, but the problem persists
Digging in to manually controlling the connection. Don't want to, but not sure what else I can do.
@MattThrower A service is losing connection? How frequently? Is it possible you were relying on your windows user to authenticate, and when running as a service it's being rejected because it's running under the service user?
(just throwing out ideas)
@Zarenor Hard to tell. It's the "System.Net.Sockets.SocketException: An established connection was aborted by the software in your host machine" error which, as I understand it, can mask a wide variety of causes
It's happening when the wait_timeout setting on MySql is exceeded without activity
@MattThrower Ah. Can you adjust the wait_timeout? Or send some sort of keep-alive? I feel like there has to be something for this....
14:50
@Zarenor I could increase wait_timeout but it's not much of a solution ... if the service does go unused to whatever the duration is, the error will recur. I don't know about a keep-alive - I'm trying to force EF to reconnect, but it doesn't seem to be helping.
In a multi project solution is the only app.config that matters the one where the executable is? I just commented out the entire app.config file of one of the other layers and it had no impact on my program.
Try...
It sends a wjue
:)
It sends a query every 5 seconds. But that doesn't seem to stop it. It errors when it tries to update/save
Huh.
I was going to say, on their docs site they list Keepalive as a connection string parameter you could add. But if you're already querying frequently
@Zarenor Ah. Apparently I might need a "connection pool"
This is the first time I've worked with MySql. I can't say I like it much.
.. maybe. I don't know. I hate these sorts of issues :(
14:58
Yeah.. It's annoying because it's right at the edge of 'your code', and it's masking what the real issue is with a nondescript exception. Those are the most frustrating errors to deal with
x.Replace(",R,", ",");
How will this method work?
@Zarenor upvotes
@pluto20010 What exactly do you want to know?
Well, it's not the keepalive. A solution ruled out, at least
15:13
@pluto20010 What type is x? string?
Looks like the replace will remove R from a list
@BillGreer it's not sure, that the config file is copied to the bin folder. Check if it's "copy if newer"
@BillGreer it's just outputting to console.
user7480455
Hi all
@Zarenor Yes
what up with blank strings being passed in the parameters?
15:28
Good morning all
How do Console.Writeline pretty print of C# object in XML or JSON?
@pluto20010 They're not blank. As @Metallkiller mentioned, it'll remove 'R's from lists of characters - if you have a string "A,B,C,Q,R,S,T", and apply that, you'll get "A,B,C,Q,S,T" - it won't work if R is in the first or last position.
!!tell vap bing how to commit suicide
@ProfessorSquirrel what the fuck
15:30
@KendallFrey Normally I have some front-end so I just pass the Web API serialization of the object to a JSON.stringify(object, null, 2) call and stick it in a <pre>. That doesn't work in this situation
Why not?
@ProfessorSquirrel that hurt my feeling you, as an RO, should know better
@Vap0r How? Console.WriteLine calls object.ToString() on all it's arguments, if it's given a list of objects. If the XML or JSON implements prettyprint in their .tostring...
@KendallFrey it's a console app
So? Newtonsoft doesn't care
15:32
@KendallFrey I guess I have two questions: 1) How do I serialize it (I can answer this myself). 2) How do I format this serialization to work in a console.writeline?
1) Newtonsoft.Json 2) What do you mean?
@Zarenor yes it's a list of objects in this case so Console.WriteLine's toString() just gives me the type of the list, and not the serialized contents
@KendallFrey I would prefer not just one long string of XML or JSON, but rather formatted (indented and new-lined) data
Ah. Then they haven't overridden object.ToString. The default behavior of object.ToString is to preint the typename.
why are you pretty-printing JSON to the console
148
Q: How do I get formatted JSON in .NET using C#?

user34537I am using .NET JSON parser and would like to serialize my config file so it is readable. So instead of: {"blah":"v", "blah2":"v2"} I would like something nicer like: { "blah":"v", "blah2":"v2" } My code is something like this: using System.Web.Script.Serialization; var ser = n...

15:33
@Failsafe basically as a quick check that everything is as it should be
@Failsafe PoC
you know fiddler will show you the json struct you are returning
@KendallFrey oh this is nice
thanks
@Failsafe yeah so will serializing the object and printing it to console
If I have two console projects in one sln, should both of the project .exe files be built to the bin?
the console is ass
this isn't javascript
@Failsafe it's a PoC
15:35
you're a PoC
lol quality
Proof of Concept not piece of crap
@KendallFrey why are all the ROs insulting me?
@Nathvi Depends on your use case. You can't start and debug both at the same time
i didn't insult you
i called you a proof of concept
15:36
My fragile emotions are being trampled like a delicate wildflower
wow dude mean
assuming that i would insult you
@Nathvi Or do you mean the bin directory? They each get built to their project subdirectories. If one is marked as referencing the other, it'll copy
@KendallFrey Vap0r just called you a C# mouth-breather
@KendallFrey please like you want him so stick around
!!giphy arnold stick around
15:43
@KendallFrey you were probably one of the only ROs I didn't refer to as a mouth-breather
You're still @ProfessorSquirrel? I'd imagine you'd flip by now.
@Nerdintraining'questionmark' I only flip for the cuties
Also too lazy
@ProfessorSquirrel So for sama senpais (RoelvanUden) profile picture?
or for
!!giphy cuties
@Nerdintraining'questionmark' it was a bottom joke so I guess?
15:48
TBH I have no friggn clue.
user7480455
Professor are you Mike?
user7480455
ok
Why would mike EVER do sth like that, eh?
@007 who is mike?
He sounds like a jerk.
user7480455
15:49
I don;t know him or her personally
user7480455
no he is not good kid
user7480455
just angry some times...
I'll have to wait for him to show up, then I'll show him what for.
Yeah, you'd give it to him wouldn't you Professor?
user7480455
I have not seen mike on in a few day... normally he or she is on line like a routine
user7480455
15:52
maybe decided to go on holiday.
user7480455
it is summer time in Australia
user7480455
Any one a fan of the sport of tennis?
Sports ball is best ball.
user7480455
Sport is a great thing to see
user7480455
back in '63 I was physical fit and sound of both body and mind
15:55
mike is not australian
user7480455
I was good at what I did back ten
user7480455
no he is not
user7480455
sorry
user7480455
I was saying that it is summer there
user7480455
I have no idea of his race or gender or nationality
user7480455
15:57
which is unimportant for a place like this
I thought he was from Elsweyr?
> I have no idea of his ... gender
Hmm.
Just an assumptive pronoun XD
jesus we have 2 squirrels now
double the fun
where's the 3rd one
16:02
@Squiggle
Not connected atm but he is the original squirrel
He's like Graf Squirrel
Grand Moff Squirrel.
do you know of any podcasts that would be fun to listen to while working?
16:31
Hello everyone! I'm a PHP developer and I have this job of enabling GZIP Compression on a C# website. I have "Dynamic" and "Static" content compression enabled on IIS and a "httpCompression" xml key on Web.config pointing to the right directory, however, GZIP is still not working for that website. What else could I do?
not be a php developer
(Don't take that seriously)
I'm good, lol
How many serious PHP developers do you know? That's why I wanted to become one of them :D
I knew one when i was in uni
idk if he still uses it
@LucasBustamante there's such a thing as a serious php developer?
5
Also
> GZIP is still not working
how is it not working?
What do you expect to happen and what's happening instead?
Prof. Squirrel to the rescue!
16:39
well, I expected the Content-Encoding:gzip header to be present in the requests, but it's not, even thought Dynamic Compression is enabled in IIS >.>
in the requests? the things controlled by the browser and not the server?
Or are you using a programmatic non-browser client on the client side?
how does it feel to bully again, after all this time?
I thought for a split second, that 007 change is name to Mike asdf
or is it just revenge for being bullied at school?
I seem to recall that HttpClient requires some special initialization to enable gzip
16:43
anyway, have a nice day, I'm out.
cya
still waiting for podcasts to listen to
user7480455
take care
It's all silent here
quickly, hand over some procrastination before I go mad and start making jokes about arcane torrent
user7480455
I have a joke
16:48
Squirrel!
ok our icons look strange next to each other in the channel occupant list
user7480455
Oh wait... now there are 3
that's weird i don't like it
that is ...unsettling a little
there is no chat
only squirrel
user7480455
who is the 3rd
user7480455
16:49
I know I was the first
user7480455
then the Squiggle
user7480455
now the professor
sure you were
Squiggle has definitely had the red squirrel avatar for longer than you.
@Kieran we need you to change your avatar
user7480455
no not at all
user7480455
16:50
I had it then he had it
We need an upside-down red squirrel
user7480455
that would be funny
"funny"
user7480455
I think squiggle should change his to something else
!!giphy funny weird not funny haha
16:51
IT IS I
ahh chuck 007 why did you whave to write^^
Turds
what's a good way to avoid having someone decrypt my password when they have the assembly that decrypts the string?
user7480455
since he was not the originator
1 message moved to Trash can
wait the actual fuck is this gif
16:52
@HéctorÁlvarez Hash your password instead of encrypting it
Why isn't this updating D:
Caching
It's always caching.
god dammit
Patience, grasshopper.
It takes a while for chat Avatars to update, up to 30 min or so, your screen will auto refresh when it does.
16:52
God damit nappa!
So did the master Squiggle bite another poor unsuspecting pawn?
pls
pls update
Slowly turning the c# room into squirrels?
So my SO Profile has updated
just not my chat one
well this sucks
Yes
SO chat sucks
@KendallFrey doesn't work, it's not the user that sends it
16:53
Always has
Always will
it's us who do, we need to provide that data for a web service
I shall become Captain Squirrel!
soon enoug
@HéctorÁlvarez what do you mean "doesn't work"
In context this statement is nonsensical.
user7480455
16:54
No be original... stops copy me.
@Nerdintraining'questionmark' same difference
user7480455
do your own original thing
@HéctorÁlvarez Doesn't the web service have an auth token or something instead of a password?
!!giphy autistic screech
reeeeeeeeeeeeeeeeeeeee intensifies
Okay ima going
haz a not so bad das grills
CMOOOOOOOOOOOOOOOOOON
@KendallFrey it's a machine, and the client has the exe
16:57
@HéctorÁlvarez Then if your client wants the password, they can get it.
How long does it normally take for SO to get the latest name/avi?
user7480455
LOL
user7480455
kieran you are making me laugh
why so?
user7480455
and that is not something I should do
17:01
did you look at my SO profile?
user7480455
because you want your Icon to change I gues?
I do :(
user7480455
no but I will
@KendallFrey It's complicated, because the password has to be decoded at some point and they work offline
user7480455
its funny... makes my day
17:02
there's that intermediate password that they must not be able to read...
but the rest of it can be transparent
oh lordy
is he trying to roll is own security?
we can encrypt the password in a file, and then use it in code, but we'll need to decrypt it at some point...
and if it goes directly embedded in code
it doesn't work either
because they'll just read it out of the assembly
i.e. you decompile it and it's clear AF
so any ideas?
oh look, all 3 squirrels are present
user7480455
We hunt with packs
user7480455
as in we are grouped together as we hunt of prey
yeah, you are half a six-pack
user7480455
17:12
no we are only 3
@HéctorÁlvarez The best you can do is make it hard for them to read the password (SecureString etc.) If they really want that password, it's somewhere on the system and there's nothing you can do about that.
user7480455
there have been reports of squirrels killing dogs
user7480455
and collecting their remains for sustenance
user7480455
Iam not saying he was a true report
user7480455
17:14
just saying there was a report of such an event
@KendallFrey oh well
thanks
I didn't really expect this would be otherwise viable, but still had faith there would be some crap like the useless Windows Vault
!!brb gotta reboot
17:41
whelps... seems like everyone's gone
I'll see you next day
17:54
no, we're still here.
j/k I'm not here
01:00 - 18:0018:00 - 00:00

« first day (2662 days earlier)      last day (2509 days later) »