« first day (3937 days earlier)      last day (994 days later) » 

1:46 AM
Is anyone building static sites with C#/.NET?
I saw that Azure has static site stuff now
But I wasn't sure what's there in the whole .NET ecosystem for static sites
Is it just Blazor?
 
mr5
2:38 AM
What I think of static sites is just a plain html/css/js. No server-side logic involved.
 
@mr5 Right, but Blazor offers a way to host static sites with Web Assembly on the client side. There's also probably some .NET static site generators too, right?
I mean Blazor is also shipping .NET code to the client side so you can run C# in the browser
 
mr5
If Blazor is involved, it doesn't sound static to me. But I have no idea about that static site generator from .NET.
 
 
1 hour later…
3:51 AM
 
5:09 AM
@mr5 Blazor can run on the server or entirely client side, there's two hosting models
 
 
1 hour later…
6:33 AM
[Squirrel in Training] GoOoOoOoOoOoOoOoOoOoOoOd Mornin' neglecterinos!
 
6:55 AM
Good morning
 
@Squirrelkiller Morning!
 
Actually if you realise your data is flawed, you have some information that tells you your data is flawed. Couldn't you use that to train your AI somehow, by telling it "yo this data is flawed and this is why"?
 
 
3 hours later…
10:02 AM
Any of you guys used C# and React?
 
10:17 AM
we use React and we use C#... but I am a bit scared of what your actual question is
 
Just curious :)
I've just seen an option for Blazor or React
 
[Captain Obvious] Blazor > react
 
why? :/
 
React > Blazor
 
Blazor > React
Because it's C# too, so you can use the same models and potentially even business logic
 
10:27 AM
Interesting to see how you'd mix Javascript and C#
 
React > Blazor
Blazor is based on templates
React is based on components
I personally use React with Kotlin, which is also my preferred back-end language, which would have the same benefit of library or pattern reuse
 
What's another alternative other than C# and React? Something like Node JS and React maybe?..
 
[Hans1984] Java
[Hans1984] \o/
 
well... Kotlin/JVM server side, Kotlin/JS client side
or just NodeJS server side and JS client side
 
[Captain Obvious] What are you chatting wiet
[Captain Obvious] Blazor is based on components too
 
10:37 AM
it is still templated though
 
[Captain Obvious] In the same way that react is though
 
your components are made from different parts that are combined
not my React though
 
[Captain Obvious] You're probably doing react wrong then
[Captain Obvious] Which wouldn't be surprising
 
probably
but it is better my way
 
[Captain Obvious] Of course it is
 
10:48 AM
basically speaking, in the React I use, it is just part of your code
in the JSX version, you kind of switch between js and html languages
also a major difference is that the JSX version is based on a single (root) object for each component, while the version I use is using builders for the render methods
which makes the version I use a lot more natural
 
Blazor seems to be useless if we also need to use MathJax (Mathematics equation renderer in JavaScript) because MathJax heavily depends on DOM manipulation.
I have not slept for 20 hours yet. I think I have to sleep now. See you later folks. :-)
 
11:07 AM
[Captain Obvious] It's raining
[Captain Obvious] Better still, it is thundering
 
oooh
why cant we have nice weather over here :(
 
[Captain Obvious] It hasn't rained for almost 2 weeks
 
thunder is nice weather :)
one of the more beautiful ones
 
[Captain Obvious] Praise the thunder gods for the glorious fluids
[Captain Obvious] Also jesus wiet
[Captain Obvious] Where are you because there's shit loads of thunder bombing through the netherlands at the moment
 
oh great, there is thunder outside
 
11:13 AM
[Captain Obvious] Wouldn't surprise me at all
[Captain Obvious] We can locate wiet
[Captain Obvious] He's either around Alkmaar or somewhere between Utrecht and Nijmegen
[Captain Obvious] (or like on the german border)
 
why tho?
 
[Captain Obvious] Why what
 
(I mean, they are both wrong, but the approach of deduction might be weird)
 
[Captain Obvious] And one of them should be right, but very broadly
 
very broadly...
 
11:23 AM
[Captain Obvious] Broadly to the point where the northern edges of Amsterdam qualifies as "around Alkmaar"
 
you have the country correct...
 
[Captain Obvious] Well you've told us that in the past
[Captain Obvious] But those locations are where the 2 active thunderstorms in NL are
 
Pretty sure Wiet is inside a building, while the thunder is outside the building
 
[Captain Obvious] Well if he's outside in a thunderstorm on his PC then he's a fool
 
Wouldn't put it past him to use a plastic bag water proofer
 
11:32 AM
[Captain Obvious] Probably lives in a plastic bag
 
