This file contains hidden or 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 siteUrl = '<your site url>'; | |
var listTitle = '<your list title>'; | |
var fieldName = '<field internal name>'; | |
var groupLimit = 30; // max unique fields returned | |
var ctx = new SP.ClientContext(siteUrl); | |
var list = ctx.get_web().get_lists().getByTitle(listTitle); | |
var camlString = '<View><Query>' | |
+ '<GroupBy Collapse="TRUE" GroupLimit="' + groupLimit + '">' |
This file contains hidden or 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 siteUrl = '<your site url>'; | |
var listTitle = '<your list title>'; | |
var viewTitle = '<your view title>'; | |
var clientContext = new SP.ClientContext(siteUrl); | |
var list = clientContext.get_web().get_lists().getByTitle(listTitle); | |
var view = list.get_views().getByTitle(viewTitle); | |
var viewFields = view.get_viewFields(); | |
clientContext.load(viewFields); |
This file contains hidden or 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
/** make text appear in the innerHTML of the element, one character at a time per timeBetween */ | |
function appearChars(str, elem, timeBetween) { | |
var index = -1; | |
(function go() { | |
if (++index < str.length) { | |
p.innerHTML = p.innerHTML + str.charAt(index); | |
setTimeout(go, timeBetween); | |
} | |
})(); | |
} |
This file contains hidden or 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 | |
// AppController.php | |
/** store a history of every route you hit, including every redirect */ | |
public function beforeFilter() { | |
$routes = CakeSession::read('routes'); | |
$routes[] = $this->request->here; | |
if (count($routes) > 5) { // limit history to 5 | |
array_shift($routes); | |
} |
This file contains hidden or 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 com.badlogic.gdx.Gdx; | |
import com.badlogic.gdx.scenes.scene2d.Stage; | |
import com.badlogic.gdx.scenes.scene2d.actions.Actions; | |
import com.badlogic.gdx.scenes.scene2d.ui.Label; | |
import com.badlogic.gdx.scenes.scene2d.ui.Skin; | |
import com.badlogic.gdx.scenes.scene2d.ui.Table; | |
import com.badlogic.gdx.scenes.scene2d.utils.Align; | |
import com.badlogic.gdx.utils.Array; | |
/** class for showing a toast message with queueing if one is already showing. Uses two Tables and a Label */ |