An easy interface to use all of chartjs.org's charts.
Inspired by my own pain and suffering of trying to add a simple chart to dashing
import Spacer from '@/components/spacer'; | |
import { | |
lvlxPrimaryDarkGray, | |
lvlxPrimaryGreen1, | |
lvlxWhite, | |
} from '@/utils/colors'; | |
import globalStyles from '@/utils/globalStyles'; | |
import {faLongArrowLeft} from '@fortawesome/pro-regular-svg-icons'; | |
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'; | |
import * as React from 'react'; |
<div> | |
<label for="myAnnouncement">Announcement</label> | |
<input id="myAnnouncement" type="text" /><br /> | |
<input type="button" value="Post Announcement" /> | |
</div> | |
<script type="text/javascript" > | |
// Use this to delay execution until the file sp.js has loaded. Also a good way to keep your context free of globals. | |
ExecuteOrDelayUntilScriptLoaded(function() { | |
// get announcement text |
<script id="if_equals_example" type="text/x-handlebars-template"> | |
{{#if_equals objectType 'message'}} | |
<div class="message"> | |
Message | |
</div> | |
{{else}} | |
{{/if_equals}} | |
</script> |
//return an array of objects according to key, value, or key and value matching | |
function getObjects(obj, key, val) { | |
var objects = []; | |
for (var i in obj) { | |
if (!obj.hasOwnProperty(i)) continue; | |
if (typeof obj[i] == 'object') { | |
objects = objects.concat(getObjects(obj[i], key, val)); | |
} else | |
//if key matches and value matches or if key matches and value is not passed (eliminating the case where key matches but passed value does not) | |
if (i == key && obj[i] == val || i == key && val == '') { // |
// GeoChart from https://google-developers.appspot.com/chart/interactive/docs/gallery/geochart | |
// Try out by pasting code into: https://code.google.com/apis/ajax/playground/?type=visualization#geo_chart | |
function drawVisualization() { | |
var data = google.visualization.arrayToDataTable([ | |
['State', 'Foo Factor'], | |
['US-IL', 200], | |
['US-IN', 300], | |
['US-IA', 20], |
Inspired by my own pain and suffering of trying to add a simple chart to dashing
<html> | |
<head> | |
<title>Bad Word Filter</title> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.2/jquery.min.js"></script> | |
<script language="JavaScript" type="text/javascript"> | |
$(function(){ | |
$filterBox = $('#filterBox'); | |
$frmWords = $('#frmWords'); | |
$thewords = $('#thewords'); | |
$buttonCheck = $('#buttonCheck').click(function(){ |
This repo's location has changed.
// using SendGrid's PHP Library | |
// https://github.com/sendgrid/sendgrid-php | |
<?php | |
// If you are using Composer | |
require 'vendor/autoload.php'; | |
// If you are not using Composer (recommended) | |
// require("path/to/sendgrid-php/sendgrid-php.php"); | |
$from = new SendGrid\Email("Example User", "[email protected]"); |
Use these rapid keyboard shortcuts to control the GitHub Atom text editor on Mac OSX.