« first day (3638 days earlier)      last day (1293 days later) » 
00:00 - 14:0014:00 - 21:00

12:20 AM
Happy Happy
 
C# birthday happy room
7
 
1:07 AM
Happi bday
happy
 
mr5
1:43 AM
what
why
how
@JansthcirlU aye. solved it just now. I accidentally fell asleep while talking to my gf xD
 
 
1 hour later…
mr5
3:09 AM
Trump vs Biden presidential debate sounded like kids arguing about who have the biggest toys.
 
yo yo yo
3 more hours
 
 
3 hours later…
5:59 AM
@CaptainSquirrel You should update Jack so when the feeds post is an xkcd, he posts the alt text.
Aug 27 at 8:49, by Squirrelkiller
In case anybody wondered, the first message in here was "ArgumentNullException".
Technically 14 days to go until the birthday.
Happy birthmonth C# room!
 
6:37 AM
will MS bring back Andy the C# mascot?
 
morning
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
@Squirrelkiller Happy Birthdaymonth!
So we got events planned for this month.
Like the Doing of Nothing
Or the Chase for nuttin interesing
Hope you'll enjoy :3
@CupOfJava @Squirrelkiller coincidence?
I don't think so!
 
6:53 AM
Coincidence is only causation you can't understand with your puny mind!
 
7:04 AM
totally planned that
Squirrelkiller and I actually work for the CIA
we've been planning that for the past year
 
@CupOfJava Christians In Action?
 
Can confirm, except that my name is not Christian.
 
How would you know that killerino?
Maybe you is secret bavarian agent and you acutal name IS Christian?
#confirnmed Killerino works for the CiB
 
If it were, would I really tell you though?
The whatnow
 
7:10 AM
The whatnow
 
@Squirrelintraining Comment Initiation Agency
 
What? You thought your tax dollars were going towards fixing roads?
 
Can anyone point me to resources on pulling a url parameter out of a query ? i.e getting id from url '/foo/{id}'. Every SO answer I look at is referring to what I thought were query parameters as url params - new to the ASP world so I might be missing something here
 
7:19 AM
@CupOfJava .. Actually I thought in order to plant new trees for the master race.
 
I'm done with this conversation
 
@mbdavis I don't get what you are after. maybe x-y-problem?
@CupOfJava No you're not!
 
@Squirrelintraining - I'm making a controller for a service - I want to respond to a request to /foo/123 - and then get the value 123 in my handler (as opposed to /foo?num=123)
 
@mbdavis so [Route("foo/{num}")] right?
 
exactly
 
7:22 AM
what's wrong with RouteData?
 
just confused as to what this is referred to - I thought this was a url/path parameter
 
Well what is the question? 🤣
 
ok - will look at routedata, cheers. I just have no idea what to search for to find out how to get that value
 
@mbdavis Yeah it's the URL that is being accesd. but with {} you can define parameters
 
yeah that's exactly what I was after. thanks guys!
 
7:25 AM
it's been a while since I've done that but I think it's RouteData.Values[""]
Maybe, let me look this up
 
seems to be Request.RouteValues["id"]...
 
@mbdavis Did you see this one? stackoverflow.com/a/5004518/11168559
 
no I didn't - yeah you're right
 
Just expect the invoice in the mail :P
 
@mbdavis [FromRoute] for parameters from/the/route and [FromQuery] for parameter ?from=theQuery
 
7:31 AM
@CupOfJava hahaha shit
@Squirrelkiller is that a decorator for the handler or for a parameter?
 
for a parameter in the endpoint signature
 
i.e

[HttpGet]
    public async Task<ActionResult<PokemonDescription>> Get([FromRoute] object name)
    {
    // use name ?
 
@mbdavis that's it, but what's in your RouteConfig.cs ?
 
errrr - I don't have one
 
PokemonDescription :-)
 
7:37 AM
should I?
@Hozuki yesss
 
@mbdavis AFAIK you can't pas objects from route, only from objects.
 
AspNet MVC is all about magic matching requests to class=>method by conventions. You can specify these routes in startup all together in a RoutConfig.cs in App_Start or as [Route ... ] attributes over your controller methods. The default is domain/pokemon/Get/id would match PokemonController.Get(string id)
 
can roel confirm?
So if you want to have an object you should do a Post with [FromBody]
 
