« first day (3376 days earlier)      last day (1569 days later) » 

3:00 PM
@MoneyOrientedProgrammer You're mostly correct. The HTTP request is mapped to the newly created controller instance and the action method is invoked, but that does not mean the method itself can't call other action methods or even itself.
 
user10864482
@juanvan is it possible one of them is a copy of the other?
 
Well I'm wondering if someone set the SNI to an IP Address some time ago.
I looked in the Site Explorer window and don't see that IP address called out for any host
The end result is, in house I see the new Wildcard SSL and the public facing IP is serving up the old one set to expire in a week.
 
Cassidy Williams on January 13, 2020

When I graduated college and started my first full-time job in NYC, I was all in. It’s a pretty common occurrence, especially in smaller companies: a junior dev thrown into the deep end, they flounder a bit, they learn a lot, and they use their youthful energy to code and work all over the place.

In my case, not only was I doing that, but I also worked on the developer evangelism side of things, which meant I was also going to hackathons and conferences constantly in addition to my 9-to-5 software engineering role. I loved it. I felt like I was growing at a super fast rate, and I was saying yes …

 
Feels smart starting the ssl process a month ago :-p
 
user10864482
would it be possible there is a problem with common name mismatch?
 
user10864482
3:05 PM
on the certificate issuing ?
 
Can someone offer some advice? I have a solution that can run (make HTTP calls) on a different machine, but every time I attempt to make the SOAP call (from a service reference) I get this error: {"Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."}
 
user10864482
@confusedandamused do you run the app with sufficient right?
 
I'm running the visual studio session as an administrator
 
user10864482
where are you trying to read?
 
user10864482
in the file system i mean
 
3:08 PM
I'm not actually "reading" anything I'm accessing the project at C:\Users\user\source\repos\projectFolder
Service.Service_GetLeadSerial(pollingInterval, dtBack, User, Pass);
<--- that's the call I'm making to a SOAP API then the error occurs
 
user10864482
my question is because of the error with 'System.Security.Permissions.FileIOPermission' . Maybe you are writing then?
 
I see, hmm I can't try stuff like this social.msdn.microsoft.com/Forums/vstudio/en-US/…
I just don't have access to those options on my machine
I found this: forums.asp.net/t/…
 
user10864482
when I'm restricted like you seem to be I ask for a dedicated box to build. If possible, Azure recently certified their storage to be protected b , which is good for most things
 
I'm not hosting a website or running a web server, but maybe it is still the issue?
 
@RoelvanUden Thank you very much!
 
user10864482
3:15 PM
if you are in a business network it's possible it restricted your box externally, probably trough group policies
 
Most likely - I can't even look at most of the stuff that normally is inside control panel. Old laptop didn't have any restrictions. That is my one big gripe of the new company...now putting in a ticket or something will take 2 weeks probably lol
 
user10864482
@confusedandamused i understand the pain , I have the same situation here
 
user10864482
if you can, docker or any other container liker solution might to the job, even better would be a dedicated box to build
 
@human Heh...even to get a visual studio license took over a month
I mean I'm still working on it in visual studio - for builds to land into would be nice (I haven't messed with docker at work yet sadly)
 
user10864482
on one of my boxes i'm using fiddler to bypass the corporate firewall . It's stupid but it work
 
user10864482
3:23 PM
my guess is they put a filter driver on the network card or something
 
user10864482
@confusedandamused if you feel adventurous just know some group policies can be bypassed by injecting extra information into the application process you are running
 
3:42 PM
anyone here have an android phone?
0
Q: Prevent Myself from Deleting apps

Samuel WakemanI have an app on my phone and due to personal reasons I would like to not be able to delete it. I went to this link and I found: Is there a way to prevent a user from deleting apps on android? from my experience, even after doing what the link said I still found myself able to go into setting...

 
The only thing I could think of would be to run the phone under a guest user most of the time, I don't think they can install/uninstall things.
"Asked: Today (2020-01-12)
Jack, hmm
ahem
Jack, hmmm
 
user10864482
@SamuelWakeman something there will do the job for sure; developer.android.com/guide/topics/admin/device-admin.html
 
where is the server located?
 
user10864482
for some reason the link give me 'Server Error in '/' Application.' , from SO
 
ty
yeahi think so is being buggy
try again?
 
3:46 PM
@SamuelWakeman Why do you want this?
 
