« first day (3104 days earlier)      last day (1830 days later) » 

1:56 AM
Hi. This is my first time in chat. I have a question that I am hoping someone can answer quite quickly, and didn't think that SO was the right forum for it.
I have been playing around with Entity Framework on and off for the past few months, working with a project, and then leaving it for ages before coming back to it. I managed to create a database that has a name in the format of <dbname-GUID>, and there are no migrations associated with this. For the life of me, I can't recall how I did this.
If anyone knows...I'd love to know the name and/or commands I use to do this. I am guessing I created the DB purely off of the model classes, but I can't remember as I'm just coming back to the project after a while. Thanks.
 
 
3 hours later…
5:17 AM
86
Q: Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)

Taryntl;dr: Planned service interruption that will impact all Stack Overflow/Stack Exchange sites, Jobs, Chat, and Teams. All sites will be read-only for up to an hour during the maintenance. Enterprise cloud hosted instances will not be impacted. Short Version: There will be a service degradation f...

 
5:35 AM
good morning
 
posted on April 16, 2019 by Scott Hanselman

I did a blog post many years ago reminding folks that The Internet is not a Black Box. Virtually nothing is hidden from you. The same is true for your computer, whether it runs Linux, Mac, or Windows. Here's something that happened today at lunch. I was testing a local DNS Server (more on this on Thursday) and I started it up...and it didn't work. In order to test a DNS server on Windows, yo

 
I'm glad SO don't move away from windows
 
5:58 AM
I think moving away from windows would be way too much work for them, someone did suggest Moving to AWS in the comments, but I don't see that happening either
 
6:19 AM
First time fire alarm for an actual fire and not a drill happened today.
 
hi
 
ohayou
 
6:50 AM
O/
 
PS5 has both 7nm CPU and GPU with PS4 games backward compatibility
 
?
since when has it been announced?
 
Leaks came around 16 hours ago
USD 450 expected cost
 
yawn
 
And the GTA6 may came together with PS5 in 2020
 
6:57 AM
:o
 
Yes they are also saying it will be one month exclusive to ps5
 
they're working on a GTA6?
I suppose I shouldn't be surprised, but it takes them so much time and effort to make one of those things
Every time I'm just mind-boggled by the detail and effort they put into those games
 
@Neil I don't know, I am not sure, because when they released Red Dead Redemption 2, they said they are not releasing GTA6 because of the political climate
 
@anand_v.singh what does the political climate have to do with anything?
 
They said in their release of Red Dead Redemption 2
That because of the politlcal correctness if they do include it, some fans might get offended, and if they don't they will get targeted for not being considerate
I will try to find that article, if I find it I will link it here
 
7:03 AM
my proxy won't let me open that :/
I'll take your word for it
 
His quote ""It's really unclear what we would even do with it, let alone how upset people would get with whatever we did," said Houser. "Both intense liberal progression and intense conservatism are both very militant, and very angry.

"It is scary but it's also strange, and yet both of them seem occasionally to veer towards the absurd. It's hard to satirise for those reasons. Some of the stuff you see is straightforwardly beyond satire. It would be out of date within two minutes, everything is changing so fast.""
 
I find it funny that RDR2, as violent as it is, is perfectly ok to release but GTA6 isn't..
 
But with RDR2 they said they were being true to the timw
 
@Neil i though we agreed that you have to work more
so no "funny" pictures at job
 
@Proxy damn you, proxy!
 
7:16 AM
@anand_v.singh we had fire drill 5 min ago
or just false alarm, because noone moved out the building
 
R K
I've a table called SubCategories (ID, Name, ParentName)
I've a value for its Name column and based on this value I want to select its ParentName value (first match)
How can this be achieved in linq?
 
SubCategories.First(x => x.Name == "...").ParentName
what kind of table is that by the way?
 
R K
sql
tnx @ntohl - that worked.
 
7:33 AM
EF? DataSet?
 
good morning.
 
morn
not as good as yesterday tho
heard this morning about the notre dame
 
Yeah, it's a damn shame.
 
7:49 AM
1391
Q: A potentially dangerous Request.Form value was detected from the client

Radu094Every time a user posts something containing < or > in a page in my web application, I get this exception thrown. I don't want to go into the discussion about the smartness of throwing an exception or crashing an entire web application because somebody entered a character in a text box, but I am...

> Disabling post validation (validateRequest="false") will definitely avoid this error, but it will leave the page vulnerable to a number of attacks.
I wish to believe this is false
mostly because
> Ideally: When a post back occurs containing HTML restricted characters, that posted value in the Form collection will be automatically HTML encoded. So the .Text property of my text-box will be something &lt;html&gt;
I think this is stupid
but... is it dangerous at all?
I thought it was a safety net added for people who didnt know what they were doing
 
