text stringlengths 14 100k | source stringclasses 1
value | repo stringclasses 810
values | language stringclasses 13
values |
|---|---|---|---|
<|fim_suffix|>.Activity;
import android.content.Context;
import android.content.SharedPreferences;
import android.content.res.AssetFileDescriptor;
import android.media.AudioManager;
import android.media.MediaPlayer;
import android.os.Vibrator;
import android.preference.PreferenceManager;
import android.util.Log;
impor... | fim | zxing/zxing | java |
/*
* Copyright (C) 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 agr... | fim | zxing/zxing | java |
<|fim_suffix|> ResolveInfo resolveInfo =
activity.getPackageManager().resolveActivity(intent, PackageManager.MATCH_DEFAULT_ONLY);
String browserPackageName = null;
if (resolveInfo != null && resolveInfo.activityInfo != null) {
browserPackageName = resolveInfo.activityInfo.package... | fim | zxing/zxing | java |
<|fim_suffix|>String SMS = "SMS_TYPE";
/**
* A contact. Send a request to encode it as follows:
* {@code
* import android.provider.Contacts;
*
* Intent intent = new Intent(Intents.Encode.ACTION);
* intent.putExtra(Intents.Encode.TYPE, CONTACT);
* Bundle bundle = new Bundle();
... | 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|>{
hints.put(hintType, Boolean.FALSE);
} else {
hints.put(hintType, Boolean.TRUE);
}
continue;
}
if (hintType.getValueType().equals(int[].class)) {
// An integer array. Used to specify valid lengths.
// Strip a trailing comma as in Ja... | fim | zxing/zxing | java |
<|fim_suffix|>author dswitkin@google.com (Daniel Switkin)
*/
final class DecodeThread extends Thread {
public static final String BARCODE_BITMAP = "barcode_bitmap";
public static final String BARCODE_SCALED_FACTOR = "barcode_scaled_factor";
private final CaptureActivity activity;
private final Map<DecodeHint... | 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|>nal class HelpActivity extends Activity {
private static final String BASE_URL =
"file:///android_asset/html-" + LocaleManager.getTranslatedAssetLanguage() + '/';
private WebView webView;
@Override
protected void onCreate(Bundle icicle) {
super.onCreate(icicle);
setContentView(R.l... | fim | zxing/zxing | java |
<|fim_suffix|>_OTHER:
case 307: // No constant for 307 Temporary Redirect ?
String location = connection.getHeaderField("Location");
if (location != null) {
try {
return new URI(location);
} catch (URISyntaxException e) {
// nevermind
... | fim | zxing/zxing | java |
<|fim_suffix|>ow) {
InactivityTimer.this.onActivity();
} else {
InactivityTimer.this.cancel();
}
}
}
}
private final class InactivityAsyncTask extends AsyncTask<Object,Object,Object> {
@Override
protected Object doInBackground(Object... objects) {
try {
... | fim | zxing/zxing | java |
/*
* Copyright (C) 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 agr... | fim | zxing/zxing | java |
/*
* Copyright (C) 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 agr... | fim | zxing/zxing | java |
<|fim_suffix|>STRALIA
//GOOGLE_PRODUCT_SEARCH_COUNTRY_TLD.put(Locale.CHINA.getCountry(), "cn");
GOOGLE_PRODUCT_SEARCH_COUNTRY_TLD.put(Locale.FRANCE.getCountry(), "fr");
GOOGLE_PRODUCT_SEARCH_COUNTRY_TLD.put(Locale.GERMANY.getCountry(), "de");
GOOGLE_PRODUCT_SEARCH_COUNTRY_TLD.put(Locale.ITALY.getCountry... | fim | zxing/zxing | java |
<|fim_suffix|>tic final String KEY_CUSTOM_PRODUCT_SEARCH = "preferences_custom_product_search";
public static final String KEY_PLAY_BEEP = "preferences_play_beep";
public static final String KEY_VIBRATE = "preferences_vibrate";
public static final String KEY_COPY_TO_CLIPBOARD = "preferences_copy_to_clipboard";
... | fim | zxing/zxing | java |
<|fim_suffix|>edPreferenceChangeListener(this);
checkBoxPrefs = findDecodePrefs(preferences,
PreferencesActivity.KEY_DECODE_1D_PRODUCT,
PreferencesActivity.KEY_DECODE_1D_INDUSTRIAL,
PreferencesActivity.KEY_DE... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|>es/LICENSE-2.0
*
* Unless required by applicable law or agreed 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
... | fim | zxing/zxing | java |
<|fim_suffix|>phics.Paint;
import android.graphics.Rect;
import android.util.AttributeSet;
import android.view.View;
import java.util.ArrayList;
import java.util.List;
/**
* This view is overlaid on top of the camera preview. It adds the viewfinder rectangle and partial
* transparency outside it, as well as the las... | fim | zxing/zxing | java |
<|fim_suffix|>tion < 1) {
// Clicked header, ignore it
return;
}
int itemOffset = position - 1;
if (itemOffset >= items.size()) {
return;
}
String pageId = items.get(itemOffset).getPageId();
String query = SearchBookContentsResult.getQuery();
if (LocaleManager.isBookSearchU... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|> String snippet = result.getSnippet();
if (snippet.isEmpty()) {
snippetView.setText("");
} else {
if (result.getValidSnippet()) {
String lowerQuery = SearchBookContentsResult.getQuery().toLowerCase(Locale.getDefault());
String lowerSnippet = snippet.toLowerCase(Locale... | fim | zxing/zxing | java |
<|fim_suffix|>t.android.book;
/**
* The underlying data for a SBC result.
*
* @author dswitkin@google.com (Daniel Switkin)
*/
final class SearchBookContentsResult {
private static String query = null;
private final String pageId;
private final String pageNumber;
private final String snippet;
private fi... | fim | zxing/zxing | java |
<|fim_suffix|>e);
Log.i(TAG, "Current focus mode '" + currentFocusMode + "'; use auto focus? " + useAutoFocus);
start();
}
@Override
public synchronized void onAutoFocus(boolean success, Camera theCamera) {
focusing = false;
autoFocusAgainLater();
}
private synchronized void autoFocusAgainLa... | 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) 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 applica... | fim | zxing/zxing | java |
/*
* Copyright (C) 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 law or agr... | fim | zxing/zxing | java |
<|fim_suffix|>on.y, data);
message.sendToTarget();
previewHandler = null;
}
}
}
<|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 |
<|fim_suffix|>ic enum CameraFacing {
BACK, // must be value 0!
FRONT, // must be value 1!
}
<|fim_prefix|>/*
* Copyright (C) 2015 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (th<|fim_middle|>e "License");
* you may not use this file except in compliance with the License.
* You may obtai... | fim | zxing/zxing | java |
<|fim_suffix|>orientation;
}
}
<|fim_prefix|>/*
* Copyright (C) 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 co<|fim_middle|>py of the License at
*
* http://www.apache.org/licen... | fim | zxing/zxing | java |
<|fim_suffix|> cameraId = 0;
}
}
Log.i(TAG, "Opening camera #" + cameraId);
Camera.CameraInfo cameraInfo = new Camera.CameraInfo();
Camera.getCameraInfo(cameraId, cameraInfo);
Camera camera = Camera.open(cameraId);
if (camera == null) {
return null;
}
return new OpenCamera(c... | fim | zxing/zxing | java |
<|fim_suffix|>nse at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed 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... | fim | zxing/zxing | java |
<|fim_suffix|>String phoneData) {
// Just collect the call to a deprecated method in one place
return PhoneNumberUtils.formatNumber(phoneData);
}
}
<|fim_prefix|>/*
* Copyright (C) 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in... | fim | zxing/zxing | java |
/*
* Copyright (C) 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 agr... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 2011 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* <|fim_suffix|> {
/**
* @param value value to format
* @param index index of value in a list of values to be formatted
* @return formatted value
*/
CharSequence format(CharSequen... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|>Encoder.trim(intent.getStringExtra(Intents.Encode.DATA));
if (smsData != null) {
contents = "sms:" + smsData;
displayContents = ContactEncoder.formatPhone(smsData);
title = activity.getString(R.string.contents_sms);
}
break;
case Contents.Type.C... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|>ient.android.encode;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
/**
* @author Sean Owen
*/
final class VCardTelDisplayFormatter implements Formatter {
private final List<Map<String,Set<String>>> metadataForIndex;
VCardTelDisplayFormatter() {
... | fim | zxing/zxing | java |
<|fim_suffix|>ride
public void onUpgrade(SQLiteDatabase sqLiteDatabase, int oldVersion, int newVersion) {
sqLiteDatabase.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
onCreate(sqLiteDatabase);
}
}
<|fim_prefix|>/*
* Copyright (C) 2009 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (th... | fim | zxing/zxing | java |
<|fim_suffix|>HistoryItems()) {
MenuInflater menuInflater = getMenuInflater();
menuInflater.inflate(R.menu.history, menu);
}
return super.onCreateOptionsMenu(menu);
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_history_s... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright 2012 ZXing authors
*
* Licensed under the Apache License, Version 2<|fim_suffix|>lt.getText());
} else {
displayResult.append(display);
}
if (details != null && !details.isEmpty()) {
displayResult.append(" : ").append(details);
}
return displayResult.toStr... | 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|>d("\"\r\n");
}
} catch (SQLException sqle) {
Log.w(TAG, sqle);
}
return historyText;
}
void clearHistory() {
SQLiteOpenHelper helper = new DBHelper(activity);
try (SQLiteDatabase db = helper.getWritableDatabase()) {
db.delete(DBHelper.TABLE_NAME, null, null);
... | fim | zxing/zxing | java |
<|fim_suffix|>ppend(result.getTitle(), contents);
ParsedResult.maybeAppend(result.getOrg(), contents);
ParsedResult.maybeAppend(result.getAddresses(), contents);
String[] numbers = result.getPhoneNumbers();
if (numbers != null) {
for (String number : numbers) {
if (number != null) {
... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|>ing.result_email_address;
}
}
<|fim_prefix|>/*
* Copyright (C) 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/license... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|>t, Result rawResult) {
super(activity, result, rawResult);
}
@Override
public int getButtonCount() {
return hasCustomProductSearch() ? buttons.length : buttons.length - 1;
}
@Override
public int getButtonText(int index) {
return buttons[index];
}
@Override
public void hand... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|> it doesn't seem to be a hex escape sequence. This remains
// problematic but avoids the more surprising problem of breaking escapes
url = url.replaceFirst("%f(?![0-9a-f])", rawResult.getBarcodeFormat().toString());
if (url.contains("%t")) {
ParsedResult parsedResultAgain = Resul... | fim | zxing/zxing | java |
<|fim_suffix|>ResultHandler(activity, result);
case EMAIL_ADDRESS:
return new EmailAddressResultHandler(activity, result);
case PRODUCT:
return new ProductResultHandler(activity, result, rawResult);
case URI:
return new URIResultHandler(activity, result);
case WIFI:
... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
/*
* Copyright (C) 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 agr... | fim | zxing/zxing | java |
<|fim_suffix|>itations under the License.
*/
package com.google.zxing.client.android.result;
import com.google.zxing.Result;
import com.google.zxing.client.android.R;
import com.google.zxing.client.result.ParsedResult;
import android.app.Activity;
/**
* This class handles TextParsedResult as well as unknown forma... | fim | zxing/zxing | java |
<|fim_suffix|> if (uri.startsWith(secure)) {
return true;
}
}
return false;
}
}
<|fim_prefix|>/*
* Copyright (C) 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... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|>lient.android.LocaleManager;
import com.google.zxing.client.android.R;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import org.json.JSONTokener;
import com.google.zxing.client.android.history.HistoryManager;
/**
* @author Kamil Kaczmarczyk
* @author Sean Owen
... | 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|> newTextCombined.append(']');
}
}
int linkEnd = newTextCombined.length();
String newText = newTextCombined.toString();
Spannable content = new SpannableString(newText + "\n\n");
if (linkURL != null) {
// Strangely, some Android browsers don't seem to register to ha... | fim | zxing/zxing | java |
<|fim_suffix|>nfo() {
CharSequence contents;
try {
contents = HttpHelper.downloadViaHttp(httpUrl, HttpHelper.ContentType.HTML, 4096);
} catch (IOException ioe) {
// ignore this
return;
}
if (contents != null && contents.length() > 0) {
Matcher m = TITLE_PATTERN.matcher(conten... | fim | zxing/zxing | java |
<|fim_suffix|> newURI.toString());
oldURI = newURI;
newURI = HttpHelper.unredirect(newURI);
}
}
}
<|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 | zxing/zxing | java |
<|fim_suffix|>cense.
*/
package com.google.zxing.client.android.share;
import android.graphics.drawable.Drawable;
final class AppInfo implements Comparable<AppInfo> {
private final String packageName;
private final String label;
private final Drawable icon;
AppInfo(String packageName, String label, Draw... | fim | zxing/zxing | java |
<|fim_suffix|>
} else {
setResult(RESULT_CANCELED);
}
finish();
}
}
<|fim_prefix|>/*
* Copyright (C) 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 Li... | fim | zxing/zxing | java |
/*
* Copyright (C) 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 agr... | fim | zxing/zxing | java |
<|fim_suffix|> BOOKMARK_SELECTION, null, null)) {
if (cursor == null) {
Log.w(TAG, "No cursor returned for bookmark query");
finish();
return;
}
while (cursor.moveToNext()) {
titleURLs.add(new String[] { cursor.getString(0), cursor.getString(1) });
}
}
se... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyright (C) 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 applica... | fim | zxing/zxing | java |
<|fim_suffix|>urn NO_PASSWORD;
default:
throw new IllegalArgumentException(networkTypeString);
}
}
}
<|fim_prefix|>/*
* Copyright (C) 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 ... | fim | zxing/zxing | java |
<|fim_suffix|>tring == null) {
return WifiEnterpriseConfig.Phase2.NONE;
}
switch (phase2String) {
case "GTC":
return WifiEnterpriseConfig.Phase2.GTC;
case "MSCHAP":
return WifiEnterpriseConfig.Phase2.MSCHAP;
case "MSCHAPV2":
return WifiEnterpriseConfig.Phase2.MSCH... | fim | zxing/zxing | java |
<|fim_suffix|>ultSize = parameters.getPreviewSize();
if (defaultSize == null) {
throw new IllegalStateException("Parameters contained no preview size!");
}
return new Point(defaultSize.width, defaultSize.height);
}
if (Log.isLoggable(TAG, Log.INFO)) {
StringBuilder previewSizesS... | fim | zxing/zxing | java |
<|fim_suffix|>esult code from {@code onActivityResult()}
* @param intent {@link Intent} from {@code onActivityResult()}
* @return null if the event handled here was not related to this class, or
* else an {@link IntentResult} containing the result of the scan. If the user cancelled scanning,
* the fields ... | 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/LICEN<|fim_suffix|>WITHOUT WARRANTIES OR CONDITI... | 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 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|>ecksumException getChecksumInstance() {
return isStackTrace ? new ChecksumException() : INSTANCE;
}
public static ChecksumException getChecksumInstance(Throwable cause) {
return isStackTrace ? new ChecksumException(cause) : INSTANCE;
}
}<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
*... | 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|>r;
return width == d.width && height == d.height;
}
return false;
}
@Override
public int hashCode() {
return width * 32713 + height;
}
@Override
public String toString() {
return width + "x" + height;
}
}
<|fim_prefix|>/*
* Copyright 2012 ZXing authors
*
* License... | 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|> 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 to in writing, software
* distribu... | fim | zxing/zxing | java |
<|fim_suffix|>ft;
this.top = top;
}
@Override
public byte[] getRow(int y, byte[] row) {
if (y < 0 || y >= getHeight()) {
throw new IllegalArgumentException("Requested row is outside the image: " + y);
}
int width = getWidth();
if (row == null || row.length < width) {
row = new byt... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Copyr<|fim_suffix|>te[length];
for (int i = 0; i < length; i++) {
invertedMatrix[i] = (byte) (255 - (matrix[i] & 0xFF));
}
return invertedMatrix;
}
@Override
public boolean isCropSupported() {
return delegate.isCropSupported();
}
@Override
public LuminanceSource c... | 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 |
/*
* 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|>
<|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... | fim | zxing/zxing | java |
<|fim_suffix|>s meaningless
}
private NotFoundException() {
// do nothing
}
public static NotFoundException getNotFoundInstance() {
return isStackTrace ? new NotFoundException() : INSTANCE;
}
}<|fim_prefix|>/*
* Copyright 2007 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the... | fim | zxing/zxing | java |
<|fim_suffix|>nt y = 0; y < height; y++) {
int outputOffset = y * width;
for (int x = 0; x < width; x++) {
int grey = yuv[inputOffset + x * THUMBNAIL_SCALE_FACTOR] & 0xff;
pixels[outputOffset + x] = 0xFF000000 | (grey * 0x00010101);
}
inputOffset += dataWidth * THUMBNAIL_SCALE_FA... | fim | zxing/zxing | java |
<|fim_suffix|>* an ARGB pixel array.
*
* @author dswitkin@google.com (Daniel Switkin)
* @author Betaminos
*/
public final class RGBLuminanceSource extends GrayscaleLuminanceSource {
public RGBLuminanceSource(int width, int height, int[] pixels) {
super(width, height, toGrayscale(width, height, pixels));
}
... | 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 |
/*
* 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|>y Identifier.
* Note: According to the GS1 specification the identifier may have to replace a leading FNC1/GS character
* when prepending to the barcode content.
*/
SYMBOLOGY_IDENTIFIER,
}
<|fim_prefix|>/*
* Copyright 2008 ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the... | fim | zxing/zxing | java |
<|fim_suffix|>*/
private static float crossProductZ(ResultPoint pointA,
ResultPoint pointB,
ResultPoint pointC) {
float bX = pointB.x;
float bY = pointB.y;
return ((pointC.x - bX) * (pointA.y - bY)) - ((pointC.y - bY) * (pointA.x - ... | fim | zxing/zxing | java |
<|fim_prefix|>/*
* Cop<|fim_suffix|>* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.zxing;
/**
* Callback which is invoked when a possible result point (significant
* point in the barcode image such as a corner) is found.
*
* @see Dec... | 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 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.