« first day (11 days earlier)      last day (4938 days later) » 

12:32 AM
anybody want to proofread something for me?
 
Like what?
 
I don't see any errors
 
thanks
 
Could do with a bit less links though in my opinion :)
 
12:39 AM
hehehe
they're easy to ignore
 
Especially ones you've linked before in the same post.
 
true
 
I don't know, I don't find them easy to ignore.
 
okay
 
Matter of taste I suppose, but eh
 
12:40 AM
I'll think about going through and paring them down a bit
did that a lot in that series, though - so I'd have to do it to all 19 posts ;)
thanks for the feedback
 
@ReedCopsey A purist eh? :)
 
could always do the schneier way and [link#] then just have a list at the end...
 
still shows lots of links then, though
 
Hmm, I like immediately seeing what a link refers to though
 
@Joren then put it in the alt text on the link
or make it reference the link at the end of the article
 
12:41 AM
it's tough - that's a 2 click solution
because you have to jump to the end, then link from there
 
Yeah, I'm not in favor of that
 
that's worse, to me - I understand not wanting as many links
but adding extra seems a bit much
 
But things like not linking to the Task Class msdn docs twice in two paragraphs
Or to the same blog post in the same span
Does cut down on the noise a lot
 
thanks Joren - I'll keep that in mind for my next set
 
Also, I don't know if that's just me, but I find underlines/blue for technical terms less than for sentence fragments
 
12:43 AM
going to start a new series later this week - I'll try to reign in the linking a bit
 
Maybe because the first sort is functionally a noun?
But well, my personal anecdotal experience is not in general something to go by :P
Interesting post by the way. For some reason – while I knew about OnlyOnFaulted and such – I hadn't made the connection yet that you could attach two tasks that differ only on that flag to get switching behaviour.
 
thanks
it's really useful
 
In fact I hadn't really considered yet what happens if you ContinueWith multiple times on the same Task
 
the state machine example in the last message is similar to some of the samples in the new P&P book
you can have as many ContinueWith statements as youw ant
which has its uses, too - it's like having multiple subscribers to a completion event
 
Yeah, it makes sense that it's possible
By the way, does nesting of tasks have additional overhead compared to appending them with ContinueWith?
That is, a Task starting another Task versus an external ContinueWith
Apart from that the ContinueWith makes more sense in most cases
 
12:50 AM
mmm - I think ContinueWith actually has slightly more overhead
because it requires a waithandle to be generated
nested tasks are scheduled right away
on the task scheduler
 
Yes, okay, they're not necessarily functionally equivalent
But if the parent task waits on its child
 
if you're waiting on the child task
you're going to be introducing a waithandle, too
so it's probably about equal, perf. wise
 
But wait
Isn't the ContinueWith only scheduled after its antecedent has completed?
Unlike a nested task?
I don't see a reason why Task.Factory.StartNew(() => 5).ContinueWith(t => t.Result - 2) must introduce a wait handle.
Of course Result can allocate a wait handle
But by that point it is already known that the antecedent has completed
 
one sec - let me check something
 
Of course in the nested Task case if you use RunSynchronously you also avoid wait handles ... but at the expense of making it even more convoluted than it already was, compared to the ContinueWith case.
 
1:06 AM
yeah - it's actually rather complicated
depending on the scheduler, and the options (ie: RunSynchronously), and what continuations you have
the task's execution can introduce a ManualResetEventSlim in this mix that gets waited on
since it's scheduled to run on the threadpool, the scheduler needs to know when it's completed
 
In the ContinueWith case?
Ah yes
But
 
even in the non continue with case, actually
but esp. then
 
But if you have a task that returns some value, then can't it synchronously tell the scheduler that it has completed, after it returns?
 
I think it could, but it would add overhead to the task, and make the scheduler have to handle things a bit more often
not sure
 
I could imagine the thread doing something like this, in pseudocode
Task task = pending.Dequeue();
task.Run();
task.ScheduleContinuations();

or something
But then again
Since the scheduler is not on the same thread
That's really not going to be any different
Except I've just hidden the ManualResetEventSlim.Set call in the ScheduleContinuations() method :P
 
1:14 AM
yeah
its not simple
but, at least in my testing, they've got it down to being very, very efficient
 
So I think the conclusion should be that it depends a lot on the scheduler in such a way that you can't really say there's a simple specific difference?
 
I wouldn't really worry about it
 
Fair enough
 
I'd just say "use the appropriate mechanism for the problem at hand"
continuations make sense at different times than child tasks
 
Yeah, that's what I tend to do anyway :)
 
1:15 AM
if a task is "logically" a continuation, I'd make it one
if it's logically a child task, I'd do that instead
 
But I'm still curious about any pitfalls I might be stepping into
 
at least that way it'll be maintainable
 
So far the answer has always been 'both ways work fine, so choose which one is more obvious'
 
btw - this thread is the only place I've seen mention of this and related issues:
 
I'm glad it's that well designed
 
Yes, I have come across that one as well
I was frustrated that the MSDN docs say basically nothing about when to dispose a Task
The general guideline on IDisposable objects is of course to always dispose
 
yeah, my rule of thumb is I only dispose when I wait on a task
 
But you don't always have access to a Task after it stopped running
 
so if I'm using task.Wait() at some point
then I'll call dispose
 
Yes, exactly
 
1:18 AM
otherwise, I don't worry about it
continuations make that worse - and it'll only get worse in the future
 
Sometimes you just have a fire and forget task, like StartNew(stuff).ContinueWith(t => UI.Invoke(update(t.Result))) or whatever
 
for most people, I just say "pretend Task isn't IDisposable"
 
And it's mostly impossible to dispose of that task in that case
 
(by the way - I never use UI.Invoke in a task...)
 
Why not?
 
1:19 AM
(I use the technique in my blog post... it's nicer since it's UI-agnostic)
which would be:
 
Let me check that again
 
Task.Factory.StartNew(Stuff).ContinueWith(t => Update(t.Result), TaskScheduler.FromCurrentSynchronizationContext());
 
Oh yes, the TaskScheduler
 
that way, if you later change from WinForms to WPF, for example, there's no need to change your task
from control.Invoke to Dispatcher.Invoke
etc
 
From your blog post I mostly took the TaskContinuationOptions info
 
1:21 AM
that was talked about in previous articles ;)
that post was #19
so it was just introducing that one extra thing
 