Yep. Doesn't make sense. What is object even supposed to mean in this context?
If it's a name, make it a string.
But yet, as @hollystyles said, string id is the default that would work.
 
7:54 AM
Hey guys, I now am trying my hand at ASP.NET MVC as you fellas had previously suggested. I am stuck at the controller part. How is it that, both pattern: "{controller=HelloWorld}/{action=Index}/{id?}"); and pattern: "{controller=HelloWorldController}/{action=Index}/{id?}"); call the HelloWorldController class?
 
Hi all
Hi what this is mean Type: false

is a default value?
why not like this without typing name of parameter

this.write(0, false);

why adding parameter name ?
this.write(0, Type: false);

private void write(byte value, bool Type){

}
 
Is this a homework question or something?
 
it's not
iam new in c#
 
you can explicitly name parameters if you don't want to fill them out in order
for example:
 
@d4rk4ng31 MVC first tries to find the exact name match, for example in this case it searches for HelloWorld. It doesn't find it, because that class doesn't exist. Then it adds a Controller suffix, so it ends up searching for HelloWorldController. That exists, and there you go. That's why both have the same result.
 
8:00 AM
public int SomeMethod(int first, int second, int third)
{
    return first + second + third;
}
you can then call the SomeMethod method like this
int result = SomeMethod(second: 2, first: 12, third: -5);
 
ah i get it its mean this parameter name have this value Type: false
@JansthcirlU thank you very much
 
Roel
WHEN IS THE NEXT WALK VIDEO COMING?
With the doggo
...(* ̄0 ̄)ノ...(* ̄0 ̄)ノ...(* ̄0 ̄)ノ...(* ̄0 ̄)ノ
@Hozuki ping cur roel no work no more
 
Hi folks, do you have any idea to simplify the following?
    @page "/edit"
    @page "/edit/{id:int}"
    @inject IProductService   ProductService




    @if (product == null)
    {
        if (id == null)
        {
            <text>Id segment is missing in the query string</text>
        }
        else if (id == -1)
        {
            <text>Product does not exist</text>
        }
        else
        {
            <text>Loading...</text>
        }
    }
    else
    {
        // display form to edit
    }

    @code {

        private Product product;
 
8:19 AM
o/
Oooooof
 
Outlook is down globally
 
@NotAZoomedImage No sorry wissen.
@CaptainSquirrel Orly?
Can't confirm
 
@Squirrelintraining yeah i'm just getting 503 when trying to access it
 
@Squirrelintraining OK. No problem. Thanks.
 
8:21 AM
.... are the other services down?
 
looks like Microsoft Ireland dun goofed
 
anyone know how I can see a list of unused classes in my solution?
I got a ton of junk code which I neglected to put in a separate branch
 
@JansthcirlU Turn on the CodeLens in visual studio.
 
8:41 AM
never heard of that, I'll check it out
wait codelens is just the thing that tells you if a piece of code is referenced or not
whoa I just got banned from asking questions
 
@JansthcirlU Who banned you?
 
idk I just can't ask questions anymore
 
@JansthcirlU where? in the main site?
 
yeah
StackOverflow
 
@JansthcirlU Try deleting you questions with no answer and downvoted.
 
8:54 AM
no that doesn't work
according to the support center
 
Having many downvoted questions might cause this issue, I think.
I have the same experience in electrical engineering stackexchange.
Or you probably asked too many downvoted questions today
It might be regarded as spams. :-)
 
hmm I see
 
I up voted your questions to neutralize the downvoted questions.
 
I'm not sure if that's allowed but it worked, thanks!
 
You can ask question now?
 
9:01 AM
yeah
 
outlook isn't rip anymore
 
Then remove the remaining downvoted questions without answer.
 
@JansthcirlU Answer others' questions, that'll give you enough of a buffer.
 
according to the support centre, answer "karma" and question "karma" are independent
 
I'm taking a look at a couple of your questions. Make sure you read the comments and incorporate suggestions into the questions.
 
9:05 AM
@NotAZoomedImage deleting downvoted questions doesn't work, they still count towards the ban
@CupOfJava in my defense, most of my questions are about WPF and it's a really old and extensive framework that is far from easy to research as a newbie
so naturally my questions are not going to be as detailed as the community would want them to be simply due to a lack of experience
maybe I should address that in meta, cause as far as I know SO only cares about how "useful" a question is to other users
 