What, HTML script injection attacks?
 
similar to "SELECT * FROM Users WHERE username = '" + username.Text + "'"
I feel this validateRequest is like "oh, textboxes may not contain single quotes so they wont be used in sql injection"
except... "oh, textboxes may not contain open or close thingies so they wont be used in html injection"
if I disable the validateRequest, it all appears to be working fine
so... ¯\_(ツ)_/¯
especially reading the answer, it sounds like disabling this validation is how you solve it
 
Bad answers? On SO? No, say it ain't so!
 
I think the answer is not wrong
I do think the validation thingy is silly
because "this will protect html injection everywhere, but limits input to a subset of characters"
while not having that turned on does not mean that there is no protection from html injection
and a proper way to protect it, also allows all characters in your inputs
also
> Furthermore, "<" is not inherently dangerous. It's only dangerous in a specific context: when writing strings that haven't been encoded to HTML output (because of XSS).

In other contexts different sub-strings are dangerous, for example, if you write an user-provided URL into a link, the sub-string "javascript:" may be dangerous. The single quote character on the other hand is dangerous when interpolating strings in SQL queries, but perfectly safe if it is a part of a name submitted from a form or read from a database field.
it only protects against html injection
not js injection, sql injection, etc
 
8:07 AM
high pressure hydrolic injection?
 
Hi!
From C#, how can I attach to an TUN/TAP device in Linux?
(With Dotnet)
 
@ntohl In ours a wire blew and nearby false ceiling caught a bit of fire
 
Why can't the Xamarin team make a build of Xamarin.Android which doesn't have some crippling regression from a previous version
 
8:26 AM
Xamarin.Android team is busy on wrapping AndroidX artifacts. And deprecating old libraries because Google discontinued updating on Android.Support libraries.
Im waiting for them, Im ready for AndroidX since 2018...
BTW they are slowww
 
Why not continue to use the android support libs
They said AndroidX will be a dropin so it shouldn't matter
 
Yeah Im using Android.Support until now. But AndroidX have many of cool new features, plus the bug my project crashes into and fixed only in AndroidX library (nested pre-scrolling bug). New material widget and material-tweaked widget properties.
 
R K
8:44 AM
@ntohl - EF
 
8:55 AM
@Janman you want to send something over a specific device for something like a vpn?
anyway take a look here: github.com/dotnet/corefx/issues/18129
 
9:14 AM
@SebastianL I want to read the raw network stream from a network device in my C# application
 
then open the device file
@Janman everything on linux is a file
everything
 
@SebastianL Yeah, but it makes me nervous that I am seemingly the only one trying to do so, given that I can find no similar programs on the internet.

Yeah, I am just trying to make a POSIX open(), like here:
https://gist.github.com/JanmanX/d34b8fe7019b65f8c33efd2de285eaf3
 
dotnet core is rather new, especially on linux, so it doesn't suprise me, that there aren't many lowlevel network applications for it
 
Well, I guess I have to do an ioctl(...) from C#
Perhaps I can just avoid this altogether, and just interface C# with C
 
9:31 AM
@Janman What exactly are you trying to achieve. I can smell something nasty. And I've got a cold so smelling is really hard
 
@CaptainObvious I am implementing a subset of a network stack in C#, which I want to test by creating a TAP device and hooking it up to my stack. This way, I am not limited to testing with pre-recorded Wireshark dumps
It is very possible that what I am doing is completely wrong. In that case, do you have a suggestion in how I can feed a raw network stream to a while(True) { stream.readByte(); } in my code?
(Oh and it is not a userspace network stack, so hooking it up to the host TAP is solely for testing purposes. The network stack is going to run on separate device once ready)
 
Like @Sebastian said, you can just open the "file" stream of the network device.
So create a file stream and point it at /dev/eth0 (adjust as applicable) and then you can read from or write to the stream
 
9:49 AM
Yes, but I need to modify the underlying filedescriptor with ioctl, which I have no idea how to do (@CaptainObvious)
 
What do you need to modify?
 
It seems that I need to do `ioctl` to the `fd` in order to use it as a tunnel device:
https://github.com/torvalds/linux/blob/v4.4/Documentation/networking/tuntap.txt
 
Well that's something that's set up seperately
 
10:07 AM
o shit, I need to write a recursive sql query
 
Ah, I see. Let me try hacking something together to see if it works
 
user10864482
10:40 AM
good mornin
 
11:17 AM
Anyone worked with gitlab runners before? From where can I delete a folder to "clean up"? in gitlab-runner/builds/[someHexCode]/[someInt]/[gitlabProject] I'd like to delete [gitlabProject] at least. Or the whole [someInt] folder (in my case 0).
or the whole [someHexCode] folder of course
I'm just not sure if I destroy anything.
 
