Browsing 7239 questions and answers with Jon Skeet
The problem is your selection part, here: .Select(y => new { startdates = y.Select(k => new {startdate = (k.startDate.Month.ToString() + "/" + k.startDate.Day.ToString() + "/" + k.startDate.Year.ToString()), users = y.Select(z... more 4/8/2014 5:54:41 AM
I can't easily tell whether this is all that's wrong, but this is definitely wrong: byte[] encryptedData = encryptData("Confidential data"); //String from user String s=encryptedData.toString();//String input to decrypt From user byte[]... more 4/7/2014 9:40:13 PM
Your string starts with a byte order mark (U+FEFF). Ideally, you shouldn't get that into your string to start with, but if you do have it, you should just strip it: string text = ...; if (text.StartsWith("\ufeff")) { text =... more 4/7/2014 8:04:11 PM
You can use preprocessor directives to control this - not on the basis of your references, but on the basis of symbols: #if USE_SOME_LIBRARY // Code that uses the library #endif Then just make sure that you define USE_SOME_LIBRARY in... more 4/7/2014 7:49:00 PM
Look at what you're writing from the client: saida.write("PAPO"); That doesn't have a line break, so the server doesn't know whether there's more text coming in the same line. Also, because you haven't flushed your writer, it may be... more 4/7/2014 7:35:28 PM
No, you can't be sure of that. InputStream doesn't block until it's read all the data you've requested - it blocks until it's read some data. (The default implementation of InputStream will read until it's read everything it can, but... more 4/7/2014 7:00:32 PM
Suppose you currently have: public interface Foo { void bar(); } You cannot later evolve this to: public interface Foo { void bar() throws SomeException; } (where SomeException is a checked exception) because code that... more 4/7/2014 6:13:13 PM
Unless you have any memory barriers, you're potentially in dangerous waters, if the value can ever change. Let's take the singleton part of this out of the equation, as it's not particularly relevant. Consider this simple example: // Not... more 4/7/2014 4:10:08 PM
Well that operator means you can just cast: DateTime input = new DateTime(...); OracleDateTime result = (OracleDateTime) input; ... It's not clear what you mean by "how to return the converted date" - it's not like you'd want a method... more 4/7/2014 1:08:16 PM
if a new string is created, then is it created in the same memory location? No, a separate string object is created, in a separate bit of memory. You're then replacing the value of s1 with a reference to the newly-created string.... more 4/7/2014 11:56:51 AM