Skip to content

Instantly share code, notes, and snippets.

View beeeku's full-sized avatar
🌴
On vacation

Bikash Dash beeeku

🌴
On vacation
View GitHub Profile
@beeeku
beeeku / todo.sol
Last active August 1, 2018 10:13
todo.sol
pragma solidity ^0.4.20;
contract TodoList {
struct Todo {
uint256 id;
bytes32 content;
address owner;
bool isCompleted;
uint256 timestamp;
@beeeku
beeeku / ngCartMod.js
Created August 19, 2015 16:41
Modified NgCart module for adding Vat
'use strict';
angular.module('ngCart', ['ngCart.directives'])
.config([function () {
}])
.provider('$ngCart', function () {
@beeeku
beeeku / Beautifulcode.cpp
Last active August 29, 2015 14:26
A program that finds out whether a binary tree is a BST or not
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
/* A binary tree node has data, pointer to left child
and a pointer to right child */
struct node
{
int data;
struct node* left;
@beeeku
beeeku / question3.php
Last active August 29, 2015 14:17
Browntape Question no 3 Answer
<?php
$result = array();
function getSku($key, $params)
{
$rv = array();
$i = count($params);
while (0 < $i--) {
array_unshift($rv, $params[$i][$key % count($params[$i])]);
$key = (int) ($key / count($params[$i]));
}