This file contains 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
<!-- Import jquery.js & masonry.js --> | |
<script src="js/libs/jquery.js"></script> | |
<script src="js/libs/masonry.js"></script> | |
<!-- Create empty container --> | |
<div class="masonry"></div> | |
<!-- Call the function --> |
This file contains 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
# application_controller.rb | |
# Create an instance with merchantid, workingkey and redirect url as parameter | |
def ccavenue | |
return @ccavenue = Ccavenue::Payment.new(<TODO: MERCHANT ID>,<TODO: MERCHANT WORKING KEY>,<TODO: REDIRECT URL>) | |
end |
This file contains 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
<?php | |
require_once __DIR__ . '/../vendor/autoload.php'; | |
use Kishanio\CCAvenue\Payment as CCAvenueClient; | |
$ccavenue = new CCAvenueClient( '<merchant_id>', '<working_key>', '<redirect_url>' ); | |
// set details | |
$ccavenue->setAmount( '<Amount>' ); | |
$ccavenue->setOrderId( '<order_id>' ); |
This file contains 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
Homebrew build logs for homebrew/science/openni2 on Mac OS X 10.11.5 | |
Build date: 2016-07-11 19:46:27 |
This file contains 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
// File : utils/api.js | |
var Api = {}; | |
Api.NewNote = function(note,file) { | |
var file = new Parse.File(file.name, file); | |
return file.save().then(function(file) { | |
var promise = Parse.Promise.as(); | |
promise = promise.then( function() { | |
var NewNote = new Note(); |
This file contains 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
// Parse : Chaining Promises in Parallel | |
// File : utils/api.js | |
var Api = {}; | |
Api.Count = function() { | |
var promises = []; | |
var shelf = new Parse.Query(Shelf); | |
var note = new Parse.Query(Note); | |
var book = new Parse.Query(Book); |
This file contains 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
Parse.Cloud.afterSave("Book", function(request, response) { | |
var book = request.object; | |
var Shelf = Parse.Object.extend("Shelf"); | |
var query = new Parse.Query(Shelf); | |
query.get(book.get("shelf").id).then(function(shelf) { | |
shelf.increment("bookCount"); | |
shelf.save(); | |
}); |
This file contains 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
// Pure Function | |
function square(x) { | |
return x * x; | |
} | |
function squareAll(items) { | |
return items.map(square); | |
} | |
// Impure Function |
This file contains 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
// Reducer for counter. | |
// Dependency : https://github.com/mjackson/expect | |
// handles default state | |
const counter = ( state = 0, action) => { | |
switch( action.type ) { | |
case 'INCREMENT': | |
return state+1; | |
case 'DECREMENT': | |
return state-1; |
This file contains 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
// Dependency : http://redux.js.org/ | |
const { createStore } = Redux; | |
const counter = ( state = 0, action) => { | |
switch( action.type ) { | |
case 'INCREMENT': | |
return state+1; | |
case 'DECREMENT': | |
return state-1; | |
// handles undefined action |
OlderNewer