region > helpers
197109
private void newPermissions(
            final ApplicationPermissionRule rule,
            final ApplicationPermissionMode mode,
            final ApplicationFeatureType featureType,
            final Iterable<String> featureFqns) {

        if(featureFqns == null) {
            return;
        }

        ApplicationRole securityRole = applicationRoleRepository.findByName(roleName);
        if(securityRole == null) {
            securityRole = applicationRoleRepository.newRole(roleName, roleDescription);
        }
        for (String featureFqn : featureFqns) {
            // can't use role#addPackage because that does a check for existence of the package, which is
            // not guaranteed to exist yet (the SecurityFeatures#init() may not have run).
            applicationPermissionRepository.newPermissionNoCheck(
                    securityRole,
                    rule,
                    mode,
                    featureType, featureFqn);
        }
    }
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;
}
1052410
function parseRegion(input) {
        var settings = new Settings();

        parseOptions(input, function (k, v) {
          switch (k) {
          case "id":
            settings.set(k, v);
            break;
          case "width":
            settings.percent(k, v);
            break;
          case "lines":
            settings.integer(k, v);
            break;
          case "regionanchor":
          case "viewportanchor":
            var xy = v.split(',');
            if (xy.length !== 2) {
              break;
            }
            // We have to make sure both x and y parse, so use a temporary
            // settings object here.
            var anchor = new Settings();
            anchor.percent("x", xy[0]);
            anchor.percent("y", xy[1]);
            if (!anchor.has("x") || !anchor.has("y")) {
              break;
            }
            settings.set(k + "X", anchor.get("x"));
            settings.set(k + "Y", anchor.get("y"));
            break;
          case "scroll":
            settings.alt(k, v, ["up"]);
            break;
          }
        }, /=/, /\s/);

        // Create the region, using default values for any values that were not
        // specified.
        if (settings.has("id")) {
          var region = new (self.vttjs.VTTRegion || self.window.VTTRegion)();
          region.width = settings.get("width", 100);
          region.lines = settings.get("lines", 3);
          region.regionAnchorX = settings.get("regionanchorX", 0);
          region.regionAnchorY = settings.get("regionanchorY", 100);
          region.viewportAnchorX = settings.get("viewportanchorX", 0);
          region.viewportAnchorY = settings.get("viewportanchorY", 100);
          region.scroll = settings.get("scroll", "");
          // Register the region.
          self.onregion && self.onregion(region);
          // Remember the VTTRegion for later in case we parse any VTTCues that
          // reference it.
          self.regionList.push({
            id: settings.get("id"),
            region: region
          });
        }
      }
117484
def _activity_helper(modifier: str, location=None):
    
    rv = {MODIFIER: modifier}

    if location:
        rv[LOCATION] = location

    return rv
1018116
def handlebars_helpers
      helpers = []
      unless Handlebarer.configuration.helpers_path.nil?
        Dir["#{Handlebarer.configuration.helpers_path}/*.js"].each do |f|
          helpers << IO.read(f)
        end
      end
      helpers
    end
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),
      }),
      {}
    )
}
123002
function (target, key) {
/*Line 69 - 'AtomBindingHelper.js' */        if (target == null)
/*Line 70 - 'AtomBindingHelper.js' */            return null;
/*Line 71 - 'AtomBindingHelper.js' */        var f = target["get_" + key];
/*Line 72 - 'AtomBindingHelper.js' */        if (f) {
/*Line 73 - 'AtomBindingHelper.js' */            return f.apply(target);
/*Line 74 - 'AtomBindingHelper.js' */        }
/*Line 75 - 'AtomBindingHelper.js' */        return target[key];
/*Line 76 - 'AtomBindingHelper.js' */    }
1021517
function isHelperGroup(helpers) {
  if (!helpers) return false;
  if (helpers.isGroup) {
    return true;
  }
  if (typeof helpers === 'function' || isObject(helpers)) {
    var keys = Object.keys(helpers).filter(function(name) {
      return ['async', 'sync', 'displayName'].indexOf(name) === -1;
    });
    return keys.length > 1;
  }
  return false;
}
1031532
function __Collection(iterableOrGenerator) {
                    _classCallCheck(this, __Collection);

                    //#endregion
                    //#region Iterable
                    this.__iterable = null;
                    __assert(__isIterable(iterableOrGenerator) || __isGenerator(iterableOrGenerator), 'iterable or generator', iterableOrGenerator);
                    this.__iterable = iterableOrGenerator;
                }
