Showing posts with label Computer. Show all posts
Showing posts with label Computer. Show all posts

Thursday, October 18, 2012

How to generate Java Class files from JSON

A simple online tool which can generate Java Classes from the JSON data directly. There are little bugs in the tool. For example if the JSON data contains a space, the generator will create a variable name with space. But as per Java, you cannot have space in between variables. Other than this I found the tool good enough to generate Java classes from JSON data.

Sample JSON Data

I have written a sample JSON to test this tool. You can get the JSON from PasteBin or try this tool with your own JSON data. You can visualize the structure of your JSON using several online JSON converters. I have used JSONViewer from Stack.hu. Below is the structure of my sample JSON data.



Generating Java Class from JSON


You can use JSON Gen – Client Code generation tool from ByintonDesign.com to generate Java classes from JSON data. The best part is the you could specify your JSON Data Class name and the Package name while generating.

One small drawback is the site doesn’t have option to directly paste the JSON data. You got to specify the url containing the JSON data, one quick workaround is to use online clipboards such as PasteBin to generate URL for the data. Click on the Raw option as shown below in the paste to get the direct url.

Tuesday, October 16, 2012

How To Build Your PC Is Really Easy

Assemble your own computer can be really fun, and it's easier now than ever before. However, there are few moments when assembling a system, and attach a CPU fan can be one of them. The last thing you want is your new expensive processor with a bent pin, but if you do, here's how to fix it.

Build your own computer can be really easy, and gives you the most common in the customization options. If you want to try it, you try to see the guide First-Timer's Guide to Building a Computer from Scratch. However, building a system with more experience can attest to how scary it can be when you mount a CPU fan or heat sink and you're not sure how much power to put on it to make it fit.

In most cases, you get it sorted without any hassle, but in the worst case scenario, you take a fan, popping the CPU, and find your worst nightmare: a new CPU you have a group of pin that was pressed on the bottom. Thankfully, MarauderFox Instructables website shows the use of plastic cards (such as credit card or ID card,) a Swiss Army Knife, and a steady hand to fix the problem.

Just use a knife to slowly and gently to set up the pins are bent back. Then use a plastic card to make sure the pins bent into a perfect standing with all the others around him. Use cards from various angles to make sure it is perfect with the line.

Finally, the ease of the processor back into place, making sure each slide pin into the hole. If not applicable, you should be able to feel the areas that do not match and repeat the process again. It is important to be gentle, because you do not want to damage the pins by trying to bend them back and forth.