Skip to content

Instantly share code, notes, and snippets.

View larscwallin's full-sized avatar

Lars Wallin larscwallin

View GitHub Profile
@larscwallin
larscwallin / result.js
Created September 8, 2011 09:49
XPDO to simple ExtJS 3 Stores
var SimplxStudio = {};
SimplxStudio.modx = {};
/* Creating JSON representation for modAccess */
SimplxStudio.modx.modAccess={
"class": "modAccess",
"extends":"xPDOSimpleObject",
"fields": [
"id","alias","target","principal_class","principal","authority","policy"
async function annotateAllWordsInVisibleRange(){
let intRange = await vanillaReader.readingProgressionTimeLine.fetchTimelineRange(vanillaReader._readerView.getVisibleRange().getLocator());
for(let i = intRange.start; i <= intRange.end; i++ ) {
let location = await vanillaReader.readingProgressionTimeLine.fetchContentLocationAsRange(i, i + 1)
vanillaReader.highlightsLayer.addHighlight(location.getLocator().toString(), {
color: 'yellow',
locator: location.getLocator().toString()
}
This file has been truncated, but you can view the full file.
/*!
*
* WebGazer.js: Scalable Webcam EyeTracking Using User Interactions
* Copyright (c) 2016-2021, Brown HCI Group
* Licensed under GPLv3. Companies with a valuation of less than $1M can use WebGazer.js under LGPLv3.
*
*/
var webgazer =
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
var SpeechRecognition = SpeechRecognition || webkitSpeechRecognition
var SpeechGrammarList = SpeechGrammarList || webkitSpeechGrammarList
var SpeechRecognitionEvent = SpeechRecognitionEvent || webkitSpeechRecognitionEvent
var actions = [ 'next' , 'previous' , 'toc'];
var grammar = '#JSGF V1.0; grammar actions; public <action> = ' + actions.join(' | ') + ' ;'
var recognition = new SpeechRecognition();
var speechRecognitionList = new SpeechGrammarList();
speechRecognitionList.addFromString(grammar, 1);
recognition.grammars = speechRecognitionList;
recognition.continuous = false;

Sync Media Explainer

DEFINITIONS

  • Sync Media Document

    The SMIL document including all the Sync Media extensions.

  • Media Object

/*
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
<inkscape-extension>
<_name>Create Sketch Layer</_name>
<id>com.larscwallin.create_sketch_layer</id>
<dependency type="executable" location="extensions">create_sketch_layer.py</dependency>
<dependency type="executable" location="extensions">inkex.py</dependency>
<!-- <param name="what" type="string" _gui-text="What?"></param> -->
<param name="where" type="string" _gui-text="Sketch save location"></param>
<param name="sketch_name" type="string" _gui-text="Sketch name"></param>
<param name="remove_border" type="boolean" _gui-text="Remove element border?"></param>
<param name="replace_source" type="boolean" _gui-text="Replace original element?"></param>
@larscwallin
larscwallin / jquery.elementFromPoint
Created December 28, 2011 16:35
jquery.elementFromPoint
(function ($){
var check=false, isRelative=true;
$.elementFromPoint = function(x,y)
{
if(!document.elementFromPoint) return null;
if(!check)
{
var sl;
@larscwallin
larscwallin / README.txt
Created November 17, 2011 11:32
SIMPLX Widgeteer 0.8.5
SIMPLX Widgeteer 0.8.5
UPDATE 120117 10:04
Fixed a bug in the templateNSPlaceholder method thanks to Keith Baker :)
NEW FEAUTURES
If you use namespaced placeholders, you can now reference the first object in any list (array). This was not possible
before. This is going to be even easier later on as you are going to be able to query for objects using regex etc.
/*!
* Ext JS Library 3.2.1
* Copyright(c) 2006-2010 Ext JS, Inc.
* licensing@extjs.com
* http://www.extjs.com/license
*/
Ext.onReady(function(){
Ext.QuickTips.init();