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
(define (fizzbuzz start end) ( | |
(define (print x) ( ..something.. )) | |
(cond | |
(= (mod start 15) 0) (print "fizzbuzz")) | |
(= (mod start 3) 0) (print "fizz")) | |
(= (mod start 5) 0) (print "buzz")) | |
((print start)) | |
) | |
(cond | |
((< start end) ((fizzbuzz (+ 1 start) end))) |
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
def fizzbuzz (start, end): | |
if start % 15 == 0: | |
print 'fizzbuzz' | |
elif start % 3 == 0: | |
print 'fizz' | |
elif start % 5 == 0: | |
print 'buzz' | |
else: | |
print start | |
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
def fizzbuzz(start, ending) | |
if (start % 15 == 0) | |
puts 'Fizzbuzz' | |
elsif (start % 5 == 0) | |
puts 'Buzz' | |
elsif (start % 3 == 0) | |
puts 'Fizz' | |
else | |
puts start | |
end |
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
from mercurial import demandimport; demandimport.enable() | |
from mercurial.hgweb.hgwebdir_mod import hgwebdir | |
CONFIG = 'C:\Mercurial\hgwebdir\hgweb.config' | |
application = hgwebdir(CONFIG) |
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
# ---- HTTPS -- Mercurial Virtual Host ---- | |
<VirtualHost *:443> | |
ServerName hg.yourdomain.com:443 | |
ServerAdmin [email protected] | |
DocumentRoot "C:\Mercurial\repositories" | |
WSGIScriptAliasMatch ^(.*) C:\Mercurial\hgwebdir\hgwebdir.wsgi$1 | |
<Directory "C:\Mercurial\hgwebdir"> |
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
// When the toolbar button is clicked... | |
$('#newNickButton').click(function() { | |
var newNick = getNewNickname(); | |
setNewNickname(newNick); | |
} | |
function getNewNickname() { | |
// Build dialog markup | |
var win = $('<div><p>Enter your new nickname</p></div>'); |
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
// When the toolbar button is clicked... | |
$('#newNickButton').click(function() { | |
getAndSetNewNickname(null); | |
} | |
function getAndSetNewNickname(nick) { | |
if (typeof(nick) === 'undefined') { | |
showNickDialog(function(value){ | |
getAndSetNewNickname(value); | |
}) |
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
# | |
# A python module to implement recursive search/copy of files | |
# | |
import datetime | |
import shutil | |
import os | |
import re | |
class DirSearch(object): |
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
import os | |
import sys | |
from dirsearch import DirSearch | |
# Global variables | |
PREFIX = '' | |
# | |
# Print the basic help to the screen |
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
from django.db import models | |
from django.shortcuts import _get_queryset | |
class ChildAwareModel(models.Model): | |
class Meta: | |
abstract = True | |
def get_child_model(self): | |
""" | |
Attempts to determine if an inherited model record exists. |
OlderNewer