text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>uper(message);
}
public WriterException(Throwable cause) {
super(cause);
}
}
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of t... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2010 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>rmatException;
import com.google.zxing.NotFoundException;
import com.google.zxing.Reader;
import com.google.zxing.Result;
import com.google.zxing.ResultMetadataType;
import com.google.zxing.ResultPoint;
import com.google.zxing.ResultPointCallback;
import com.google.zxing.aztec.decoder.Decoder;
import com.... | fim | zxing/zxing | java |
<|fim_suffix|>) {
output.setRegion(outputX, outputY, multiple, multiple);
}
}
}
return output;
}
}
<|fim_prefix|>/*
* Copyright 2013 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
... | fim | zxing/zxing | java |
<|fim_suffix|>--bit) {
correctedBits[index++] = (dataWord & (1 << bit)) != 0;
}
}
}
int ecLevel = 100 * (numCodewords - numDataCodewords) / numCodewords;
return new CorrectedBitsResult(correctedBits, errorsCorrected, ecLevel);
}
/**
* Gets the array of bits from an Aztec Cod... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2010 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2013 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file exce<|fim_suffix|>either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.googl... | fim | zxing/zxing | java |
<|fim_suffix|>ryShiftCount <= 62 and i == 31
bitArray.appendBits(bsbc - 31, 5);
}
}
bitArray.appendBits(text[binaryShiftStart + i], 8);
}
}
@Override
public String toString() {
return "<" + binaryShiftStart + "::" + (binaryShiftStart + binaryShiftByteCount - 1) + '>';
}
}... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2013 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|> the current mode. That can never save bits.
State shiftState = stateNoBinary.shiftAndAppend(mode, charInMode);
result.add(shiftState);
}
}
}
if (state.getBinaryShiftByteCount() > 0 || CHAR_MAP[state.getMode()][ch] == 0) {
// It's never worthwhile to go int... | fim | zxing/zxing | java |
<|fim_suffix|>final short bitCount;
SimpleToken(Token previous, int value, int bitCount) {
super(previous);
this.value = (short) value;
this.bitCount = (short) bitCount;
}
@Override
void appendTo(BitArray bitArray, byte[] text) {
bitArray.appendBits(value, bitCount);
}
@Override
public ... | fim | zxing/zxing | java |
<|fim_suffix|>token);
}
BitArray bitArray = new BitArray();
// Add each token to the result in forward order
for (int i = symbols.size() - 1; i >= 0; i--) {
symbols.get(i).appendTo(bitArray, text);
}
return bitArray;
}
@Override
public String toString() {
return String.format("%... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2013 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_suffix|>atchSingleDoCoMoPrefixedField("B:", rawText, true);
String phoneNumber2 = matchSingleDoCoMoPrefixedField("M:", rawText, true);
String phoneNumber3 = matchSingleDoCoMoPrefixedField("F:", rawText, true);
String email = matchSingleDoCoMoPrefixedField("E:", rawText, true);
return new AddressB... | fim | zxing/zxing | java |
<|fim_suffix|>URL:", rawText);
if (rawUri == null) {
return null;
}
String uri = rawUri[0];
return URIResultParser.isBasicallyValidURI(uri) ? new URIParsedResult(uri, title) : null;
}
}
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "L... | fim | zxing/zxing | java |
/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 2010 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applica... | fim | zxing/zxing | java |
<|fim_suffix|>At(i);
// First character must be a open parenthesis.If not, ERROR
if (c != '(') {
return null;
}
CharSequence rawTextAux = rawText.substring(i + 1);
StringBuilder buf = new StringBuilder();
for (int index = 0; index < rawTextAux.length(); index++) {
char currentChar ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the<|fim_suffix|>sult);
Matcher matcher = GEO_URL_PATTERN.matcher(rawText);
if (!matcher.matches()) {
return null;
}
String... | fim | zxing/zxing | java |
/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under <|fim_suffix|>mat();
if (format != BarcodeFormat.EAN_13) {
return null;
}
String rawText = getMassagedText(result);
int length = rawText.length();
if (length != 13) {
return null;
}
if (!rawText.startsWith("978... | fim | zxing/zxing | java |
<|fim_suffix|>
@Override
public final String toString() {
return getDisplayResult();
}
public static void maybeAppend(String value, StringBuilder result) {
if (value != null && !value.isEmpty()) {
// Don't add a newline before the first value
if (result.length() > 0) {
result.appen... | fim | zxing/zxing | java |
<|fim_suffix|>de -- from plain text, to a
* URI, to an e-mail address, etc.
*
* @author Sean Owen
*/
public enum ParsedResultType {
ADDRESSBOOK,
EMAIL_ADDRESS,
PRODUCT,
URI,
TEXT,
GEO,
TEL,
SMS,
CALENDAR,
WIFI,
ISBN,
VIN,
}
<|fim_prefix|>/*
* Copyright 2010 ZXing authors
*
* Licensed un... | fim | zxing/zxing | java |
<|fim_suffix|>normalizedProductID;
ProductParsedResult(String productID) {
this(productID, productID);
}
ProductParsedResult(String productID, String normalizedProductID) {
super(ParsedResultType.PRODUCT);
this.productID = productID;
this.normalizedProductID = normalizedProductID;
}
public ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance <|fim_suffix|>ull;
}
// Not actually checking the checksum again here
String normalizedProductID;
// Expand UPC-E for purposes of ... | fim | zxing/zxing | java |
<|fim_suffix|> = matchPrefixedField(prefix, rawText, endChar, trim);
return matches == null ? null : matches[0];
}
}
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You ma... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>ject.indexOf(':');
if (colon >= 0) {
body = subject.substring(colon + 1);
subject = subject.substring(0, colon);
}
}
return new EmailAddressParsedResult(new String[] {emailAddress},
null,
nu... | fim | zxing/zxing | java |
<|fim_suffix|>ed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.zxing... | fim | zxing/zxing | java |
<|fim_suffix|>cific language governing permissions and
* limitations under the License.
*/
package com.google.zxing.client.result;
import com.google.zxing.Result;
/**
* Parses a "tel:" URI result, which specifies a phone number.
*
* @author Sean Owen
*/
public final class TelResultParser extends ResultParser {... | fim | zxing/zxing | java |
<|fim_suffix|>uthor Sean Owen
*/
public final class TextParsedResult extends ParsedResult {
private final String text;
private final String language;
public TextParsedResult(String text, String language) {
super(ParsedResultType.TEXT);
this.text = text;
this.language = language;
}
public Strin... | fim | zxing/zxing | java |
<|fim_suffix|>0 || isColonFollowedByPortNumber(uri, protocolEnd)) {
// No protocol, or found a colon, but it looks like it is after the host, so the protocol is still missing,
// so assume http
uri = "http://" + uri;
}
return uri;
}
private static boolean isColonFollowedByPortNumber(Strin... | fim | zxing/zxing | java |
<|fim_suffix|>|| USER_IN_HOST.matcher(uri).find();
}
static boolean isBasicallyValidURI(String uri) {
if (uri.contains(" ")) {
// Quick hack check for a common case
return false;
}
Matcher m = URL_WITH_PROTOCOL_PATTERN.matcher(uri);
if (m.find() && m.start() == 0) { // match at start on... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>
toTypes(phoneNumbers),
toPrimaryValues(emails),
toTypes(emails),
toPrimaryValue(instantMessenger),
toPrimaryV... | fim | zxing/zxing | java |
<|fim_suffix|>ngleVCardPrefixedField("GEO", rawText);
double latitude;
double longitude;
if (geoString == null) {
latitude = Double.NaN;
longitude = Double.NaN;
} else {
int semicolon = geoString.indexOf(';');
if (semicolon < 0) {
return null;
}
try {
... | fim | zxing/zxing | java |
/*
* Copyright 2014 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2014 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>);
return result.toString();
}
}
<|fim_prefix|>/*
* Copyright 2010 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/lic... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2010 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>rentInt = nextInt >>> leftOffset;
}
newBits[oldBitsLen - 1] = currentInt;
}
bits = newBits;
}
private static int[] makeArray(int size) {
return new int[(size + 31) / 32];
}
@Override
public boolean equals(Object o) {
if (!(o instanceof BitArray)) {
return fals... | fim | zxing/zxing | java |
<|fim_suffix|>Matrix} to represent the same but rotated 90 degrees counterclockwise
*/
public void rotate90() {
int newWidth = height;
int newHeight = width;
int newRowSize = (newWidth + 31) / 32;
int[] newBits = new int[newRowSize * newHeight];
for (int y = 0; y < height; y++) {
for (in... | fim | zxing/zxing | java |
<|fim_suffix|>of bits to read
* @return int representing the bits read. The bits will appear as the least-significant
* bits of the int
* @throws IllegalArgumentException if numBits isn't in [1,32] or more than is available
*/
public int readBits(int numBits) {
if (numBits < 1 || numBits > 32 ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apa<|fim_suffix|>tECI> VALUE_TO_ECI = new HashMap<>();
private static final Map<String,CharacterSetECI> NAME_TO_ECI = new HashMap<>();
static {
for (CharacterSetECI eci : values()) {
for (int value : eci.values) {
VALUE_TO_E... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|> float p4FromX, float p4FromY) throws NotFoundException {
PerspectiveTransform transform = PerspectiveTransform.quadrilateralToQuadrilateral(
p1ToX, p1ToY, p2ToX, p2ToY, p3ToX, p3ToY, p4ToX, p4ToY,
p1FromX, p1FromY, p2FromX, p2FromY, p3FromX, p3FromY, p4FromX,... | fim | zxing/zxing | java |
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2021 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>missions and
* limitations under the License.
*/
package com.google.zxing.common;
/**
* Interface to navigate a sequence of ECIs and bytes.
*
* @author Alex Geller
*/
public interface ECIInput {
/**
* Returns the length of this input. The length is the number
* of {@code byte}s in or ECIs i... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2022 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|> }
}
int blackPoint = estimateBlackPoint(localBuckets);
// We delay reading the entire image luminance until the black point estimation succeeds.
// Although we end up reading four rows twice, it is consistent with our motto of
// "fail quickly" which is necessary for continuous scan... | fim | zxing/zxing | java |
<|fim_suffix|>o be within the image. Because the set of points are assumed to be linear, this is valid.</p>
*
* @param image image into which the points should map
* @param points actual points in x1,y1,...,xn,yn form
* @throws NotFoundException if an endpoint is lies outside the image boundaries
*/
pr... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2021 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|> if (canBeISO88591 && canBeShiftJIS) {
return (sjisMaxKatakanaWordLength == 2 && sjisKatakanaChars == 2) || isoHighOther * 10 >= length
? SHIFT_JIS_CHARSET : StandardCharsets.ISO_8859_1;
}
// Otherwise, try in order ISO-8859-1, Shift JIS, UTF-8 and fall back to default platform e... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2012 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>rt)) {
start--;
} else {
int whiteRunStart = start;
do {
start--;
} while (start >= minDim && !(horizontal ? image.get(start, fixedDimension) :
image.get(fixedDimension, start)));
int whiteRunSize = whiteRunStart - start;
if (star... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2010 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>ubtract(int a, int b) {
return a ^ b;
}
/**
* @return 2 to the power of a in GF(size)
*/
int exp(int a) {
return expTable[a];
}
/**
* @return base 2 log of a in GF(size)
*/
int log(int a) {
if (a == 0) {
throw new IllegalArgumentException();
}
return log... | fim | zxing/zxing | java |
<|fim_suffix|>oefficients.length;
for (int i = 1; i < size; i++) {
result = GenericGF.addOrSubtract(field.multiply(a, result), coefficients[i]);
}
return result;
}
GenericGFPoly addOrSubtract(GenericGFPoly other) {
if (!field.equals(other.field)) {
throw new IllegalArgumentException("Ge... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed und<|fim_suffix|> for (int i = 0; i < numZeroCoefficients; i++) {
toEncode[dataBytes + i] = 0;
}
System.arraycopy(coefficients, 0, toEncode, dataBytes + numZeroCoefficients, coefficients.length);
}
}
<|fim_middle|>er the Apache License, ... | fim | zxing/zxing | java |
/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
<|fim_suffix|>"deprecation")
... | fim | zxing/zxing | java |
<|fim_suffix|> (int dataRegionColumn = 0; dataRegionColumn < numDataRegionsColumn; ++dataRegionColumn) {
int dataRegionColumnOffset = dataRegionColumn * dataRegionSizeColumns;
for (int i = 0; i < dataRegionSizeRows; ++i) {
int readRowOffset = dataRegionRow * (dataRegionSizeRows + 2) + 1 + i;
... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>Instance();
}
int c2 = bits.readBits(8);
if (c1 >= 128 && c1 <= 191) {
} else {
if (bits.available() < 8) {
throw FormatException.getFormatInstance();
}
int c3 = bits.readBits(8);
}
}*/
}
/**
* See ISO 16022:2006, Annex B, B.2
... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>1, 5))),
new Version(26, 8, 32, 6, 14,
new ECBlocks(11, new ECB(1, 10))),
new Version(27, 12, 26, 10, 24,
new ECBlocks(14, new ECB(1, 16))),
new Version(28, 12, 36, 10, 16,
new ECBlocks(18, new ECB(1, 22))),
new Version(29, 16, 36, 14, 16... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_suffix|>e if (HighLevelEncoder.isExtendedASCII(c)) {
context.writeCodeword(HighLevelEncoder.UPPER_SHIFT);
context.writeCodeword((char) (c - 128 + 1));
context.pos++;
} else {
context.writeCodeword((char) (c + 1));
context.pos++;
}
}
}
private static ch... | fim | zxing/zxing | java |
<|fim_suffix|>uffer.append('\0'); //Initialize length field
while (context.hasMoreCharacters()) {
char c = context.getCurrentChar();
buffer.append(c);
context.pos++;
int newMode = HighLevelEncoder.lookAheadTest(context.getMessage(), context.pos, getEncodingMode());
if (newMode != get... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2006-2007 Jeremias Maerki.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | zxing/zxing | java |
<|fim_suffix|>{
return (index <= 8) ? 156 : 155;
}
}
<|fim_prefix|>/*
* Copyright 2006 Jeremias Maerki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache... | fim | zxing/zxing | java |
<|fim_suffix|>ows - 2, 0, pos, 2);
module(numrows - 1, 0, pos, 3);
module(0, numcols - 2, pos, 4);
module(0, numcols - 1, pos, 5);
module(1, numcols - 1, pos, 6);
module(2, numcols - 1, pos, 7);
module(3, numcols - 1, pos, 8);
}
private void corner4(int pos) {
module(numrows - 1, 0, pos... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2006-2007 Jeremias Maerki.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by app... | fim | zxing/zxing | java |
/*
* Copyright 2006-2007 Jeremias Maerki.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or... | fim | zxing/zxing | java |
<|fim_suffix|>harAt(pos);
}
public StringBuilder getCodewords() {
return codewords;
}
public void writeCodewords(String codewords) {
this.codewords.append(codewords);
}
public void writeCodeword(char codeword) {
this.codewords.append(codeword);
}
public int getCodewordCount() {
retur... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2006 Jeremias Maerki.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | fim | zxing/zxing | java |
<|fim_suffix|> * @param msg the message
* @param startpos the start position within the message
* @return the requested character count
*/
public static int determineConsecutiveDigitCount(CharSequence msg, int startpos) {
int len = msg.length();
int idx = startpos;
while (idx < len && isDi... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2021 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2006 Jeremias Maerki
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicabl... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2007 Jeremias Maerki.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicab... | fim | zxing/zxing | java |
<|fim_suffix|>eturn 2;
}
if (c <= 'Z') {
sb.append('\2'); //Shift 3 Set
sb.append((char) (c - 65 + 1));
return 2;
}
if (c <= 127) {
sb.append('\2'); //Shift 3 Set
sb.append((char) (c - 123 + 27));
return 2;
}
sb.append("\1\u001e"); //Shift 2, Upper Shift
i... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2006-2007 Jeremias Maerki.
*
* Licensed under the Apache License, Version 2.0 (the "License");<|fim_suffix|>.getCodewordCount();
int count = buffer.length();
context.pos -= count;
if (context.getRemainingCharacters() > 1 || available > 1 ||
context.getRemainingCharact... | fim | zxing/zxing | java |
/*
* Copyright 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed ... | fim | zxing/zxing | java |
<|fim_suffix|>2,749,748,755,754,761,760,767,766,773,772,779,778,785,784,791,790,797,796,803,802,809,808,815,814,863,862}
};
private final BitMatrix bitMatrix;
/**
* @param bitMatrix {@link BitMatrix} to parse
*/
BitMatrixParser(BitMatrix bitMatrix) {
this.bitMatrix = bitMatrix;
}
byte[] readCod... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2011 ZXing authors
*
* Licensed under the A<|fim_suffix|>ServiceClass(byte[] bytes) {
return getInt(bytes, SERVICE_CLASS_BYTES);
}
private static int getPostCode2Length(byte[] bytes) {
return getInt(bytes, POSTCODE_2_LENGTH_BYTES);
}
private static int getPostCode2(byte... | fim | zxing/zxing | java |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.