not sure, but if you delete it wont the artifacts be missing then?
 
possibly
 
is space an issue?
or do have just a little bit digital OCD?
 
neither. Strange git related error in the pipeline (index.lock already exists), and the easiest way of getting rid of this error is to delete it.
But if I just delet the index.lock, no idea what happens. I don't like to manually do stuff in the .git directory.
So...just deleted the whole thing.
 
 
2 hours later…
1:14 PM
best comment this year i found in the code so far
 
1:24 PM
I've seen worse. Hell, I've written worse. :)
One of my recent commit messages:
> ContainsContact returned UNCONTAINED contact because I'm stupid, that's why.
 
I think this is my most useful comment this year
// ReSharper disable once RedundantJumpStatement
 
2:01 PM
stackoverflow question
sometimes I feel when I just go around and upvote questions/answers I get more often my answers upvoted
does the site suddenly promote my answers if I am more generous with my ups?
shouldn't be like this but it feels like it is
might be just karma
 
i don't think so
it may be just coincidence
would be a weird correlation
 
Sam
hey, i have a question
are visual studio paths absolute?
 
What do you mean by "visual studio paths"?
 
Sam
like i need to have an icon, and placed it in the properties from solution explorer,
and i want to set it as an icon
the path is now something from my c drive but ofcourse noone has my icon on the same path
does it do that with compiling?
while*
visual studio is giving me real headaches, i shouldve just stayed with sublime text and php.
 
Make it a project resource and copy it when compiling
 
2:08 PM
What you would do is add the icon as part of your project, and bundle it as a resource.
 
Sam
i have this
but when i choose the icon
i get to choose from explorer
how do i add it as an resource?
 
3
Q: Adding new icon into the resource-Visual studio

VishuI have an icon named XX.ico. I want to add it in the project x. How do i achieve it. If i right click on the project resource, it gives me option add icon,when i do so,one new icon is added which is allowing me to edit the image. But i want to place my XX.ico in that resource.how do i do it ?ple...

 
Sam
yeah ive done that already
now i need to select it
from the same folder?
or do i have to change build action to embedded resource
 
Where do you want the icon?
In a winforms/wpf app?
 
2:32 PM
I @Wietlol
anyone here know about entity framework core
 
u @Wietlol ?
 
wetlip pls
 
¯\_(ツ)_/¯
 
lol sorry was say9ing hi
are you familiar with ef core
 
familiar enough to not like it
 
2:38 PM
my quesiton is this a replacement over linq to sql
from what i read it is
 
how do you mean "replacement" ?
 
instead of building queries with linq you would use ef core
in all cases instead of linq
that is what i am asking
 
uhm...
we use EF... and the queries are linq
so...
 
2:58 PM
yes but that is not ef core
ef core is supposed to be the best of both worlds
ease of linq power of ef type of thing
 
iDunno
can you show an example?
 
mr5
3:19 PM
halo
Last day tomorrow yeeha
 
@ChristianMatthew I'm confused. Linq to SQL and EF are two different things. They can be used for the same purpose but they're still different things.
 
@mr5 not so fast masterchief
 
mr5
@SebastianL ha! we are supposed to have a 3 days of holiday plus 2 weekends but our company pushed another day tomorrow so...
is 2 weekends considered 2 days or 4 days?
 
depends on where you're from
 
mr5
are you considering other planets too?
 
3:24 PM
in japan the people were in dire distress 'cuz they had 6days off due to national holidays
 
mr5
ohh
 
they complained about too much free time
:D
 
mr5
it's a national holiday is it
 
@MikeTheLiar but that's the point of what I am asking. efcore is supposed to be kinda both
 
mr5
I thought it's only in our country.
 
3:25 PM
not ef but ef core
 
mr5
@SebastianL doubt
 
2 week holidays from the weekend
 
@mr5 i don't have an english source right now, but i'll search for some ^^
 
mr5
@misha130 how many days is that?
 
10~? atleast
 
I think 12 or so
 
mr5
@SebastianL oic. that's why my gf is on vacation also :D
2 week = 14 days, from the weekend means, it starts from weekend?
it's 10 days on others while only 4 days for us. Life's unfair
 
oh sigh, maybe I exaggerated
10 more likely
the whole of next week and then a few days after that with some breaks
 
mr5
yes. it's on the link posted by Seb
It's 10 day holiday in Japan!!
I'm so hyped every evening! Why can't I feel the same during days
 
mr5
3:48 PM
 
!!tell 45950686 x
 
@ChristianMatthew just having googled EF Core specifically, I don't know
 
@mr5 I would send my CV to supermarkets right away
 
mr5
hehe. I'd start my dream job - bartending ^^
 
4:00 PM
Selling potato pancakes by the shore
 
