Creates a new reCaptcha object

@param elm  the DOM element where to put the captcha
@param conf the captcha object configuration
@throws NoKeyException    if no key is provided in the provider config or the directive instance (via attribute)
336729
function (elm, conf) {

                    conf.sitekey = conf.key || config.key;
                    conf.theme = conf.theme || config.theme;
                    conf.stoken = conf.stoken || config.stoken;
                    conf.size = conf.size || config.size;
                    conf.type = conf.type || config.type;
                    conf.hl = conf.lang || config.lang;
                    conf.badge = conf.badge || config.badge;

                    if (!conf.sitekey) {
                        throwNoKeyException();
                    }
                    return getRecaptcha().then(function (recaptcha) {
                        var widgetId = recaptcha.render(elm, conf);
                        instances[widgetId] = elm;
                        return widgetId;
                    });
                }
1248250
function($scope, elm, evt, grid) {
		if ($scope.selectionProvider.selectedItems === undefined) {
			return true;
		}

		var charCode = evt.which || evt.keyCode,
			newColumnIndex,
			lastInRow = false,
			firstInRow = false,
			rowIndex = $scope.selectionProvider.lastClickedRow === undefined ? 1 : $scope.selectionProvider.lastClickedRow.rowIndex,
			visibleCols = $scope.columns.filter(function(c) { return c.visible; }),
			pinnedCols = $scope.columns.filter(function(c) { return c.pinned; });

		if ($scope.col) {
			newColumnIndex = visibleCols.indexOf($scope.col);
		}

		if (charCode !== 37 && charCode !== 38 && charCode !== 39 && charCode !== 40 && (grid.config.noTabInterference || charCode !== 9) && charCode !== 13) {
			return true;
		}

		if ($scope.enableCellSelection) {
			if (charCode === 9) { //tab key
				evt.preventDefault();
			}

			var focusedOnFirstColumn = $scope.showSelectionCheckbox ? $scope.col.index === 1 : $scope.col.index === 0;
			var focusedOnFirstVisibleColumns = $scope.$index === 1 || $scope.$index === 0;
			var focusedOnLastVisibleColumns = $scope.$index === ($scope.renderedColumns.length - 1) || $scope.$index === ($scope.renderedColumns.length - 2);
			var focusedOnLastColumn = visibleCols.indexOf($scope.col) === (visibleCols.length - 1);
			var focusedOnLastPinnedColumn = pinnedCols.indexOf($scope.col) === (pinnedCols.length - 1);

			if (charCode === 37 || charCode === 9 && evt.shiftKey) {
				var scrollTo = 0;

				if (!focusedOnFirstColumn) {
					newColumnIndex -= 1;
				}

				if (focusedOnFirstVisibleColumns) {
					if (focusedOnFirstColumn && charCode === 9 && evt.shiftKey){
						scrollTo = grid.$canvas.width();
						newColumnIndex = visibleCols.length - 1;
						firstInRow = true;
					}
					else {
						scrollTo = grid.$viewport.scrollLeft() - $scope.col.width;
					}
				}
				else if (pinnedCols.length > 0) {
					scrollTo = grid.$viewport.scrollLeft() - visibleCols[newColumnIndex].width;
				}

				grid.$viewport.scrollLeft(scrollTo);

			}
			else if (charCode === 39 || charCode ===  9 && !evt.shiftKey) {
				if (focusedOnLastVisibleColumns) {
					if (focusedOnLastColumn && charCode ===  9 && !evt.shiftKey) {
						grid.$viewport.scrollLeft(0);
						newColumnIndex = $scope.showSelectionCheckbox ? 1 : 0;
						lastInRow = true;
					}
					else {
						grid.$viewport.scrollLeft(grid.$viewport.scrollLeft() + $scope.col.width);
					}
				}
				else if (focusedOnLastPinnedColumn) {
					grid.$viewport.scrollLeft(0);
				}

				if (!focusedOnLastColumn) {
					newColumnIndex += 1;
				}
			}
		}

		var items;
		if ($scope.configGroups.length > 0) {
			items = grid.rowFactory.parsedData.filter(function (row) {
				return !row.isAggRow;
			});
		}
		else {
			items = grid.filteredRows;
		}

		var offset = 0;
		if (rowIndex !== 0 && (charCode === 38 || charCode === 13 && evt.shiftKey || charCode === 9 && evt.shiftKey && firstInRow)) { //arrow key up or shift enter or tab key and first item in row
			offset = -1;
		}
		else if (rowIndex !== items.length - 1 && (charCode === 40 || charCode === 13 && !evt.shiftKey || charCode === 9 && lastInRow)) {//arrow key down, enter, or tab key and last item in row?
			offset = 1;
		}

		if (offset) {
			var r = items[rowIndex + offset];
			if (r.beforeSelectionChange(r, evt)) {
				r.continueSelection(evt);
				$scope.$emit('ngGridEventDigestGridParent');

				if ($scope.selectionProvider.lastClickedRow.renderedRowIndex >= $scope.renderedRows.length - EXCESS_ROWS - 2) {
					grid.$viewport.scrollTop(grid.$viewport.scrollTop() + $scope.rowHeight);
				}
				else if ($scope.selectionProvider.lastClickedRow.renderedRowIndex <= EXCESS_ROWS + 2) {
					grid.$viewport.scrollTop(grid.$viewport.scrollTop() - $scope.rowHeight);
				}
			}
		}

		if ($scope.enableCellSelection) {
			setTimeout(function(){
				$scope.domAccessProvider.focusCellElement($scope, $scope.renderedColumns.indexOf(visibleCols[newColumnIndex]));
			}, 3);
		}

		return false;
	}
