#Bob Bee
###SQLFIDDLE
The Customer's table, records identities in one place because a single customer could conceivably place many orders over time
Note that US locality is assumed for state,zips, phone etc
| 'use strict' | |
| var margin = {top: 20, right: 20, bottom: 30, left: 40}, | |
| width = 1200 - margin.left - margin.right, | |
| height = 700 - margin.top - margin.bottom; | |
| var padding = 100; | |
| var x = d3.scale.linear() | |
| .range([padding, width - padding]); |
| yum install -y zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gcc make | |
| wget http://python.org/ftp/python/2.7.3/Python-2.7.3.tar.bz2 | |
| tar xf Python-2.7.3.tar.bz2 | |
| cd Python-2.7.3 | |
| ./configure --prefix=/usr/local | |
| make && make altinstall | |
| cd /root | |
| wget --no-check-certificate http://pypi.python.org/packages/source/d/distribute/distribute-0.6.27.tar.gz |
| package com.test; | |
| public class Palindrome{ | |
| public static String expandAroundCenter(String s, int c1, int c2) { | |
| int l = c1, r = c2; | |
| int n = s.length(); | |
| System.out.println(n); | |
| while (l >= 0 && r <= n-1 && s.charAt(l) == s.charAt(r)) { | |
| l = --l; |
| def contains_tree(a,b): | |
| if b is None: | |
| #an empty child tree is always a subtree | |
| return True | |
| return sub_tree(a,b) | |
| def sub_tree(a,b): | |
| if a is None: | |
| #if larger tree is exhausted, return false | |
| return False |
| import scala.collection.mutable._ | |
| object Legos { | |
| val mod = 1000000007; | |
| def t(width:Int):Int = { | |
| if(width < 0) 0 | |
| if(width == 0) 1 | |
| t(width-1) + t(width-2) + t(width-3) + t(width-4) |
| from werkzeug.wrappers import Request, Response | |
| from werkzeug.formparser import FormDataParser | |
| from werkzeug.serving import run_simple | |
| from werkzeug.utils import cached_property | |
| from werkzeug.datastructures import ImmutableMultiDict | |
| def encode(value): | |
| #Catch encoding errors here | |
| return 'foo!' |
| import sys | |
| from random import choice | |
| mod = 1000000007 | |
| import math | |
| import marshal | |
| cache = {} | |
| def memoized(f): | |
| """Memoize any function.""" |
| object Change extends App { | |
| def permuteCombinations(n:Integer,coins:Array[Integer]):Integer = { | |
| if(n == 0) 1 | |
| else if(coins.isEmpty || n < 0) 0 | |
| else { | |
| permuteCombinations(n - coins.head, coins) + permuteCombinations(n, coins.tail) | |
| } | |
| } |
#Bob Bee
###SQLFIDDLE
The Customer's table, records identities in one place because a single customer could conceivably place many orders over time
Note that US locality is assumed for state,zips, phone etc
#Word Chains
Given a source string and a destination string write a program to display sequence of strings to travel from source to destination by changing a word at a time.
Rules for traversing:
Example: Given source word CAT and destination word DOG , one of the valid sequence would be