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
//important links | |
http://www.bennadel.com/blog/2852-understanding-how-to-use-scope-watch-with-controller-as-in-angularjs.htm | |
http://fdietz.github.io/recipes-with-angular-js/controllers/responding-to-scope-changes.html | |
https://docs.angularjs.org/api/ng/type/$rootScope.Scope#$watch | |
$watch | |
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
$watch | |
//this is the value we are watching | |
vm.fooCount =0; | |
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
<html> | |
<head> | |
<script src="http://code.angularjs.org/1.2.13/angular.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.8/angular-ui-router.min.js"></script> | |
</head> |
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
--------- | |
index.html | |
----- | |
<html> | |
<head> | |
<script src="http://code.angularjs.org/1.2.13/angular.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.8/angular-ui-router.min.js"></script> |
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
<html> | |
<head> | |
<link rel="stylesheet" href="bower_components/angular-chart.js/dist/angular-chart.css"> | |
<script src="bower_components/angular/angular.min.js"></script> | |
<script src="bower_components/Chart.js/Chart.min.js"></script> | |
<script src="bower_components/angular-chart.js/dist/angular-chart.min.js"></script> | |
</script> |
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
class MyDict(dict): | |
def __init__(self): | |
self=dict() | |
def addItem(self,key,value): | |
if key in self: | |
self[key] +=value |
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
var input = document.getElementById('input'); | |
input.addEventListener('change', handleFiles); | |
function handleFiles(e) { | |
var ctx = document.getElementById('canvas').getContext('2d'); | |
//first imagess | |
var input = document.getElementById('input'); | |
alert(input.files.length); | |
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
var input = document.getElementById('input'); | |
input.addEventListener('change', handleFiles); | |
function handleFiles(e) { | |
var ctx = document.getElementById('canvas').getContext('2d'); | |
//first imagess | |
var input = document.getElementById('input'); | |
alert(input.files.length); | |
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
var input = document.getElementById('input'); | |
input.addEventListener('change', handleFiles); | |
function handleFiles(e) { | |
var ctx = document.getElementById('canvas').getContext('2d'); | |
//first imagess | |
var input = document.getElementById('input'); | |
alert(input.files.length); | |
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
<div id="imagesDiv" class="rounded"> | |
<label for="chooseFiles">Add Images</label> | |
<input type="file" id="chooseFiles" multiple="multiple" /> | |
<table id="previewTable"> | |
<thead id="columns"></thead> | |
<tbody id="previews"></tbody> | |
</table> | |
</div> | |
---------------------------------------------------------------------- |