Yes, but that was what was most new to me :P
 
yeah
 
So I sort of misunderstood the point there. But I don't think that would have happened had I read your previous posts
Anyway
So which one of your posts explains how the FromCurrentSynchronizationContext scheduler works? :)
15?
 
yes
it was introduced there, I believe
 
But yeah, that is a pretty cool solution.
Wasn't familiar with SynchronizationContexts
 
1:27 AM
that's basically how Control.Invoke works
 
Another useful thing I learned today
Yeah, I gathered
 
Windows Forms sets up a SynchronizationContext for the main thread
so, in the main thread, SynchronizationContext.Current will be the UI thread in a windows forms app
WPF does the same thing using the Dispatcher
services in WCF can use this, too - which is really nice
it makes code very portable
 
And I like staying in the Task model
Did always look weird to start a Task that just calls Invoke, or worse, BeginInvoke
 
yeah, start an async operation that starts an async operation :P
Well, I'm heading out
 
1:43 AM
Bye then
 
Rye
joren and reed is on a heart to heart talk moment just a minute ago :D
 
What do you mean? :P
 
Rye
im just joking :)
 
anyone on here familiar with lisp?
 
1:59 AM
Superficially
Very active :P
 
sorry, i thought it was ))))))))
 
I think you're missing a few parens
Try two more, to start with
;)
 
Rye
2:22 AM
anyone here knows other winforms form load cool effects? I just only know two. The fade in and resizing form.
 
 
1 hour later…
3:28 AM
hello........ any body there............
helloooooooooooooooooooooo
 
hello
@Pramodh hello my friend
how are you today?
 