If you wanna build a desktop application, WPF is honestly the way to go. It's way nicer and as obsolete as WinForms, and it seems not as complicated as UWP.
 
but if newbies can't ask questions about technologies they aren't comfortable with, then what's the point of this platform anyway
 
In general, I'm not saying it's your fault how you ask a question but on this site, it is your fault how others interpret your question, so keep that in mind.
 
Sure newbies can ask questions, and they are valid even if not helpful to other users. But its still important to stay within the guidelines of SO, even for newbies.
 
@Squirrelkiller UWP seems to be dying...
 
9:09 AM
Rule of thumb for what the guidelines are: Make an MCVE. Make sure someone who isn't you understands what you want.
 
@CupOfJava that's a good point, I will keep that in mind
lemme give you an example of a question that I know is not focused enough for this website: stackoverflow.com/questions/64063469/…
because WPF and MVVM experts obviously know how to use ICommands and all that stuff
so when I ask "hey how do I implement a button click in WPF?" it comes off as unresearched and lazy
so I tried to add a link to a tutorial which I followed to get a general sense of how WPF worked, though I still didn't have an idea how to implement it exactly
 
@JansthcirlU I understand what the question is getting at but it's hard to find the question. Then when you find the question it's too broad. Is there a "more organised way" to do this is a bit abstract.
Sorry, I'm not trying to sound harsh.
 
it's okay, I totally understand
it's just that I literally didn't know any other way to do it so I couldn't ask for a more specific solution
 
@Hozuki If that is so, then why does the case of having 2 classes: HelloWorld and HelloWorldController called with HelloWorld say ambiguous call??
 
they probably expected something like this, right: stackoverflow.com/questions/12422945/… @CupOfJava
 
9:20 AM
I'm not sure if it's a lack of experience. Personally, I can't find the question mark in the question. That's usually the first sentence I read to prime myself to answer the question.
 
I see
 
I've had this problem myself on so many other SE sites because I assume the reader is thinking the way I am and I'll leave out key information or correct formating.
 
@Squirrelkiller thanks for your answer on my style switch question, it's indeed what I ended up doing as a workaround
but I was wondering if I could do it directly from a button click
and with an applied style property
 
Might have to put DynamicResource instead of staticresource and put the style into its own viewmodel property. Not sure enough about this one to write a concrete answer though.
 
I'm going to leave it up for now
but since your answer works I'll probably select it as the right answer unless someone else has a different approach
 
9:27 AM
Maybe it gets a little more attention now there is an answer too.
Pretty sure I have done something very similar, but I think that was from before I used source control so it's lost in time lol.
 
rip
 
And I used DynamicResource there that's where the idea came from, but too long ago for stable memories.
 
9:45 AM
@Squirrelintraining Mmm... good question. Haven't felt like doing an anime review thing, but perhaps I should just record a doggo walk ^_^
 
10:01 AM
.......Videos?
 
10:17 AM
@Squirrelkiller I appreciate the answer but that's a VS 2010 solution and everything is different in VS 2019
 
mr5
 
@JansthcirlU The Analyzer one? Thought the analyzer was a seperate package.
 
mr5
Didn't know it's lawful to kill people with consent.
 
Will find a newer one though if this one doesnt work with new versions.
 
no idea but the instructions are horribly outdated and don't make sense to me
 
10:30 AM
@mr5 watt
@mr5 I don't think it is.
 
@JansthcirlU You're absolutely right, I edited in shame.
brb lunch
 
mr5
11:01 AM
@Squirrelintraining a lawyer in Japan used that statement to defend his client.
 
Doesn't mean it works.
 
It is not lawful, but there is difference between homicide and assesination

They are claiming homicide with consent (less years) + mentally ill (less years)
Example (not real):
Plain killing -> 20-30 years
Homicide -> between 10-20 years (accidental, with consent)
Mental illness -> substract some years
 
@mr5 it doesn't matter Japan has a crazy high conviction rate, I think it's something weird like 99.6%. So the lawyer, in this case, is just throwing stuff at the wall hoping something sticks
since all claims have to be addressed you're more likely getting a lesser sentence with three different claims instead of one strong one
 
