Skip to content

Instantly share code, notes, and snippets.

0x90b56692BC5a022c216801B73024797AB92A596D
0x024544feCa3A128FcdFbcD60105D253632249bE2
angular.module('ChartCtrl', []).controller('ChartController', ['$scope', '$stateParams', '$element', '$http', function($scope, $stateParams, $element, $http) {
$http.get('/api/chart').then(function(res) {
var ctx = document.getElementById("skillsTrends");
var myChart = new Chart(ctx, {
type: 'line',
data: {
labels: res.data.labels,
datasets: [
{
label: "# of Opportunities",
@pdxwebdev
pdxwebdev / asdf
Created March 10, 2016 16:23
asdf
test_array = [[1,2,[3]],4]
test_array2 = [[1,2,[3]],[[5,6,[[78]],4]]]
test_array3 = [[1,2,[3]],[[[4]]]]
def flatten(input_array):
newArray = []
if type(input_array) == type([]):
for item in input_array:
newArray.extend(flatten(item))