@RoelvanUden i go to certain webpages. and I have an app that records what webpages I visit and repoorts it to a friend. Helps me ensure I don't visit certain websites. the app is supposed to not be deletable wihtout sending a message to my accountablitiy partner, but it is. through the method described in the post
 
You probably want to enable parental controls and hand the PIN to your partner, then.
Or better, let them do it.
 
"certain webpages"
 
user10864482
@SamuelWakeman another way to achieve the same goal could be to monitor network directly trough a vpn
 
@human are you talking about looking at the router level? my level of networks is often a little fuzzy
 
user10864482
4:02 PM
you can configure the phone to use a vpn instead of accessing internet directly .
'Normal ' be like [phone] -> [internet]
'vpn' be like [phone] -> [vpn] -> [internet]
if you control the vpn you effectively can spy any network traffic
 
user10864482
it be like a benevolent man in the middle interception
 
Except, y'know, VPNs can't see SSL traffic so spying is eh.. very difficult. Adjusting the DNS is the most functional way... until DNS-over-HTTPS hits.
 
user10864482
@RoelvanUden well; one could add a generated certificate to the local certificate store . One could also generate one on the fly every time a certificate is requested . That's how our system work
 
user10864482
as far as i can tell its just a replication of the system of trust certificate operate under with a minor modification
 
@human except that you choose to use the vpn
 
user10864482
4:09 PM
@Wietlol yes but to set that vpn with android administration module would change the behavior from; you can't uninstall anything to ; install whatever you want but you can't touch network settings
 
If i wanted to compare two objects
 
mr5
okay. my girlfriend thinks I'm sleeping already
 
that had relatively the same values, but different places within the object index
 
mr5
Time to play Diablo III til 4am
 
Would just looping through one of the objects with a linq query to see if the specific value exists in the other be best?
 
4:17 PM
oh hey I found out why I stopped playing fallout 1
 
or is there a more elegant way of doing this
 
ran into a bug where the leader of the Brotherhood calls me a thief if I walk into his room
 
Jack, are you alive?
 
....Come Again?
 
ok good
 
mr5
4:18 PM
@CaptainSquirrel I know I'm not reading this correctly but this sound like a memory corruption. C# doesn't have that feature though
 
@mr5 nah, nothing to two with memory
I have two datasets that for the most part will be the same
apart from a few things that may exist in one & not the other
 
user10864482
couldn't you just implement equals ?
 
mr5
yeah no memory corruption in C# I wish they implement it
 
regardless of the position of said data in the index
@human I mean, i know of a way i could do it
 
can you give an example of two equal objects?
 
4:20 PM
so like...outer join?
 
sec
@Squirrelkiller exactly
 
sounds like you want to have a value list, then sort them and do an equal zip
 
user10864482
oh. you meant exotic way?
 
like best for performance
while also keeping accuracy
 
user10864482
ehm. you type too fast i was about to suggest reflection
 
4:21 PM
lmao
 
can't stop listening to the Sonic CD theme
toot toot sonic warrior -- you can do anything
 
I know these are json arrays but shush
[{
  url: "testing",
  name: "testing thing",
  someothervar: true
},{
  url: "testing2",
  name: "testing thing2",
  someothervar: true
},{
  url: "testing3",
  name: "testing thing3",
  someothervar: true
}]

[{
  url: "testing",
  name: "testing thing",
  someothervar: true
},{
  url: "testing2",
  name: "testing thing2",
  someothervar: true
},{
  url: "testing3",
  name: "testing thing3",
  someothervar: true
},{
  url: "testing4",
  name: "testing thing4",
  someothervar: true
}]
 
EW, JSON
 
so thats an example
 
user10864482
then you could use equals on string, looks fine to me
 
4:23 PM
so.. per element, do you want to use a total value equals?
 
@Wietlol what do you mean good sir?
 
user10864482
github.com/wbish/jsondiffpatch.net that might to it out of the box
 
{
  url: "testing4",
  name: "testing thing4",
  someothervar: true
}
==
{
  url: "testing4",
  name: "testing thing4",
  someothervar: false
}
is this acceptable?
 
kinda aye
for reference, they won't be json strings
it'll be c# objects
 
where is the line?
___________________________________
nvm, found it
 
4:25 PM
{
  url: "testing4",
  name: "testing thing4",
  someothervar: true
}
if this exists in both objects, regardless of index fine
but then there could be a testing5 that exists in array1
and a testing6 that exists in array2
 
but if the value is slightly different, may that be considered equal?
 
am i just over complicating this for myself lmao
 
