Browsing 7239 questions and answers with Jon Skeet
Well you should almost certainly get rid of the ToList() call, to start with - that way the selection part will be turned into SQL and avoid pulling down unnecessary data. You can do the whole thing in a query expression: var... more 6/2/2014 6:13:27 PM
It looks like you really want: public void Update<T>(T entity, params Expression<Func<T, Object>>[] properties) where T : class and then call it as: _repository.Update(file, x => x.Data, x =>... more 6/2/2014 4:41:50 PM
Apparently there is no Euro symbol in GBK. For example, from the code page 936 wikipedia page: The concept "CP936", "GBK" and "GB2312" are sometimes confused in various software products. Code page 936 is not identical to GBK because a... more 6/2/2014 4:08:36 PM
But format is different. Not really. They're both using the date/time format in RFC 3339 / ISO-8601, as per the W3C XML schema recommendation, which expresses an offset from UTC as well as the local date/time. Z is used as a UTC... more 6/2/2014 3:11:34 PM
I believe this is due to the way Visual Studio hosts your application, in order to reduce startup time when debugging. What happens is that your application (Program.exe) will actually be hosted in another process (Program.vshost.exe),... more 6/2/2014 2:57:25 PM
Just because you happen to be using Guice to call the constructor in some cases doesn't mean anything else is prohibited from calling it. Personally, I would include the nullity checks - which are very light on cruft if you're using Guava... more 6/2/2014 2:48:36 PM
This has nothing to do with XML. You're using Class.getResourceAsStream, which is meant to get a resource to be loaded from the classpath for that class's class loader... but you're passing in a filename instead. If you want to create an... more 6/2/2014 2:35:30 PM
Well, a GUID is inherently 16 bytes of data... so that's what you should encrypt. That's a single block in AES. As per Reid's comment, the exact size of the output will depend on how you've configured things, but to convert the result into... more 6/2/2014 2:15:26 PM
It looks like this is because GregorianCalendar in Java is actually a hybrid between the Gregorian calendar and the Julian calendar: GregorianCalendar is a hybrid calendar that supports both the Julian and Gregorian calendar systems... more 6/2/2014 2:06:02 PM
With this call: lifeCycle(population,0, 4000); you're basically asking for a stack with 4000 frames (at least - see later). That isn't totally beyond reason, but in fact there's no reason to make this recursive at all. You can easily... more 6/2/2014 1:48:28 PM