« first day (3379 days earlier)      last day (1562 days later) » 

4:00 PM
I'M FOLLOWING THE INSTRUCTIONS ON THE WIKI HOW IS IT WRONG
 
byes peoples for now see ya tomorrow
 
oh, good old SytaxError. It seems like Roel had a pretty good solution for what you were doing
 
@mr5 .....
 
C:\>If you're happy and you know it, syntax error!
Syntax error

C:\>If you're happy and you know it, syntax error!
Syntax error

C:\>If you're happy and you know it, then you really ought to show it. If you're happy and you know it, syntax error!
Syntax error
-- widom spoken by @Neil
3
wisdom*
 
4:03 PM
yep
Also I don't think ms-dos says "Syntax error" any longer
but it used to because "if" was batch interpreted as a batch command
 
shhhh let them have it
 
@PawelFlajszer Oh. I haven't used that way.
@CaptainSquirrel Make the function async ;-)
Your main script could look like this:
async function main() {
  const data = await fs.readJson('thatfile.json');
  console.log(data);
}

main().catch((error) => {
  console.log(error);
  process.exit(1);
});
 
Captain's script: you; Roel's script: the script she told you not to worry about
 
I'm off. Badibai!
 
mr5
4:10 PM
you're just 75%
 
i have a dictionnary i receive and i need to apply transformations before sending it to the DB for example X:false but needs to be X:0 in the DB this is just a simple example is there a way to do this easily?
 
mr5
oh wait. Am I suppose to divide it by the median?
someone good at Math answer me please
 
@mr5 what do you want to know?
 
i don't understand what you're doing
 
mr5
@Neil from the last picture I posted. there's min, avg, median, and max
 
4:15 PM
@mr5 my proxy blocked that image
 
mr5
if I want to get the percentage of green, am I suppose to divide it by the median or the max?
filterbypass.me
^
why are you blocking imgur?
@CupOfJava I want to find the percentage of green from that histogram
 
@mr5 shit, don't give me links like that
 
mr5
why?
 
it's a work proxy, and now they'll know I tried to access a proxy blocker
people have been fired here for less
 
mr5
wow. your company is paranoid
 
4:17 PM
I work for a bank. They tend to take this stuff seriously
 
mr5
okay. the image is basically wiet's avatar with numbers on it displaying the average, median, min and max of RGB
 
hmm ok
 
he wants to know how much green is in the image
 
mr5
it says:
R: { avg: 75, med: 52, min: 0, max: 255 },
G: { avg: 193, med: 217, min: 0, max: 255 },
B: { avg: 86, med: 72, min: 0, max: 255 }
 
well that's relative.. if you have green and red, you don't have green, you have brown
 
4:20 PM
don't you divide avg by max
 
mr5
that's what I thought also
but I may be wrong
 
you can't really know purely on that information
you'd have to look at the percentage of pixels whose primary component is green, and red and blue are below say 5%
 
mr5
how would I do that?
 
well either you have all the pixel data or you don't
 
wait wait wait
 
4:22 PM
@RoelvanUden but it is 😬 😬 😬
 
avg is the color it is now
 
I mean, i'm probably setting myself up to fail here
but so far, the none puppeteer part of this file is
const puppeteer = require('puppeteer');
const fs = require('fs-extra');

const bColors = {
    HEADER    : '\033[95m',
    OKBLUE    : '\033[94m',
    OKGREEN   : '\033[92m',
    WARNING   : '\033[93m',
    FAIL      : '\033[91m',
    ENDC      : '\033[0m',
    BOLD      : '\033[1m',
    UNDERLINE : '\033[4m'
}

const args = process.argv;
const dataFile = args[2];