1307225
private void addCancelByEscapeKey() {
		int noModifiers = 0;
		KeyStroke escapeKey = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, noModifiers, false);
		addActionKeyBinding(escapeKey, cancelCommand.getId());
	}
646202
function _createContentMarkup(transaction, props, context) {
    var ret = '';

    // Intentional use of != to avoid catching zero/false.
    var innerHTML = props.dangerouslySetInnerHTML;
    if (innerHTML != null) {
      if (innerHTML.__html != null) {
        ret = innerHTML.__html;
      }
    } else {
      var contentToUse = CONTENT_TYPES[_typeof(props.children)] ? props.children : null;
      var childrenToUse = contentToUse != null ? null : props.children;
      if (contentToUse != null) {
        // TODO: Validate that text is allowed as a child of this node
        ret = escapeTextContentForBrowser(contentToUse);
        if (false) {
          setAndValidateContentChildDev.call(this, contentToUse);
        }
      } else if (childrenToUse != null) {
        var mountImages = this.mountChildren(childrenToUse, transaction, context);
        ret = mountImages.join('');
      }
    }
    if (newlineEatingTags[this._tag] && ret.charAt(0) === '\n') {
      // text/html ignores the first character in these tags if it's a newline
      // Prefer to break application/xml over text/html (for now) by adding
      // a newline specifically to get eaten by the parser. (Alternately for
      // textareas, replacing "^\n" with "\r\n" doesn't get eaten, and the first
      // \r is normalized out by HTMLTextAreaElement#value.)
      // See: <http://www.w3.org/TR/html-polyglot/#newlines-in-textarea-and-pre>
      // See: <http://www.w3.org/TR/html5/syntax.html#element-restrictions>
      // See: <http://www.w3.org/TR/html5/syntax.html#newlines>
      // See: Parsing of "textarea" "listing" and "pre" elements
      //  from <http://www.w3.org/TR/html5/syntax.html#parsing-main-inbody>
      return '\n' + ret;
    } else {
      return ret;
    }
  }
231118
function(elm) {
			var map = Object.create(null);
			this.all(elm).forEach(function(att) {
				map[att.name] = gui.Type.cast(att.value);
			});
			return map;
		}
194120
function requireRecaptchaAfterTries(number) {
    /*
     * Recaptcha keypair
     * http://www.google.com/recaptcha/whyrecaptcha
     */
    var recaptchaKeys = {
        PUBLIC: '6Ler-9cSAAAAALgxcaiMpgfDb6tL36IvM2dCb7g7',
        PRIVATE: '6Ler-9cSAAAAAMO0RJB39zFvYwLHvykldkml2uWK'
    };
    return function (req, res, next) {
        var badAttempts = req.delayed && req.delayed.counter || -1;
        // Note: We show recaptcha form PRIOr to require it
        if (badAttempts >= number) {
            req.session.recaptchaForm = (new Recaptcha(recaptchaKeys.PUBLIC, recaptchaKeys.PRIVATE)).toHTML();
        }
        if ((req.requireRecaptcha = badAttempts > number)) {
            var data = {
                remoteip: req.connection.remoteAddress,
                challenge: req.body.recaptcha_challenge_field,
                response: req.body.recaptcha_response_field
            },
                recaptcha = new Recaptcha(recaptchaKeys.PUBLIC, recaptchaKeys.PRIVATE, data);
            recaptcha.verify(function (success, error) {
                req.isValidRecaptcha = {
                    success: success,
                    error: error
                };
                next();
            });
        } else {
            next();
        }
    };
}
152906
function Icon(el, config) {
    // If the node is a <symbol>, it won't be rendered so we have to convert it into <svg>.
    if (el && el.tagName.toLowerCase() === 'symbol') {
      var viewbox = el.getAttribute('viewBox');
      // // Check if innerHTML is supported as IE11 does not support innerHTML on SVG elements.
      if (el.innerHTML) {
        el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">')
          .html(el.innerHTML)[0];
      } else {
        el = angular.element('<svg xmlns="http://www.w3.org/2000/svg">')
          .append($mdUtil.getInnerHTML(el))[0];
      }
      if (viewbox) el.setAttribute('viewBox', viewbox);
    }

    if (el && el.tagName.toLowerCase() !== 'svg') {
      el = angular.element(
        '<svg xmlns="http://www.w3.org/2000/svg">').append(el.cloneNode(true))[0];
    }

    // Inject the namespace if not available...
    if (!el.getAttribute('xmlns')) {
      el.setAttribute('xmlns', "http://www.w3.org/2000/svg");
    }

    this.element = el;
    this.config = config;
    this.prepare();
  }
