« first day (2431 days earlier)      last day (2532 days later) » 

12:00 AM
no, there's no d in the method signature...
 
ok so it has to match
the signature
 
private void MyFunction(int a, int b = 1, int d = 5)
this would work with d
 
ok
i got it to work
but idk i felt like
it was no point
 
well if you have a function with many default parameters and you need to set a few it is very useful
but in that case you gotta wonder why the code is set up in that way
 
how would i print it out to 5 decimal placs
online i saw several methods
but they involved converting
into a string
is there a way to do it without converting into a string
 
12:06 AM
what are you doing with the decimal places?
 
nothing
just for displaying
 
if it's going to be output to the console, then you will want the string
because consoles display strings
 
oh yah
ok
i can do that
 
now you need to learn about string formats :)
 
how do i make my code show that i passed in a default para
result = PD.Divide(10);
by default the denominator is also 10
Console.WriteLine("numerator = {0}, denominator = {1}, result = {2}", numerator.ToString("N5"), denominator.ToString("N5"), result.ToString("N5"));
denominator doesnt show 10 tho
 
12:14 AM
what is printed
 
my earlier value that i gave it
which was 20
if i comment it out
it says unassigned
 
You can't distinguish whether the default argument is passed, or the user passed a value which happens to be the same as the default argument with the "default parameter" feature
use function overloading
 
yeah, unless you use reflection i guess
which you definitely do not want to do
        private static void Divide(int numerator, int denominator = 10)
        {
            double value = 0;

            if (denominator != 0)
            {
                value = numerator / denominator;
            }

            Console.WriteLine($"numerator = {numerator}, denomintor = {denominator}, output = {value:N5}");
        }
oh, it has to return the divided value, not print it
 
 
1 hour later…
1:54 AM
my prof told me There is NO data in the class that you will write
and i have to make a class
with a method
so i dont know what he means by no data
 
neither do i
where are you from
 
nvm i got it
its just as i thought
 
 
1 hour later…
3:31 AM
can someone tell me why i have this foreach error:
static void Main(string[] args)
{
//Creating an instance of the Circle class

Circle[] myCircles = new Circle[2];
myCircles[0] = new Circle();
myCircles[1] = new Circle();

foreach(int element in myCircles)
{
Console.WriteLine("Enter an integer radius:");

}

foreach (int element in myCircles)
{

}
}
i have my circle class defined properly
 
3:48 AM
Edit your code like to this :
foreach(Circle element in myCircles)
{
Console.WriteLine("Enter an integer radius:");

}

foreach (Circle element in myCircles)
{

}
@Brogrammer
 
ya i just got that
lol
but thank you
 
Can you help me ?
 
ya when i finish my assignment
 
I have column based representation .
 
 
2 hours later…
6:11 AM
posted on June 12, 2017 by Scott Hanselman

There's opinionated frameworks, and then there's opinionated frameworks that also respect your opinion. LLBLGen is one of those. For many years it's been a great entity modeling tool as well as an excellent ORM (Object Relational Mapper.) It also supports all major ORMs in the .NET space like Entity Framework, NHibernate, Linq to Sql as well as, of course, their own included LLBLGen Pro Runtime

 
6:35 AM
good morning
 
'morning.
 
how y'all doin'? had a good weekend i trust
 
Ooh, weekend. I vaguely remember that happening.
 
had to work ? or was it too short for your liking ? :)
 
Work weeks here start on Sundays, so I'm already well past the weekend.
 
6:46 AM
oh, that sucks, sorry to hear that
 
It also measn the work week ends on Thursday, so it's fine.
 
well, there's always a positive side to things i guess
 
gues who's back
 
ohayou
 
@Nerdintraining back again ?
@Nerdintraining Nerd is back? Tell a friend?
 
6:58 AM
Hallou mis amigos
 
@AdiMohan Gues who's back gues who's back gues who's back dadadadada
 
now i feel like i have to "bust a rap up in here"
 
