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
//concatenante strings, column values | |
UPDATE table | |
SET column = CONCAT('text', columnname, 'text') | |
//lowercase values in one column | |
UPDATE table SET column = LOWER(column) | |
//update column value based on value matching to same column or different column | |
UPDATE table SET column = value WHERE column = value | |
UPDATE table SET column = value WHERE column IS NULL |
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
function jumpTime(type,value) { | |
var model = VMM.Timeline.DataObj.data_template_obj.timeline.date; | |
var x = -1; // | |
$(model).each(function(i,j) { | |
var currentDate = j.startDate.split('/'); | |
if (currentDate[type] == value ) { | |
x++; | |
if (x == 0) { | |
window.location.hash = i+1 // +1 to accommodate title slide count | |
} |
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
var that = this; | |
$(window).bind( 'hashchange', function(e) { | |
var new_hash_slide = location.hash.slice(1); | |
that.setSlide(new_hash_slide); | |
VMM.Timeline.Config.current_slide = new_hash_slide; | |
}); |
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
function() { | |
var content_h = $("#myframe", window.parent.document).contents().find("body").height(); | |
$('#myframe', window.parent.document).css( "height", content_h+"px" ); | |
} |
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
$(document).ready(function () { | |
$(window).scroll(function(e){ | |
$element = $('#element-id'); | |
var init_height = 250; | |
if ($(this).scrollTop() > init_height && $element.css('position') != 'fixed'){ | |
$('#element-id').css({'position': 'fixed', 'top': '0px'}); | |
} else if ($(this).scrollTop() < init_height && $element.css('position') == 'fixed'){ | |
$('#element-id').css({'position': 'relative'}); | |
} | |
}); |
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
function convert_eng_date($date, $format) { | |
$return = date($format, strtotime($date)); | |
return $return; | |
} | |
$newdate = convert_eng_date($olddate, "M. d, Y"); //format = Feb. 12, 2013 | |
echo $newdate |
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
function parseDate(dateString) { | |
//first slice off hours and minutes; only take YYYY-MM-DD | |
var strip_date = dateString.slice(0,10); | |
var dateArray = strip_date.split("-"); | |
// create instance year, month and day as parameters | |
var date = new Date(Number(dateArray[0]), Number(dateArray[1]) - 1, Number(dateArray[2])); | |
return date; | |
} |
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 | |
/* | |
* Converts CSV to JSON | |
* This is forked from @robflaherty's csv-to-json.php gist: https://gist.github.com/robflaherty/1185299 | |
* Fork Modification $feed = $_GET["file"] to fetch feed url via a url variable https://gist.github.com/cherihung/5287225 | |
*/ | |
header('Content-type: application/json'); | |
// Get CSV feed location in query string passed |
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
.rightArrow(@color, @alpha, @size) { | |
left: 100%; | |
border: solid transparent; | |
content: " "; | |
height: 0; | |
width: 0; | |
position: absolute; | |
pointer-events: none; | |
border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); | |
border-left-color: @color; |
OlderNewer