TODO: Add smart filters for flashes, like 'sticky' via method_missing.
 Handle the following use case:
   flash[:notice] = 'First Part'
   flash[:notice] += ' Second Part'
 => ['First Part Second Part']
429844
def +(to_add)
      if StackableFlash.stacking

        if to_add.kind_of?(Array)
          super(to_add)
        else

          # Make sure it responds to +, otherwise just push it onto the stack
          if self.last.respond_to?(:+)
            self[self.length - 1] = self.last + to_add
          else
            self << to_add
          end
        end

      else
        super(to_add)
      end
    end
703782
function maybeAddEmptyStringAtEnd(elements, items) {
  let length = elements.length;
  if (!length || elements[length - 1].type !== TEMPLATE_LITERAL_PORTION) {
    items.push(createStringLiteralExpression(null, '""'));
  }
}
1244647
function(feature) {
        var layer = feature.layer;
        // three cases:
        // 1. there's no other highlighter, in that case _prev is undefined,
        //    and we just need to undef _last
        // 2. another control highlighted the feature after we did it, in
        //    that case _last references this other control, and we just
        //    need to undef _prev
        // 3. another control highlighted the feature before we did it, in
        //    that case _prev references this other control, and we need to
        //    set _last to _prev and undef _prev
        if(feature._prevHighlighter == undefined) {
            delete feature._lastHighlighter;
        } else if(feature._prevHighlighter == this.id) {
            delete feature._prevHighlighter;
        } else {
            feature._lastHighlighter = feature._prevHighlighter;
            delete feature._prevHighlighter;
        }
        layer.drawFeature(feature, feature.style || feature.layer.style ||
            "default");
        this.events.triggerEvent("featureunhighlighted", {feature : feature});
    }
203438
public void toggleFlashMode() {
        String otherFlashMode = "";
        if (mCurrentFlash.equals(Parameters.FLASH_MODE_TORCH)) {
            otherFlashMode = Parameters.FLASH_MODE_OFF;
        } else {
            otherFlashMode = Parameters.FLASH_MODE_TORCH;
        }
        requestFlash(otherFlashMode);
    }
1214747
function(oThis, oEvent, sDir){
		oEvent.stopPropagation();
		oEvent.preventDefault();

		if (!oThis.sCurrentFocusedItemRefId) {
			return;
		}

		var sFollowingFocusItemId = null;
		if (oThis.sLastVisibleItemId && ((oThis.sCurrentFocusedItemRefId == oThis.sLastVisibleItemId && sDir == "next") || sDir == "last")) {
			sFollowingFocusItemId = oThis.getId() + "-ovrflw";
		} else if (oThis.sLastVisibleItemId && oThis.sCurrentFocusedItemRefId == oThis.getId() + "-ovrflw" && sDir == "prev") {
			sFollowingFocusItemId = oThis.sLastVisibleItemId;
		} else {
			var sFoo = sDir + "All";
			var bIsJumpToEnd = false;
			if (sDir == "first") {
				sFoo = "prevAll";
				bIsJumpToEnd = true;
			} else if (sDir == "last") {
				sFoo = "nextAll";
				bIsJumpToEnd = true;
			}

			var jCurrentFocusItem = jQuery(document.getElementById(oThis.sCurrentFocusedItemRefId));
			var jFollowingItems = jCurrentFocusItem[sFoo](":visible");

			sFollowingFocusItemId = jQuery(jFollowingItems.get(bIsJumpToEnd ? jFollowingItems.length - 1 : 0)).attr("id");
		}
		if (sFollowingFocusItemId) {
			oThis.sCurrentFocusedItemRefId = sFollowingFocusItemId;
			document.getElementById(sFollowingFocusItemId).focus();
		}
	}
240358
function(_part){
        if (!_part||!_part.length) return;
        _part.shift(); // remove macro key word
        var _name = _part[0].split('(')[0];
        return 'var '+_name+' = function'+_part.join('').replace(_name,'')+'{var __OUT=[];';
    }
1161881
function(ctx, partials, section) {
      var tail = ctx[ctx.length - 1],
          func,
          offset,
          arg;

      if (typeof tail == 'function') {
        func = tail;
        tail = ctx[ctx.length - 2];
        offset = this.buf.length;
      }

      if (!isArray(tail)) {
        section(ctx, partials, this);
      } else {
        for (var i = 0; i < tail.length; i++) {
          ctx.push(tail[i]);
          section(ctx, partials, this);
          ctx.pop();
        }
      }

      if (func) {
        arg = this.buf.substr(offset);
        this.buf = this.buf.substr(0, offset);
        this.b(func(arg));
      }
    }
927977
def get_notifications
      
      html = ''

      if flash[:error]
        html += "<div class='alert alert-danger'><button type='button' class='close' data-dismiss='alert'>x</button><strong>" + I18n.t("helpers.view_helper.generic.flash.error") + "!</strong> #{flash[:error]}</div>"
      end

      if flash[:notice]
        html += "<div class='alert alert-success'><button type='button' class='close' data-dismiss='alert'>x</button><strong>" + I18n.t("helpers.view_helper.generic.flash.success") + "!</strong> #{flash[:notice]}</div>"
      end

      render :inline => html.html_safe 
    end