@DrTJ , Hi Dr TJ.............
mmm........ good
how about you dear???
 
fine... thanks...
namastey
 
namastey..........
 
Hello fellows
 
3:41 AM
@jangeador , hi.........
welcome
 
Thanks, I am ttrying this out, seems like fun.
 
@jangeador hi
 
@DrTJ , wat doing , friend??
busy???
 
ammm not so much
looking for some icons
for one of my projects
check this out: www.iconfinder.com
 
@DrTJ , ok fine
@DrTJ , www.iconarchive.com ......... how about this
 
3:46 AM
@Pramodh let me see how is that... ;)
thanks
 
@DrTJ , :-)
 
hi
any body here?
 
@kumar: yeah
 
Hello Shade how are u?
 
fine, thanks
 
3:47 AM
Can you help me out one of my issue?
 
@kumar , i'm
 
Thanks..
 
even if I can't, there are others who might :-)
 
0
Q: Displaying Custom Error page using asp.net mvc

kumarHello Friends, I am showing Custom Error in my page.. if somehting happend wrong. but if the same error occured in my subview master page I am not able to show the Custom error page on Entire page its showing me that Error page under subview master page. Please I am attching the Screen shot. Ca...

Please can you check this Post
:)
your right shade
 
Sorry, I don't know the answer :(
 
3:50 AM
:)
 
@kumar , i do not know asp.net............. sorry friend.
 
No problem Shade and Pramodh
thanks for looking in to it atleast
 
I have given your question an upvote
this is the least I could do :-)
 
:)
Thanks
 
:-)
 
3:53 AM
Hey Shade what do you do>
 
Currently I am working in Powerbuilder
 
Hey pramodh you too what do you do?
hmm
 
which is the worst language I have ever seen :(
 
Nice.. where your working Shade?
 
sw engr in reputed company.....
 
3:54 AM
I work in a software farm
 
Hmm my friends are working in power builder
they like it shade
Gr8
 
I don't like it :|
 
@ Kumar , wat abt you????
 
I am also working in software farm as a techinical lead
 
I like Java and C#
 
3:55 AM
Hmm I like Java too but I came in to .net
finally
:)
 
@kumar , mee tooo
 
where u r working Pramodh? USA or India?
 
India
you?
 
I am in USA Pramodh
which Company Pramodh?
 
Your native is India right?
 
3:56 AM
Yes Pramodh..
you which part of india?
 
south....
you?
 
Hmm ee too
Hyderbad?
 
Chennai
 
ohh ok
so which company u r working for pramodh?
 
yeah, C# and Java are both good
The problem with powerbuilder is that finding any specific help is difficult
You have to read the huge documentation
and the learning rate is pretty slow :(
 
4:08 AM
Yes agree with you
you will get lot of support for .net and java
 
yeah
 
but i am not getting answer for my quetion :(
 
wait a bit, you will get it :-)
I think it is night time in US
 
Yes
its almost 12Am
tommrow Morning i have deployment so working on that
I am all set to sleep now
:)
 
yeah, that's probably why it is taking some time
:)
 
4:10 AM
Hopefull up to morning I should get an answer
 
yeah
another problem with powerbuilder is that only two companies in my country use it for development as far as I know
and one is ours :(
 
where are you from?
 
I am from Bangladesh
 
Oops
 
4:11 AM
gr8 how much salry pay you get there?
 
around 500 dollars :|
per month
 
Sucks that life man
 
yeah :|
 
u r in office?
Hello Peter how are you
 
but you know this is considered high salary in our country :|
yeah I am at office
 
4:12 AM
?
Ohh my god
 
good that u r in good position
 
considering that I have graduated only a year ago, yeah
 
great
then why u r in C# chat list?
if you being powerbuilder guy?
 
because I like it :)
 
4:14 AM
ahah ahah ahah
great answer
 
I personally use it when I am at home :)
 
Ok shade nice talk to you
 
yeah same here
 
feeling sleepy morning need to go office again
 
4:15 AM
take care have a nice day
 
take care
 
bye
 
:)
bye
 
