« first day (3386 days earlier)      last day (1545 days later) » 

2:36 AM
huwashhup
nerddsssss
 
 
4 hours later…
6:56 AM
Hi
 
Hello
 
can I use jwt with asp.net mvc 5
 
I am grateful for the obstacle where Indians gave me
Yes you can
 
I don't see any example
only see used with .net core
 
40
Q: How to use JWT in MVC application for authentication and authorization?

SDKI planned to use ASP.NET Identity 2.0 in an ASP.NET MVC application for authentication and authorization. Referring the below link JSON Web Token in ASP.NET Web API 2 using Owin I was able to create a access token(JWT) for the valid user i.e., When user Logs in to the application I will valida...

 
7:04 AM
web api2?
 
The answer actually seems pretty straightforward to me
 
oh yes it is
thank you
 
You are welcome
 
GoOoOoOoOoOoOoOoOoOoOoOd Mornin' pleberinos!
 
morning
 
7:28 AM
Good morning.
 
mr5
What to put inside the method body so that it can only be accessed at certain interval by different threads?
I was thinking Semaphore + storing last time access
 
You might determine the access times approx
Semaphore and storing access time in a dynamic storage
 
wasup @mr
wtf.
@mr5
 
wazzapppp
 
7:43 AM
@mr5 Why?
 
mr5
@Alper what
@RoelvanUden I am updating the notification progress in Android way too fast and it makes the "Now" label in the notification bar to jump
@c0dem0nkey heyya code
waassssusupp
 
@mr5 Don't block the access to the progress value then, make the notification updater run on an interval where it gets the new progress instead. Solve the problem in the proper way.
 
@mr5 Your idea is just fine
 
mr5
@RoelvanUden hmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmmm
seems a lot of work
 
It's not.
 
mr5
7:52 AM
I would have created a queue for the current progress but I have one already.
 
class NotificationUpdater
{
    private readonly object _source;

    public NotificationUpdater(object source)
    {
        _source = source;
    }

