|
A sample of the code I'm working on now:
TimeZone = If(item.Descendants("DisplayableDateTime").Attributes("TimeZone").ElementAt(0).Value <> "", item.Descendants("DisplayableDateTime").Attributes("TimeZone").ElementAt(0).Value, "")
In short, set the result to the value when the value is not an empty string; otherwise, set the result to an empty string.
|
|
|
|
|
|
|
Something similar I catch myself almost writing is along the lines of:
if ( x <> y ) x = y
|
|
|
|
|
Are you by chance working in a funny language where !(a<>b) does not mean b can be used instead of a in all contexts?
Let's say you have a language where null == "" (for simplicity, you know?) Then you have an API that does not follow that convention and throws on a null.
|
|
|
|
|
Few weeks ago i decided to create an application to make my work easier as we used to execute different scripts to complete our tasks, other than using different applications to do this, i created this application. And because everyday we can use different scripts i decided to make the application extendable so you can add new dll and the application know how to execute this new script. Right now while am having a drink and reading a little bit about MEF, my heart start to beat very fast as i found this exactly what i was doing without using reflection. I think i will have couple of drinks more and dive more deep with this sweet lovely thing. Just wanna share my feelings with you guys
Genius is one percent inspiration and ninety-nine percent perspiration.
|
|
|
|
|
Good luck but don't mix drinks with MEF
Ranjan.D
|
|
|
|
|
Don't worry ... JD is my best friend
Genius is one percent inspiration and ninety-nine percent perspiration.
|
|
|
|
|
"I don't often read tech manuals, but when I do, I drink Dos Equis." -- The world's most nerdiest guy.
|
|
|
|
|
"My software doesn't always have problems, but when it does, it exists between the chair and the keyboard"
|
|
|
|
|
|
Like!
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Someone has a picture of the Dos Equis guy with that text on it pinned to their cubicle wall in our office. I'm a little disappointed the shirt doesn't have his picture too...(ignoring the obvious issues with properly licensing the image)
|
|
|
|
|
I don't need the competition.
|
|
|
|
|
U such a geek man
Genius is one percent inspiration and ninety-nine percent perspiration.
|
|
|
|
|
Dos Equis - each bottle contains the piss of TWO horses!
====================================
Transvestites - Roberts in Disguise!
====================================
|
|
|
|
|
SledgeHammer01[^] may be your bestest new buddy.
No, seriously, he may be the go-to guy around here.
|
|
|
|
|
Where do you stand now after 3 hours drinking? If still standing....
Seulement, dans certains cas, n'est-ce pas, on n'entend guère que ce qu'on désire entendre et ce qui vous arrange le mieux... [^]
|
|
|
|
|
I won't stand for anyone getting falling-down drunk in here.
|
|
|
|
|
I was setting on my comfortable couch, but guess what! drinks make your imagination work better
Genius is one percent inspiration and ninety-nine percent perspiration.
|
|
|
|
|
Do Not mix feeling with dev...
resolute from one another..and don't drink and drive..
Thanks
|
|
|
|
|
Our C# application uses TCP/IP sockets for interprocess communication. I use the Socket class asynchronous methods to process received messages, something like this:
s.BeginReceive(...,OnReceive);
...
void OnReceive(...)
{
lock(...)
{
...
s.BeginReceive(...,OnReceive)
}
...
} I discovered that the OnReceive was being called recursively under heavy traffic conditions, resulting in messages being processed in reverse order for brief periods . The solution went something like this:
s.BeginReceive(...,OnReceive);
...
void OnReceive(...)
{
lock(...)
{
...
}
...
s.BeginReceive(...,OnReceive)
} The time-reversing version has been in the product since 2008, and I only discovered it a week ago. One petard-wedgie, coming up.
Software Zen: delete this;
|
|
|
|
|
|
My group builds controller applications for our commercial ink-jet printing systems[^]. The apps are structured as a front-end UI application and one or more Windows services. The services can end up running on other machines in the system. Using TCP/IP sockets makes it easy to move services around for hardware or performance reasons.
We also use TCP/IP to communicate with a lot of the hardware, so having a common protocol throughout simplifies things.
Software Zen: delete this;
|
|
|
|
|
Ah I see that makes sense now.
Sounds pretty interesting!
=====
\ | /
\|/
|
|-----|
| |
|_ |
_) | /
_) __/_
_) ____
| /|
| / |
| |
|-----|
|
=====
===
=
|
|
|
|