mr5
12:06 PM
bool IsPowerOfThree(int n) {

    if (n == 0)
        return false;
    if (n == 1)
        return true;

    double d = n;
    while (d > 3) {
        d /= 3.0;
    }
    var result = Math.Floor(d) == 3;
    return result;
}
can you further optimize this?
with memoization perhaps?
 
probably
floor tho?
 
mr5
that's my 2nd solution to determine if the result is non integer
 
@mr5 bring back p3k
or wietlol is a frig frat
 
you can do the non integer check on each iteration tho
 
mr5
first was through epsilon
 
12:11 PM
100 / 3 = 33.333, so it cannot be a power of 3
 
mr5
@Wietlol would it be guaranteed that the final result is non integer then?
 
the final result must be 1
or, the result before doing the division should be 3
 
mr5
@Squirrelintraining I don't want to get banned :3
 
@Squirrelintraining I am a frig lion
get it right dang it
also, I wonder what would be faster
 
mr5
 
12:16 PM
doing math or tricks
 
mr5
it's just a matter of resubmitting the solution 🤦‍♂️
 
can you do a solution by digit sum recursion?
 
mr5
that lucky 0.04 percentile probably paid that site
 
maybe, maybe not
 
mr5
schrodinger
 
12:18 PM
they probably did it by digit sum without recursion...
digit sum balance?
Schrödinger
 
mr5
I don't have the fancy o
@Wietlol or bit tricks
> n >> 0x234ab823 -1 == 0xdeadbeef
 
@Wietlol sozzy
 
mr5
@Wietlol my gf pronounced your name "weight" tol
 
you won't get banned @mr5
no worries
p3k got flagged because I got flagged 2
we where calling @Wietlol a fat lion
Which feeds picked up and banned me for
30 mins
And bcuz p3k repeated waht i said, p3k got banned.
In b4 i am banned again
 
no for the last time he was banned cause someone got triggered by the thot meme
 
12:26 PM
93
A: How to check if an integer is a power of 3?

ElricThere exists a constant time (pretty fast) method for integers of limited size (e.g. 32-bit integers). Note that for an integer N that is a power of 3 the following is true: For any M <= N that is a power of 3, M divides N. For any M <= N that is not a power 3, M does not divide N. The bigg...

@mr5 or that
that is even faster than what I thought of
 
mr5
@Squirrelintraining ehhhhhh host it
@Wietlol that's cheating
 
i dont see how
 
mr5
you look for other answers
@Wietlol how did you come up with this?
 
if result < 1, it is not a power of 3
if 1<result<3, it is also not a power of 3
assuming you dont start by filtering the 1 scenario, the result value starts at 3 at best
so, you can reverse the order (from divide->check to check->divide)
and check for 3 instead
 
@Freerey not treu
 
mr5
12:43 PM
@Wietlol hmm do you think that trick would work for powers of two also?
of course with different constant
 
not sure
but power of two might be much easier
using binary representation
0001 0000 is a power of 2
0001 0100 is not
just count the number of 1 bits
or rather... assert that there is only one 1 bit
 
@Squirrelintraining do you guys just forget these things on purpose?
 
(not sure for negative numbers)
 
cause it stopped being funny the moment you started doing it
 
@Freerey NO I AM ALWAYS RIGHT
 
12:45 PM
sorry; I'm pretty on-edge right now due to a lost friendship and there was no need for me to blow up
 
whats a good substitute or xamarin inspector
 
mr5
hey chill up
what you need for xamarin inspector?
never heard of it
 
like when coding webpages you can just inspect element
i wanna do it on xaml
HAHAHAHA
im that lazy
 
mr5
like a live edit?
or you just want to copy XAMLs?
 
@mr5 do you mean chill out or cheer up? :P
 
mr5
12:50 PM
@Freerey =P
there's no "chill up" wtf
 
i read chillout i backread to see if anyones fighting
 
mr5
but there's cheer up
 
1:19 PM
I'm just stressing cause my friend's in a very dark place right now and I just abandoned her, so now her only friend is some creepy pervert
 
We should all join the Hacktoberfest in order to improve Jack and James. And maybe Wietbot but I'm not sure if he's actively developed on Github yet.
 
why are there three bots in this chat anyway
wouldn't just one be enough
 
