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 "regexp" | |
var r, _ = regexp.Compile("\\\\|/|:|\\*|\\?|<|>") | |
// MakeFilenameWindowsFriendly removes characters not permitted in file/directory names on Windows | |
func MakeFilenameWindowsFriendly(name string) string { | |
return r.ReplaceAllString(name, "") | |
} |
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 ( | |
"path" | |
"path/filepath" | |
) | |
func GetFullPath(filename string) string { | |
// baseDir to be some base directory | |
return filepath.FromSlash(path.Join(baseDir, filename)) | |
} |
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
<?php | |
class BusinessCalendar | |
{ | |
private $debugMessage; | |
private $debug = false; | |
public function __construct($debug = false) | |
{ | |
$this->debug = $debug; |
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 gradeLetters = ['a', 'b+', 'b', 'c+', 'c', 'd', 'f', 'af', 'wf'], | |
gradePoints = [4, 3.5, 3, 2.5, 2, 1, 0, 0, 0]; | |
function getNumCoursesToBeEntered() { | |
"use strict"; | |
var numCourses = 0, | |
input = ""; | |
do { | |
input = prompt("Enter number of subjects?"); |