This file contains hidden or 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> | |
<title>Flapper News</title> | |
<link href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css" rel="stylesheet"> | |
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.2.19/angular.min.js"></script> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/angular-ui-router/0.2.10/angular-ui-router.js"></script> | |
<script src="app.js"></script> | |
<style> .glyphicon-thumbs-up { cursor:pointer } </style> | |
</head> |
This file contains hidden or 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
*.pyc | |
bin/ | |
include/ | |
lib/ |
This file contains hidden or 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> | |
<head> | |
<meta charset="utf-8" /> | |
<meta name="author" content="Martin Bean" /> | |
<title>Twitter’s Bootstrap with Ryan Fait’s Sticky Footer</title> | |
<link rel="stylesheet" href="css/bootstrap.min.css" /> | |
<style> | |
html, body { | |
height: 100%; |
This file contains hidden or 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
myfile = open("../myfile.csv", "rb") | |
reader = csv.reader(myfile) | |
for row in reader: | |
if rownum == 0: | |
header = row | |
# depending upon the format of the csv file you might have to split things as well, if the file is not formatted properly, which generally is the case. | |
else: | |
colnum = 0 |
This file contains hidden or 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
// will get the id of the elements in the checkbox iff they are selected. | |
the html should be: | |
<input type="checkbox" name="check_box_17" value="17"> | |
<input type="checkbox" name="check_box_18" value="18"> | |
<input type="checkbox" name="check_box_19" value="19"> | |
$("#delete-clients").click(function() { | |
var arc = []; | |
$("input:checked").each(function(i, obj) { arc.push($(obj).val()) }); |
This file contains hidden or 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
Problem Statement: | |
a user belongs to one/many user_groups and one/many user_types | |
a channel belongs to one/many user_groups and one/many user_types | |
a video belongs to one/many channels | |
when a user logs in, he should be showed video from the channel which matches his user_group and user_type. | |
Solution done in django shell: | |
uobj = UserProfile.objects.get(user__username = "**") | |
ug = uobj.belongs_to_user_group | |
ut = uobj.belongs_to_user_type.all() |
This file contains hidden or 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
/* | |
* | |
* Author: Scott Borduin, Lioarlan, LLC | |
* License: GPL (http://www.gnu.org/licenses/gpl.html) -or- MIT (http://www.opensource.org/licenses/mit-license.php) | |
* | |
* Release: 0.15 | |
* | |
* Acknowledgement: Based partly on public contributions from members of the Sencha.com bulletin board. | |
* |
This file contains hidden or 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
/* | |
* | |
* Author: Scott Borduin, Lioarlan, LLC | |
* License: GPL (http://www.gnu.org/licenses/gpl.html) -or- MIT (http://www.opensource.org/licenses/mit-license.php) | |
* | |
* Release: 0.15 | |
* | |
* Acknowledgement: Based partly on public contributions from members of the Sencha.com bulletin board. | |
* |