This overrides hydra-head, (and restores the method from blacklight-access-controls)
165801
def download_permissions
        can :download, String do |id|
          test_download(id)
        end

        can :download, SolrDocument do |obj|
          cache.put(obj.id, obj)
          test_download(obj.id)
        end
      end
548650
private void adaptButtonBarVisibility() {
        if (buttonBarParent != null) {
            buttonBarParent.setVisibility(showRestoreDefaultsButton ? View.VISIBLE : View.GONE);
        }
    }
23586
public static void reset() {
        if ((_DEFAULT_THEME & COLOR_SCHEME_MASK) == 0) {
            _DEFAULT_THEME = DARK;
        }
        _THEME_MODIFIER = 0;
        _THEMES_MAP.clear();

        map(DARK,
                Holo_Theme);
        map(DARK | FULLSCREEN,
                Holo_Theme_Fullscreen);
        map(DARK | NO_ACTION_BAR,
                Holo_Theme_NoActionBar);
        map(DARK | NO_ACTION_BAR | FULLSCREEN,
                Holo_Theme_NoActionBar_Fullscreen);

        map(DARK | DIALOG,
                Holo_Theme_Dialog);
        map(DARK | DIALOG_WHEN_LARGE,
                Holo_Theme_DialogWhenLarge);
        map(DARK | DIALOG_WHEN_LARGE | NO_ACTION_BAR,
                Holo_Theme_DialogWhenLarge_NoActionBar);
        map(DARK | ALERT_DIALOG,
                Holo_Theme_Dialog_Alert);

        map(DARK | WALLPAPER,
                Holo_Theme_Wallpaper);
        map(DARK | NO_ACTION_BAR | WALLPAPER,
                Holo_Theme_NoActionBar_Wallpaper);
        map(DARK | FULLSCREEN | WALLPAPER,
                Holo_Theme_Fullscreen_Wallpaper);
        map(DARK | NO_ACTION_BAR | FULLSCREEN | WALLPAPER,
                Holo_Theme_NoActionBar_Fullscreen_Wallpaper);

        map(LIGHT,
                Holo_Theme_Light);
        map(LIGHT | FULLSCREEN,
                Holo_Theme_Light_Fullscreen);
        map(LIGHT | NO_ACTION_BAR,
                Holo_Theme_Light_NoActionBar);
        map(LIGHT | NO_ACTION_BAR | FULLSCREEN,
                Holo_Theme_Light_NoActionBar_Fullscreen);

        map(LIGHT | DIALOG,
                Holo_Theme_Dialog_Light);
        map(LIGHT | DIALOG_WHEN_LARGE,
                Holo_Theme_DialogWhenLarge_Light);
        map(LIGHT | DIALOG_WHEN_LARGE | NO_ACTION_BAR,
                Holo_Theme_DialogWhenLarge_Light_NoActionBar);
        map(LIGHT | ALERT_DIALOG,
                Holo_Theme_Dialog_Alert_Light);

        map(LIGHT | WALLPAPER,
                Holo_Theme_Light_Wallpaper);
        map(LIGHT | NO_ACTION_BAR | WALLPAPER,
                Holo_Theme_Light_NoActionBar_Wallpaper);
        map(LIGHT | FULLSCREEN | WALLPAPER,
                Holo_Theme_Light_Fullscreen_Wallpaper);
        map(LIGHT | NO_ACTION_BAR | FULLSCREEN | WALLPAPER,
                Holo_Theme_Light_NoActionBar_Fullscreen_Wallpaper);

        map(MIXED,
                Holo_Theme_Light_DarkActionBar);
        map(MIXED | FULLSCREEN,
                Holo_Theme_Light_DarkActionBar_Fullscreen);
        map(MIXED | NO_ACTION_BAR,
                Holo_Theme_Light_DarkActionBar_NoActionBar);
        map(MIXED | NO_ACTION_BAR | FULLSCREEN,
                Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen);

        map(MIXED | DIALOG,
                Holo_Theme_Dialog_Light);
        map(MIXED | DIALOG_WHEN_LARGE,
                Holo_Theme_DialogWhenLarge_Light_DarkActionBar);
        map(MIXED | DIALOG_WHEN_LARGE | NO_ACTION_BAR,
                Holo_Theme_DialogWhenLarge_Light_DarkActionBar_NoActionBar);
        map(MIXED | ALERT_DIALOG,
                Holo_Theme_Dialog_Alert_Light);

        map(MIXED | WALLPAPER,
                Holo_Theme_Light_DarkActionBar_Wallpaper);
        map(MIXED | NO_ACTION_BAR | WALLPAPER,
                Holo_Theme_Light_DarkActionBar_NoActionBar_Wallpaper);
        map(MIXED | FULLSCREEN | WALLPAPER,
                Holo_Theme_Light_DarkActionBar_Fullscreen_Wallpaper);
        map(MIXED | NO_ACTION_BAR | FULLSCREEN | WALLPAPER,
                Holo_Theme_Light_DarkActionBar_NoActionBar_Fullscreen_Wallpaper);

        if (sThemeSetters != null) {
            for (ThemeSetter setter : sThemeSetters) {
                setter.setupThemes();
            }
        }
    }
