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
<template> | |
<div> | |
<div> | |
<div class="rounded" style="background-color:white; border: 1px solid #999; height: 200px;font-size:128px;text-align:center" @drop.stop.prevent="drop" @dragenter.stop.prevent="dragEnter" @dragleave.stop.prevent="dragLeave" @dragover.stop.prevent=""> | |
<img :src="imageData" v-if="imageData" ref="preview" :width="imageWidth" :height="imageHeight"> | |
<i class="fas fa-image" v-else="imageData"></i> | |
</div> | |
</div> | |
<input type="file" ref="fileInput" class="form-control d-none" v-bind:class="{'is-invalid': error}" @change="onFileChange"> | |
<div class="invalid-feedback" :class="{'d-block': error}" v-text="error" v-if="error"></div> |
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 | |
if ($argc < 2) { | |
echo "Please enter a number of words for the speech\n"; | |
exit(1); | |
} | |
$dictionary = explode(PHP_EOL, `cat /usr/share/dict/words`); |
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 Foo | |
{ | |
private $bar; | |
public function setBar($bar) | |
{ | |
$this->bar = $bar; | |
} |
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
[ | |
["http://localhost:8000/redirect1/" , 301, "http://localhost:8000"], | |
["http://localhost:8000/redirect2/" , 302, "http://localhost:8000"], | |
["http://localhost:8000/something" , 404] | |
] |
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
Show hidden characters
[ | |
{ "button": "button1", "modifiers": ["alt"], "command": "goto_definition", "press_command": "drag_select" } | |
] |
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
// starts with spotify:track | |
// used defined input | |
input = 'spotify:track:6MdqqkQ8sSC0WB4i8PyRuQ'; | |
var parts = input.match(/spotify\:track\:(.+)/) | |
if (parts.length !== 2) { | |
return input; | |
} |
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 | |
// If you do this | |
if ($a) { | |
if ($b) { | |
//code here | |
} else { | |
//code here | |
} | |
} else { |
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
//Brian McBride | |
//Ping Pong application | |
//9/15/08 | |
#include <pthread.h> | |
#include <iostream> | |
#include <string> | |
#include <unistd.h> | |
#include <stdio.h> | |
#include <stdlib.h> |
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
#################################### | |
# BASIC REQUIREMENTS | |
# http://graphite.wikidot.com/installation | |
# http://geek.michaelgrace.org/2011/09/how-to-install-graphite-on-ubuntu/ | |
# Last tested & updated 7/13/2012 | |
#################################### | |
sudo apt-get update | |
sudo apt-get upgrade |
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 User { | |
} | |
function setUserName(User $user, $new_username) { | |
$user->Profile->setUserName($new_username); | |
} |
NewerOlder