mr5
you want a LINQ search and expect a performant comparison?
 
@Wietlol no
 
ok, so my example is not acceptable?
@mr5 I do
 
4:26 PM
@mr5 I'm just wondering what the best way performance wise to get this done
I already have a "comparison" lib in my project, but it's not actually telling me what the differences are
it just says there are
 
mr5
basically a for loop is the most performant
 
And i suspect its checking via index
 
mr5
yes via index is the way to go with your objective c
 
what you can do is this,
1. sort both input lists
2. do a parallel enumeration over the lists (like a join would do)
3. ???
4. profit
 
idgaf about its index pos
fuck it, i'll just implement it the shitty way and then come back to it™
AKA
I'm never going to change it
 
mr5
4:28 PM
you get the index to retrieve the object
 
the parallel enumeration would result in an IEnumerable<(X?, X?)>
 
mr5
and somehow, you can check the index to skip same object comparison
 
if both values are present, then it existed in both lists, if one of them is null, the value was in the other list
from that, you can filter where both are non-null to get an IEnumerable<X> of the values that were present in both lists
you have the sizes of the input lists and the size of the combined result
based on those results, you can basically do anything you want
 
user10864482
 
mr5
like create a 4D game from the list?
 
4:30 PM
@CaptainSquirrel implementing this should take like 15 mins
 
4:41 PM
@human wont work as i'm not comparing json objects
thanks tho
 
Oh I have an amazing compairson thing
What are you doing now
Mine will take 2 objects of T and spit out a list of differences
 
hol on
Show me what you're doing now
 
I just started to make one lmao
 
Oh lol
Pics
While I try to find the bloody thing
 
4:45 PM
 
Oh wow
 
I literally just started to make it haha
There are two sites that don't have the same data layout, but idgaf about them at the moment
there are 39 others that require checking!
 
It requires collections and reflection and that's about it
 