1155983
function() {
			var forkContext = this.forkContext;

			if (forkContext.reachable) {
				getReturnContext(this).returnedForkContext.add(forkContext.head);
				forkContext.replaceHead(forkContext.makeUnreachable(-1, -1));
			}
		}
669090
public void reset(AccessibilityNodeInfoCompat newNode) {
        if (mNode != newNode && mNode != null && mOwned) {
            mNode.recycle();
        }
        mNode = newNode;
        mOwned = true;
    }
1312683
function postDraw(renderer) {
         if (typeof this.mask !== "undefined") {
           renderer.clearMask();
         }

         if (typeof this.tint !== "undefined") {
           renderer.clearTint();
         } // restore the context


         renderer.restore();
       }
600314
@Override
    public void doPrePhaseActions(FacesContext facesContext)
    {
        if (!_flashScopeDisabled)
        {
            final PhaseId currentPhaseId = facesContext.getCurrentPhaseId();
        
            if (PhaseId.RESTORE_VIEW.equals(currentPhaseId))
            {
                // restore the redirect value
                // note that the result of this method is used in many places, 
                // thus it has to be the first thing to do
                _restoreRedirectValue(facesContext);
            
                // restore the FlashMap token from the previous request
                // and create a new token for this request
                _manageFlashMapTokens(facesContext);
            
                // try to restore any saved messages
                _restoreMessages(facesContext);
            }
        }
    }
850134
def reset_access_controls!
      update!(edit_users: permission_template_edit_users,
              edit_groups: permission_template_edit_groups,
              read_users: permission_template_read_users,
              read_groups: (permission_template_read_groups + visibility_group).uniq)
    end
312577
function () {
                    if (thisLayer.activeControl) {
                        if (thisLayer.activeControl === thisLayer.headingLeftControl) {
                            thisLayer.wwd.navigator.heading += thisLayer.headingIncrement;
                        } else if (thisLayer.activeControl === thisLayer.headingRightControl) {
                            thisLayer.wwd.navigator.heading -= thisLayer.headingIncrement;
                        }
                        thisLayer.wwd.redraw();
                        setTimeout(setRange, 50);
                    }
                }
1124774
function(elHdTable, elTable) {
    elHdTable = elHdTable || this._elHdTable;
    elTable = elTable || this._elTable;
    
    // Scrolling body's THEAD
    this._initBdTheadEl(elTable);
    // Standard fixed head THEAD
    SDT.superclass._initTheadEl.call(this, elHdTable);
}
869068
function( root ) {

		var rootUuid = root.uuid,
			actionsByClip = this._actionsByClip;

		for ( var clipUuid in actionsByClip ) {

			var actionByRoot = actionsByClip[ clipUuid ].actionByRoot,
				action = actionByRoot[ rootUuid ];

			if ( action !== undefined ) {

				this._deactivateAction( action );
				this._removeInactiveAction( action );

			}

		}

		var bindingsByRoot = this._bindingsByRootAndName,
			bindingByName = bindingsByRoot[ rootUuid ];

		if ( bindingByName !== undefined ) {

			for ( var trackName in bindingByName ) {

				var binding = bindingByName[ trackName ];
				binding.restoreOriginalState();
				this._removeInactiveBinding( binding );

			}

		}

	}
578910
def head(self, *args, **kwargs):
        
        return self.session.head(*args, **self.get_kwargs(**kwargs))
1090415
protected function method_head()
	{
		$this->method_get();

		$this->set_option(CURLOPT_NOBODY, true);
		$this->set_option(CURLOPT_HEADER, true);

	}
