« first day (2973 days earlier)      last day (1991 days later) » 

2:52 AM
By your favourite Jon Skeet
 
mr5
3:05 AM
TIL:
 
 
1 hour later…
4:22 AM
anyone here that can answer a question for me about using LINQ?
 
4:50 AM
@GharbadTheWeak I'm not good at Linq, but I can try to answer about your question.
 
5:00 AM
cool, thanks for offering
i've been tasked to give an example of how to "loop through an array of integers" using LINQ
admittedly i don't know much about LINQ
but i thought that LINQ is used to select elements from a collection
like, select all integers from my array that are > 2
and then you have to loop through the result using some kind of loop like a for or foreach
am i missing something about LINQ? is there a way to "loop through an array of integers" using LINQ?
here's the closest thing i've found to looping using LINQ, but i think this is just using a lambda expression which i'm not sure if that is "LINQ" or just a lambda expression
arrIntegers.ToList().ForEach(m => {
Console.WriteLine(m);
intIndex++;
return;
});
 
Rob
5:30 AM
@GharbadTheWeak It depends what you're trying to do when looping. Most LINQ functions will iterate the entire enumerable, which could be said is looping through it. If you want to have side effects.. that's not advised in LINQ.
You use LINQ to create a sequence of items, which you can then loop through if needed
I'm not sure if the ForEach method counts as 'LINQ', given it's only available on List<T> rather than IEnumerable<T>. But.. if your task is really just "Loop through an array of integers in LINQ"... that doesn't really make sense to me, given people use LINQ to generally avoid using a bunch of loops
 
mr5
5:46 AM
@GharbadTheWeak I can say it's a deferred lambda if you use LINQ with IEnumerable
@GharbadTheWeak this example is not a LINQ though
 
5:59 AM
ohayou
 
6:25 AM
Gooood moorniiiiing CeeeeShaaaaaaarp! Have you met anyone you knew before in places you didn't expect them lately?
 
6:36 AM
List<int> lists = blahblah..
lists = lists.Where( x => x > 2 ).ToList()
will returns list of elements which is bigger than 2

after that, do you wish to change each element to other value?
 
7:18 AM
Good morning guys
How can I use a DbService class in other class? Because it is not used the constructor anyway, so I do not know how to instantiate it.
Just I saw this is done
        Container.RegisterType<IDbService, DbService>();
 
8:00 AM
\o
 
mr5
@QuicoLlinaresLlorens read on IoC
 
mr5
8:48 AM
ew
"If you choose to omit semicolons where possible, my advice is to insert them immediately before the opening parenthesis or square bracket in any statement that begins with one of those tokens, or any which begins with one of the arithmetic operator tokens /, +, or - if you should happen to write such a statement."
he forgot to include this: if (q == (3.0 / 7.0)) console.log('equal') else console.log('not equal')
!!> if (q == (3.0 / 7.0)) console.log('equal') else console.log('not equal')
 
@mr5 "SyntaxError: unexpected token: keyword 'else'"
 
mr5
"Adopt this advice as a rule and you’ll be fine."
NO
IEEE 754 vs the alternatives Unum/Sigmoid
does anyone have researched about this topic?
reading this doc about IEEE 754 floating point format makes me sick
I can only understand the basic and got lost in the middle of it
 
9:08 AM
@mr5 You don't have to understand, just know that there is a limited number of bits for the fraction and exponent and thus rounding errors will eventually occur.
 
