Checks whether the gif is animated.
194350
def check_animated(cls, raw_image):
        ""
        try:
            raw_image.seek(1)
        except EOFError:
            isanimated= False
        else:
            isanimated= True
            raise cls.AnimatedImageException
1228957
static int getAnimationResource(int gravity, boolean isInAnimation) {
    if ((gravity & Gravity.TOP) == Gravity.TOP) {
      return isInAnimation ? R.anim.slide_in_top : R.anim.slide_out_top;
    }
    if ((gravity & Gravity.BOTTOM) == Gravity.BOTTOM) {
      return isInAnimation ? R.anim.slide_in_bottom : R.anim.slide_out_bottom;
    }
    if ((gravity & Gravity.CENTER) == Gravity.CENTER) {
      return isInAnimation ? R.anim.fade_in_center : R.anim.fade_out_center;
    }
    return INVALID;
  }
624932
function checkAppear() {
        if(scroll.delta < opts.delta.speed) {
          if(!deltaSet) {
            deltaSet = true;
            doCheckAppear();
            setTimeout(function(){
              deltaSet = false;
            }, opts.delta.timeout);
          }
        }
        (debounce(function() {
          doCheckAppear();
        }, opts.debounce)());
      }
1351398
private boolean shouldUseAnimations() {
        SharedPreferences sharedPreferences =
                PreferenceManager.getDefaultSharedPreferences(getActivity());
        String key = getString(R.string.animation_preference_key);
        boolean defaultValue = getResources().getBoolean(R.bool.animation_preference_default_value);
        return sharedPreferences.getBoolean(key, defaultValue);
    }
270712
def isCollapsed( self ):
        
        if not self.isCollapsible():
            return False
        
        if self._inverted:
            return self.isChecked()
        return not self.isChecked()
48524
def _is_image_sequenced(image):
    """"""
    try:
        image.seek(1)
        image.seek(0)
        result = True
    except EOFError:
        result = False

    return result
1349526
def is_script(self, container):
        """"""
        try:
            style = self._style(container)
            return style.get_value('position',
                                   container) != TextPosition.NORMAL
        except StyleException:
            return False
993189
public static boolean isScrolledIntoView (Widget target, int minPixels)
    {
        int wtop = Window.getScrollTop(), wheight = Window.getClientHeight();
        int ttop = target.getAbsoluteTop();
        if (ttop > wtop) {
            return (wtop + wheight - ttop > minPixels);
        } else {
            return (ttop + target.getOffsetHeight() - wtop > minPixels);
        }
    }
386912
def ffmpeg_works():
  """"""
  images = np.zeros((2, 32, 32, 3), dtype=np.uint8)
  try:
    _encode_gif(images, 2)
    return True
  except (IOError, OSError):
    return False
193093
public static function isGifFile($filename)
    {
        try {
            $image = new ImageFile($filename);
            if (strtolower($image->getMime()) !== @image_type_to_mime_type(IMAGETYPE_GIF)) {
                return false;
            }

            return true;
        } catch (\RuntimeException $ex) {
            return false;
        }
    }
462882
public function getAnimation()
    {
        // No images to process.
        if (0 === count($this->frames)) {
            return false;
        }

        // Process images as animation.
        $this->addGifHeader();
        for ($i = 0, $frameCount = count($this->frames); $i < $frameCount; $i++) {
            $this->addFrameData($i, 1 / $this->frameRate * 100);
        }
        $this->addGifFooter();

        return $this->gifData;
    }
521058
function() {
            var Anim = Kinetic.Animation;
            this.stop();
            this.frame.timeDiff = 0;
            this.frame.lastTime = now();
            Anim._addAnimation(this);
        }
1067832
def handleEvent(self, eventObj):
        
        if not self.visible:
            return
        if not self.isEnabled:
            return False

        if eventObj.type != MOUSEBUTTONDOWN:
            # The animation only cares about a mouse down event
            return False

        eventPointInAnimationRect = self.rect.collidepoint(eventObj.pos)
        if not eventPointInAnimationRect:  # clicked outside of animation
            return False

        if self.state == PygAnimation.PLAYING:  # if playing, ignore the click
            return False

        return True
524954
function () {
				if (this.__private.isRenderRequested) { return; }
				this.__private.isRenderRequested = true;

				var self = this;
				myRequestAnimationFrame(function () {
					self.__private.isRenderRequested = false;
					self.render();
				});
			}
244674
function() {
    if (!$.browser.msie || ($.browser.msie && parseInt($.browser.version) > 8 )) {
      var self = this;
      this.$el.animate({
        marginBottom: "-10px",
        opacity:      "0",
        display:      "block"
      }, 180, function() {
        self.$el.css({visibility: "hidden"});
      });
    } else {
      this.$el.hide();
    }
  }
909277
public static function isImage($file)
    {
        if (!$v = getimagesize($file)) {
            return false;
        }
        return in_array($v[2], [IMAGETYPE_GIF, IMAGETYPE_JPEG, IMAGETYPE_PNG, IMAGETYPE_BMP]);
    }
867222
protected function leadGIF()
	{
		$exif  = exif_imagetype($this->file) === IMAGETYPE_GIF;

		if ($exif)
		{
			return $this->closeCase("gif", "image/gif");
		}

		return null;
	}