« first day (3105 days earlier)      last day (1826 days later) » 
01:00 - 17:0022:00 - 00:00

1:10 AM
Curios if it is possible to group by a hashset? I have the following snippet and was trying to group the dict by its values

x.Add("a b", new HashSet<string> { "a","b" });
x.Add("a b c", new HashSet<string> { "a", "b" });
x.Add("b c", new HashSet<string> { "a", "b" });
x.Add("a b c x", new HashSet<string> { "a", "b", "c" });
 
@KendallFrey Great. Thanks
 
 
4 hours later…
5:08 AM
Hi
I need your suggestion.

My Query:

I had a multiple clients in outside of the country. They are send me the project files using 3rd party tools. like(onDrive, IDrive, Google Drive, drop-box etc...). The files size is also max 15Gb.

At now we are planning to provide the login credentials for individual users along with files upload separately.

My self I'm able to create login & Registration process for each user. using Asp.net core web api. But I had no idea about the upload attachments. Is any easy way to upload a large files without data loss. Firstly which service is suitable for uploa
 
5:31 AM
@murthy There are several techniques for checking data quality
The simplest one is to require that in addition to the 15Gb file, they also send a large checksum say using a MDES
the checksum, while it can't guarantee 100% integrity, it's a good indicator
the only true way to guarantee 100% integrity is to compare it byte per byte with the source file, which isn't really possible
The second thing you can do is use a protocol like FTP which can automatically continue the upload even when the connection is interrupted
if they insist on using their own 3rd party tool to upload, then you can tell them you recommend FTP for that reason, but that they should at least provide a checksum
 
5:51 AM
Tq for reply Mr. Neil.
Is any 3rd party tools for upload?
 
@murthy FTP
or SFTP if it should be secure
It's simple but it works
that's really a protocol, not a program, but it lets every client have their own and on your side, you don't have to adapt 100 different ways
 
Okay. Is any best and on budget cloud services?
and also compatible for FTP
 
seems like these guys support ftp and do file hosting
though keep in mind, I don't subscribe to the service :P
they may be awful, I can't guarantee otherwise
you should consider positioning (US, Europe, Asia, etc.) and whether or not they support sftp
but it's admittedly a lot simpler than trying to write your own file hosting service
 
6:11 AM
Sure...
As of my knowledge, I have to create a individual FTP account for each client. and then share those credentials to respective clients.
Then after they are able to upload the files.
So i have to purchase the best cloud storage along with ftp supported service.
Tq @Neil,
 
hmm, well there maybe other ways to upload files using that service
 
I will check the your provided Drivehq also.
 
maybe you can upload the file using their web page or something
what's important is that you have a checksum which ensures integrity
when you have both the file and the checksum, generate a checksum from the file and check it against the checksum provided
if they're the same, you're good to go
 
(Y)
 
(_ Y _)
 
6:41 AM
Good morning
 
6:55 AM
So I grabbed my thermos that I usually use for my coffee, but haven't used in about a week..
this morning found a nice blob of coffee grounds and hair at the bottom.. gag
 
...and hair?
 
Friday!
 
uhh what
What the hell is going on today
 
In Spain thursday and friday are holydays, so virtually it is friday ;-)
holidays*
 
next week, monday and thursday are holidays in Italy
 
7:09 AM
In gremany only this friday and monday is a holiday
@Neil time to take a friday as vacation
 
looking forward to a three-day weekend and a 3-day work week
@Squirrelkiller I wish I could, but I'm saving up for vacation in August
Plus my boss is like, "We must always have someone available"
which is the dumbest thing ever.. if nobody is working that day, what's going to happen?
 
consider this.. if someone is working, which there always should be, something could always happen #logic
although.. always? are you 24-7?
 
Depends on your customers. If there's support to do, someone has to be there.
(Always = reasonable working hours)
We do SaaS, so somebody always has to be here in case basically everything goes to shit
 
@Neil Backup system storage could get full, power failures could send servers to hell
 
well by that logic, something could happen because I'm there
I'm supposed to be there to fix potential problems which may arise
@bradbury9 not my problem. I'm not a systems aministrator
 
