Skip to content

Instantly share code, notes, and snippets.

@ajduke
ajduke / Example1-Output
Last active August 14, 2018 17:12
Getting started with GSON
toJson ---
Original Java object : ModelObject [name=myname, val=12, status=true, f=2.3]
Converted JSON string is : {"name":"myname","val":12,"status":true,"f":2.3}
fromJson----
Original JSON string is : {"name":"myname","val":12,"status":true,"f":2.3}
Converted Java object : ModelObject [name=myname, val=12, status=true, f=2.3]
@ajduke
ajduke / index.html
Created June 7, 2016 14:13 — forked from anonymous/index.html
mPvwJJ
<div class="wrapper">
<div class="details">
<div class="wrap header">
Create new Project
</div>
<div class="wrap">
<div class="project-name">
<label for="">Project Name</label>
<input type="text" />
</div>
console.time('Operation1')
for (var i = 0; i < 1000000000; i++) {
}
console.timeEnd('Operation1')
/// following is outout
// $ node app.js
// Operation1: 507ms
$ openssl version
OpenSSL 0.9.8zh 14 Jan 2016
$ openssl dgst -h
unknown option '-h'
options are
-c to output the digest with separating colons
-d to output debug info
-hex output as hex dump
-binary output in binary form
@ajduke
ajduke / index.html
Last active February 12, 2016 17:41 — forked from anonymous/index.html
A simple experiment on new CSS features- JS Bin// source https://jsbin.com/wijeni
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<style id="jsbin-css">
ul {
box-shadow: 1px 1px 3px #555;
margin:50px auto;
$> mongod --dbpath I:\Servers\data --port 27017 --logpath I:\Servers\logs\mongod.log
all output going to: I:\Servers\logs\mongod.log
mongod -f I:\Servers\mongodb\config\mongodb.conf
or
mongod --config I:\Servers\mongodb\config\mongodb.conf
# note that following should go only in only one line
mongod -f "I:\Servers\mongodb\config\mongodb.conf"
--remove --serviceName mdb27017
--serviceDisplayName "MongoDB Server Instance 27017"
--serviceDescription "MongoDB Server Instance running on 27017"
# note that following should go only in only one line
$> mongod -f "I:\Servers\mongodb\config\mongodb.conf"
--install --serviceName mdb27017
--serviceDisplayName "MongoDB Server Instance 27017"
--serviceDescription "MongoDB Server Instance running on 27017"
fs=require('fs');
fs.stat(path, function(err, stat){
console.log(stat);
console.log(stat.isDirectory());
console.log(stat.isFile());
})