A Pen by Rachel Cantor on CodePen.
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 onOpen() { | |
var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}]; | |
var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
ss.addMenu("Fitness Diaries", menuEntries); | |
} | |
function createDocFromSheet(){ | |
var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id | |
var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries | |
// get the data from an individual user |
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
/** | |
* The onOpen function runs automatically when the Google Docs document is | |
* opened. Use it to add custom menus to Google Docs that allow the user to run | |
* custom scripts. For more information, please consult the following two | |
* resources. | |
* | |
* Extending Google Docs developer guide: | |
* https://developers.google.com/apps-script/guides/docs | |
* | |
* Document service reference documentation: |
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
<link rel="import" href="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
</style> | |
</template> | |
<script> |
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
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../core-ajax/core-ajax.html"> | |
<polymer-element name="my-element"> |
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
def defineSenatorTrack() = | |
{ | |
// for every committee | |
committeeIssueSenatorMap.foreach( committee => { | |
committee._2.foreach(issueConf => { | |
issueConf._2.foreach( senator => { | |
val max = committee._2.foldLeft(0)( (result, current) => result + current._2.filter(_.faction.name.equalsIgnoreCase(senator.faction.name)).size) / 2 | |
// does the senator fit in subcommittee 1 | |
if(doesSenatorFitInSubCommittee(senator.faction.name, max, senator, committee._1.name,SUBCOMMITTEE_1_KEY)) { | |
// add |
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
javascript:(function() { | |
var a = document.getElementById('_post_meta_image_alt_text_0'); | |
if (a) { | |
a.value = 'Some alt text'; | |
} | |
var b = document.getElementById('_post_meta_image_desktop_0'); | |
if (b) { | |
b.value = 'https://placehold.it/1400x600/003003/ffffff'; | |
} | |
var c = document.getElementById('_post_meta_image_desktop_mobile_tile_0'); |
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
/** | |
* Filters the next, previous and submit buttons. | |
* Replaces the forms <input> buttons with <button> while maintaining attributes from original <input>. | |
* | |
* @param string $button Contains the <input> tag to be filtered. | |
* @param object $form Contains all the properties of the current form. | |
* | |
* @return string The filtered button. | |
*/ | |
add_filter( 'gform_next_button', 'input_to_button', 10, 2 ); |
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
import React, {Component} from 'react' | |
import {connect} from 'react-redux' | |
import PropTypes from 'prop-types' | |
import {reduxForm, change} from 'redux-form' // import the action creator you need | |
import CountryPicker from '../components/CountryPicker' | |
class CountriesContainer extends Component { | |
static propTypes = { | |
changeFieldValue: PropTypes.func.isRequired | |
} |
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
import React, {Component} from 'react' | |
import {connect} from 'react-redux' | |
import PropTypes from 'prop-types' | |
import {reduxForm, change} from 'redux-form' // import the action creator you need | |
import CountryPicker from '../components/CountryPicker' | |
class CountriesContainer extends Component { | |
static propTypes = { | |
changeFieldValue: PropTypes.func.isRequired | |
} |
OlderNewer