7:27 AM
Can I somehow make a custom attribute that builds an object before the annotated method starts and disposes that object after the method finished?
 
wouldn't it just be easier to wrap that method?
did you want to do some generic thing like log calls to a method?
 
7:43 AM
hi everybody
can anyone tell me why AddRange() method not working with the ComboBox
 
@SaTech well, I suppose if it didn't work, they'd fix it
so you're probably calling it incorrectly
 
I think I'm calling it in a wrong way but i couldn't know why it's wrong
ComboBox1.Items.AddRange(arrayOfStrings);
this is the way I'm calling it
@Neil
 
Well from what you say, I'd think it'd work
what is it doing instead?
 
@Neil it gives an Error 'ItmemCollection' doesn't contain a defination for AddRange
 
hmm, are you using System.Windows.Forms.ComboBox?
 
7:56 AM
I use WPF
 
well that's probably why then
you're using the wpf combobox like it were a .net combobox
you can do ComboBox1.Add for each item in your array
I don't know if it has an AddRange equivalent though
 
Do you want to specifically add those items? Or jsut set them?
either way. cmb.ItemSource = yourList;
 
so you mean that Addrange doesn't work with WPF ?
 
then manipulate yourList
@Neil Yes I want to add a context to every method for possible log calls within.
And I'd have to wrap the whole thing in using(){}
 
thanks @Squirrelkiller I'm trying your way
 
8:02 AM
@Squirrelkiller I wouldn't know how to do that
I know how to do that in Java though :P
 
Tell me
 
uses reflection to turn every effected instance into a proxy object letting you do something before or after every method call
technically you wouldn't need aspectj to do that, but it's kind of a hassle to do that yourself
I don't know if there exists such a thing as a proxy in C#
 
finally it's working ... thanks a lot @Neil @Squirrelkiller for your time and help
 
@SaTech cheers :)
 
You're welcome
 
8:06 AM
yo
 
yo
 
8:23 AM
yo
 
yo
 
yo
 
Are we back to this?
 
only if they all get stars
I am tempted
 
c-c-c-c-c-combo breaker
 
8:45 AM
sees all "yo" messages except for Neil's being starred
suspects Neil
 
well, I only starred two
but mine wasn't starred, so
 
Cyber bullying!
 
9:18 AM
What the shit my http server hang after I put ssl cert into it
 
*hangs
I'm not sure if other languages have something like that, but in german we learned had a rhyme in school: he/she/it, s muss mit.
Meaning: he/she/it, s must be included.
 
here in the netherlands, we didnt learn how those rules go
we just know the rules
 
"If it sounds wrong, it's probably wrong"
That's the rule.
 
In the netherlands, Wietlol invented english so that's that.
 
obviously
 
9:23 AM
Everyone in the Netherlands knows the name of the English lord and savior, Wietlol.
We even dedicated statues and monuments to his grandness.
 
the quality of the statues and monuments is another subject
they just made an AbstractStatueFactorySingleton and let it run continuously
 
It may or may not produce some output of magnificent quality some day.
 
at least, its designed to be working for the upcoming hundred years
wether or not it would actually be working in one hundred years is a different story
 
@RoelvanUden and only one at that
 
if someone makes a statue in my name, tell him/her/whatever to not give me the concrete version, I prefer just the interface
 
9:37 AM
REMEMBER ME!
 
I member u
 
Hi - I have a doubt but I am not sure to ask it on SO because I think it might get closed
What is the difference between usermanager and usercontext - usermanager the one that uses userstore and usercontext the one that uses database
and what should be used and when?
 
10:04 AM
Considera asking about use cases
 
ey guys, anyone got xp with SSRS ... I have a problem, managed to get up a server and deploy few reports, so now in my .net core app, from my local machine (from debug) i successfully get a report from a server, but when i publish application and a same server where my SSRS is running, i get error that operation timed out, error is System.Net.HTTP.WinHttp.Exception: The operation timed out
 
Nox
10:24 AM
Hi guys, someone there?
 
