Skip to content

Instantly share code, notes, and snippets.

View jmiramant's full-sized avatar

Josh Miramant jmiramant

View GitHub Profile
var UID_GEN = {
stringBuilder: function (projNum, sowNum, uid) {
  var id = (uid) ? uid.toUpperCase() : "";
  return id + "-" + projNum + "." + sowNum;
},
generateUID: function (projNum, sowNum, exisitngId) {
var pNum, sNum;
projNum ? pNum = projNum : pNum = "01";
sowNum ? sNum = sowNum : sNum = "01";
    if (exisitngId) return this.stringBuilder(pNum, sNum, exisitngId);

Keybase proof

I hereby claim:

  • I am jmiramant on github.
  • I am blueorangeco (https://keybase.io/blueorangeco) on keybase.
  • I have a public key ASAih_UMrdAbPGZzbDVeE5HQSkWjCUyut7RN8OUH5j9AKQo

To claim this, I am signing this object:

63a9f0ea7bb98050796b649e85481845
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

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:

#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;
#include <math.h> /* sqrt */
//Constants//
// Coordinates
//AXIS Units Ticks
const int X_AXIS = 0;
const int Y_AXIS = 0;
//Motors
var xAxis = d3.svg.axis()
.scale(x)
.orient("top")
.tickFormat(function(d) {
return d3.time.format("%b %d")(new Date(d))
});
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
@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')