958960
function (elm) {
        var ctrl, lookup = this.getRoot().controlIdLookup;

        while (elm && lookup) {
          ctrl = lookup[elm.id];
          if (ctrl) {
            break;
          }

          elm = elm.parentNode;
        }

        return ctrl;
      }
86565
function(e) {

			if ( e.keyCode !== ENTER_KEY ){
				return;
			}

			if ( !this.input.val().trim() ){
				return;
			}

			window.app.Todos.create(this.newAttributes());
			this.input.val('');
		}
938493
public static void init(com.typesafe.config.Config conf) {
		try {
			config = ConfigFactory.load().getConfig(PARA);

			if (conf != null) {
				config = conf.withFallback(config);
			}

			configMap = new HashMap<>();
			for (Map.Entry<String, ConfigValue> con : config.entrySet()) {
				if (con.getValue().valueType() != ConfigValueType.LIST) {
					configMap.put(con.getKey(), config.getString(con.getKey()));
				}
			}
		} catch (Exception ex) {
			logger.warn("Para configuration file 'application.(conf|json|properties)' is missing from classpath.");
			config = com.typesafe.config.ConfigFactory.empty();
		}
	}
642151
function(elm) {
			if (elm.length === undefined) {
				addToStack(elm);
			} else {
				for (var i = 0; i < elm.length; i++) {
					addToStack(elm[i]);
				}
			}
		}
417967
function createIcon(options, enableTooltips, shortcuts, negativeTabIndex) {
    options = options || {};
    var el = document.createElement('button');
    enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
	
	// Properly hande custom shortcuts
	if( options.name && options.name in shortcuts ){
		bindings[options.name] = options.action;
	}
	
    if (options.title && enableTooltips) {
        el.title = createTooltip(options.title, options.action, shortcuts);

        if (isMac) {
            el.title = el.title.replace('Ctrl', '⌘');
            el.title = el.title.replace('Alt', '⌥');
        }
    }

    if (options.noDisable) {
        el.classList.add('no-disable');
    }

    if (options.noMobile) {
        el.classList.add('no-mobile');
    }

    el.tabIndex = negativeTabIndex? -1 : 0;

    // Create icon element and append as a child to the button
    var icon = document.createElement('i');
    icon.className = options.className;
    el.appendChild(icon);
	
    return el;
}
348480
public static void addInputMap(Node node, InputMap<?> im) {
        // getInputMap calls init, so can use unsafe setter
        setInputMapUnsafe(node, InputMap.sequence(im, getInputMap(node)));
    }
120586
function( eventName, keyCode ) {
			// No keyboard, can't simulate...
			if( typeof window.onkeydown === 'undefined' ) return false;
			var oEvent = document.createEvent('KeyboardEvent');

			// Chromium Hack
			if( navigator.userAgent.toLowerCase().indexOf( 'chrome' ) !== -1 ) {
				Object.defineProperty( oEvent, 'keyCode', {
					get: function() { return this.keyCodeVal; }
				});
				Object.defineProperty( oEvent, 'which', {
					get: function() { return this.keyCodeVal; }
				});
			}

			var initKeyEvent = oEvent.initKeyboardEvent || oEvent.initKeyEvent;
			initKeyEvent.call(oEvent,
				'key' + eventName,
				true,
				true,
				document.defaultView,
				false,
				false,
				false,
				false,
				keyCode,
				keyCode
			);

			oEvent.keyCodeVal = keyCode;
		}
320075
public static LineCaptcha createLineCaptcha(int width, int height, int codeCount, int lineCount) {
		return new LineCaptcha(width, height, codeCount, lineCount);
	}
458924
function (opt) {
    var cap = new Captcha(opt);
    cap.use(drawBackground);
    cap.use(drawLines);
    cap.use(drawText);
    cap.use(drawLines);
    return cap;
  }
1040571
public static void putRecaptchaPropertiesFlowScope(final RequestContext context, final GoogleRecaptchaProperties googleRecaptcha) {
        val flowScope = context.getFlowScope();
        flowScope.put("recaptchaSiteKey", googleRecaptcha.getSiteKey());
        flowScope.put("recaptchaInvisible", googleRecaptcha.isInvisible());
        flowScope.put("recaptchaPosition", googleRecaptcha.getPosition());
        flowScope.put("recaptchaVersion", googleRecaptcha.getVersion().name().toLowerCase());
    }