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
Single value | |
(?<=webSecurityToken":")(?:[^\\"]+|\\.)* | |
All key, value pairs | |
(?!":")([^\\":,]+|\\.) | |
Email Validation | |
.+@.+\..+[^.] |
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
<html> | |
<head></head> | |
<body> | |
<div id="pieChart"></div> | |
<script src="//cdnjs.cloudflare.com/ajax/libs/d3/3.4.4/d3.min.js"></script> | |
<script src="https://github.com/benkeen/d3pie/blob/master/d3pie-source/d3pie-source.js"></script> | |
<script> | |
var pie = new d3pie("pieChart", { |
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
// https://github.com/taylorsmithgg | |
// A few code snippets from a current CMS project that I am developing for Detroit Labs that showcase using Angular | |
// to interact with RESTful services to populate a map dynamically. | |
// In lieu of Express, I am currently using Meteor, which supports 3-way data bindings. | |
// I am also using Angular Material for its directives and Babel for polyfill support | |
$scope.$on('mapInitialized', function(event, evtMap) { | |
map = evtMap; | |
map.singleInfoWindow = true; |
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 java.util.Scanner; | |
class CalculateTuition { | |
public static void main(String[] args) { | |
int tuition = 0; | |
System.out.println("How many total hours are you taking?"); | |
Scanner scanner = new Scanner(System.in); | |
int creditHour = Integer.parseInt(scanner.nextLine()); | |
if(creditHour > 0){ |
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 java.lang.reflect.Array; | |
import java.util.Scanner; | |
import java.util.Arrays; | |
class scratch_10{ | |
public static void main(String[] args) { | |
Scanner scanner = new Scanner(System.in); | |
String[] numbers = scanner.nextLine().split(" "); | |
String[] result = (String[]) Array.newInstance(String.class, numbers.length + 1); | |
System.arraycopy(numbers, 0, result, 0, numbers.length); |
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 java.io.IOException; | |
import java.util.Scanner; | |
/** | |
Write a description of class Game here. | |
@author (your name) | |
@version (a version number or a date) | |
*/ | |
public class Game | |
{ |
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
'use strict' | |
const gulp = require('gulp'); | |
const concat = require('gulp-concat'); | |
const uglify = require('gulp-uglify'); | |
const imagemin = require('gulp-imagemin'); | |
const sourcemaps = require('gulp-sourcemaps'); | |
const del = require('del'); | |
const gutil = require('gulp-util'); | |
const babel = require('gulp-babel'); |
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
use std::io; | |
use std::io::prelude::*; | |
use std::fs::File; | |
// error[E0277]: the trait bound `(): std::ops::Carrier` is not satisfied | |
// --> src/main.rs:43:17 | |
// | | |
// 43 | let mut f = File::open("foo.txt")?; | |
// | ---------------------- | |
// | | |
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
fn write_binary(vector: Vec<u8>) -> Result<(), std::io::Error> { | |
let mut f = OpenOptions::new() | |
.create(true) | |
.write(true) | |
.read(true) | |
.open("foo.bin") | |
.unwrap(); | |
println!("The file: {:?}", f); |
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
#------------------------------------------------------------------------------ | |
# PUPOSE: Function: Divides by 2^10 until < 1024 and then append metric suffix | |
# AUTHOR: Joe Negron - LOGIC Wizards ~ NYC | |
# LICENSE: BuyMe-a-Drinkware: Dual BSD or GPL (pick one) | |
# USAGE: byteMe (bytes) | |
# ABSTRACT: Converts a numeric parameter to a human readable format. | |
#------------------------------------------------------------------------------ | |
#------------------------------------------------------------------------------ |
OlderNewer