if(typeof dataFile === 'undefined') {
    console.log(`${bColors.FAIL}No data json file has been specified${bColors.ENDC}`);
    process.exit(1);
 
so add up all the avgs then the percentage of green is 75/total
 
mr5
41.00%	 #34D544
20.11%	 #7CEC92
17.85%	 #198614
12.17%	 #D0F7D8
8.87%	 #103509
another info
 
relative to the other colors in the image
 
4:24 PM
I'm confused, we talking about an image here or can the colors only be green red or blue?
 
mr5
Cuz Wiet says he's 90% green
 
@mr5 because none of that is strictly green
 
mr5
We're talking RGB here
R: %, G: %, B: %
 
well again, a pixel is green only if the green percentage is dominant
 
sorry i typed wrong it would be 193/total
 
4:26 PM
which is to say, red and blue have to be low and green has to be high
if I told you I got the averages of all red green and blue values, and told you they were 50% 51% and 52%, could you tell me with any confidence how blue the image is?
it has blue, but it could also be mixed in with red or green
so the image itself may not have royal blue color in it
 
26 mins ago, by mr5
user image
Wietlol's alter ego
his opposite dark side
 
I thought his later ego was blue
 
no, that's his android copy
 
mr5
later ego haha
 
You learn about that in Wiet the Ego
 
4:29 PM
wiet did avg/max
 
mr5
@Neil oh shit you're right
 
alter ego here was introduced in Wiet Adventure 2 as the mysterious lion who could chaos control with a single emerald
 
mr5
so, how did wiet came up with his statement that he's 90% green?
 
we were talking about political parties
 
he's trying to say he's a n00b
 
4:30 PM
the image is 90 percent the total amount of green that could be in the image
 
or you could say it was about political parties, but I prefer my own interpretation
 
mr5
wtf does being 90% green means in political context?
 
hilter
 
90% chance he's in the green party
 
mr5
so there's left and right wing
so you're telling me there's RGB too in politics?
 
4:32 PM
2 hours ago, by AlRey
oh yeah and this was after they made me take some political test that said I was like 83% socialist, 14% republican, 80% green, and a few others; basically after that one of them unironically said I should be executed
 
@mr5 no, but there's a RBG
 
mr5
@AlRey I don't understand any of those lol
 
well communists are red.. democrats are blue.. the green party is well, green
 
the test also said I'd be mostly to vote for Pete Buttigieg....sure maybe if the guy wasn't a robot
 
facists are black
 
4:33 PM
@CaptainSquirrel what you on about rat
 
they all have colors
 
mr5
Are those words often discussed in your place?
 
@Harry you appeared shortly before i sent that message, insect boi
 
like 80% chance I'd vote for Buttigieg, 76% Yang, 75% Sanders, then 70% Booker, but he's gone
 
@CaptainSquirrel i clicked the chat tab by mistake
i meant to click SO
not SO Chat
 
4:34 PM
but you're here now
 
@Neil I'm pretty sure most fascists hate black people
 
mr5
@AlRey why is this very intriguing from where you are?
 
don't leave us
 
@mr5 what do you mean?
 
mr5
I'm sorry. Our education system is very out dated.
 
4:35 PM
@AlRey I suppose you're right
 
why would fascists hate black people?
 
fascism and racism usually go hand-in-hand :P
 
mr5
@AlRey why would someone tell you that you need to get executed for having your own opinion?
 
@mr5 because they were fascists
a lot of them were the same people who were trying to convince me to stop being bi
 
mr5
How did you even came up with percentages?
 
4:36 PM
I don't think we're using the word fascist correctly
 
mr5
Also, what does those percentages means?
 
technically fascism is about suppressing the minority
the "minority" being whatever you want it to be, not necessarily racism
though there's a very close association between the two
the people pushing for such things rarely are the types of people that aren't racist
 
@Harry I See how it is
are we not good enough for you
 
no
 
they meant I'm 83% to vote socialist
 
4:38 PM
Well then, I'll tell Megan about your rudeness @Harry
 
she knows
dont worry
 
mr5
@AlRey what does socialist means in layman's term?
democrats, socialist, republicans, liberals, fascist are jargons first time I heard in this room
and I have little to no idea what those words means up until now
 
@mr5 socialists want the government to handle the economy and means of production
 
a socialist is someone who believes the government should be heavily involved in economic concerns, including employment (most working citizens would work for the government, in other words)
 
mr5
4:41 PM
yes! go socialist
powerful government like USA
 
has nothing to do with power
 
-cringing-
 
mr5
what are the other options?
also, is being a democrat pro democracy?
 
no
 
wait controlling the means of production is communism
 
4:43 PM
democrats believe in strong centralized government
 
mr5
oh. not good
 
republicans believe in weak centralized government but strong local government
 
mr5
somehow good
 
@CupOfJava They're cousins, but it's not the same
 
mr5
so republicans is like a federal government?
 
4:44 PM
I don't think it's socialism
 
communists believe everything should be owned by the government and should be distributed
 
59 secs ago, by Neil
republicans believe in weak centralized government but strong local government
lol
 
by your "lol" I assume you agree with me
 
LOOOOOL
omg no wtf xD
 
by your "LOOOOOL" I assume you agree with me heartedly
 
mr5
4:45 PM
why are you not agreeing with his definition?
 
because the republican party in my country constantly calls itself the "party of small government" despite wanting to put sanctions in place that would prevent freedom of expression
like how Trump wants to eliminate freedom of the press because the media hurts his feelings
 
because all parties are power hungry
 
Well I didn't say they are that, but that's what they're supposed to represent
 
or how my former governor (and now VP) tried to pass a law that would allow business owners to deny service to lgbt people based on the owners' religion
 
mr5
das not good either
 
4:47 PM
when the other guys say they're gonna do more federal stuff, at least they're honest about it
 
mr5
so it's like a religion now
 
@AlRey ok, so your definition of a republican is someone who's a corrupt asshole, did I get that right?
 
no, my definition of them is that they're the diet conservatives
 
......
what?
 
you're no more a republican if you're conservative than you are a democrat if you're liberal
 
mr5
4:49 PM
what
 
this.Clear();
 
5 mins ago, by Neil
Well I didn't say they are that, but that's what they're supposed to represent
ah well this sheds some light on it
yeah I was referring to the GOP as it currently is, not what it's supposed to be
 
ok, just figured we were talking about ideologies
party slogans and whatnot
 
ok I forgot they're not supposed to be the way they are; that's just the way they are x-x
 
not slamming the GOP
I must have misunderstood evidently
 
4:54 PM
wait, Neil why do you care. Don't you life in Italy?
@AlRey this is the national law
 
well I guess someone in my state changed it at some point and then a bill was introduced to change it back
 
the SCOTUS ruled on it
no the law he was trying to pass is the national law
 
wew the US is fucking stupid
 
user10864482
@juanvan found a way to change the directory index without affecting network by changing the order of operation; went from
copy to new location and rename
to
move with a rename flag
does the same but take much more less resource
 
Why is it that when talking to a non-programmer it's like pulling teeth to get (what I think is a) simple question answered about a single point of logic of how a process is supposed to work. I explain it again and again in the simplest terms I can think of but they don't understand what I'm talking about. And these are the people that decided how it's supposed to work! Did learning programming turn me into a fucking alien or something?
@AlRey Speaking as an American, yes. The US is fucking stupid.
 
user10864482
5:00 PM
@Hypersapien I use metaphor a lot , it helps
 
I remember someone actually compared my grandpa to hitler for saying the Indiana SB 101 bill was bad
 
user10864482
but yea, i see your point. How come a ba who know nothing about prog and process write the brd
 
@AlRey Masterpiece Cakeshop, Ltd. v. Colorado Civil Rights Commission
 
@AlRey. Hitler. Hitler, who put gay people in death camps. They said your grandpa was like that Hitler for saying companies shouldn't be allowed to deny service to gay people.
 
@Hypersapien why?
 
user10864482
5:04 PM
one MUST know that a conversation is going shit when hitler comparison is made
 
@CupOfJava Why what?
 
is it stupid
 
I'm being a bit disingenuous, all things considered; most other countries certainly have that kind of law in place, as well
 
Whoa wait that's official??
 
mr5
5:10 PM
Why is there a lot of Diablo versions
 
I had no idea Diablo 4 was confirmed
 
mr5
I learned there was d4 last december
and learned just now about this diablo immortal
I thought I played diablo immortal back in win xp
 
5:30 PM
@mr5 omg you don't know about Diablo Immortal xD
ohhhhhh boy
"don't you have phones/??"
 
5:41 PM
hello
can somebody tell me why git didn't clone the docs folder
git pull origin master says everything is up to date
the thing that I needed most didn't get downloaded, what the f
by the way i checked that .gitignore file
docs folder wasn't listed there
some Linus Torwalds tricks there ?
 
what is lenovo thinking? hahaha that caption + this pic?! :D
 
hmm
 
5:59 PM
Hello! This might be a bit of a weird question, but I really don't know how to search for it and thought maybe someone could help me with it. Is there a hashing algorithm that will have a unique result for 0?
I have multiple blocks of 4096 bytes each, and I want to determine as quickly as possible if one of them is only zeros, and I thought that a hash would be faster than actually checking every byte on its own.
 
Yes, but I was interested if there was some algorithm that guaranteed that only 0 could produce a certain hash. Otherwise I would have to check every byte to avoid collisions. It's of course better than nothing, but I was just curious if such a thing exists.
 
wouldn't that sort of defeat the point of hashing though?
 
guess what, the docs folder was mentioned in .eslintignore
what the hell, do i need to build the docs myself? wtf
ya okay, remove that line from .eslintignore and then git pull
 
6:18 PM
Not really, because I am not hashing for security purposes
I am only hashing so I can quickly get a result. As opposed to having to check every single byte, I can hash it and only check the resulting hash, which is considerably faster
 
6:53 PM
wat
 
@Crowley doing maths (hash) on 4096 bytes is faster than just comparing each byte to 0..?
 
Yes, my tests took considerably longer when I actually compared them as opposed to using a rather simple hash function
 
so your compare function is less optimized than the hash
 
Yes, I also tested in pure C and it seems that comparing takes longer than simple arithmetic operations
 
6:59 PM
byte by byte is not optimized...f.e. a 64bit cpu can compare 8 bytes at a time
probably 16 or 32+ with special instructions.
8, 16, 32x faster than byte by byte..
 
Hm, I need to check whether I can optimize the comparison then to be more concurrent.
 
find a function that is optimized to compare large arrays..
and possibly use more cores, sure.
memcmp() or something similar (?) will probably be optimized to use cpu word size comparisons.
"fastest byte array compare {some language}" ...other people have done it. use their work...or spend the next year studying cpus :p
 
Hi,anyone knows how to return a .Tolist() result in the actionresult of a controller
 
heyo, anyone here big on entity framework?
 
7:16 PM
posted on January 16, 2020 by Phil Haack

A few days ago, my daughter was in a real funk. It breaks my heart to see her struggle. Fortunately, I knew exactly what to do, “build a mobile app!”

 
@TomCrosman No idea how "big" I am, but I use it...which is more than not using it^^
Jack, justask
 
Aug 28 '17 at 15:53, by mikeTheLiar
Don't ask if you can ask, it creates an infinite recursive loop. Just ask your question. If someone is around who can help, they will.
 
@Fate Make the method return ActionResult<List<T>> where T is whatever is in your list. Then just return the list.
At least according to this Microsoft tutorial it should work.
Does anyone know if I can use SignalR without asp.net? I just have a core3.1 application and would like to not add asp.net dependencies.
*any more asp.net dependencies.
I know SignalR is in aspnetcore namespace.
 
ok sorry, my question is about interfaces (ISomething) with entity how to use it
basically i have a common class, that i want to use
that splits to more tabgles
 
That totally depends on how far you want to go.
I actually just implemented hiding my dbcontext behind an interface too, finding an actually ncie solution. If you advance that one, you could even hide the entities behind interfaces, I guess. Just a sec lemme get some screenshots.
So basically in the COnfigureServices, I first put the dbcontext in the DI by using the method supplied by EntityFramework itself, and then I "add another implementation" to the servicecollection, but tell it to basically get the dbcontext and return that:
I wanted to not reference the db stuff in my domain service, so I had to find a way to put an interface on the dbcontext.
This is my dbcontext:
Basically I only show the Shared types to the outside
You could do the same with your tables: keep the db stuff within, and only show your interface types to the outside
Although I do have to voice a concern: What do you mean with a common class that splits into more tables? This sounds a lot like unclean DB design.
(Disregard the ChangeTracker/Notifier action in the factory method, I'm trying out some stuff here)
 
7:39 PM
My boss has a warped idea of how long things take. She thinks simple things will take a long time, and she thinks complex things will take a short time.
 
And you can't stand up to her, so you're looking for a new job?
 
I have at least one prospect in the works
 
Where are you located? I know people around Hamburg.
(Our team for example)
 
Maryland, USA
 
Too far I'm afraid
 
7:58 PM
I'm trying to get a job at the place where my girlfriend works (same building/company, different department).
 
That's a braver thing than I would do
 
We've worked for the same company before. I helped her get a job at the place I worked a few years ago. It worked out fine.
 
It worked out fine between us. She hated the company, but she knew it was just temporary.
At the place where she works, she's in their Cyber Security department, and their programming department has an opening.
 
8:20 PM
half the starred messages are political
 
25% maths + 25% memes
 
8:31 PM
how do you manually map a relationship in entity on a property when it can't figure it out?
CreatedByUserId to User CreatedByUser
 
I think you directly put the User in the Model, and the Id field has [Key]
Could of course try db first, not sure how though
Wait lemme check I actually have a db with some linked tables somewhere arund here...
 
Ok here's mine:
There's a table 'Teams'. A Team has an 'Owner', which is a 'Player'. The property Owner in the Team is an int, linking to the Owner's Id:
 
take a look at the image i just put up
 
8:38 PM
is it because it's with in the base class?
DivUser inherits from DivBase
isnt there an attribute to manually map them?
 
A user with CreatedByUserId...what does the first ever user have there?
itself?
 
yeah
 
...hey that might actually work
 
but it's not working for me :(
 
I woulda said nullable int, but that works, too
 
8:40 PM
error =
"Unable to determine the relationship represented by navigation property 'DivUser.UserClaims' of type 'ICollection<DivUserClaim>'. Either manually configure the relationship, or ignore this property using the '[NotMapped]' attribute or by using 'EntityTypeBuilder.Ignore' in 'OnModelCreating'."
 
So whats a DivUserClaim?
 
its my relationship table between my table users, and my table claims
which built with out issue, but when i tried to add the relationship to my base class, it freaked out
 
No idea. Guess you gotta ask uncle Google then. Or hope Grace has an idea.
 
i think ur probably right, that its doing that math that the first ever user won't exist
and doesn't trust me to handle it
 
It looks like it's saying "I can't figure out how you want me to wire this up in the database"
 
8:46 PM
if i remove public DivUser CreatedByUser { get; set; } and public DivUser ModifiedByUser { get; set; } it will run
anyone know of an attribute to accomplish this basically:
[Map -> Table = Users.Id]
public DivUser CreatedByUser { get; set; }
 
stackoverflow.com/questions/43739709/… suggests that the issue is that you need a joiner table in between
because that's how you represent one-to-many relationships in SQL
 
9:12 PM
FFS how hard can it be to use a SignalR hub without mapping it to an endpoint?
Yeah I can't get it to work right now. Good night everyone o/
 
9:44 PM
this ended up being the solution to my EF problem i asked about earlier:
had to remove the required field and allow nullable, as you initially suggested squirrel
 

« first day (3379 days earlier)      last day (1562 days later) »