« first day (3422 days earlier)      last day (1525 days later) » 
02:00 - 12:0012:00 - 23:00

mr5
2:06 AM
wtf did I just paste into this curse land
lmao xD
it's NSFW
 
user12960916
Hey @mr5 are you free to help on a question?
 
mr5
as long as it's not CSS and VB.NET and EF and ASP, I'm good
 
user12960916
It's about Windows Forms, I have a to make a matrix and I'm having trouble getting the diagonal elements in my array
 
user12960916
private void btnMakeMatrixB_Click(object sender, EventArgs e)
{

int rows = Convert.ToInt32(txtMatrixBRow.Text);
int cols = Convert.ToInt32(txtMatrixBCol.Text);

matrixB = new double[rows, cols];

// Declare a random
Random autoRand = new Random();

string s = "";

for (int i = 0; i < matrixB.GetLength(0); i++)
{
for (int j = 0; j < matrixB.GetLength(1); j++)
{
//Get next random and put in matrix
matrixB[i, j] = autoRand.NextDouble() * 10.0;
s += matrixB[i, j].ToString("N1") + " ";
}
s += "\r\n";
 
user12960916
I have this code that I want to reuse to get the diagonal elements to be 1's and the rest 0's in my matrix to make it an identity matrix
 
user12960916
2:11 AM
I'm not sure how you get just the diagonals though
 
mr5
ctrl+K to format
try again
 
user12960916
Wait how do I edit again?
 
mr5
10000
01000
00100
00010
00001
like that?
 
user12960916
yeah
 
mr5
so like this
you loop in your array, row by row
you increment the column every row
that's it
 
user12960916
2:16 AM
Oh that's it? I thought I'd have to do it one number at a time
 
user12960916
thanks
 
mr5
wait, lemme search about jagged vs multi dimensional array
I actually am not using those data types
ugh fuck it. can't understand
 
 
2 hours later…
Rob
4:27 AM
@mr5 Multi dimensional arrays are rectangles, if you draw it out on paper
Jagged arrays end up looking like a bar or column chart
 
 
3 hours later…
7:07 AM
Hey
 
7:33 AM
morning
boring friday at the office
 
yes hector
very boring
 
is everyone on vacation?
 
8:00 AM
nope, Chuck Testa
any of you C# Microsoft addicts know how I can dynamically execute a script that sets some linux shell variables?
 
8:17 AM
Hmmm C# and Linux, you feel brave today don't you
my god, the office is a pain in the butt
chair without head rest
single screen (vs 4 screens at home)
desks are 10 cm too low
no kitchen
 
I still need to make an application cross platform, but it currently uses cmd.exe scripts
 
@HéctorÁlvarez Is there carpet on the floor?
 
good morning yall o/
 
Shit! I just realised my chair doesn't have a head rest!
Every other chair on my bank of desks has one!
And I never even noticed
 
8:37 AM
cant code while head on rested
 
So I heard Hector is looking for a new job again
 
no, next week is that time of week again
 
Ah, right. I'm on vacation, I can't time right now.
@littlemisscomputerscientist Because his current job seems to be in a horrible office.
Also it's a running gag here that Hector basically seeks a new jobs every few weeks.
 
@Squirrelkiller what's wrong wit the office? hahahah
 
8:49 AM
Desks 10cm too low? That shit wouldn't even fly in germany.
 
what is "too low"?
dont you use floating keyboards?
 
You should be able to sit in an erect position and then have your joints in 90° angles
Desk 10cm too low is bad for your back
you'll sit hunched over all the time
 
I literally can't sit still, I am constantly tucking mu leg under me, left one, then the right one, then flat on the floor, then crossed at the ankles out in front, then cross legged squeezed between the arm rests.
 
Why can't I see c/ ? I'm confused.
 
8:53 AM
@BlackSquirrel no
 
WTF? There's no carpet ?
 
@Squirrelkiller what
 
WHat is it, bull rushes?
Bare earth?
 
What are bull rushes
Sounds dangerous
Anyway, we have parquet
I love parquet
 
Bulrushes is the vernacular name for several large wetland grass-like plants in the sedge family (Cyperaceae). The name is particularly applied to several sedge family genera: Cyperus, the genus which includes the plant species likely referred to in the Biblical account of the Ark of bulrushes Scirpus a genus commonly known as bulrushes in North America, which in previous circumscriptions has also included species now classified in the genera: Blysmus Bolboschoenus Scirpoides Isolepis Schoenoplectus TrichophorumOutside of the sedge family, the name is used for Typha, a genus in the family Typhaceae...
 
8:56 AM
@Squirrelkiller in my case I slip down and sit at about 45º, more comfortable than hunching down on the laptop
 
I can't spell that's the trouble
 
China send miliions of ducks to pakistan for locust disaster
 
I knew an old woman who swallowed a fly...
 
considering it is China, they should send people, they are much easier to come by in there
 
Reported that duck eat 200 locusts per day
 
8:59 AM
hmm...
 
So will they take the ducks back afterward? Or send foxes next?
For the duck disaster
 
it is all a cruel plot
they will send Corona to fight the ducks
 
they maybe just maybe eat them :(
or cause another serious species invasion that broke another food chain again
 
9:19 AM
if return type is base class type
can I return the derived class?
 
derived the base class then yes
 
like
abstrac class A
B : A
B adds it's own methods
 
@Shad you can't call methods unique to B without casting, but yeah
 
I have a method
A methodName()
can I return B?
 
yeah.. if B derives from A, then B is a type of A
 
9:23 AM
:)
 
If Dog is a derived class of Animal, a dog is a type of animal
 
but dog can bark()
I am confused with variance and covariance stuff
A a = B b();
a.bark()?
 
@Shad only a Dog can bark
you can do this technically but you shouldn't
 
Animal animal = new Dog();
animal.bark()
 
you'd be violating Liskov Substitution Principle
 
9:25 AM
invalid syntax
 
!~>{
static object Main(){ return Meow().BaseString; }
static Base Meow(){ return new Foo(); }
class Base{public string BaseString="Ironman"; }
class Foo:Base{public string Bar="Suporman"; }
}
!=>"Ironman"
!~>{
static object Main(){ return ((Foo)Meow()).Bar; }
static Base Meow(){ return new Foo(); }
class Base{public string BaseString="Ironman"; }
class Foo:Base{public string Bar="Suporman"; }
}
!=>"Suporman"
 
V.7
@Shad .. = new Dog()*?
 
yes
 
can every animal make a sound?
 
it's not about that
 
9:27 AM
@Wietlol Heartbeat
 
V.7
@Wietlol Everything vibrates
 
just what Neil and nyocning are saying
 
ye... I mean without like... stamping on the ground or stuff like that
like... a dog barks... but what sound does a spider make?
 
you want to be able to call on Animal for everything you require from the derived class ideally
 
or what does the fox say?
 
fox: hahahahaha
 
^
 
public interface IAnimal
{
    void MakeSound();
}

public class Dog : IAnimal
{
    public void Bark() { ... }

    void IAnimal.MakeSound() => Bark();
}

public class Main2
{
    public static void Main(string[] args)
    {
        IAnimal animal = new Dog();
        animal.MakeSound();

        Dog dog = new Dog();
        dog.Bark();
    }
}
this could work
but MakeSound would just be a no-op for animals that dont make a sound
the problematic thing is when you have a return value
no-ops still have to return something
 
you also wouldn't create a method Bark just to remap it from MakeSound
 
so, if MakeSound() would return a Sound... you need a null object for Sound or some other way
 
9:31 AM
public class Fox : IAnimal{
    public void Bark() { Play("Hahahahaha"); }
    void MakeSound() => Bark();
}
 
@Neil depends on the situation
dog.Bark() might make more sense than dog.MakeSound()
 
@Wietlol then dog shouldn't derive from Animal
 
sure should
derived classes have more details about their behavior, their names should be able to be more descriptive
while their contract should apply to everything
 
if you have a discrepancy such that the name of the method in the base class doesn't make sense in the derived class, then you can't really say that the derived class is a "type of" base class
 
it does make sense
but Bark makes even more sense
 
9:33 AM
this is a bad example, because a dog is a type of animal in real life.. in code we're using it as a metaphor
so in the context of code, it isn't said that a Dog is a type of Animal if you need to rename it
 
it is certainly a bad example, which becomes clear when you include cross breeds
but other than that... override and rename is a quite useful feature
 
I would say it is an indicator that you're not doing things properly
at least for renaming
override isn't really changing the signature of the base class
 
but overrides should be able to change the signature of the implementing function
as long as the implementing function is assignable to the base's type
I think C# still has a feature request for the type variance
 
you can't change MakeNoise() to MakeNoise(Instrument) though can you?
you can only change types to be more specific
 
hugs
 
9:39 AM
no, because you change the type from () -> () to (Instrument) -> ()
you could technically change the type from (Instrument) -> () to () -> () tho
or from () -> () to () -> (Instrument)
or from (Instrument) -> () to (BaseInstrument) -> ()
or from () -> (BaseInstrument) to () -> (Instrument)
Java has the variance stuff, but not the number of parameters/returns
which... isnt really a big deal
since you can just make the parameter and ignore its value
for return types... it might be a big deal
since the difference between void and Object is not allowed iirc
kotlin solved it by not using void at all
 
if it returns something you need to at least specify the type, don't you?
fun someMethod() : Any
 
except if it is inferred, yes
if you dont return anything, then you automatically return Unit (instead of void)
and Any is a subtype of Unit (iirc)
at least it is in Wietlang
(except it is not called Unit or Any)
 
Any of you guys from or near the state of Montana?
 
9:56 AM
\o
I had to sneeze 2 times yesterday
 
Corona it is!
 
No I am asking about Montana
 
:(
 
Hey all, back at work finally
 
\o/
/o\
 
10:04 AM
and my welcome back email? OInce of the directors decided while I was to change our payment gatteway
One*
so now I have to redo the the live website, cus y'know we'r eproper professional like that lol
so much for an easy friday
 
mr5
fucking Malthael
 
Hokkaido to declares state of emergency
 
its out of control everywhere by now
infections in germany also doubled within only 2 days
this is just the start of something REALY bad
anyway what can you do
of course stay home
and not leave the house
but that should be logic
 
I dont have to worry about a thing tho
 
good
 
;)
 
on a side note...
 
programmers: looking at colleagues
 
Do you guys seriously not remember SARS or bird/swine flu pandemics?
this is on par with SARS
with ~2% mortality rate
 
10:22 AM
did SARS spread equally as fast?
 
try not to watch the news, they want to scare you into staying watching/reading
pretty much yeah
was just as infectious
shit south park even did an entire episode on it
taking the piss at people over reacting, kinda like now
 
no remember. I was in primary school when SARS outbreak
 
the last real thing I remember was the bubonic plague
 
here, article from BMJ: bmj.com/content/368/bmj.m641
so it has claimed more lives in total than SARS
but has a slightly lower mortality rate
but a higher infection rate
 
@Hans1984 I have had so many dreams being in a post-apocalyptic area driving around my car and searching for my friends and food
 
10:27 AM
and they suspect the larger no. of cases is down to globalisation more than its higher infection rate
 
@MwBakker wow
those dreams are the best
I used to dream a lot more when i was younger
 
yes those were the best dreams but it required death and chaos. I am just very egocentric as it seems
 
or I should say, remember a lot more dreams
yeah but nothing wrong with beeing egocentric in my book
 
oh and fyi, face masks dont protect you, they protect others from you
 
@DAustin our news constantly claimed to be calm and compared regular flu's untill the beginning of this week where they now have livestreams and such
 
10:29 AM
well they also protect you if someone sneezes in your face
 
hand, no they wont
hans*
 
of course they will
because that way your mouth and nose is protected
 
think about it, if they could stop the virus getting in they would have to stop air getting in
 
the sober approach is gone, but that news station is state funded so it doesnt matter if they get more or less views. Also there is no economic benificial creating mass hysteria
 
yeh no, not how they work pal
 
10:30 AM
So I do not think the media is doing this on purpose
 
they'r edesigned to stop your coughs and sneezes blasting out into the air and infecting others
 
I think the virus is more bound to fluid
like spit
its not floating in the air
so a mask will help
 
they do not stop viruses entering your lungs from the air
well im talking about aribourne virus's in general
 
come fight me bro!
just kidding ;)
 
and if someone sneezed in your fce, it would just enter though the yes anyways
 
10:31 AM
@Hans1984 wasn't is declared airborn recently though
 
eyes*
 
you might be right, well washing your hands a lot certainly helps
 
only reason i know all this is because my brother is a vulnerable
 
ironically washing your hands with soap too much damages the protection layer of your skin, making you more vulnarable
 
and explained it to me
 
10:32 AM
but of course the only way to stay safe is to stay away from every human
 
its why doctors where them while doing surgery, to stop them accidentally infecting you with a cough
ultimately yes
self-isolation is best, avoid public transport
that's the most likely place you'll get any airbourne infections
 
Did IS already claim the virus spread or... ? I didnt hear from those guys in a long time
 
ha!
 
Because they have been eliminated
 
they'r etoo busy getting their asses kicked lol
 
10:34 AM
I said nothing
 
Why did IS never mess with israel though?
 
because their armed forces are psychos
 
@DAustin state funded media you mean?
why would state funded media care about views or hysteria
 
well I didnt know its airborne
thats even worse
hides in bunker
 
well airborn like 2m or such I thought I read
 
10:38 AM
I so much hate session based websites :(
 
starts playing 'Sessions' from the Offspring again
 
10:55 AM
Anyone has used AutoMapper?
 
@Hans1984 just mask gloves and glasses should do it :P
 
@Hans1984 poor doggo x)
 
well the helmet should keep him safe
not
 
I heared cyanide helps very well against the Corona virus
 
11:04 AM
cyanide solves all your problems
like doctor pepper
 
guaranteed to kill all corona virus in a body
 
@Shad ye
 
nasty stuff KCN
used it in a Grignard Reagent
apparently we each got given enough to keill everyone in the lab
so dont drop it
xD
gotta love Chemistry Lab technicians
 
anyone knows why this is happening
in one context when I hover over it is showing
Microsoft.EntityFrameCore.DbSet
and in the other file it is just DbSet
 
What usings do you have in the file?
brb
 
11:18 AM
@Shad do you mind?
 
never mind
I copied the usings
fixed
xD
 
11:39 AM
nice :D
 
02:00 - 12:0012:00 - 23:00

« first day (3422 days earlier)      last day (1525 days later) »