« first day (2043 days earlier)      last day (3128 days later) » 

21:00
@AndréMarques now after you do that, what does it do?
it inserts instead of name,1,1 inserts name,2,2
@AndréMarques so now there are two seperate rows of name,2,2?
@Michael no its only one row but the values are duplicated
@AndréMarques So what does the row look like now?
@Michael when i insert second row it double their int values
21:05
@AndréMarques send a picture
@Michael i will insert PC,1,1 after name,2,2 and then again name,2,2 and i will send pic
@AndréMarques okay so to get that result what exactly did you type in? (in order)
1º PC,2,2
2º Name,2,2
3º Name,2,2
@Michael
21:10
So at which point did 2º Name,2,2 change to 2º Name,6,6?
was it when you did 3º Name,2,2?
yes
because
when i sinert Name,2,2 in grid appears Name,4,4
?
nevermind
@AndréMarques I see the problem
Its the If else statements
how should i have it then
@AndréMarques I have to leave now, I dont have time to tell you the exact code to fix it
but I will tell you the problem and you will be able to change the code
@AndréMarques actually this will fix it:
@Michael thank you for helping me
21:18
@AndréMarques are you allowed to use linq?
@Michael nop :s
I remember a client like that
Some manager read something or did a shitty experiment on his own that said using Linq decreased performance by 0.0005% , and so "ZOMG We need to stop using Linq!"
@AndréMarques this is very very bad coding btw lol
Like... the way you guys are handling everything.
@AndréMarques please try it out real quick and let me know if that works
@AndréMarques oh wait..
shit hold on
@Michael ok :s
@AndréMarques I think I had an extra curly brace in there
I just fixed that
21:27
row.Cells[0].Value.Value.ToString()?
@AndréMarques typo
ugh
hold on
@Michael its has an extra .value right?
yeah
@AndréMarques did that work?
I found about 100 nerf darts in and around my desk, lol
@Michael nop gives error now
21:30
What error?
@AndréMarques its probably a syntax error, Since I did that all in gist on the fly
Object referen was not definedd as an instance of an object (the error was not in english i translated it)
@Codeman - Waiting for the build to compile? :)
@TravisJ I got my entire 3 week sprint's worth of work done in 3 days
@AndréMarques did that work?
21:34
@Michael u removed the for i so we cant use variable i
@AndréMarques use row.index instead of i
and i cant do row.cells
the object does not contain definition
@Codeman - Sweet. That is like nascar speed
lol this is hard to do without using VS
I cant possibly catch any of these mistakes
cant use row.index
the object does not contain definition
wait
nevermind
21:41
@Codeman - Is tonight the dinner?
error Object reference was not defined as an instance of an object
@TravisJ we went last night. I had rainbow trout. It was yummy.
@Codeman - Congrats :)
Hey everyone. I need help. How do I run a task that changes values in another thread?
@AndréMarques okay this works
I literally just rebuilt your program on my computer
21:45
@betarunex - That is a little too vague, can you offer a small example or some expansion of the situation
@AndréMarques work for you? because It worked for me
@Michael YES OMG
YES
THANKS
REALLY MAN
:30679796
public int testValue = 0;
        public MainWindow()
        {
            InitializeComponent();

            Task t = new Task(() =>
            {
                testValue = 1;
            });
            t.Start();
            // this.Dispatcher.Invoke(t.Start);
        }
