region > helpers
423454
@Programmatic // for use by fixtures
    public FullCalendar2WicketToDoItem newToDo(
            final String description, 
            final String userName) {
        final FullCalendar2WicketToDoItem toDoItem = container.newTransientInstance(FullCalendar2WicketToDoItem.class);
        toDoItem.setDescription(description);
        toDoItem.setOwnedBy(userName);

        container.persist(toDoItem);
        container.flush();

        return toDoItem;
    }
158729
public void help() {
        p("");
        p("Command                Description");
        p("=======                ===========");
        p("help()                 Display usage and help messages. ");
        p("defineClass(className) Define an extension using the Java class");
        p("                       named with the string argument. ");
        p("                       Uses ScriptableObject.defineClass(). ");
        p("load(['foo.js', ...])  Load JavaScript source files named by ");
        p("                       string arguments. ");
        p("loadClass(className)   Load a class named by a string argument.");
        p("                       The class must be a script compiled to a");
        p("                       class file. ");
        p("print([expr ...])      Evaluate and print expressions. ");
        p("quit()                 Quit the shell. ");
        p("version([number])      Get or set the JavaScript version number.");
        p("");
    }
1053303
function helper($helper_name) {
        if(array_key_exists($helper_name, $this->helpers)) {
            return $this->helpers[$helper_name];
        }
        else {
            $classname = 'Helper_' . ucwords($helper_name);
            return new $classname($this->modules, $this->server, $this->request, $this->security);
        }
    }
904418
private boolean htmlSentenceTerminatorFound(String str, int index) {
        for (int i = 0; i < sentenceTerminators.length; i++) {
            String terminator = sentenceTerminators[i];
            if (str.regionMatches(true, index, terminator,
                                  0, terminator.length())) {
                    return true;
            }
        }
        return false;
    }
639580
function inspectHelpers(settings, opts) {
  var helpers = Object.keys(settings.imports);
  for (var key in opts) {
    if (helpers.indexOf(key) !== -1) {
      conflictMessage(settings, opts, key);
    }
  }
}
485408
function decorateRegions() {

        Array.prototype.slice.call(document.querySelectorAll('[data-region]')).forEach(function(region) {
            region.classList.add('ps-region');

            var pageId = region.getAttribute('data-page-id');
            var regionName = region.getAttribute('data-region');

            var addButton = document.createElement('button');
            addButton.setAttribute('data-add-include', pageId);
            addButton.setAttribute('data-target-page-id', pageId);
            addButton.setAttribute('data-target-region', regionName);
            addButton.setAttribute('title', 'Add include');
            addButton.classList.add('ps-add');

            var psAddBox = document.createElement('div');
            psAddBox.classList.add('ps-box');
            psAddBox.classList.add('ps-box-add');
            psAddBox.appendChild(addButton);

            region.appendChild(psAddBox);
        });
    }
751536
private Region find(Region x) {
    Region current = this.root;
    while (current != NULL_NODE) {
      long res = x.orderRelativeTo(current);
      if (res < 0) {
        current = current.left;
      } else if (res > 0) {
        current = current.right;
      } else {
        return current;
      }
    }
    return null;
  }
117484
def _activity_helper(modifier: str, location=None):
    
    rv = {MODIFIER: modifier}

    if location:
        rv[LOCATION] = location

    return rv
173762
function(helperName, paramSize, params, useRegister) {
                var options = this.objectLiteral(this.setupOptions(helperName, paramSize, params));

                if (useRegister) {
                    this.useRegister('options');
                    params.push('options');
                    return 'options=' + options;
                } else {
                    params.push(options);
                    return '';
                }
            }
