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
<style>div.staff-info {margin: 10px 0px 0px 0px;} | |
div.colComm { | |
position: relative; | |
width: 100%; | |
min-height: 100px; | |
} | |
div.colComm > div { | |
width: 49.5%; | |
} | |
div.colComm > div:nth-of-type(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
from openpyxl import Workbook | |
from openpyxl.styles import PatternFill | |
from openpyxl.utils import get_column_letter | |
from PIL import Image | |
im = Image.open('logo-small.png') | |
pix = im.load() | |
WIDTH = im.size[0] | |
HEIGHT = im.size[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
[info] POST /api/price | |
[debug] Processing with HomeworkWeb.PricesController.create/2 | |
Parameters: %{"_json" => [%{"amount" => 500, "category" => "Sell", "type" => "P"}]} | |
Pipelines: [:api] | |
[info] Sent 400 in 10ms | |
[debug] ** (Phoenix.ActionClauseError) no function clause matching in HomeworkWeb.PricesController.create/2 | |
The following arguments were given to HomeworkWeb.PricesController.create/2: | |
# 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
const stringCheck = (strBig, strSmall) => { | |
let count = 0 | |
const bigStrLen = strBig.length | |
const smallStrLen = strSmall.length | |
let tempString = "" | |
for(let i=0; i<bigStrLen - smallStrLen + 1; i++ ) { | |
if (strBig[i] === strSmall[0]) { | |
tempString = strBig.slice(i, i + strSmall.length) |
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
require 'gosu' | |
FONT_COLOR = 0xff_ffff00 | |
class SpaceInvader < Gosu::Window | |
def initialize | |
super 640, 480 | |
self.caption = "Space Invaders" | |
@text_message = "Hello world" | |
@message = Gosu::Font.new(20) | |
@x = 300 |
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
require 'gosu' | |
FONT_COLOR = 0xff_ffff00 | |
class SpaceInvader < Gosu::Window | |
def initialize | |
super 640, 480 | |
self.caption = "Space Invaders" | |
@message = Gosu::Font.new(20) | |
coordinate_array = [] | |
i = 0 |
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
#for ruby gosu | |
def collision?(barrier_x, barrier_y) | |
(barrier_x.between?(@x - 50, @x) and barrier_y.between?(@y, @y + 50)) || (barrier_x.between?(@x, @x + 50) && barrier_y.between?(@y - 50, @y)) || (barrier_x.between?(@x - 50, @x) && barrier_y.between?(@y - 50, @y)) || (barrier_x.between?(@x, @x + 50) && barrier_y.between?(@y, @y + 50)) | |
end |
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
require 'gosu' | |
TICKS_PER_JUMP = 50 | |
FONT_COLOR = 0xff_ffff00 | |
class GameWindow < Gosu::Window | |
def initialize | |
super 640, 480 | |
self.caption = "Runner" | |
@floor = [Floor.new(50, 400), Floor.new(350, 400), Floor.new(650, 400)] | |
@player = Player.new(75, 200) |
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
<ul> | |
<%= @list_of_names.each do |name| %> | |
<form action="/save_the_names" method="post"> | |
<li><%= name %></li><input type="checkbox" name="name_i_want_to_save" | |
<% end %> | |
<input type="submit"> | |
</form> | |
</ul> |
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
require 'sinatra' | |
#this is the number that goes up or down in value | |
$thing = 1 | |
#this gets the index page | |
# | |
get "/" do | |
erb :index | |
#the link to this gist code => https://gist.github.com/ceejaay/801c2e5de59710b1a402#file-index-erb | |
end |
NewerOlder