|
You were gone for 6 years and no one noticed!
|
|
|
|
|
Um, the dog ate my homework?
Wait, wrong excuse.
Jeremy Falcon
|
|
|
|
|
Jeremy Falcon wrote: Um, the dog ate my homeworkpassword?
I'd rather be phishing!
|
|
|
|
|
Be gentle now!
My gave me a smart phone and the library is not far away. But it's been a PITA.
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
Well, welcome back!
Jeremy Falcon
|
|
|
|
|
Thanks it's nice to be able to work from my PC again.
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
Jeremy Falcon
|
|
|
|
|
Mike Hankey wrote: months of not having internet on my home PC
So...how does that happen?
|
|
|
|
|
When monies short!
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
Mike Hankey wrote: not having internet on my home PC
How is this even humanly possible?
|
|
|
|
|
Mike Hankey wrote: months of not having internet I'm jealous.
"the debugger doesn't tell me anything because this code compiles just fine" - random QA comment
"Facebook is where you tell lies to your friends. Twitter is where you tell the truth to strangers." - chriselst
"I don't drink any more... then again, I don't drink any less." - Mike Mullikins uncle
|
|
|
|
|
Mike Hankey wrote: After months of not having internet on my home PC I'm finally back online.
How on Earth did you survive?
Was it a revelation like this[^]?
Anything that is unrelated to elephants is irrelephant Anonymous
- The problem with quotes on the internet is that you can never tell if they're genuine Winston Churchill, 1944
- I'd just like a chance to prove that money can't make me happy. Me, all the time
|
|
|
|
|
Couldn't you hack into someone's wireless? There's always someone around who still uses WEP.
Ravings en masse^ |
---|
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
Where I live is so far out they have to pump sunshine in.
New version: WinHeist Version 2.2.2 Beta I told my psychiatrist that I was hearing voices in my head. He said you don't have a psychiatrist!
|
|
|
|
|
Mike Hankey wrote: Where I live is so far out they have to pump sunshine in. Did you move to rural Canada?
if (Object.DividedByZero == true) { Universe.Implode(); }
Meus ratio ex fortis machina. Simplicitatis de formae ac munus. -Foothill, 2016
|
|
|
|
|
I have a task that is maybe three calls deep from the MVVM Login command to the Web API call for a token. The API had an erroneous connection string, to an older version of the database*, and the UserManager.CreateUser method was failing in the Register action. It took about fifteen minutes, and a hard break-point, e.g. Debug.Fail() , to find the error.
The stack trace was most confounding, and it mentioned the Account controller and the error once that I could see in an 86 line long stack track, most of which were exceptions on a MoveNext() method on a slew of async tasks.
It is clear that I have some learning to do regarding configuring the innermost task, the long running one that is to be awaited, and that learning will begin tomorrow morning at 04h30, my normal starting time. Time to consult the venerable Mr. Skeet's seminal tome on C# 5.
* It's damned annoying how EF drops a default connection string, like a turd, into your config file, that points to the new fangled LocalDb . Then you forget to set one up, your first migration creates the DB there, then when you can't connect to where you expect it, you fix the connection string, and re-run the migration in the right database. Then, when you have done a few more migrations, and add e.g. a test project, it is once again pointing to the out-of-date LocalDb version.
|
|
|
|
|
Well, if you would use a flat file and single thread the thing, then you wouldn't have these problems!
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
Now you've given me an idea. A flat file provider for EF, even with FKs, and a migrations module for that provider.
|
|
|
|
|
Glad I could help?
#SupportHeForShe
Government can give you nothing but what it takes from somebody else. A government big enough to give you everything you want is big enough to take everything you've got, including your freedom.-Ezra Taft Benson
You must accept 1 of 2 basic premises: Either we are alone in the universe or we are not alone. Either way, the implications are staggering!-Wernher von Braun
|
|
|
|
|
async/await is, IMO, something to be avoided except for very specific, simple, quick running, one-level deep, things. Besides the fact that you have to be careful of whether you have long running tasks, which the underlying task management doesn't like (I think this is still accurate), nested async/awaits are a brain-f*** -- ok, when the continuation returns here, then it returns here, then it returns here...but what happens when an exception is thrown...
Frankly, In most cases, I much prefer good 'ol System.Threading.Thread.
Marc
|
|
|
|
|
I wouldn't dream of nesting awaited Tasks, except maybe with a year's analysis and planning of continuations, but in this case, now I've done things properly (found an excellent tutorial), a task takes a lot off my hands, and it is only used to keep the UI responsive and able to cancel, the quasi-long-running API call. It's my own API, and dedicated to this one client.
If I get brave enough, I might stretch it and venture into multiple parallel continuations, but all first level only; start and finish. The TPL, even without the magic of await , just just all the System.Threading plumbing for me.
|
|
|
|
|
Marc Clifton wrote: ok, when the continuation returns here, then it returns here, then it returns here...but what happens when an exception is thrown...
async and await make it easier to reason about that sort of code. For the most part, it's basically the same as synchronous code, except it doesn't block the thread waiting for external calls to complete.
A simple example:
Synchronous code:
Ping ping = new Ping();
try
{
PingReply reply = ping.Send(address);
}
catch (PingException)
{
}
EAP code:
Ping ping = new Ping();
PingCompletedEventHandler handler = null;
handler = (sender, e) =>
{
ping.PingCompleted -= handler;
if (e.Error != null)
{
PingException ex = e.Error as PingException;
if (ex == null) throw new TargeInvocationException("Error", e.Error);
}
else
{
PingReply reply = e.Reply;
}
};
ping.PingCompleted += handler;
ping.SendAsync(address);
Continuation passing code:
Ping ping = new Ping();
Task<PingReply> pingTask = ping.SendPingAsync();
Task resultTask = pingTask.ContinueWith(task =>
{
if (task.IsFauled)
{
AggregateException ex = task.Exception;
ex.Handle(error =>
{
PingException pingEx = error as PingException;
if (pingEx == null) return false;
return true;
});
}
else
{
PingReply reply = task.Result;
}
});
Async code:
Ping ping = new Ping();
try
{
PingReply reply = await ping.SendPingAsync(address);
}
catch (PingException)
{
}
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Wow, wish I could give you multiple 5's for such a complete response!
Yes, async/await does definitely make life easier, until it doesn't.
Marc
|
|
|
|
|
A damned good, ideally detailed example!
You should make an article of this.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Programming question, in the lounge? tut tut...
|
|
|
|