public static class CompareDifferences
    {
        /// <summary>
        /// Checks the properties of the instance of the object for any differences.
        /// </summary>
        /// <typeparam name="TTarget">The type of the two objects</typeparam>
        /// <param name="original">The original instance you're checking against'</param>
        /// <param name="changed">The instance with the new values</param>
        /// <returns>A dictionary with the fields that changed and their original and new values. Null if nothing changed at all.</returns>
 
4:47 PM
Doesn't even require reflection lol
 
var members = new List<System.Reflection.MemberInfo>();
Hmm
 
ah
stfu
that doesn't count
 
mine doesnt use reflection
but it doesnt compare members
 
Yours also doesn't exist
 
you said it just has to check equality of elements
@CaptainObvious it does
 
4:48 PM
And probably isn't in c# either
 
it is
it is basically an sql join in C#
 
that's spooky
 
(not tested tho... havent ever used it)
 
It's also about a billion lines long
 
4:49 PM
true
but that is C#
 
Oh well mine is actually used in production apps
 
Yeah, just because its massive its disqualified
 
C# has very poor enumerator support
 
On that note, here's some usage
 
when you need any form of specialized enumeration, you really have to write a lot of boilerplate code
but in simple terms, what it does is this:
input1: ["1", "2", "3", "4", "6"]
input2: ["1", "2", "4", "5"]
output: [("1", "1"), ("2", "2"), ("3", null), ("4", "4"), (null, "5"), ("6", null)]
 
4:52 PM
var diffs = CompareDifferences.GetChangedValues<CustomerAddress>(ordex.LinnOpenOrder.CustomerInfo.Address,
                goodAddress);
if (diffs == null) throw new MessageException("No differences between the original and new address were identified.");
foreach (var diff in diffs)
{
    diffText += $"{diff.Key}: \"{diff.Value.originalValue}\" => \"{diff.Value.changedValue}\"\r\n";
}
 
damn
you just beat me to it
 
I was trying to find it
Which can spit out results like this
 
but @CaptainSquirrel what do you want to use it for?
 
I have two sitemaps
i want to compare them to each other and know what isn't in what
 
I think Lee's solution, even tho it is quite nice, does not what you want to do
 
4:54 PM
unfortunately, no :/
 
Address1: "Unit 1" => "Unit 14"
Address2: "Road A" => "Road B"
PostCode: "CH62 ASD" => "CH62 SSF"
Company: "" => "Memes Inc"
Hmm, I didn't write it to go multi level
You may have to adapt it for that
 
> what you can do is this,
1. sort both input lists
2. do a parallel enumeration over the lists (like a join would do)
3. ???
4. profit
this is what you want
sorting the inputs is something you can do
doing the parallel enumeration is what that abomination does
 
Sorting the lists?
 
after that, you can filter the list for tuples with 2 values and unwrap them
 
Don't even have to do that for mine
 
4:56 PM
@CaptainObvious Squirrel wants to compare elements in two lists
 
Mine will compare members in 2 anythjings
 
aka, for all items in list 1, do they exist in list 2? and get all items in list 2 that are not present in list 1
 
Yeah mine was for comparing differences in something simple
 
so, ["4", "1", "2"] & ["2", "3", "1"] => ["1", "2"]
 
Specifically it was designed for spotting the differences between a submitted address and the original to keep a log of what changed
But also make it reusable because why not
 
4:59 PM
you gain reusability in trade for complexity
 
But it's not complex
 
true
 
Is this about right? Who does the DI? One project has to know all the others.
 
in this case, you are not yet going through nested properties and such
 
Yeah but that's just going recursive
ezpz
 
5:00 PM
ye...
how about no?
 
Right now, my Adapter project has an IServiceCollection .AddAdapters, while the WebAPI project does the Startup and calls services.AddAdapters();
 
How about ye
 
also... why return a null dictionary?
why not empty?
 
If there are no changes
Checking if null is faster and easier
 
checking is not always required
 
5:01 PM
Anyway I'm off, have fun children
 
bye
 
If you record an empty list of changes then you're just dum
 
there is a common pattern for returning empty lists instead of nulls
especially in a null-unaware language like C#
 
Oh wait no
It's monday
Fuck
 
400
Q: Is it better to return null or empty collection?

OmuThat's kind of a general question (but I'm using C#), what's the best way (best practice), do you return null or empty collection for a method that has a collection as a return type ?

 
5:02 PM
Was Avner here lately?
Like...since the whole Iran fuck up stuffs?
He can't just disappear on us in such a situation!
 
if there is a difference between an empty collection and null, then it makes sense... but other than that, I would recommend an empty collection
 
it's not always a question of whether or not "you can easily return an empty array", but rather of whether or not an empty array might be misleading in the current context. An empty array actually means something, as does null. To say that you should always return an empty array rather than null, is almost as misguided as saying you a boolean method should always return true. Both possible values convey a meaning. — David Hedlund Dec 28 '09 at 15:46
That comment is exactly what I mean
In my context, there was no point in me acting on no changes whatsoever
 
me: give me a set of differences
you: null
me: that is not a set
 
So null just made more sense
Yeah that's because there's no differences
 
me: give me a set of differences
my system: here are 0 differences
me: ok
 
5:05 PM
That's retarded
 
I can enumerate over an empty collection
88
A: Is it better to return null or empty collection?

BozhoDepends on your contract and your concrete case. Generally it's best to return empty collections, but sometimes (rarely): null might mean something more specific; your API (contract) might force you to return null. Some concrete examples: an UI component (from a library out of your control)...

is there a difference between null and empty in your case?
for example, for a social thing
null means unspecified (or no access to that information)
empty means 0 friends
anyway, im off too
 
But I'm not off
 
user10864482
from an open api best practice perspective when it is expected to return a collection and there is no result , the result set should be empty
 
Maybe
Can you use ef core on a FX4.8 project?
 
5:21 PM
I don't think so
y tho
just use EF
 
Yeah but it's a nightmare to find in nuget
I know what the efcore packages are called
Probably should use fullfx anyway
 
Why not coreFx?
 
Considering for some fucking reason core still does the filtering client side afaik
Need to consume a SOAP api
Because ebay is stuck in the 19th century
 
what filtering
Ah you mean .where and the like?
 
5:23 PM
that happens as sql
 
At least it used to do most of the filtering client side
Maybe it's fixed now but it definitely did in 2.x
 
I actually built a client/webapi/EFCore PoC on the weekend, and EFCore sends the .Where and similar stuff as sql to the db
 
Were you using ef core 3?
 
Because that's probably whyu
 
5:24 PM
coreFx 3.1
 
2 and earlier did it client side
for some reason
 
I think efCore 3.0.1 or something
 
And the project I've been working with efcore in the most is on corefx 2.2
 
That is a serious performance problem, you can't just load a million entries form a db and then use one of them
Go go gadget coreFx 3.1, it's LTS!
 
You are not wrong
I tried updating to 3 but the guides for updating asp apps are absolutle garbo
 
5:26 PM
iDunno just update and look for the red text
 
Even migrating a brand new 2.2 to 3.0 app is practically impossible
Yeha it's basically all red
There's a huge migration guide they wrote which covers some of it
That one
My favourite part is this:
The following packages are no longer produced and need to be removed:
    Microsoft.AspNetCore
    Microsoft.AspNetCore.All
    Microsoft.AspNetCore.App
    Microsoft.AspNetCore.Antiforgery
    Microsoft.AspNetCore.Authentication
    Microsoft.AspNetCore.Authentication.Abstractions
    Microsoft.AspNetCore.Authentication.Cookies
    Microsoft.AspNetCore.Authentication.Core
    Microsoft.AspNetCore.Authentication.OAuth
    Microsoft.AspNetCore.Authorization.Policy
    Microsoft.AspNetCore.CookiePolicy
    Microsoft.AspNetCore.Cors
    Microsoft.AspNetCore.Diagnostics
 
mr5
@CaptainObvious this one's generated from a single lib?
nuget dependency*
 
No they're all seperate packages
Anyway now I am going this time
Bye kiddies
 
Cya
Leexit: Still faster than Brexit
 
5:47 PM
Shalom!
 
user10864482
6:06 PM
@earlyriser01 aleichem shalom
 
6:53 PM
@human
את מדבר עברית?
 
user10864482
I know some reference from family but I don't speak it
 
7:07 PM
is there a way to reset an asp.net control back to its default visibility, as defined in the asp code?
 
F5
Otherwise no idea
 
@human very cool\
 
I remember I ran into an Israeli guy who sold dermatology medicine or something and I noticed he had a coin on his stand with Hebrew text and he's like "whoa no way are you Jewish?" I'm like 'no..?" and he told me he was from Israel
I just know Hebrew when I see it
 
7:28 PM
@AlRey it's alphabet is pretty distinctive
 
Hey can someone help me out? Got a problem with my List and Dictionary
 
@brstkr whatsup
 
user10864482
@brstkr hey welcome; dont ask to ask, just ask :)
 