@kumar , hi
r u der???
 
@Pramodh: He's gone :-)
 
4:22 AM
@NightShade , oh........ ok fine, how are you?
 
Yeah, I am fine, thanks
how are you?
 
doing good......... you are at office?
 
yeah
I guess you are too, aren't you :-) ?
 
yeah.... i am
 
;))
OK folks, bye, have a nice time :-)
 
5:12 AM
Good Morning everbody:)
 
mornin' :)
 
anybody knows how can i write a plug-in for IE8 with C#?
@jaminator Hi how are you?
 
5:28 AM
@gr8 doc wht abt u
 
fine
;) thanks
 
5:43 AM
@DrTJ i think you would need to make a class library project in c# then add that assembly in GAC, and not sure thoug but will need to register that into IE using registry entries
 
Rye
whats up guys
 
@jaminator GAC? what is this?
@rye Hi, how are you?
 
@DrTJ its Global Access Cache, it a repository where all assembly are stored that windows uses, and all the assemblies that want to be globally accessible
 
Rye
fine dude. just doing some filtering :)
how bout you?
 
@DrTJ normally GAC is in C:\Windows\assembly
 
5:46 AM
@Rye fine, i'm trying to write a plug-in for IE8
 
Rye
@Dr TJ thats nice.
Hey guys which is much better when filtering a list? a checkbox or a checkListBox?
 
i suggest checkbox
 
Rye
@Pramodh thanks
 
finished filtering?
 
Rye
not yet, theres too many columns ;)
 
5:53 AM
which programming language you are using , friend?
 
Rye
C#
im using mvs08
 
ok fine..
 
Rye
hehe, i like this language. except for the combobox bug :)
 
wat bug dear??? wat happened to combobox?
 
Rye
when you populate a combobox w/ a list or arraylist using the click event the maxdropdown item will not work
but theres a fix
the integral method
 
5:59 AM
is it so? let me try....
 
Rye
did you try it?
 
anybody ever see asp.net post an empty form if you hit enter with a DefaultButton specificed? if i actually press the enter button the click event fires and processes the data, but not if i hit enter.
 
6:20 AM
@rchern i've never seen something like that...! O.O
 
@ Rye : did you meant this
private void comboBox1_MouseClick(object sender, MouseEventArgs e)
{
comboBox1.Items.Clear();
List<string> lst = new List<string> { "A", "B", "C" };
comboBox1.Items.AddRange(lst.ToArray());
}
 
@DrTJ, me neither ): well, til now.
if i hit enter, page_load fires and request.form is empty
click the button and everything is good
 
what was tracing result?
 
pardon?
 
where do you hit enter?
 
6:23 AM
after typing in input that's in a panel that has defaultbutton specified
 
@Rye , are you there?
 
@rchern, are you redirecting from that page?
did you trace your code (button click)?
that's really strange...
 
Rye
@Pramodh not the MouseClick. comboBox1_Click(object sender, EventArgs e)
@Pramodh try doing it like this private void comboBox1_Click(object sender, EventArgs e)
{
comboBox1.Items.Clear();
List<string> lst = new List<string> { "A", "B", "C" };
comboBox1.Items.AddRange(lst.ToArray());
}
then set your comboBox1.MaxDropDownItems = 2;
 
6:51 AM
its showing all the three items.......
@ Marc Gravell , Hi
 
Rye
hehehe, but the maxdropdown items is 2 right?
 
yes.....
how did you solve the issue?
 
Rye
set the combobox property IntegralHeight = false;
but you should click the combobox twice and thats sucks :)
 
7:09 AM
now also its showing the three items friend,
 
Rye
really? hmmm
 
@Rye , sorry sorry.......... its working...
 
Rye
hehe, you should click it twice on the first load right? are you using visual studio 2008?
 
yes, yes i'm using MSV08
why its so?
its a bug in the IDE right?
 
Rye
i'm not sure. I haven't tried it in MSV10
 
7:48 AM
Morning folks
 
mornin
 

« first day (11 days earlier)      last day (4938 days later) »