968968
private void adaptHeaderBackground(@Nullable final BackgroundAnimation animation) {
        if (headerBackgroundImageView != null) {
            Drawable newBackground = headerBackground;

            if (animation != null && newBackground != null) {
                Drawable previousBackground = headerBackgroundImageView.getDrawable();

                if (previousBackground != null) {
                    if (previousBackground instanceof AbstractTransitionDrawable) {
                        previousBackground =
                                ((AbstractTransitionDrawable) previousBackground).getDrawable(1);
                    }

                    if (animation instanceof CircleTransitionAnimation) {
                        CircleTransitionAnimation circleTransitionAnimation =
                                (CircleTransitionAnimation) animation;
                        CircleTransitionDrawable transition = new CircleTransitionDrawable(
                                new Drawable[]{previousBackground, newBackground});
                        transition.setRadius(circleTransitionAnimation.getRadius());
                        transition.setListener(circleTransitionAnimation.getListener());

                        if (circleTransitionAnimation.getX() != null) {
                            transition.setX(circleTransitionAnimation.getX());
                        }

                        if (circleTransitionAnimation.getY() != null) {
                            transition.setY(circleTransitionAnimation.getY());
                        }

                        transition.startTransition(circleTransitionAnimation.getDuration());
                        newBackground = transition;
                    } else if (animation instanceof CrossFadeTransitionAnimation) {
                        CrossFadeTransitionDrawable transition = new CrossFadeTransitionDrawable(
                                new Drawable[]{previousBackground, newBackground});
                        transition.setListener(animation.getListener());
                        transition.startTransition(animation.getDuration());
                        newBackground = transition;
                    } else {
                        throw new RuntimeException("Unknown type of animation: " +
                                animation.getClass().getSimpleName());
                    }
                }
            }

            headerBackgroundImageView.setImageDrawable(newBackground);
        }
    }
507747
function (oDraggedControl, iDropIndex) {
				this.removeAggregation('items', oDraggedControl, true);
				this.insertAggregation('items', oDraggedControl, iDropIndex, true);
				IconTabBarDragAndDropUtil._updateAccessibilityInfo.call(this);
			}
80668
function(method, restoreScrollPosition) {
      var body                  = this.doc.body,
          oldScrollTop          = restoreScrollPosition && body.scrollTop,
          oldScrollLeft         = restoreScrollPosition && body.scrollLeft,
          className             = "_wysihtml5-temp-placeholder",
          placeholderHtml       = '<span class="' + className + '">' + wysihtml5.INVISIBLE_SPACE + '</span>',
          range                 = this.getRange(true),
          caretPlaceholder,
          newCaretPlaceholder,
          nextSibling, prevSibling,
          node, node2, range2,
          newRange;

      // Nothing selected, execute and say goodbye
      if (!range) {
        method(body, body);
        return;
      }

      if (!range.collapsed) {
        range2 = range.cloneRange();
        node2 = range2.createContextualFragment(placeholderHtml);
        range2.collapse(false);
        range2.insertNode(node2);
        range2.detach();
      }

      node = range.createContextualFragment(placeholderHtml);
      range.insertNode(node);

      if (node2) {
        caretPlaceholder = this.contain.querySelectorAll("." + className);
        range.setStartBefore(caretPlaceholder[0]);
        range.setEndAfter(caretPlaceholder[caretPlaceholder.length -1]);
      }
      this.setSelection(range);

      // Make sure that a potential error doesn't cause our placeholder element to be left as a placeholder
      try {
        method(range.startContainer, range.endContainer);
      } catch(e) {
        setTimeout(function() { throw e; }, 0);
      }
      caretPlaceholder = this.contain.querySelectorAll("." + className);
      if (caretPlaceholder && caretPlaceholder.length) {
        newRange = rangy.createRange(this.doc);
        nextSibling = caretPlaceholder[0].nextSibling;
        if (caretPlaceholder.length > 1) {
          prevSibling = caretPlaceholder[caretPlaceholder.length -1].previousSibling;
        }
        if (prevSibling && nextSibling) {
          newRange.setStartBefore(nextSibling);
          newRange.setEndAfter(prevSibling);
        } else {
          newCaretPlaceholder = this.doc.createTextNode(wysihtml5.INVISIBLE_SPACE);
          dom.insert(newCaretPlaceholder).after(caretPlaceholder[0]);
          newRange.setStartBefore(newCaretPlaceholder);
          newRange.setEndAfter(newCaretPlaceholder);
        }
        this.setSelection(newRange);
        for (var i = caretPlaceholder.length; i--;) {
         caretPlaceholder[i].parentNode.removeChild(caretPlaceholder[i]);
        }

      } else {
        // fallback for when all hell breaks loose
        this.contain.focus();
      }

      if (restoreScrollPosition) {
        body.scrollTop  = oldScrollTop;
        body.scrollLeft = oldScrollLeft;
      }

      // Remove it again, just to make sure that the placeholder is definitely out of the dom tree
      try {
        caretPlaceholder.parentNode.removeChild(caretPlaceholder);
      } catch(e2) {}
    }
658354
function (e) {
            if (this.current_plugin !== this.plugin_count) {
                return;
            }

            if (this.is_active) {
                this.is_active = false;
            } else {
                return;
            }

            this.$cache.cont.find(".state_hover").removeClass("state_hover");

            this.force_redraw = true;

            if (is_old_ie) {
                $("*").prop("unselectable", false);
            }

            this.updateScene();
            this.restoreOriginalMinInterval();

            // callbacks call
            if ($.contains(this.$cache.cont[0], e.target) || this.dragging) {
                this.callOnFinish();
            }
            
            this.dragging = false;
        }