mr5
Also, the description from this seemingly political inspired repo is vague. Is it for documentation purpose only?
 
btw does anyone use Microsoft Visual Studio Installer Projects?
 
that terrible thing that creates installations?
 
haha yes, that one... I don't know another that integrates with VS
but with this one I'm having an issue when I update or uninstall it does not overwrite / delete all files
any idea of how to force it to delete the app folder?
 
4:48 PM
I remember some of my coworkers wrote batch files for that
but not sure if thats the correct approach
 
and execute on the custom actions?
 
mr5
It's likely more about the common approach. If every approach basically does the same thing, it all boils down to how reliable that approach is for different use cases.
 
at least they already have a working solution
 
NH.
5:09 PM
code generation: Yo Dawg, I know you like writing code, but wouldn't you rather write code to write your code for you?
 
5:34 PM
That's what Intellisense is for
 
NH.
kind of
but code generation takes it to a whole new level
 
I like making my own code for the sake of the future developers
 
Well you can make code with T4 templating
That's what EF uses
 
 
3 hours later…
8:18 PM
hi guys i have a question
 
!!dontask
 
Jul 3 '18 at 19:41, by Kendall Frey
Don't ask if you're allowed to ask a question. Don't ask if anyone's available or knows how to use what you're using. Don't say you're going to post a question. Just ask your question.
 
Hi
How do you tell your boss your resigning to do some travelling? Seems easier to say I got a new job but travel might not be as understandable
I know not very C# related
 
Lying doesn't seem ideal
 
Oh I mean I am leaving to travel
But would be easier to tell him if it was because of getting a job offer
 
8:31 PM
in a unit test should we test all input outputs of methods with the .receveid or just the logic
 
Depends on what you want to test?
 
if i test a method in a class
stub all the dependent classes
and doing .returns on the dependent classes with a argument
should i pass the argument directly
 
@BrianJ would it be viable that he asks you to come back after you travel?
 
or pass a generic arg like arg.type
 
I don't understand anything you're saying
 
8:40 PM
lol
 
You have an example? And what Unit testing tool are you using
 
nsubstitute
_proxyClient = Substitute.For<IProxyClient>();
for example
proxy is called in the method i want to test
so i do
        _proxyPartenaire.getClient(Arg.Any<string>()).Returns(outputProxyClient);
    _proxyClient.getClient(Arg.Any<string>()).Returns(outputProxyClient);
translating from french :)
 
what is _proxyPartenaire?
 
and then i do a received like _proxyClient.received().getClient("myclient")
corrected it to _proxyClient
in the arg.any<string>
should i pass the waited arg or keep it like that and afterwards test the input with a received
 
8:45 PM
i know how that works
im asking from a theoric point of view of creating a unittest
 
That's what I'm reading
 
what is the best approach
 
Do what works, then figure out if there is a better way if it breaks
my .02
:)
 
aight aight if it isnt broken dont fix it i guess
 
Yepper
The finer the better ya know
but if you're not going to use that finer piece else where don't waste your time
 
8:48 PM
just a discussion i had with a collegue and intrigued me cause i do test inputs,outputs as well as logic but he says he only tests logic and outputs
 
Depends on how much the inputs are constrained, right
if you only allow a date of 01/04/2019, well you're a monster but, it's more reliable then a user putting Jan. 4 19
 
yeah dont know why i always love to test the input too to know if the inputs im waiting on it is received, cause test might probably in some cases even if the inputs is wrong
a habit i guess
 
9:46 PM
Dear C# folks, can you some of you answer the C# aspects of:
18
Q: Tags [recycle],[recycling] are a muddle, should we disambiguate, retag and burninate them?

smciThere are currently tags recycle,recycling with no tag definition. The term and the tags seem to get generically used for several distinct unrelated meanings: Android recycler (a ViewGroup). There is an existing tag [android-recyclerview], and in 2017 there was also [recyclerview] which was ali...

 
10:03 PM
@smci threw in my 2¢ on IIS.
No idea about WPF, I'd need to see an example question first.
!!afk 🚌 🏠
 
I'd like to talk to/complain about a moderator not really understanding what he/she is doing and as a result down voting my questions. Any idea where I can go with this?
 
10:21 PM
@MikeTheLiar Thanks, but please post an answer there, not just a comment. It doesn't have to be definitive, you can just say "For C# IIS, here are the pros and cons of whether generic tags [recycle],[recycling] are needed"
 
@smci MikeTheLiar is afk: 🚌 🏠
 
@CapricaSix Oh, 'away from keyboard'. Sure, he'll see it later. Any of the rest you are welcome to answer on Meta too. I don't know how many distinct meanings/use-cases there are for 'recycling' in C#: GUI views, IIS, what else? Anyway please answer on Meta.
 

« first day (3104 days earlier)      last day (1830 days later) »