Calculate the combined intensity of a pixel and normalizes it to a value of at most 255.

@param element
@return
421079
private static int calcCombinedIntensity(final int element) {
        final Color color = new Color(element);
        return Math.min(255, (color.getRed() + color.getGreen() + color.getRed()) / 3);
    }
301097
private Double pixelValueToValue(GriddedTile griddedTile, Double pixelValue) {

		Double value = pixelValue;

		if (griddedCoverage != null
				&& griddedCoverage.getDataType() == GriddedCoverageDataType.INTEGER) {

			if (griddedTile != null) {
				value *= griddedTile.getScale();
				value += griddedTile.getOffset();
			}
			value *= griddedCoverage.getScale();
			value += griddedCoverage.getOffset();

		}

		return value;
	}
880617
public static IoMapping parseInputOutput(Element element) {
    Element inputOutputElement = element.elementNS(BpmnParse.CAMUNDA_BPMN_EXTENSIONS_NS, "inputOutput");
    if(inputOutputElement != null) {
      IoMapping ioMapping = new IoMapping();
      parseCamundaInputParameters(inputOutputElement, ioMapping);
      parseCamundaOutputParameters(inputOutputElement, ioMapping);
      return ioMapping;
    }
    return null;
  }
894276
function( pixel ) {
        var viewerCoordinates = this.imageToViewerElementCoordinates( pixel );
        return viewerCoordinates.plus(
                OpenSeadragon.getElementPosition( this.viewer.element ));
    }
345802
void add(MapElement element) {
		final Rectangle2d r = element.getBoundingBox();
		if (r != null) {
			if (Double.isNaN(this.minx) || this.minx > r.getMinX()) {
				this.minx = r.getMinX();
			}
			if (Double.isNaN(this.maxx) || this.maxx < r.getMaxX()) {
				this.maxx = r.getMaxX();
			}
			if (Double.isNaN(this.miny) || this.miny > r.getMinY()) {
				this.miny = r.getMinY();
			}
			if (Double.isNaN(this.maxy) || this.maxy < r.getMaxY()) {
				this.maxy = r.getMaxY();
			}
		}
		this.elements.add(element);
	}
47419
public static int fastModPrime(long data) {
    // Mix high and low 32 bit:
    int high = (int) (data >>> 32);
    // Use fast multiplication with 5 for high:
    int alpha = ((int) data) + (high << 2 + high);
    // Note that in Java, PRIME will be negative.
    if(alpha < 0 && alpha > -5) {
      alpha = alpha + 5;
    }
    return alpha;
  }
902164
public PageSnapshot blur(WebElement element) {
        try {
            image = ImageProcessor.blurArea(image, new Coordinates(element, devicePixelRatio));
        }catch(RasterFormatException rfe) {
            throw new ElementOutsideViewportException(ELEMENT_OUT_OF_VIEWPORT_EX_MESSAGE, rfe);
        }
        return this;
    }
819197
protected ImageDescriptor imageDescriptor(SarlConstructor element) {
		if (element.isStatic()) {
			return this.images.forStaticConstructor();
		}
		return this.images.forConstructor(
				element.getVisibility(),
				this.adornments.get(this.jvmModelAssociations.getInferredConstructor(element)));
	}
981488
public static int sameTagElNums(Element e) {
        Elements els = e.parent().getElementsByTag(e.tagName());
        return els.size();
    }
505180
public List<Integer> getOrbit(int element) {
        List<Integer> orbit = new ArrayList<Integer>();
        orbit.add(element);
        int i = values[element];
        while (i != element && orbit.size() < values.length) {
            orbit.add(i);
            i = values[i];
        }
        return orbit;
    }
183687
public static int frequency(Iterator<?> iterator, @Nullable Object element) {
    return size(filter(iterator, equalTo(element)));
  }