no
 
Nox
someone could help me with self hosting a WCF service, totally newbie here
ha
having this An exception occurred: HTTP can not register URL direction http://+:50123/MyServiceHost/. Another application already registered this URL in HTTP.SYS
that appeared suddenly, it worked but I changed something and now the service throws that
I have no idea what's happening
 
Also, it's possible that you ahve a previous instance of the service running?
 
Nox
I've already added the url with netsh
and added a rule at windows firewall
netsh http show urlacl shows the url
 
So check if there's another instance, maybe running under a different user on the machine?
Maybe you need to be running as admin?
 
Nox
10:38 AM
I'm running as admin, but let mecheck if there are another instance I didn't see
I suppose it'll have the same name as the solution?
 
As the project, probably.
Unless changed.
 
Nox
I don't see it at the task manager, in proccess or services
 
netstat shows the port open?
 
Nox
TCP 127.0.0.1:50123 DESKTOP-206PU97:0 LISTENING
could be this?
TCP [::]:50123 DESKTOP-206PU97:0 LISTENING
I think yes
 
1750
Q: How can you find out which process is listening on a port on Windows?

ReadonlyHow can you find out which process is listening on a port on Windows?

Find out wth is listening on that port, if it is your service, kill the process. Otherwise, choose another port.
 
Nox
10:54 AM
yes, some nvidia process is listening on that port
I'll change the port then
thanks! I'll go try it now
yes, up and running :), now try to connect to it through xamarin
 
Hi just a quick questions

Does it make a difference in binary size when using Link All if I have using statement on top of the class rather than writing the fully qualified object name?
e.g File.ReadAllLines vs System.IO.File.ReadAllLines
I am using Xamarin.Forms
 
11:11 AM
Try it.
Make a few dozen lines with that, with the using statement at the top. Compile. Note size in bytes of binary.
Do the same without using on top.
Compare sizes.
I made an overload of a method to help us better handle log entries - changing a string to an enum.
The old method is still ok to use though, for specia loccasions when the enum really isnt enough or hte occasion too special to make a new enum value.
So the old method isnt really obsolete - just not the one to use in most cases.
Is there an attribute for that?
 
what would you want the attribute to do?
 
Nox
I usually just add a warning to the method at method's summary (///) but don't know if exists other thing
 
11:26 AM
@Nox That's usually best. It's shown to a developer using it, but doesn't stop the build if warnings-as-errors are enabled.
 
5 hours to debug WHY the hell my web not load after using certificate
HTTPS PORT IS 443
HTTPS PORT IS 443!
 
ey guys .... anyone ever had a problem with SSRS and this type of beautiful so descriptive error message: "
System.ServiceModel.Security.MessageSecurityException: The HTTP request is unauthorized with client authentication scheme 'Ntlm'. the authentication header received from the server was 'NTLM'"
 
11:47 AM
@nyconing and you will never make that error again. You have saved your future self so much debugging time!
 
12:05 PM
I would want the attribute to basically wrap a method in a using block
 
Would you?
 
I wouldnt
but I would want a function that acts as a using block
I would much rather remove the need for having a disposable object in the first place... but that is something I cant do for .net
 
if C# got interfaces with default methods....does that mean we don't need to implement a class that implements the interface?
does this mean that an interface is now a class...
 
the interface will not be a class, no
 
but it has an implementation
 
12:12 PM
but yes, the difference between interfaces and classes would be minimal
 
I couldn't sleep last night because how stupid I consider this
 
over the years, these differences will slowly go away
 
but its a contract of implementation, not an implementation
why would these differences need to go away
 
its an interface, not a contract
contracts in C# as made using an interface
 
@misha130 But it has a fallback implementation, to support forward-proofing external contract interfaces.
 
12:13 PM
other, more advanced, languages have some more interesting types
 
I wonder how its actually under the hood
do they make another class that is actually implemented by the interface
 
those types would support more common features in a better way
languages like Java or C# attempt to get those features by using interfaces
 
I know, you even said that you made a language that hasn't got an interface
 
