Skip to content

Instantly share code, notes, and snippets.

View jmiramant's full-sized avatar

Josh Miramant jmiramant

View GitHub Profile
@import url("//fast.fonts.com/t/1.css?apiType=css&projectid=bc3e3e03-3975-457f-8c8c-431a71a361b0");html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video
{margin:0;padding:0;border:0;font:inherit;font-size:100%;vertical-align:baseline}
html
{line-height:1}
ol,ul
{list-style:none}
table
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function
#
BLACK="\[\033[0;30m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
YELLOW="\[\033[0;33m\]"
BLUE="\[\033[0;34m\]"
DEFAULT="\[\033[0;00m\]"
@jmiramant
jmiramant / SomeBadAssSass.sass
Last active August 29, 2015 14:01
I love sass! Just showing off a cool function.
$journey_states: complete, in-progress, current
$joureny_packets: strengths, others, networking, approach, coworker
$joureny_colors: blue, green, pink, yellow, purple
@each $packet in $joureny_packets
@each $state in $journey_states
$i: index($joureny_packets, $packet)
@if $state == 'complete'
.#{$state}
&##{$packet}
background-image: url('/assets/journey/#{nth($joureny_colors, $i)}-gem.png')
def self.request(prev_day)
@date = (Date.today - (prev_day)).strftime("%Y-%m-%d")
parameters = [
{
account_id: 156021,
'app_id' => "892559034",
start_date: @date,
end_date: @date
var xAxis = d3.svg.axis()
.scale(x)
.orient("top")
.tickFormat(function(d) {
return d3.time.format("%b %d")(new Date(d))
});
#include <math.h> /* sqrt */
//Constants//
// Coordinates
//AXIS Units Ticks
const int X_AXIS = 0;
const int Y_AXIS = 0;
//Motors
#navpurple .responsive-menu-container li {
padding-left: 10px;
float: none;
transition: margin-bottom 0.5 ease-in-out;
}
#navpurple > ul.responsive-menu-container > li > a {
padding: 22px 42px;
height: 62px;

Hi Student,

You've stumbled upon one of the many qwerks of JavaScript. This trips all of us JavaScript developers up. Let's look closer at the bug.

#####What's happening If you put a console.log() to reveal the value of the btnNum variable when you click each button, you'll discover it's 3 despite what button you choose. So why is this?

You're right on track with your thinking here. I see you were expecting for the loop counter btnNum to correspond to each respective value (index) in your prizes array.

There are two things that causing this bug:

SELECT
CNTC.ContactID,
CF.FocusInstanceID,
group_concat(DISTINCT Country.name SEPARATOR ', ') AS country,
group_concat(DISTINCT EquityInstrument.name SEPARATOR ', ') AS equityInstrument,
FROM
ContactFocus AS CF
JOIN
Contact AS CNTC
ON CF.ContactID = CNTC.ContactID
63a9f0ea7bb98050796b649e85481845