280576
public Integer getNumberFor(WebElement element) {
        Integer number = null;
        if ("li".equalsIgnoreCase(element.getTagName())
                && element.isDisplayed()) {
            int num;
            String ownVal = element.getAttribute("value");
            if (ownVal != null && !"0".equals(ownVal)) {
                num = toInt(ownVal, 0);
            } else {
                String start = element.findElement(By.xpath("ancestor::ol")).getAttribute("start");
                num = toInt(start, 1);

                List<WebElement> allItems = element.findElements(By.xpath("ancestor::ol/li"));
                int index = allItems.indexOf(element);
                for (int i = 0; i < index; i++) {
                    WebElement item = allItems.get(i);
                    if (item.isDisplayed()) {
                        num++;
                        String val = item.getAttribute("value");
                        int valNum = toInt(val, num);
                        if (valNum != 0) {
                            num = valNum + 1;
                        }
                    }
                }
            }
            number = num;
        }
        return number;
    }
898231
public MatlabValue deserializeValue(JsonElement element) {
        if (!element.isJsonObject()) {
            throw new JsonParseException("expected JSON object");
        }
        JsonObject json = element.getAsJsonObject();
        MatlabType type = getType(json);
        JsonElement value = json.get(MatlabJSONConstants.VALUE);
        switch (type) {
            case ARRAY:
                return parseMatlabArray(value);
            case BOOLEAN:
                return parseMatlabBoolean(value);
            case CELL:
                return parseMatlabCell(value);
            case FILE:
                return parseMatlabFile(value);
            case MATRIX:
                return parseMatlabMatrix(value);
            case SCALAR:
                return parseMatlabScalar(value);
            case STRING:
                return parseMatlabString(value);
            case STRUCT:
                return parseMatlabStruct(value);
            case DATE_TIME:
                return parseMatlabDateTime(value);
            default:
                throw new JsonParseException("Unknown type: " + type);
        }
    }
806289
@Override
    public <V> V getMaximum(ChronoElement<V> element) {

        V max;

        if (this.timestamp.contains(element)) {
            max = this.timestamp.getMaximum(element);
        } else {
            max = this.moment.getMaximum(element);
        }

        if (
            (element == SECOND_OF_MINUTE)
            && (this.timestamp.getYear() >= 1972)
        ) {
            PlainTimestamp ts = this.timestamp.with(element, max);

            if (!this.zone.isInvalid(ts, ts)) {
                Moment transformed = ts.in(this.zone);
                Moment test = transformed.plus(1, SI.SECONDS);

                if (test.isLeapSecond()) {
                    return element.getType().cast(Integer.valueOf(60));
                }
            }
        }

        return max;

    }
480094
public TypeMirror getType(Element element) {
    return elementTypeMap.containsKey(element) ? elementTypeMap.get(element) : element.asType();
  }
907103
public static <E> Matcher<Multiset<E>> elementWithCount(final E element, final int size) {
        return new IsMultisetElementWithCount(element, size);
    }
796641
public int typeExchange(Element element) {
        TypeMirror typeMirror = element.asType();

        // Primitive
        if (typeMirror.getKind().isPrimitive()) {
            return element.asType().getKind().ordinal();
        }

        switch (typeMirror.toString()) {
            case BYTE:
                return TypeKind.BYTE.ordinal();
            case SHORT:
                return TypeKind.SHORT.ordinal();
            case INTEGER:
                return TypeKind.INT.ordinal();
            case LONG:
                return TypeKind.LONG.ordinal();
            case FLOAT:
                return TypeKind.FLOAT.ordinal();
            case DOUBEL:
                return TypeKind.DOUBLE.ordinal();
            case BOOLEAN:
                return TypeKind.BOOLEAN.ordinal();
            case CHAR:
                return TypeKind.CHAR.ordinal();
            case STRING:
                return TypeKind.STRING.ordinal();
            default:
                // Other side, maybe the PARCELABLE or SERIALIZABLE or OBJECT.
                if (types.isSubtype(typeMirror, parcelableType)) {
                    // PARCELABLE
                    return TypeKind.PARCELABLE.ordinal();
                } else if (types.isSubtype(typeMirror, serializableType)) {
                    // SERIALIZABLE
                    return TypeKind.SERIALIZABLE.ordinal();
                } else {
                    return TypeKind.OBJECT.ordinal();
                }
        }
    }