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
function factorial(n) { | |
if (n < 0 || typeof n != 'number') | |
{ return null; } | |
if (n === 0) | |
{ return 1;} | |
for (var i = n - 1; i > 0; i--) | |
{ n *= i; } | |
return n; | |
} |
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
window.addEventListener('load', function() { | |
// array for <select>s | |
var selects = []; | |
// array for svg elements you want the <select>s to be swapped-in for | |
var boxes = [document.querySelector('#swapForNames'), document.querySelector('#swapForDistances')]; | |
// make <select> elements, append them, set positions | |
boxes.forEach(function(box, idx) { | |
var sel = document.createElement('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
function myFunction() { | |
function firstGuy() { | |
return 'first one'; | |
} | |
function secondGuy() { | |
return 'second one'; | |
} | |
function thirdGuy() { | |
return 'third one'; | |
} |
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
git clone https://github.com/sheminusminus/deana.ninja |
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 React, {Component} from 'react'; | |
import ReactDOM from 'react-dom'; | |
// this url will need to be relative the the index.html file | |
// or you can a webpack image-loader for using urls relative to src files | |
const background = './shutterstock_383791612.jpg'; | |
const sectionStyle = { | |
// i'm using vw and vh here, but it's a personal preference | |
// percentages will also work if you give the parent container some dimensions |
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
// | |
// ViewController.swift | |
// Norberto | |
// | |
// Created by Emily Kolar on 3/3/17. | |
// Copyright © 2017 emilykolar. All rights reserved. | |
// | |
import UIKit |
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 | |
$actual_link = (isset($_SERVER['HTTPS']) ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"; | |
$path = parse_url($actual_link)['path']; | |
?> | |
<div id= "menu"> | |
<ul> | |
<li><a class="<?php if ($path == '/home.php') { echo 'active'; }?>" href="home.php">Home</a></li> | |
<li><a class="<?php if ($path == '/tv.php') { echo 'active'; }?>" href="tv.php">TV</a></li> | |
<li><a class="<?php if ($path == '/watch.php') { echo 'active'; }?>" href="watch.php">Watch</a></li> | |
<li><a class="<?php if ($path == '/laptop.php') { echo 'active'; }?>" href="laptop.php">laptop</a></li> |
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
{ | |
"development": { | |
"username": "", | |
"password": "", | |
"database": "", | |
"host": "localhost", | |
"dialect": "mysql" | |
}, | |
"test": { | |
"username": "", |
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
const path = require('path'); | |
module.exports = { | |
'config': path.resolve(__dirname, 'seq.json'), | |
'migrations-path': path.resolve(__dirname, 'db/migrations'), | |
'models-path': path.resolve(__dirname, 'db/models'), | |
'seeders-path': path.resolve(__dirname, 'db/seeders'), | |
}; |
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
/** | |
* eventRouter.js | |
* @file Handles any requests to route /api/events. Server file. | |
*/ | |
const axios = require('axios'); | |
const router = require('express').Router(); | |
// events the user can alter, seeded with event 2 | |
// of course this would normally come from a database |
OlderNewer