« first day (2326 days earlier)      last day (2624 days later) » 

9:04 PM
1999 everquest addict here. Enchanter all the way
 
my whole day messed up coz of weird keyboard problem ... sigh
 
french characters?
or did your keys not want to be subjugated by fingers anymore?
 
no, everything worked fine but all of a sudden R shift and L shift type 3 char instead of working
 
oops, this is the main C# room
 
hey guys could it be that my CPU is so slow that it doenst write a label in a for-loop?
 
9:08 PM
lol
 
@wouterdejong No. it's another issue
 
@RyanTernier then whats the issue?
 
@wouterdejong Until I see code I'll blame Kendall
 
im coding on an remote desktop
@peterpep haha sorta
 
@wouterdejong you work for siemens too?
 
9:09 PM
my R shift do mvx enter and L shift do nbz space
 
time to look you up in the SCD
LOL
 
i know the problem
where did that code go :(
 
oops just dox'ed myself
 
what is SCD?
 
I think this is the first time I've seen someone reply to a message that came in the future
 
9:10 PM
company corporate directory
 
you a contractor?
 
But you lose the formatting
 
@peterpep me?
 
9:11 PM
yea
 
@peterpep - Yeah, you wont really need jquery in that scenario
 
@peterpep nope
 
Unless you want to do something like client side validation
 
I LOSE NOTHING! Sublime to the Rescue (f-off NotePadd++)
 
interesting
 
9:11 PM
We work WITH siemens software
 
hahahaha
good luck with that
 
anyway, anyone got any idea why my label9 isnt displaying text?
 
your code is gone
repaste it
 
i repo
    public void MaakApprovedUpdatesLijst()
    {
        int j = 0;
        MessageBox.Show((""));
        foreach (var line in File.ReadLines(file))
        {
            j++;
            label9.Text = j.ToString();
            for (var i = 0; i < update.Count; i++)
            {
                if (line == update[i].Title)
                    SiemensApprovedUpdates.Add(update[i]);
            }
        }
    }
 
You're setting label9.text at the start of every iteration
First) Change the label name, ugh
 
9:12 PM
should i try to set it at the end?
ikr
 
If the last line is empty, your label is empty
You're showing a message box, and then you're going through a file so quickly without any user input
for example if you put a Sleep(1000) in there you'd see the label changing every second
 
will do that, thanks for advice
 
@RyanTernier no he wont
would need to be async to see changes
 
This is winforms
not web
Unless it is webforms then it's just a cluster f of badd
 
even if hes developing in winforms or wpf
 
9:14 PM
no
you are wrong, sorry
 
hes not going to see the UI update unless its async
 
just test it
 
using winforms
 
He'll see it. THis is all done on the UI thread
unless he's doing it outside,in which case he'd have to wire back to the UI thread to update the label, but I don't think he's doing that
 
oh, Sleep
hmm
 
9:15 PM
im testing it now
 
its a method thats gonna be called somewhere else
 
Go back to Sleep
 
Therad.Sleep will block the UI thread, which this is running on. So if that label is changing so fast to see, this will let you see it.

honestly, you should just put a breakpoint in there and see if it's updating
 
goto: Therad.Sleep
 
wend
 
9:17 PM
nope still didnt work
this happened:
 
this will only work if he makes it an async method
 
Is there anything in file?
 
it gave something like this:
kla
instead of "klaar"
 
@peterpep meh can do like background workers, and different threads if he wanted to
 
@SteveG yes background worker will work
but it cant be on the current thread
 
9:18 PM
in which file?
 
because it will block the UI from updating
 
ywa ywa
yes yes*
 
but it didnt show the counter
 
but you're right, async await may be better
 
background worker is fine (also easy to implement)
 
9:18 PM
i put the thread.sleep BEFORE the j++ and label.Text = j tho
 
you're making it more complicated that it needs to be
 
Is a background worker like a prep cook?
 
he needs this to be on a different thread than it current is on for the ui to update
 
idk what he's even attempting
 
he wants a counter to update a textbox
while hes going through a foreach loop
 
9:19 PM
yup
^
 
this is in a method
so when he calls that in main or whereever its going to block the UI
until the method completes
 