@human always appreciate how welcoming you are :)
 
user10864482
@SamuelWakeman thanks :)
 
7:45 PM
Can I just add my current Values of an object which are stored in a List and add these to the other List which also got objects stored. These Values should not be added to the other List as new Elements. They should be added to the existing elements of objects
 
user10864482
@brstkr do you mean you want to store a reference to the object not copy the object itself?
 
You mean like, update the objects in one list with the values form the obejct in the other list?
 
exactly i want to update existing objects with the other values
 
Do they have a key?
 
both Lists are from this type List<Key> idList = ...
 
7:47 PM
Or are you confident the Lists are in the same order?
 
no just an oobject
They should always be the same order
because I am parsing an XML File and these Values are parsed values and these are by order
 
Then you can just use a for loop: for(int i = 0;i<list1.Count;i++) { list1[i] = list2[i]; };
This basically overwrites one object with the other
Although I'm pretty sure I got soemthing wrong conceptually
 
user10864482
i think it's a reference at this point, not a copy of the object which could lead to problem
 
Ah I see.
 
```
List<Key> idList = doc.Descendants(ns + "node").Select(x => new Key() { id = (string)x.Attribute("id")}).ToList();```
one List looks like this
 
user10864482
7:51 PM
a easy way could be to implement a constructor that take itself object as a parameter and use the parameter to populate the fields
 
the doc is the XDocument basically where the xml file is load
 
user10864482
like; public ObjA(ObjA copy)
 
user10864482
body be like
public ObjA(ObjA copy)
{
this.propA = copy.propA;
this.propB = copy.probB;
// etc
}
 
how does this work?
 
user10864482
any reason for not using xslt (xpath) to look into the xml?
 
7:54 PM
but in one List the object gets Value for propA and in the other list it gets the value for propB but I need these together in one List
hmm i dont know never tried it. whats the difference between xslt and xdocument?
 
user10864482
you can find a pretty well explained article regarding building a constructor copy docs.microsoft.com/en-us/dotnet/csharp/programming-guide/…
 
Can someone offer advice on a landlord and tenant problem situation?
Totally off topic. But the law stackexchange chat hasn't been active for over 50 days
 
i could but im 22 and have only ever been the renter
 
user10864482
@earlyriser01 I'm from Canada but sure , if it can help
 

« first day (3376 days earlier)      last day (1569 days later) »