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
from flask.ext.wtf import Form | |
from wtforms import StringField, BooleanField | |
from wtforms.validators import DataRequired | |
class LoginForm(form): | |
openid = StringField('openid', validators=[DataRequired()]) | |
remember_me = BooleanField('remember_me', default=False) |
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
raceback (most recent call last): | |
File "./run.py", line 2, in <module> | |
from app import app | |
File "/home/egcornish/git/microblog/app/__init__.py", line 6, in <module> | |
from app import views | |
File "/home/egcornish/git/microblog/app/views.py", line 3, in <module> | |
from .forms import LoginForm | |
File "/home/egcornish/git/microblog/app/forms.py", line 5, in <module> | |
class LoginForm(form): | |
NameError: name 'form' is not defined |
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
from django.core.management.base import NoArgsCommand | |
class Command(NoArgsCommand): | |
help = 'reads from csv' | |
requires_model_validation = False | |
can_import_settings = True | |
def handle(self, **options): | |
print "say hello" |
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
<nav class='navbar navbar-default navbar-fixed-top'> | |
<div class="navlink container" id='mynavbar'> | |
<ul class='nav navbar-nav navbar-right'> | |
<button type='button' class='btn btn-default navbar-bth'><li>About</li></button> | |
<button type='button' class='btn btn-default navbar-bth'><li>Portfolio</li></button> | |
<button type='button' class='btn btn-default navbar-bth'><li>Contact</li></button> | |
</div> | |
</nav> | |
<div class='about-me container'> | |
<img class='small-image pull-right' src='http://i.imgur.com/EQS76FV.jpg'> |
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
public static int findMoNum(String mo) | |
{ | |
int numMo = 1; // default value for month will be January if invalid input is given | |
if (mo.equalsIgnoreCase("Jan")) | |
{ | |
numMo = 1; | |
} | |
else if (mo.equalsIgnoreCase("Feb")) | |
{ |
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
if (yearDiff == 0) // Both dates in same year | |
{ | |
monthsBetween = mm2 - mm1; // if year is same, day2 must be after day1 | |
if (monthValid && (monthsBetween == 0)) | |
{ | |
daysBetween = dd2 - dd1; | |
} | |
else if (monthValid) | |
{ | |
daysBetween = daysToEndOfMonth(dd1,mm1); |
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
else if ((yearDiff > 0) && (monthValid)) // Year2 is after Year 1 | |
{ | |
System.out.println(); | |
daysBetween = daysToEndOfMonth(dd1,mm1); | |
daysBetween = daysOfMonth(daysBetween,mm1+1,12+1); | |
daysBetween = daysOfMonth(daysBetween,1,mm2); | |
daysBetween += dd2; | |
daysBetween += ((yearDiff-1)*365);// *-* add in 365 days for each year inbetween yyyy1 and yyyy2 | |
} | |
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
public static void mergeSort_srt(int array[], int lo, int n) { | |
int low = lo; | |
int high = n; | |
if (low >= high) { | |
return; | |
} |
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
//Setup | |
var contacts = [ | |
{ | |
"firstName": "Akira", | |
"lastName": "Laine", | |
"number": "0543236543", | |
"likes": ["Pizza", "Coding", "Brownie Points"] | |
}, | |
{ |
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
//Setup | |
var contacts = [ | |
{ | |
"firstName": "Akira", | |
"lastName": "Laine", | |
"number": "0543236543", | |
"likes": ["Pizza", "Coding", "Brownie Points"] | |
}, | |
{ |
OlderNewer