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
/** | |
* Created by ovarunendra on 05-10-2014. | |
*/ | |
// Code goes here | |
angular.module('MyApp', []) | |
.controller('MainCtrl', [function() { | |
var self = this; | |
self.template = 'first.html'; | |
self.change = function(){ | |
self.template = 'second.html';; |
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 ng-app="notesApp"> | |
<head><title>Notes App</title> | |
</head> | |
<body ng-controller="MainCtrl as ctrl"> | |
<div> | |
<table border="1" style="width:300px"> | |
<tr> | |
<th>id</th> | |
<th>name</th> | |
<th>age</th> |
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
<h2>Add Page</h2> |
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
<!doctype html> | |
<html ng-app="demoApp"> | |
<head> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.js"></script> | |
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.js"></script> | |
<script src="script.js"></script> | |
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | |
</head> | |
<body> | |
<div ng-controller="DirectiveDemoCtrl as demoCtrl"> |
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
<!DOCTYPE html> | |
<html ng-app="demoApp"> | |
<head> | |
<link rel="stylesheet" href="style.css"> | |
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.2.23/angular.js"></script> | |
<script src="http://angular-ui.github.io/bootstrap/ui-bootstrap-tpls-0.11.0.js"></script> | |
<script src="script.js"></script> | |
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | |
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css" rel="stylesheet"> |
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
steps: | |
1- get angular.min.js file from //cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular.min.js | |
2- get angular-mocks.js file from //cdnjs.cloudflare.com/ajax/libs/angular.js/1.3.3/angular-mocks.js | |
save these files to same location | |
3- run npm install | |
4- run node_modules/karma/bin/karma start |
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
<!DOCTYPE html> | |
<html ng-app="LoginApp"> | |
<head> | |
<link data-require="bootstrap-css@3.2.0" data-semver="3.2.0" rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" /> | |
<script data-require="angular.js@1.3.3" data-semver="1.3.3" src="https://ajax.googleapis.com/ajax/libs/angularjs/1.3.3/angular.min.js"></script> | |
<script src="rcSubmit.js"></script> | |
<script src="loginApp.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
var myApp = angular.module('myApp', []); | |
//service style, probably the simplest one | |
myApp.service('helloWorldFromService', function() { | |
this.sayHello = function() { | |
return "Hello, World!" | |
}; | |
}); | |
//factory style, more involved but more sophisticated |
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
def createTrie(*args): | |
""" | |
Create a trie by given words. | |
""" | |
rootTrie = {} | |
for word in args: | |
temp_trie = rootTrie | |
for letter in reversed(word): | |
temp_trie = temp_trie.setdefault(letter, {}) | |
temp_trie = temp_trie.setdefault('_leaf_', '_leaf_') |
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
import csv | |
import ast | |
from fractions import Fraction | |
dataList = [] | |
class DceSurvey: | |
"""docstring for Survey""" | |
def setData(self): |
OlderNewer