mr5
yeah I understand that part and also how the format balances the bit distribution to cater for more precision
but then, the implementation is somehow full of error handling
and affects the performances (admittedly, I haven't encountered any of it yet)
we might need a new format that is more humane and comprehensible for people like me
 
What implementation?
 
mr5
it's like IEEE 754 is the XML
 
Strings ftw.
 
mr5
and then JSON comes along
Oh
I know where the IEEE 754 format will suffer from too much critics
ML!
If we reached that point, I'd expect a new born format will rise
 
9:29 AM
Morning friendos
 
Anyone know how to figure out the pin at meats pin dotcom?
 
mr5
eww
is that another dating app? abuckaui
pin meets meat dot com
gross
 
Perhaps you need a pen: I recommend pen island dot com
^^not actually funny, but.
 
mr5
!!> Math.acos(1.0000000000000001)
 
@mr5 0
 
mr5
9:43 AM
!!> Math.acos(1.000000000000001)
 
@mr5 0
 
What's Acos
 
@mr5 "NaN"
 
mr5
!!> 1/0
 
@mr5 That didn't make much sense. Use the !!/help command to learn more.
 
mr5
9:44 AM
@LeeButler idk either
this is where IEEE 754 fails us
 
@mr5 "Infinity"
 
mr5
!!> Infinity.constructor(0) - Infinity.constructor(1) + NaN.constructor(2)
 
@mr5 1
 
10:16 AM
good morning
 
10:30 AM
!!>0/0
 
@Squirrelkiller "NaN"
 
it's not a number. It's a blackhole
 
mr5
what do you call infinity of NaNs?
 
10:58 AM
NaNverse
NaNity
world of NaN
 
11:11 AM
NaNception? NaNcipation Proclamation. 'NaNners.
 
 
2 hours later…
12:43 PM
guys any one knows how to install windows service under Network Services ?
 
12:58 PM
yes
 
yes
whew, that was an easy one
 
I always thought it was spelled "phew"
 
1:26 PM
you are mistaken, sir
 
Both work actually
 
why it is always going inside the if?
IF NOT EXISTS(SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_CATALOG = 'ReleaseDb' AND TABLE_NAME = 'DbReleaseTask' AND COLUMN_NAME = 'Version')
			BEGIN
				ALTER TABLE [ReleaseDb].[dbo].[DbReleaseTask] ADD [Version] NVARCHAR(255) NOT NULL CONSTRAINT DF_DbReleaseTask_Version DEFAULT ''''
			END
ReleaseDb is the name of the DB, DbReleaseTaks is the name of the table
and the column is Version
And it is already created
but it is still going into
 
Does it exist is another schema (ie not dbo)?
 
in the tables I have in that DB
It is dbo.DbReleaseTask
So I guess it is dbo
 
Is this MS SQL?
 
1:35 PM
yep
 
Works fine for me
I tried it on a column I know exists and a column I know doesn't, and it didn't fire if it exists and did if it doesnt
 
1:58 PM
In testing and it working as expected
Finally
 
2:32 PM
Not surprising. Good that they plan to enable them by default for new projects too
 
IAsyncEnumerable is not that much of a feature without .ConfigureBackPressure(...)
if you can apply these extra info, it would be great
just like .ConfigureAwait(...) for await
 
2:50 PM
It be opt-in in future
I dont know why they dont want enable it by deafult in tests
Strange, I hope they will not go back with this "feature"
 
 
1 hour later…
3:58 PM
I want WPF and Avalonia to merge now and make a decent xplat wpf
 
4:11 PM
you can implement it. Than just write a pull request
just a bunch of ctrl-c ctrl-v
 
 
1 hour later…
5:21 PM
Hello everyone.
 
5:43 PM
Room is so dead now.
 
6:10 PM
Hello gregg
 
 
1 hour later…
7:38 PM
If I attach an entity to a context, and that entity has navigation properties to other entities
and those navigated to entities have their own navs
On the attach to the context, does it track all levels of that?
or just one level?
 
8:35 PM
Depends on if you have lazy loading enabled
Here is an example of LazyLoading
http://www.entityframeworktutorial.net/lazyloading-in-entity-framework.aspx
 
 
2 hours later…
10:13 PM
I'll literally pay $100 to whoever solves this stackoverflow.com/questions/53659926/…
 
10:23 PM
you want me to remove the login failure?
 
...yes?
 
dont try to connect, then you wont have login failures
now give me $100
 
Hm. I'd say resolving a failure is turning it into a success.
 
i said "remove'
 
Hm.
Fair. Your check's in the mail. I hope the mailman knows how to get to "Wietlol".
 
10:29 PM
even google doesnt know my location
 
So, does "automatically check for missing packages during build" just check and not actually download them? Because it's definitely not downloading them.
 
Sometimes it helps to delete your package folder and all your bin and obj folders.
 
@juanvan So I want to have it disabled
 
and instead use eager loading
 
10:43 PM
@Grace It wants me to have two versions of the Microsoft.Net.Compilers package, even though only one is in packages.config. I recently added the packages folder to .gitignore, so the most recent merge deleted my packages folder. But I can see from old commits that I did in fact have two versions of that package, despite having only one version in packages.config. Any ideas?
 
Sounds like one of your packages has a dependency on the other compilers package.
 
NuGet doesn't seem to want me to have two versions of the same package.
 
I think you can set up a binding redirect to stop it from doing that, but that's never really worked for me.
 
Don't put packages in source control they said, it's unnecessary they said...
 
Yeah, you shouldn't be putting binaries you can download yourself in source control.
 
10:48 PM
Except I can't download two versions of the same package easily.
I mean, there may be a way, but I don't know it.
Oh my, there's more than one occurrence of that too...
 
Yeah, I think the point of binding redirects is that you don't have to do that- you can say "hey, guy who wants the older package, use the newer package"
but you'll have to Google that yourself
 
Is there a thing
 
There's a lot of things.
 
where between 2 entities, there's function to see if there's any differences?
without manually going through it
 
you mean like seeing if two things are equal
 
10:53 PM
More then that
If I wanna do a modify operation on an entity
I can go through and add in my new stuff
but before .saveChanges()
I need to go and delete the shit that's in the old one but not the new
 
I went and grabbed my old packages folder, but how did I end up with this many sorta-duplicates in the first place? i.imgur.com/Rmr6YnH.png
I can't figure out where these old packages are being referenced. :L
Welp, dunno why the old packages are there, but it looks like they don't have to be, as long as I remove the restrictions from .csproj. Hmmmmm...
 

« first day (2973 days earlier)      last day (1991 days later) »