text stringlengths 9 39.2M | dir stringlengths 25 226 | lang stringclasses 163
values | created_date timestamp[s] | updated_date timestamp[s] | repo_name stringclasses 751
values | repo_full_name stringclasses 752
values | star int64 1.01k 183k | len_tokens int64 1 18.5M |
|---|---|---|---|---|---|---|---|---|
```java
package jvmgo.book.ch10;
public class ParseIntTest {
public static void main(String[] args) {
foo(args);
}
private static void foo(String[] args) {
try {
bar(args);
} catch (NumberFormatException e) {
System.out.println(e.getMessage());
}
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch10/ParseIntTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 117 |
```java
package jvmgo.book.ch10;
public class StackTraceTest {
public static void main(String[] args) {
foo();
}
private static void foo() {
bar();
}
private static void bar() {
throw new RuntimeException("OH!");
}
}
``` | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch10/StackTraceTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 59 |
```java
package jvmgo.book.ch10;
public class ExceptionTest2 {
public static void main(String[] args) {
safe(0);
safe(1);
}
private static void safe(int x) {
try {
dangerous(x);
System.out.println(x);
} catch (IllegalArgumentException e) {
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch10/ExceptionTest2.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 108 |
```java
package jvmgo.book.ch03;
public class ClassFileTest {
public static final boolean FLAG = true;
public static final byte BYTE = 123;
public static final char X = 'X';
public static final short SHORT = 12345;
public static final int INT = 123456789;
public static final long LONG = 12... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch03/ClassFileTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 134 |
```java
package jvmgo.book.ch08;
public class ArrayDemo {
public static void main(String[] args) {
int[] a1 = new int[10]; // newarray
String[] a2 = new String[10]; // anewarray
int[][] a3 = new int[10][10]; // multianewarray
int x = a1.length; // arraylength
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch08/ArrayDemo.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 151 |
```java
package jvmgo.book.ch08;
public class PrintArgs {
public static void main(String[] args) {
for (String arg : args) {
System.out.println(arg);
}
}
}
``` | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch08/PrintArgs.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 44 |
```java
package jvmgo.book.ch08;
public class Array3D {
public static void main(String[] args) {
int[][][] threeD = new int[5][4][3];
for (int i = 0; i < 5; ++i) {
for (int j = 0; j < 4; ++j) {
for (int k = 0; k < 3; ++k) {
threeD[i][j][k] = i + j +... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch08/Array3D.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 193 |
```java
package jvmgo.book.ch08;
public class MultianewarrayDemo {
public static void main(String[] args) {
new MultianewarrayDemo().test();
}
public void test() {
int[][][] x = new int[3][4][5];
}
}
``` | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch08/MultianewarrayDemo.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 63 |
```java
package jvmgo.book.ch08;
public class BubbleSortTest {
public static void main(String[] args) {
int[] arr = {
22, 84, 77, 11, 95, 9, 78, 56,
36, 97, 65, 36, 10, 24 ,92, 48
};
//printArray(arr);
bubbleSort(arr);
//System.out.println(123... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch08/BubbleSortTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 263 |
```java
package jvmgo.book.ch08;
public class StringTest {
public static final String STR = "abc";
public static void main(String[] args) {
String s1 = "xyz"; // ldc
System.out.println(STR);
System.out.println(s1);
//String s2 = "abc1";
//assertSame(s1, s2);
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch08/StringTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 134 |
```java
package jvmgo.book.ch06;
public class Circle {
public static float PI;
public float r;
public static void main(String[] args) {
Circle.PI = 3.14f;
Circle c = new Circle();
c.r = 5.5f;
float area = Circle.PI * c.r * c.r;
System.out.prin... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch06/Circle.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 88 |
```java
package jvmgo.book.ch06;
public class FieldResolutionTest {
private static interface I {
static int x = 1;
}
private static class B {
public int x;
}
private static class C extends B implements I {
//public int x;
}
public static void main(String[] args) ... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch06/FieldResolutionTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 90 |
```java
package jvmgo.book.ch06;
public class FieldInitTest {
public static boolean Z;
public static byte B;
public static short S;
public static int I;
public static long L;
public static char C;
public static float F;
public static double D;
public boolean z;
public byte b;
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch06/FieldInitTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 231 |
```java
package jvmgo.book.ch06;
public class FieldTest {
public static class Inner {
private int x;
}
public static void main(String[] args) {
Inner inner = new Inner();
inner.x = 100;
System.out.println(inner.x);
}
}
``` | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch06/FieldTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 61 |
```java
package jvmgo.book.ch01;
public class HelloWorld {
public static void main(String[] args) {
System.out.println("Hello, world!");
}
}
``` | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch01/HelloWorld.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 37 |
```java
package jvmgo.book.ch06;
public class MyObject {
public static int staticVar;
public int instanceVar;
public static void main(String[] args) {
int x = 32768; // ldc
MyObject myObj = new MyObject(); // new
MyObject.staticVar = x; // putstatic
x = MyObject.staticVar;... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch06/MyObject.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 156 |
```java
package jvmgo.book.ch09;
import java.util.ArrayList;
import java.util.List;
public class ArrayListTest {
public static void main(String[] args) {
List<String> strs = new ArrayList<>();
strs.add("hello");
strs.add("world");
for (String str : strs) {
System.out.p... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/ArrayListTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 75 |
```java
package jvmgo.book.ch09;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
public class ArrayClassTest {
public static void main(String[] args) {
//Class<int[]> arrClass = int[].class;
Class<?> arrClass = Object[].class;
System.out.println(arrClass.getSuperclass())... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/ArrayClassTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 133 |
```java
package jvmgo.book.ch09;
public class ObjectTest {
public static void main(String[] args) {
Object obj1 = new ObjectTest();
Object obj2 = new ObjectTest();
System.out.println(obj1.hashCode());
System.out.println(obj1.toString());
System.out.println(obj1.equals(obj2)... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/ObjectTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 81 |
```java
package jvmgo.book.ch09;
public class GetClassTest {
public static void main(String[] args) {
System.out.println(void.class.getName()); // void
System.out.println(boolean.class.getName()); // boolean
System.out.println(byte.class.getName()); // byte
System.out.println(char.... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/GetClassTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 286 |
```java
package jvmgo.book.ch09;
public class StringBuilderTest {
public static void main(String[] args) {
String hello = "hello,";
String world = "world!";
String str = hello + world;
System.out.println(str);
}
}
``` | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/StringBuilderTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 56 |
```java
package jvmgo.book.ch09;
import java.util.ArrayList;
import java.util.List;
public class BoxTest {
public static void main(String[] args) {
List<Integer> list = new ArrayList<>();
list.add(1);
list.add(2);
list.add(3);
System.out.println(list.toString());
f... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/BoxTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 88 |
```java
package jvmgo.book.ch09;
import java.util.HashMap;
import java.util.Map;
public class HashMapTest {
public static void main(String[] args) {
Map<String, String> map = new HashMap<>();
map.put("abc", "123");
map.put("xyz", "987");
System.out.println(map.get("abc"));
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/HashMapTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 91 |
```java
package jvmgo.book.ch09;
public class CloneTest implements Cloneable {
private double pi = 3.14;
@Override
public CloneTest clone() {
try {
return (CloneTest) super.clone();
} catch (CloneNotSupportedException e) {
throw new RuntimeException(e);
}
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/CloneTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 130 |
```java
package jvmgo.book.ch09;
public class StringTest {
public static void main(String[] args) {
String s1 = "abc1";
String s2 = "abc1";
System.out.println(s1 == s2);
int x = 1;
String s3 = "abc" + x;
System.out.println(s1 == s3);
s3 = s3.intern();
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/StringTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 104 |
```java
package jvmgo.book.ch09;
public class PrintlnTest {
public static void main(String[] args) {
System.out.println(false);
System.out.println(true);
System.out.println((byte)1);
System.out.println((short)2);
System.out.println('x');
System.out.println(3);
... | /content/code_sandbox/v1/code/java/example/src/main/java/jvmgo/book/ch09/PrintlnTest.java | java | 2016-01-06T13:13:45 | 2024-08-16T13:42:58 | jvmgo-book | zxh0/jvmgo-book | 1,605 | 106 |
```qml
/*
*/
import QtQuick 2.12
import QtQuick.Window 2.12
import QtQuick.Controls 2.5
import QtQuick.Layouts 1.12
import QtQuick.Shapes 1.12
import QtMultimedia 5.12
import ZXing 1.0
Window {
visible: true
width: 640
height: 480
title: Qt.application.name
property var nullPoints: [Qt.point(0,0), Qt.point(0,0... | /content/code_sandbox/example/ZXingQt5CamReader.qml | qml | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,157 |
```ruby
Pod::Spec.new do |s|
s.name = 'zxing-cpp'
s.version = '2.2.0'
s.summary = 'C++ port of ZXing'
s.homepage = 'path_to_url
s.author = 'axxel'
s.readme = 'path_to_url
s.license = {
:file => 'LICENSE'
}
s.source = {
:git => 'path_to_url
:tag => "v#{s.version}"
}
s.module_name = 'ZXi... | /content/code_sandbox/zxing-cpp.podspec | ruby | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 424 |
```swift
// swift-tools-version:5.7.1
import PackageDescription
let package = Package(
name: "ZXingCpp",
platforms: [
.iOS(.v11)
],
products: [
.library(
name: "ZXingCpp",
targets: ["ZXingCpp"])
],
targets: [
.target(
name: "ZXingCppCo... | /content/code_sandbox/Package.swift | swift | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 219 |
```c++
/*
*/
#ifdef ZXING_EXPERIMENTAL_API
#include "WriteBarcode.h"
#else
#include "BitMatrix.h"
#include "BitMatrixIO.h"
#include "CharacterSet.h"
#include "MultiFormatWriter.h"
#endif
#include "Version.h"
#include <algorithm>
#include <cctype>
#include <cstring>
#include <fstream>
#include <iostream>
#include <str... | /content/code_sandbox/example/ZXingWriter.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,084 |
```cmake
macro(zxing_add_package_stb)
unset (STB_FOUND CACHE)
if (ZXING_DEPENDENCIES STREQUAL "AUTO")
find_package(PkgConfig)
pkg_check_modules (STB IMPORTED_TARGET stb)
elseif (ZXING_DEPENDENCIES STREQUAL "LOCAL")
find_package(PkgConfig REQUIRED)
pkg_check_modules (STB REQ... | /content/code_sandbox/zxing.cmake | cmake | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 460 |
```unknown
---
Language: Cpp
Standard: c++17
BasedOnStyle: LLVM
IndentWidth: 4
TabWidth: 4
UseTab: ForContinuationAndIndentation # ForIndentation
AccessModifierOffset: -4
ColumnLimit: 135
#AlignConsecutiveAssignments: true
AlignConsecutiveBitFields: true
AlignEscapedNewlines: DontAlign
AlignTrailingComments: true
A... | /content/code_sandbox/.clang-format | unknown | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 288 |
```c++
/*
*/
#include "ZXingQtReader.h"
#include <QDebug>
using namespace ZXingQt;
int main(int argc, char* argv[])
{
if (argc != 2) {
qDebug() << "Please supply exactly one image filename";
return 1;
}
QString filePath = argv[1];
QImage image = QImage(filePath);
if (image.isNull()) {
qDebug() << "Cou... | /content/code_sandbox/example/ZXingQtReader.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 228 |
```objective-c
/*
*/
#pragma once
#include "ReadBarcode.h"
#include <QImage>
#include <QDebug>
#include <QMetaType>
#include <QScopeGuard>
#ifdef QT_MULTIMEDIA_LIB
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#include <QAbstractVideoFilter>
#else
#include <QVideoFrame>
#include <QVideoSink>
#endif
#include <QElapsed... | /content/code_sandbox/example/ZXingQtReader.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,867 |
```c++
/*
*/
#include "ZXingOpenCV.h"
#include <iostream>
using namespace cv;
int main()
{
namedWindow("Display window");
Mat image;
VideoCapture cap(0);
if (!cap.isOpened())
std::cout << "cannot open camera";
else
while (waitKey(25) != 27) {
cap >> image;
auto barcodes = ReadBarcodes(image);
fo... | /content/code_sandbox/example/ZXingOpenCV.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 121 |
```c++
/*
*/
#include "GTIN.h"
#include "ReadBarcode.h"
#include "Version.h"
#ifdef ZXING_EXPERIMENTAL_API
#include "WriteBarcode.h"
#endif
#include <cctype>
#include <chrono>
#include <cstring>
#include <iostream>
#include <iterator>
#include <memory>
#include <string>
#include <vector>
#define STB_IMAGE_IMPLEMENT... | /content/code_sandbox/example/ZXingReader.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,232 |
```objective-c
/*
*/
#pragma once
#include "ReadBarcode.h"
#include <opencv2/opencv.hpp>
inline ZXing::ImageView ImageViewFromMat(const cv::Mat& image)
{
using ZXing::ImageFormat;
auto fmt = ImageFormat::None;
switch (image.channels()) {
case 1: fmt = ImageFormat::Lum; break;
case 2: fmt = ImageFormat::LumA;... | /content/code_sandbox/example/ZXingOpenCV.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 390 |
```unknown
<RCC>
<qresource prefix="/">
<file>ZXingQt5CamReader.qml</file>
<file>ZXingQt6CamReader.qml</file>
</qresource>
</RCC>
``` | /content/code_sandbox/example/ZXingQtCamReader.qrc | unknown | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 47 |
```qml
/*
*/
import QtQuick
import QtQuick.Window
import QtQuick.Controls
import QtQuick.Layouts
import QtQuick.Shapes
import QtMultimedia
import ZXing
Window {
visible: true
width: 640
height: 480
title: Qt.application.name
property var nullPoints: [Qt.point(0,0), Qt.point(0,0), Qt.point(0,0), Qt.point(0,0)]
... | /content/code_sandbox/example/ZXingQt6CamReader.qml | qml | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,424 |
```c++
/*
*/
#include <QGuiApplication>
#include <QQmlApplicationEngine>
#include "ZXingQtReader.h"
int main(int argc, char *argv[])
{
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
#endif
ZXingQt::registerQmlAndMetaTypes();
QGuiApplication app(argc, argv... | /content/code_sandbox/example/ZXingQtCamReader.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 175 |
```unknown
@PACKAGE_INIT@
include("${CMAKE_CURRENT_LIST_DIR}/ZXingTargets.cmake")
# this does not work: add_library(ZXing::Core ALIAS ZXing::ZXing)
# this is a workaround available since 3.11 :
if(NOT(CMAKE_VERSION VERSION_LESS 3.11))
add_library(ZXing::Core INTERFACE IMPORTED)
target_link_libraries(ZXing::Cor... | /content/code_sandbox/core/ZXingConfig.cmake.in | unknown | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 96 |
```c++
/*
*/
#include "BarcodeFormat.h"
#ifdef ZXING_EXPERIMENTAL_API
#include "WriteBarcode.h"
#else
#include "BitMatrix.h"
#include "MultiFormatWriter.h"
#endif
#include <QDebug>
#include <QImage>
namespace ZXingQt {
QImage WriteBarcode(QStringView text, ZXing::BarcodeFormat format)
{
using namespace ZXing;
#i... | /content/code_sandbox/example/ZXingQtWriter.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 281 |
```unknown
/*
*/
#pragma once
#cmakedefine ZXING_READERS
#cmakedefine ZXING_WRITERS
// Version numbering
#define ZXING_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
#define ZXING_VERSION_MINOR @PROJECT_VERSION_MINOR@
#define ZXING_VERSION_PATCH @PROJECT_VERSION_PATCH@
#define ZXING_VERSION_STR "@PROJECT_VERSION_MAJOR@.@PRO... | /content/code_sandbox/core/Version.h.in | unknown | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 81 |
```unknown
libdir=@CMAKE_INSTALL_FULL_LIBDIR@
includedir=@CMAKE_INSTALL_FULL_INCLUDEDIR@
Name: ZXing
Description: ZXing-C++ library
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lZXing
Cflags: -I${includedir} -I${includedir}/ZXing
``` | /content/code_sandbox/core/zxing.pc.in | unknown | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 72 |
```objective-c
#pragma once
#ifdef ZXING_BUILD_FOR_TEST
#define ZXING_EXPORT_TEST_ONLY
#define ZXING_IF_NOT_TEST(x)
#else
#define ZXING_EXPORT_TEST_ONLY static
#define ZXING_IF_NOT_TEST(x) x
#endif
``` | /content/code_sandbox/core/src/ZXTestSupport.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 48 |
```objective-c
/*
*/
#pragma once
#include "Flags.h"
#include <string>
#include <string_view>
namespace ZXing {
/**
* Enumerates barcode formats known to this package.
*/
enum class BarcodeFormat
{
// The values are an implementation detail. The c++ use-case (ZXing::Flags) could have been designed such that it
/... | /content/code_sandbox/core/src/BarcodeFormat.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 741 |
```c++
/*
*/
#include "PerspectiveTransform.h"
#include <array>
namespace ZXing {
PerspectiveTransform PerspectiveTransform::inverse() const
{
// Here, the adjoint serves as the inverse:
// Adjoint is the transpose of the cofactor matrix:
return {
a22 * a33 - a23 * a32,
a23 * a31 - a21 * a33,
a21 * a32 - a... | /content/code_sandbox/core/src/PerspectiveTransform.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 830 |
```objective-c
/*
*/
#pragma once
#include <string>
#include <cstdint>
namespace ZXing {
class Error
{
public:
enum class Type : uint8_t { None, Format, Checksum, Unsupported };
Type type() const noexcept { return _type; }
const std::string& msg() const noexcept { return _msg; }
explicit operator bool() const ... | /content/code_sandbox/core/src/Error.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 455 |
```c++
/*
*/
#include "TextDecoder.h"
#include "CharacterSet.h"
#include "ECI.h"
#include "Utf.h"
#include "ZXAlgorithms.h"
#include "libzueci/zueci.h"
#include <cassert>
#include <stdexcept>
namespace ZXing {
void TextDecoder::Append(std::string& str, const uint8_t* bytes, size_t length, CharacterSet charset, boo... | /content/code_sandbox/core/src/TextDecoder.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,142 |
```objective-c
/*
*/
#pragma once
#include "Barcode.h"
#pragma message("Header `Result.h` is deprecated, please include `Barcode.h` and use the new name `Barcode`.")
``` | /content/code_sandbox/core/src/Result.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 37 |
```objective-c
/*
*/
#pragma once
#ifdef ZXING_EXPERIMENTAL_API
#include "Barcode.h"
#include "ImageView.h"
#include <memory>
#include <string_view>
extern "C" struct zint_symbol;
namespace ZXing {
class CreatorOptions
{
struct Data;
std::unique_ptr<Data> d;
friend Barcode CreateBarcode(const void* data, in... | /content/code_sandbox/core/src/WriteBarcode.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 840 |
```c++
/*
*/
#include "HybridBinarizer.h"
#include "BitMatrix.h"
#include "Matrix.h"
#include <algorithm>
#include <cstdint>
#include <fstream>
#include <memory>
#define USE_NEW_ALGORITHM
namespace ZXing {
// This class uses 5x5 blocks to compute local luminance, where each block is 8x8 pixels.
// So this is the ... | /content/code_sandbox/core/src/HybridBinarizer.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,003 |
```c++
/*
*/
#include "MultiFormatWriter.h"
#include "BitMatrix.h"
#include "aztec/AZWriter.h"
#include "datamatrix/DMWriter.h"
#include "oned/ODCodabarWriter.h"
#include "oned/ODCode128Writer.h"
#include "oned/ODCode39Writer.h"
#include "oned/ODCode93Writer.h"
#include "oned/ODEAN13Writer.h"
#include "oned/ODEAN8Wri... | /content/code_sandbox/core/src/MultiFormatWriter.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 761 |
```c++
/*
*/
#include "GridSampler.h"
#ifdef PRINT_DEBUG
#include "LogMatrix.h"
#include "BitMatrixIO.h"
#endif
namespace ZXing {
#ifdef PRINT_DEBUG
LogMatrix log;
#endif
DetectorResult SampleGrid(const BitMatrix& image, int width, int height, const PerspectiveTransform& mod2Pix)
{
return SampleGrid(image, width,... | /content/code_sandbox/core/src/GridSampler.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 828 |
```objective-c
/*
*/
#pragma once
#include <algorithm>
#include <cmath>
namespace ZXing {
template <typename T>
struct PointT
{
using value_t = T;
T x = 0, y = 0;
constexpr PointT() = default;
constexpr PointT(T x, T y) : x(x), y(y) {}
template <typename U>
constexpr explicit PointT(const PointT<U>& p) : x(... | /content/code_sandbox/core/src/Point.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 943 |
```objective-c
/*
*/
#pragma once
#include "ReaderOptions.h"
#include "Barcode.h"
namespace ZXing {
class BinaryBitmap;
class ReaderOptions;
class Reader
{
protected:
const ReaderOptions& _opts;
public:
const bool supportsInversion;
explicit Reader(const ReaderOptions& opts, bool supportsInversion = false) : ... | /content/code_sandbox/core/src/Reader.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 195 |
```objective-c
/*
*/
#ifndef _ZXING_C_H
#define _ZXING_C_H
#include <stdbool.h>
#include <stdint.h>
#ifdef __cplusplus
#include "ZXingCpp.h"
typedef ZXing::Barcode ZXing_Barcode;
typedef ZXing::Barcodes ZXing_Barcodes;
typedef ZXing::ImageView ZXing_ImageView;
typedef ZXing::Image ZXing_Image;
typedef ZXing::Reade... | /content/code_sandbox/core/src/ZXingC.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,289 |
```c++
/*
*/
#include "BitArray.h"
#include "ByteArray.h"
#include <cstddef>
#include <stdexcept>
namespace ZXing {
void
BitArray::bitwiseXOR(const BitArray& other)
{
if (size() != other.size()) {
throw std::invalid_argument("BitArray::xor(): Sizes don't match");
}
for (size_t i = 0; i < _bits.size(); i++) {
... | /content/code_sandbox/core/src/BitArray.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 254 |
```c++
/*
*/
#include "WhiteRectDetector.h"
#include "BitMatrix.h"
#include "BitMatrixCursor.h"
#include "ResultPoint.h"
namespace ZXing {
static const int INIT_SIZE = 10;
static const int CORR = 1;
bool DetectWhiteRect(const BitMatrix& image, ResultPoint& p0, ResultPoint& p1, ResultPoint& p2, ResultPoint& p3)
{
... | /content/code_sandbox/core/src/WhiteRectDetector.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,085 |
```objective-c
/*
*/
#pragma once
#include "Point.h"
#include "ZXAlgorithms.h"
#include <array>
#include <cmath>
#include <string>
namespace ZXing {
template <typename T>
class Quadrilateral : public std::array<T, 4>
{
using Base = std::array<T, 4>;
using Base::at;
public:
using Point = T;
Quadrilateral() = d... | /content/code_sandbox/core/src/Quadrilateral.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,579 |
```c++
/*
*/
#ifdef ZXING_EXPERIMENTAL_API
#include "ZXingCpp.h"
namespace ZXing {
BarcodeFormats SupportedBarcodeFormats(Operation op)
{
switch (op) {
case Operation::Read:
#ifdef ZXING_READERS
return BarcodeFormat::Any;
#else
return BarcodeFormat::None;
#endif
case Operation::Create:
#if defined(ZXING_WRIT... | /content/code_sandbox/core/src/ZXingCpp.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 195 |
```objective-c
/*
*/
#pragma once
#include "Barcode.h"
#include "BarcodeFormat.h"
#include "ZXAlgorithms.h"
#include <string>
namespace ZXing::GTIN {
template <typename T>
T ComputeCheckDigit(const std::basic_string<T>& digits, bool skipTail = false)
{
int sum = 0, N = Size(digits) - skipTail;
for (int i = N - 1... | /content/code_sandbox/core/src/GTIN.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 335 |
```objective-c
/*
*/
#pragma once
#include "ReaderOptions.h"
// TODO: remove this backward compatibility header once the deprecated name DecodeHints has been removed (3.0)
``` | /content/code_sandbox/core/src/DecodeHints.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 34 |
```c++
/*
*/
#include "TextEncoder.h"
#include "CharacterSet.h"
#include "ECI.h"
#include "Utf.h"
#include "ZXAlgorithms.h"
#include "libzueci/zueci.h"
#include <stdexcept>
namespace ZXing {
void TextEncoder::GetBytes(const std::string& str, CharacterSet charset, std::string& bytes)
{
int eci = ToInt(ToECI(charse... | /content/code_sandbox/core/src/TextEncoder.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 323 |
```c++
/*
*/
#include "Content.h"
#include "CharacterSet.h"
#include "ECI.h"
#include "HRI.h"
#include "TextDecoder.h"
#include "Utf.h"
#include "ZXAlgorithms.h"
#if !defined(ZXING_READERS) && !defined(ZXING_WRITERS)
#include "Version.h"
#endif
#include <cctype>
namespace ZXing {
std::string ToString(ContentType ... | /content/code_sandbox/core/src/Content.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,895 |
```objective-c
/*
*/
#pragma once
#include <string>
#include "BitMatrix.h"
namespace ZXing {
std::string ToString(const BitMatrix& matrix, bool inverted = false);
std::string ToString(const BitMatrix& matrix, char one, char zero = ' ', bool addSpace = true, bool printAsCString = false);
std::string ToSVG(const Bit... | /content/code_sandbox/core/src/BitMatrixIO.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 130 |
```c++
/*
*/
#include "BitMatrixIO.h"
#include <array>
#include <fstream>
#include <sstream>
namespace ZXing {
std::string ToString(const BitMatrix& matrix, char one, char zero, bool addSpace, bool printAsCString)
{
std::string result;
result.reserve((addSpace ? 2 : 1) * (matrix.width() * matrix.height()) + matri... | /content/code_sandbox/core/src/BitMatrixIO.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 771 |
```objective-c
/*
*/
#pragma once
#include "ImageView.h"
#include <cstdint>
#include <memory>
#include <vector>
namespace ZXing {
class BitMatrix;
using PatternRow = std::vector<uint16_t>;
/**
* This class is the core bitmap class used by ZXing to represent 1 bit data. Reader objects
* accept a BinaryBitmap and ... | /content/code_sandbox/core/src/BinaryBitmap.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 322 |
```objective-c
/*
*/
#pragma once
#include "CharacterSet.h"
#include <cstddef>
#include <cstdint>
#include <string>
namespace ZXing {
class TextDecoder
{
public:
static CharacterSet DefaultEncoding();
static CharacterSet GuessEncoding(const uint8_t* bytes, size_t length, CharacterSet fallback = DefaultEncoding()... | /content/code_sandbox/core/src/TextDecoder.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 272 |
```c++
/*
*/
#include "BitMatrix.h"
#include "Pattern.h"
#include <algorithm>
#include <stdexcept>
#include <utility>
namespace ZXing {
void
BitMatrix::setRegion(int left, int top, int width, int height)
{
if (top < 0 || left < 0) {
throw std::invalid_argument("BitMatrix::setRegion(): Left and top must be nonne... | /content/code_sandbox/core/src/BitMatrix.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,279 |
```objective-c
/*
*/
#pragma once
#include "DetectorResult.h"
#include "PerspectiveTransform.h"
namespace ZXing {
/**
* Samples an image for a rectangular matrix of bits of the given dimension. The sampling
* transformation is determined by the coordinates of 4 points, in the original and transformed
* image space.... | /content/code_sandbox/core/src/GridSampler.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 475 |
```objective-c
/*
*/
#pragma once
#include <string>
namespace ZXing {
struct StructuredAppendInfo
{
int index = -1;
int count = -1;
std::string id;
};
} // ZXing
``` | /content/code_sandbox/core/src/StructuredAppend.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 44 |
```c++
/*
*/
#include "Utf.h"
#include "ZXTestSupport.h"
#include "ZXAlgorithms.h"
#include <iomanip>
#include <cstdint>
#include <sstream>
namespace ZXing {
// TODO: c++20 has char8_t
#if __cplusplus <= 201703L
using char8_t = uint8_t;
#endif
using utf8_t = std::basic_string_view<char8_t>;
using state_t = uint8_... | /content/code_sandbox/core/src/Utf.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 3,064 |
```objective-c
/*
*/
#pragma once
#include <algorithm>
#include <cstdint>
#include <cstdio>
#include <memory>
#include <stdexcept>
namespace ZXing {
enum class ImageFormat : uint32_t
{
None = 0,
Lum = 0x01000000,
LumA = 0x02000000,
RGB = 0x03000102,
BGR = 0x03020100,
RGBA = 0x04000102,
ARGB = 0x04010203,
... | /content/code_sandbox/core/src/ImageView.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,516 |
```objective-c
/*
*/
#pragma once
#include "BitMatrix.h"
#include "Matrix.h"
#include "Point.h"
#include <cassert>
#include <cstdint>
#include <cstdio>
#include <string>
namespace ZXing {
#ifdef PRINT_DEBUG
class LogMatrix
{
using LogBuffer = Matrix<uint8_t>;
LogBuffer _log;
const BitMatrix* _image = nullptr;
... | /content/code_sandbox/core/src/LogMatrix.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 711 |
```objective-c
/*
*/
#pragma once
#include "Barcode.h"
#include <vector>
#include <memory>
namespace ZXing {
class Reader;
class BinaryBitmap;
class ReaderOptions;
class MultiFormatReader
{
public:
explicit MultiFormatReader(const ReaderOptions& opts);
explicit MultiFormatReader(ReaderOptions&& opts) = delete;
... | /content/code_sandbox/core/src/MultiFormatReader.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 146 |
```c++
/*
*/
#include "GlobalHistogramBinarizer.h"
#include "BitMatrix.h"
#include "Pattern.h"
#include <algorithm>
#include <array>
#include <utility>
namespace ZXing {
static constexpr int LUMINANCE_BITS = 5;
static constexpr int LUMINANCE_SHIFT = 8 - LUMINANCE_BITS;
static constexpr int LUMINANCE_BUCKETS = 1 <<... | /content/code_sandbox/core/src/GlobalHistogramBinarizer.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,484 |
```c++
/*
*/
#include "MultiFormatReader.h"
#include "BarcodeFormat.h"
#include "BinaryBitmap.h"
#include "ReaderOptions.h"
#include "aztec/AZReader.h"
#include "datamatrix/DMReader.h"
#include "maxicode/MCReader.h"
#include "oned/ODReader.h"
#include "pdf417/PDFReader.h"
#include "qrcode/QRReader.h"
#include <memor... | /content/code_sandbox/core/src/MultiFormatReader.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 688 |
```c++
/*
*/
#include "BitSource.h"
#include "ByteArray.h"
#include "ZXAlgorithms.h"
#include <stdexcept>
namespace ZXing {
int
BitSource::available() const
{
return 8 * (Size(_bytes) - _byteOffset) - _bitOffset;
}
static int ReadBitsImpl(int numBits, const ByteArray& _bytes, int available, int& _byteOffset, int... | /content/code_sandbox/core/src/BitSource.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 513 |
```objective-c
/*
*/
#pragma once
#include "GenericGFPoly.h"
#include "ZXConfig.h"
#include <stdexcept>
#include <vector>
namespace ZXing {
/**
* <p>This class contains utility methods for performing mathematical operations over
* the Galois Fields. Operations use a given primitive polynomial in calculations.</p>
... | /content/code_sandbox/core/src/GenericGF.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 804 |
```objective-c
/*
*/
#pragma once
namespace ZXing {
class BitMatrix;
class ResultPoint;
/**
* <p>
* Detects a candidate barcode-like rectangular region within an image. It
* starts around the center of the image, increases the size of the candidate
* region until it finds a white rectangular region.
* </p>
*
... | /content/code_sandbox/core/src/WhiteRectDetector.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 288 |
```objective-c
/*
*/
#pragma once
#include <cassert>
#include <cstdint>
#include <cstring>
#include <vector>
#if __has_include(<bit>) && __cplusplus > 201703L // MSVC has the <bit> header but then warns about including it
#include <bit>
#if __cplusplus > 201703L && defined(__ANDROID__) // NDK 25.1.8937393 has the im... | /content/code_sandbox/core/src/BitHacks.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,881 |
```objective-c
/*
*/
#pragma once
#include "BarcodeFormat.h"
#include "ByteArray.h"
#include "Content.h"
#include "ReaderOptions.h"
#include "Error.h"
#include "ImageView.h"
#include "Quadrilateral.h"
#include "StructuredAppend.h"
#ifdef ZXING_EXPERIMENTAL_API
#include <memory>
extern "C" struct zint_symbol;
namespa... | /content/code_sandbox/core/src/Barcode.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,454 |
```objective-c
/*
*/
#pragma once
#include "BinaryBitmap.h"
namespace ZXing {
/**
* This Binarizer implementation uses the old ZXing global histogram approach. It is suitable
* for low-end mobile devices which don't have enough CPU or memory to use a local thresholding
* algorithm. However, because it picks a globa... | /content/code_sandbox/core/src/GlobalHistogramBinarizer.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 196 |
```objective-c
/*
*/
#pragma once
#include "ByteArray.h"
#include "CharacterSet.h"
#include "ReaderOptions.h"
#include <string>
#include <vector>
namespace ZXing {
enum class ECI : int;
enum class ContentType { Text, Binary, Mixed, GS1, ISO15434, UnknownECI };
enum class AIFlag : char { None, GS1, AIM };
std::st... | /content/code_sandbox/core/src/Content.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 540 |
```objective-c
/*
*/
#pragma once
#include "Version.h"
#pragma message("Header `ZXVersion.h` is deprecated, please include `Version.h`.")
``` | /content/code_sandbox/core/src/ZXVersion.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 30 |
```objective-c
/*
*/
#pragma once
#include <string>
#include <string_view>
namespace ZXing {
std::string HRIFromGS1(std::string_view gs1);
std::string HRIFromISO15434(std::string_view str);
} // namespace ZXing
``` | /content/code_sandbox/core/src/HRI.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 55 |
```c++
/*
*/
#include "GTIN.h"
#include "Barcode.h"
#include <algorithm>
#include <iomanip>
#include <iterator>
#include <sstream>
#include <string>
namespace ZXing::GTIN {
struct CountryId
{
uint16_t first;
uint16_t last;
const char id[3];
};
bool operator<(const CountryId& lhs, const CountryId& rhs)
{
retur... | /content/code_sandbox/core/src/GTIN.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,745 |
```c++
/*
*/
#include "HRI.h"
#include "ZXAlgorithms.h"
#include <cmath>
#include <cstring>
#include <string_view>
namespace ZXing {
struct AiInfo
{
const char aiPrefix[5];
int8_t _fieldSize; // if negative, the length is variable and abs(length) give the max size
bool isVariableLength() const noexcept { retur... | /content/code_sandbox/core/src/HRI.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 2,580 |
```objective-c
/*
*/
#pragma once
#include "GenericGFPoly.h"
#include <list>
#include <vector>
namespace ZXing {
// public only for testing purposes
class ReedSolomonEncoder
{
public:
explicit ReedSolomonEncoder(const GenericGF& field);
void encode(std::vector<int>& message, int numECCodeWords);
private:
cons... | /content/code_sandbox/core/src/ReedSolomonEncoder.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 178 |
```objective-c
/*
*/
#pragma once
#include "BinaryBitmap.h"
#include "BitMatrix.h"
#include <cstdint>
namespace ZXing {
class ThresholdBinarizer : public BinaryBitmap
{
const uint8_t _threshold = 0;
public:
ThresholdBinarizer(const ImageView& buffer, uint8_t threshold = 128) : BinaryBitmap(buffer), _threshold(t... | /content/code_sandbox/core/src/ThresholdBinarizer.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 353 |
```objective-c
/*
*/
#pragma once
#include <cstdint>
#include <cstdio>
#include <string>
#include <string_view>
#include <vector>
namespace ZXing {
/**
ByteArray is an extension of std::vector<unsigned char>.
*/
class ByteArray : public std::vector<uint8_t>
{
public:
ByteArray() = default;
ByteArray(std::initial... | /content/code_sandbox/core/src/ByteArray.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 311 |
```c++
/*
*/
#include "ReedSolomonDecoder.h"
#include "GenericGF.h"
#include "ZXConfig.h"
#include <algorithm>
#include <stdexcept>
#include <utility>
namespace ZXing {
static bool
RunEuclideanAlgorithm(const GenericGF& field, std::vector<int>&& rCoefs, GenericGFPoly& sigma, GenericGFPoly& omega)
{
int R = Size(r... | /content/code_sandbox/core/src/ReedSolomonDecoder.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,042 |
```objective-c
/*
*/
#pragma once
#include "Point.h"
namespace ZXing {
/**
* <p>Encapsulates a point of interest in an image containing a barcode. Typically, this
* would be the location of a finder pattern or the corner of the barcode, for example.</p>
*
* @author Sean Owen
*/
class ResultPoint : public PointF
{
p... | /content/code_sandbox/core/src/ResultPoint.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 204 |
```objective-c
/*
*/
#pragma once
#include "BitMatrixCursor.h"
#include "Pattern.h"
#include "Quadrilateral.h"
#include "ZXAlgorithms.h"
#include <optional>
namespace ZXing {
template <typename T, size_t N>
static float CenterFromEnd(const std::array<T, N>& pattern, float end)
{
if (N == 5) {
float a = pattern[... | /content/code_sandbox/core/src/ConcentricFinder.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 1,253 |
```c++
/*
*/
#include "BinaryBitmap.h"
#include "BitMatrix.h"
#include <mutex>
namespace ZXing {
struct BinaryBitmap::Cache
{
std::once_flag once;
std::shared_ptr<const BitMatrix> matrix;
};
BitMatrix BinaryBitmap::binarize(const uint8_t threshold) const
{
BitMatrix res(width(), height());
if (_buffer.pixStr... | /content/code_sandbox/core/src/BinaryBitmap.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 811 |
```objective-c
/*
*/
#pragma once
#include "Matrix.h"
#include <cstdint>
namespace ZXing {
/**
* @brief Represent a tri-state value false/true/empty
*/
class Trit
{
public:
enum value_t : uint8_t {false_v, true_v, empty_v} value = empty_v;
Trit() = default;
Trit(bool v) : value(static_cast<value_t>(v)) {}
op... | /content/code_sandbox/core/src/TritMatrix.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 123 |
```c++
/*
*/
#include "BarcodeFormat.h"
#include "ZXAlgorithms.h"
#include <algorithm>
#include <cctype>
#include <iterator>
#include <sstream>
#include <stdexcept>
namespace ZXing {
struct BarcodeFormatName
{
BarcodeFormat format;
std::string_view name;
};
static BarcodeFormatName NAMES[] = {
{BarcodeFormat::... | /content/code_sandbox/core/src/BarcodeFormat.cpp | c++ | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 773 |
```objective-c
/*
*/
#pragma once
#ifdef __ANDROID__
#include <android/ndk-version.h>
#endif
#ifdef __cpp_impl_coroutine
#if defined __ANDROID__ && __NDK_MAJOR__ < 26
// NDK 25.1.8937393 can compile this code with c++20 but needs a few tweaks:
#include <experimental/coroutine>
namespace std {
using experimental::s... | /content/code_sandbox/core/src/Generator.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 757 |
```objective-c
/*
*/
#pragma once
#include <string>
#include <string_view>
namespace ZXing {
enum class CharacterSet : unsigned char
{
Unknown,
ASCII,
ISO8859_1,
ISO8859_2,
ISO8859_3,
ISO8859_4,
ISO8859_5,
ISO8859_6,
ISO8859_7,
ISO8859_8,
ISO8859_9,
ISO8859_10,
ISO8859_11,
ISO8859_13,
ISO8859_14,
IS... | /content/code_sandbox/core/src/CharacterSet.h | objective-c | 2016-04-12T22:33:06 | 2024-08-15T07:35:29 | zxing-cpp | zxing-cpp/zxing-cpp | 1,205 | 258 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.