because they all keep crashing
 
well then write one that doesn't crash
 
@Squirrelkiller wat
hacktober
 
1:25 PM
Also, depending on the definition of "in this chat", there may as well be 5 bots.
Botler and Sandy are just never actually here because we're too lazy to actually host them somewhere.
 
3, 5, 8, 13 whatever man
it's like those Twitch channels that use Moobot and Nightbot and then some of their own bots
 
for all you know...... WE'RE ALL BOTS MUWAHAHAHAHAAH HA HA HAAAAAAA!!!!
 
can confirm, am bot
 
James: Technical successor to Caprica Six, the OG, the one and only, the best bot there ever was. And now James is trying to be that but fails.
PatrickStar: Experiment by mr5 to make their own js bot in Cap's style. Retarded to the point of endangering mr5 of getting banned.
Wietbot: Written by Wietlol in Kotlin so supposedly (in Wiet's opinion) superior to all others, including actual people. No dynamic commands yet and basically just a scriptrunner for C# or js in here.
Sandy: First try of Squirrelkiller to build a C# bot using the SharpExchange library. Currently no development because o
4
That's the ones I can think of right now
 
1:35 PM
DangleBot
 
Whatnow?
 
I have no idea where the code is now though, I misplaced it already
 
Oh wait I forgot nyconing, sorry about that, can't edit anymore.
 
> PatrickStar: Experiment by mr5 to make their own js bot in Cap's style. Retarded to the point of endangering mr5 of getting banned.
No
He won't be banend 4 bot
 
Definitely laziness
 
1:36 PM
nyconing: First ever fork of Cap, hosted on the main account of its owner. Sometimes active. Main purpose is requisition of canine images.
 
I might start up botler now
 
Go host him somewhere in a free forever VM
 
I haven't got build tools on the server I'm hosting him on and I cba setting up CI
 
1:38 PM
@Squirrelkiller I am 2 lazy
 
Fuck that I have an idle server under my stairs
 
Well not having build tools on the application server is actually a good practice.
 
but I also don't have any way to auto build him either
 
especially if they're heavy and covered in brick dust and wet cement
 
1:41 PM
@Squirrelkiller your answer got me thinking, what if we just developed a code analyser (or ask Microsoft to build one) that can spot dead code based on how it's referenced
 
@JansthcirlU You mean like resharper?
 
no idea but all I know is that I'm still manually checking my files
since there's no dead code analysis atm
 
Did you implement my updated answer though?
Because there is indeed dead code analysis
Also you could build integration tests and check coverage
 
I did but "zero references" is actually a dumb parameter that I should've seen coming from a mile away
 
I'm gonna quickly add a couple commands
 
1:43 PM
uh oh
 
so your solution works for the way I asked my question
 
Nah it's fine
 
but my question is dumb because it doesn't solve my problem
 
Squigglies!
Wait it says make an expression body, doesn't it?
 
1:45 PM
Aye
 
@Squirrelkiller do you know if something like Resharper exists for Visual Studio?
 
Resharper is an extension for Visual Studio. It's not free though.
There is FxCop for free, which you get with the package I gave you in the newest update to my answer
There's also Roslynator, which will also give you many more rules and refactorings than you even wanted
 
hmm I see
 
After implementing the solution from my newest update, you should be able to see all dead code in your error window.
 
I got 2k warnings and 2k errors
no not errors, messages*
 
1:48 PM
@JansthcirlU Resharper is for Visual Studio :D
Aswell i don't like it
 
so it didn't really help lmao
 
@JansthcirlU Why? Go fix those errors!
Also maybe deactivate rules you don't need, like spamming ConfigureAwait everywhere.
 
if I had 2k errors my coworkers would probably kill me lol
 
@JansthcirlU I once got a "Warning: Too many warnings" in a Visual Studio solution, it was registered 12 times (once for each awful coded project in the solution). I do win
 
beautiful
 
1:55 PM
Congratz, you beat the system :D
 
ITS ALMOST TIME
 
time for what?
 
It is. I will soon be on vacation for the long weekend.
 
for botler
 
Actually it's time for music: stop
 
1:56 PM
HAMMERTIME!
 
00:00 - 14:0014:00 - 21:00

« first day (3638 days earlier)      last day (1293 days later) »