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
function Challenge(name){ | |
var self = this; | |
self.name; | |
} | |
function GBKAuthedViewModel() { | |
var self = this; | |
// other stuff... |
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
#!/usr/bin/env bash | |
# for each zip in the folder | |
# unpack to temp loc | |
# for each sql | |
# find "TYPE=" and replace with "ENGINE=" | |
# repack and replace original | |
# remove temp loc | |
FILES=$1 |
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
// we have two counters, so we can tie people while still incrementing the pos | |
$rank = 1; | |
$pos_count = 1; | |
// set the initial visit count | |
$visit_count = $leaderboard[0]['visit_count']; | |
foreach ($leaderboard as $lUser) { | |
if ($lUser['visit_count'] != $visit_count) { | |
$visit_count = $lUser['visit_count']; |
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
PHP Fatal error: Uncaught exception 'Exception' with message 'DateTime::__construct(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected 'UTC' for 'UTC/0.0/no DST' instead' in /tmp/sf2standard/cache/classes.php:9010#012Stack trace:#012#0 /tmp/sf2standard/cache/classes.php(9010): DateTime->__construct()#012#1 /tmp/sf2standard/cache/classes.php(9110): Monolog\Logger->addRecord(500, 'Exception: Date...', Array)#012#2 /var/www/e079e8ba3a84ff32f9515c7d222542ba7afe74e2/app-server/vendor/symfony/src/Symfony/Component/HttpKernel/EventListener/ExceptionListener.php(53): Monolog\Logger->crit('Exception: Date...')#012#3 [internal function]: Symfony\Component\HttpKernel\EventListener\ExceptionListener->onKernelException(Object(Symfony\Component\HttpKernel\Event\GetResponseForExc |
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
function User() { | |
var self = this; | |
self.dob = ko.observable(''); | |
} | |
function UserViewModel() { | |
self.user = ko.observable(new User); | |
self.dobEdittable = ko.computed({ | |
read: function() { |
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
// js | |
var helloParam = function(param) { | |
return "hello "+param; | |
} | |
console.log(helloParam("world")); | |
// php | |
function helloPram($param) { | |
return "hello ".param; |
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
# ~/.bashrc: executed by bash(1) for non-login shells. | |
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc) | |
# for examples | |
# If not running interactively, don't do anything | |
[ -z "$PS1" ] && return | |
# don't put duplicate lines in the history. See bash(1) for more options | |
# don't overwrite GNU Midnight Commander's setting of `ignorespace'. | |
HISTCONTROL=$HISTCONTROL${HISTCONTROL+:}ignoredups |
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
class UserController extends Controller | |
{ | |
public function editAction() | |
{ | |
$user = $this->container->get('security.context')->getToken()->getUser(); | |
$form->setData($user); | |
$req = $this->container->get("request"); | |
if($req->getMethod() == 'POST'){ | |
$reqObj = $req->request; | |
$form->bind($reqObj); |
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
entry = input("Enter a Mayan date: ") | |
i=0 # this is used to track our position in the string | |
output = "" # start with output set to nothing | |
while entry[i:]: | |
# if we hit a space, then we've got to the end of that number | |
# print it out and reset the output | |
if entry[i] == " ": | |
print (output) |
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
var insertCount = 0; | |
document.addEventListener("DOMNodeInserted", function( e ) { | |
insertCount++; | |
console.log(insertCount); | |
}, false); |
OlderNewer