I made a language where there was no difference between a class and an interface
and... that means that I can remove one
 
yes
@Wietlol I think we already had this conversation but what else could an interface be
I just googled an interface and the definition is "an interface is a contract..."
 
12:18 PM
contracts, modules, partial implementations, categorization and classification
some languages implement some of these using dedicated types for them
but Java did some of those using interfaces
now C# wants the same
 
Hey everyone, does anyone know if it's possible to compile a WPF project to make it usable for Linux ?
 
Not any time soon, no.
Well, you might be able to run it under Wine, but not natively.
 
yeah ok thanks
 
With WPF coming to .NET Core 3.0, though, it's a matter of time until a Linux framework is built to run it there.
But nothing is promised and probably no 1st-party support for it.
 
ok
Do I have to make something special to make it more likely to be used with wine ? I heard about sylver/gold/platinum compatibility
 
12:26 PM
Haven't a clue, sorry.
 
no problem, thank you
 
Is this an existing WPF app you have?
Because there are frameworks, like Avalonia, that are similar to WPF and are cross-platform.
 
I am actually working on it
I will take a look
 
MS don't intent to cross-platform WPF, even as a 3rd-party open-source contribution:
 
Gah that annoys me so much
 
12:33 PM
What, the no cross platform? They gave their reasons and I accept it. MS in 2006 was a different place and WPF is a lot of code that's intimately tied to Windows APIs.
You can fork the project and release a cross-platform version, but they don't intend to accept contributions into their own repo.
 
But the Avalonia guys worked out the xplat element of it. It just seems stupid that they refuse to even consider it
 
What they said is that it's hard to do well, and would take them a lot of resources to go over those contributions. If someone forked WPF and added a full, stable Linux platform support, I'm sure they'll be glad to absorb it in.
 
1:06 PM
@Default Yup, I agreed with you.
 
I understand MS. Think about which GUI on linux to support? GTK3 like aAvalonia (github.com/AvaloniaUI/Avalonia/blob/master/src/Gtk/…)? Or make WPF dependency on Qt? Its hell, better to make OSX official builds
When Im using Unix then dont even use GUI (only window mager Openbox)
 
modelBuilder.Entity<Survey>()
.Property(e => e.CreatedDate)
.ValueGeneratedOnAdd();
I want the date to only be generated on add.
According to what I've read, this is how you do that.
Yet it still gets overwritten null when I do an update
This is in EFcore.
Any ideas what I'm missing?
@J.Doe openbox is a gui
 
fonts rendering are done in graphically way
 
1:24 PM
@Lemonade1947 Window Manger != GUI
Every GUI have window manger but its only a part
 
You're thinking of a DE (Desktop Enviroment)
 
Desktop environment == GUI
 
You are wrong.
But I don't care enough to argue with you.
 
0
Q: what is the difference between graphical environment, user interface, graphical shell and a windowing system?

tigerjack89What is the difference between graphical environment, user interface, graphical shell and a windowing system? How they cooperate and how are they built on top of each other? For example, from en.wikipedia, I've read that Unity (user interface) Unity is a graphical shell for the GNOME deskt...

You are wrong
Think about why you trying to cheat me
Its bad
 
It's because I don't like you.
And the only power I have over you is my power to teach you incorrect semantics.
Literally go on Arch Wiki and read the definition of a Window manager
Quote:
A window manager (WM) is system software that controls the placement and appearance of windows within a windowing system in a graphical user interface (GUI). It can be part of a desktop environment (DE) or be used standalone.
 
1:43 PM
my first such experience was a problem I had for weeks. It was a C++ project where I inherited a base class - the compiler told me that everything was private but I saw that it was public as intended
turns out that inheritance has accessors in C++. I had forgotten to inherit the public baseclass, turning it into a private inheritance. I was so pissed when I found it.
But to this day I have never had that issue again
 