Would be smart in case the netherlands sink
 
 
1 hour later…
1:10 PM
My IDE keeps telling me to make my controller methods static because they don't access any instance data - can controller endpoints actually be static?
 
@Squirrelkiller the netherlands wouldnt sink, we just build higher walls around it :D
@Squirrelkiller if they are static, what do they do?
usually, your DI library can only work with instances
I imagine the web framework could handle static functions, but you'd lose out on most of the other features that come out of the box
 
I'm looking to create a bar graph - to display 12 months. Then I have a set of data, each record has a date on it. I will group them by months... anybody done a similar task before?
 
sure
the main question is how you want to group them?
do you want to group by current date with offsets of 1 month? or by calendar months?
 
Calendar months
Jan, Feb etc..
 
so for example, would you group all data from 27/06 until today (27/07) together or everything from june vs everything from july?
the latter is the easiest
 
1:18 PM
And get the total count of records for each month..
 
just group by year&month
 
And apply to the bar graph
 
linq has a group by method that easily does that
 
Yeah one sec.. just going to do it now
 
a faster way, assuming your data is sorted, would be to split on month differences, but you'd have to assert that your data is sorted
generally speaking, you wouldnt need the optimization until you are dealing with tons of data
 
1:20 PM
No no
We're talking about 100 records, and about 10 -15 records added a month.
var complaintsByMonth = Complaints.ToList().GroupBy(x => new
{
    x.Date.Year, x.Date.Month
});
Now I shall get the count
 
you dont need the ToList at the beginning though... probably
 
@Wietlol Return default values for the frontend, defined in the backend
 
var complaintsByMonth = Complaints.ToList().GroupBy(x => new
{
    x.Date.Year,
    x.Date.Month
})
    .Select(x => new { Month = x.Key, Count = x.Count() })
    .OrderBy(x => x.Month);
public ObservableCollection<ComplaintModel> Complaints { get; private set; } = new ObservableCollection<ComplaintModel>();
Maybe I do, maybe I don't - put it there just in case.
Wait.. that will sort in alphabetical order won't it?
 
depends on what Month gives you
 
Hi all
 
1:28 PM
in your case, it gives you an anonymous object
probably not the best thing
 
Is month a number? String? Enum?
 
maybe group by a new datetime object using only the year and month
 
Posted the issue about SignalR: stackoverflow.com/questions/68545765/…
 
then you can use the datetime object further in
 
@Alex Do you have websockets protocol installed on your machine?
 
1:30 PM
x.Date is actually a DateTime
 
https://stackoverflow.com/questions/61371964/signalr-connection-wont-start-to-iis-hosted-app/61411666#61411666
Websocket protocol took me some time to get activated
 
So if I do this .Select(x => new { Month = x.Key, Count = x.Count() }) I believe the Month will be a number. Let me check
 
it wont
your key is an anonymous object
 
It is
 
x.Key.Month would be the month from the date
 
1:34 PM
 
@Squirrelkiller I don't remember having to install it on my Win10 box. It seemed to work out of the box with WebSockets
 
No idea. I'm on win 10 pro and had to install it myself.
I think my other PC has win 10, but I don't remember if I had to install it there too.
 
Here's what the server looks like: imgur.com/a/xwwUdmg
That feature's installed
 
Hm yes that's the one
 
1:47 PM
On your answer, this comment is my situation: stackoverflow.com/questions/61371964/…
 
[Squirrel in Training] "crypto music" lel
 
In your situation, you might wanna learn english then :P
 
Speaking of music, Infected Mushroom's pretty good coding music
 
@Botler r/MasterHacker
 
1:48 PM
[Squirrel in Training] So is almost all of trap/edm and power metal
 
Also Halo 3 soundtrack
 
@Squirrelkiller :D
 
\[**[Squirrel in Training](https://discord.gg/PNMq3pBSUe)**] @Deathspike @Wietlol
https://www.youtube.com/watch?v=5-gTgJ7xilA

actually quite entertaining
 
Thomas Bergersen has some epic music. Great for inspiration and coding
 
2:10 PM
@Botler we arent partying, we are preparing for an emergency where we need to evacuate and everyone has to move in sync so we can move faster and more dense
 
2:33 PM
I was wrong to do Month = x.key
 
 
9 hours later…
11:29 PM
posted on July 22, 2021 by Scott Hanselman

I've had a number of emails asking questions like I'm sure you have a ton of tips and learnings on how to create inclusive meetings where some people are remote and some not. Do you happen to have it in written somewhere? We are discussing what guidance and technology we could use for the teams when coming back to a hybrid world, where meetings will surely have people connected remotely. For

 

« first day (3937 days earlier)      last day (994 days later) »