244212
function checkExecParamsRegionSuccessError(region, success, error)
{
	var caller = checkExecParamsRegionSuccessError.caller.name

	if (typeof region != 'object') {
		console.error('Error: region parameter is not an object in: ' + caller);
		return false;
	}

	if (typeof success != 'function') {
		console.error('Error: success parameter is not a function in: ' + caller);
		return false;
	}

	if (typeof error != 'function') {
		console.error('Error: error parameter is not a function in: ' + caller);
		return false;
	}

	return true;
}
1348728
function getHelpBlock(opts) {
  return {
    tag: 'span',
    attrs: {
      className: {
        'help-block': true,
        'error-block': opts.hasError
      },
      // aria support
      id: opts.id,
      role: 'tooltip'
    },
    children: opts.help
  };
}
335542
private Map<String, ParseTreeNode> getHelperTokens() throws TreeException {
	Map<String, ParseTreeNode> helpers = new HashMap<String, ParseTreeNode>();
	ParseTreeNode helperTree = parserTree.getChild("Helper");
	ParseTreeNode helperDefinitions = helperTree.getChild("HelperDefinitions");
	for (ParseTreeNode helperDefinition : helperDefinitions
		.getChildren("HelperDefinition")) {
	    String identifier = helperDefinition.getChild("IDENTIFIER")
		    .getText();
	    helpers.put(identifier, helperDefinition);
	}
	return helpers;
    }
841357
private void findLocalComponentsForComponent(LocalComponents localComponents,
      TypeElement componentTypeElement) {
    Component componentAnnotation = componentTypeElement.getAnnotation(Component.class);
    if (componentAnnotation == null) {
      return;
    }

    processLocalComponentClass(localComponents, componentTypeElement);
    getComponentLocalComponents(elements, componentTypeElement)
        .stream()
        .map(DeclaredType.class::cast)
        .map(DeclaredType::asElement)
        .map(TypeElement.class::cast)
        .forEach(childTypeElement -> processLocalComponentClass(localComponents,
            childTypeElement));

    getSuperComponentType(componentTypeElement)
        .ifPresent(superComponentType -> findLocalComponentsForComponent(
            localComponents,
            superComponentType));
  }
1215274
protected void positionHelper() {

        if (m_dragHelper == null) {
            // should never happen
            CmsDebugLog.getInstance().printLine("Drag helper is null");
            return;
        }
        Element parentElement = m_dragHelper.getParentElement();
        int left = CmsDomUtil.getRelativeX(m_clientX, parentElement) - m_cursorOffsetX;
        int top = CmsDomUtil.getRelativeY(m_clientY, parentElement) - m_cursorOffsetY;
        m_dragHelper.getStyle().setLeft(left, Unit.PX);
        m_dragHelper.getStyle().setTop(top, Unit.PX);
    }
695717
private EvaluationResult callHelper(URI type, URI id, URI issuer,
                                        URI category, int adType) {
        if (finder != null) {
            return finder.findAttribute(type, id, issuer, category,
                                        this, adType);
        } else {
            logger.warn(NO_FINDER_MSG);

            return new EvaluationResult(BagAttribute.createEmptyBag(type));
        }
    }
312225
function generateWhenAndNotHelpers(currentState, currentData, parsedStates) {
  const buildWhenFnBody = state => callback => {
    if (currentState.name !== state) {
      return null
    }
    return callback instanceof Function ? callback(currentData) : callback
  }

  const buildNotFnBody = state => callback => {
    if (currentState.name === state) {
      return null
    }
    return callback instanceof Function ? callback() : callback
  }

  return parsedStates
    .reduce(
      (helpers, state) => ({
        ...helpers,
        [buildFnName('when', state.name)]: buildWhenFnBody(state.name),
        [buildFnName('not', state.name)]: buildNotFnBody(state.name),
      }),
      {}
    )
}
1258561
function tpl_apply_with_register_helper(Handlebars, template_path, data_obj, dest_file_path) {
	var rs = fs.createReadStream(template_path, {bufferSize: 11}); 
	var bufferHelper = new BufferHelper();

	rs.on("data", function (trunk){
			bufferHelper.concat(trunk);
	});

	rs.on("end", function () {
		var source = bufferHelper.toBuffer().toString('utf8');
		var template = Handlebars.compile(source);
	
    // log(template);
		
		var content = template(data_obj);

		fs.writeFile(dest_file_path, content , function (err) {
		  if (err) throw err;
		  log('It\'s saved!');
		});

	});
}