This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Reverse an input string by maintaining the spaces in the same order as input string. | |
//For ex: | |
//Input String : Hello Welcome To DEV Test | |
//There are spaces at locations - 6 , 14, 17, 21 | |
package com.company; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DECLARE @StartDate DATETIME, @EndDate DATETIME | |
SET @StartDate = dateadd(mm, -1, getdate()) | |
SET @StartDate = dateadd(dd, datepart(dd, getdate())*-1, @StartDate) | |
SET @EndDate = dateadd(mm, 1, @StartDate) | |
SET @CustId = 2 | |
-- hom many orders customer got last month | |
select count(*) from t_order where t_order.customer_id = @CustId and | |
order_date BETWEEN @StartDate AND @EndDate; | |
-- how much $ customer spent last year |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company; | |
/** | |
* Finder utitilies | |
*/ | |
public class Finder { | |
/** | |
* | |
* @param smallArray Represents the subset array to be found |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"page": { | |
"template": { | |
"type": "basic", | |
"name": "template-base", | |
"version": "2.0.0" | |
}, | |
"title": "", | |
"body": { | |
"content": { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
events { | |
worker_connections 1024; | |
} | |
http { | |
include mime.types; | |
default_type application/octet-stream; | |
sendfile on; | |
keepalive_timeout 65; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# example merging 4 commits | |
git checkout mybranch | |
git rebase -i mybranch~4 mybranch | |
# at the interactive screen | |
# choose fixup for commit: 2 / 3 / 4 | |
# use find and replace of vim editor interactively by :%s/pick/f/gc | |
git push -u origin +mybranch |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//More Updated Example | |
//Example - Create a Increment Coutner and Result Component in ReactJs and JsComplete.com/repl | |
// const Hello = React.createClass({ | |
// render:function() { | |
// return <button>Hello {this.props.name}</button>; | |
// } | |
// }); | |
class Button extends React.Component{ | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var express = require("express"); | |
var bodyParser = require('body-parser').json(); | |
var app = express(); | |
var MongoClient = require('mongodb').MongoClient; | |
var assert = require('assert'); | |
var ObjectId = require('mongodb').ObjectID; | |
var cron = require('node-cron'); | |
var cronTask = require('./modules/cronConfig/cron') | |
if(!process.env.MLABURI) var config = require('./config/mongo'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Flashcard App</title> | |
<link rel='stylesheet' href='/style.css'> | |
</head> | |
<body> | |
<div id='root'></div> | |
<script src="https://fb.me/react-15.1.0.js"></script> | |
<script src="https://fb.me/react-dom-15.1.0.js"></script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Angular Controller */ | |
Application.controller('TestCtrl',['$scope','$rootScope'function ($scope,$rootScope) { | |
$scope.userProfile | |
} | |
/* HTML5 Side */ | |
<div ng-controller='TestCtrl'> | |
<pre {{userProfile | json}}> | |
</div> |
NewerOlder