text
stringlengths
14
100k
source
stringclasses
1 value
repo
stringclasses
810 values
language
stringclasses
13 values
/* * 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|>.zxing.ChecksumException; import com.google.zxing.DecodeHintType; import com.google.zxing.FormatException; import com.google.zxing.NotFoundException; import com.google.zxing.Reader; import com.google.zxing.Result; import com.google.zxing.ResultPoint; import java.util.Map; /** * This class attempts to d...
fim
zxing/zxing
java
<|fim_suffix|>ult.getNumBits(), newResultPoints, result.getBarcodeFormat(), result.getTimestamp()); newResult.putAllMetadata(result.getResultMetadata()); return newResult; } } <|fim_prefix|>/* * Copyright 2...
fim
zxing/zxing
java
/* * 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 law or agreed ...
fim
zxing/zxing
java
<|fim_suffix|>ublic final class QRCodeMultiReader extends QRCodeReader implements MultipleBarcodeReader { private static final Result[] EMPTY_RESULT_ARRAY = new Result[0]; private static final ResultPoint[] NO_POINTS = new ResultPoint[0]; @Override public Result[] decodeMultiple(BinaryBitmap image) throws Not...
fim
zxing/zxing
java
<|fim_suffix|> * @author Sean Owen * @author Hannes Erven */ public final class MultiDetector extends Detector { private static final DetectorResult[] EMPTY_DETECTOR_RESULTS = new DetectorResult[0]; public MultiDetector(BitMatrix image) { super(image); } public DetectorResult[] detectMulti(Map<DecodeH...
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 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|>) { char c = Character.toUpperCase(contents.charAt(index)); if (index == 0 || index == contents.length() - 1) { // The start/end chars are not in the CodaBarReader.ALPHABET. switch (c) { case 'T': c = 'A'; break; case 'N': ...
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_suffix|> = findCType(value, index)) == CType.TWO_DIGITS) { index += 2; } if (lookahead == CType.ONE_DIGIT) { // odd number of digits, switch later return CODE_CODE_B; } return CODE_CODE_C; // even number of digits, switch now } // Here oldCode == 0, which means we a...
fim
zxing/zxing
java
<|fim_suffix|> // bump up i again since we read two characters i++; } else { decoded.append(c); } } return decoded.toString(); } } <|fim_prefix|>/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file ex...
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
/* * 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 law or agreed ...
fim
zxing/zxing
java
<|fim_prefix|>/* * Copyright 2015 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_suffix|> } catch (FormatException ignored) { throw new IllegalArgumentException("Illegal contents"); } break; default: throw new IllegalArgumentException( "Requested contents should be 12 or 13 digits long, but got " + length); } checkNumeric(cont...
fim
zxing/zxing
java
<|fim_suffix|>, true, MIDDLE_PATTERN); rowOffset = middleRange[1]; for (int x = 0; x < 4 && rowOffset < end; x++) { int bestMatch = decodeDigit(row, counters, rowOffset, L_PATTERNS); result.append((char) ('0' + bestMatch)); for (int counter : counters) { rowOffset += counter; } ...
fim
zxing/zxing
java
<|fim_suffix|>; for (int i = 0; i <= 3; i++) { int digit = Character.digit(contents.charAt(i), 10); pos += appendPattern(result, pos, UPCEANReader.L_PATTERNS[digit], false); } pos += appendPattern(result, pos, UPCEANReader.MIDDLE_PATTERN, false); for (int i = 4; i <= 7; i++) { int d...
fim
zxing/zxing
java
<|fim_suffix|>"); add(new int[] {865}, "MN"); add(new int[] {867}, "KP"); add(new int[] {868,869}, "TR"); add(new int[] {870,879}, "NL"); add(new int[] {880}, "KR"); add(new int[] {885}, "TH"); add(new int[] {888}, "SG"); add(new int[] {890}, "IN"); add(new in...
fim
zxing/zxing
java
<|fim_suffix|> int rowOffset, int[] pattern) throws NotFoundException { int patternLength = pattern.length; int[] counters = new int[patternLength]; int width = row.getSize(); boolean isWhite = false; int counterPosition ...
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 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.<|fim_suffix|>t.CODE_93)) { re...
fim
zxing/zxing
java
<|fim_suffix|>// continue } } throw NotFoundException.getNotFoundInstance(); } @Override public void reset() { for (Reader reader : readers) { reader.reset(); } } } <|fim_prefix|>/* * Copyright 2008 ZXing authors * * Licensed under the Apache License, Version 2.0 (the "License"...
fim
zxing/zxing
java
<|fim_suffix|>s row } } } throw NotFoundException.getNotFoundInstance(); } /** * Records the size of successive runs of white and black pixels in a row, starting at a given point. * The values are recorded in the given array, and the number of runs recorded is equal to the size * of...
fim
zxing/zxing
java
<|fim_prefix|>/* * 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 ...
fim
zxing/zxing
java
<|fim_suffix|>rcodeFormat; import com.google.zxing.BinaryBitmap; import com.google.zxing.ChecksumException; import com.google.zxing.DecodeHintType; import com.google.zxing.FormatException; import com.google.zxing.NotFoundException; import com.google.zxing.Result; import com.google.zxing.common.BitArray; import java.ut...
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|>wOffset = row.getNextUnset(rowOffset); } } if (resultString.length() != 2) { throw NotFoundException.getNotFoundInstance(); } if (Integer.parseInt(resultString.toString()) % 4 != checkParity) { throw NotFoundException.getNotFoundInstance(); } return rowOffset; ...
fim
zxing/zxing
java
<|fim_suffix|>_DIGIT_ENCODINGS = { 0x18, 0x14, 0x12, 0x11, 0x0C, 0x06, 0x03, 0x0A, 0x09, 0x05 }; private final int[] decodeMiddleCounters = new int[4]; private final StringBuilder decodeRowStringBuffer = new StringBuilder(); Result decodeRow(int rowNumber, BitArray row, int[] extensionStartRange) throws...
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|>se)) { throw NotFoundException.getNotFoundInstance(); } String resultString = result.toString(); // UPC/EAN should never be less than 8 chars anyway if (resultString.length() < 8) { throw FormatException.getFormatInstance(); } if (!checkChecksum(resultString)) { ...
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 2008 ZXing authors * * Licen<|fim_suffix|>esultString, int lgPatternFound) throws NotFoundException { for (int numSys = 0; numSys <= 1; numSys++) { for (int d = 0; d < 10; d++) { if (lgPatternFound == NUMSYS_AND_CHECK_DIGIT_PATTERNS[numSys][d]) { result...
fim
zxing/zxing
java
<|fim_suffix|>_PATTERNS[firstDigit][checkDigit]; boolean[] result = new boolean[CODE_WIDTH]; int pos = appendPattern(result, 0, UPCEANReader.START_END_PATTERN, true); for (int i = 1; i <= 6; i++) { int digit = Character.digit(contents.charAt(i), 10); if ((parities >> (6 - i) & 1) == 1) { ...
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_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
/* * 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 law or agreed ...
fim
zxing/zxing
java
<|fim_prefix|>/* * Copyright 2009 ZXing authors * * Li<|fim_suffix|>derPattern; } int getCount() { return count; } void incrementCount() { count++; } }<|fim_middle|>censed 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|>hrows NotFoundException { int oddSum = MathUtils.sum(getOddCounts()); int evenSum = MathUtils.sum(getEvenCounts()); boolean incrementOdd = false; boolean decrementOdd = false; boolean incrementEven = false; boolean decrementEven = false; if (outsideChar) { if (oddSum >...
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_suffix|>ing.common.BitArray; import java.util.List; /** * @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) * @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) */ final class BitArrayBuilder { private BitArrayBuilder() { } static BitArray buildBitArray(...
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_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
/* * 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 applicable law or agr...
fim
zxing/zxing
java
<|fim_suffix|>rs would like to acknowledge the Spanish Ministry of Industry, * Tourism and Trade, for the support in the project TSI020301-2008-2 * "PIRAmIDE: Personalizable Interactions with Resources on AmI-enabled * Mobile Dynamic Environments", led by Treelogic * ( http://www.treelogic.com/ ): * * http://ww...
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. <|fim_suffix|>distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,...
fim
zxing/zxing
java
/* * 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 applicable law or agr...
fim
zxing/zxing
java
<|fim_suffix|>r().extractNumericValueFromBitArray( HEADER_SIZE + GTIN_SIZE + LAST_DIGIT_SIZE, FIRST_THREE_DIGITS_SIZE); if (firstThreeDigits / 100 == 0) { buf.append('0'); } if (firstThreeDigits / 10 == 0) { buf.append('0'); } buf.append(firstThreeDigits); DecodedInformation...
fim
zxing/zxing
java
<|fim_suffix|>cDate == 38400) { return; } buf.append('('); buf.append(this.dateCode); buf.append(')'); int day = numericDate % 32; numericDate /= 32; int month = numericDate % 12 + 1; numericDate /= 12; int year = numericDate; if (year / 10 == 0) { buf.append('0...
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 t<|fim_suffix|> encodeCompressedWeight(buf, HEADER_SIZE + GTIN_SIZE, WEIGHT_SIZE); return buf.to...
fim
zxing/zxing
java
<|fim_suffix|>com/ ): * * http://www.piramidepse.com/ */ package com.google.zxing.oned.rss.expanded.decoders; import com.google.zxing.FormatException; import com.google.zxing.NotFoundException; import com.google.zxing.common.BitArray; /** * @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) *...
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_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|>te final BitArray information; private final GeneralAppIdDecoder generalDecoder; AbstractExpandedDecoder(BitArray information) { this.information = information; this.generalDecoder = new GeneralAppIdDecoder(information); } protected final BitArray getInformation() { return informatio...
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/li<|fim_suffix|> on AmI-enabled * Mobile Dynamic Env...
fim
zxing/zxing
java
<|fim_suffix|>a@deusto.es) * @author Eduardo Castillejo, University of Deusto (eduardo.castillejo@deusto.es) */ final class BlockParsedResult { private final DecodedInformation decodedInformation; private final boolean finished; BlockParsedResult() { this(null, false); } BlockParsedResult(DecodedInfo...
fim
zxing/zxing
java
<|fim_suffix|>rn this.encoding == State.ISO_IEC_646; } void setNumeric() { this.encoding = State.NUMERIC; } void setAlpha() { this.encoding = State.ALPHA; } void setIsoIec646() { this.encoding = State.ISO_IEC_646; } } <|fim_prefix|>/* * Copyright (C) 2010 ZXing authors * * Licensed under...
fim
zxing/zxing
java
<|fim_suffix|> with Resources on AmI-enabled * Mobile Dynamic Environments", led by Treelogic * ( http://www.treelogic.com/ ): * * http://www.piramidepse.com/ */ package com.google.zxing.oned.rss.expanded.decoders; /** * @author Pablo Orduña, University of Deusto (pablo.orduna@deusto.es) * @author Eduardo Ca...
fim
zxing/zxing
java
/* * 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 applicable law or agr...
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|>newPosition; } final int getNewPosition() { return this.newPosition; } } <|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 th...
fim
zxing/zxing
java
/* * 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 applicable law or agr...
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_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_suffix|>adataType; import com.google.zxing.ResultPoint; import com.google.zxing.common.DecoderResult; import com.google.zxing.multi.MultipleBarcodeReader; import com.google.zxing.pdf417.decoder.PDF417ScanningDecoder; import com.google.zxing.pdf417.detector.Detector; import com.google.zxing.pdf417.detector.PDF417D...
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|> for width/height, and retrieves bit matrix */ private static BitMatrix bitMatrixFromEncoder(PDF417 encoder, String contents, int errorCorrectionLevel, int w...
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|>tKey()); } else if (entry.getValue() == maxConfidence) { result.add(entry.getKey()); } } return PDF417Common.toIntArray(result); } Integer getConfidence(int value) { return values.get(value); } } <|fim_prefix|>/* * Copyright 2013 ZXing authors * * Licensed under ...
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 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 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 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|>eword getCodewordNearby(int imageRow) { Codeword codeword = getCodeword(imageRow); if (codeword != null) { return codeword; } for (int i = 1; i < MAX_NEARBY_DISTANCE; i++) { int nearImageRow = imageRowToCodewordIndex(imageRow) - i; if (nearImageRow >= 0) { codewor...
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 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 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 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|>% modulus; } int subtract(int a, int b) { return (modulus + a - b) % modulus; } int exp(int a) { return expTable[a]; } int log(int a) { if (a == 0) { throw new IllegalArgumentException(); } return logTable[a]; } int inverse(int a) { if (a == 0) { thr...
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
/* * 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 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_suffix|>BarcodeRow[] matrix; private int currentRow; private final int height; private final int width; /** * @param height the height of the matrix (Rows) * @param width the width of the matrix (Cols) */ BarcodeMatrix(int height, int width) { matrix = new BarcodeRow[height]; //Initia...
fim
zxing/zxing
java
<|fim_suffix|>or (int ii = 0; ii < width; ii++) { set(currentLocation++, black); } } /** * This function scales the row * * @param scale How much you want the image to be scaled, must be greater than or equal to 1. * @return the scaled row */ byte[] getScaledRow(int scale) { byte[] o...
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_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_prefix|>/* * Copyright 2006 Jeremias Maerki in part, and ZXing Authors in part * * 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
zxing/zxing
java
<|fim_prefix|>/* * Copyright 2006 Jeremias Maerki in part, and ZXing Authors in part * * 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
zxing/zxing
java
<|fim_suffix|>i < len; i++) { boolean odd = (i % 2) != 0; if (odd) { h = (char) ((h * 30) + tmp.charAt(i)); sb.append(h); } else { h = tmp.charAt(i); } } if ((len % 2) != 0) { sb.append((char) ((h * 30) + 29)); //ps } return submode; } /** * ...
fim
zxing/zxing
java
<|fim_prefix|>/* * Copyright 2022 ZXing authors * *<|fim_suffix|>.google.zxing.pdf417.encoder; import com.google.zxing.WriterException; import java.nio.charset.Charset; /** * Test adapter for PDF417HighLevelEncoder to be called solely from unit tests. */ public final class PDF417HighLevelEncoderTestAdapter { ...
fim
zxing/zxing
java
<|fim_suffix|> inner x loop below would be too large int nudgedTooFarRight = left + (int) ((matrixWidth - 1) * moduleSize) - right; if (nudgedTooFarRight > 0) { if (nudgedTooFarRight > nudge) { // Neither way fits; abort throw NotFoundException.getNotFoundInstance(); } left -= ...
fim
zxing/zxing
java
<|fim_suffix|>null} */ public static BitMatrix renderResult(QRCode code, int width, int height, int quietZone) { // Note that the input matrix uses 0 == white, 1 == black, while the output matrix uses // 0 == black, 255 == white (i.e. an 8 bit greyscale bitmap). ByteMatrix input = code.getMatrix(); ...
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|> for (int j = 0; j < numResultBlocks; j++) { int iOffset = j < longerBlocksStartAt ? i : i + 1; result[j].codewords[iOffset] = rawCodewords[rawCodewordsOffset++]; } } return result; } int getNumDataCodewords() { return numDataCodewords; } byte[] getCodewords() ...
fim
zxing/zxing
java
<|fim_suffix|> i); } } } } abstract boolean isMasked(int i, int j); } <|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...
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_suffix|>ectionLevel == other.errorCorrectionLevel && this.dataMask == other.dataMask; } } <|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 o...
fim
zxing/zxing
java