[ POPULAR STORIES ]

CATCH UP THE POPULAR STORIES

Pretty/Style/Indent JSON String in HTML DIV/PRE Tag in Javascript/jQuery

         We come across many situations where we need to display JSON string (pretty/Style/Indent format) inside HTML DIV(<div></div>) tag. The below Javascript code snippet can be used to achieve what you need.  HTML Code <pre id="json"></pre> //DIV tag wont work  Javascript Code var data = { "data": { "attribute1": "value1", "attribute2": "value2",… Read More »

Read more
Alternative text

CuBox – Mini PC from SolidRun Ltd

      Desktop computers are becoming smaller and smaller day by day. Raspberry Pi, Intel’s NUC, MinnowBoard are the best examples for small sized computer. Developers are working hard to bring 32-bit and 64-bit operating system support in such Mini PC. Intel has already made it. Its now SolidRun Ltd to develop CuBox which is another… Read More »

Read more
Alternative text

Elasticsearch Java API – Get Type List from given Index

The following is sample Java program to get the list of type for a given index name in an Elasticsearch instance. Sample Program: package com.report.test; import java.util.ArrayList; import java.util.List; import java.util.concurrent.ExecutionException; import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsRequest; import org.elasticsearch.action.admin.indices.mapping.get.GetMappingsResponse; import org.elasticsearch.client.Client; import org.elasticsearch.client.transport.TransportClient; import org.elasticsearch.cluster.metadata.MappingMetaData; import org.elasticsearch.common.collect.ImmutableOpenMap; import org.elasticsearch.common.hppc.cursors.ObjectObjectCursor; import org.elasticsearch.common.settings.ImmutableSettings; import org.elasticsearch.common.settings.Settings; import org.elasticsearch.common.transport.InetSocketTransportAddress; public class SampleProgram{ public static… Read More »

Read more
Alternative text

Writing REST APIs – CREATE/POST – Best Practices – Part II

This is my second post on Writing REST APIs. Today the focus is on POST HTTP method. Basically POST method is used for create a resource. Sample Request : POST /users { "users" : [{ "firstName" : "Tom", "lastName" : "Cruise" },{ "firstName" : "Tom", "lastName" : "Hardy" }] } Sample Response : { "statusCode" :… Read More »

Read more
Alternative text

Microsoft Surface Pro – Desktop in form of a Tablet

         Feeling hard to take your Laptop with you all the time? Got bored of using the same old Desktop? Here you have the Microsoft Surface Pro tablet which is the upgraded version of Microsoft Surface tablet from Microsoft which is scheduled for sale from February 9, 2013 in the United States… Read More »

Read more
Alternative text

[ LATEST STORIES ]

CATCH UP THE LATEST STORIES

[ SUBSCRIBE TO OUR BLOG ]