    public async Task RunAsync()
    {
        while (true)
        {
            var progress = _source.Progress; // your progress thingy
            UpdateNotification(); // update that notification
            if (progress == 100) break; // quit when necessary
            await Task.Delay(2500); // delay the amount of updates to the ui
        }
Not that complicated eh.
 
mr5
It's handling multiple progress for each notification. Updating the all the notifications by a certain interval at once makes sense but it could somehow miss some updates because I'm killing each progress notification that are already 100%
 
Restructure your code to be logical. It sounds like you're just tacking on shit where it's not supposed to go. This makes your code horrendous to develop, read, and maintain. Split all the responsibilities.
 
mr5
@RoelvanUden it will be complicated because I'm doing this inside a service. And I always try to make neat code that can be reused on other projects too.
 
It's not different in a service. And there's no point in making something extremely generic if you don't need it anywhere else, anyway. Save those efforts :-P
 
mr5
7:56 AM
Yes. I have like several services that are working together namely: IOfflineVideoService, IDownloadSerivce, IDownloadManager, IBackgroundService, INotificationService
show notification while downloading an offline video in the background
 
Fucking backgroundworker man, it is so dumb
 
mr5
Well, your idea seems interesting. I might implement it someday. But not now cuz it's too much work
 
Explaination: I cant use it so I flame to it
You are actually thinking too complicated
 
mr5
Are locks often called "mutex"? The one you put inside lock (<enter_name_of_your_const_object_here>) { }
Yeah. That's why my development time is always slow.
 
Abstraction dude, you need to abstract the shit out them. Easy to handle simple tasks
 
mr5
8:03 AM
What the hell do you think I am doing? Is it not enough abstraction for you?
If I abstract it once more, the time it takes for me to complete another task would be doubled
 
It is just an idea my dude, you dont need to get mad :D
 
mr5
sorry I am not mad actually. It's supposed to be just an expression.
 
8:25 AM
ahoy mateys o/
 
Buenos dias
Capitan o7
 
Carmen Dias
 
mr5
Is it ironic to say "selling free tickets"?
 
The more locking and synchronization you're introducing in your code, the more you should wonder what decisions led to that situation.
 
8:29 AM
technically you can't sell something that cost nothing
 
and good morning yall
 
that said, you see it being used
 
it is okay to create singleton of dbcontext?
 
mr5
oh shit
 
@Shad No.
 
mr5
8:30 AM
I just said to my colleagues, "selling free tickets to Wuhan China"
Now I feel ashamed
 
I want to use singleton in an mvc application
 
I'm sure they'll forgive you
 
I can't think of any other thing that will be needing the use of singleton
 
Though admittedly, if you were to say "giving away free tickets to Wuhan China", people automatically tend to ask themselves what the catch is
 
@Shad A DbContext is centered around a change tracker and optimistic concurrency saving all the changes in one go. Sharing a DbContext over multiple threads is a big no-no-no.
@Shad If you don't need one, don't use one.
 
8:31 AM
ok
I had a horrible interview yesterday
How to cope?
 
Beer
 
Breath.
 
@Shad Study and write code
 
mr5
@Neil Corona Virus ={
 
8:31 AM
okay
that's why wanted to use singleton
sigh
 
Why? Because an interviewer asked you when you'd use a singleton?
 
mr5
play DOTA2
 
Don't play DOTA2, play minecraft instead
eat some comforting food
 
no. But wanted to see me make use of it in a project
 
have a beer or two
 
8:33 AM
I don't have time to do all this. :'(
me ego hurt
 
mr5
@RoelvanUden I actually need it. There are lots of services cooperating in a task. And this is my first time realizing it is actually working
 
@Shad Point out that using a singleton for using the sake of using one is inherently a stupid thing to do.
 
RIP Shad' Ego
 
okay
thank you guys
 
8:34 AM
@mr5 I'll argue that if you designed your services a little differently you wouldn't need any explicit synchronization.
@littlemisscomputerscientist Fuck that "man up" bullshit
 
worst part is when they point out your experience and the lack of knowledge according to that
 
@RoelvanUden why?
 
It's 2020, Men/bois should be able to talk about their feelings
 
one asked me about static constructor(which I guess is typical interview question)
 
8:35 AM
yes but it's what I would say to my female friends too
 
I have never used it.
 
@littlemisscomputerscientist So you're ignoring their feelings too because that's healthy?
 
@RoelvanUden I agree, I think that was a trick question
 
and was not sure if we would be needing a default constructor as well along with it for the code to be valid (when we create an instance of it)
 
@Shad It's good to know, but if you never need it, I applaud you.
 
8:36 AM
@RoelvanUden yes it's good to be sad but what can you learn from it? you need to take it as a learning experience instead feeling bad about yourself @RoelvanUden
 
The first thing that should come out of your mouth after interviewer asks you how you'd use a singleton is: "A singleton is an antipattern and is generally best to avoid it, however, I can show you how it could be used.."
 
@littlemisscomputerscientist Yes, but learning from an experience doesn't mean suppressing everything you feel from it because "THATS MANLY BROOOO!".
 
@RoelvanUden it's just a phrase but my intentions were those
 
how can I cover up for the knowledge according to my experience?
 
@RoelvanUden Not that it'll stop me from suppressing everything i feel
(sorry double ping)
 
8:37 AM
I have 2 years exp now
can you believe it?
and I still ask stupid questions
 
If it makes you feel any better @Shad
 
@CaptainSquirrel No, it'll just bottle up enough to lead young men to suicide because they see no way out and nobody that cares.
 
I didn't know the answer to those questions either
And i've got 4.5 years
 
Knowledge is knowing a tomato is a fruit. Experience is not putting a tomato in a fruit salad.
2
 
I didn't even know we can use get for updating/creating as well (like 'post')
 
8:38 AM
I'm a simple man
 
@Shad Let me just put it out there; an interview that asks you about syntax and anti-patterns is one for a job you don't want anyway. They need to assess your abilities to solve problems, not your ability to implement shitty constructions.
 
I write the code
I Feex the code
 
@Neil Love it.
 
that kind of sums up experience :)
 
I feel better @CaptainSquirrel :P
 
mr5
8:40 AM
@RoelvanUden would you mind taking a look with my pseudocode?
 
@Shad Your ability to solve a problem is more important than your ability to provide drill-sergeant style answers to things you could've google'd.
 
okay Roel
 
mr5
34 lines only
 
exactly
but finding that right company with the nice interviewer is hard as well
he asked me get the nth salary
I haven't rote learned these typical interview questions
and was still trying to solve it
took my time, did it. But I guess he wasn't impressed that I took that long
 
I'll admit, any Job that requires me to do a Technical interview of "How would you solve x" or "Fix this bug in 30 minutes" immediately makes me not want to go for it
Because it doesn't accurately represent a person's ability
 
8:42 AM
I want to work with nice people.
I can do anything for them : ' (
 
Having nice people in the office is a double edged sword I Find
Because there's then also not very nice people
 
nice in the sense, positive
 
@CaptainSquirrel That's true, but it's also true that proving a person's ability otherwise is very difficult
 
I gave another interview in a good company
but felt guilty for wasting interviewr's time for being underprepared
I guess I shouldn't have applied?
 
I understand why they do it. What bugs me are that the questions being asked were created by a technician, and is being read off by some smug HR prick who doesn't know how to pronounce "byte" properly
 
8:46 AM
Pfsh, just apply to anything that seems interesting. You never know how a job and environment really is until you show up in the office and talk to people.
 
I have like 1 month of notice period left
 
anything you say is loosely interpreted and cross-checked with "correct answers" according to said technician
 
@RoelvanUden But the interviewer was really nice
 
@Shad no you did what you should have done and you learned something more
 
she asked me what was I thinking, and why
 
8:46 AM
Maybe she'd make a good psychologist
 
Be honest. Tell your interviewer your thought process, and, when you don't know a certain syntax, how you'd solve it (Google it).
 
They really just want to know if you can think logically.
 
@littlemisscomputerscientist hmm I guess so. I learned yes indeed but at the cost of embarassment xD
 
Obviously if the interviewer ultimately decides not to hire you, fine, but in the interview, you should be trying to understand if you'd be a good fit for them
 
8:48 AM
And they for you.
 
yes that is what she was looking for tbh, along with some expected things based on my experience
 
You're also interviewing the company, so to speak. Form your own opinion and if you don't like what you hear, then getting a job offer is not necessarily what you want
 
agree
I read a good quote, something like if you get rejected at least your time won't be wasted
 
@Shad no need to feel embarrassed everyone has their own life experiences just because someone knows more than you doesn't mean you can't do better than them... everyone has their own life journey and you had to go through that I am sure many people also did
 
@RoelvanUden Actually, they have given me an assignment
even after that aweful interview
asked me to submit by tomorrow implement different things as I asked above (like singleton)
I don't know what to do
thinking of just giving my best and submit it
 
8:52 AM
@Shad yes
 
I used @HtmlBeginForm helper, (the default one, whose default action is POST) but they were dissapointed why I had not written action attribute
ok
thanks again.
 
9:03 AM
good morning
 
@ntohl good morning
 
My nose hurts
 
@CaptainSquirrel why?
 
I had an nontraditional nose bleed this morning
blew my nose and some blood came out
But it wasn't pissing blood completely like it normally would
I'm wondering if it's about time to get my nose cauterised again
 
I had that happen recently, but I've been sick these days, so
 
9:12 AM
@CaptainSquirrel does that happen often?
 
@littlemisscomputerscientist It did a while ago
Which is why I got my nose cauterised
but that was like upwards of a year ago
 
@CaptainSquirrel I guess it's nothing to worry about but if it happens continuously visit a doc
 
First time I've actually had blood coming out of it for a while
 
No one knows nose like a nose doc knows
 
It's the dull feeling that i don't like
but i also can't tell if this is the feeling i used to get before a nose bleed happened
or after
 
9:15 AM
@Neil haha
 
If I have been asked to make of use web apis, jwt, Identity server
should I still try to do it mvc (.net 4.5) way?
because I am not well versed with those things
 
well give it a try. If you find things don't fit neatly, then you have your answer
just don't dedicate several months of work before deciding that it doesn't fit neatly
 
@Shad I'd follow the requirements
 
imho, you get a good feel for that just trying to see what your approach would be
 
mr5
@RoelvanUden so ugh, I followed your advice it's actually not much work lol
 
9:24 AM
@mr5 Well, I'm happy for you :-)
@Shad For an interview question? Way too much effort and way too much of your own time.
 
mr5
Using an interval of 1 second, that "Now" label still jumps though
How can I use the ConcurrentDictionary as HashSet?
I read that it's more recommended to use CD because there's no official ConcurrentHashSet
who's starring useless shit again?
8
 
For who again using the bot abusively will be get ban from using the bot. thanks.
2
 
mr5
sorry nyc :(
 
don't abuse the bot. The poor thing has enough problems as it is, being a bot and not human.
 
mr5
@RoelvanUden how did you come up with 2.5seconds interval?
 
9:35 AM
It can't even vote ffs
 
@nyconing I'm guessing that's in relation to the dodgy search that occurred yesterday?
 
Oh...that poem search
 
@mr5 I guessed.
 
Nah that my message get speaded all around all chat.stackoverflow rooms, like java and android
 
but
 
9:42 AM
And I only found Android room has their own physics. They blame car instead of driver if the car crash into something.
Android physics
 
they gave me a task even after an awful interview
@RoelvanUden
 
mr5
means, they're still hopeful to you
 
but I know .net 4.5
not core
and the task has requirments like jwt, identity server
 
Don't let this one influence you... I refuse to write code for reviews outside of the meeting and in my own time. My time is mine, and if they want me to write code in that time so that it costs them nothing, I won't do it. Pay me or assess me during the interview. Handing a project for that to someone is lazy, cheap, and irresponsible.
 
9:53 AM
There's a song in my head that has the word jealous , and the voice looks like JB, anyone knows the song?
 
OK, I'm humming till I get it
 
10:19 AM
I have a song in my head since yesterday, but I heard that so long time ago... I think I can't recover it
 
She gay ehy?
 
mr5
13
Q: How do I make a sphere into something like the picture?

Ekin Ayan How do I make the globe into something like the picture?

This is the skill I really like to have but everytime I try to learn it, it always lead me to "I should learn OpenGL first"
 
10:35 AM
well that's utter crap
openGL teaches you a lot of the things you need to know, but I don't see how that's a prerequisite
unless of course you were out to make something using OpenGL
 
yeah. Knowing the modifiers, and knowing when to "convert to mesh" or "convert to nurb" is different than knowing OpenGL and trying to squeeze performance out of transformation matrices is 2 completely different story
 
maybe you stand to learn something by studying up OpenGL, but still. It's like saying you can't program without learning assembly
 
It always sounds something an old man says, who went through the pain of inefficiency and wants to validate the experience by inflicting it on another too.
 
a lot of things they teach you in math class are a little silly and unnecessary these days
I would just assume they teach people how to consolidate their expenditures rather than long division
 
10:54 AM
I wanted to learn that too, but I can't learn everything at once...
I need to learn something else too
I wish I could just install knowledge into my brain
 
|| cats or roaches ?
 
Invalid command! Did you mean: cat, laws, aps? Try help for a list of available commands..‍.‍.‍.‍.‍.‍.‍
 
hmm
no "or" command
alright
 
11:08 AM
roaches
 
There are no other roaches here
Only you
So the fantastically amazing news about today is i get to leave at 4pm
\o/
well, around 4pm anyway
 
lucky you
 
You say that
but i was in the office at 8
And the bed was sooooooooooooooo comfy this morning
Which is part of the issues i have with waking up
 
sometimes I'll have to come into the office early, for releases to production to ensure everything works properly. Those days, I have no qualms leaving early
 
Yeah, that's why i was in today
production deployment
 
11:14 AM
maybe harry has double vision
multiple roaches
 
dun dun dunnnnn
 
but anyway I though they transfered allof capricas commands
 
tis what was said
 
and cap had an "or"command
 
a suitable replacement bot for caprica should have been paprika
would have been a suitable name
 
11:15 AM
I might take a crack at fixing Jack tonight
So he isn't as broken and stupid as he is now
@JackSparrow you stupid boi
 
I don't understand mate
 
or faprika
 
EXACTLY MY POINT
 
Jack, black
 
11:16 AM
seems to work fine to me
oh sweet, and we've got the auto unoneboxing
 
Jack, hmm
 
all of his core features work, what's to fix?
 
What is the authorization requirement?
when I just put in [Authorize]
 
@Shad Users which fulfill the authorization requirement presumably are the users in Users property
or the Roles which fulfill the authorization requirement
 
11:27 AM
oh I got it
use Principal
like you need to be logged in at first
 
FFS when is it ever possible for a table to take 3+ minutes to respond with a "select * from table"?!
 
very BIIGGG table
xD
 
yep, that it is..
 
* they say shouldn't be used
 
4 minutes now..
 
11:30 AM
@Harry well the commands command is broken for a start
 
is there any way to increase speed other than simply removing data?
 
I remember you can create indexes
 
there are indexes, and I thought they weren't working properly because it was still so slow
but after a 4 minute and 30 second wait time for a simple select, I'm now starting to think it's simply a matter of too much data
 
the operation timed out by the way, didn't even finish
the trick will be to convince my boss to trim the fat so to speak
 
11:35 AM
@Neil have you tried maybe limiting the amount of records you get?
 
@Neil select * from table limit 10 ... depends how many records you need and you can add offset too if you need... depends what is your scenario
 
I think limit is the last thing to run in the order of execution
not sure about the optimization that sql engine can do
 
@CaptainSquirrel I can't do that though. I need to know if there has been activity in the past 12 months
 
To be fair, if i was querying a table with a large set, i'd normally limit 100 order by 1 desc
 
but I could try to see if it is slower
 
11:43 AM
You could always lower the amount of columns you are returning
 
not returning any columns
I just need to know if they exist
so I'm doing "select 1 from table"
I can't even get the total number of records in the table via count
I'm thinking I'll just propose to partition or something
 
@CaptainSquirrel but hmm works and thata ll that matters
 
Jack, tell Harry shutup
 
but what about apls ?
 
if I partition by date, then the db can simply ignore dates that are definitely not going to be in my range (which would be the last year)
 
11:45 AM
SEE THATS BROKEN TOO
 
waiting...
ur bot sucks
 
The fact that's broken is very confusing to me
Because IIRC that throws an out of range exception on the index
 
hahahahah
what
 
the index of which can't be higher than the length of the list it gets the shutup responses from
which completely blows my fucking mind
 
where is it pulling this index?
 
11:47 AM
shutupResponses.Length//.Count
whichever one it is
 
if that's where you're getting the response, then you can't ever exceed it (unless you forgot to subtract one)
if you're generating a number from 1 to shutupResponses.Length inclusive, that's a problem :P
 
just a hunch though
 
int index = random.Next(0, _shutUp.Count);
That's how it generates an idex
so you're saying it should be
int index = random.Next(0, _shutUp.Count - 1);
?
 
well I don't know, that depends on whether or not random.Next returns a number from a to b inclusive or exclusive
but it would explain why every now and again it doesn't work
Jack, tell Harry shutup
 
11:52 AM
@Harry SHHH!
 
I think that might be it
 
I always prefer them to be exclusive, but ah well, what can ya do?
 
jesus
jack is SLOW
 
12:23 PM
Jack, tumbleweed
 
meanwhile in the F# chatroom 2 days later…
 
@ntohl I wonder how many people in the world use F#...
 
few thousand
 
12:46 PM
I go away 7 hours and the chat is flooded with messages.
Actually 6 hours.
 
best chat ever
 
@Neil You already said the exact same thing previously
 
@HéctorÁlvarez liar
 
Jan 14 '19 at 9:07, by Neil
what prevents you from using a tomato in a fruit salad amounts to experience, not the understanding that the word "tomato" can have multiple contextual interpretations
Jan 14 '19 at 9:05, by Neil
Knowledge means knowing that a tomato is a fruit. Wisdom is not using a tomato in a fruit salad.
Then there's Avner's more subtle version:
Jan 14 '19 at 9:01, by Avner Shahar-Kashtan
If you're talking about biological classifications, it makes sense to talk about a tomato as a fruit. If you're making fruit salad, it does not.
 
@HéctorÁlvarez see? totally different
 
12:51 PM
And the first iteration the search engine can find
Mar 18 '15 at 20:42, by Ryan Ternier
@KendallFrey Knowledge is a good thing, it's not being able to correctly use that knowledge which is the bad thing. It's good to know a tomato is a fruit. However, you're still an idiot if you put it in fruit salad.
 
wisdom isn't experience, I'll have you know, sir!
 
looks like someone like tomatoes a bit too much :P
 
No but after enough experience points you can level up wisdom by 1
 
and with enough wisdom, you can avoid putting tomatoes in your fruit salad
 

« first day (3386 days earlier)      last day (1545 days later) »