This blog post is a gluing of the following 2 posts that walk through how to setup heroku with Angular 2. Deploy Angular CLI WebPack Project Heroku and Angular CLI Deployment
ng new yoloswag
def binary_search(target, list) | |
position = (list.count / 2).floor | |
mid = list[position] | |
return mid if mid == target | |
if(mid < target) | |
return binary_search(target, list.slice(position + 1, list.count/2)) | |
else | |
return binary_search(target, list.slice(0, list.count/2)) |
package com.pandemic.recommendation_core.web | |
import akka.actor._ | |
import akka.actor.Actor.actorOf | |
import akka.http._ | |
import org.eclipse.jetty.server.Server | |
import org.eclipse.jetty.servlet.ServletHolder | |
import org.eclipse.jetty.servlet.ServletContextHandler | |
import org.eclipse.jetty.http.security.Constraint; | |
import org.eclipse.jetty.http.security.Credential; |
// String Functions | |
func substr(input: String, start: Int, count: Int) { | |
var substr = "" | |
for i in range(0, input.length) { | |
if(i >= start && i <= start + count - 1 ) { | |
substr = substr + input[i] | |
} | |
} | |
func add(a: Int, b: Int) { | |
a + b | |
} | |
func mult(a: Int, b: Int) { | |
a * b | |
} | |
func combine(a: Int, b: Int, comp: (Int, Int) => Int) { |
// Convert Celsius to degrees Fahrenheit | |
func convert(celsius: Float) { | |
celsius * 9 / 5 + 32 | |
} | |
val input = 45.0 | |
println("The temperature " + input + " Celsius is " + convert(input) + " Fahrenheit") |
This blog post is a gluing of the following 2 posts that walk through how to setup heroku with Angular 2. Deploy Angular CLI WebPack Project Heroku and Angular CLI Deployment
ng new yoloswag
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: {{ include "helm-chart.fullname" . }} | |
labels: | |
app.kubernetes.io/name: {{ include "helm-chart.name" . }} | |
helm.sh/chart: {{ include "helm-chart.chart" . }} | |
app.kubernetes.io/instance: {{ .Release.Name }} | |
app.kubernetes.io/managed-by: {{ .Release.Service }} | |
spec: |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Flashback</title> | |
<script src="https://unpkg.com/@babel/standalone@7.2.5/babel.min.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react/16.0.0/umd/react.development.js"></script> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/react-dom/16.0.0/umd/react-dom.development.js"></script> | |
<link rel="stylesheet" type="text/css" href="index.css"></link> | |
</head> |
require 'minitest/autorun' | |
class ManhattanDistance | |
# given a distance, calculate all possible move | |
# possibilities a certain manhattan distance away | |
def self.touples(n) | |
return [] if n == 0 | |
list = [] |