THANK YOU
@Michael THANKS BRO
@AndréMarques np. its really shitty code though.
21:47
@Michael thanks for the help
no problem
@betarunex - That code works as written to me, what is the problem?
@TravisJ Yea I see that one works. let me just write up another example of where it fails to work quick.
public int testValue = 0;
        public MainWindow()
        {
            InitializeComponent();

            Task t = new Task(() =>
            {
                for (int x=0;x<1000;x++)
                {
                    var margin = RectObj.Margin; // throws error "The calling thread cannot access this object because a different thread owns it."
                    margin.Left++;
                    RectObj.Margin = margin;
                    Thread.Sleep(10);
                }
            });
Ok there. from a wpf. I'm just trying to move the margin. But cant access the object from another thread. How do I fix this?
22:03
Oh awesome. Nevermind. I found out how to get it to work. Needed to invoke it from the new thread. Works now
@betarunex - Nice :)
@betarunex - I was looking at that too
@TravisJ This works now, but is this how it's meant to look? I feel like I'm doing something wrong here or not the proper way
public int testValue = 100;
        public MainWindow()
        {
            InitializeComponent();

            Task t = new Task(() =>
            {
                for (int x = 0; x < 100; x++)
                {
                    this.Dispatcher.Invoke((() =>
                    {
                        var margin = RectObj.Margin;
                        margin.Left = testValue++;
                        RectObj.Margin = margin;
                    }));
                    Thread.Sleep(10);
Ignoring the logic of what I'm doing, and focusing more on the structure of that code. Looks a little odd. creating a task using a lambda expression, then invoking a method by using another lambda expression.
@Sippy - That was unfair of me, sorry.
user47589
o/
22:10
\o
@Amy o/
user47589
the weekend is finally here
user47589
thank odin
@betarunex - I am not sure, I haven't used wpf very much at all
@TravisJ Well that should be similar to even a console task right? I'm just using wpf coz i noticed it in that.
22:15
@betarunex - I tend to use Task.Run, but I think that using .Start is just a slightly more verbose version.
@betarunex - As far as the invoke, that seems alright? ish? I didn't see anyone warning off of it. Only thing I am unsure about is the thread.sleep
@betarunex In general, new Task is considered an anti pattern
Yea thread.sleep is fine. That was just to see if it was working. Coz I tried using an action which is pointless considering it ran on the same thread anyway.
better to do Task.Run
that being said, doing a task that does nothing but call Dispatcher.Invoke will just block your UI anyways
@ReedCopsey ok thanks. Updated it without creating t as a variable. any other tips? Like inside the task?
    public int testValue = 100;
    public MainWindow()
    {
        InitializeComponent();

        this.Execute().FireAndForget();
    }

    public async Task Execute()
    {
        for (int x = 0; x < 100; x++)
        {
            var margin = RectObj.Margin;
            margin.Left = testValue++;
            RectObj.Margin = margin;
            await Task.Delay(10);
        }
    }
22:18
@ReedCopsey yea I noticed. but if I have a for loop and have the invoke insoide, it works fine?
you'd need a "FireAndForget" extension method
but much, much simpler/cleaner
FireAndForget? What exactly is that?
something to start a task method and say you want to ignore it
    public class TaskExtensions
    {
        public void FireAndForget(this Task task)
        {
            try
            {
                await task;
            }
            catch (Exception e)
            {
                // log exception here?
            }
        }
    }
there - simple implementation for you
(if you don't do that, the compiler will warn you that you "should have awaited the method")
Doesn't FireAndForget need to be marked as async?
Sorry. I just learnt about this stuff this week. I dont see what exactly that's supposed to do? Any site that explains that stuff? Just in an overview. no in depth detail needed
****Pointless message****
22:25
@betarunex - You can press the up key to edit for 2 minutes after sending a message
@TravisJ Yes, good point
@TravisJ Oh kewl thanks. didn't know that.
teach me to type it into the chat window :p
@ReedCopsey - Sorry, I am not sure I know anything you don't :)
hahahaha
22:27
So is the flag on Nicolas invalid?
I wanna go home but traffic is already awful and it's only 330pm
22:53
shouldn't live&work in a big city then :^)
well, that was fun - just got my largest open source PR ever merged
love a PR that changes 1683 files :p
lol wow, that is a big change
was it a regex replaceAll? :)
sort of
custom script that went through and cleaned stuff up
@ReedCopsey Did the madness set in around merge conflict #782?
though I couldn't figure out how to do it with regex - I'm sure it's possible, but ...
nah - no conflicts ;) merged cleanly
23:03
@ReedCopsey - I had to regex my whole project once to replace a deprecated repository implementation once. It was creepy but successful
I'm no good with regex
sure it'd be possible to have done this with a regex instead
turn my 50 lines of F# into 20, with one 8938493 character long regex in the middle :p
23:33
@ReedCopsey PR link?
oh, in docs. neat
that in properly big :P
yeah - my ugly mug is now on >95% of the F# docs as a contributor
23:51
hah
> Sorry, we could not display the entire diff because too many files (1,683) changed.
finally, the weekend time
o/

« first day (2043 days earlier)      last day (3128 days later) »