^^
So a bit off topic - diary rant:
I was away for the weekend on a festival
and when i get back i am sick and have to stay at home for one week
win win situation right?
 
aye :D
 
7:03 AM
what kind of festival?
 
We moved up one floor and i was supposed to sit by the window much happiness
but my boss decided to just jam in and take my place while i am away so i couldn't fight for it
Now i am a sad trainee on the wall side of the room.
+ i had to find everything that belongs to me eversicne it was scatterd around the new offices
@KamilSolecki Rock am Ring, it's like pop and rock.
 
festival = cool
work stuff = not cool
^^
 
ya
well the festival got abborted the first day like half way through becaus of "a security issue"
baisically there was someone working there with connection to ISIS
 
hi
 
soooo Rammstein didn't end up playing wich is a big bummer but some other bands managed to play on the other days
 
7:10 AM
Rammstein always put on one good show
 
@Nerdintraining das sucksen.
 
Ya I've seen Rammstein live bevor in Hamburg
they are superb
If you ever get a chance to see "Bonaparte" i encourage you to do so.
They party hard on stage, it's super!
 
as for me I was in a martial arts weekend course (not sure if that's the right words), was bare torso most of the time without solar cream, now I'm a walking sunburn.
 
did you catch any sexy boys? @satibel
 
xD red like a lobster ?
 
7:17 AM
@AdiMohan yep, and it f*&ing hurts.
 
I got sunburns once, over 15 years ago, and they were 2nd degree or something like that, it was bad A.F.
Ever since that faithful day, I've not let the sun see my back for more than 15 minutes
 
@Proxy nah.
 
a shame
 
@satibel may we cook and eat you?
 
"fun" fact, did you know that too much exposure to the sun is harmful for you/your skin and can actually cause cancer if exposed for a long time? (especially for caucasians, not having a dark pigmentation is not in our best interest)
 
7:21 AM
@Nerdintraining mein teil?
 
@satibel i always understand "Mai Tai" when they sing it
 
@AdiMohan for me it's only a 1st degree burn, so happy happy ouchy ouchy,
 
so people who go to solar places to get "an all around tan" are pretty....clever, let's go with clever. (natural selection is more like it but to each his own #Darwin)
@satibel hopefully you've gotten yourself some ointment to rub on the affected areas and even though it may sound retarded, apparently, using yogurt also helps (not sure exactly why, i haven't looked into it)
 
@AdiMohan it's hydrating the skin.
milk helps too, but is harder to apply.
 
I know that the wife used it once and it helped, cause she couldn't sleep at night from the pain
 
7:25 AM
Morn all
 
I was happy cause even though there may have been laughing when i went inside the pool with my T-shirt on, I was fine and dandy later on that day ! HA ! SUN 0 : ME 1
 
that 1 guy with the long sleeved t-shirt.
 
just imagine wearing yoghurt to a beach
smeared all over
 
"If it works, it ain't stupid" :))
 
stuck in your hair
everywhere
yoghurt
 
7:28 AM
uh, that's kinda' hot, crispy hot
 
I fear the day when I'll have to rub me some yoghurt
 
good yoghurtful morning
 
@ntohl good youghurtful morning to you as well my good man
 
Yogurt. A bit of dill and garlic. Then roast in the sun for a few hours until done.
 
7:29 AM
@AvnerShahar-Kashtan Hungry by any chance? xD
 
@ntohl o/
 
@ntohl Reminds me of "Space Balls"
 
Sensai!
 
7:32 AM
sen....SAITION!
^ very bad wordplay
probably my worst
 
it's good. I like it yo...
 
i like it!
 
Morn all
 
mourning
 
7:33 AM
It's a Sensai Sensaition for a diffrent world!
 
wiat wait wait
whats that reference from
i heard it\
which anime
there was something similiar in one of the openings
cant think what it was
 
@AvnerShahar-Kashtan Yogurt with St. John's wort and potatoes.
 