777938
public void setLayoutHelpers(@Nullable List<LayoutHelper> helpers) {
        List<LayoutHelper> layoutHelpers = mHelperFinder.getLayoutHelpers();
        Iterator<LayoutHelper> it0 = layoutHelpers.iterator();
        while (it0.hasNext()) {
            LayoutHelper helper = it0.next();
            oldHelpersSet.put(System.identityHashCode(helper), helper);
        }

        // set ranges
        if (helpers != null) {
            int start = 0;
            Iterator<LayoutHelper> it1 = helpers.iterator();
            while (it1.hasNext()) {
                LayoutHelper helper = it1.next();
                if (helper instanceof FixAreaLayoutHelper) {
                    ((FixAreaLayoutHelper) helper).setAdjuster(mFixAreaAdjustor);
                }

                if (helper instanceof BaseLayoutHelper && mLayoutViewBindListener != null) {
                    ((BaseLayoutHelper) helper).setLayoutViewBindListener(mLayoutViewBindListener);
                }


                if (helper.getItemCount() > 0) {
                    helper.setRange(start, start + helper.getItemCount() - 1);
                } else {
                    helper.setRange(-1, -1);
                }

                start += helper.getItemCount();
            }
        }

        this.mHelperFinder.setLayouts(helpers);

        layoutHelpers = mHelperFinder.getLayoutHelpers();
        Iterator<LayoutHelper> iterator = layoutHelpers.iterator();
        while (iterator.hasNext()) {
            LayoutHelper layoutHelper = iterator.next();
            newHelpersSet.put(System.identityHashCode(layoutHelper), layoutHelper);
        }

        for (Iterator<Map.Entry<Integer, LayoutHelper>> it = oldHelpersSet.entrySet().iterator(); it.hasNext(); ) {
            Map.Entry<Integer, LayoutHelper> entry = it.next();
            Integer key = entry.getKey();
            if (newHelpersSet.containsKey(key)) {
                newHelpersSet.remove(key);
                it.remove();
            }
        }


        for (LayoutHelper helper : oldHelpersSet.values()) {
            helper.clear(this);
        }

        if (!oldHelpersSet.isEmpty() || !newHelpersSet.isEmpty()) {
            mSpaceMeasured = false;
        }

        oldHelpersSet.clear();
        newHelpersSet.clear();
        requestLayout();
    }
487177
function registerHelper(name, helper) {
    var s = this;
    s.helpers = s.helpers || {};
    s.helpers[name] = helper;
    return s;
  }
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));
        }
    }
790612
private function helpers()
    {
        $HELPERS_FILE = [];
        // From base
        if (file_exists($pathHelpers = VENDOR_KNOB_BASE_DIR . '/src/config/' . static::HELPERS_FILE . '.php')) {
            $HELPERS_FILE += include $pathHelpers;
        }
        // From App
        if (file_exists($pathHelpers = APP_DIR . '/config/' . static::HELPERS_FILE . '.php')) {
            $HELPERS_FILE += include $pathHelpers;
        }

        return array_merge([
            'case' => [
                'lower' => function ($value) {
                    return strtolower((string)$value);
                },
                'upper' => function ($value) {
                    return strtoupper((string)$value);
                },
            ],
            'count' => function ($value = []) {
                return count($value);
            },
            'moreThan1' => function ($value = []) {
                return count($value) > 1;
            },
            'date' => [
                'xmlschema' => function ($value) {
                    return date('c', strtotime($value));
                },
                'string' => function ($value) {
                    return date('l, d F Y', strtotime($value));
                },
                'format' => function ($value) {
                    return date(get_option('date_format'), strtotime($value));
                },
            ],
            'toArray' => function ($value) {
                return explode(',', $value);
            },
            'ucfirst' => function ($value) {
                return ucfirst($value);
            },
        ], $HELPERS_FILE);
    }
346261
private void doCreateHelperForProp(final PropertyDescriptor propertyDescriptor,
      final BeanHelper parent, final TreeLogger logger, final GeneratorContext context)
      throws UnableToCompleteException {
    final Class<?> elementClass = propertyDescriptor.getElementClass();
    if (GwtSpecificValidatorCreator.isIterableOrMap(elementClass)) {
      if (parent.hasField(propertyDescriptor)) {
        final JClassType type = parent.getAssociationType(propertyDescriptor, true);

        this.createHelper(type.getErasedType(), logger, context);
      }
      if (parent.hasGetter(propertyDescriptor)) {
        final JClassType type = parent.getAssociationType(propertyDescriptor, false);

        this.createHelper(type.getErasedType(), logger, context);
      }
    } else {
      if (serverSideValidator.getConstraintsForClass(elementClass).isBeanConstrained()) {
        this.createHelper(elementClass, logger, context);
      }
    }
  }
866778
function(regions){
    var that = this;

    var defaults = {
      regionType: Marionette.getOption(this, "regionType"),
      parentEl: function(){ return that.$el; }
    };

    return this.regionManager.addRegions(regions, defaults);
  }
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!');
		});

	});
}
1037467
function (ary, item) {
/*Line 150 - 'AtomBindingHelper.js' */        var i = ary.indexOf(item);
/*Line 151 - 'AtomBindingHelper.js' */        if (i == -1)
/*Line 152 - 'AtomBindingHelper.js' */            return;
/*Line 153 - 'AtomBindingHelper.js' */        ary.splice(i, 1);
/*Line 154 - 'AtomBindingHelper.js' */        AtomBinder.invokeItemsEvent(ary, "remove", i, item);
/*Line 155 - 'AtomBindingHelper.js' */    }