creativecodedesign.com
Code Snippets: Compute File MD5 Hash in Java | Creative Code Design
http://www.creativecodedesign.com/2012/02/07/code-snippets-compute-file-md5-hash-in-java
Code Snippets: Compute File MD5 Hash in Java. I was writing an Android app recently that needed to compute the MD5s of some files. Figured I’d share an excerpt. Computes an MD5 for a file and returns hex string. Param filePath – path to the file whose checksum we need to compute. Return – hex string representing the MD5. Public static String ComputeFileMD5(String filePath) throws Exception. InputStream inStream = new FileInputStream(filePath);. Byte[] buffer = new byte[1024];. Int numRead = 0;.
creativecodedesign.com
This post is up to 100% helpful to everyone! | Creative Code Design
http://www.creativecodedesign.com/2012/02/07/this-post-is-up-to-100-helpful-to-everyone
This post is up to 100% helpful to everyone! I love the expression “up-to”. When marketing folks die and enter the afterlife, presumably it’s up to 100% heaven. The nice thing about “up to” is that it encompasses the null set of whatever range it is cast upon. Up to 99% success rate could very well be 0% success rate since it satisfies the idiomatic condition. Anyway, so I was coding in Java the other day and ran into a decent candidate for the WTF files. I was using the CypherInputStream. But you know&#...
creativecodedesign.com
WCF – The server encountered an error processing the request. | Creative Code Design
http://www.creativecodedesign.com/2011/12/27/wcf-the-server-encountered-an-error-processing-the-request
WCF – The server encountered an error processing the request. One of the many cool things about WCF is that it abstracts network communication into the lower layers of the framework and leaves us developers to deal with the actual data for our applications instead of the nitty gritty of connection handling and data casting. OperationContract] string DoSomeStuff(int id, object inputObject);. At System.ServiceModel.Dispatcher.DataContractJsonSerializerOperationFormatter.DeserializeParameter...At System....
creativecodedesign.com
“Error: Server sent unexpected return value (405 Method Not Allowed)” | Creative Code Design
http://www.creativecodedesign.com/2012/03/13/error-server-sent-unexpected-return-value-405-method-not-allowed
8220;Error: Server sent unexpected return value (405 Method Not Allowed)”. I ran into a funky issue with the interaction between SVN, Visual Studio and my brain recently. I was trying to commit some changes I made to a project and during the commit got slapped with something like this:. 8220;Error: Server sent unexpected return value (405 Method Not Allowed) in response to Error: MKCOL request for …. I did some Googling, tried some creative suggestions here. WTF indeed. I worked around it by temporar...
creativecodedesign.com
Conversion to Dalvik format failed with error 1 | Creative Code Design
http://www.creativecodedesign.com/2012/01/23/conversion-to-dalvik-format-failed-with-error-1
Conversion to Dalvik format failed with error 1. I ran into this error a couple of times when trying to launch debug for an Android application in Eclipse. In all the cases I completely forgot what I had to do to fix this and this thread. Has consistently led me towards the solution. However, not all the way. For some reason, doing a project Clean did not remove the jar file for one of the libraries in the workspace and that was causing an issue in another project that referenced the library.
creativecodedesign.com
Format .NET JSON DateTime with Javascript | Creative Code Design
http://www.creativecodedesign.com/2014/01/21/format-net-json-datetime-with-javascript
Format .NET JSON DateTime with Javascript. The task described in the title of this post is one of those extremely annoying things that should be a 20 second ordeal, but instead it can consume hours of Googling and sometimes result in not so great solutions. So basically we need to format a DateTime object encoded into JSON. To something that is human-readable and can be rendered on a page. Dec 13 2013 22:42. Sounds simple enough. A lot of one-liners would suggest the following:. January 21, 2014.
creativecodedesign.com
Conditional(“DEBUG”) not working with [TestMethod] | Creative Code Design
http://www.creativecodedesign.com/2014/02/07/conditionaldebug-not-working-with-testmethod
Conditional(“DEBUG”) not working with [TestMethod]. Sad but true and by design. With Conditional(“DEBUG”), the compiler will merely ‘void out’ calls to the method marked with that attribute. The method itself is still compiled in. Thus, when mstest looks for test to run, it finds all of the Conditional(“DEBUG”) methods regardless of build configuration. A couple of solutions are available:. Switch back to #if DEBUG. Use Priority attribute as suggested here. February 7, 2014. Leave a Reply Cancel reply.
creativecodedesign.com
Android: Taking Screenshots of the Emulator from Commandline | Creative Code Design
http://www.creativecodedesign.com/2012/02/13/android-taking-screenshots-of-the-emulator-from-commandline
Android: Taking Screenshots of the Emulator from Commandline. There are a number of reasons why you may want to grab a screenshot of your Android app. In Eclipse, DDMS perspective provides an easy way to do it via the UI:. However, UI features like this are hard to automate. And sometimes it can be handy to be able to grab the screen from command line via a script. Welll. Added ddmlib and Screenshot.java classes to the same project, compiled, ran in on a loaded AVD with v2.2 and…. Seems to be 1) imagePar...
creativecodedesign.com
Creative Code Design | … | Page 2
http://www.creativecodedesign.com/page/2
CcDirectoryManipulator – Arbitrary Action Given an Arbitrary Condition for Every Subfolder. I was recently re-organizing my music collection and. Well, I suppose “re-organizing” implies a level of initial organization that my collection has never enjoyed. So. I was recently organizing my music collection and noticed that it involved a number of repetitive tasks pertaining to folder management. Specifically, I wanted to. Get rid of folders that only had one file in them. Get rid of all empty folders.