2:00 PM
> return await await await await OpenConnectionAsync(ConnectionString, async connection => ...
I didnt knew this would actually work
 
Christ
Just cause it should work, I still don't think you should use it.
 
Im not sure how I would avoid the final 2 await tho
the other two are just moving out the calls
 
you need some monads
 
Can anyone answer my question
 
public IList<Record> FindAll() =>
	OpenConnection(ConnectionString, connection =>
		connection.RunCommand("SELECT * FROM Table", command =>
			command.ExecuteToList(reader =>
				reader.ReadRecord()
			)));
this is the sync method
 
2:04 PM
It kind of got buried in @J.Doe claiming that openbox wasn't a GUI
 
public async Task<IList<Record>> FindAll() =>
	await await OpenConnectionAsync(ConnectionString, async connection =>
		await connection.RunCommand("SELECT * FROM Table", async command =>
			await command.ExecuteToListAsync(reader =>
				reader.ReadRecord()
			)));
 
mr5
sup m8
 
this appears to be the async version
 
mr5
why are you making a scene here huh?
 
smh
I should never have tried to do codefirst with EF
 
2:05 PM
@Wietlol What's the point of making the lambdas async?
 
I thought I'd go for it since it's the new hip and trend way to do things
Caused me way more trouble than it's worth.
 
@KendallFrey because of the await
 
Elaborate?
 
@KendallFrey the initial purpose of these kind of methods is to avoid using statements
you open a connection and pass in the behavior you want to have executed
its a... Functor!
sort of
almost
but anyway, the ExecuteToListAsync is an async function
 
mr5
uhm, like this? await SelectAsync(async (e) => await e.NameAsync).SkipAsync(page).TakeAsync(pageCount)
 
2:07 PM
and I need to await that so that it wont return before the using statement ends
 
What's the point of awaiting though? It looks to me like it won't do anything
async foo => await bar is equivalent to foo => bar
 
not really
lemme write an example
public O Run<I, O>(Func<I, O> func)
{
	using (var someFoo = GetFoo())
		return func(someFoo);
}

private async void foo()
{
	Run<Foo, Bar>(foo => foo.GetBar());
	await Run<Foo, Task<Bar>>(foo => foo.GetBarAsync());
	await Run<Foo, Task<Bar>>(async foo => await foo.GetBarAsync());
}
the first Run is not using async, no big deal about it
the third Run uses async and await in the lambda
 
Why this line not do what it purports to do :(
 
the second Run does not and the someFoo (or foo inside the lambda) will be disposed while the GetBarAsync has not yet finished
so, the second example will fail
the same happens with the sql thingy
(I hope that sort of explains why... because I would have a hard time trying to explain it better)
 
I don't believe it, I have to go try it
Huh, how does it do that?
 
2:25 PM
because it returns the Task<T>, which is unfinished
keep in mind, Run does not do return await func(someFoo)
 
Both return Task<T> which is unfinished
 
the last one at least finished GetBarAsync
 
Why?
 
right?
 
I can't think of a reason for it to have
 
2:26 PM
iDunno, now I have to double check
 
> Bar(1) returned
Disposed Foo(1)
Disposed Foo(2)
Bar(2) returned
Bar(3) returned
Disposed Foo(3)
(added numbers to make it obvious which foo belongs to which bar
I dont know why, I just know it works that way
(I didnt invent async/await)
but now the big question
public static async Task<O> RunAsync<O>(Func<Foo, O> func)
{
	using (var someFoo = await GetFooAsync(4))
		return func(someFoo);
}
var x4 = await RunAsync(foo => foo.GetBarAsync());
var x5 = await RunAsync(async foo => await foo.GetBarAsync());
what type are x4 and x5 ?
well... they are Task<Bar> (after the await)
so, you have to await twice
Bar x4 = await await RunAsync(4, foo => foo.GetBarAsync());
Bar x5 = await await RunAsync(5, async foo => await foo.GetBarAsync());
have I ever told you I really dont like async/await?
I think now is the right time
at least, it is happy with an overload for Func<I, Task<O>> so I can make an overload for Run that accepts the async action
(yay, third overload for the same functionality)
that way, I can avoid the double await
but it was fun, since I have nested async lambdas, you can take out the awaits from each individual lambda and stack them up at the bottom
(does change behavior tho)
 
2:41 PM
Aha
Replacing Task.Yield with Task.Delay causes the dispose to happen earlier
 
mr5
The most interesting difference between awaiting a Task and not is that, awaiting lets you handle the Exception it could possibly throw while the latter, Exception could gone into existence.
 
wait no
I got confused
It make the first dispose happen later?
oh no i was right ish
with Delay(0) it becomes sync
 
@mr5 You can slap a ContinueWith() at the end of a task wit a TaskContinuationOption of OnCanceled to catch exceptions, but that's the nice thing about await - it unwraps that continuation and throws it as an exception in the original context.
 
Delay(1) causes both to be disposed early
 
mr5
@AvnerShahar-Kashtan I have never used ContinueWith. I only find it useful in some language like Swift where await does not exist.
@KendallFrey my former colleagues abuse the use of Task.Delay(0 to quick fix some bug in Xamarin.
 
2:49 PM
@mr5 I used it quite a lot in the two years between the release of Tasks and the release of C# 5.0 and async/await.
 
im even more confused than that me over 5 minutes
public async Task<Bar> GetBarAsync()
{
	await Task.Delay(200);
appears to make x2 fail, but x4 succeeds (pretty consistently)
Bar x1 = Run(1, foo => foo.GetBar());
Bar x2 = await Run(2, foo => foo.GetBarAsync());
Bar x3 = await Run(3, async foo => await foo.GetBarAsync());
Bar x4 = await await RunAsync(4, foo => foo.GetBarAsync());
Bar x5 = await await RunAsync(5, async foo => await foo.GetBarAsync());
I expect 4 to fail too
wait... i might be reading stuff wrong
 
3:14 PM
is there a way to group item based on two things in linq?
so different group for each combination
 
Use a tuple
 
 
3:30 PM
I'm using EF core. I have an entity with an ICollection property, I'm having difficulties having the entity's collection update in a disconnected scenario
I only have to handle objects being added or removed from this collection, not updates
 
I can't offer help friend @Vap0r. But I am also dealing with EFcore and I also want to tear my own hair out.
 
What's the issue?
 
@Vap0r where you been bby
 
@MikeTheLiar climbing up the ladder.... looking for a rope
 
I feel that
 
3:32 PM
lmao
I like my job and am making 12k more than last year doing it so all is well.
Some of these problems though are frustrating.
How you been bby?
 
Better than I was a year ago, that's for sure.
 
Limbo isn't impressive if the bar is set at 8ft, but I guess that's a start. Congrats
You still living in a cold sucky place?
 
For the next month or so, yeah. We're moving South
But not west
NC
 
That's awesome. My folks live in NC, 30 minutes outside of Asheville.
 
We're gonna be in Durham, wife's working in RTP
I've spent a grand total of 4 days there in my life so it'll be an adventure
 
3:43 PM
Just looked up RTP that's impressive as hell I didn't even know NC had anything like that. NC is nice though. Didn't know your wife was a genius
 
I mean, she married me, so how smart can she be?
 
F
 
RIP In Peace
 
R(IP)^2
So are all these chatrooms even more dead than they used to be?
 
Pretty much
!!tumbleweed
 
ouch
 
always surprised people live in NC or it being generally a populated state
 
Yes the lava rivers and radioactive rain make living in NC tough
 
The way they drive, I think they must reproduce prodigiously if only to keep the population steady.
Southerns are R-Strategists it turns out.
 
Try Florida lmao
 
3:48 PM
I used to think New England drivers were bad.
I take it all back.
 
I've got to get some work done. It was good catching up. I'll be in and out a bit more from time to time now that I know there's some type of pulse here.
 
👋 ❤️
 
4:28 PM
posted on April 17, 2019 by ericlippert

So… I’ve got good news and bad news. The good news is: I’ve described an interface for discrete probability distributions and implemented several distributions. I’ve shown how projecting a distribution is logically equivalent to the LINQ Select operator. I’ve shown … Continue reading →

 
01:00 - 17:0022:00 - 00:00

« first day (3105 days earlier)      last day (1826 days later) »