look:
 
so you will see it jump from 0 to whatever the last number is
 
well I'll be damned
 
9:20 PM
it was first the last picture
 
unless you either do async await or create a background worker
 
I just tried it. It's been a while since I did winforms...
 
@mikeTheLiar - No, because the background worker isn't holding the entire place up while it finishes making your fries and you were just there to get a freaking Arnold Palmer anyway but then somehow got convinced to order a small side and you only had 5 minutes.
 
and then when it came in the forloop it went to the above picture
 
loop up background worker
 
9:21 PM
lol who is arnold palmer
 
greatest drink on earth
 
@TravisJ if they're making your fries, they're not a prep cook
 
plus a great golfer
 
should i just post this? :P
 
@peterpep The man's a drink mogul, I'm sure he has lots of hobbies.
 
9:21 PM
create a background worker where youre calling this method @wouterdejong
 
is this hard?
 
no
 
so hard, omg
like, never seen such hardness
 
i kinda tired tho :P
 
@SteveG diamond hardness
 
9:22 PM
oh the background worker
idk i never made a background worker before
 
was thinking about doing to tomorrow
 
let me pull up an example of background worker i used
 
@SteveG funny, you said the same thing last night
 
so whats difficult?
 
9:23 PM
not difficult, but hard
 
!!lenny
 
( ͡° ͜ʖ ͡°)
 
making a background worker is like 10 lines of code
 
@mikeTheLiar don't give out our private lifes
 
9:26 PM
okay added the object
such progress
very work
 
Ahh I realized why it wasn't working
had to look at an older project. Use the the ugly method REfresh() on your label
so:
  int j = 0;
            int foo = 10;
            for(int i =0;i<10;i++)
            {
                label1.Text = i.ToString();
                label1.Refresh();
                System.Threading.Thread.Sleep(50);
            }
will update the label every time.
 
gonna try this
 
And @peterpep Was correct, you will need a background worker process as your main one will be taken by the UI. But you should see at least a single # at the end, the reason you're not seeing this could be:
1) File is empty
2) Label is too small (or hidden)
 
implementing backgroundworker is easy
heres example
actually my example is too big to show here
basically create the DoWork method
and a WorkCompleted method
 
this is what i have
Thread.Sleep((100));
nvm
copy apste doenst succeed
but anyway
@RyanTernier this worked
thanks Ryan
 
9:31 PM
the problem with this approach is your UI will be locked, so if a user is trying to click around it can cause your program to lock up
unless its on a background thread
 
i dont use threading
i think its a lot of work to make
 
change i to a larger number and try clicking around lol
 
maybe in a later stadium
 
ui becomes unresponsive and
will crash
 
i cant click anyway
its already stuck
 
9:32 PM
backgroundworker lets you click around on application
 
with the current code
 
We're all just clicking around
 
and not get stuck
 
damn kerning
 
ye, will have a look to it
maybe this weekend
gonna sleep now
 
9:33 PM
for background worker this is all you need
_fileprocessWorker.DoWork += new DoWorkEventHandler(fileprocessWorker_DoWork);
_fileprocessWorker.RunWorkerCompleted += new RunWorkerCompletedEventHandler(fileprocessWorker_RunWorkerCompleted);
just make the methods DoWork and RunWorkerCompleted
and youre done
 
i still dont get it
maybe if u online tomorrow u can help me
 
do you know what eventhandlers are?
yea im around
 
tbh, no
awesome
thanks, speak u tomorrow :)
 
cya
kieran isnt online right?
i was the one that starred his im an idiot post :3
after i solved his problem
 
9:51 PM
lol keyboard problem fix like it start ! for no fking reason :| just wanted to play with my head for a day :D
 
....I think you might still be having a keyboard problem.
 
lol if i got some grammar mistake or typing mistake tell me please, I try to fix :D
I can only think of 1 in my sentence that is having space before !
 
I'm honestly not sure what you mean by "keyboard problem fix like it start"
 
i am just lazy sorry :D I meant : "My Keyboard problem got fixed just like how it started in the first place"
 

« first day (2326 days earlier)      last day (2624 days later) »