170124
function() {
    var flashBridge = _flashState.bridge;
    if (flashBridge) {
      var htmlBridge = _getHtmlBridge(flashBridge);
      if (htmlBridge) {
        if (_flashState.pluginType === "activex" && "readyState" in flashBridge) {
          flashBridge.style.display = "none";
          (function removeSwfFromIE() {
            if (flashBridge.readyState === 4) {
              for (var prop in flashBridge) {
                if (typeof flashBridge[prop] === "function") {
                  flashBridge[prop] = null;
                }
              }
              if (flashBridge.parentNode) {
                flashBridge.parentNode.removeChild(flashBridge);
              }
              if (htmlBridge.parentNode) {
                htmlBridge.parentNode.removeChild(htmlBridge);
              }
            } else {
              _setTimeout(removeSwfFromIE, 10);
            }
          })();
        } else {
          if (flashBridge.parentNode) {
            flashBridge.parentNode.removeChild(flashBridge);
          }
          if (htmlBridge.parentNode) {
            htmlBridge.parentNode.removeChild(htmlBridge);
          }
        }
      }
      _clearTimeoutsAndPolling();
      _flashState.ready = null;
      _flashState.bridge = null;
      _flashState.deactivated = null;
      _flashState.insecure = null;
      _zcSwfVersion = undefined;
    }
  }
379260
def highlightBlock(self, block):
        

        raise NotImplementedError("{0} | '{1}' must be implemented by '{2}' subclasses!".format(self.__class__.__name__,
                                                                                                self.highlightBlock.__name__,
                                                                                                self.__class__.__name__))
158877
function ()
    {
      // Bail if we're stacking
      if (this.options.stack) {
          return;
      }

      // Adjust position when opening
      this._adjustNoticePositon();

      // Loop through notices at same window corner destroy them
      jQuery.each(jQuery('.jBox-Notice'), function (index, el)
      {
        el = jQuery(el);

        // Abort if the element is this notice or when it's not at the same position
        if (el.attr('id') == this.id || el.data('jBox-Notice-position') != this.options.attributes.x + '-' + this.options.attributes.y) {
          return;
        }

        // Remove notice when we don't wont to stack them
        if (!this.options.stack) {
          el.data('jBox').close({ignoreDelay: true});
          return;
        }
      }.bind(this));
    }
546488
def method_missing(method, *args, **kwrest, &proc)
      method_name = method.to_s
      case
      when method_name.start_with?('on')
        event_name = method_name[(method_name[2] == '_' ? 3 : 2)..method_name.size]
        add_event(event_name.to_sym, *args, **kwrest, &proc)
      when method_name.start_with?('filter')
        event_name = method_name[(method_name[6] == '_' ? 7 : 6)..method_name.size]
        add_event_filter(event_name.to_sym, **kwrest, &proc)
      end
    end
1060472
function ()
    {
        var stacks = {};
        jQuery.each(jQuery('.jBox-Notice'), function (index, el)
        {
          el = jQuery(el);
          var pos = el.data('jBox-Notice-position');
          if (!stacks[pos]) {
              stacks[pos] = [];
          }
          stacks[pos].push(el);
        });
        for (var pos in stacks) {
            var position = pos.split('-');
            var direction = position[1];
            stacks[pos].reverse();
            var margin = 0;
            for (var i in stacks[pos]) {
                el = stacks[pos][i];
                el.css('margin-' + direction, margin);
                margin += el.outerHeight() + this.options.stackSpacing;
            }
        }
    }
230841
def flashback(error_message, exception = nil)
      airbrake_class.send(:notify, exception) if airbrake_class
      flash[:error] = error_message
      begin
        redirect_to :back
      rescue ActionController::RedirectBackError
        redirect_to error_path
      end
    end
882095
def []=(*args)
      change_type = args[0] >= length ? :added : :modified
      changes = changes_for(change_type,:"[]=",*args)
      changing(change_type,:trigger=>:"[]=", :changes=>changes) {super}
    end
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);
            }
        }
    }
219469
function(_element,_vars,_options){
        // build holder
        var _box = _e._$wrapInline(_element),
            _height = _element.offsetHeight;
        _e._$style(_box,{
            left:'-1px',
            height:_height+1+'px',
            width:_element.offsetWidth+1+'px',
            top:Math.floor((_box.parentNode.offsetHeight-_height)/2)+'px'
        });
        // cover flash
        _t0._$flash(_u._$merge({
            parent:_box,
            target:_element,
            width:'100%',height:'100%',
            src:_c._$get('clipboard.swf'),
            params:{
                flashvars: _vars,
                wmode: 'transparent',
                allowscriptaccess: 'always'
            }
        },_options));
        return _box;
    }