7:50 AM
If you are refering to this chat.stackoverflow.com/transcript/message/37572839#37572839 , then i have no idea @KamilSolecki
 
@RoelvanUden from what I understand, using 'react-dom' should only happen in clientside components, and not in the ones that are loaded serverside, correct?
 
Yeah.
 
8:30 AM
!!rogue
 
@KamilSolecki And yet again, the chat has descended into the depths of silence
 
Why does this page appear as "C chat room" on google? There's clearly another room for it
 
Because the URL isn't very sharp.
3
 
8:46 AM
lol
 
8:57 AM
senpai strikes again
 
switch {
case f():
	if g() {
		goto nextCase // Works now!
	}
	h()
    break
nextCase:
    fallthrough
default:
	error()
}
he he
this is go btw.
 
morning :)
 
morning
 
@satibel isn't go just another implementation of c?
 
9:09 AM
@SebastianL it's c-ish
 
morning
 
like java, c# and many more.
 
your starting to report in late in last time @SebastianL
 
It's actually remarkably less c-ish in its syntax than java or C#.
More Pascal-ish, to be honest.
 
@AvnerShahar-Kashtan mostly no parenthesis-es in the if and for, and := assignments.
 
9:11 AM
@Proxy here in germany the last week were holidays ^^
 
And the reversal of the type specifier and variable identifier from the C-derived, and frankly non-intuitive, <type> <identifier> to <identifier> <type>.
 
oh, and reversed types
 
when do you use go? i use c if i have to do some complex computations on the gpu or driver stuff
 
and I just noticed the lack of ;
 
is it the same for go?
 
9:15 AM
Go was designed to be a modern systems language, meaning a language that can be used in scenarios where C would be appropriate - where low latency is important, not necessarily numeric computations - but without the inherent lack of safety and other baggage that C brings along.
 
go seems pretty nice to use, because of stuff like return x,y.
 
Classic scenarios are writing back-end services, infrastructure like HTTP servers and so on.
 
go seems pretty cool :D
 
// Start three concurrent goroutines. Numbers will be incremented
    // concurrently, perhaps in parallel if the machine is capable and
    // properly configured. All three send to the same channel.
    go inc(0, c) // go is a statement that starts a new goroutine.
    go inc(10, c)
    go inc(-805, c)
    // Read three results from the channel and print them out.
    // There is no telling in what order the results will arrive!
    fmt.Println(<-c, <-c, <-c) // channel on right, <- is "receive" operator.
 
9:19 AM
multithreading is easy.
 
^ worth watching.
 
@satibel I will always be suspicious of any language or framework which claims to "make multithreading easy".
At most, it can make it easier.
 
@satibel what do you mean by this?
 
Also, the code you pasted isn't necessarily multithreaded, from what I understand. It's just asynchronous.
 
"A goroutine is a lightweight thread of execution."
 
9:23 AM
@satibel what about concurrent datatypes?
 
But they don't map to OS threads. I think they're similar to C#'s Tasks, but I'm not entirely sure about that.
 
are those present or do i have to code them myself
 
you make a channel, type go myfunc(channelVar) and then get the result by using <-channelVar
maybe simple would be better than easy.
 
wtmfg!
the drawing style reminds me of kickers
 
9:25 AM
Tsubasa?
 
If you like that drawing style, but in a modern shell, check out Cross Game
 
@RoelvanUden well, it's easy to do multithreading, not always the best solution, but easy to do.
 
Multi-threading can be incredibly complex. I would never ever claim it's easy. Sure, if you pick the right architecture, it can be easier and relatively okay
 
if locks are taken care of, it's pretty straightforward IMO.
 
@RoelvanUden You'd be suprised If you saw my actual wierd / disturbing YT vid collection.
I have some nasty stuff
 
9:33 AM
@satibel It's knowing what and when to lock that's important.
 
@KamilSolecki like "House of air"?
 
