Skip to content

Instantly share code, notes, and snippets.

View rajkumarpb's full-sized avatar
🎯
Focusing

Rajkumar rajkumarpb

🎯
Focusing
View GitHub Profile
@rajkumarpb
rajkumarpb / array-flatten.js
Created December 6, 2016 10:35
Flat an array of arrays
var inArr = [[[1, 2],],[3],[[4, 5],[6]]];
var result = [];
function flattenArray(arr) {
for (var i = 0; i < arr.length; i++) {
if (Array.isArray(arr[i]))
flattenArray(arr[i]);
else
result.push(arr[i]);
}
return result;
[{
branchName : 'BITLU',
loginName : 'Mahanim',
customerName : 'Usain Bolt',
customerId : 1,
leadCode : 'L101',
leadStatus : 'Open',
productNamee : 'Fire',
grossPremium : 150.0
},
@rajkumarpb
rajkumarpb / auth.go
Created September 8, 2017 07:17 — forked from tristanwietsma/auth.go
Golang web server example
package main
import (
"encoding/base64"
"net/http"
"strings"
)
type handler func(w http.ResponseWriter, r *http.Request)
@rajkumarpb
rajkumarpb / main.go
Created September 8, 2017 07:17 — forked from alyssaq/main.go
GET and POST golang API
/*
* Sample API with GET and POST endpoint.
* POST data is converted to string and saved in internal memory.
* GET endpoint returns all strings in an array.
*/
package main
import (
"encoding/json"
"flag"
@rajkumarpb
rajkumarpb / issues-jdbc.txt
Created September 19, 2017 14:13
Spring JDBC Stored Procedure
**Custom Stored Procedure**
package com.web.helper;
import java.util.List;
import java.util.Map;
import oracle.jdbc.OracleTypes;
import org.springframework.jdbc.core.JdbcTemplate;