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 | |
namespace App\Nova\Actions; | |
use Illuminate\Bus\Queueable; | |
use Laravel\Nova\Actions\Action; | |
use Illuminate\Support\Collection; | |
use Laravel\Nova\Fields\ActionFields; | |
use Illuminate\Queue\SerializesModels; | |
use Illuminate\Queue\InteractsWithQueue; |
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
$url = 'http://server.com/path'; | |
$data = array('key1' => 'value1', 'key2' => 'value2'); | |
// use key 'http' even if you send the request to https://... | |
$options = array( | |
'http' => array( | |
'header' => "Content-type: application/x-www-form-urlencoded\r\n", | |
'method' => 'POST', | |
'content' => http_build_query($data) | |
) |
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
echo "Installing Discord Bot Basics" | |
echo "Creating Auth file" | |
touch auth.json | |
echo -e '{ | |
\t"token":"" | |
}' >> auth.json | |
echo "Creating node.js package file" | |
touch package.json |
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
<!doctype html> | |
<html lang="en"> | |
<head> | |
<!-- Required meta tags --> | |
<meta charset="utf-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
<!-- Bootstrap CSS --> | |
<link rel="stylesheet" href="css/bootstrap.min.css"> |
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
############################################################ | |
# | |
# Name: Dennis Sauve | |
# Date: 01/30/17 | |
# Assignment: Histogram | |
# Class: CIS282 | |
# Description: Histogram Assignment | |
# | |
############################################################ |
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
@media screen and (min-width: 768px) { | |
/* Class defining .panel container row */ | |
.panel-uniform-height { | |
display: flex; | |
} | |
/* Regardless of content, panels will of be equal height */ | |
.panel-uniform-height .panel{ | |
height: 100%; |
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
# Challenge #353 [Easy] Closest String | |
# Objective: Given n number of strings, find the string that is the 'Geometric Center' by Hamming Distance | |
# Approach: Iterate through strings in order and compare, adding the differences between string a and b to their respective totals | |
# Note: Storing the differences for both at the same time reduces the number of comparisons performed. | |
def find_hamming_center(input) | |
input_array = input.split("\n") | |
num_str = input_array.slice!(0).to_i | |
diff_arr = Array.new(num_str, 0)# <- array to store sum of differences for each string |
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
require 'to_words' | |
require_relative 'roman.rb' | |
100.times do |n| | |
# make the test def | |
puts "def test_#{n}s" if n % 10 == 0 | |
# print the assertions | |
puts "\tassert_equal( \"#{n.to_roman}\", #{n}.to_roman, \"#{n.to_words.upcase}\")" | |
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
# Bootstrap 3.3 HTML form Generator | |
def get_form_meta() | |
# Ask user for the form helper_method | |
puts "What method are you using for your form?" | |
form_method = gets.chomp! | |
# Ask user for the form method | |
puts "\nWhat action is the form performing? " | |
form_action = gets.chomp! |
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; | |
public class Main { | |
public static void main(String[] args) { | |
int counter = 1; | |
while(counter<5){ | |
System.out.println("Hello World!"); | |
System.out.println("Hello Dennis!"); |