@KamilSolecki don't hug me I'm scared.
 
@Nerdintraining ye this one is just plain weird
 
It's down from yt now.
 
@satibel Be careful or ill do the thing!
 
9:34 AM
"Only" lasted one week
 
lasted gets a different meaning in context of just this sentence, when talking about that vid @Nerdintraining
don't worry, im not judging
:D
 
@KamilSolecki i don't get it^-^
 
lmgtfy.com/?q=do+you+last+long - look at the top results
wait im retarded
I read it as
"I did not last long"
nevermind me
 
@satibel That's like saying "If gravity is taken care of, flying is pretty straightforward".
Yes, multithreading is relatively straightforward for the subset of problems which can be addressed with pure functions without interlocking side effects. That's why FP has been enjoying such a renaissance in recent years.
 
@AvnerShahar-Kashtan FP?
Functional Programming?
 
9:43 AM
@satibel Yes.
A paradigm which explicitly encourages decomposing your code into pure methods with no side effects, which can be easily parallelized.
And memoized.
And otherthingized.
 
still better than Semi-Functional Programming or non-Functional Programming. :p
 
10:00 AM
!!xkcd 1790
 
yaay. Easily paralellized SKIP function
 
Out of curiosity, how do I pass a value from a grid cell inside a picture box?
does it work?
 
@AdiMohan You blit the pixels into a buffer and build a bitmap from it.
Or, in other words, I have absolutely no context to understand your question.
 
10:04 AM
ok, sorry, I'll try to be more explicit
 
Although it sounds like you are still trying to take information from view without any mediator inbetween
 
so, i want to insert a code (composed out of 10 characters) into my picture box that will be printed with some details
and that code varies each time
wouldn't making a method with one param (string param) be useful? and have that string passed into the picturebox paint event
 
Take another step back.
WPF? MVC? Borland OWL on Turbo Pascal?
 
Winforms
 
Also, you want to take a string and draw it as an image?
 
10:07 AM
yeah
 
as far as I remember, your grid takes values from sql right
 
the string needs to be drawn into the picture box
@KamilSolecki yeah it does
 
I told you few days ago that you introduced yourself quite a problem generator
without having any structure that actually holds the values AND then passes them to the view
you now are forced to make weird workarounds to grab stuff from the view OR query the DB directly everytime you need those same values to be reused somewhere else
If I were you, depending on the size of your project, would still rewrite that part
 
@KamilSolecki may the force be with you!
 
@Nerdintraining the force is within me as much as it is within you, my young padawan.
 
10:10 AM
@KamilSolecki The force is weak in this one.
:P
 
so much force xD
 
@AdiMohan 9001N
 
@AdiMohan You should just stop right now, create a new layer of abstraction (like a ViewModel if WPF or whatever would be the equivalent in winforms) and pass data through
 
I 2nd that.
and you get the bonus of being able to change db with minor changes.
 
10:51 AM
@satibel OVER 9000
 
user7442629
Guys is there some way to invoke a method whenever any property in any class instance changes?
 
user7442629
I have a class that contains multiple lists, and I want it to recalculate a value whenever the properties for any item in any list change
 
@Aleksbgbg Do your list items implement INotifyPropertyChanged?
 
user7442629
Yes
 
You'll have to manually hook up to the PropertyChanged event in all list items.
Use an ObservableCollection so you can hook up to the CollectionChanged event, catch all adds/removes from the list, and register or unregister to the PRopertyChanged event accordingly.
It's a bit of a pain.
There might be 3rd party classes that do it automatically.
 
user7442629
10:58 AM
Yeah I guess it's a bit tedious, I'll see for some 3rd party classes or just do it myself if I can't find any. Thanks, I didn't know about the CollectionChanged event!
 
ObservableCollection implements INotifyCollectionChanged, which raises the event whenever the collection is added to/removed from/cleared.
 

« first day (2431 days earlier)      last day (2532 days later) »