blob_id
stringlengths
40
40
directory_id
stringlengths
40
40
path
stringlengths
7
390
content_id
stringlengths
40
40
detected_licenses
listlengths
0
35
license_type
stringclasses
2 values
repo_name
stringlengths
6
132
snapshot_id
stringlengths
40
40
revision_id
stringlengths
40
40
branch_name
stringclasses
539 values
visit_date
timestamp[us]date
2016-08-02 21:09:20
2023-09-06 10:10:07
revision_date
timestamp[us]date
1990-01-30 01:55:47
2023-09-05 21:45:37
committer_date
timestamp[us]date
2003-07-12 18:48:29
2023-09-05 21:45:37
github_id
int64
7.28k
684M
star_events_count
int64
0
77.7k
fork_events_count
int64
0
48k
gha_license_id
stringclasses
13 values
gha_event_created_at
timestamp[us]date
2012-06-11 04:05:37
2023-09-14 21:59:18
gha_created_at
timestamp[us]date
2008-05-22 07:58:19
2023-08-28 02:39:21
gha_language
stringclasses
62 values
src_encoding
stringclasses
26 values
language
stringclasses
1 value
is_vendor
bool
1 class
is_generated
bool
2 classes
length_bytes
int64
128
12.8k
extension
stringclasses
11 values
content
stringlengths
128
8.19k
authors
listlengths
1
1
author_id
stringlengths
1
79
eb93e13731100f8d85d142c503322b4451039338
6e57bdc0a6cd18f9f546559875256c4570256c45
/frameworks/base/telephony/java/android/telephony/SprdNetworkStats.java
9da307bd69a31d6f1a6a4bee601dbe99546dd379
[ "LicenseRef-scancode-unicode", "Apache-2.0" ]
permissive
dongdong331/test
969d6e945f7f21a5819cd1d5f536d12c552e825c
2ba7bcea4f9d9715cbb1c4e69271f7b185a0786e
refs/heads/master
2023-03-07T06:56:55.210503
2020-12-07T04:15:33
2020-12-07T04:15:33
134,398,935
2
1
null
2022-11-21T07:53:41
2018-05-22T10:26:42
null
UTF-8
Java
false
false
6,097
java
/* * Copyright: Spreadtrum Communications, Inc. (2015-2115) * Description: statistical mobile and wifi Total Bytes * Date: 2017/6/20 */ package com.dmyk.commlog.data; import android.net.INetworkStatsService; import android.net.INetworkStatsSession; import android.net.NetworkStatsHistory; import android.net.NetworkTemplate; import android.net.TrafficStats; import android.os.Build; import android.os.ServiceManager; import android.os.Handler; import android.os.HandlerThread; import android.os.Looper; import android.os.Message; import android.os.RemoteException; import android.util.Log; import java.util.Date; import java.util.Calendar; import java.text.ParseException; import java.io.IOException; import android.telephony.SubscriptionManager; import android.telephony.TelephonyManager; import android.content.Context; import android.net.ConnectivityManager; import static android.net.NetworkStatsHistory.FIELD_RX_BYTES; import static android.net.NetworkStatsHistory.FIELD_TX_BYTES; public class SprdNetworkStats extends Handler { private final String TAG = "SprdNetworkStats"; Context mContext; private static Looper sLooper = null; private static SprdNetworkStats sInstance = null; private static final int FIELDS = FIELD_RX_BYTES | FIELD_TX_BYTES; public SprdNetworkStats(Looper looper) { super(looper); } public synchronized static SprdNetworkStats getInstance() { if (sInstance == null) { if (sLooper == null) { HandlerThread thread = new HandlerThread("SprdNetworkStats"); thread.start(); sLooper = thread.getLooper(); } sInstance = new SprdNetworkStats(sLooper); } return sInstance; } public void init(Context context) { mContext = context; } public long getWiFiTotalBytes (long startTime, long endTime) { long wifiTotal = 0; long end = System.currentTimeMillis(); try { Log.d(TAG, " getWiFiTotalBytes start do!! "); NetworkTemplate template = NetworkTemplate.buildTemplateWifiWildcard(); INetworkStatsService mStatsService = INetworkStatsService.Stub.asInterface(ServiceManager.getService(Context.NETWORK_STATS_SERVICE)); INetworkStatsSession statsSession = mStatsService.openSession(); if (statsSession != null) { final NetworkStatsHistory history = statsSession.getHistoryForNetwork(template, FIELDS); final long now = System.currentTimeMillis(); Log.d(TAG, " get wifi bytes bucketDuration = " + history.getBucketDuration()); final NetworkStatsHistory.Entry entry = history.getValues(startTime, endTime, now, null); Log.d(TAG, " get wifi bytes current time: now = " + now); if (entry == null) { Log.d(TAG, " no wifi entry data "); return 0; } wifiTotal = entry.rxBytes + entry.txBytes; TrafficStats.closeQuietly(statsSession); } } catch (RemoteException e) { throw new RuntimeException(e); } Log.d(TAG, " get wifi Bytes = " + wifiTotal + " , startTime = " + startTime + ", endTime = " + endTime); return wifiTotal; } public long getMobileTotalBytes(int phoneId, long startTime, long endTime) { long mobileBytes = 0; String subscriberId = getSubscriberId(phoneId); try { if (null == subscriberId) { Log.e(TAG, " not insert sim card !!!"); return 0; } else { Log.d(TAG, " test mobile start do!! "); NetworkTemplate template = NetworkTemplate.buildTemplateMobileAll(subscriberId); INetworkStatsService mStatsService = INetworkStatsService.Stub.asInterface(ServiceManager.getService(Context.NETWORK_STATS_SERVICE)); INetworkStatsSession statsSession = mStatsService.openSession(); if (statsSession != null) { final NetworkStatsHistory history = statsSession.getHistoryForNetwork(template, FIELDS); final long now = System.currentTimeMillis(); Log.d(TAG, " get mobile bytes bucketDuration = " + history.getBucketDuration()); final NetworkStatsHistory.Entry entry = history.getValues(startTime, endTime, now, null); Log.d(TAG, " get mobile bytes current time: now = " + now); if (entry == null) { Log.d(TAG, " no mobile entry data "); return 0; } mobileBytes = entry.rxBytes + entry.txBytes; TrafficStats.closeQuietly(statsSession); } else { mobileBytes = 0; } } } catch (RemoteException e) { throw new RuntimeException(e); } Log.d(TAG, " phoneId = " + phoneId + ", get mobileBytes = " + mobileBytes + " , startTime = " + startTime + ", endTime = " + endTime); return mobileBytes; } private String getSubscriberId(int phoneId) { int subId = 0; int slotId = phoneId; String subscriberId = null; TelephonyManager mTelephonyManager = (TelephonyManager) mContext.getSystemService(Context.TELEPHONY_SERVICE); if(null == mTelephonyManager) { Log.d(TAG, "get mTelephonyManager is null !"); return null; } if (SubscriptionManager.from(mContext).getActiveSubscriptionInfoForSimSlotIndex(slotId) !=null ) { subId = SubscriptionManager.from(mContext) .getActiveSubscriptionInfoForSimSlotIndex(slotId).getSubscriptionId(); } else { Log.e(TAG, "get subscriberId is null !"); return null; } subscriberId = mTelephonyManager.getSubscriberId(subId); return subscriberId; } }
[ "dongdong331@163.com" ]
dongdong331@163.com
49f62195f3c30c111314b2882571da6c93614afb
c86e0c8f44f8f1a8cc42fe89156949cd3023d6fe
/jOOQ/src/main/java/org/jooq/SelectOffsetStep.java
bafcff253c1c0635ecec74c663af10c8931ff578
[ "BSD-3-Clause", "Apache-2.0" ]
permissive
delostilos/jOOQ
e1248ed09cc1e0f8d06298ee1c069cd509cc2791
d5439b468ac487813c5cb3b7be5d6a3fb9441cc7
refs/heads/master
2021-01-18T09:23:05.943682
2013-05-04T09:19:19
2013-05-04T09:19:19
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,190
java
/** * Copyright (c) 2009-2013, Lukas Eder, lukas.eder@gmail.com * All rights reserved. * * This software is licensed to you under the Apache License, Version 2.0 * (the "License"); You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * . Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * . Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * . Neither the name "jOOQ" nor the names of its contributors may be * used to endorse or promote products derived from this software without * specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE * POSSIBILITY OF SUCH DAMAGE. */ package org.jooq; import static org.jooq.SQLDialect.CUBRID; import static org.jooq.SQLDialect.DB2; import static org.jooq.SQLDialect.DERBY; import static org.jooq.SQLDialect.FIREBIRD; import static org.jooq.SQLDialect.H2; import static org.jooq.SQLDialect.HSQLDB; import static org.jooq.SQLDialect.INGRES; import static org.jooq.SQLDialect.MYSQL; import static org.jooq.SQLDialect.ORACLE; import static org.jooq.SQLDialect.POSTGRES; import static org.jooq.SQLDialect.SQLITE; import static org.jooq.SQLDialect.SQLSERVER; import static org.jooq.SQLDialect.SYBASE; /** * This type is used for the {@link Select}'s DSL API when selecting generic * {@link Record} types. * <p> * Example: <code><pre> * -- get all authors' first and last names, and the number * -- of books they've written in German, if they have written * -- more than five books in German in the last three years * -- (from 2011), and sort those authors by last names * -- limiting results to the second and third row * * SELECT T_AUTHOR.FIRST_NAME, T_AUTHOR.LAST_NAME, COUNT(*) * FROM T_AUTHOR * JOIN T_BOOK ON T_AUTHOR.ID = T_BOOK.AUTHOR_ID * WHERE T_BOOK.LANGUAGE = 'DE' * AND T_BOOK.PUBLISHED > '2008-01-01' * GROUP BY T_AUTHOR.FIRST_NAME, T_AUTHOR.LAST_NAME * HAVING COUNT(*) > 5 * ORDER BY T_AUTHOR.LAST_NAME ASC NULLS FIRST * LIMIT 2 * OFFSET 1 * FOR UPDATE * OF FIRST_NAME, LAST_NAME * NO WAIT * </pre></code> Its equivalent in jOOQ <code><pre> * create.select(TAuthor.FIRST_NAME, TAuthor.LAST_NAME, create.count()) * .from(T_AUTHOR) * .join(T_BOOK).on(TBook.AUTHOR_ID.equal(TAuthor.ID)) * .where(TBook.LANGUAGE.equal("DE")) * .and(TBook.PUBLISHED.greaterThan(parseDate('2008-01-01'))) * .groupBy(TAuthor.FIRST_NAME, TAuthor.LAST_NAME) * .having(create.count().greaterThan(5)) * .orderBy(TAuthor.LAST_NAME.asc().nullsFirst()) * .limit(2) * .offset(1) * .forUpdate() * .of(TAuthor.FIRST_NAME, TAuthor.LAST_NAME) * .noWait(); * </pre></code> Refer to the manual for more details * * @author Lukas Eder */ public interface SelectOffsetStep<R extends Record> extends SelectForUpdateStep<R> { /** * Add an <code>OFFSET</code> clause to the query * <p> * If there is no <code>LIMIT .. OFFSET</code> or <code>TOP</code> clause in * your RDBMS, or if your RDBMS does not natively support offsets, this is * simulated with a <code>ROW_NUMBER()</code> window function and nested * <code>SELECT</code> statements. */ @Support({ CUBRID, DB2, DERBY, FIREBIRD, H2, HSQLDB, INGRES, MYSQL, ORACLE, POSTGRES, SQLITE, SQLSERVER, SYBASE }) SelectForUpdateStep<R> offset(int offset); /** * Add an <code>OFFSET</code> clause to the query using a named parameter * <p> * If there is no <code>LIMIT .. OFFSET</code> or <code>TOP</code> clause in * your RDBMS, or if your RDBMS does not natively support offsets, this is * simulated with a <code>ROW_NUMBER()</code> window function and nested * <code>SELECT</code> statements. */ @Support({ CUBRID, DB2, DERBY, FIREBIRD, H2, HSQLDB, INGRES, MYSQL, ORACLE, POSTGRES, SQLITE, SQLSERVER, SYBASE }) SelectForUpdateStep<R> offset(Param<Integer> offset); }
[ "lukas.eder@gmail.com" ]
lukas.eder@gmail.com
8914d41d94d8f2afb9b3a8c9be7896a530efb0da
395a5ff4a9da2cbb9735bf6a0ae3163388bb5e48
/src/main/java/com/ringcentral/definitions/ExtensionInfoGrants.java
5b5fa043f570aebf888a5915f38b03562a7123ac
[]
no_license
tylerlong/ringcentral-kotlin
d51b04d798ef03b3390ec0cc661870f90eb30c4a
9f958259f782ef10b349cbf560317e6d888415d6
refs/heads/master
2023-01-11T16:34:46.344148
2019-06-01T03:36:29
2019-06-01T03:36:29
189,321,965
3
0
null
2023-01-03T23:13:31
2019-05-30T01:09:45
Java
UTF-8
Java
false
false
1,020
java
package com.ringcentral.definitions; public class ExtensionInfoGrants { /** * Internal identifier of an extension */ public String id; /** * Canonical URI of an extension */ public String uri; /** * Extension short number (usually 3 or 4 digits) */ public String extensionNumber; /** * Extension type * Enum: User, Fax User, VirtualUser, DigitalUser, Department, Announcement, Voicemail, SharedLinesGroup, PagingOnly, IvrMenu, ApplicationExtension, Park Location */ public String type; public ExtensionInfoGrants id(String id) { this.id = id; return this; } public ExtensionInfoGrants uri(String uri) { this.uri = uri; return this; } public ExtensionInfoGrants extensionNumber(String extensionNumber) { this.extensionNumber = extensionNumber; return this; } public ExtensionInfoGrants type(String type) { this.type = type; return this; } }
[ "tyler4long@gmail.com" ]
tyler4long@gmail.com
a8d67924110498c4fbd7a77ef2c6a20b4e1ea9bd
af7311df71e8d0731013ff0d5c410f7054233671
/Jonny/src/object1/Audience.java
afb69b75802655b1a40eecc892054ff63967d283
[]
no_license
sadangdev/Objects
a329fb6ba5bb076ba222a011fa58273a8f7a267d
9c8b9891430e20d9af04307b2c271568741bd209
refs/heads/master
2020-07-08T18:20:47.997322
2019-09-22T05:43:10
2019-09-22T05:43:10
203,742,306
0
0
null
null
null
null
UTF-8
Java
false
false
456
java
package object1; public class Audience { private Bag bag; public Audience(Bag bag) { this.bag = bag; } // public Bag getBag() { // return bag; // } public Long buy(Ticket ticket) { if (bag.hasInvitation()) { bag.setTicket(ticket); return 0L; } else { if(bag.getAmount() >= ticket.getFee()) { bag.minusAmount(ticket.getFee()); bag.setTicket(ticket); return ticket.getFee(); } else { return -1L; } } } }
[ "andante2183@gmail.com" ]
andante2183@gmail.com
9c9753dd64da9164c9c3ad110239732109f6c069
667ee96b8ec2749060660d7881029d1659655ea4
/src/fr/bmartel/protocol/wlan/frame/management/element/inter/ISupportedRateElement.java
908e34158c9cef6455412e6649895cd3931c5c5c
[ "MIT" ]
permissive
bertrandmartel/wlan-decoder-java
70a8a06018130f77b7063896a00e1ed371252f14
d0814ef8b17e9f55ea13ced8dc3acc4cdb791a9d
refs/heads/master
2021-06-09T12:14:10.396739
2017-01-11T12:59:58
2017-01-11T12:59:58
35,069,637
10
3
null
null
null
null
UTF-8
Java
false
false
317
java
package fr.bmartel.protocol.wlan.frame.management.element.inter; /** * Define data rate<br/> * <ul> * <li>element id : 1 Byte</li> * <li>length : 1 Byte</li> * <li>data : 1 - 8 Bytes</li> * </ul> * * @author Bertrand Martel * */ public interface ISupportedRateElement { public byte[] getDataRate() ; }
[ "bmartel.fr@gmail.com" ]
bmartel.fr@gmail.com
d15fb53d2342088b7553b9a667f14b04c45423d9
d47b47deaf8b0f14741b45864f8d58b5aa382f06
/src/ArrayTopic.java
09fdaac1d58064a29d3aaa760dc00183faa6e645
[]
no_license
8AlexM/AlexCOM809GroupProject
91f0739fe091ac533b7636a7f4e88386a46691c2
a58e5ae0f331f07ae787001d8b1a4b0c923db32c
refs/heads/master
2023-03-05T15:31:03.045880
2021-02-18T19:46:00
2021-02-18T19:46:00
340,159,742
0
0
null
null
null
null
UTF-8
Java
false
false
486
java
import java.util.ArrayList; import java.util.Scanner; /** * Created by Alexander on 16/02/2021 * COMMENTS ABOUT PROGRAM HERE */ public class ArrayTopic extends AbstractTopic { public ArrayTopic() { this.topic = "Arrays"; this.questionsAndAnswers.add(new QuestionAndAnswer("Does an array have a fixed size? (y/n)", "y")); this.questionsAndAnswers.add(new QuestionAndAnswer("Can arrays contain different data types?", "n")); }//default constructor }//class
[ "you@example.com" ]
you@example.com
03940c55158f3c1ce3dd178ca8a09e9c2e3369eb
4266e5085a5632df04c63dc3b11b146ef4be40fa
/exercises/week4/exercise7/dorothy/src/test/java/academy/everyonecodes/dorothy/DorothyApplicationTests.java
e42f09356835d1742eaf2e9873c873d8ecf334ba
[]
no_license
uanave/springboot-module
ab918e8e4d6b228dcabcfb1b040458eb9c705977
3842925501ef3f08add19ca7ed055a3f84260088
refs/heads/master
2022-12-27T17:29:22.130619
2020-10-13T14:04:33
2020-10-13T14:04:33
246,023,900
0
0
null
null
null
null
UTF-8
Java
false
false
222
java
package academy.everyonecodes.dorothy; import org.junit.jupiter.api.Test; import org.springframework.boot.test.context.SpringBootTest; @SpringBootTest class DorothyApplicationTests { @Test void contextLoads() { } }
[ "uanavasile@gmail.com" ]
uanavasile@gmail.com
4764b8b97dda68a145042cf9851950e3541541ba
04b1803adb6653ecb7cb827c4f4aa616afacf629
/chrome/android/java/src/org/chromium/chrome/browser/photo_picker/FileEnumWorkerTask.java
8487721459db62ce011c45ad1a574219bced38ca
[ "BSD-3-Clause" ]
permissive
Samsung/Castanets
240d9338e097b75b3f669604315b06f7cf129d64
4896f732fc747dfdcfcbac3d442f2d2d42df264a
refs/heads/castanets_76_dev
2023-08-31T09:01:04.744346
2021-07-30T04:56:25
2021-08-11T05:45:21
125,484,161
58
49
BSD-3-Clause
2022-10-16T19:31:26
2018-03-16T08:07:37
null
UTF-8
Java
false
false
8,003
java
// Copyright 2017 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. package org.chromium.chrome.browser.photo_picker; import android.Manifest; import android.content.ContentResolver; import android.content.ContentUris; import android.content.Intent; import android.database.Cursor; import android.net.Uri; import android.os.Environment; import android.provider.MediaStore; import org.chromium.base.BuildInfo; import org.chromium.base.ThreadUtils; import org.chromium.base.task.AsyncTask; import org.chromium.net.MimeTypeFilter; import org.chromium.ui.base.WindowAndroid; import java.io.File; import java.util.ArrayList; import java.util.List; /** * A worker task to enumerate image files on disk. */ class FileEnumWorkerTask extends AsyncTask<List<PickerBitmap>> { /** * An interface to use to communicate back the results to the client. */ public interface FilesEnumeratedCallback { /** * A callback to define to receive the list of all images on disk. * @param files The list of images. */ void filesEnumeratedCallback(List<PickerBitmap> files); } private final WindowAndroid mWindowAndroid; // The callback to use to communicate the results. private FilesEnumeratedCallback mCallback; // The filter to apply to the list. private MimeTypeFilter mFilter; // Whether any image MIME types were requested. private boolean mIncludeImages; // Whether any video MIME types were requested. private boolean mIncludeVideos; // The ContentResolver to use to retrieve image metadata from disk. private ContentResolver mContentResolver; // The camera directory under DCIM. private static final String SAMPLE_DCIM_SOURCE_SUB_DIRECTORY = "Camera"; /** * A FileEnumWorkerTask constructor. * @param windowAndroid The window wrapper associated with the current activity. * @param callback The callback to use to communicate back the results. * @param filter The file filter to apply to the list. * @param contentResolver The ContentResolver to use to retrieve image metadata from disk. */ public FileEnumWorkerTask(WindowAndroid windowAndroid, FilesEnumeratedCallback callback, MimeTypeFilter filter, List<String> mimeTypes, ContentResolver contentResolver) { mWindowAndroid = windowAndroid; mCallback = callback; mFilter = filter; mContentResolver = contentResolver; for (String mimeType : mimeTypes) { if (mimeType.startsWith("image/")) { mIncludeImages = true; } else if (mimeType.startsWith("video/")) { mIncludeVideos = true; } if (mIncludeImages && mIncludeVideos) break; } } /** * Retrieves the DCIM/camera directory. */ private String getCameraDirectory() { return Environment.DIRECTORY_DCIM + File.separator + SAMPLE_DCIM_SOURCE_SUB_DIRECTORY; } /** * Enumerates (in the background) the image files on disk. Called on a non-UI thread * @return A sorted list of images (by last-modified first). */ @Override protected List<PickerBitmap> doInBackground() { assert !ThreadUtils.runningOnUiThread(); if (isCancelled()) return null; List<PickerBitmap> pickerBitmaps = new ArrayList<>(); // The DATA column is deprecated in the Android Q SDK. Replaced by relative_path. String directoryColumnName = BuildInfo.isAtLeastQ() ? "relative_path" : MediaStore.Files.FileColumns.DATA; final String[] selectColumns = { MediaStore.Files.FileColumns._ID, MediaStore.Files.FileColumns.DATE_ADDED, MediaStore.Files.FileColumns.MEDIA_TYPE, MediaStore.Files.FileColumns.MIME_TYPE, directoryColumnName, }; String whereClause = "(" + directoryColumnName + " LIKE ? OR " + directoryColumnName + " LIKE ? OR " + directoryColumnName + " LIKE ?) AND " + directoryColumnName + " NOT LIKE ?"; String additionalClause = ""; if (mIncludeImages) { additionalClause = MediaStore.Files.FileColumns.MEDIA_TYPE + "=" + MediaStore.Files.FileColumns.MEDIA_TYPE_IMAGE; } if (mIncludeVideos) { if (mIncludeImages) additionalClause += " OR "; additionalClause += MediaStore.Files.FileColumns.MEDIA_TYPE + "=" + MediaStore.Files.FileColumns.MEDIA_TYPE_VIDEO; } if (!additionalClause.isEmpty()) whereClause += " AND (" + additionalClause + ")"; String cameraDir = getCameraDirectory(); String picturesDir = Environment.DIRECTORY_PICTURES; String downloadsDir = Environment.DIRECTORY_DOWNLOADS; String screenshotsDir = Environment.DIRECTORY_PICTURES + "/Screenshots"; if (!BuildInfo.isAtLeastQ()) { cameraDir = Environment.getExternalStoragePublicDirectory(cameraDir).toString(); picturesDir = Environment.getExternalStoragePublicDirectory(picturesDir).toString(); downloadsDir = Environment.getExternalStoragePublicDirectory(downloadsDir).toString(); screenshotsDir = Environment.getExternalStoragePublicDirectory(screenshotsDir).toString(); } String[] whereArgs = new String[] { // Include: cameraDir + "%", picturesDir + "%", downloadsDir + "%", // Exclude low-quality sources, such as the screenshots directory: screenshotsDir + "%", }; final String orderBy = MediaStore.MediaColumns.DATE_ADDED + " DESC"; Uri contentUri = MediaStore.Files.getContentUri("external"); Cursor imageCursor = mContentResolver.query(contentUri, selectColumns, whereClause, whereArgs, orderBy); while (imageCursor.moveToNext()) { int mimeTypeIndex = imageCursor.getColumnIndex(MediaStore.Files.FileColumns.MIME_TYPE); String mimeType = imageCursor.getString(mimeTypeIndex); if (!mFilter.accept(null, mimeType)) continue; int dateTakenIndex = imageCursor.getColumnIndex(MediaStore.Files.FileColumns.DATE_ADDED); int idIndex = imageCursor.getColumnIndex(MediaStore.Files.FileColumns._ID); Uri uri = ContentUris.withAppendedId(contentUri, imageCursor.getInt(idIndex)); long dateTaken = imageCursor.getLong(dateTakenIndex); @PickerBitmap.TileTypes int type = PickerBitmap.TileTypes.PICTURE; if (mimeType.startsWith("video/")) type = PickerBitmap.TileTypes.VIDEO; pickerBitmaps.add(new PickerBitmap(uri, dateTaken, type)); } imageCursor.close(); pickerBitmaps.add(0, new PickerBitmap(null, 0, PickerBitmap.TileTypes.GALLERY)); boolean hasCameraAppAvailable = mWindowAndroid.canResolveActivity(new Intent(MediaStore.ACTION_IMAGE_CAPTURE)); boolean hasOrCanRequestCameraPermission = mWindowAndroid.hasPermission(Manifest.permission.CAMERA) || mWindowAndroid.canRequestPermission(Manifest.permission.CAMERA); if (hasCameraAppAvailable && hasOrCanRequestCameraPermission) { pickerBitmaps.add(0, new PickerBitmap(null, 0, PickerBitmap.TileTypes.CAMERA)); } return pickerBitmaps; } /** * Communicates the results back to the client. Called on the UI thread. * @param files The resulting list of files on disk. */ @Override protected void onPostExecute(List<PickerBitmap> files) { if (isCancelled()) { return; } mCallback.filesEnumeratedCallback(files); } }
[ "sunny.nam@samsung.com" ]
sunny.nam@samsung.com
9baddede95f7a87416e94178e7046b65eb26f645
cca87c4ade972a682c9bf0663ffdf21232c9b857
/com/tencent/mm/plugin/wallet_payu/balance/a/a.java
8821b6799975926bbdd79000cabd0fb3ba7ef91f
[]
no_license
ZoranLi/wechat_reversing
b246d43f7c2d7beb00a339e2f825fcb127e0d1a1
36b10ef49d2c75d69e3c8fdd5b1ea3baa2bba49a
refs/heads/master
2021-07-05T01:17:20.533427
2017-09-25T09:07:33
2017-09-25T09:07:33
104,726,592
12
1
null
null
null
null
UTF-8
Java
false
false
692
java
package com.tencent.mm.plugin.wallet_payu.balance.a; import java.util.HashMap; import java.util.Map; import org.json.JSONObject; public final class a extends com.tencent.mm.wallet_core.e.a.a { public String fFd; public String fJH; public double rFM; public a(double d, String str) { this.rFM = d; this.fFd = str; Map hashMap = new HashMap(); hashMap.put("total_fee", Math.round(100.0d * d)); hashMap.put("fee_type", str); x(hashMap); } public final int btw() { return 20; } public final void a(int i, String str, JSONObject jSONObject) { this.fJH = jSONObject.optString("prepayid"); } }
[ "lizhangliao@xiaohongchun.com" ]
lizhangliao@xiaohongchun.com
eea0b32df1a57f796bdade1bbe1cdd30b3087d00
7e2771140ef7d204680aafe8edcc5019660a562d
/T/java-spring-webmvc (사본)/src02/main/java/bitcamp/HelloServlet.java
f7b8efc8f1534d45605f0dd8bfc437c4c944eced
[]
no_license
cdis001/bitcamp-java-2018-12
8d63c8bfe01beb8db40bd14d04c433281223f0ed
cd3e10f26c1bc803f56fd6fa0a3e645d54146a66
refs/heads/master
2021-07-24T01:35:14.360793
2020-05-08T08:18:11
2020-05-08T08:18:11
163,650,671
0
0
null
null
null
null
UTF-8
Java
false
false
655
java
package bitcamp; import java.io.IOException; import java.io.PrintWriter; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @SuppressWarnings("serial") @WebServlet("/hello") public class HelloServlet extends HttpServlet { @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.setContentType("text/plain;charset=UTF-8"); PrintWriter out = resp.getWriter(); out.println("Hello, World!"); } }
[ "shopingid@naver.com" ]
shopingid@naver.com
6ed5b1f74c74ff327d209f3292e93e3f6ea3c788
7b73756ba240202ea92f8f0c5c51c8343c0efa5f
/classes2/uux.java
09369fa967513d5df9e3c45a1dfce70eb9cced46
[]
no_license
meeidol-luo/qooq
588a4ca6d8ad579b28dec66ec8084399fb0991ef
e723920ac555e99d5325b1d4024552383713c28d
refs/heads/master
2020-03-27T03:16:06.616300
2016-10-08T07:33:58
2016-10-08T07:33:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,611
java
import android.app.Activity; import android.content.Context; import android.content.Intent; import android.content.pm.PackageManager; import android.content.pm.PackageManager.NameNotFoundException; import android.net.Uri; import android.os.Bundle; import android.text.TextUtils; import android.view.View; import com.tencent.biz.pubaccount.util.PublicAccountUtil; import com.tencent.mobileqq.activity.QQBrowserActivity; import com.tencent.mobileqq.app.QQAppInterface; import com.tencent.mobileqq.app.StartAppCheckHandler; import com.tencent.mobileqq.hotpatch.NotVerifyClass; import com.tencent.mobileqq.statistics.ReportController; import com.tencent.mobileqq.structmsg.AbsShareMsg; import com.tencent.mobileqq.structmsg.StructMsgClickHandler; import com.tencent.open.appcommon.AppClient; import com.tencent.qphone.base.util.QLog; public class uux extends StructMsgClickHandler { public uux(AbsShareMsg paramAbsShareMsg, View paramView) { super(paramView); } public uux(AbsShareMsg paramAbsShareMsg, QQAppInterface paramQQAppInterface, View paramView) { super(paramQQAppInterface, paramView); boolean bool = NotVerifyClass.DO_VERIFY_CLASS; } public boolean a(Activity paramActivity, long paramLong, String paramString1, String paramString2, String paramString3) { paramString1 = AbsShareMsg.parsePackageNameAndData(paramString2, paramString3)[0]; if (QLog.isColorLevel()) { QLog.d("StructMsg", 2, "SourceClickHandler click2YYB appid = " + paramLong + "; packageName=" + paramString1); } if (TextUtils.isEmpty(paramString1)) { return false; } paramString2 = new Bundle(); paramString2.putString("packageName", paramString1); paramString2.putString("appId", paramLong + ""); AppClient.b(paramActivity, paramString2); return true; } public boolean a(String paramString) { if (QLog.isColorLevel()) { QLog.d("StructMsg", 2, "SourceClickHandler clickWebMsg url = " + paramString); } if ((TextUtils.isEmpty(paramString)) || ((!paramString.startsWith("http://")) && (!paramString.startsWith("https://")))) { return false; } Intent localIntent = new Intent(this.jdField_a_of_type_AndroidContentContext, QQBrowserActivity.class); localIntent.putExtra("key_isReadModeEnabled", true); localIntent.putExtra("title", this.jdField_a_of_type_ComTencentMobileqqStructmsgAbsShareMsg.mSourceName); localIntent.putExtra("url", paramString); PublicAccountUtil.a(this.jdField_a_of_type_ComTencentMobileqqStructmsgAbsShareMsg.message, localIntent, paramString); this.jdField_a_of_type_AndroidContentContext.startActivity(localIntent); ReportController.b(null, "P_CliOper", "Pb_account_lifeservice", "", "aio_msg_url", "aio_url_clickqq", 0, 1, 0, paramString, "", "", ""); return true; } public boolean a(String paramString1, String paramString2, String paramString3) { if (QLog.isColorLevel()) { QLog.d("StructMsg", 2, "SourceClickHandler clickAppMsg url = " + paramString1 + ", actionData = " + paramString2 + ", actionDataA = " + paramString3); } paramString1 = AbsShareMsg.parsePackageNameAndData(paramString2, paramString3); paramString2 = this.jdField_a_of_type_AndroidContentContext.getPackageManager(); try { if (paramString2.getPackageInfo(paramString1[0], 1) != null) { paramString2 = paramString2.getLaunchIntentForPackage(paramString1[0]); if (paramString2 == null) { return false; } paramString2.addFlags(67108864); if (!TextUtils.isEmpty(paramString1[1])) { paramString2.setData(Uri.parse(paramString1[1])); } try { ((StartAppCheckHandler)this.jdField_a_of_type_ComTencentMobileqqAppQQAppInterface.a(23)).b(paramString1[0].trim(), this.jdField_a_of_type_AndroidContentContext, paramString2); return true; } catch (Exception paramString1) { for (;;) { if (QLog.isColorLevel()) { QLog.d("AppStartedHandler", 2, "<-- StartAppCheckHandler AbsShareMSG Failed!"); } this.jdField_a_of_type_AndroidContentContext.startActivity(paramString2); } } } return false; } catch (PackageManager.NameNotFoundException paramString1) { if (QLog.isColorLevel()) { QLog.d("StructMsg", 2, paramString1.getMessage()); } } } } /* Location: E:\apk\QQ_91\classes2-dex2jar.jar!\uux.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "1776098770@qq.com" ]
1776098770@qq.com
f522e0126ccb6d3eccb66c64a977746f51354f46
5a088135a99a386e473f94f971c571864373865c
/04.MSH.NMEL/02.项目工程/03.代码编写/server/els/trunk/src/main/java/com/infohold/els/model/PayBatch.java
89543e3e981430958dcf68b239b6d9d86a42f743
[]
no_license
jacky-cyber/work
a7bebd2cc910da1e9e227181def880a78cc1de07
e58558221b2a8f410b087fa2ce88017cea12efa4
refs/heads/master
2022-02-25T09:48:53.940782
2018-05-01T10:04:53
2018-05-01T10:04:53
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,102
java
/*********************************************************************** * Module:PerMng.java * Author:wod * Purpose: Defines the Class PerMng ***********************************************************************/ package com.infohold.els.model; import java.math.BigDecimal; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.Table; import com.infohold.core.model.BaseIdModel; @Entity @Table(name = "ELS_PAY_BATCH") public class PayBatch extends BaseIdModel { private static final long serialVersionUID = -3495590691669011573L; public static final String STATUS_CREATE = "0"; public static final String STATUS_REVIEW = "1"; public static final String STATUS_COMMIT = "2"; public static final String STATUS_FINISH = "3"; private String orgId; private String batchNo; private String month; private int num; private BigDecimal amount; private String state; private String submitTime; private String payTime; private int succNum; private BigDecimal succAmount; private String note; @Column(name = "AMOUNT") public BigDecimal getAmount() { return amount; } @Column(name = "BATCH_NO", length = 32) public String getBatchNo() { return batchNo; } @Column(name = "MONTH", length = 32) public String getMonth() { return month; } @Column(name = "NOTE", length = 200) public String getNote() { return note; } @Column(name = "NUM") public int getNum() { return num; } @Column(name = "ORG_ID", length = 32) public String getOrgId() { return orgId; } @Column(name = "PAY_TIME", length = 19) public String getPayTime() { return payTime; } @Column(name = "STATE", length = 1) public String getState() { return state; } @Column(name = "SUBMIT_TIME", length = 19) public String getSubmitTime() { return submitTime; } @Column(name = "SUCC_AMOUNT") public BigDecimal getSuccAmount() { return succAmount; } @Column(name = "SUCC_NUM") public int getSuccNum() { return succNum; } public void setAmount(BigDecimal amount) { this.amount = amount; } public void setBatchNo(String batchNo) { this.batchNo = batchNo; } public void setMonth(String month) { this.month = month; } public void setNote(String note) { this.note = note; } public void setNum(int num) { this.num = num; } public void setOrgId(String orgId) { this.orgId = orgId; } public void setPayTime(String payTime) { this.payTime = payTime; } public void setState(String state) { this.state = state; } public void setSubmitTime(String submitTime) { this.submitTime = submitTime; } public void setSuccAmount(BigDecimal succAmount) { this.succAmount = succAmount; } public void setSuccNum(int succNum) { this.succNum = succNum; } /** * 判断状态是否存在状态序列中 * * @param statusCode * @return */ public static boolean hasStatus(String statusCode) { return PayBatch.STATUS_CREATE.equals(statusCode) || PayBatch.STATUS_REVIEW.equals(statusCode) || PayBatch.STATUS_COMMIT.equals(statusCode) || PayBatch.STATUS_FINISH.equals(statusCode); } }
[ "liuximing2016@qq.com" ]
liuximing2016@qq.com
b26ddb25807307392839972bc941ebf0490f1dce
d2929511a3c83c71f6928bd02eb978799695ccac
/src/main/java/com/reactivetechnologies/platform/datagrid/annotation/HzMapConfig.java
4df3413169a69b12cb34e6d404b2a0dd749b44c6
[ "MIT" ]
permissive
javanotes/spring-data-hazelcast
3f4bf6c8f93a5ca4a800045f644cded449591244
fca9c2c6f8054e4d5dc79764dad218f23caf7e55
refs/heads/master
2021-01-10T08:56:29.996605
2016-02-12T13:50:19
2016-02-12T13:50:19
50,113,105
0
1
null
null
null
null
UTF-8
Java
false
false
2,203
java
/* ============================================================================ * * FILE: HzMapConfig.java * The MIT License (MIT) Copyright (c) 2016 Sutanu Dalui Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. * * ============================================================================ */ package com.reactivetechnologies.platform.datagrid.annotation; import static java.lang.annotation.ElementType.TYPE; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; import org.springframework.data.annotation.Persistent; import org.springframework.data.keyvalue.annotation.KeySpace; @Persistent @Retention(RetentionPolicy.RUNTIME) @Target(value = { TYPE }) /** * Quick settings for a Map config. NOTE: This will override any setting made in the hazelcast config xml */ public @interface HzMapConfig { @KeySpace String name(); String inMemoryFormat() default "BINARY"; int backupCount() default 1; int asyncBackupCount() default 0; int ttlSeconds()default 0; int idleSeconds()default 0; String evictPolicy() default "NONE"; int evictPercentage() default 25; int maxSizePerNode() default 0; long evictCheckMillis() default 100; }
[ "sutanu.dalui@ericsson.com" ]
sutanu.dalui@ericsson.com
1b0cf18ed521fd5fd64f1385c4895a26526be3bf
b19291d49a42469357174542536c6fc2936de7f4
/Day17 - Bean/.metadata/.plugins/org.eclipse.wst.server.core/tmp0/work/Catalina/localhost/BeanDemos/org/apache/jsp/hello_jsp.java
48e1c63205cc4a1a7f07a64e3c458c7bccd9b89a
[]
no_license
Sri-Keerthna/JavaMode1Training
1e9af629c6d0bc81c91710cfea2d637bd1b9b87b
ff242f28c920a57a834d5d5583f613d3de1a0292
refs/heads/master
2022-12-21T13:17:29.040705
2019-10-22T10:11:57
2019-10-22T10:11:57
216,743,054
0
0
null
null
null
null
UTF-8
Java
false
false
6,113
java
/* * Generated by the Jasper component of Apache Tomcat * Version: Apache Tomcat/8.0.32 * Generated at: 2019-08-22 04:13:00 UTC * Note: The last modified time of this file was set to * the last modified time of the source file after * generation to assist with modification tracking. */ package org.apache.jsp; import javax.servlet.*; import javax.servlet.http.*; import javax.servlet.jsp.*; public final class hello_jsp extends org.apache.jasper.runtime.HttpJspBase implements org.apache.jasper.runtime.JspSourceDependent, org.apache.jasper.runtime.JspSourceImports { private static final javax.servlet.jsp.JspFactory _jspxFactory = javax.servlet.jsp.JspFactory.getDefaultFactory(); private static java.util.Map<java.lang.String,java.lang.Long> _jspx_dependants; private static final java.util.Set<java.lang.String> _jspx_imports_packages; private static final java.util.Set<java.lang.String> _jspx_imports_classes; static { _jspx_imports_packages = new java.util.HashSet<>(); _jspx_imports_packages.add("javax.servlet"); _jspx_imports_packages.add("javax.servlet.http"); _jspx_imports_packages.add("javax.servlet.jsp"); _jspx_imports_classes = null; } private volatile javax.el.ExpressionFactory _el_expressionfactory; private volatile org.apache.tomcat.InstanceManager _jsp_instancemanager; public java.util.Map<java.lang.String,java.lang.Long> getDependants() { return _jspx_dependants; } public java.util.Set<java.lang.String> getPackageImports() { return _jspx_imports_packages; } public java.util.Set<java.lang.String> getClassImports() { return _jspx_imports_classes; } public javax.el.ExpressionFactory _jsp_getExpressionFactory() { if (_el_expressionfactory == null) { synchronized (this) { if (_el_expressionfactory == null) { _el_expressionfactory = _jspxFactory.getJspApplicationContext(getServletConfig().getServletContext()).getExpressionFactory(); } } } return _el_expressionfactory; } public org.apache.tomcat.InstanceManager _jsp_getInstanceManager() { if (_jsp_instancemanager == null) { synchronized (this) { if (_jsp_instancemanager == null) { _jsp_instancemanager = org.apache.jasper.runtime.InstanceManagerFactory.getInstanceManager(getServletConfig()); } } } return _jsp_instancemanager; } public void _jspInit() { } public void _jspDestroy() { } public void _jspService(final javax.servlet.http.HttpServletRequest request, final javax.servlet.http.HttpServletResponse response) throws java.io.IOException, javax.servlet.ServletException { final java.lang.String _jspx_method = request.getMethod(); if (!"GET".equals(_jspx_method) && !"POST".equals(_jspx_method) && !"HEAD".equals(_jspx_method) && !javax.servlet.DispatcherType.ERROR.equals(request.getDispatcherType())) { response.sendError(HttpServletResponse.SC_METHOD_NOT_ALLOWED, "JSPs only permit GET POST or HEAD"); return; } final javax.servlet.jsp.PageContext pageContext; javax.servlet.http.HttpSession session = null; final javax.servlet.ServletContext application; final javax.servlet.ServletConfig config; javax.servlet.jsp.JspWriter out = null; final java.lang.Object page = this; javax.servlet.jsp.JspWriter _jspx_out = null; javax.servlet.jsp.PageContext _jspx_page_context = null; try { response.setContentType("text/html; charset=ISO-8859-1"); pageContext = _jspxFactory.getPageContext(this, request, response, null, true, 8192, true); _jspx_page_context = pageContext; application = pageContext.getServletContext(); config = pageContext.getServletConfig(); session = pageContext.getSession(); out = pageContext.getOut(); _jspx_out = out; out.write("\r\n"); out.write("<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n"); out.write("<html>\r\n"); out.write("<head>\r\n"); out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\r\n"); out.write("<title>Insert title here</title>\r\n"); out.write("</head>\r\n"); out.write("<body>\r\n"); com.hcl.beans.Hello bean1 = null; bean1 = (com.hcl.beans.Hello) _jspx_page_context.getAttribute("bean1", javax.servlet.jsp.PageContext.PAGE_SCOPE); if (bean1 == null){ bean1 = new com.hcl.beans.Hello(); _jspx_page_context.setAttribute("bean1", bean1, javax.servlet.jsp.PageContext.PAGE_SCOPE); } out.write("\r\n"); out.write("Default Value is:\r\n"); out.write("<b>\r\n"); out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((com.hcl.beans.Hello)_jspx_page_context.findAttribute("bean1")).getMessage()))); out.write("\r\n"); out.write("</b>\r\n"); org.apache.jasper.runtime.JspRuntimeLibrary.introspecthelper(_jspx_page_context.findAttribute("bean1"), "message", "Good Afternoon", null, null, false); out.write("\r\n"); out.write("<br/><br/>\r\n"); out.write("Updated Value is :\r\n"); out.write("<b>\r\n"); out.write(org.apache.jasper.runtime.JspRuntimeLibrary.toString((((com.hcl.beans.Hello)_jspx_page_context.findAttribute("bean1")).getMessage()))); out.write("\r\n"); out.write("</b>\r\n"); out.write("</body>\r\n"); out.write("</html>"); } catch (java.lang.Throwable t) { if (!(t instanceof javax.servlet.jsp.SkipPageException)){ out = _jspx_out; if (out != null && out.getBufferSize() != 0) try { if (response.isCommitted()) { out.flush(); } else { out.clearBuffer(); } } catch (java.io.IOException e) {} if (_jspx_page_context != null) _jspx_page_context.handlePageException(t); else throw new ServletException(t); } } finally { _jspxFactory.releasePageContext(_jspx_page_context); } } }
[ "=" ]
=
6b54b3e413fea4610d52d34c9624421292a93a24
4aa8f43d1d3e25075f05cd835e0d90fe6143aca4
/Plugins/org.feature.multi.perspective.classification.resource.clt/src/gen/java/org/feature/multi/perspective/classification/resource/clt/ICltOptions.java
53c9d27d34c2cd66fa2d4e8270ad266f01b1a728
[]
no_license
multi-perspectives/cluster
bb8adb5f1710eb502e1d933375e9d51da9bb2c7c
8c3f2ccfc784fb0e0cce7411f75e18e25735e9f8
refs/heads/master
2016-09-05T11:23:16.096796
2014-03-13T20:07:59
2014-03-13T20:07:59
2,890,695
0
1
null
2012-11-22T14:58:18
2011-12-01T11:41:12
Java
UTF-8
Java
false
false
3,547
java
/** * <copyright> * </copyright> * * */ package org.feature.multi.perspective.classification.resource.clt; /** * A list of constants that contains the keys for some options that are built into * EMFText. Generated resource plug-ins do automatically recognize these options * and use them if they are configured properly. */ public interface ICltOptions { /** * The key for the option to provide a stream pre-processor. */ public String INPUT_STREAM_PREPROCESSOR_PROVIDER = new org.feature.multi.perspective.classification.resource.clt.mopp.CltMetaInformation().getInputStreamPreprocessorProviderOptionKey(); /** * The key for the option to provide a resource post-processor. */ public String RESOURCE_POSTPROCESSOR_PROVIDER = new org.feature.multi.perspective.classification.resource.clt.mopp.CltMetaInformation().getResourcePostProcessorProviderOptionKey(); /** * The key for the option to provide additional reference resolvers. The value for * this option must be a map that used EReferences as keys and either single * reference resolvers or collections of resolvers as values. By setting this * option one can customize the resolving of references at run-time. */ public String ADDITIONAL_REFERENCE_RESOLVERS = "ADDITIONAL_REFERENCE_RESOLVERS"; /** * The key for the option to specify an expected content type in text resources * and text parsers. A content type is an EClass that specifies the root object of * a text resource. If this option is set, the parser does not use the start * symbols defined in the .cs specification, but uses the given EClass as start * symbol instead. Note that the value for this option must be an EClass object * and not the name of the EClass. */ public final String RESOURCE_CONTENT_TYPE = "RESOURCE_CONTENT_TYPE"; /** * The key for the option to disable marker creation for resource problems. If * this option is set to <code>true</code> when loading resources, reported * problems will not be added as Eclipse workspace markers. This option is used by * the MarkerResolutionGenerator class, which will end up in an infinite loop if * markers are created when loading resources as this creation triggers the * loading of the same resource and so on. */ public final String DISABLE_CREATING_MARKERS_FOR_PROBLEMS = "DISABLE_CREATING_MARKERS_FOR_PROBLEMS"; /** * The key for the option to disable the location map that maps EObjects to the * position of their textual representations. If this option is set to * <code>true</code>, the memory footprint of large models is reduced. Disabling * the location map, however, disables functionality that relies on it (e.g. * navigation in the text editor). */ public final String DISABLE_LOCATION_MAP = "DISABLE_LOCATION_MAP"; /** * The key for the option to disable the recording of layout information. If this * option is set to <code>true</code>, the memory footprint of large models is * reduced. When layout information recording is disabled, a new layout is * computed during printing and the original layout is not preserved. */ public final String DISABLE_LAYOUT_INFORMATION_RECORDING = "DISABLE_LAYOUT_INFORMATION_RECORDING"; /** * The key for the option to set the encoding to use when loading or saving * resources. This is equivalent to the same option specified in class * <code>org.eclipse.emf.ecore.xmi.XMLResource</code>. * * @see org.eclipse.emf.ecore.xmi.XMLResource */ public final String OPTION_ENCODING = "ENCODING"; }
[ "julia.schroeter@sap.com" ]
julia.schroeter@sap.com
8cdf1ea12aacdd80563dfbab99aafaa7cf04005e
360800d909d738d34a3db185eb9a3a45c54653ff
/part11-Part11_06.SaveablePerson/src/main/java/Saveable.java
a0369c840cf449a632a57a54b0fdb74a3923ac56
[]
no_license
remixtures/mooc-java-programming-ii
ae89b4295576cbca47d164b53d846e616bfd8cc5
68734410cdcfb69891bf599edce6e38e597a7546
refs/heads/master
2023-03-23T14:05:45.158264
2021-03-21T20:56:47
2021-03-21T20:56:47
350,116,864
2
3
null
null
null
null
UTF-8
Java
false
false
358
java
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ /** * * @author miguel */ public interface Saveable { public void save(); public void delete(); public void load(String address); }
[ "miguel.a.caetano@gmail.com" ]
miguel.a.caetano@gmail.com
e8c2e70e5296b9125cef3d7d0c8b299607f311f6
87f420a0e7b23aefe65623ceeaa0021fb0c40c56
/oauth/oauth-module-infra/oauth-module-infra-biz/src/main/java/cn/iocoder/oauth/module/infra/controller/admin/config/vo/ConfigCreateReqVO.java
37e6e1c120c1fb53104c7805f2117a9ccff08d1e
[]
no_license
xioxu-web/xioxu-web
0361a292b675d8209578d99451598bf4a56f9b08
7fe3f9539e3679e1de9f5f614f3f9b7f41a28491
refs/heads/master
2023-05-05T01:59:43.228816
2023-04-28T07:44:58
2023-04-28T07:44:58
367,005,744
0
0
null
null
null
null
UTF-8
Java
false
false
710
java
package cn.iocoder.oauth.module.infra.controller.admin.config.vo; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.Size; @ApiModel("管理后台 - 参数配置创建 Request VO") @Data @EqualsAndHashCode(callSuper = true) public class ConfigCreateReqVO extends ConfigBaseVO { @ApiModelProperty(value = "参数键名", required = true, example = "yunai.db.username") @NotBlank(message = "参数键名长度不能为空") @Size(max = 100, message = "参数键名长度不能超过100个字符") private String key; }
[ "xb01049438@alibaba-inc.com" ]
xb01049438@alibaba-inc.com
c098439c5e42e6903e43cf6cf469e61126accf24
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/2/2_948ee2ca85f32940646b3c1dd2b912f161f7e8d4/GITFacadeTest/2_948ee2ca85f32940646b3c1dd2b912f161f7e8d4_GITFacadeTest_t.java
f803cb83a0fe7a752f25ac879a97fa6779626da8
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
907
java
package org.jabox.scm.git; import java.io.File; import org.jabox.environment.Environment; import org.jabox.model.Project; import junit.framework.TestCase; public class GITFacadeTest extends TestCase { public void testValidate() { fail("Not yet implemented"); } public void testCheckoutBaseDir() { IGITConnectorConfig gitc = new GITConnectorConfig(); File storePath = new File("target/foo"); storePath.mkdirs(); new GITFacade().checkoutBaseDir(storePath, gitc); } public void testCommitProject() { GITFacade facade = new GITFacade(); Project project = new Project(); project.setName("test7"); File tmpDir = new File("target/foo2"); File projectDir = new File(tmpDir, "foo"); projectDir.mkdirs(); IGITConnectorConfig svnc = new GITConnectorConfig(); facade.commitProject(project, tmpDir, svnc); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
bf64d0f8df4f81977482d560ec5ea553209820da
88eeb2ecac1977cd997d5edf9f131d23fd9b71d5
/Connect4.java
8a85bac1889fbfe55772d318eeb50ebf4afb4667
[]
no_license
mlitman/CSC535_Spring2017
9a480d76daf100f96df2845b406879e3989b31e5
89bb3933a02a2fc00d92770285726ea0f1145031
refs/heads/master
2021-01-21T12:43:29.920990
2017-03-09T01:40:19
2017-03-09T01:40:19
83,623,662
0
0
null
null
null
null
UTF-8
Java
false
false
876
java
import java.util.Scanner; public class Connect4 { private C4Board theBoard; private char currMove; private int numMoves; public Connect4() { this.theBoard = new C4Board(); this.currMove = 'R'; this.numMoves = 0; } public void play() { Scanner input = new Scanner(System.in); while(this.theBoard.isWinner() == false && this.theBoard.isTie(this.numMoves) == false) { this.theBoard.display(); System.out.print("Which column: "); int col = input.nextInt(); if(this.theBoard.makeMove(col, this.currMove)) { this.numMoves++; if(this.currMove == 'R') { this.currMove = 'B'; } else { this.currMove = 'R'; } } } //we know there is either a winner or a tie if(this.theBoard.isTie(this.numMoves)) { System.out.println("Tie Game"); } else { System.out.println("Winner!!!"); } } }
[ "awesomefat@gmail.com" ]
awesomefat@gmail.com
80ada9efbdf7483438c5c5175aafa43bc1ab6746
67ca5eb0f1b16375c3ec2b9e1dcc47acafbccc13
/Core/AspectOrientedCodingInSpring/src/main/java/demos/aop/test/three/TestCharlie.java
1864f6a2e69cb5602caeccc4754020e1bb8c2149
[]
no_license
SF3/Spring
3f3f41a02fc5e589d621dce8a0f670c3a3e902ff
b571c776c163942929eeb0c5a35e4f4bfabeb389
refs/heads/main
2023-06-10T07:58:02.011699
2021-07-01T09:45:29
2021-07-01T09:45:29
382,370,354
0
0
null
null
null
null
UTF-8
Java
false
false
2,364
java
package demos.aop.test.three; import java.util.Collection; import java.util.Iterator; public class TestCharlie implements Collection<String> { public TestCharlie() { System.out.println("Call to TestCharlie.<init>"); } @Override public int size() { System.out.println("Call to TestCharlie.size"); return 0; } @Override public boolean isEmpty() { System.out.println("Call to TestCharlie.isEmpty"); return false; } @Override public boolean contains(Object o) { System.out.println("Call to TestCharlie.contains"); return false; } @Override public Iterator<String> iterator() { System.out.println("Call to TestCharlie.iterator"); return new Iterator<String>() { public boolean hasNext() { return false; } @Override public String next() { return null; } }; } @Override public Object[] toArray() { System.out.println("Call to TestCharlie.toArray()"); return null; } @Override public <T> T[] toArray(T[] a) { System.out.println("Call to TestCharlie.toArray(T[])"); return null; } @Override public boolean add(String e) { System.out.println("Call to TestCharlie.add"); return false; } @Override public boolean remove(Object o) { System.out.println("Call to TestCharlie.remove"); return false; } @Override public boolean containsAll(Collection<?> c) { System.out.println("Call to TestCharlie.containsAll"); return false; } @Override public boolean addAll(Collection<? extends String> c) { System.out.println("Call to TestCharlie.addAll"); return false; } @Override public boolean removeAll(Collection<?> c) { System.out.println("Call to TestCharlie.removeAll"); return false; } @Override public boolean retainAll(Collection<?> c) { System.out.println("Call to TestCharlie.retainAll"); return false; } @Override public void clear() { System.out.println("Call to TestCharlie.clear"); } }
[ "garth.gilmour@instil.co" ]
garth.gilmour@instil.co
ca3c6b1df587ddd5b360ea33899459d8d21812dd
c5d1d4705dbd18de95716a8d14ae1c54185bec6c
/src/main/java/de/grayc/shoppinglists/security/SpringSecurityAuditorAware.java
58b7b2be605916e69dc1edc85a45ccd279a03c4f
[]
no_license
BulkSecurityGeneratorProject/ShoppingLists
fa1745ed64f0e00d4b48b8fe6a4942ca7069cafe
0637393c3ae329c01e13de65d97ee0cb8d6c5c7b
refs/heads/master
2022-12-15T09:18:08.064006
2018-01-13T21:27:25
2018-01-13T21:27:25
296,570,740
0
0
null
2020-09-18T09:06:45
2020-09-18T09:06:44
null
UTF-8
Java
false
false
495
java
package de.grayc.shoppinglists.security; import de.grayc.shoppinglists.config.Constants; import org.springframework.data.domain.AuditorAware; import org.springframework.stereotype.Component; /** * Implementation of AuditorAware based on Spring Security. */ @Component public class SpringSecurityAuditorAware implements AuditorAware<String> { @Override public String getCurrentAuditor() { return SecurityUtils.getCurrentUserLogin().orElse(Constants.SYSTEM_ACCOUNT); } }
[ "jhipster-bot@users.noreply.github.com" ]
jhipster-bot@users.noreply.github.com
6b18f64a2ee5ac0c6c368df9269b3244c206f291
4858be2f5bf24ec46bd6f10b6c7233d3a1987622
/skyon/src/com/bcits/bfm/controller/DeleteDuplicate.java
f53e231675beaca5d47d313f75f6ed42e82380a8
[]
no_license
praveenkumar11nov/PROJECT_IBS
7a3df5a80ecc1ff10de9f37476a7c677c8739d6f
206e9563b10bc68977aff7b51f1437970fc2a732
refs/heads/master
2020-03-19T09:47:19.380956
2018-06-06T11:08:16
2018-06-06T11:08:16
136,317,260
0
0
null
null
null
null
UTF-8
Java
false
false
3,245
java
package com.bcits.bfm.controller; import java.util.Iterator; import java.util.List; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; @Controller public class DeleteDuplicate { @PersistenceContext(unitName="bfm") protected EntityManager entityManager; @Transactional(propagation=Propagation.REQUIRED) @RequestMapping(value="/deleteConsumptionDuplicate/{afterdate}") public void deleteConsumptionDuplicate(@PathVariable String afterdate){ System.out.println("=================inside deleteConsumptionDuplicate()============"); try { int duplicateRecords = 0; List<?> duplicateList = null; String getAllDuplicates = " SELECT * FROM( "+ " SELECT COUNT(*)AS consmp_Count,METER_SR_NO,READING_DATE_TIME FROM PREPAID_DAILY_DATA p "+ " WHERE TO_DATE(READING_DATE_TIME,'dd-MM-yyyy')>TO_DATE('"+afterdate+"','dd-MM-yyyy') "+ " GROUP BY METER_SR_NO,READING_DATE_TIME ORDER BY TO_DATE(READING_DATE_TIME,'dd-MM-yyyy') DESC) "+ " WHERE consmp_Count>1 "; try{ duplicateList = entityManager.createNativeQuery(getAllDuplicates).getResultList(); }catch (Exception e) { System.err.println("===========================No Duplicates Records Found============================"); e.printStackTrace(); } if(duplicateList.size()>0){ for (Iterator<?> iterator = duplicateList.iterator(); iterator.hasNext();) { final Object[] values = (Object[]) iterator.next(); for(int i=1;i<Integer.parseInt(values[0].toString());i++) { String deleteAllduplicates = " DELETE FROM PREPAID_DAILY_DATA WHERE INSTANT_ID IN("+ " SELECT X.INSTANT_ID FROM "+ " ("+ " SELECT * FROM PREPAID_DAILY_DATA WHERE INSTANT_ID IN(SELECT MAX(INSTANT_ID) FROM PREPAID_DAILY_DATA pdd2 "+ " WHERE TO_DATE(READING_DATE_TIME,'dd/MM/yyyy')=TO_DATE('"+values[2]+"','dd/MM/yyyy')AND METER_SR_NO='"+values[1]+"')"+ " )X,"+ " ( "+ " SELECT * FROM PREPAID_DAILY_DATA WHERE INSTANT_ID IN(SELECT MIN(INSTANT_ID) FROM PREPAID_DAILY_DATA pdd2 "+ " WHERE TO_DATE(READING_DATE_TIME,'dd/MM/yyyy')=TO_DATE('"+values[2]+"','dd/MM/yyyy')AND METER_SR_NO='"+values[1]+"')"+ " )Y "+ " WHERE x.INSTANT_ID!=y.INSTANT_ID AND x.METER_SR_NO=y.METER_SR_NO AND "+ " TO_DATE(x.READING_DATE_TIME,'dd/MM/yyyy')=TO_DATE(y.READING_DATE_TIME,'dd/MM/yyyy') AND "+ " x.balance=y.balance AND x.DAILY_CONSUMPTION_AMOUNT=y.DAILY_CONSUMPTION_AMOUNT AND x.CUM_FIXED_CHARGE_MAIN=y.CUM_FIXED_CHARGE_MAIN AND "+ " x.CUM_FIXED_CHARGE_DG=y.CUM_FIXED_CHARGE_DG AND x.CUSTOMER_RECHRGE_AMOUNT=y.CUSTOMER_RECHRGE_AMOUNT AND x.CUM_KWH_MAIN=y.CUM_KWH_MAIN "+ " ) "; entityManager.createNativeQuery(deleteAllduplicates).executeUpdate(); duplicateRecords++; } } } System.err.println("Duplicate Record Deleted = " + duplicateRecords); } catch (Exception e) { e.printStackTrace(); } } }
[ "praveen.shanukumar@gmail.com" ]
praveen.shanukumar@gmail.com
fb76e5bd4e38bbb08d5c870c948b63727e963fae
3334bee9484db954c4508ad507f6de0d154a939f
/d3n/backend_java-default-services/f4m-backend-java/result-engine-service/src/main/java/de/ascendro/f4m/service/result/engine/client/ServiceRequestInfo.java
ed91f540efdb35ce14aacfd55b24ca33ca8b7f41
[]
no_license
VUAN86/d3n
c2fc46fc1f188d08fa6862e33cac56762e006f71
e5d6ac654821f89b7f4f653e2aaef3de7c621f8b
refs/heads/master
2020-05-07T19:25:43.926090
2019-04-12T07:25:55
2019-04-12T07:25:55
180,806,736
0
1
null
null
null
null
UTF-8
Java
false
false
689
java
package de.ascendro.f4m.service.result.engine.client; import java.util.List; import de.ascendro.f4m.service.request.RequestInfoImpl; public class ServiceRequestInfo extends RequestInfoImpl { private final String gameInstanceId; private final List<String> transactionLogIds; public ServiceRequestInfo(String gameInstanceId) { this(gameInstanceId, null); } public ServiceRequestInfo(String gameInstanceId, List<String> transactionLogIds) { this.gameInstanceId = gameInstanceId; this.transactionLogIds = transactionLogIds; } public String getGameInstanceId() { return gameInstanceId; } public List<String> getTransactionLogIds() { return transactionLogIds; } }
[ "vuan86@ya.ru" ]
vuan86@ya.ru
ddc2024ada9c5aaf77b5bf22d509cf29c76d4079
e57083ea584d69bc9fb1b32f5ec86bdd4fca61c0
/sample-app/src/main/java/com/example/sample/service/SampleService.java
c9bbe01d6766a15aef6ecfd6b3dfc44959bd0427
[]
no_license
snicoll-scratches/test-spring-components-index
77e0ad58c8646c7eb1d1563bf31f51aa42a0636e
aa48681414a11bb704bdbc8acabe45fa5ef2fd2d
refs/heads/main
2021-06-13T08:46:58.532850
2019-12-09T15:11:10
2019-12-09T15:11:10
65,806,297
5
3
null
null
null
null
UTF-8
Java
false
false
345
java
package com.example.sample.service; import com.example.sample.domain.SpeakerRepository; import org.springframework.stereotype.Service; @Service public class SampleService { private final SpeakerRepository speakerRepository; public SampleService(SpeakerRepository speakerRepository) { this.speakerRepository = speakerRepository; } }
[ "snicoll@pivotal.io" ]
snicoll@pivotal.io
75de28ac87fdc9172e2de4becbddba751063d9d0
18cfb24c4914acd5747e533e88ce7f3a52eee036
/src/main/jdk8/javax/xml/stream/FactoryConfigurationError.java
65a8bac392dccade53f64d49b74a50da56ac1b20
[]
no_license
douguohai/jdk8-code
f0498e451ec9099e4208b7030904e1b4388af7c5
c8466ed96556bfd28cbb46e588d6497ff12415a0
refs/heads/master
2022-12-19T03:10:16.879386
2020-09-30T05:43:20
2020-09-30T05:43:20
273,399,965
0
0
null
null
null
null
UTF-8
Java
false
false
2,396
java
/* * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ /* * Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. */ package javax.xml.stream; /** * An error class for reporting factory configuration errors. * * @version 1.0 * @author Copyright (c) 2009 by Oracle Corporation. All Rights Reserved. * @since 1.6 */ public class FactoryConfigurationError extends Error { private static final long serialVersionUID = -2994412584589975744L; Exception nested; /** * Default constructor */ public FactoryConfigurationError(){} /** * Construct an exception with a nested inner exception * * @param e the exception to nest */ public FactoryConfigurationError(java.lang.Exception e){ nested = e; } /** * Construct an exception with a nested inner exception * and a message * * @param e the exception to nest * @param msg the message to report */ public FactoryConfigurationError(java.lang.Exception e, java.lang.String msg){ super(msg); nested = e; } /** * Construct an exception with a nested inner exception * and a message * * @param msg the message to report * @param e the exception to nest */ public FactoryConfigurationError(java.lang.String msg, java.lang.Exception e){ super(msg); nested = e; } /** * Construct an exception with associated message * * @param msg the message to report */ public FactoryConfigurationError(java.lang.String msg) { super(msg); } /** * Return the nested exception (if any) * * @return the nested exception or null */ public Exception getException() { return nested; } /** * use the exception chaining mechanism of JDK1.4 */ @Override public Throwable getCause() { return nested; } /** * Report the message associated with this error * * @return the string value of the message */ public String getMessage() { String msg = super.getMessage(); if(msg != null) return msg; if(nested != null){ msg = nested.getMessage(); if(msg == null) msg = nested.getClass().toString(); } return msg; } }
[ "douguohai@163.com" ]
douguohai@163.com
53db4293698a875933ddd6cf7dfabbc637880545
c173fc0a3d23ffda1a23b87da425036a6b890260
/hrsaas/src/org/paradyne/sql/admin/master/DisciplineModelSql.java
a78e430e4430a638cf9904faec4b20c0d487604d
[ "Apache-2.0" ]
permissive
ThirdIInc/Third-I-Portal
a0e89e6f3140bc5e5d0fe320595d9b02d04d3124
f93f5867ba7a089c36b1fce3672344423412fa6e
refs/heads/master
2021-06-03T05:40:49.544767
2016-08-03T07:27:44
2016-08-03T07:27:44
62,725,738
0
0
null
null
null
null
UTF-8
Java
false
false
932
java
package org.paradyne.sql.admin.master; import org.paradyne.lib.SqlBase; public class DisciplineModelSql extends SqlBase { public String getQuery(int id) { switch(id) { case 1: return " INSERT INTO HRMS_DISCIPLINE (DISCP_ID,DISCP_NAME,DISCP_DESC,DISCP_PARENT_CODE) " +"VALUES((SELECT NVL(MAX(DISCP_ID),0)+1 FROM HRMS_DISCIPLINE ),?,?,?)"; case 2: return " UPDATE HRMS_DISCIPLINE SET DISCP_NAME=?,DISCP_DESC=?,DISCP_PARENT_CODE=? WHERE DISCP_ID=?"; case 3: return " DELETE FROM HRMS_DISCIPLINE WHERE DISCP_ID=?"; case 4: return " SELECT DISCP_ID,DISCP_NAME,DISCP_DESC,DISCP_PARENT_CODE FROM HRMS_DISCIPLINE WHERE DISCP_ID=?"; case 5: return "SELECT * FROM HRMS_DISCIPLINE ORDER BY DISCP_ID"; case 6: return " SELECT DISCP_ID,DISCP_NAME,DISCP_DESC FROM HRMS_DISCIPLINE ORDER BY DISCP_ID"; default : return "Framework could not the query number specified"; } } }
[ "Jigar.V@jigar_vasani.THIRDI.COM" ]
Jigar.V@jigar_vasani.THIRDI.COM
61381c551eafeadab72f6da31720f9fe3182c288
3ccbd1f63741fda8327b24311bbdd1644327bef9
/int-tests/src/test/java/org/jboss/arquillian/integration/persistence/test/cleanup/DataCleanupUsingScriptEventHandlingTest.java
37721343fd6fc68404dc2ec3a97c5281d757bc49
[ "Apache-2.0" ]
permissive
thradec/arquillian-extension-persistence
a0910434abca41d307fcc8179f44aea7f6e63636
338820628fc7b1d1c854e0b4d9ad6007b76e0f61
refs/heads/master
2021-01-16T19:26:57.030068
2012-07-01T18:37:38
2012-07-01T18:37:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,962
java
/* * JBoss, Home of Professional Open Source * Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors * as indicated by the @authors tag. All rights reserved. * See the copyright.txt in the distribution for a * full listing of individual contributors. * * 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 to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.jboss.arquillian.integration.persistence.test.cleanup; import javax.persistence.EntityManager; import javax.persistence.PersistenceContext; import org.jboss.arquillian.container.test.api.Deployment; import org.jboss.arquillian.integration.persistence.example.UserAccount; import org.jboss.arquillian.integration.persistence.testextension.event.annotation.CleanupShouldNotBeTriggered; import org.jboss.arquillian.integration.persistence.testextension.event.annotation.CleanupUsingScriptShouldBeTriggered; import org.jboss.arquillian.junit.Arquillian; import org.jboss.arquillian.persistence.CleanupUsingScript; import org.jboss.arquillian.persistence.ShouldMatchDataSet; import org.jboss.arquillian.persistence.TestExecutionPhase; import org.jboss.arquillian.persistence.Transactional; import org.jboss.shrinkwrap.api.Archive; import org.jboss.shrinkwrap.api.ShrinkWrap; import org.jboss.shrinkwrap.api.asset.EmptyAsset; import org.jboss.shrinkwrap.api.spec.WebArchive; import org.junit.Test; import org.junit.runner.RunWith; /** * * @author <a href="mailto:bartosz.majsak@gmail.com">Bartosz Majsak</a> * */ @RunWith(Arquillian.class) @Transactional public class DataCleanupUsingScriptEventHandlingTest { @Deployment public static Archive<?> createDeploymentPackage() { return ShrinkWrap.create(WebArchive.class, "test.war") .addPackage(UserAccount.class.getPackage()) // required for remote containers in order to run tests with FEST-Asserts .addPackages(true, "org.fest") .addAsWebInfResource(EmptyAsset.INSTANCE, "beans.xml") .addAsResource("test-persistence.xml", "META-INF/persistence.xml"); } @PersistenceContext EntityManager em; @Test @CleanupUsingScript("delete-users.sql") @CleanupShouldNotBeTriggered @CleanupUsingScriptShouldBeTriggered(TestExecutionPhase.AFTER) public void should_cleanup_data_using_custom_sql_script_after_test_when_not_specified() throws Exception { // given UserAccount johnSmith = new UserAccount("John", "Smith", "doovde", "password"); UserAccount clarkKent = new UserAccount("Clark", "Kent", "superman", "LexLuthor"); // when em.persist(johnSmith); em.persist(clarkKent); em.flush(); em.clear(); // then // data cleanup should be called before the test } @Test @CleanupUsingScript(value = "delete-users.sql", phase = TestExecutionPhase.BEFORE) @ShouldMatchDataSet("empty.xml") @CleanupShouldNotBeTriggered @CleanupUsingScriptShouldBeTriggered(TestExecutionPhase.BEFORE) public void should_cleanup_data_using_custom_sql_script_after_test() throws Exception { // given UserAccount johnSmith = new UserAccount("John", "Smith", "doovde", "password"); UserAccount clarkKent = new UserAccount("Clark", "Kent", "superman", "LexLuthor"); // when em.persist(johnSmith); em.persist(clarkKent); em.flush(); em.clear(); // then // data cleanup should be called after the test } }
[ "bartosz.majsak@gmail.com" ]
bartosz.majsak@gmail.com
e66493e093419959aa8bcdded3c9c3d2eb23f153
21e3d5f861e3bb2b7d64aa9c914f300a542235cb
/src/main/java/io/growing/graphql/resolver/DataCenterItemVariablesQueryResolver.java
f7122228555bde821a8c7ec05525351188899365
[ "MIT" ]
permissive
okpiaoxuefeng98/growingio-graphql-javasdk
d274378dad69d971fe14207f74d7a3135959460b
97a75faf337446fa16536a42a3b744f7fc992fb4
refs/heads/master
2023-02-04T15:38:13.627500
2020-12-24T07:25:32
2020-12-24T07:25:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
446
java
package io.growing.graphql.resolver; import io.growing.graphql.model.*; /** * 数据中心的物品模型变量 */ @javax.annotation.Generated( value = "com.kobylynskyi.graphql.codegen.GraphQLCodegen", date = "2020-12-22T15:45:58+0800" ) public interface DataCenterItemVariablesQueryResolver { /** * 数据中心的物品模型变量 */ java.util.List<ItemVariableDto> dataCenterItemVariables() throws Exception; }
[ "dreamylost@outlook.com" ]
dreamylost@outlook.com
410ebe6b0837b9807cea4a4c341a2e107b0eb72a
191af6886feccc70ab8703aee5f10daa3c22dd53
/spring-boot-project/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/sql/init/SqlInitializationAutoConfigurationTests.java
2f2fa43193398f1fe49a7c995cc490ce4d2b1ae0
[ "Apache-2.0" ]
permissive
ajrm2016/spring-boot
197ba271a85d75abd9ce73625260e068d2921dc4
f5b93da90ff3ac4338797319f2cdbd21091a316c
refs/heads/main
2023-05-09T05:23:51.847455
2021-06-08T05:02:58
2021-06-08T05:07:22
374,902,255
1
0
Apache-2.0
2021-06-08T06:15:41
2021-06-08T06:15:40
null
UTF-8
Java
false
false
6,515
java
/* * Copyright 2012-2021 the original author or 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 * * https://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 specific language governing permissions and * limitations under the License. */ package org.springframework.boot.autoconfigure.sql.init; import java.nio.charset.Charset; import java.util.List; import javax.sql.DataSource; import io.r2dbc.spi.ConnectionFactory; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.config.BeanDefinition; import org.springframework.boot.autoconfigure.AutoConfigurations; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.r2dbc.R2dbcAutoConfiguration; import org.springframework.boot.jdbc.init.DataSourceScriptDatabaseInitializer; import org.springframework.boot.r2dbc.init.R2dbcScriptDatabaseInitializer; import org.springframework.boot.sql.init.AbstractScriptDatabaseInitializer; import org.springframework.boot.sql.init.DatabaseInitializationSettings; import org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitialization; import org.springframework.boot.test.context.runner.ApplicationContextRunner; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.core.io.Resource; import static org.assertj.core.api.Assertions.assertThat; /** * Tests for {@link SqlInitializationAutoConfiguration}. * * @author Andy Wilkinson */ public class SqlInitializationAutoConfigurationTests { private ApplicationContextRunner contextRunner = new ApplicationContextRunner() .withConfiguration(AutoConfigurations.of(SqlInitializationAutoConfiguration.class)).withPropertyValues( "spring.datasource.generate-unique-name:true", "spring.r2dbc.generate-unique-name:true"); @Test void whenNoDataSourceOrConnectionFactoryIsAvailableThenAutoConfigurationBacksOff() { this.contextRunner .run((context) -> assertThat(context).doesNotHaveBean(AbstractScriptDatabaseInitializer.class)); } @Test void whenConnectionFactoryIsAvailableThenR2dbcInitializerIsAutoConfigured() { this.contextRunner.withConfiguration(AutoConfigurations.of(R2dbcAutoConfiguration.class)) .run((context) -> assertThat(context).hasSingleBean(R2dbcScriptDatabaseInitializer.class)); } @Test void whenConnectionFactoryIsAvailableAndInitializationIsDisabledThenInitializerIsNotAutoConfigured() { this.contextRunner.withConfiguration(AutoConfigurations.of(R2dbcAutoConfiguration.class)) .withPropertyValues("spring.sql.init.enabled:false") .run((context) -> assertThat(context).doesNotHaveBean(AbstractScriptDatabaseInitializer.class)); } @Test void whenDataSourceIsAvailableThenDataSourceInitializerIsAutoConfigured() { this.contextRunner.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class)) .run((context) -> assertThat(context).hasSingleBean(DataSourceScriptDatabaseInitializer.class)); } @Test void whenDataSourceIsAvailableAndInitializationIsDisabledThenInitializerIsNotAutoConfigured() { this.contextRunner.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class)) .withPropertyValues("spring.sql.init.enabled:false") .run((context) -> assertThat(context).doesNotHaveBean(AbstractScriptDatabaseInitializer.class)); } @Test void whenDataSourceAndConnectionFactoryAreAvailableThenOnlyR2dbcInitializerIsAutoConfigured() { this.contextRunner.withConfiguration(AutoConfigurations.of(R2dbcAutoConfiguration.class)) .withUserConfiguration(DataSourceAutoConfiguration.class) .run((context) -> assertThat(context).hasSingleBean(ConnectionFactory.class) .hasSingleBean(DataSource.class).hasSingleBean(R2dbcScriptDatabaseInitializer.class) .doesNotHaveBean(DataSourceScriptDatabaseInitializer.class)); } @Test void whenAnInitializerIsDefinedThenInitializerIsNotAutoConfigured() { this.contextRunner.withConfiguration(AutoConfigurations.of(R2dbcAutoConfiguration.class)) .withUserConfiguration(DataSourceAutoConfiguration.class, DatabaseInitializerConfiguration.class) .run((context) -> assertThat(context).hasSingleBean(AbstractScriptDatabaseInitializer.class) .hasBean("customInitializer")); } @Test void whenBeanIsAnnotatedAsDependingOnDatabaseInitializationThenItDependsOnR2dbcScriptDatabaseInitializer() { this.contextRunner.withConfiguration(AutoConfigurations.of(R2dbcAutoConfiguration.class)) .withUserConfiguration(DependsOnInitializedDatabaseConfiguration.class).run((context) -> { BeanDefinition beanDefinition = context.getBeanFactory().getBeanDefinition( "sqlInitializationAutoConfigurationTests.DependsOnInitializedDatabaseConfiguration"); assertThat(beanDefinition.getDependsOn()) .containsExactlyInAnyOrder("r2dbcScriptDatabaseInitializer"); }); } @Test void whenBeanIsAnnotatedAsDependingOnDatabaseInitializationThenItDependsOnDataSourceScriptDatabaseInitializer() { this.contextRunner.withConfiguration(AutoConfigurations.of(DataSourceAutoConfiguration.class)) .withUserConfiguration(DependsOnInitializedDatabaseConfiguration.class).run((context) -> { BeanDefinition beanDefinition = context.getBeanFactory().getBeanDefinition( "sqlInitializationAutoConfigurationTests.DependsOnInitializedDatabaseConfiguration"); assertThat(beanDefinition.getDependsOn()) .containsExactlyInAnyOrder("dataSourceScriptDatabaseInitializer"); }); } @Configuration(proxyBeanMethods = false) static class DatabaseInitializerConfiguration { @Bean AbstractScriptDatabaseInitializer customInitializer() { return new AbstractScriptDatabaseInitializer(new DatabaseInitializationSettings()) { @Override protected void runScripts(List<Resource> resources, boolean continueOnError, String separator, Charset encoding) { // No-op } }; } } @Configuration(proxyBeanMethods = false) @DependsOnDatabaseInitialization static class DependsOnInitializedDatabaseConfiguration { DependsOnInitializedDatabaseConfiguration() { } } }
[ "wilkinsona@vmware.com" ]
wilkinsona@vmware.com
61d2f3ffb2c6eeda903c938111d33a15d595d816
84eb699c2f3817431b8ae0fe3d901e8fb1278b23
/xyz/yooniks/protector/bukkit/wrapper/WrapperPlayServerSpawnEntity.java
340a829b93a373bf918608ca6e39a26deb487631
[]
no_license
RavenLeaks/CasualProtector-v5.0.5.1-src
dfafdc0455447fbd62604490dfb2fa9155d68130
9248c73c09b7e369e463c1da1b3c6f5e9e8471dd
refs/heads/master
2022-10-23T10:38:22.475915
2020-06-09T15:37:39
2020-06-09T15:37:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,802
java
/* * Decompiled with CFR <Could not determine version>. * * Could not load the following classes: * com.comphenix.protocol.PacketType * com.comphenix.protocol.PacketType$Play * com.comphenix.protocol.PacketType$Play$Server * com.comphenix.protocol.ProtocolLibrary * com.comphenix.protocol.events.PacketContainer * com.comphenix.protocol.events.PacketEvent * com.comphenix.protocol.injector.PacketConstructor * com.comphenix.protocol.reflect.StructureModifier * org.bukkit.World * org.bukkit.entity.Entity * org.bukkit.entity.Player */ package xyz.yooniks.protector.bukkit.wrapper; import com.comphenix.protocol.PacketType; import com.comphenix.protocol.ProtocolLibrary; import com.comphenix.protocol.events.PacketContainer; import com.comphenix.protocol.events.PacketEvent; import com.comphenix.protocol.injector.PacketConstructor; import com.comphenix.protocol.reflect.StructureModifier; import java.util.UUID; import org.bukkit.World; import org.bukkit.entity.Entity; import org.bukkit.entity.Player; import xyz.yooniks.protector.bukkit.wrapper.AbstractPacket; public class WrapperPlayServerSpawnEntity extends AbstractPacket { public static final PacketType TYPE = PacketType.Play.Server.SPAWN_ENTITY; private static PacketConstructor entityConstructor; public int getEntityID() { WrapperPlayServerSpawnEntity a; return ((Integer)a.handle.getIntegers().read((int)0)).intValue(); } public void setEntityID(int a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)0, (Object)Integer.valueOf((int)a)); } public void setObjectData(int a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)7, (Object)Integer.valueOf((int)a)); } public int getObjectData() { WrapperPlayServerSpawnEntity a; return ((Integer)a.handle.getIntegers().read((int)7)).intValue(); } public double getOptionalSpeedX() { WrapperPlayServerSpawnEntity a; return (double)((Integer)a.handle.getIntegers().read((int)1)).intValue() / 8000.0; } public Entity getEntity(World a) { WrapperPlayServerSpawnEntity a2; return (Entity)a2.handle.getEntityModifier((World)a).read((int)0); } private static /* synthetic */ PacketContainer fromEntity(Entity a, int a2, int a3) { if (entityConstructor != null) return entityConstructor.createPacket((Object[])new Object[]{a, Integer.valueOf((int)a2), Integer.valueOf((int)a3)}); entityConstructor = ProtocolLibrary.getProtocolManager().createPacketConstructor((PacketType)TYPE, (Object[])new Object[]{a, Integer.valueOf((int)a2), Integer.valueOf((int)a3)}); return entityConstructor.createPacket((Object[])new Object[]{a, Integer.valueOf((int)a2), Integer.valueOf((int)a3)}); } public WrapperPlayServerSpawnEntity() { super((PacketContainer)new PacketContainer((PacketType)TYPE), (PacketType)TYPE); WrapperPlayServerSpawnEntity a; a.handle.getModifier().writeDefaults(); } public void setPitch(float a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)4, (Object)Integer.valueOf((int)((int)(a * 256.0f / 360.0f)))); } public float getPitch() { WrapperPlayServerSpawnEntity a; return (float)((Integer)a.handle.getIntegers().read((int)4)).intValue() * 360.0f / 256.0f; } public void setOptionalSpeedY(double a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)2, (Object)Integer.valueOf((int)((int)(a * 8000.0)))); } public WrapperPlayServerSpawnEntity(Entity a, int a2, int a3) { super((PacketContainer)WrapperPlayServerSpawnEntity.fromEntity((Entity)a, (int)a2, (int)a3), (PacketType)TYPE); WrapperPlayServerSpawnEntity a4; } public double getX() { WrapperPlayServerSpawnEntity a; return ((Double)a.handle.getDoubles().read((int)0)).doubleValue(); } public void setType(int a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)6, (Object)Integer.valueOf((int)a)); } public void setYaw(float a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)5, (Object)Integer.valueOf((int)((int)(a * 256.0f / 360.0f)))); } public Entity getEntity(PacketEvent a) { WrapperPlayServerSpawnEntity a2; return a2.getEntity((World)a.getPlayer().getWorld()); } public double getOptionalSpeedY() { WrapperPlayServerSpawnEntity a; return (double)((Integer)a.handle.getIntegers().read((int)2)).intValue() / 8000.0; } public void setY(double a) { WrapperPlayServerSpawnEntity a2; a2.handle.getDoubles().write((int)1, (Object)Double.valueOf((double)a)); } public double getY() { WrapperPlayServerSpawnEntity a; return ((Double)a.handle.getDoubles().read((int)1)).doubleValue(); } public void setOptionalSpeedZ(double a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)3, (Object)Integer.valueOf((int)((int)(a * 8000.0)))); } public UUID getUniqueId() { WrapperPlayServerSpawnEntity a; return (UUID)a.handle.getUUIDs().read((int)0); } public double getZ() { WrapperPlayServerSpawnEntity a; return ((Double)a.handle.getDoubles().read((int)2)).doubleValue(); } public WrapperPlayServerSpawnEntity(PacketContainer a) { super((PacketContainer)a, (PacketType)TYPE); WrapperPlayServerSpawnEntity a2; } public void setZ(double a) { WrapperPlayServerSpawnEntity a2; a2.handle.getDoubles().write((int)2, (Object)Double.valueOf((double)a)); } public float getYaw() { WrapperPlayServerSpawnEntity a; return (float)((Integer)a.handle.getIntegers().read((int)5)).intValue() * 360.0f / 256.0f; } public void setUniqueId(UUID a) { WrapperPlayServerSpawnEntity a2; a2.handle.getUUIDs().write((int)0, (Object)a); } public void setOptionalSpeedX(double a) { WrapperPlayServerSpawnEntity a2; a2.handle.getIntegers().write((int)1, (Object)Integer.valueOf((int)((int)(a * 8000.0)))); } public int getType() { WrapperPlayServerSpawnEntity a; return ((Integer)a.handle.getIntegers().read((int)6)).intValue(); } public double getOptionalSpeedZ() { WrapperPlayServerSpawnEntity a; return (double)((Integer)a.handle.getIntegers().read((int)3)).intValue() / 8000.0; } public void setX(double a) { WrapperPlayServerSpawnEntity a2; a2.handle.getDoubles().write((int)0, (Object)Double.valueOf((double)a)); } }
[ "emlin2021@gmail.com" ]
emlin2021@gmail.com
4cc2e5154a4ae3426c9d72278e7586fadadb8a94
95e2e2ad7a162b01748d8c98baee0c744df5dc05
/newpmbe.process.diagram/src/newpmbe/process/diagram/edit/parts/EMPDataFlow13EditPart.java
344c589ecbdadff3c84f82f961fec3b159b6b385
[]
no_license
liubc-1706/POMES
3d0f40c2313a32ceaab1c42c4f26654d06fb40b3
37211aa90c54d684b5ff12c7b6464c40038a1b22
refs/heads/master
2021-09-04T20:46:28.636728
2018-01-22T08:34:03
2018-01-22T08:34:03
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,538
java
package newpmbe.process.diagram.edit.parts; import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles; import org.eclipse.gmf.runtime.notation.View; import newpmbe.process.diagram.edit.policies.EMPDataFlow13ItemSemanticEditPolicy; import org.eclipse.draw2d.Connection; import org.eclipse.gmf.runtime.diagram.ui.editparts.ConnectionNodeEditPart; /** * @generated */ public class EMPDataFlow13EditPart extends ConnectionNodeEditPart { /** * @generated */ public static final int VISUAL_ID = 4032; /** * @generated */ public EMPDataFlow13EditPart(View view) { super(view); } /** * @generated */ protected void createDefaultEditPolicies() { super.createDefaultEditPolicies(); installEditPolicy(EditPolicyRoles.SEMANTIC_ROLE, new EMPDataFlow13ItemSemanticEditPolicy()); } /** * Creates figure for this edit part. * * Body of this method does not depend on settings in generation model * so you may safely remove <i>generated</i> tag and modify it. * * @generated */ protected Connection createConnectionFigure() { return new DataFlow(); } /** * @generated */ public class DataFlow extends org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx { /** * @generated */ public DataFlow() { this.setFill(true); this.setFillXOR(false); this.setOutline(true); this.setOutlineXOR(false); this.setLineWidth(1); this.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); this.setForegroundColor(org.eclipse.draw2d.ColorConstants.black); this.setBackgroundColor(org.eclipse.draw2d.ColorConstants.black); setTargetDecoration(createTargetDecoration()); } /** * @generated */ private org.eclipse.draw2d.RotatableDecoration createTargetDecoration() { org.eclipse.draw2d.PolylineDecoration df = new org.eclipse.draw2d.PolylineDecoration(); df.setFill(true); df.setFillXOR(true); df.setOutline(true); df.setOutlineXOR(true); df.setLineWidth(2); df.setLineStyle(org.eclipse.draw2d.Graphics.LINE_SOLID); org.eclipse.draw2d.geometry.PointList pl = new org.eclipse.draw2d.geometry.PointList(); pl.addPoint(getMapMode().DPtoLP(-1), getMapMode().DPtoLP(1)); pl.addPoint(getMapMode().DPtoLP(0), getMapMode().DPtoLP(0)); pl.addPoint(getMapMode().DPtoLP(-1), getMapMode().DPtoLP(-1)); df.setTemplate(pl); df.setScale(getMapMode().DPtoLP(7), getMapMode().DPtoLP(3)); return df; } } }
[ "2397031600@qq.com" ]
2397031600@qq.com
d8b4bcc634fbe7fb3333678f2ddecb8e853b88e6
7dd73504d783c7ebb0c2e51fa98dea2b25c37a11
/eaglercraftx-1.8-main/sources/main/java/net/lax1dude/eaglercraft/v1_8/futures/ListenableFutureTask.java
1464d70de0f2a716a8a8cccd25e9415c0a2fe0aa
[ "LicenseRef-scancode-proprietary-license" ]
permissive
bagel-man/bagel-man.github.io
32813dd7ef0b95045f53718a74ae1319dae8c31e
eaccb6c00aa89c449c56a842052b4e24f15a8869
refs/heads/master
2023-04-05T10:27:26.743162
2023-03-16T04:24:32
2023-03-16T04:24:32
220,102,442
3
21
MIT
2022-12-14T18:44:43
2019-11-06T22:29:24
C++
UTF-8
Java
false
false
1,561
java
package net.lax1dude.eaglercraft.v1_8.futures; import java.util.ArrayList; import java.util.List; import java.util.concurrent.Callable; import java.util.concurrent.Executor; /** * Copyright (c) 2022 LAX1DUDE. All Rights Reserved. * * WITH THE EXCEPTION OF PATCH FILES, MINIFIED JAVASCRIPT, AND ALL FILES * NORMALLY FOUND IN AN UNMODIFIED MINECRAFT RESOURCE PACK, YOU ARE NOT ALLOWED * TO SHARE, DISTRIBUTE, OR REPURPOSE ANY FILE USED BY OR PRODUCED BY THE * SOFTWARE IN THIS REPOSITORY WITHOUT PRIOR PERMISSION FROM THE PROJECT AUTHOR. * * NOT FOR COMMERCIAL OR MALICIOUS USE * * (please read the 'LICENSE' file this repo's root directory for more info) * */ public class ListenableFutureTask<V> extends FutureTask<V> implements ListenableFuture<V> { private final List<Runnable> listeners = new ArrayList(); public ListenableFutureTask(Callable<V> callable) { super(callable); } @Override public void addListener(final Runnable listener, final Executor executor) { listeners.add(new Runnable() { @Override public void run() { executor.execute(listener); // so dumb } }); } protected void done() { for(Runnable r : listeners) { try { r.run(); }catch(Throwable t) { ListenableFuture.futureExceptionLogger.error("Exception caught running future listener!"); ListenableFuture.futureExceptionLogger.error(t); } } listeners.clear(); } public static <V> ListenableFutureTask<V> create(Callable<V> callableToSchedule) { return new ListenableFutureTask(callableToSchedule); } }
[ "tom@blowmage.com" ]
tom@blowmage.com
027d1059ca221f781cb4dcdab4ef90d26e47927e
4d4e5dc7635a3792500e1a7b16c5c94a4ba0b0f2
/bizserver/src/main/java/org/mj/bizserver/mod/game/MJ_weihai_/report/Wordz_MahjongLiangGangDing.java
386b8c8e24be53c1ce3cabc0af088e41f73a4d69
[ "Apache-2.0" ]
permissive
wushanru/whmj.java_server
c022a1789a4b0022fda0f327848c3a48a14a0222
9cb648622541069a4e53d4d7e2db3c7b49fa6685
refs/heads/main
2023-08-22T07:51:58.997978
2021-10-16T07:50:22
2021-10-16T07:50:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,799
java
package org.mj.bizserver.mod.game.MJ_weihai_.report; import com.google.protobuf.GeneratedMessageV3; import org.mj.bizserver.allmsg.MJ_weihai_Protocol; import org.mj.bizserver.mod.game.MJ_weihai_.bizdata.MahjongTileDef; /** * 麻将亮杠腚词条 */ public class Wordz_MahjongLiangGangDing implements IWordz { /** * 第一张牌 */ private final MahjongTileDef _t0; /** * 第二张牌 */ private MahjongTileDef _t1; /** * 类参数构造器 * * @param t0 第一张牌 */ public Wordz_MahjongLiangGangDing(MahjongTileDef t0) { _t0 = t0; } /** * 获取第一张麻将牌 * * @return 第一张麻将牌 */ public MahjongTileDef getT0() { return _t0; } /** * 获取第一张麻将牌整数值 * * @return 第一张麻将牌整数值 */ public int getT0IntVal() { return null == _t0 ? -1 : _t0.getIntVal(); } /** * 获取第二张麻将牌 * * @return 第二张麻将牌 */ public MahjongTileDef getT1() { return _t1; } /** * 获取第一张麻将牌整数值 * * @return 第一张麻将牌整数值 */ public int getT1IntVal() { return null == _t1 ? -1 : _t1.getIntVal(); } /** * 设置第二张牌 * * @param val 枚举对象 */ public void setT1(MahjongTileDef val) { _t1 = val; } @Override public GeneratedMessageV3 buildResultMsg() { return null; } @Override public GeneratedMessageV3 buildBroadcastMsg() { return MJ_weihai_Protocol.MahjongLiangGangDingBroadcast.newBuilder() .setT0(getT0IntVal()) .setT1(getT1IntVal()) .build(); } }
[ "hjj2017@163.com" ]
hjj2017@163.com
5f2e53503219131323e5a2dc38bd2dc0329b2fb3
36dc19d276a54d45f6afe32f0c1fb4d3c99658ff
/recipe-app/src/main/java/zh/learn/spring5/recipeapp/converters/CategoryToCategoryCommand.java
3ecd24f86a230496f78808c4414e2099044d00e5
[]
no_license
dzheleznyakov/Learning-Spring5
3218435024b2d9c3f8ac890b8cba1c7477d9d351
f5ce2be2e8743a2e57653cd815d9c3918b7215f9
refs/heads/master
2022-05-16T09:02:53.683665
2022-05-01T18:29:00
2022-05-01T18:29:00
205,739,388
0
0
null
2021-06-04T03:04:48
2019-09-01T22:27:27
Java
UTF-8
Java
false
false
685
java
package zh.learn.spring5.recipeapp.converters; import org.springframework.core.convert.converter.Converter; import org.springframework.stereotype.Component; import zh.learn.spring5.recipeapp.commands.CategoryCommand; import zh.learn.spring5.recipeapp.domain.Category; @Component public class CategoryToCategoryCommand implements Converter<Category, CategoryCommand> { @Override public CategoryCommand convert(Category category) { if (category == null) return null; CategoryCommand command = new CategoryCommand(); command.setId(category.getId()); command.setDescription(category.getDescription()); return command; } }
[ "zheleznyakov.dmitry@gmail.com" ]
zheleznyakov.dmitry@gmail.com
5dd358e5ac784119f65b24592f9fb1afeff10ec1
57a06be052ecda70148d74c67a519d3b514d70be
/src/com/sun/jna/Callback.java
75d5e8cb69edc3b1fc80fff04ce985a651f9fecf
[]
no_license
cocoy2006/ats_ict
17b4fc0a4cf4a7d83a16b83bd5cd551ea6aaf28e
a0b3067bc2c206c3a4b6044a54c18e3221d66f85
refs/heads/master
2021-08-19T14:10:32.565600
2017-11-26T14:45:53
2017-11-26T14:45:53
112,090,331
1
0
null
null
null
null
UTF-8
Java
false
false
2,354
java
/* Copyright (c) 2007 Timothy Wall, All Rights Reserved * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * <p/> * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package com.sun.jna; import java.util.Arrays; import java.util.Collections; import java.util.List; /** All callback definitions must derive from this interface. Any * derived interfaces must define a single public method (which may not be named * "hashCode", "equals", or "toString"), or one public method named "callback". * You are responsible for deregistering your callback (if necessary) * in its {@link Object#finalize} method. If native code attempts to call * a callback which has been GC'd, you will likely crash the VM. If * there is no method to deregister the callback (e.g. <code>atexit</code> * in the C library), you must ensure that you always keep a live reference * to the callback object.<p> * A callback should generally never throw an exception, since it doesn't * necessarily have an encompassing Java environment to catch it. Any * exceptions thrown will be passed to the default callback exception * handler. */ public interface Callback { interface UncaughtExceptionHandler { /** Method invoked when the given callback throws an uncaught * exception.<p> * Any exception thrown by this method will be ignored. */ void uncaughtException(Callback c, Throwable e); } /** You must this method name if your callback interface has multiple public methods. Typically a callback will have only one such method, in which case any method name may be used, with the exception of those in {@link #FORBIDDEN_NAMES}. */ String METHOD_NAME = "callback"; /** These method names may not be used for a callback method. */ List<String> FORBIDDEN_NAMES = Collections.unmodifiableList( Arrays.asList("hashCode", "equals", "toString")); }
[ "yekk@molab.com" ]
yekk@molab.com
e9c7b955636e5991b444aae6c15f26cf0b9e20fb
4ba132c18d7856f0842efba125dc4067731e65c2
/trade_hosting_apps/trade_hosting_push/server/src/main/java/xueqiao/trade/hosting/push/protocol/trade_hosting_push_protocolConstants.java
d2e65ab7ff9e3c69756b20e3707296a38d853c7a
[]
no_license
feinoah/xueqiao-trade
a65496d7c529084964062dec00fc48903a4356a4
cf4283ab1ae8c7467ec51102dc08194e3e9ffc38
refs/heads/main
2023-04-19T11:42:31.813771
2021-04-25T12:03:56
2021-04-25T12:03:56
null
0
0
null
null
null
null
UTF-8
Java
false
true
1,141
java
/** * Autogenerated by Thrift Compiler (0.9.1) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package xueqiao.trade.hosting.push.protocol; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import org.apache.thrift.async.AsyncMethodCallback; import org.apache.thrift.server.AbstractNonblockingServer.*; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class trade_hosting_push_protocolConstants { public static final String SEQ_ALIGN_TYPE = "#SEQALIGN#"; }
[ "wangli@authine.com" ]
wangli@authine.com
7410781ddab904fc46ae28c5238a3343ee250b6f
0106d23ea81ddd2c46b484fbff833733946050b4
/app/src/main/java/com/xiaobukuaipao/youngmam/utils/TimeUtil.java
6159f3326c84d78c75bb49cb4cc903007b3d6c4f
[]
no_license
wanghaihui/Youngmam
df7c4249cc20765bfc738339630896a1519059fe
64b8ddc1b0b3b791fd9eb32731be4ae147a39db3
refs/heads/master
2021-01-10T01:35:17.707653
2016-02-18T07:54:58
2016-02-18T07:54:58
51,988,276
0
0
null
null
null
null
UTF-8
Java
false
false
2,707
java
package com.xiaobukuaipao.youngmam.utils; import android.content.Context; import com.xiaobukuaipao.youngmam.R; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; /** * Created by xiaobu1 on 15-5-16. */ public class TimeUtil { public final static int TYPE_5MIN = 0; public final static int TYPE_1DAY = 1; public final static int TYPE_2DAY = 2; public final static int TYPE_3DAY = 3; public final static int TYPE_1WEEK = 4; public final static int TYPE_OTHER = 5; // 1秒=1000毫秒 private static long sec = 1000; private static long min = sec * 60; private static long hour = min * 60; private static long day = hour * 24; /** * 计算时间间隔 * @param time */ public static String handleTime(Context context, long time) { // 获得系统当前的时间 long currentTimeMillis = System.currentTimeMillis(); SimpleDateFormat dateFormat = new SimpleDateFormat(); Calendar calendar = dateFormat.getCalendar(); calendar.setTime(new Date(currentTimeMillis)); calendar.set(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH), 0, 0, 0); long timeInMillis = calendar.getTimeInMillis(); if (time > currentTimeMillis - 5 * min) { // 5 minute dateFormat.applyPattern(context.getResources().getString(R.string.time_interval_five_mins)); } else if (time > timeInMillis) { // today dateFormat.applyPattern(context.getResources().getString(R.string.time_interval_today)); } else if (time > timeInMillis - day) { // yesterday dateFormat.applyPattern(context.getResources().getString(R.string.time_interval_yesterday)); } else if (time > timeInMillis - 2 * day) { // one more day dateFormat.applyPattern(context.getResources().getString(R.string.time_interval_one_more_day)); } else if (time > timeInMillis - 6 * day) { // one week dateFormat.applyPattern(context.getResources().getString(R.string.time_interval_one_week)); } else { // out of one week dateFormat.applyPattern(context.getResources().getString(R.string.time_interval_out_one_week)); } String format = dateFormat.format(new Date(time)); return format; } public static String dtFormat(Date date, String dateFormat){ return getFormat(dateFormat).format(date); } private static final DateFormat getFormat(String format) { return new SimpleDateFormat(format); } }
[ "465495722@qq.com" ]
465495722@qq.com
d940956e5653ceb29b24a42aeb8a9e8697bc8f37
a8a57531e0d18ead4dbb54f444d049e9803a3280
/API/src/main/java/me/matamor/generalapi/api/storage/database/queries/builder/QueryLoader.java
001c66a940483d6664dfb6095c1e5f0fed317841
[]
no_license
MaTaMoR/GeneralAPI
225bbb96c9d4e8190cee3a7b268f528af2ecccfa
07ce263da6f71119362212b4330a87c7f09975a3
refs/heads/master
2023-05-02T22:20:01.480168
2021-05-21T14:45:16
2021-05-21T14:45:16
369,565,207
0
0
null
null
null
null
UTF-8
Java
false
false
268
java
package me.matamor.generalapi.api.storage.database.queries.builder; import me.matamor.minesoundapi.storage.database.DatabaseException; import java.sql.ResultSet; public interface QueryLoader<T> { T deserialize(ResultSet resultSet) throws DatabaseException; }
[ "matamor98@hotmail.com" ]
matamor98@hotmail.com
0f4b9225b08dc6456171e75ba86bd9f3e602943a
6045518db77c6104b4f081381f61c26e0d19d5db
/datasets/file_version_per_commit_backup/apache-jmeter/714b3d354cd43d4b82f192df4f9ba3d301161ed0.java
b75d11979bb58e4eacb1d0706f9199f5e1005ba9
[]
no_license
edisutoyo/msr16_td_removal
6e039da7fed166b81ede9b33dcc26ca49ba9259c
41b07293c134496ba1072837e1411e05ed43eb75
refs/heads/master
2023-03-22T21:40:42.993910
2017-09-22T09:19:51
2017-09-22T09:19:51
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,136
java
package org.apache.jmeter.reporters; import java.io.File; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; import java.io.Serializable; import org.apache.jmeter.samplers.Clearable; import org.apache.jmeter.samplers.SampleEvent; import org.apache.jmeter.samplers.SampleListener; import org.apache.jmeter.samplers.SampleResult; import org.apache.jmeter.testelement.AbstractTestElement; import org.apache.jorphan.logging.LoggingManager; import org.apache.log.Logger; /** * Save Result responseData to a set of files * TODO - perhaps save other items such as headers? * * This is mainly intended for validation tests * * @author sebb AT apache DOT org * @version $Revision$ Last updated: $Date$ */ public class ResultSaver extends AbstractTestElement implements Serializable, SampleListener, Clearable { private static final Logger log = LoggingManager.getLoggerForClass(); // File name sequence number private static long sequenceNumber = 0; public static final String FILENAME = "FileSaver.filename"; private static synchronized long nextNumber(){ return ++sequenceNumber; } /* * Constructor is initially called once for each occurrence in the test plan * For GUI, several more instances are created * Then clear is called at start of test * Called several times during test startup * The name will not necessarily have been set at this point. */ public ResultSaver(){ super(); //log.debug(Thread.currentThread().getName()); //System.out.println(">> "+me+" "+this.getName()+" "+Thread.currentThread().getName()); } /* * Constructor for use during startup * (intended for non-GUI use) * @param name of summariser */ public ResultSaver(String name){ this(); setName(name); } /* * This is called once for each occurrence in the test plan, before the start of the test. * The super.clear() method clears the name (and all other properties), * so it is called last. */ public void clear() { //System.out.println("-- "+me+this.getName()+" "+Thread.currentThread().getName()); super.clear(); sequenceNumber=0; //TODO is this the right thing to do? } /** * Saves the sample result (and any sub results) in files * * @see org.apache.jmeter.samplers.SampleListener#sampleOccurred(org.apache.jmeter.samplers.SampleEvent) */ public void sampleOccurred(SampleEvent e) { SampleResult s = e.getResult(); saveSample(s); SampleResult []sr = s.getSubResults(); if (sr != null){ for (int i = 0; i < sr.length; i++){ saveSample(sr[i]); } } } /** * @param s SampleResult to save */ private void saveSample(SampleResult s) { nextNumber(); String fileName=makeFileName(s.getContentType()); log.debug("Saving "+s.getSampleLabel()+" in "+fileName); //System.out.println(fileName); File out = new File(fileName); FileOutputStream pw=null; try { pw = new FileOutputStream(out); pw.write(s.getResponseData()); pw.close(); } catch (FileNotFoundException e1) { log.error("Error creating sample file for "+s.getSampleLabel(),e1); } catch (IOException e1) { log.error("Error saving sample "+s.getSampleLabel(),e1); } } /** * @return fileName composed of fixed prefix, a number, * and a suffix derived from the contentType */ private String makeFileName(String contentType) { String suffix; int i = contentType.indexOf("/"); if (i == -1){ suffix="unknown"; } else { suffix=contentType.substring(i+1); } return getFilename()+sequenceNumber+"."+suffix; } /* (non-Javadoc) * @see org.apache.jmeter.samplers.SampleListener#sampleStarted(org.apache.jmeter.samplers.SampleEvent) */ public void sampleStarted(SampleEvent e) { // not used } /* (non-Javadoc) * @see org.apache.jmeter.samplers.SampleListener#sampleStopped(org.apache.jmeter.samplers.SampleEvent) */ public void sampleStopped(SampleEvent e) { // not used } private String getFilename() { return getPropertyAsString(FILENAME); } }
[ "everton.maldonado@gmail.com" ]
everton.maldonado@gmail.com
e1eae1105005302226de833ef562171be4378cba
ed5159d056e98d6715357d0d14a9b3f20b764f89
/test/irvine/oeis/a155/A155889Test.java
227279dd82ccedb801cd586b896cbd4809cbb642
[]
no_license
flywind2/joeis
c5753169cf562939b04dd246f8a2958e97f74558
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
refs/heads/master
2020-09-13T18:34:35.080552
2019-11-19T05:40:55
2019-11-19T05:40:55
null
0
0
null
null
null
null
UTF-8
Java
false
false
195
java
package irvine.oeis.a155; import irvine.oeis.AbstractSequenceTest; /** * Tests the corresponding class. * @author Sean A. Irvine */ public class A155889Test extends AbstractSequenceTest { }
[ "sairvin@gmail.com" ]
sairvin@gmail.com
dfc8a5edbd903dd6c094d06254b33f93fa70d40e
2f45b99b684f62b2e9413a302a22a7677c22580c
/packages/apps/Camera/src/com/android/camera/ui/InLineSettingRestore.java
b54ef9d746bbde92685eea67787005270abfd1d5
[ "Apache-2.0" ]
permissive
b2gdev/Android-JB-4.1.2
05e15a4668781cd9c9f63a1fa96bf08d9bdf91de
e66aea986bbf29ff70e5ec4440504ca24f8104e1
refs/heads/user
2020-04-06T05:44:17.217452
2018-04-13T15:43:57
2018-04-13T15:43:57
35,256,753
3
12
null
2020-03-09T00:08:24
2015-05-08T03:32:21
null
UTF-8
Java
false
false
1,313
java
/* * Copyright (C) 2011 The Android Open Source Project * * 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 to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.android.camera.ui; import android.content.Context; import android.util.AttributeSet; import android.widget.TextView; import com.android.camera.ListPreference; import com.android.camera.R; /* A restore setting is simply showing the restore title. */ public class InLineSettingRestore extends InLineSettingItem { public InLineSettingRestore(Context context, AttributeSet attrs) { super(context, attrs); } @Override protected void setTitle(ListPreference preference) { ((TextView) findViewById(R.id.title)).setText( getContext().getString(R.string.pref_restore_detail)); } @Override protected void updateView() { } }
[ "ruvindad@zone24x7.com" ]
ruvindad@zone24x7.com
9450297d67367344ad00e853c10e60753dc39dd6
3e519985adc42b000f3888b9ba00e59bfe6ccee9
/mall_market/src/main/java/uitl/MarketingValue.java
365c257207c117b7953b43ba1439ee252a790899
[]
no_license
zhenchai/mall
8475077cf7a5fe5208510a3408502143667e9f17
c6fa070691bd62c53dbaa0b467bcb389bc66a373
refs/heads/master
2020-04-13T10:10:49.514859
2018-11-18T10:45:42
2018-11-18T10:45:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
362
java
/* * Copyright 2013 NINGPAI, Inc.All rights reserved. * NINGPAI PROPRIETARY / CONFIDENTIAL.USE is subject to licence terms. */ package uitl; /** * Value * @author ggn * */ public final class MarketingValue { public static final String FULLPRICE="fullPrice"; /** * 构造 */ private MarketingValue() { super(); } }
[ "wdpxl@sina.com" ]
wdpxl@sina.com
2e1194ccd4c4edfba576c66dfcf302c2cc44f6cd
b06be5f65040a9081567a9ce1221082a50e7d475
/src/main/java/com/fairyhawk/service/impl/user/GroupServiceImpl.java
cb91db2d9909809f6cc0546626b90389b98efd08
[]
no_license
lixuwei/opencore
e95f91a65be398868ddb50014b9e459d32a1436f
f3475228130647ed7dbb67c66e40df354e68d4c6
refs/heads/master
2021-01-10T18:58:45.843070
2013-03-18T10:05:08
2013-03-18T10:05:08
8,982,342
1
0
null
null
null
null
UTF-8
Java
false
false
4,696
java
package com.fairyhawk.service.impl.user; import java.util.ArrayList; import java.util.List; import com.fairyhawk.dao.user.GroupDao; import com.fairyhawk.dao.user.UserDao; import com.fairyhawk.entity.user.Group; import com.fairyhawk.service.user.GroupService; /** * @ClassName GroupServiceImpl * @package com.fairyhawk.service.impl.user * @description * @author liuqinggang * @Create Date: 2013-3-5 上午10:43:31 * */ public class GroupServiceImpl implements GroupService { private GroupDao groupDao; private UserDao userDao; /** 根据id查询Group */ public Group getGroupById(int id) { return groupDao.getGroupById(id); } /** 根据parentId查询Group */ public List<Group> getChildGroupById(int parentId) { return groupDao.getChildGroupById(parentId); } /** 根据所有的Group */ public List<Group> getGroupList() { return groupDao.getGroupList(); } /** 删除group根据id */ public void deleteGroupById(int id) { groupDao.deleteGroupById(id); } /** 删除多个groupIds,以逗号间隔参数 */ public void deleteGroups(String groupIds) { if (groupIds == null || "".equals(groupIds.trim())) { return; } groupIds = groupIds.replaceAll(" ", ""); String[] groupIdsArray = groupIds.split(","); for (int i = 0; i < groupIdsArray.length; i++) { Group group = groupDao.getGroupById(Integer.valueOf(groupIdsArray[i])); group.setStatus(Group.GROUP_DELETE_STATUS); // 更新状态为删除 groupDao.updateGroup(group); // 删除用户。(用户的组为2级或者3级。添加用户时限定了) List<Integer> userGroups = new ArrayList<Integer>();// 存储要删除的用户的组 if (group.getLevel() == 1) { // 删除2级 List<Group> childGroups_second = groupDao.getChildGroupById(group .getGroupId()); if (childGroups_second != null && childGroups_second.size() > 0) { for (Group group2 : childGroups_second) { group2.setStatus(Group.GROUP_DELETE_STATUS); groupDao.updateGroup(group2); userGroups.add(group2.getGroupId()); // 删除3级 List<Group> childGroups_third = groupDao.getChildGroupById(group2 .getGroupId()); if (childGroups_third != null && childGroups_third.size() > 0) { for (Group group3 : childGroups_third) { group3.setStatus(Group.GROUP_DELETE_STATUS); groupDao.updateGroup(group3); userGroups.add(group3.getGroupId()); } } // 删除3级 } } // 删除2级 } else if (group.getLevel() == 2) { userGroups.add(group.getGroupId()); // 删除3级 List<Group> childGroups_third = groupDao.getChildGroupById(group .getGroupId()); if (childGroups_third != null && childGroups_third.size() > 0) { for (Group group3 : childGroups_third) { group3.setStatus(Group.GROUP_DELETE_STATUS); groupDao.updateGroup(group3); userGroups.add(group3.getGroupId()); } } // 删除3级 } else if (group.getLevel() == 3) { userGroups.add(group.getGroupId()); } userDao.updateUserStatusByGroupId(userGroups); } } /** 根据组级别查询 */ public List<Group> getGroupByLevel(int level) { return groupDao.getGroupByLevel(level); } /** 添加组 */ public void addGroup(Group group) { groupDao.addGroup(group); } /** 修改组 */ public void updateGroup(Group group) { groupDao.updateGroup(group); } public GroupDao getGroupDao() { return groupDao; } public void setGroupDao(GroupDao groupDao) { this.groupDao = groupDao; } public UserDao getUserDao() { return userDao; } public void setUserDao(UserDao userDao) { this.userDao = userDao; } }
[ "bis@foxmail.com" ]
bis@foxmail.com
80c482089141fbcf3b8978d65ab2f627c21887b1
e45bdfe09f5abddcccbcbf44ca532729c6480123
/IDEA2020.1.1/springboot-study/springboot0/src/main/java/com/wang/MySpringBootApplication.java
7245e68b51080adf4248b3fadec3e6c58ea45e6f
[]
no_license
18222137497/Learning-path
71417330650c326637290cbbb9c77375a284b94f
12a415ffce3ba8528666792ad99b8c9e6f9d107f
refs/heads/master
2023-03-12T06:37:09.380592
2021-02-23T10:18:32
2021-02-23T10:18:32
303,752,409
0
0
null
null
null
null
UTF-8
Java
false
false
515
java
package com.wang; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; @SpringBootApplication//声明该类是一个springboot 的引导类 public class MySpringBootApplication { public static void main(String[] args) {//借助main启动程序。main是java程序的入口 //run方法,表示运行springboot的引导类,参数就是引导类的字节码文件 SpringApplication.run(MySpringBootApplication.class); } }
[ "67040612+18222137497@users.noreply.github.com" ]
67040612+18222137497@users.noreply.github.com
cfb44abb7f7aedcdbebe314107686c8fb3b1e28b
15b260ccada93e20bb696ae19b14ec62e78ed023
/v2/src/main/java/com/alipay/api/request/KoubeiMarketingCampaignRetailDmCreateRequest.java
2ca027094d898311f9a19d6ffcd5ac1065f90770
[ "Apache-2.0" ]
permissive
alipay/alipay-sdk-java-all
df461d00ead2be06d834c37ab1befa110736b5ab
8cd1750da98ce62dbc931ed437f6101684fbb66a
refs/heads/master
2023-08-27T03:59:06.566567
2023-08-22T14:54:57
2023-08-22T14:54:57
132,569,986
470
207
Apache-2.0
2022-12-25T07:37:40
2018-05-08T07:19:22
Java
UTF-8
Java
false
false
3,076
java
package com.alipay.api.request; import com.alipay.api.domain.KoubeiMarketingCampaignRetailDmCreateModel; import java.util.Map; import com.alipay.api.AlipayRequest; import com.alipay.api.internal.util.AlipayHashMap; import com.alipay.api.response.KoubeiMarketingCampaignRetailDmCreateResponse; import com.alipay.api.AlipayObject; /** * ALIPAY API: koubei.marketing.campaign.retail.dm.create request * * @author auto create * @since 1.0, 2022-06-02 11:14:36 */ public class KoubeiMarketingCampaignRetailDmCreateRequest implements AlipayRequest<KoubeiMarketingCampaignRetailDmCreateResponse> { private AlipayHashMap udfParams; // add user-defined text parameters private String apiVersion="1.0"; /** * 快消店铺展位内容创建接口 */ private String bizContent; public void setBizContent(String bizContent) { this.bizContent = bizContent; } public String getBizContent() { return this.bizContent; } private String terminalType; private String terminalInfo; private String prodCode; private String notifyUrl; private String returnUrl; private boolean needEncrypt=false; private AlipayObject bizModel=null; public String getNotifyUrl() { return this.notifyUrl; } public void setNotifyUrl(String notifyUrl) { this.notifyUrl = notifyUrl; } public String getReturnUrl() { return this.returnUrl; } public void setReturnUrl(String returnUrl) { this.returnUrl = returnUrl; } public String getApiVersion() { return this.apiVersion; } public void setApiVersion(String apiVersion) { this.apiVersion = apiVersion; } public void setTerminalType(String terminalType){ this.terminalType=terminalType; } public String getTerminalType(){ return this.terminalType; } public void setTerminalInfo(String terminalInfo){ this.terminalInfo=terminalInfo; } public String getTerminalInfo(){ return this.terminalInfo; } public void setProdCode(String prodCode) { this.prodCode=prodCode; } public String getProdCode() { return this.prodCode; } public String getApiMethodName() { return "koubei.marketing.campaign.retail.dm.create"; } public Map<String, String> getTextParams() { AlipayHashMap txtParams = new AlipayHashMap(); txtParams.put("biz_content", this.bizContent); if(udfParams != null) { txtParams.putAll(this.udfParams); } return txtParams; } public void putOtherTextParam(String key, String value) { if(this.udfParams == null) { this.udfParams = new AlipayHashMap(); } this.udfParams.put(key, value); } public Class<KoubeiMarketingCampaignRetailDmCreateResponse> getResponseClass() { return KoubeiMarketingCampaignRetailDmCreateResponse.class; } public boolean isNeedEncrypt() { return this.needEncrypt; } public void setNeedEncrypt(boolean needEncrypt) { this.needEncrypt=needEncrypt; } public AlipayObject getBizModel() { return this.bizModel; } public void setBizModel(AlipayObject bizModel) { this.bizModel=bizModel; } }
[ "auto-publish" ]
auto-publish
e1bf3126e9ea75d64c51294447881f70234dd058
4c94c93fbea24d16748ff9ff7b5d193bf2bd8fd5
/src/com/Lbins/VegetableHm/dao/dao/DaoSession.java
11c591822355704240d7b843a3088249835ea611
[]
no_license
eryiyi/VegetableHm
95748939bf909cd912081c29560976baba9b69c6
8092e18b296b257c1175fc8712ec47015e76eb3c
refs/heads/master
2021-01-19T07:09:49.941148
2017-04-07T09:22:51
2017-04-07T09:22:51
87,528,700
0
0
null
null
null
null
UTF-8
Java
false
false
1,778
java
package com.Lbins.VegetableHm.dao.dao; import android.database.sqlite.SQLiteDatabase; import com.Lbins.VegetableHm.dao.RecordMsg; import com.Lbins.VegetableHm.dao.ShoppingCart; import de.greenrobot.dao.AbstractDao; import de.greenrobot.dao.AbstractDaoSession; import de.greenrobot.dao.identityscope.IdentityScopeType; import de.greenrobot.dao.internal.DaoConfig; import java.util.Map; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * {@inheritDoc} * * @see de.greenrobot.dao.AbstractDaoSession */ public class DaoSession extends AbstractDaoSession { private final DaoConfig shoppingCartDaoConfig; private final DaoConfig recordMsgDaoConfig; private final ShoppingCartDao shoppingCartDao; private final RecordMsgDao recordMsgDao; public DaoSession(SQLiteDatabase db, IdentityScopeType type, Map<Class<? extends AbstractDao<?, ?>>, DaoConfig> daoConfigMap) { super(db); shoppingCartDaoConfig = daoConfigMap.get(ShoppingCartDao.class).clone(); shoppingCartDaoConfig.initIdentityScope(type); recordMsgDaoConfig = daoConfigMap.get(RecordMsgDao.class).clone(); recordMsgDaoConfig.initIdentityScope(type); shoppingCartDao = new ShoppingCartDao(shoppingCartDaoConfig, this); recordMsgDao = new RecordMsgDao(recordMsgDaoConfig, this); registerDao(ShoppingCart.class, shoppingCartDao); registerDao(RecordMsg.class, recordMsgDao); } public void clear() { shoppingCartDaoConfig.getIdentityScope().clear(); recordMsgDaoConfig.getIdentityScope().clear(); } public ShoppingCartDao getShoppingCartDao() { return shoppingCartDao; } public RecordMsgDao getRecordMsgDao() { return recordMsgDao; } }
[ "826321978@qq.com" ]
826321978@qq.com
888e373aa2a206f2a58d712a32e9958f07724c86
388acb222aa683dbeaec49fafe1d63cf942fb004
/sbes/src/sbes/ast/ExpectedStateVisitor.java
9db9ce2ef0e8fd8f04ebb689a4c0a8f220bf5679
[]
no_license
andreamattavelli/sbes
ffc3bbeef210c1ddb620f9630355127f69db88b3
2ab8a31c0bec909ce614bcb438248a8a75073039
refs/heads/master
2021-03-27T19:06:14.964145
2016-07-11T22:12:22
2017-11-11T16:57:28
62,493,534
0
0
null
null
null
null
UTF-8
Java
false
false
2,943
java
package sbes.ast; import japa.parser.ASTHelper; import japa.parser.ast.body.VariableDeclarator; import japa.parser.ast.expr.ArrayAccessExpr; import japa.parser.ast.expr.AssignExpr; import japa.parser.ast.expr.AssignExpr.Operator; import japa.parser.ast.expr.Expression; import japa.parser.ast.expr.MethodCallExpr; import japa.parser.ast.expr.ObjectCreationExpr; import japa.parser.ast.expr.VariableDeclarationExpr; import japa.parser.ast.stmt.ExpressionStmt; import japa.parser.ast.visitor.CloneVisitor; import japa.parser.ast.visitor.VoidVisitorAdapter; import sbes.stub.generator.first.FirstStageGeneratorStub; public class ExpectedStateVisitor extends VoidVisitorAdapter<String> { private int index; private String objName; private ExpressionStmt actualState; public ExpectedStateVisitor(final int index, final String objName) { this.index = index; this.objName = objName; } public ExpressionStmt getActualState() { return actualState; } @Override public void visit(final VariableDeclarationExpr n, final String concreteClassName) { if (n.getType().toString().equals(concreteClassName)) { VariableDeclarator vd = n.getVars().get(0); if (vd.getId().getName().equals(objName)) { if (vd.getInit() instanceof ObjectCreationExpr) { // create actual state on the base of the expected one actualState = createActualState(n); // found class constructor, switch to EXPECTED_STATES Expression target = new ArrayAccessExpr(ASTHelper.createNameExpr(FirstStageGeneratorStub.EXPECTED_STATE), ASTHelper.createNameExpr(Integer.toString(index))); AssignExpr ae = new AssignExpr(target, vd.getInit(), Operator.assign); ExpressionStmt estmt = (ExpressionStmt) n.getParentNode(); estmt.setExpression(ae); } else if (vd.getInit() instanceof MethodCallExpr) { // create actual state on the base of the expected one actualState = createActualState(n); // found class constructor, switch to EXPECTED_STATES Expression target = new ArrayAccessExpr(ASTHelper.createNameExpr(FirstStageGeneratorStub.EXPECTED_STATE), ASTHelper.createNameExpr(Integer.toString(index))); AssignExpr ae = new AssignExpr(target, vd.getInit(), Operator.assign); ExpressionStmt estmt = (ExpressionStmt) n.getParentNode(); estmt.setExpression(ae); } } } super.visit(n, concreteClassName); } private ExpressionStmt createActualState(final VariableDeclarationExpr arg0) { CloneVisitor cv = new CloneVisitor(); VariableDeclarationExpr actual = (VariableDeclarationExpr) cv.visit(arg0, null); Expression target = new ArrayAccessExpr(ASTHelper.createNameExpr(FirstStageGeneratorStub.ACTUAL_STATE), ASTHelper.createNameExpr(Integer.toString(index))); AssignExpr ae = new AssignExpr(target, actual.getVars().get(0).getInit(), Operator.assign); ExpressionStmt estmt = new ExpressionStmt(ae); return estmt; } }
[ "andreamattavelli@gmail.com" ]
andreamattavelli@gmail.com
d14676c38d942db9aebce93fde43adfb1e012bd3
6552244c7ef44150ea74cef7ec801d5a9f7171e9
/app/src/main/java/com/google/android/gms/auth/firstparty/proximity/data/PermitAccess.java
efeb2c767cf627b9bd9c9e501f8c59b33ca9fc5b
[]
no_license
amithbm/cbskeep
c9469156efd307fb474d817760a0b426af8f7c5c
a800f00ab617cba49d1a1bea1f0282c0cde525e7
refs/heads/master
2016-09-06T12:42:33.824977
2015-08-24T15:33:50
2015-08-24T15:33:50
41,311,235
0
0
null
null
null
null
UTF-8
Java
false
false
1,560
java
package com.google.android.gms.auth.firstparty.proximity.data; import android.os.Parcel; import android.text.TextUtils; import com.google.android.gms.common.internal.safeparcel.SafeParcelable; import com.google.android.gms.common.internal.zzv; import java.util.Arrays; public class PermitAccess implements SafeParcelable { public static final zzc CREATOR = new zzc(); final byte[] mData; final int mVersion; final String zzEK; final String zzLf; PermitAccess(int paramInt, String paramString1, String paramString2, byte[] paramArrayOfByte) { mVersion = paramInt; zzLf = zzv.zzce(paramString1); zzEK = zzv.zzce(paramString2); mData = ((byte[])zzv.zzz(paramArrayOfByte)); } public int describeContents() { return 0; } public boolean equals(Object paramObject) { boolean bool = true; if (paramObject == null); do { return false; if (paramObject == this) return true; } while (!(paramObject instanceof PermitAccess)); paramObject = (PermitAccess)paramObject; if ((TextUtils.equals(zzLf, paramObject.zzLf)) && (TextUtils.equals(zzEK, paramObject.zzEK)) && (Arrays.equals(mData, paramObject.mData))); while (true) { return bool; bool = false; } } public String getId() { return zzLf; } public int hashCode() { return 31 * ((zzLf.hashCode() + 527) * 31 + zzEK.hashCode()) + Arrays.hashCode(mData); } public void writeToParcel(Parcel paramParcel, int paramInt) { zzc.zza(this, paramParcel, paramInt); } }
[ "amithbm@gmail.com" ]
amithbm@gmail.com
082b2eb0a94213e1d9f73839e91b38243e7e63a0
2f45179c4a42fa40c8d9dc4f93a35f66b579734d
/app/src/main/java/com/zjwy/tiaobaojinew/bean/BrandBean.java
c44631c189392aad845db7ed6af64f542090bf7e
[]
no_license
gaoruishan/DiaoBaoJi-App
24d89771434106b0632b093d0ad0b2ad11957717
633aea302c39aa1b73e6267e920c0b30d79c350b
refs/heads/master
2020-04-10T14:54:35.281656
2015-08-24T01:55:58
2015-08-24T01:55:58
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,738
java
package com.zjwy.tiaobaojinew.bean; public class BrandBean { private String id; private String name; private String name_chinese; private String code; private String thumb; private String country; private String decade_start; private String picture_story; private String listorder; private String description; private String num; public String getId() { return id; } public void setId(String id) { this.id = id; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getName_chinese() { return name_chinese; } public void setName_chinese(String name_chinese) { this.name_chinese = name_chinese; } public String getCode() { return code; } public void setCode(String code) { this.code = code; } public String getThumb() { return thumb; } public void setThumb(String thumb) { this.thumb = thumb; } public String getCountry() { return country; } public void setCountry(String country) { this.country = country; } public String getDecade_start() { return decade_start; } public void setDecade_start(String decade_start) { this.decade_start = decade_start; } public String getPicture_story() { return picture_story; } public void setPicture_story(String picture_story) { this.picture_story = picture_story; } public String getListorder() { return listorder; } public void setListorder(String listorder) { this.listorder = listorder; } public String getDescription() { return description; } public void setDescription(String description) { this.description = description; } public String getNum() { return num; } public void setNum(String num) { this.num = num; } }
[ "grs0515@163.com" ]
grs0515@163.com
3e2b23eb7826d8d7b5ee2e342c9bf81f9a36de9b
dabef9224b341ec375f87ea267da29278627fe6f
/src/main/java/com/ddastudio/fishing/jooq/tables/records/UsedRefreshTokenRecord.java
e8a84308f2d63107f51e19015cf2d129d69ea197
[]
no_license
messi1913/fishing
376fb277f09ab01c4b131ba69962b1f1d35dc90c
f4ca8c32f732894216338c24cea37d48b588fff3
refs/heads/master
2020-06-09T21:41:33.488799
2019-07-07T05:47:53
2019-07-07T05:47:53
193,511,344
1
0
null
null
null
null
UTF-8
Java
false
true
5,252
java
/* * This file is generated by jOOQ. */ package com.ddastudio.fishing.jooq.tables.records; import com.ddastudio.fishing.jooq.tables.UsedRefreshToken; import java.time.LocalDateTime; import javax.annotation.Generated; import org.jooq.Field; import org.jooq.Record1; import org.jooq.Record3; import org.jooq.Row3; import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ @Generated( value = { "http://www.jooq.org", "jOOQ version:3.11.11" }, comments = "This class is generated by jOOQ" ) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class UsedRefreshTokenRecord extends UpdatableRecordImpl<UsedRefreshTokenRecord> implements Record3<String, LocalDateTime, String> { private static final long serialVersionUID = 660150521; /** * Setter for <code>fishing_reservation.used_refresh_token.token</code>. */ public void setToken(String value) { set(0, value); } /** * Getter for <code>fishing_reservation.used_refresh_token.token</code>. */ public String getToken() { return (String) get(0); } /** * Setter for <code>fishing_reservation.used_refresh_token.created</code>. */ public void setCreated(LocalDateTime value) { set(1, value); } /** * Getter for <code>fishing_reservation.used_refresh_token.created</code>. */ public LocalDateTime getCreated() { return (LocalDateTime) get(1); } /** * Setter for <code>fishing_reservation.used_refresh_token.client_id</code>. */ public void setClientId(String value) { set(2, value); } /** * Getter for <code>fishing_reservation.used_refresh_token.client_id</code>. */ public String getClientId() { return (String) get(2); } // ------------------------------------------------------------------------- // Primary key information // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public Record1<String> key() { return (Record1) super.key(); } // ------------------------------------------------------------------------- // Record3 type implementation // ------------------------------------------------------------------------- /** * {@inheritDoc} */ @Override public Row3<String, LocalDateTime, String> fieldsRow() { return (Row3) super.fieldsRow(); } /** * {@inheritDoc} */ @Override public Row3<String, LocalDateTime, String> valuesRow() { return (Row3) super.valuesRow(); } /** * {@inheritDoc} */ @Override public Field<String> field1() { return UsedRefreshToken.USED_REFRESH_TOKEN.TOKEN; } /** * {@inheritDoc} */ @Override public Field<LocalDateTime> field2() { return UsedRefreshToken.USED_REFRESH_TOKEN.CREATED; } /** * {@inheritDoc} */ @Override public Field<String> field3() { return UsedRefreshToken.USED_REFRESH_TOKEN.CLIENT_ID; } /** * {@inheritDoc} */ @Override public String component1() { return getToken(); } /** * {@inheritDoc} */ @Override public LocalDateTime component2() { return getCreated(); } /** * {@inheritDoc} */ @Override public String component3() { return getClientId(); } /** * {@inheritDoc} */ @Override public String value1() { return getToken(); } /** * {@inheritDoc} */ @Override public LocalDateTime value2() { return getCreated(); } /** * {@inheritDoc} */ @Override public String value3() { return getClientId(); } /** * {@inheritDoc} */ @Override public UsedRefreshTokenRecord value1(String value) { setToken(value); return this; } /** * {@inheritDoc} */ @Override public UsedRefreshTokenRecord value2(LocalDateTime value) { setCreated(value); return this; } /** * {@inheritDoc} */ @Override public UsedRefreshTokenRecord value3(String value) { setClientId(value); return this; } /** * {@inheritDoc} */ @Override public UsedRefreshTokenRecord values(String value1, LocalDateTime value2, String value3) { value1(value1); value2(value2); value3(value3); return this; } // ------------------------------------------------------------------------- // Constructors // ------------------------------------------------------------------------- /** * Create a detached UsedRefreshTokenRecord */ public UsedRefreshTokenRecord() { super(UsedRefreshToken.USED_REFRESH_TOKEN); } /** * Create a detached, initialised UsedRefreshTokenRecord */ public UsedRefreshTokenRecord(String token, LocalDateTime created, String clientId) { super(UsedRefreshToken.USED_REFRESH_TOKEN); set(0, token); set(1, created); set(2, clientId); } }
[ "messi1913@gmail.com" ]
messi1913@gmail.com
b7b19d7cba01a655ac00af9d5016829cef7a8a66
c474b03758be154e43758220e47b3403eb7fc1fc
/apk/decompiled/com.tinder_2018-07-26_source_from_JADX/sources/com/google/android/exoplayer2/source/ExtractorMediaSource.java
646d89b1dc2440455b8a3951fbab872ea84838b5
[]
no_license
EstebanDalelR/tinderAnalysis
f80fe1f43b3b9dba283b5db1781189a0dd592c24
941e2c634c40e5dbf5585c6876ef33f2a578b65c
refs/heads/master
2020-04-04T09:03:32.659099
2018-11-23T20:41:28
2018-11-23T20:41:28
155,805,042
0
0
null
2018-11-18T16:02:45
2018-11-02T02:44:34
null
UTF-8
Java
false
false
4,703
java
package com.google.android.exoplayer2.source; import android.net.Uri; import android.os.Handler; import android.support.annotation.Nullable; import com.google.android.exoplayer2.C2165q; import com.google.android.exoplayer2.ExoPlayer; import com.google.android.exoplayer2.extractor.ExtractorsFactory; import com.google.android.exoplayer2.source.C4251g.C2205c; import com.google.android.exoplayer2.source.MediaSource.C2166a; import com.google.android.exoplayer2.source.MediaSourceEventListener.C2178b; import com.google.android.exoplayer2.source.MediaSourceEventListener.C2179c; import com.google.android.exoplayer2.upstream.Allocator; import com.google.android.exoplayer2.upstream.DataSource.Factory; import com.google.android.exoplayer2.util.C2289a; import java.io.IOException; public final class ExtractorMediaSource extends C3675b implements C2205c { /* renamed from: a */ private final Uri f13653a; /* renamed from: b */ private final Factory f13654b; /* renamed from: c */ private final ExtractorsFactory f13655c; /* renamed from: d */ private final int f13656d; /* renamed from: e */ private final String f13657e; /* renamed from: f */ private final int f13658f; @Nullable /* renamed from: g */ private final Object f13659g; /* renamed from: h */ private long f13660h; /* renamed from: i */ private boolean f13661i; @Deprecated public interface EventListener { void onLoadError(IOException iOException); } /* renamed from: com.google.android.exoplayer2.source.ExtractorMediaSource$a */ private static final class C4245a extends C3686e { /* renamed from: a */ private final EventListener f13652a; public C4245a(EventListener eventListener) { this.f13652a = (EventListener) C2289a.m8309a((Object) eventListener); } public void onLoadError(int i, @Nullable C2166a c2166a, C2178b c2178b, C2179c c2179c, IOException iOException, boolean z) { this.f13652a.onLoadError(iOException); } } /* renamed from: a */ public void mo3493a() { } public void maybeThrowSourceInfoRefreshError() throws IOException { } @Deprecated public ExtractorMediaSource(Uri uri, Factory factory, ExtractorsFactory extractorsFactory, Handler handler, EventListener eventListener) { this(uri, factory, extractorsFactory, handler, eventListener, null); } @Deprecated public ExtractorMediaSource(Uri uri, Factory factory, ExtractorsFactory extractorsFactory, Handler handler, EventListener eventListener, String str) { this(uri, factory, extractorsFactory, -1, handler, eventListener, str, 1048576); } @Deprecated public ExtractorMediaSource(Uri uri, Factory factory, ExtractorsFactory extractorsFactory, int i, Handler handler, EventListener eventListener, String str, int i2) { Handler handler2 = handler; EventListener eventListener2 = eventListener; this(uri, factory, extractorsFactory, i, str, i2, null); if (eventListener2 == null || handler2 == null) { ExtractorMediaSource extractorMediaSource = this; return; } addEventListener(handler2, new C4245a(eventListener2)); } private ExtractorMediaSource(Uri uri, Factory factory, ExtractorsFactory extractorsFactory, int i, @Nullable String str, int i2, @Nullable Object obj) { this.f13653a = uri; this.f13654b = factory; this.f13655c = extractorsFactory; this.f13656d = i; this.f13657e = str; this.f13658f = i2; this.f13660h = 1; this.f13659g = obj; } /* renamed from: a */ public void mo3495a(ExoPlayer exoPlayer, boolean z) { m16934b(this.f13660h, false); } public MediaPeriod createPeriod(C2166a c2166a, Allocator allocator) { C2289a.m8311a(c2166a.f6223a == 0); return new C4251g(this.f13653a, this.f13654b.createDataSource(), this.f13655c.createExtractors(), this.f13656d, m13913a(c2166a), this, allocator, this.f13657e, this.f13658f); } public void releasePeriod(MediaPeriod mediaPeriod) { ((C4251g) mediaPeriod).m16989a(); } /* renamed from: a */ public void mo3494a(long j, boolean z) { if (j == -9223372036854775807L) { j = this.f13660h; } if (this.f13660h != j || this.f13661i != z) { m16934b(j, z); } } /* renamed from: b */ private void m16934b(long j, boolean z) { this.f13660h = j; this.f13661i = z; m13916a((C2165q) new C3696l(this.f13660h, this.f13661i, false, this.f13659g), null); } }
[ "jdguzmans@hotmail.com" ]
jdguzmans@hotmail.com
e6bac33259bf93d19b9a31e4def5e521c1ed1fa2
63405be9a9047666a02583a839cf1ae258e66742
/fest-swing/src/testBackUp/org/fest/swing/fixture/JToolBarFixture_float_Test.java
ff53f15c39987f012696bb5db2952649941dc041
[ "Apache-2.0" ]
permissive
CyberReveal/fest-swing-1.x
7884201dde080a6702435c0f753e32f004fea0f8
670fac718df72486b6177ce5d406421b3290a7f8
refs/heads/master
2020-12-24T16:35:44.180425
2017-02-17T15:15:43
2017-02-17T15:15:43
8,160,798
0
0
null
null
null
null
UTF-8
Java
false
false
1,302
java
/* * Created on Jul 5, 2007 * * 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 to in writing, software distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the * specific language governing permissions and limitations under the License. * * Copyright @2007-2013 the original author or authors. */ package org.fest.swing.fixture; import java.awt.Point; import org.junit.Test; /** * Tests for {@link JToolBarFixture#floatTo(Point)}. * * @author Alex Ruiz * @author Yvonne Wang */ public class JToolBarFixture_float_Test extends JToolBarFixture_TestCase { @Test public void should_float_to_point() { final Point p = new Point(8, 6); new EasyMockTemplate(driver()) { @Override protected void expectations() { driver().floatTo(target(), p.x, p.y); expectLastCall().once(); } @Override protected void codeToTest() { assertThatReturnsSelf(fixture().floatTo(p)); } }.run(); } }
[ "colin.goodheart-smithe@ISVGREPC0000714.Imp.net" ]
colin.goodheart-smithe@ISVGREPC0000714.Imp.net
81106604d56df7f87a2168eeffe00c16dc958a14
0f3f79e44d27599b800c5f24ea21d1b0f49fd61a
/plugins/engines/beam/src/main/java/org/apache/hop/beam/pipeline/handler/BeamBigQueryOutputStepHandler.java
6b8d9de7b3b895cb8d64ec82f5fe88128cd70bb8
[ "Apache-2.0" ]
permissive
aslanshemilov/hop
e0e9aead9184d50783727149a2c0cd0cfdb98354
383575c6aa60ea69ce1f324dbb11bb7901817bbe
refs/heads/master
2022-11-22T17:02:49.605721
2020-07-21T20:26:04
2020-07-21T20:26:04
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,625
java
/*! ****************************************************************************** * * Hop : The Hop Orchestration Platform * * http://www.project-hop.org * ******************************************************************************* * * 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 to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * ******************************************************************************/ package org.apache.hop.beam.pipeline.handler; import org.apache.beam.sdk.Pipeline; import org.apache.beam.sdk.values.PCollection; import org.apache.hop.beam.core.HopRow; import org.apache.hop.beam.core.transform.BeamBQOutputTransform; import org.apache.hop.beam.core.util.JsonRowMeta; import org.apache.hop.beam.engines.IBeamPipelineEngineRunConfiguration; import org.apache.hop.beam.transforms.bq.BeamBQOutputMeta; import org.apache.hop.core.exception.HopException; import org.apache.hop.core.logging.ILogChannel; import org.apache.hop.core.row.IRowMeta; import org.apache.hop.metadata.api.IHopMetadataProvider; import org.apache.hop.pipeline.PipelineMeta; import org.apache.hop.pipeline.transform.TransformMeta; import java.util.List; import java.util.Map; public class BeamBigQueryOutputStepHandler extends BeamBaseStepHandler implements BeamStepHandler { public BeamBigQueryOutputStepHandler( IBeamPipelineEngineRunConfiguration runConfiguration, IHopMetadataProvider metadataProvider, PipelineMeta pipelineMeta, List<String> transformPluginClasses, List<String> xpPluginClasses ) { super( runConfiguration, false, true, metadataProvider, pipelineMeta, transformPluginClasses, xpPluginClasses ); } @Override public void handleStep( ILogChannel log, TransformMeta beamOutputStepMeta, Map<String, PCollection<HopRow>> stepCollectionMap, Pipeline pipeline, IRowMeta rowMeta, List<TransformMeta> previousSteps, PCollection<HopRow> input ) throws HopException { BeamBQOutputMeta beamOutputMeta = (BeamBQOutputMeta) beamOutputStepMeta.getTransform(); BeamBQOutputTransform beamOutputTransform = new BeamBQOutputTransform( beamOutputStepMeta.getName(), pipelineMeta.environmentSubstitute( beamOutputMeta.getProjectId() ), pipelineMeta.environmentSubstitute( beamOutputMeta.getDatasetId() ), pipelineMeta.environmentSubstitute( beamOutputMeta.getTableId() ), beamOutputMeta.isCreatingIfNeeded(), beamOutputMeta.isTruncatingTable(), beamOutputMeta.isFailingIfNotEmpty(), JsonRowMeta.toJson(rowMeta), transformPluginClasses, xpPluginClasses ); // Which transform do we apply this transform to? // Ignore info hops until we figure that out. // if ( previousSteps.size() > 1 ) { throw new HopException( "Combining data from multiple transforms is not supported yet!" ); } TransformMeta previousStep = previousSteps.get( 0 ); // No need to store this, it's PDone. // input.apply( beamOutputTransform ); log.logBasic( "Handled transform (BQ OUTPUT) : " + beamOutputStepMeta.getName() + ", gets data from " + previousStep.getName() ); } }
[ "mattcasters@gmail.com" ]
mattcasters@gmail.com
16e1461a0fe9d9c46fa47c19d4e49ea6d6c648bc
3e8affeb05c00fe7881872e5dd93ff34fe08c250
/src/util/Utils.java
081ec99995a3f05249b2582aee04fb3b082cafdd
[]
no_license
broderickwang/JasperWeb
b652e1493ec5d307e7b274bdad3f4f1423cc36de
69bbf29e2645efd9b05c91ed0d0a8eebab016f00
refs/heads/master
2020-06-19T05:46:54.302026
2017-06-26T09:25:54
2017-06-26T09:25:54
94,178,499
5
0
null
null
null
null
UTF-8
Java
false
false
607
java
package util; import java.sql.Connection; import java.sql.DriverManager; /* *Created by Broderick * User: Broderick * Date: 2017/6/23 * Time: 15:02 * Version: 1.0 * Description: * Email:wangchengda1990@gmail.com **/ public class Utils { public static Connection getConnection() throws Exception{ Class.forName("oracle.jdbc.driver.OracleDriver"); String url = "jdbc:oracle:" + "thin:@192.168.9.202:1521:orcl"; String user = "sde"; String password = "sde"; Connection conn = DriverManager.getConnection(url, user, password); return conn; } }
[ "wangchengda1990@gmail.com" ]
wangchengda1990@gmail.com
1d876ca429018d61db1c03d0bf9cc1a61f8ff924
7af846ccf54082cd1832c282ccd3c98eae7ad69a
/ftmap/src/main/java/taxi/nicecode/com/ftmap/generated/package_1/Foo132.java
8615aa6cbd164a1b252a89b9de960dc8c772f1de
[]
no_license
Kadanza/TestModules
821f216be53897d7255b8997b426b359ef53971f
342b7b8930e9491251de972e45b16f85dcf91bd4
refs/heads/master
2020-03-25T08:13:09.316581
2018-08-08T10:47:25
2018-08-08T10:47:25
143,602,647
0
0
null
null
null
null
UTF-8
Java
false
false
269
java
package taxi.nicecode.com.ftmap.generated.package_1; public class Foo132 { public void foo0(){ new Foo131().foo5(); } public void foo1(){ foo0(); } public void foo2(){ foo1(); } public void foo3(){ foo2(); } public void foo4(){ foo3(); } public void foo5(){ foo4(); } }
[ "1" ]
1
cb025bca023caeee12b9bbd54da71efd761d6bd1
7c86e1e4ba9592f7112c2387228c993aa295a857
/xindong-api-dao/src/main/java/com/xindong/api/dao/TbCouponPromoDao.java
212b721f1106898398e08350b5ea8fd78714199d
[]
no_license
qsfjing/xd-api
620ffc014f90eeb0b5ce7fdc7fdd05f6837828b8
5e0a2add49c033ee627d15e549c4264da89abb4d
refs/heads/master
2021-08-23T13:40:59.576275
2017-12-04T08:40:19
2017-12-04T08:40:19
113,126,694
0
1
null
null
null
null
UTF-8
Java
false
false
1,248
java
package com.xindong.api.dao; import java.util.List; import com.xindong.api.domain.TbCouponPromo; import com.xindong.api.domain.query.TbCouponPromoQuery; public interface TbCouponPromoDao { /** * 添加促销优惠券 * @param tbCouponPromo * @return */ public Integer insert(TbCouponPromo tbCouponPromo); /** * 依据促销优惠券ID修改促销优惠券 * @param tbCouponPromo */ public void modify(TbCouponPromo tbCouponPromo); /** * 依据促销优惠券ID查询促销优惠券 * @param couponId * @return */ public TbCouponPromo selectByCouponPromoId(int couponPromoId); /** * 根据相应的条件查询满足条件的促销优惠券的总数 * @param tbCouponPromoQuery * @return */ public int countByCondition(TbCouponPromoQuery tbCouponPromoQuery); /** * 根据相应的条件查询促销优惠券 * @param tbCouponPromoQuery * @return */ public List<TbCouponPromo> selectByCondition(TbCouponPromoQuery tbCouponPromoQuery); /** * 根据相应的条件分页查询促销优惠券 * @param tbCouponPromoQuery * @return */ public List<TbCouponPromo> selectByConditionForPage(TbCouponPromoQuery tbCouponPromoQuery); }
[ "359953111@qq.com" ]
359953111@qq.com
b8215ad1911f260b4973e2f2058e5de535625322
87c456d57d2fed437f07c41fb9599709600696b5
/src/main/java/com/googlecode/mjorm/query/criteria/SimpleCriterion.java
3935eea286f900a76a3d239c64fc0e3742a91123
[]
no_license
belerweb/mongo-java-orm
e73ce092f242893fa3ca2117dc401844ad7ec60f
01786756da4b40a868df1ec09ed6c42765f0694d
refs/heads/master
2023-09-05T20:05:19.018471
2013-10-10T08:42:52
2013-10-10T08:42:52
14,063,501
1
2
null
null
null
null
UTF-8
Java
false
false
1,985
java
package com.googlecode.mjorm.query.criteria; import com.googlecode.mjorm.ObjectMapper; import com.googlecode.mjorm.mql.MqlCriterionFunction; import com.googlecode.mjorm.mql.AbstractMqlCriterionFunction; import com.mongodb.BasicDBObject; public class SimpleCriterion extends AbstractCriterion { public enum Operator { GT ("$gt"), GTE ("$gte"), LT ("$lt"), LTE ("$lte"), NE ("$ne"), IN ("$in"), NIN ("$nin"), ALL ("$all") ; private String operator; Operator(String operator) { this.operator = operator; } public String getOperatorString() { return this.operator; } } private String operator; private Object value; public SimpleCriterion(String operator, Object value) { this.operator = operator; this.value = value; } public SimpleCriterion(Operator operator, Object value) { this(operator.getOperatorString(), value); } /** * @return the operator */ public String getOperator() { return operator; } /** * @return the value */ public Object getValue() { return value; } /** * {@inheritDoc} */ public Object toQueryObject(ObjectMapper mapper) { return new BasicDBObject(operator, mapper.unmapValue(value)); } /** * Creates an {@link MqlCriterionFunction} for the given {@link Operator} * with the given restrictions. * @param operator * @param minArgs * @param maxArgs * @param exactArgs * @param types * @return */ public static final MqlCriterionFunction createForOperator( final String functionName, final Operator operator, final int minArgs, final int maxArgs, final int exactArgs, final Class<?>... types) { return new AbstractMqlCriterionFunction() { protected void init() { setFunctionName(functionName); setMinArgs(minArgs); setMaxArgs(maxArgs); setExactArgs(exactArgs); setTypes(types); } @Override public Criterion createForArguments(Object[] values) { return new SimpleCriterion(operator, values); } }; } }
[ "belerweb@gmail.com" ]
belerweb@gmail.com
34895197aab5319cac06c5cdb80d6c2c072d1c8e
09098ab69a3ac586fe4ca056df439e4c6f6979f8
/audio_track_record/DemoForAndroid/app/src/main/java/com/tt/utils/MyTextWatcher.java
9c4af7b84185146e8981f6a1cfbab87e3403e795
[ "Apache-2.0" ]
permissive
LightSun/android-study
88eb4502691d72efde20f0540fd6a20c57748882
1eb9bf2614b28b8d708d8ad123e45afa39a19d2d
refs/heads/master
2021-04-29T10:19:59.270574
2017-08-30T06:13:05
2017-08-30T06:13:05
77,875,508
0
0
null
null
null
null
UTF-8
Java
false
false
888
java
package com.tt.utils; import android.text.Editable; import android.text.TextWatcher; import android.widget.TextView; /** * Created by XLM-10 on 2015/12/2. */ public class MyTextWatcher implements TextWatcher { TextView mTextView; TextView mResultTextView; public MyTextWatcher(TextView textView, TextView resultTextView){ mTextView = textView; mResultTextView = resultTextView; } @Override public void beforeTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void onTextChanged(CharSequence charSequence, int i, int i1, int i2) { } @Override public void afterTextChanged(Editable editable) { if(editable != null && !"".equals(editable)){ mTextView.setText("当前评测内容: " + editable.toString()); mResultTextView.setText(""); } } }
[ "532278976@qq.com" ]
532278976@qq.com
00d5126dedb0e0614a8970cff929ea7e24e07373
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/33/33_c3bee5017cc7c09db5afc20a4046b3d26443cb9b/CRestriction/33_c3bee5017cc7c09db5afc20a4046b3d26443cb9b_CRestriction_s.java
82835d822320d17806a1ce1aebb230b2722eed8b
[]
no_license
zhongxingyu/Seer
48e7e5197624d7afa94d23f849f8ea2075bcaec0
c11a3109fdfca9be337e509ecb2c085b60076213
refs/heads/master
2023-07-06T12:48:55.516692
2023-06-22T07:55:56
2023-06-22T07:55:56
259,613,157
6
2
null
2023-06-22T07:55:57
2020-04-28T11:07:49
null
UTF-8
Java
false
false
2,065
java
package biz.bokhorst.xprivacy; import java.util.Date; public class CRestriction { private long mExpiry; private int mUid; private String mRestrictionName; private String mMethodName; private String mExtra; public boolean restricted; public boolean asked; public CRestriction(int uid, String restrictionName, String methodName, String extra) { mExpiry = new Date().getTime() + PrivacyManager.cRestrictionCacheTimeoutMs; mUid = uid; mRestrictionName = restrictionName; mMethodName = methodName; mExtra = extra; restricted = false; asked = false; } public CRestriction(PRestriction restriction, String extra) { mExpiry = new Date().getTime() + PrivacyManager.cRestrictionCacheTimeoutMs; mUid = restriction.uid; mRestrictionName = restriction.restrictionName; mMethodName = restriction.methodName; mExtra = extra; restricted = restriction.restricted; asked = restriction.asked; } public void setExpiry(long time) { mExpiry = time; } public boolean isExpired() { return (new Date().getTime() > mExpiry); } public int getUid() { return mUid; } public String getRestrictionName() { return mRestrictionName; } @Override public boolean equals(Object obj) { CRestriction other = (CRestriction) obj; // @formatter:off return (mUid == other.mUid && mRestrictionName.equals(other.mRestrictionName) && (mMethodName == null ? other.mMethodName == null : mMethodName.equals(other.mMethodName)) && (mExtra == null ? other.mExtra == null : mExtra.equals(other.mExtra))); // @formatter:on } @Override public int hashCode() { int hash = mUid; if (mRestrictionName != null) hash = hash ^ mRestrictionName.hashCode(); if (mMethodName != null) hash = hash ^ mMethodName.hashCode(); if (mExtra != null) hash = hash ^ mExtra.hashCode(); return hash; } @Override public String toString() { return mUid + ":" + mRestrictionName + "/" + mMethodName + "(" + mExtra + ")" + "=" + restricted + "/" + asked; } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
c474ef2e1ee3ddcbb919d147bce0400858922282
11dae886297f4656fedd650235bee37259f7382f
/src/main/java/com/sun/furniture/serviece/SaleOrderServiceImpl.java
5e5788abcde4b3c9435eee1b7546b8b1dfe142e0
[]
no_license
SunjinPeng2017/furniture-be
61ebc882fee74104075afa8e3b730e2c037e30cc
a1963a46bfd70c63f58fe965e847921a4c13fbd8
refs/heads/master
2021-06-03T09:03:55.091135
2020-01-04T13:20:34
2020-01-04T13:20:34
92,731,730
5
0
null
2021-04-26T16:54:20
2017-05-29T11:01:17
Java
UTF-8
Java
false
false
1,163
java
package com.sun.furniture.serviece; import com.sun.furniture.mapper.ISaleOrderMapper; import com.sun.furniture.model.SaleOrder; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.List; /** * <b><code>ISaleOrderMapper</code></b> * <p> * class_comment * </p> * <b>Create Time:</b> 2017/6/2 17:43 * * @author sunjinpeng * @version 0.1.0 * @since furniture-be 0.1.0 */ @Service public class SaleOrderServiceImpl implements ISaleOrderService { @Autowired private ISaleOrderMapper mapper; @Override public List<SaleOrder> getSaleOrders() { return mapper.getSaleOrders(); } @Override public void addSaleOrder(SaleOrder saleOrder) { mapper.addSaleOrder(saleOrder); } @Override public SaleOrder getSaleOrderByNumber(String saleNumber) { return mapper.getSaleOrderByNumber(saleNumber); } @Override public void deleteSaleOrder(Integer id) { mapper.deleteSaleOrder(id); } @Override public void updateSaleOrder(SaleOrder saleOrder) { mapper.updateSaleOrder(saleOrder); } }
[ "12345678" ]
12345678
388259d47b90ee4ea7ff81eb006a09f2e4b9ccc9
6e79231e5c7e36e59ad6971f82e90a57b75e02cc
/news-service/new-system/src/main/java/edu/nciae/system/service/SysMenuService.java
aca39159374658b7b47e8cda5fe66da67626fe5d
[]
no_license
hansihao/news
f9f19d55e14b2e491029956fad1c6a6a3159ac11
9d2b209e9642b3511622ed8cdecd4ff1a82d038a
refs/heads/master
2022-12-24T14:48:09.587530
2019-12-28T09:04:21
2019-12-28T09:04:21
230,582,846
0
0
null
2022-12-10T05:49:39
2019-12-28T08:39:41
Java
UTF-8
Java
false
false
1,391
java
package edu.nciae.system.service; import edu.nciae.system.domain.SysMenu; import edu.nciae.system.domain.SysUser; import java.util.List; import java.util.Set; /** * 菜单业务层 */ public interface SysMenuService { /** * 根据用户ID查询权限 * * @param userId 用户ID * @return 权限列表 */ Set<String> selectPermsByUserId(Integer userId); /** * 根据用户ID查询菜单 * * @param user 用户信息 * @return 菜单列表 */ List<SysMenu> selectMenusByUser(SysUser user); /** * 查询系统菜单列表 * * @param menu 菜单信息 * @return 菜单列表 */ List<SysMenu> selectMenuList(SysMenu menu); /** * 新增保存菜单信息 * * @param menu 菜单信息 * @return 结果 */ int insertMenu(SysMenu menu); /** * 修改保存菜单信息 * * @param menu 菜单信息 * @return 结果 */ int updateMenu(SysMenu menu); /** * 校验菜单名称是否唯一 * * @param menu 菜单信息 * @return 结果 */ String checkMenuNameUnique(SysMenu menu); /** * 删除菜单管理信息 * * @param menuId 菜单ID * @return 结果 */ int deleteMenuById(Long menuId); }
[ "1119675227@QQ.com" ]
1119675227@QQ.com
b264b08a70f70505edce1f57eeab3e182cee58f8
7af41d759f0575ec9b90eb61e83a023ac40a3877
/src/main/java/uk/org/siri/siri_2/SanitaryFacilityEnumeration.java
32fc79da8f6c7b1e74eeb7f39fe7b5f0d324be7b
[ "MIT" ]
permissive
camsys/onebusaway-siri-api-v20
5beb99c15b99cf270ede77cae049cd8415319f31
0ac892b154e138279ef3ce860b584c6a443e9e7c
refs/heads/master
2021-12-14T02:38:50.950084
2021-11-19T20:16:59
2021-11-19T20:16:59
29,933,328
1
2
null
null
null
null
UTF-8
Java
false
false
2,245
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2014.11.22 at 01:45:09 PM EST // package uk.org.siri.siri_2; import javax.xml.bind.annotation.XmlEnum; import javax.xml.bind.annotation.XmlEnumValue; import javax.xml.bind.annotation.XmlType; /** * <p>Java class for SanitaryFacilityEnumeration. * * <p>The following schema fragment specifies the expected content contained within this class. * <p> * <pre> * &lt;simpleType name="SanitaryFacilityEnumeration"> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}NMTOKEN"> * &lt;enumeration value="unknown"/> * &lt;enumeration value="pti23_22"/> * &lt;enumeration value="toilet"/> * &lt;enumeration value="pti23_23"/> * &lt;enumeration value="noToilet"/> * &lt;enumeration value="shower"/> * &lt;enumeration value="wheelchairAcccessToilet"/> * &lt;enumeration value="babyChange"/> * &lt;/restriction> * &lt;/simpleType> * </pre> * */ @XmlType(name = "SanitaryFacilityEnumeration") @XmlEnum public enum SanitaryFacilityEnumeration { @XmlEnumValue("unknown") UNKNOWN("unknown"), @XmlEnumValue("pti23_22") PTI_23_22("pti23_22"), @XmlEnumValue("toilet") TOILET("toilet"), @XmlEnumValue("pti23_23") PTI_23_23("pti23_23"), @XmlEnumValue("noToilet") NO_TOILET("noToilet"), @XmlEnumValue("shower") SHOWER("shower"), @XmlEnumValue("wheelchairAcccessToilet") WHEELCHAIR_ACCCESS_TOILET("wheelchairAcccessToilet"), @XmlEnumValue("babyChange") BABY_CHANGE("babyChange"); private final String value; SanitaryFacilityEnumeration(String v) { value = v; } public String value() { return value; } public static SanitaryFacilityEnumeration fromValue(String v) { for (SanitaryFacilityEnumeration c: SanitaryFacilityEnumeration.values()) { if (c.value.equals(v)) { return c; } } throw new IllegalArgumentException(v); } }
[ "lennycaraballo@gmail.com" ]
lennycaraballo@gmail.com
bc6135f58a484ab61d95534caaad551afde288d3
645354e8ea9aba60f106c1e73b07a8ae5d2b1c9c
/lombok-plugin/src/main/java/de/plushnikov/intellij/plugin/lombokconfig/ConfigKeys.java
8996f819a45773e471849545ed06f6f08c92315b
[ "BSD-3-Clause" ]
permissive
geipette/lombok-intellij-plugin
875320827e4efc0252cbf4a10c06054bf1366e15
4c9ab006c5225464dea9e3b0956f701a23683b8c
refs/heads/master
2020-12-25T12:07:34.573377
2014-12-31T17:14:02
2014-12-31T17:14:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,495
java
package de.plushnikov.intellij.plugin.lombokconfig; import java.util.Arrays; import java.util.Collection; import java.util.HashSet; public enum ConfigKeys { CONFIG_STOP_BUBBLING("config.stopBubbling", "false"), LOG_FIELDNAME("lombok.log.fieldName", "log"), LOG_FIELD_IS_STATIC("lombok.log.fieldIsStatic", "true"), EQUALSANDHASHCODE_DO_NOT_USE_GETTERS("lombok.equalsAndHashCode.doNotUseGetters", "false"), ANYCONSTRUCTOR_SUPPRESS_CONSTRUCTOR_PROPERTIES("lombok.anyConstructor.suppressConstructorProperties", "false"), TOSTRING_DO_NOT_USE_GETTERS("lombok.toString.doNotUseGetters", "false"), TOSTRING_INCLUDE_FIELD_NAMES("lombok.toString.includeFieldNames", "true"), NONNULL_EXCEPTIONTYPE("lombok.nonNull.exceptionType", "NullPointerException"), ACCESSORS_PREFIX("lombok.accessors.prefix", ""); private final String configKey; private final String configDefaultValue; ConfigKeys(String configKey, String configDefaultValue) { this.configKey = configKey; this.configDefaultValue = configDefaultValue; } public String getConfigKey() { return configKey; } public String getConfigDefaultValue() { return configDefaultValue; } //TODO ADD ALL KEYS final Collection<String> booleanOptions = new HashSet<String>(Arrays.asList( "config.stopBubbling", "lombok.accessors.chain", "lombok.accessors.fluent", "lombok.getter.noIsPrefix")); final Collection<String> flagUsageOptions = new HashSet<String>(Arrays.asList( "lombok.accessors.flagUsage", "lombok.allArgsConstructor.flagUsage", "lombok.anyConstructor.flagUsage", "lombok.builder.flagUsage", "lombok.cleanup.flagUsage", "lombok.data.flagUsage", "lombok.delegate.flagUsage", "lombok.equalsAndHashCode.flagUsage", "lombok.experimental.flagUsage", "lombok.extensionMethod.flagUsage", "lombok.fieldDefaults.flagUsage", "lombok.getter.flagUsage", "lombok.getter.lazy.flagUsage", "lombok.log.apacheCommons.flagUsage", "lombok.log.flagUsage", "lombok.log.javaUtilLogging.flagUsage", "lombok.log.log4j.flagUsage", "lombok.log.log4j2.flagUsage", "lombok.log.slf4j.flagUsage", "lombok.log.xslf4j.flagUsage", "lombok.noArgsConstructor.flagUsage", "lombok.nonNull.flagUsage", "lombok.requiredArgsConstructor.flagUsage", "lombok.setter.flagUsage", "lombok.sneakyThrows.flagUsage", "lombok.synchronized.flagUsage", "lombok.toString.flagUsage", "lombok.val.flagUsage", "lombok.value.flagUsage", "lombok.wither.flagUsage")); }
[ "michail@plushnikov.de" ]
michail@plushnikov.de
28615de9b490d35e498b4d72b1c99e716c460619
2da705ba188bb9e4a0888826818f1b25d04e90c8
/core/cas-server-core-authentication-mfa/src/test/java/org/apereo/cas/authentication/bypass/NeverAllowMultifactorAuthenticationProviderBypassEvaluatorTests.java
567e3770a0d00f3e86d3b140248db570fedcc93b
[ "LicenseRef-scancode-free-unknown", "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
williamadmin/cas
9441fd730de81a5abaf173e2e831a19c9e417579
a4c49ab5137745146afa0f6d41791c2881a344a6
refs/heads/master
2021-05-25T19:05:01.862668
2020-04-07T05:15:53
2020-04-07T05:15:53
253,788,442
1
0
Apache-2.0
2020-04-07T12:37:38
2020-04-07T12:37:37
null
UTF-8
Java
false
false
2,211
java
package org.apereo.cas.authentication.bypass; import org.apereo.cas.authentication.CoreAuthenticationTestUtils; import org.apereo.cas.authentication.mfa.TestMultifactorAuthenticationProvider; import org.apereo.cas.configuration.CasConfigurationProperties; import org.apereo.cas.services.DefaultRegisteredServiceMultifactorPolicy; import lombok.val; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration; import org.springframework.context.ConfigurableApplicationContext; import org.springframework.mock.web.MockHttpServletRequest; import java.util.List; import java.util.Map; import static org.junit.jupiter.api.Assertions.*; import static org.mockito.Mockito.*; /** * This is {@link NeverAllowMultifactorAuthenticationProviderBypassEvaluatorTests}. * * @author Misagh Moayyed * @since 6.2.0 */ @SpringBootTest(classes = RefreshAutoConfiguration.class) @EnableConfigurationProperties(CasConfigurationProperties.class) @Tag("MFA") public class NeverAllowMultifactorAuthenticationProviderBypassEvaluatorTests { @Autowired private ConfigurableApplicationContext applicationContext; @Test public void verifyOperation() { val provider = TestMultifactorAuthenticationProvider.registerProviderIntoApplicationContext(applicationContext); val principal = CoreAuthenticationTestUtils.getPrincipal(Map.of("cn", List.of("example"))); val authentication = CoreAuthenticationTestUtils.getAuthentication(principal); val registeredService = CoreAuthenticationTestUtils.getRegisteredService(); val policy = new DefaultRegisteredServiceMultifactorPolicy(); when(registeredService.getMultifactorPolicy()).thenReturn(policy); assertTrue(NeverAllowMultifactorAuthenticationProviderBypassEvaluator.getInstance() .shouldMultifactorAuthenticationProviderExecute(authentication, registeredService, provider, new MockHttpServletRequest())); } }
[ "mm1844@gmail.com" ]
mm1844@gmail.com
57204c39e840df88352d08234d61ecce8d513b1f
592b0e0ad07e577e2510723519c0c603d3eb2808
/src/main/java/com/jst/prodution/member/dubbo/service/QueryAppIdTypeDuService.java
90edfd15826f0d4c7b03d3c614a09b72675d6048
[]
no_license
huangleisir/api-js180323
494d7a1d9b07385fc95e9927195e70727e626e53
7cc5d16e12cbe6c56b48831bab3736e8477d7360
refs/heads/master
2021-04-15T05:25:32.061201
2018-06-30T15:12:31
2018-06-30T15:12:31
126,464,555
0
0
null
null
null
null
UTF-8
Java
false
false
287
java
package com.jst.prodution.member.dubbo.service; import com.jst.prodution.base.service.BaseService; /** * QueryAppIdTypeDuService class * * @author ningxuzhou * @date 2016/10/31 * 查询支付参数dubbo服务 */ public interface QueryAppIdTypeDuService extends BaseService { }
[ "lei.huang@jieshunpay.cn" ]
lei.huang@jieshunpay.cn
75078fa20bd94d1a3a2b1d2c2a9712a02e549aca
76e574615c61dc1b967696ae526d73123beebc05
/ksghi-manageSystem/src/main/java/com/itech/ups/app/business/xsyrgl/application/service/XsryglService.java
8033f032dff86f132ffa85dc1152aad6dad9b1cc
[]
no_license
happyjianguo/ksghi
10802f386d82b97e530bfcf3a4f765cb654a411c
6df11c7453883c7b0dd1763de5bb11ff02dba8ce
refs/heads/master
2022-11-08T18:54:06.289842
2020-05-17T08:23:47
2020-05-17T08:23:47
null
0
0
null
null
null
null
UTF-8
Java
false
false
541
java
package com.itech.ups.app.business.xsyrgl.application.service; import com.itech.ups.app.xsrygl.application.domain.Xsrygl; import java.util.List; import java.util.Map; public interface XsryglService { public Xsrygl addXsrygl(Xsrygl ccxbd); public void deleteXsrygl(Xsrygl ccxbd); public Xsrygl editXsrygl(Xsrygl ccxbd); public List<Xsrygl> findXsrygl(Map<String, Object> params, int rowStart, int rowEnd); public Xsrygl findXsryglById(String id); public long findXsryglCount(Map<String, Object> params); }
[ "weiliejun@163.com" ]
weiliejun@163.com
b8cce1146a4c38fb908f41497be2b29f82463199
313cac74fe44fa4a08c50b2f251e4167f637c049
/retail-fas-1.1.2/retail-fas/retail-fas-common/src/test/java/cn/wonhigh/retail/fas/common/BigDecimalUtilTest.java
4d19e51a2bbfc5f2457cf83c7c0429a87eed1b02
[]
no_license
gavin2lee/spring-projects
a1d6d495f4a027b5896e39f0de2765aaadc8a9de
6e4a035ae3c9045e880a98e373dd67c8c81bfd36
refs/heads/master
2020-04-17T04:52:41.492652
2016-09-29T16:07:40
2016-09-29T16:07:40
66,710,003
0
3
null
null
null
null
UTF-8
Java
false
false
1,138
java
package cn.wonhigh.retail.fas.common; import java.math.BigDecimal; import cn.wonhigh.retail.fas.common.utils.BigDecimalUtil; import junit.framework.TestCase; public class BigDecimalUtilTest extends TestCase { public void testmutiAll() { BigDecimal[] values = {new BigDecimal(1.51),new BigDecimal(1.56),new BigDecimal(3.443333)}; BigDecimal result = BigDecimalUtil.mutiAll(values); Boolean equals = result.doubleValue()==8.11; assertTrue( equals); result = BigDecimalUtil.mutiAll(new BigDecimal(1.51),new BigDecimal(1.56),new BigDecimal(3.443333)); equals = result.doubleValue()==8.11; assertTrue( equals); } public void testmutiAllZero() { BigDecimal[] values = {null,new BigDecimal(1.56),new BigDecimal(3.443333)}; BigDecimal result = BigDecimalUtil.mutiAll(values); assertTrue( result.doubleValue() - BigDecimal.ZERO.doubleValue() == 0); // result = BigDecimalUtil.mutiAll(null,new BigDecimal(1.56),new BigDecimal(3.443333)); // assertTrue( result.doubleValue() - BigDecimal.ZERO.doubleValue() == 0); } }
[ "gavin2lee@163.com" ]
gavin2lee@163.com
27cad0804092eb6ee52af6c827e1c125eee452bd
563d786551f0211b3c9bf876de4da5710bbf103c
/services/hrdb/src/com/auto_hldceyfrcn/hrdb/Vacation.java
02dd8b7aaf6f57b323d3bd481ae157429f3fe7e8
[]
no_license
wavemakerapps/Auto_HLDCeYFRcN
69eebe78800865880630c16ec55b4136d8185a51
22ee93fca9be4c4d4d83174edd8e83e74e1d1966
refs/heads/master
2021-05-05T10:14:10.441437
2018-01-17T23:14:27
2018-01-17T23:14:27
117,903,119
0
0
null
null
null
null
UTF-8
Java
false
false
3,556
java
/*Copyright (c) 2015-2016 wavemaker.com All Rights Reserved. This software is the confidential and proprietary information of wavemaker.com You shall not disclose such Confidential Information and shall use it only in accordance with the terms of the source code license agreement you entered into with wavemaker.com*/ package com.auto_hldceyfrcn.hrdb; /*This is a Studio Managed File. DO NOT EDIT THIS FILE. Your changes may be reverted by Studio.*/ import java.io.Serializable; import java.sql.Date; import java.util.Objects; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.ForeignKey; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persistence.Id; import javax.persistence.JoinColumn; import javax.persistence.ManyToOne; import javax.persistence.Table; /** * Vacation generated by WaveMaker Studio. */ @Entity @Table(name = "`VACATION`") public class Vacation implements Serializable { private Integer id; private Date startDate; private Date endDate; private int empId; private Integer tenantId; private String status; private String type; private Employee employee; @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "`ID`", nullable = false, scale = 0, precision = 10) public Integer getId() { return this.id; } public void setId(Integer id) { this.id = id; } @Column(name = "`START_DATE`", nullable = true) public Date getStartDate() { return this.startDate; } public void setStartDate(Date startDate) { this.startDate = startDate; } @Column(name = "`END_DATE`", nullable = true) public Date getEndDate() { return this.endDate; } public void setEndDate(Date endDate) { this.endDate = endDate; } @Column(name = "`EMP_ID`", nullable = false, scale = 0, precision = 10) public int getEmpId() { return this.empId; } public void setEmpId(int empId) { this.empId = empId; } @Column(name = "`TENANT_ID`", nullable = true, scale = 0, precision = 10) public Integer getTenantId() { return this.tenantId; } public void setTenantId(Integer tenantId) { this.tenantId = tenantId; } @Column(name = "`STATUS`", nullable = true, length = 255) public String getStatus() { return this.status; } public void setStatus(String status) { this.status = status; } @Column(name = "`TYPE`", nullable = true, length = 255) public String getType() { return this.type; } public void setType(String type) { this.type = type; } @ManyToOne(fetch = FetchType.EAGER) @JoinColumn(name = "`EMP_ID`", referencedColumnName = "`EMP_ID`", insertable = false, updatable = false, foreignKey = @ForeignKey(name = "`EMPFKEY`")) public Employee getEmployee() { return this.employee; } public void setEmployee(Employee employee) { if(employee != null) { this.empId = employee.getEmpId(); } this.employee = employee; } @Override public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof Vacation)) return false; final Vacation vacation = (Vacation) o; return Objects.equals(getId(), vacation.getId()); } @Override public int hashCode() { return Objects.hash(getId()); } }
[ "automate1@wavemaker.com" ]
automate1@wavemaker.com
f27f55a91c1bb48ae9b968ed2d1b2458242e9b18
fdc49d09cf1de07b408cf88373676ce9ee841f09
/src/test/java/org/bk/algo/general/t30day/StringShift.java
f25e8c0eaf24c02d888d40510eb4187e717dc974
[]
no_license
bijukunjummen/algos
c569bdfddf135af1df8d577d2965d07abf1c5ffc
a85b1c350b7ee73da4a90042aeac0fa9dfb224cc
refs/heads/master
2023-09-04T11:02:25.009386
2023-08-22T23:09:05
2023-08-22T23:09:05
3,446,186
9
5
null
null
null
null
UTF-8
Java
false
false
1,518
java
package org.bk.algo.general.t30day; import org.junit.jupiter.api.Test; import static org.assertj.core.api.Assertions.assertThat; class StringShift { public String stringShift(String s, int[][] shift) { int idx = 0; char[] sArr = s.toCharArray(); for (int i = 0; i < shift.length; i++) { int direction = shift[i][0]; int quant = shift[i][1]; idx = stringShift(sArr, idx, direction, quant); } return recreateFrom(sArr, idx); } private String recreateFrom(char[] sArr, int idx) { int length = sArr.length; char[] resArr = new char[length]; int resIdx = idx; for (int i = 0; i < sArr.length; i++) { resArr[resIdx % length] = sArr[i]; resIdx++; } return String.valueOf(resArr); } private int stringShift(char[] sArr, int startIndex, int direction, int quant) { int length = sArr.length; if (direction == 0) { int resIndex = (startIndex - quant) % length; if (resIndex < 0) { resIndex = length + resIndex; } return resIndex; } else { //direction == 1 return (startIndex + quant) % length; } } @Test void test1() { assertThat(stringShift("abc", new int[][]{{0, 1}, {1, 2}})).isEqualTo("cab"); assertThat(stringShift("abcdefg", new int[][]{{1, 1}, {1, 1}, {0, 2}, {1, 3}})).isEqualTo("efgabcd"); } }
[ "biju.kunjummen@gmail.com" ]
biju.kunjummen@gmail.com
d7bdb50077eb48a26236e3a8a5a3b7ab71958c81
a0031abe0d3fd0026af85fc82507c7802461b62f
/com-luckyun-base-admin/src/main/java/com/luckyun/base/feign/controller/FeignSysPostController.java
88662badfb6d9b6daac8771190be6b4c2546b384
[]
no_license
kyo9988789/com-luckyun-base
7dbfa07c500735d9092fa8fddd32720b3c1e51d6
5f8cd5966cc9647d9c6037aff2da30ecc7d726f8
refs/heads/master
2022-10-08T09:21:36.491958
2020-06-12T02:31:10
2020-06-12T02:31:10
271,689,615
0
0
null
null
null
null
UTF-8
Java
false
false
3,377
java
package com.luckyun.base.feign.controller; import java.util.Date; import java.util.List; import javax.servlet.http.HttpSession; import org.springframework.beans.factory.ObjectFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import com.luckyun.base.post.mapper.SysPostMapper; import com.luckyun.base.post.param.SysPostClassifyParam; import com.luckyun.base.post.param.SysPostParam; import com.luckyun.base.post.service.SysPostClassifyService; import com.luckyun.base.post.service.SysPostService; import com.luckyun.model.post.SysPost; import com.luckyun.model.post.SysPostClassify; import lombok.extern.slf4j.Slf4j; @RestController @RequestMapping("/feign/sys/post") @Slf4j public class FeignSysPostController { @Autowired ObjectFactory<HttpSession> httpSessionFactory; @Autowired private SysPostService sysPostService; @Autowired private SysPostMapper sysPostMapper; @Autowired private SysPostClassifyService sysPostClassifyService; @RequestMapping("readById") public SysPost findObjById(@RequestParam("indocno") Long indocno) { return sysPostService.readOneByIndocno(indocno); } @PostMapping("add") public SysPost addSysPost(@RequestBody SysPost sysPost) { SysPostClassify dclassify = checkedClassify(); int maxSort = getMaxIsort(dclassify); if(sysPost.getIclassifyid() == null) { sysPost.setIclassifyid(dclassify.getIndocno()); } sysPost.setIsort(maxSort); sysPost.setDregt(new Date()); return sysPostService.add(sysPost, null); } @PostMapping("batchAdd") public int batchSysPost(@RequestBody List<SysPost> sysPostList) { try { SysPostClassify dclassify = checkedClassify(); int maxSort = getMaxIsort(dclassify); for(SysPost post: sysPostList) { if(post.getSregid() == null) { log.error("创建人不能为空!"); return 0; } if(post.getIclassifyid() == null) { post.setIclassifyid(dclassify.getIndocno()); } post.setDregt(new Date()); post.setIsort(maxSort); maxSort++; } sysPostMapper.batchInsert(sysPostList); return 1; }catch (Exception e) { log.error("批量添加出错,错误信息:" + e.getMessage(),e); return 0; } } private SysPostClassify checkedClassify() { SysPostClassify dclassify = new SysPostClassify(); List<SysPostClassify> classifies = sysPostClassifyService.findAll(new SysPostClassifyParam()); if(classifies != null && classifies.size() >= 1) { dclassify = classifies.get(0); }else { dclassify.setDregt(new Date()); dclassify.setSdescribe("批量导入的岗位分类"); dclassify.setSname("批量导入的岗位分类"); sysPostClassifyService.add(dclassify, null); } return dclassify; } private int getMaxIsort(SysPostClassify postClassify) { SysPostParam condition = new SysPostParam(); condition.setIclassifyid(postClassify.getIndocno()); List<SysPost> sysPosts = sysPostService.findAll(condition); if(sysPosts != null && sysPosts.size()>=1) { return sysPosts.get(0).getIsort() != null ? (sysPosts.get(0).getIsort() + 1): 1; } return 1; } }
[ "704378949@qq.com" ]
704378949@qq.com
e4721292c43b25b857dd19b5e77cf2ab9c10c0be
528fd272a727f0c1517b5cad58d6a95a099400e5
/extensions/servlet/src/main/java/com/stormpath/shiro/servlet/config/StormpathWebClientFactory.java
82236589b4fdd9c1405f5b16e77620acdb6b686b
[ "Apache-2.0" ]
permissive
stormpath/stormpath-shiro
15ffd1867c63c0e21348354246e25e24ab190915
7a3c4fd3bd0ed9bb4546932495c79e6ad6fa1a92
refs/heads/master
2023-08-10T14:57:41.803295
2017-03-06T15:03:49
2017-03-06T15:03:49
4,142,377
29
41
null
2016-10-17T18:04:26
2012-04-25T23:34:10
Java
UTF-8
Java
false
false
5,892
java
/* * Copyright 2012 Stormpath, Inc. * * 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 to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.stormpath.shiro.servlet.config; import com.stormpath.sdk.api.ApiKey; import com.stormpath.sdk.api.ApiKeyBuilder; import com.stormpath.sdk.api.ApiKeys; import com.stormpath.sdk.client.Client; import com.stormpath.sdk.client.ClientBuilder; import com.stormpath.sdk.lang.Strings; import com.stormpath.sdk.servlet.client.DefaultServletContextClientFactory; import com.stormpath.sdk.servlet.config.Config; import com.stormpath.shiro.cache.ShiroCacheManager; import org.apache.shiro.cache.CacheManager; import org.apache.shiro.util.AbstractFactory; import javax.servlet.ServletContext; /** * A simple bridge component that allows a Stormpath SDK Client to be created via Shiro's * {@link org.apache.shiro.util.Factory Factory} concept. * <p/> * As this class is a simple bridge between APIs, it does not do much - all configuration properties are * passed through to an internal {@link DefaultServletContextClientFactory} instance, and the * {@link #createInstance()} implementation merely calls {@link DefaultServletContextClientFactory#createClient(ServletContext)}()}. * <h5>Usage</h5> * Example {@code shiro.ini} configuration: * <p/> * <pre> * [main] * ... * cacheManager = some.impl.of.org.apache.shiro.cache.CacheManager * securityManager.cacheManager = $cacheManager * * stormpathClient = com.stormpath.shiro.client.ClientFactory * stormpathClient.apiKeyFileLocation = /home/myhomedir/.stormpath/apiKey.properties * stormpathClient.cacheManager = $cacheManager * * stormpathRealm = com.stormpath.shiro.realm.ApplicationRealm * stormpathRealm.client = $stormpathClient * stormpathRealm.applicationRestUrl = https://api.stormpath.com/v1/applications/yourAppIdHere * * securityManager.realm = $stormpathRealm * * ... * </pre> * * @since 0.7.0 */ public class StormpathWebClientFactory extends AbstractFactory<Client> implements ClientFactory { private CacheManager cacheManager = null; private String apiKeyFileLocation = null; private String baseUrl = null; private String apiKeyId = null; private String apiKeySecret = null; private ServletContext servletContext; public StormpathWebClientFactory(ServletContext servletContext) { this.servletContext = servletContext; } public StormpathWebClientFactory() { super(); } public ServletContext getServletContext() { return servletContext; } public void setServletContext(ServletContext servletContext) { this.servletContext = servletContext; } @Override public void setBaseUrl(String baseUrl) { this.baseUrl = baseUrl; } @Override public void setApiKeyFileLocation(String apiKeyFileLocation) { this.apiKeyFileLocation = apiKeyFileLocation; } @Override public void setApiKeyId(String apiKeyId) { this.apiKeyId = apiKeyId; } @Override public void setApiKeySecret(String apiKeySecret) { this.apiKeySecret = apiKeySecret; } @Override public void setCacheManager(CacheManager cacheManager) { this.cacheManager = cacheManager; } @Override protected Client createInstance() { return new ShiroBridgeServletContextClientFactory().createClient(servletContext); } /** * Wrapper around DefaultServletContextClientFactory, that allows overriding of the <code>baseUrl</code>, api key * (<code>id</code>, <code>secret</code>, <code>fileLocation</code>) and <code>cacheManager</code>. */ private class ShiroBridgeServletContextClientFactory extends DefaultServletContextClientFactory { @Override protected void applyBaseUrl(ClientBuilder builder) { if (Strings.hasText(baseUrl)) { builder.setBaseUrl(baseUrl); } else { super.applyBaseUrl(builder); } } @Override @SuppressWarnings("PMD.NPathComplexity") protected ApiKey createApiKey() { ApiKeyBuilder apiKeyBuilder = ApiKeys.builder(); Config config = getConfig(); String value = Strings.hasText(apiKeyId) ? apiKeyId : config.get("stormpath.client.apiKey.id"); if (Strings.hasText(value)) { apiKeyBuilder.setId(value); } //check for API Key ID embedded in the properties configuration value = Strings.hasText(apiKeySecret) ? apiKeySecret : config.get("stormpath.client.apiKey.secret"); if (Strings.hasText(value)) { apiKeyBuilder.setSecret(value); } value = Strings.hasText(apiKeyFileLocation) ? apiKeyFileLocation : config.get(STORMPATH_API_KEY_FILE); if (Strings.hasText(value)) { apiKeyBuilder.setFileLocation(value); } return apiKeyBuilder.build(); } @Override protected void applyCacheManager(ClientBuilder builder) { if (cacheManager == null) { super.applyCacheManager(builder); } else { com.stormpath.sdk.cache.CacheManager stormpathCacheManager = new ShiroCacheManager(cacheManager); builder.setCacheManager(stormpathCacheManager); } } } }
[ "bdemers@apache.org" ]
bdemers@apache.org
86b54b7ea5afc86798ebb7c088f33349311a690b
269a361c16f50fd36a6e19afb94890d0ea567b30
/src/cytoscape/visual/calculators/GenericNodeToolTipCalculator.java
d907b2c857d799ed80a31f19a992575891a1d240
[]
no_license
bilals/lotrec
2344c0189dcabcedb009b881c22d95769d6fd8ba
c30b6e707c17f9b2ab34840054e391318a38c18a
refs/heads/master
2020-03-14T00:19:54.598637
2018-11-14T20:49:03
2018-11-14T20:49:03
131,354,452
3
6
null
2018-04-28T00:48:07
2018-04-27T23:47:21
Java
UTF-8
Java
false
false
3,519
java
/* File: GenericNodeToolTipCalculator.java Copyright (c) 2006, The Cytoscape Consortium (www.cytoscape.org) The Cytoscape Consortium is: - Institute for Systems Biology - University of California San Diego - Memorial Sloan-Kettering Cancer Center - Institut Pasteur - Agilent Technologies This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY, WITHOUT EVEN THE IMPLIED WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. The software and documentation provided hereunder is on an "as is" basis, and the Institute for Systems Biology and the Whitehead Institute have no obligations to provide maintenance, support, updates, enhancements or modifications. In no event shall the Institute for Systems Biology and the Whitehead Institute be liable to any party for direct, indirect, special, incidental or consequential damages, including lost profits, arising out of the use of this software and its documentation, even if the Institute for Systems Biology and the Whitehead Institute have been advised of the possibility of such damage. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. */ //---------------------------------------------------------------------------- // $Revision: 8633 $ // $Date: 2006-10-30 16:21:52 -0800 (Mon, 30 Oct 2006) $ // $Author: mes $ //---------------------------------------------------------------------------- package cytoscape.visual.calculators; //---------------------------------------------------------------------------- import java.util.Map; import java.util.Properties; import javax.swing.JPanel; import giny.model.Node; import cytoscape.CyNetwork; import cytoscape.visual.mappings.ObjectMapping; import cytoscape.visual.parsers.StringParser; import cytoscape.visual.NodeAppearance; import cytoscape.visual.ui.VizMapUI; //---------------------------------------------------------------------------- public class GenericNodeToolTipCalculator extends NodeCalculator implements NodeToolTipCalculator { public byte getType() { return VizMapUI.NODE_TOOLTIP; } public String getPropertyLabel() { return "nodeToolTipCalculator"; } public String getTypeName() { return "Node Tooltip"; } GenericNodeToolTipCalculator() { super(); } public GenericNodeToolTipCalculator(String name, ObjectMapping m) { super(name, m,String.class); } public GenericNodeToolTipCalculator(String name, Properties props, String baseKey) { super(name, props, baseKey, new StringParser(), new String()); } public void apply(NodeAppearance appr, Node node, CyNetwork network) { String tt = (String)getRangeValue(node); // default has already been set - no need to do anything if ( tt == null ) return; appr.setToolTip( tt ); } public String calculateNodeToolTip(Node e, CyNetwork n) { NodeAppearance ea = new NodeAppearance(); apply(ea,e,n); return ea.getToolTip(); } }
[ "bilal.said@gmail.com" ]
bilal.said@gmail.com
34e2e98436f2320bea4838ed372c589e3a8935cd
769d9fe5257cb64012d627d775c4e559a7051eee
/app/src/main/java/com/whmnrc/cdy/ui/DataDetailsActivity.java
9d60f71ba369be3b810711785be15fc7a01c5092
[]
no_license
lizhe123456/cdy
a297f09611310d9628d65bc21b2e3eaa6dd346e4
cbd74155396f73aa77587d3116ec89de6109079f
refs/heads/master
2020-05-29T21:49:27.922624
2019-06-27T03:32:38
2019-06-27T03:32:38
189,394,462
0
0
null
null
null
null
UTF-8
Java
false
false
2,669
java
package com.whmnrc.cdy.ui; import android.annotation.SuppressLint; import android.content.Context; import android.content.DialogInterface; import android.content.Intent; import android.view.View; import android.widget.TextView; import com.blankj.utilcode.util.ActivityUtils; import com.blankj.utilcode.util.TimeUtils; import com.whmnrc.cdy.R; import com.whmnrc.cdy.base.App; import com.whmnrc.cdy.base.BaseActivity; import com.whmnrc.cdy.bean.RadonBean; import com.whmnrc.cdy.gpio.GPIOConstant; import com.whmnrc.cdy.widget.AlertUtils; import butterknife.BindView; import butterknife.OnClick; public class DataDetailsActivity extends BaseActivity { @BindView(R.id.tv_title) TextView tvTitle; @BindView(R.id.tv_id) TextView tvId; @BindView(R.id.tv_name) TextView tvName; @BindView(R.id.tv_value) TextView tvValue; @BindView(R.id.tv_time) TextView tvTime; @BindView(R.id.tv_address) TextView tvAddress; @BindView(R.id.tv_desc) TextView tvDesc; private RadonBean mRadonBean; public static void start(Context context, RadonBean radonBean) { Intent starter = new Intent(context, DataDetailsActivity.class); starter.putExtra("radonBean",radonBean); ActivityUtils.startActivity(starter,0,0); } @Override protected int setLayoutId() { return R.layout.activity_data_detail; } @SuppressLint("SetTextI18n") @Override protected void initViewData() { mRadonBean = (RadonBean) getIntent().getSerializableExtra("radonBean"); tvAddress.setText(mRadonBean.getAddress()); tvDesc.setText(mRadonBean.getDesc()); tvId.setText(mRadonBean.getId()+""); tvTime.setText(TimeUtils.date2String(mRadonBean.getCreateTime(), GPIOConstant.sDateString)); tvName.setText(mRadonBean.getName()); tvValue.setText(mRadonBean.getRadonValue()+" Bq/m"); tvTitle.setText("数据详情"); } @OnClick({R.id.iv_back, R.id.tv_clean, R.id.tv_printing}) public void onViewClicked(View view) { switch (view.getId()) { case R.id.iv_back: this.finish(); break; case R.id.tv_clean: AlertUtils.showCleanDialog(this, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { App.getInstance().getDaoSession().getRadonBeanDao().delete(mRadonBean); } }); break; case R.id.tv_printing: //打印 break; } } }
[ "603399531@qq.com" ]
603399531@qq.com
b8af54162f010cbb536fe67d8b25cd5e9fbe2ac6
e63363389e72c0822a171e450a41c094c0c1a49c
/Mate20_9_0_0/src/main/java/com/android/server/backup/fullbackup/-$$Lambda$PerformFullTransportBackupTask$ymLoQLrsEpmGaMrcudrdAgsU1Zk.java
07f36c1ca9780ea54448ab9d299e97a04a86d792
[]
no_license
solartcc/HwFrameWorkSource
fc23ca63bcf17865e99b607cc85d89e16ec1b177
5b92ed0f1ccb4bafc0fdb08b6fc4d98447b754ad
refs/heads/master
2022-12-04T21:14:37.581438
2020-08-25T04:30:43
2020-08-25T04:30:43
null
0
0
null
null
null
null
UTF-8
Java
false
false
864
java
package com.android.server.backup.fullbackup; import com.android.server.backup.TransportManager; import com.android.server.backup.internal.OnTaskFinishedListener; import com.android.server.backup.transport.TransportClient; /* compiled from: lambda */ public final /* synthetic */ class -$$Lambda$PerformFullTransportBackupTask$ymLoQLrsEpmGaMrcudrdAgsU1Zk implements OnTaskFinishedListener { private final /* synthetic */ TransportManager f$0; private final /* synthetic */ TransportClient f$1; public /* synthetic */ -$$Lambda$PerformFullTransportBackupTask$ymLoQLrsEpmGaMrcudrdAgsU1Zk(TransportManager transportManager, TransportClient transportClient) { this.f$0 = transportManager; this.f$1 = transportClient; } public final void onFinished(String str) { this.f$0.disposeOfTransportClient(this.f$1, str); } }
[ "lygforbs0@mail.com" ]
lygforbs0@mail.com
6f0739331ff191bbd59b32172ed0b3fd565bd1cb
2f497ce75def604941afb50657fbaca772bdabcd
/2018, 2019/src/n01541_잃어버린괄호.java
43a960bdef1e5b4591ddd18a00ee70a761de2dbc
[]
no_license
winseung76/BOJ
2bbf7d0fdb475f76c83d6f868781e314e910941e
cee1d2ab42e926c436709b02080dd0aef80162bc
refs/heads/master
2023-06-25T11:17:55.596661
2021-07-04T08:21:06
2021-07-04T08:21:06
343,604,770
0
0
null
null
null
null
WINDOWS-1252
Java
false
false
727
java
import java.util.Scanner; import java.util.StringTokenizer; public class n01541_ÀÒ¾î¹ö¸°°ýÈ£ { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); String str = sc.nextLine(); StringTokenizer st; int result = 0; String[] arr = str.split("-"); for (int i = 0; i < arr.length; i++) { int n; if (arr[i].contains("+")) { int sum = 0; st = new StringTokenizer(arr[i], "+"); while (st.hasMoreTokens()) { sum += Integer.parseInt(st.nextToken()); } n = sum; } else n = Integer.parseInt(arr[i]); if (i == 0) result = n; else result -= n; } System.out.println(result); } }
[ "winseung76@naver.com" ]
winseung76@naver.com
1f89a7233a564756dd8a1710235aeea55c7a7970
300819ae17d158e6665a5f6dc778dece01bedc7d
/app/src/main/java/com/hr/ui/utils/RefleshDialogUtils.java
3bd4bfb16be813ceb7126afd7de96a58b8b86d9e
[]
no_license
Deruwei/800HR_5.0.4
962ee053b0072a39cc0c3e8a85ced42bf9664a01
0f55c7bbc47785e3ecaa5865b42eeea86bb241b0
refs/heads/master
2021-01-02T09:45:58.531307
2017-10-27T09:28:04
2017-10-27T09:28:05
98,635,483
0
0
null
null
null
null
UTF-8
Java
false
false
853
java
package com.hr.ui.utils; import android.app.Activity; import android.content.Context; import com.hr.ui.view.custom.CustomDialog; /** * Created by wdr on 2017/8/21. */ public class RefleshDialogUtils { private CustomDialog dialog; private Activity context; public RefleshDialogUtils(Activity context){ this.context=context; } public void dismissDialog() { if (dialog != null) { dialog.dismiss(); dialog = null; } } public void hideDialog() { if (dialog != null) dialog.hide(); } public void showDialog() { getDialog().show(); } public CustomDialog getDialog() { if (dialog == null) { dialog = CustomDialog.instance(context); dialog.setCancelable(true); } return dialog; } }
[ "weideru_cdi@163.com" ]
weideru_cdi@163.com
c1bdba771020b08dcd730fd1d87be442ff7eb7e6
bc15c6ccca916de9ad21959c52a7ccd4227ac5f6
/plugins/org.erlide.erlang/xtend-gen/org/erlide/project/model/impl/ErlangProject.java
4d66dad07db271c623f91367d3286996a4c4bcb4
[]
no_license
erlide/erlide_xtext
42130184f3f4016ac592107a8f6e7041d5895241
1fea0b6968175e91d1086231b204368405a2bf7c
refs/heads/master
2021-01-17T11:19:19.787794
2016-04-22T07:41:34
2016-04-22T07:41:34
3,560,418
2
0
null
null
null
null
UTF-8
Java
false
false
6,174
java
package org.erlide.project.model.impl; import com.google.common.base.Objects; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.List; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; import org.eclipse.core.resources.IResourceChangeEvent; import org.eclipse.core.resources.IResourceChangeListener; import org.eclipse.core.resources.IResourceDelta; import org.eclipse.core.resources.IResourceDeltaVisitor; import org.eclipse.core.resources.IWorkspace; import org.eclipse.core.resources.ResourcesPlugin; import org.eclipse.core.runtime.CoreException; import org.eclipse.xtext.xbase.lib.CollectionLiterals; import org.eclipse.xtext.xbase.lib.Conversions; import org.eclipse.xtext.xbase.lib.Exceptions; import org.eclipse.xtext.xbase.lib.InputOutput; import org.erlide.project.buildpath.BuildpathEntry; import org.erlide.project.model.ICodeUnit; import org.erlide.project.model.IErlangModel; import org.erlide.project.model.IErlangModelElement; import org.erlide.project.model.IErlangProject; import org.erlide.project.model.impl.ErlangModelElement; @SuppressWarnings("all") public class ErlangProject extends ErlangModelElement implements IErlangProject, IResourceChangeListener { private IErlangModel model; private List<ICodeUnit> units; private IProject workspaceProject; private boolean closed; public ErlangProject(final IErlangModel model, final IProject project) { super(); this.model = model; ArrayList<ICodeUnit> _newArrayList = CollectionLiterals.<ICodeUnit>newArrayList(); this.units = _newArrayList; this.workspaceProject = project; IWorkspace _workspace = ResourcesPlugin.getWorkspace(); _workspace.addResourceChangeListener(this); boolean _isOpen = project.isOpen(); if (_isOpen) { this.open(); } } public List<IProject> getReferencedProjects() { try { this.open(); return (List<IProject>)Conversions.doWrapArray(this.workspaceProject.getReferencedProjects()); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } @Override public Collection<ICodeUnit> getUnits() { this.open(); return Collections.<ICodeUnit>unmodifiableCollection(this.units); } @Override public IProject getWorkspaceProject() { return this.workspaceProject; } @Override public String toString() { String _string = super.toString(); final StringBuffer result = new StringBuffer(_string); result.append(" (workspaceProject: "); result.append(this.workspaceProject); result.append(")"); return result.toString(); } @Override public String getName() { return this.workspaceProject.getName(); } @Override public IErlangModelElement getParent() { return this.model; } @Override public IResource getResource() { return this.workspaceProject; } private boolean open() { boolean _xblockexpression = false; { InputOutput.<String>println(("OPEN " + this)); _xblockexpression = this.closed = false; } return _xblockexpression; } private boolean close() { boolean _xblockexpression = false; { InputOutput.<String>println(("CLOSE " + this)); _xblockexpression = this.closed = true; } return _xblockexpression; } @Override public void resourceChanged(final IResourceChangeEvent event) { try { int _type = event.getType(); boolean _notEquals = (_type != IResourceChangeEvent.POST_CHANGE); if (_notEquals) { return; } IResourceDelta _delta = event.getDelta(); final IResourceDeltaVisitor _function = new IResourceDeltaVisitor() { @Override public boolean visit(final IResourceDelta delta) throws CoreException { IResource _resource = delta.getResource(); IErlangProject _project = ErlangProject.this.getProject(); boolean _equals = Objects.equal(_resource, _project); if (_equals) { IErlangProject _project_1 = ErlangProject.this.getProject(); String _plus = ("CHANGE IN PROJECT " + _project_1); String _plus_1 = (_plus + " "); int _flags = delta.getFlags(); String _plus_2 = (_plus_1 + Integer.valueOf(_flags)); InputOutput.<String>println(_plus_2); int _flags_1 = delta.getFlags(); boolean _matched = false; if (!_matched) { int _flags_2 = delta.getFlags(); boolean _match = ErlangProject.this.match(_flags_2, IResourceDelta.OPEN); if (_match) { _matched=true; if (ErlangProject.this.closed) { ErlangProject.this.open(); } else { ErlangProject.this.close(); } } } if (!_matched) { int _flags_3 = delta.getFlags(); boolean _match_1 = ErlangProject.this.match(_flags_3, IResourceDelta.DESCRIPTION); if (_match_1) { _matched=true; } } if (!_matched) { int _flags_4 = delta.getFlags(); boolean _match_2 = ErlangProject.this.match(_flags_4, IResourceDelta.REMOVED); if (_match_2) { _matched=true; IWorkspace _workspace = ResourcesPlugin.getWorkspace(); _workspace.removeResourceChangeListener(ErlangProject.this); } } } return true; } }; _delta.accept(_function); } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } private boolean match(final int v, final int flag) { int _bitwiseAnd = (v & flag); return (_bitwiseAnd != 0); } @Override public BuildpathEntry getBuildpath() { try { boolean _hasNature = this.workspaceProject.hasNature("org.erlide.core.erlnature"); if (_hasNature) { return null; } return null; } catch (Throwable _e) { throw Exceptions.sneakyThrow(_e); } } }
[ "vladdu55@gmail.com" ]
vladdu55@gmail.com
e3194e5ea145b5093cf1023e5a72a71efe72631d
3f0672b82ba5b2ea756240038a792feac061588a
/src/main/java/grader/trace/interaction_logger/SavedAllStudentsProblemGradingHistoryInfo.java
4a2c7d185410451fccfe6c3b68b6d5ba8c4aa58a
[]
no_license
Kirny/Grader
28bc357415779dd8de6be45d523b091fa216eaff
207458b0bdf06156d02a66eaa864663c3cbac822
refs/heads/master
2021-01-17T16:25:40.981476
2015-11-08T17:10:33
2015-11-08T17:10:33
null
0
0
null
null
null
null
UTF-8
Java
false
false
945
java
package grader.trace.interaction_logger; import grader.interaction_logger.manual_grading_stats.AllStudentsProblemHistory; import grader.sakai.project.SakaiProject; import grader.sakai.project.SakaiProjectDatabase; import grader.steppers.OverviewProjectStepper; import grader.trace.GraderInfo; import grader.trace.steppers.AutoAutoGradeSet; public class SavedAllStudentsProblemGradingHistoryInfo extends GraderInfo{ AllStudentsProblemHistory savedProblemGradingHistory; public SavedAllStudentsProblemGradingHistoryInfo(String aMessage, AllStudentsProblemHistory aSavedProblemGradingHistory, Object aFinder) { super(aMessage, aFinder); } public AllStudentsProblemHistory getSavedProblemGradingHistory() { return savedProblemGradingHistory; } public void setSavedProblemGradingHistory( AllStudentsProblemHistory savedProblemGradingHistory) { this.savedProblemGradingHistory = savedProblemGradingHistory; } }
[ "dewan@cs.unc.edu" ]
dewan@cs.unc.edu
e35aaa231507581c7312292b53f624fd72d49e2e
d00ce6b82adb337e07c37966ac798f846e1928b0
/rafactoring.guru.designpattern/src/_05/prototype/shapes/demo/BundledShapeCache.java
c139935fbd93f0946e5f0fd5ec59453c8b0b1073
[]
no_license
rLyLmZ/injavawetrust-designpattern
c70cf4cbb4fac87d39da63d7b70d435e7a35d0f4
e51f87dbf14e86f49ed1638e96eddc9f4d9cc525
refs/heads/master
2020-09-16T02:55:37.308002
2018-11-19T12:59:10
2018-11-19T12:59:10
null
0
0
null
null
null
null
UTF-8
Java
false
false
954
java
package _05.prototype.shapes.demo; import java.util.HashMap; import java.util.Map; import _05.prototype.shapes.Circle; import _05.prototype.shapes.Rectangle; import _05.prototype.shapes.Shape; public class BundledShapeCache { private Map<String, Shape> cache = new HashMap<>(); public BundledShapeCache() { Circle circle = new Circle(); circle.x = 5; circle.y = 7; circle.radius = 45; circle.color = "Green"; Rectangle rectangle = new Rectangle(); rectangle.x = 6; rectangle.y = 9; rectangle.width = 8; rectangle.height = 10; rectangle.color = "Blue"; cache.put("Big green circle", circle); cache.put("Medium blue rectangle", rectangle); } public Shape put(String key, Shape shape) { cache.put(key, shape); return shape; } public Shape get(String key) { return cache.get(key).clone(); } }
[ "erguder.levent@gmail.com" ]
erguder.levent@gmail.com
01bea855bae6ad216f01abf1f62c8fa0f226a3ea
34b662f2682ae9632060c2069c8b83916d6eecbd
/android/support/v4/util/AtomicFile.java
3aa8a062486f382dfebbec38ffb6fc9ec95cf377
[]
no_license
mattshapiro/fc40
632c4df2d7e117100705325544fc709cd38bb0a9
b47ee545260d3e0de66dd05a973b457a3c03f5cf
refs/heads/master
2021-01-19T00:25:32.311567
2015-03-07T00:48:51
2015-03-07T00:48:51
31,795,769
0
1
null
null
null
null
UTF-8
Java
false
false
3,954
java
package android.support.v4.util; import android.util.Log; import java.io.File; import java.io.FileDescriptor; import java.io.FileInputStream; import java.io.FileNotFoundException; import java.io.FileOutputStream; import java.io.IOException; public class AtomicFile { private final File mBackupName; private final File mBaseName; public AtomicFile(File paramFile) { this.mBaseName = paramFile; this.mBackupName = new File(paramFile.getPath() + ".bak"); } static boolean sync(FileOutputStream paramFileOutputStream) { if (paramFileOutputStream != null); try { paramFileOutputStream.getFD().sync(); return true; } catch (IOException localIOException) { } return false; } public void delete() { this.mBaseName.delete(); this.mBackupName.delete(); } public void failWrite(FileOutputStream paramFileOutputStream) { if (paramFileOutputStream != null) sync(paramFileOutputStream); try { paramFileOutputStream.close(); this.mBaseName.delete(); this.mBackupName.renameTo(this.mBaseName); return; } catch (IOException localIOException) { Log.w("AtomicFile", "failWrite: Got exception:", localIOException); } } public void finishWrite(FileOutputStream paramFileOutputStream) { if (paramFileOutputStream != null) sync(paramFileOutputStream); try { paramFileOutputStream.close(); this.mBackupName.delete(); return; } catch (IOException localIOException) { Log.w("AtomicFile", "finishWrite: Got exception:", localIOException); } } public File getBaseFile() { return this.mBaseName; } public FileInputStream openRead() throws FileNotFoundException { if (this.mBackupName.exists()) { this.mBaseName.delete(); this.mBackupName.renameTo(this.mBaseName); } return new FileInputStream(this.mBaseName); } public byte[] readFully() throws IOException { FileInputStream localFileInputStream = openRead(); int i = 0; try { Object localObject2 = new byte[localFileInputStream.available()]; while (true) { int j = localFileInputStream.read((byte[])localObject2, i, localObject2.length - i); if (j <= 0) return localObject2; i += j; int k = localFileInputStream.available(); if (k > localObject2.length - i) { byte[] arrayOfByte = new byte[i + k]; System.arraycopy(localObject2, 0, arrayOfByte, 0, i); localObject2 = arrayOfByte; } } } finally { localFileInputStream.close(); } } public FileOutputStream startWrite() throws IOException { if (this.mBaseName.exists()) { if (this.mBackupName.exists()) break label88; if (!this.mBaseName.renameTo(this.mBackupName)) Log.w("AtomicFile", "Couldn't rename file " + this.mBaseName + " to backup file " + this.mBackupName); } try { while (true) { FileOutputStream localFileOutputStream1 = new FileOutputStream(this.mBaseName); return localFileOutputStream1; label88: this.mBaseName.delete(); } } catch (FileNotFoundException localFileNotFoundException1) { if (!this.mBaseName.getParentFile().mkdir()) throw new IOException("Couldn't create directory " + this.mBaseName); try { FileOutputStream localFileOutputStream2 = new FileOutputStream(this.mBaseName); return localFileOutputStream2; } catch (FileNotFoundException localFileNotFoundException2) { } } throw new IOException("Couldn't create " + this.mBaseName); } } /* Location: /Users/mattshapiro/Downloads/dex2jar/com.dji.smartphone.downloader-dex2jar.jar * Qualified Name: android.support.v4.util.AtomicFile * JD-Core Version: 0.6.2 */
[ "typorrhea@gmail.com" ]
typorrhea@gmail.com
5538f9fee8f174814bc38db5f7e96c71380615c5
ee461488c62d86f729eda976b421ac75a964114c
/tags/HtmlUnit-2.16/src/test/java/com/gargoylesoftware/htmlunit/javascript/regexp/mozilla/js1_2/AsteriskTest.java
936f47dd94b42b781d3b0e38ab6d3e3bfd7d402b
[ "Apache-2.0" ]
permissive
svn2github/htmlunit
2c56f7abbd412e6d9e0efd0934fcd1277090af74
6fc1a7d70c08fb50fef1800673671fd9cada4899
refs/heads/master
2023-09-03T10:35:41.987099
2015-07-26T13:12:45
2015-07-26T13:12:45
37,107,064
0
1
null
null
null
null
UTF-8
Java
false
false
4,503
java
/* * Copyright (c) 2002-2015 Gargoyle Software Inc. * * 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 to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.gargoylesoftware.htmlunit.javascript.regexp.mozilla.js1_2; import org.junit.Test; import org.junit.runner.RunWith; import com.gargoylesoftware.htmlunit.BrowserRunner; import com.gargoylesoftware.htmlunit.BrowserRunner.Alerts; import com.gargoylesoftware.htmlunit.BrowserRunner.NotYetImplemented; import com.gargoylesoftware.htmlunit.WebDriverTestCase; /** * Tests originally in '/js/src/tests/js1_2/regexp/asterisk.js'. * * @version $Revision$ * @author Ahmed Ashour */ @RunWith(BrowserRunner.class) public class AsteriskTest extends WebDriverTestCase { /** * Tests 'abcddddefg'.match(new RegExp('d*')). * @throws Exception if the test fails */ @Test @Alerts("") public void test1() throws Exception { test("'abcddddefg'.match(new RegExp('d*'))"); } /** * Tests 'abcddddefg'.match(new RegExp('cd*')). * @throws Exception if the test fails */ @Test @Alerts("cdddd") public void test2() throws Exception { test("'abcddddefg'.match(new RegExp('cd*'))"); } /** * Tests 'abcdefg'.match(new RegExp('cx*d')). * @throws Exception if the test fails */ @Test @Alerts("cd") public void test3() throws Exception { test("'abcdefg'.match(new RegExp('cx*d'))"); } /** * Tests 'xxxxxxx'.match(new RegExp('(x*)(x+)')). * @throws Exception if the test fails */ @Test @Alerts("xxxxxxx,xxxxxx,x") public void test4() throws Exception { test("'xxxxxxx'.match(new RegExp('(x*)(x+)'))"); } /** * Tests '1234567890'.match(new RegExp('(\\d*)(\\d+)')). * @throws Exception if the test fails */ @Test @Alerts("1234567890,123456789,0") public void test5() throws Exception { test("'1234567890'.match(new RegExp('(\\\\d*)(\\\\d+)'))"); } /** * Tests '1234567890'.match(new RegExp('(\\d*)\\d(\\d+)')). * @throws Exception if the test fails */ @Test @Alerts("1234567890,12345678,0") public void test6() throws Exception { test("'1234567890'.match(new RegExp('(\\\\d*)\\\\d(\\\\d+)'))"); } /** * Tests 'xxxxxxx'.match(new RegExp('(x+)(x*)')). * @throws Exception if the test fails */ @Test @Alerts("xxxxxxx,xxxxxxx,") public void test7() throws Exception { test("'xxxxxxx'.match(new RegExp('(x+)(x*)'))"); } /** * Tests 'xxxxxxyyyyyy'.match(new RegExp('x*y+$')). * @throws Exception if the test fails */ @Test @Alerts("xxxxxxyyyyyy") public void test8() throws Exception { test("'xxxxxxyyyyyy'.match(new RegExp('x*y+$'))"); } /** * Tests 'abcdef'.match(/[\d]*[\s]*bc./). * @throws Exception if the test fails */ @Test @Alerts("bcd") public void test9() throws Exception { test("'abcdef'.match(/[\\d]*[\\s]*bc./)"); } /** * Tests 'abcdef'.match(/bc..[\d]*[\s]*\/). * @throws Exception if the test fails */ @Test @Alerts("bcde") public void test10() throws Exception { test("'abcdef'.match(/bc..[\\d]*[\\s]*/)"); } /** * Tests 'a1b2c3'.match(/.*\/). * @throws Exception if the test fails */ @Test @Alerts("a1b2c3") public void test11() throws Exception { test("'a1b2c3'.match(/.*/)"); } /** * Tests 'a0.b2.c3'.match(/[xyz]*1/. * @throws Exception if the test fails */ @Test @Alerts("") @NotYetImplemented public void test12() throws Exception { test("'a0.b2.c3'.match(/[xyz]*1/"); } private void test(final String script) throws Exception { final String html = "<html><head><title>foo</title><script>\n" + " alert(" + script + ");\n" + "</script></head><body>\n" + "</body></html>"; loadPageWithAlerts2(html); } }
[ "asashour@5f5364db-9458-4db8-a492-e30667be6df6" ]
asashour@5f5364db-9458-4db8-a492-e30667be6df6
e83f63a81726f7174cbd027ee689a603cc046ed5
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
/Code Snippet Repository/Hibernate/Hibernate10396.java
ac91ca928789d23441e9d00bda481c0eb51c2630
[]
no_license
saber13812002/DeepCRM
3336a244d4852a364800af3181e03e868cf6f9f5
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
refs/heads/master
2023-03-16T00:08:06.473699
2018-04-18T05:29:50
2018-04-18T05:29:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
869
java
@Test @TestForIssue(jiraKey = "") public void testTransactionProcessSynchronization() { final EventListenerRegistry registry = sessionFactory().getServiceRegistry() .getService( EventListenerRegistry.class ); final CountingPostInsertTransactionBoundaryListener listener = new CountingPostInsertTransactionBoundaryListener(); registry.getEventListenerGroup( EventType.POST_INSERT ).appendListener( listener ); Session session = openSession(); session.getTransaction().begin(); StrTestEntity entity = new StrTestEntity( "str1" ); session.save( entity ); session.getTransaction().commit(); session.close(); // Post insert listener invoked three times - before/after insertion of original data, // revision entity and audit row. Assert.assertEquals( 3, listener.getBeforeCount() ); Assert.assertEquals( 3, listener.getAfterCount() ); }
[ "Qing.Mi@my.cityu.edu.hk" ]
Qing.Mi@my.cityu.edu.hk
9154c1dfd1f412f2bd41fbcfc34f3d50e5f6c4bd
a3a583c5779c8c75af564660f64a342ef5a2c7e9
/btbank-server/src/main/java/com/spark/bitrade/api/vo/MinerBalanceTransactionsVO.java
fea8d1ac090ff962d488ed0c579151147b6472fa
[]
no_license
Coredesing/silk-v2
d55b2311964602ff2256e9d85112d3d21cd26168
7bbe0a640e370b676d1b047412b0102152e6ffde
refs/heads/master
2022-05-24T14:26:53.218326
2020-04-28T03:01:25
2020-04-28T03:01:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
336
java
package com.spark.bitrade.api.vo; import com.spark.bitrade.repository.entity.BtBankMinerBalanceTransaction; import lombok.Data; import java.util.List; /** * @author Administrator * @time 2019.10.25 20:09 */ @Data public class MinerBalanceTransactionsVO { List<BtBankMinerBalanceTransaction> content; Long totalElements; }
[ "huihui123" ]
huihui123
e911e4a4e5f73b4a01786fa66818dab543bd189a
529a3131d308c873347f8fb39c3a806d10090201
/core/src/main/java/cucumber/runtime/arquillian/api/event/BeforeStep.java
f8d08f5819262986cbaa6249f9b82b024034e8d8
[]
no_license
greggvarona/cukespace
5accd2af4a8af291cf0fa688e3a3dd9054694ef1
d01bd5736a539a4e41033753f4c3a32540731331
refs/heads/master
2021-01-11T01:42:25.341628
2016-10-17T09:16:13
2016-10-17T09:16:13
70,657,488
1
0
null
2016-10-12T03:08:20
2016-10-12T03:08:20
null
UTF-8
Java
false
false
239
java
package cucumber.runtime.arquillian.api.event; import gherkin.formatter.model.Step; public class BeforeStep extends StepEvent { public BeforeStep(final String featurePath, final Step step) { super(featurePath, step); } }
[ "rmannibucau@apache.org" ]
rmannibucau@apache.org
bd268e8b5be8fc782abbca27cc05455ed2a53bcb
f405015899c77fc7ffcc1fac262fbf0b6d396842
/sec2-basis/sec2-saml-client/src/main/java/org/sec2/saml/client/engine/SecurityProviderConnectorFactory.java
747e86eba2786972d8827b7ecc8a9a56a86a6210
[]
no_license
OniXinO/Sec2
a10ac99dd3fbd563288b8d21806afd949aea4f76
d0a4ed1ac97673239a8615a7ddac1d0fc0a1e988
refs/heads/master
2022-05-01T18:43:42.532093
2016-01-18T19:28:20
2016-01-18T19:28:20
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,496
java
/* * Copyright 2012 Ruhr-University Bochum, Chair for Network and Data Security * * This source code is part of the "Sec2" project and as this remains property * of the project partners. Content and concepts have to be treated as * CONFIDENTIAL. Publication or partly disclosure without explicit * written permission is prohibited. * For details on "Sec2" and its contributors visit * * http://nds.rub.de/research/projects/sec2/ */ package org.sec2.saml.client.engine; import java.security.Security; import org.sec2.exceptions.EntityUnknownException; import org.sec2.securityprovider.mobileclient.MobileClientProvider; /** * Insert description here. * * @author Dennis Felsch - dennis.felsch@rub.de * @version 0.1 * * November 05, 2012 */ //FIXME: Remove class for final version public final class SecurityProviderConnectorFactory { /** * ... */ private SecurityProviderConnectorFactory() { } /** * ... * @return ... * @throws EntityUnknownException ... */ public static ISecurityProviderConnector getSecurityProviderConnector() throws EntityUnknownException { if (Security.getProviders()[0].getName(). equals(MobileClientProvider.PROVIDER_NAME)) { //TODO: real connector, then remove the whole thing ;) return SecurityProviderConnectorDummy.getInstance(); } else { return SecurityProviderConnectorDummy.getInstance(); } } }
[ "developer@developer-VirtualBox" ]
developer@developer-VirtualBox
066e7dc99f7b1bb4c89a175f99e29b3865a29a2f
8d562fefacb4df2ab22a513111704ad1b8b730ea
/JavaBasic/src/b_operator/Ex10_Assignment.java
7221350b14e716faf09bdf296ca1a467905180ea
[]
no_license
ILJ125/ilj125.github.com
b3d7f5fb05f878fa98ae57e6c2fae89ff219097c
16858ad0481b5f4c1d16aa316fbe424bc52cc185
refs/heads/master
2021-03-28T08:24:27.948538
2020-04-21T04:50:08
2020-04-21T04:50:08
247,852,387
0
0
null
2020-04-21T04:26:56
2020-03-17T01:30:15
Java
UTF-8
Java
false
false
567
java
package b_operator; /* * 연산자와 대입연산자를 합치기 * - 산술, 이진논리, 쉬프트 */ public class Ex10_Assignment { public static void main(String[] args) { int a = 10; int b = 7; a+= b;//a=a+b System.out.println("+= 결과 : " + a );//17 a-= b;//a=a-b System.out.println("-= 결과 : " + a );//10 a*= b;//a=a*b System.out.println("*= 결과 : " + a );//70 a/= b;//a=a/b System.out.println("/= 결과 : " + a );//10 a%= b;//a=a%b System.out.println("%= 결과 : " + a );//3 } }
[ "Canon@DESKTOP-PL2F7PK" ]
Canon@DESKTOP-PL2F7PK
f4d2c1dc44ed17961db230322d980777c47bc94b
77f5ffa5a893930698d985161cbbbde851343e3a
/src/main/java/com/entor/controller/FeeController.java
82eb8f5053894f01d08b41b01c29f2f9f416e9ad
[]
no_license
cjk666/crm
d644c8bc5d6ae5d3114f263da5496dac92f74288
086041fb0f03105b46830b348677445b6c8077e3
refs/heads/master
2022-12-23T19:57:03.141700
2020-01-02T08:43:12
2020-01-02T08:43:12
231,341,049
0
0
null
2022-12-16T14:51:22
2020-01-02T08:41:26
JavaScript
UTF-8
Java
false
false
2,537
java
package com.entor.controller; import java.text.SimpleDateFormat; import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.propertyeditors.CustomDateEditor; import org.springframework.stereotype.Controller; import org.springframework.web.bind.ServletRequestDataBinder; import org.springframework.web.bind.annotation.InitBinder; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.entor.entity.Result; import com.entor.entity.view.VFee; import com.entor.entity.Fee; import com.entor.service.IFeeService; @Controller @RequestMapping("/fee") public class FeeController { @Autowired private IFeeService feeService; @RequestMapping("/add") @ResponseBody public Result add(Fee fee) { feeService.add(fee); Result result = new Result(); result.setMsg("保存数据成功"); result.setStatue(0); return result; } @RequestMapping("/deleteMore") @ResponseBody public Result deleteMore(String ids) { feeService.deleteMore(ids); Result result = new Result(); result.setMsg("删除成功"); result.setStatue(0); return result; } @RequestMapping("/update") @ResponseBody public Result update(Fee fee) { feeService.update(fee); Result result = new Result(); result.setMsg("修改数据成功"); result.setStatue(0); return result; } @RequestMapping("/queryByPage") @ResponseBody public Map<String, Object> queryByPage(@RequestParam(value="page",required=false,defaultValue="1") String page, @RequestParam(value="rows",required=false,defaultValue="20") String rows){ List<VFee> list = feeService.queryByPage(Integer.parseInt(page), Integer.parseInt(rows)); int total = feeService.getTotal(); Map<String, Object> map = new HashMap<>(); map.put("total", total); map.put("rows", list); return map; } @RequestMapping("/queryAll") @ResponseBody public List<Fee> queryAll(){ List<Fee> list = feeService.queryAll(); return list; } @InitBinder public void initBinder(ServletRequestDataBinder binder) { //如果客户端传递yyyy-MM-dd格式的字符串,就当做java.util.Date类型处理 binder.registerCustomEditor(Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true)); } }
[ "Administrator@80DR054LIU0TTAN" ]
Administrator@80DR054LIU0TTAN
c973bc785e851d9b67560b56547129356e84f613
3245eaa2e90e417d144f282313f57c7fa7e85327
/Integracao/IntegracaoCipEJB/src/br/com/sicoob/sisbr/sicoobdda/integracaocip/xml/modelo/mensagens/DDA0102/GrupoDDA0102R2DesctTitComplexType.java
ddd337c8e85f47f1be312f9daa31d214042baf79
[]
no_license
pabllo007/DDA
01ca636fc56cb7200d6d87d4c9f69e9eb68486db
e900c03b37e03231e929a08ce66a7ac0ac269a49
refs/heads/master
2022-11-30T19:00:02.651730
2019-10-27T21:25:14
2019-10-27T21:25:14
217,918,454
0
0
null
2022-11-24T06:24:00
2019-10-27T21:23:22
Java
UTF-8
Java
false
false
3,435
java
// // This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.4-2 // See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> // Any modifications to this file will be lost upon recompilation of the source schema. // Generated on: 2016.10.27 at 09:22:24 AM BRST // package br.com.sicoob.sisbr.sicoobdda.integracaocip.xml.modelo.mensagens.DDA0102; import java.math.BigDecimal; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; import javax.xml.bind.annotation.XmlSchemaType; import javax.xml.bind.annotation.XmlType; import javax.xml.datatype.XMLGregorianCalendar; /** * <p> * Java class for Grupo_DDA0102R2_DesctTitComplexType complex type. * * <p> * The following schema fragment specifies the expected content contained within this class. * * <pre> * &lt;complexType name="Grupo_DDA0102R2_DesctTitComplexType"> * &lt;complexContent> * &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> * &lt;sequence> * &lt;element name="DtDesctTit" type="{http://www.w3.org/2001/XMLSchema}date" minOccurs="0"/> * &lt;element name="CodDesctTit" type="{http://www.bcb.gov.br/SPB/DDA0102.xsd}CodDesctTit"/> * &lt;element name="Vlr_PercDesctTit" type="{http://www.bcb.gov.br/SPB/DDA0102.xsd}Vlr_PercDDA"/> * &lt;/sequence> * &lt;/restriction> * &lt;/complexContent> * &lt;/complexType> * </pre> * * */ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "Grupo_DDA0102R2_DesctTitComplexType", propOrder = { "dtDesctTit", "codDesctTit", "vlrPercDesctTit" }) public class GrupoDDA0102R2DesctTitComplexType { @XmlElement(name = "DtDesctTit") @XmlSchemaType(name = "date") private XMLGregorianCalendar dtDesctTit; @XmlElement(name = "CodDesctTit", required = true) private String codDesctTit; @XmlElement(name = "Vlr_PercDesctTit", required = true) private BigDecimal vlrPercDesctTit; /** * Gets the value of the dtDesctTit property. * * @return possible object is {@link XMLGregorianCalendar } * */ public XMLGregorianCalendar getDtDesctTit() { return dtDesctTit; } /** * Sets the value of the dtDesctTit property. * * @param value allowed object is {@link XMLGregorianCalendar } * */ public void setDtDesctTit(XMLGregorianCalendar value) { this.dtDesctTit = value; } /** * Gets the value of the codDesctTit property. * * @return possible object is {@link String } * */ public String getCodDesctTit() { return codDesctTit; } /** * Sets the value of the codDesctTit property. * * @param value allowed object is {@link String } * */ public void setCodDesctTit(String value) { this.codDesctTit = value; } /** * Gets the value of the vlrPercDesctTit property. * * @return possible object is {@link BigDecimal } * */ public BigDecimal getVlrPercDesctTit() { return vlrPercDesctTit; } /** * Sets the value of the vlrPercDesctTit property. * * @param value allowed object is {@link BigDecimal } * */ public void setVlrPercDesctTit(BigDecimal value) { this.vlrPercDesctTit = value; } }
[ "=" ]
=
91ac6597b890cf35a3f13e6072d1ccdea31d1701
e26fceb0c49ca5865fcf36bd161a168530ae4e69
/OpenAMASE/lib/GRAL/java/de/erichseifert/gral/util/SerializableShape.java
628f17e300f9000aedefbf4635a19dcae28a107b
[ "LicenseRef-scancode-warranty-disclaimer", "LicenseRef-scancode-us-govt-public-domain", "LicenseRef-scancode-unknown-license-reference" ]
permissive
sahabi/OpenAMASE
e1ddd2c62848f0046787acbb02b8d31de2f03146
b50f5a71265a1f1644c49cce2161b40b108c65fe
refs/heads/master
2021-06-17T14:15:16.366053
2017-05-07T13:16:35
2017-05-07T13:16:35
90,772,724
3
0
null
null
null
null
UTF-8
Java
false
false
2,561
java
// =============================================================================== // Authors: AFRL/RQQD // Organization: Air Force Research Laboratory, Aerospace Systems Directorate, Power and Control Division // // Copyright (c) 2017 Government of the United State of America, as represented by // the Secretary of the Air Force. No copyright is claimed in the United States under // Title 17, U.S. Code. All Other Rights Reserved. // =============================================================================== /* * GRAL: GRAphing Library for Java(R) * * (C) Copyright 2009-2013 Erich Seifert <dev[at]erichseifert.de>, * Michael Seifert <mseifert[at]error-reports.org> * * This file is part of GRAL. * * GRAL is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * GRAL is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with GRAL. If not, see <http://www.gnu.org/licenses/>. */ package de.erichseifert.gral.util; import java.awt.Shape; import java.awt.geom.Path2D; import java.util.List; import de.erichseifert.gral.util.GeometryUtils.PathSegment; /** * A wrapper for creating serializable objects from instances of * {@link java.awt.Shape} (e.g. {@link java.awt.geom.Path2D}). */ public class SerializableShape implements SerializationWrapper<Shape> { /** Version id for serialization. */ private static final long serialVersionUID = -8849270838795846599L; /** Shape segments. */ private final List<PathSegment> segments; /** Flag to determine whether the class was of type Path2D.Double or Path2D.Float. */ private final boolean isDouble; /** * Initializes a new wrapper with a {@code Shape} instance. * @param shape Wrapped object. */ public SerializableShape(Shape shape) { segments = GeometryUtils.getSegments(shape); isDouble = !(shape instanceof Path2D.Float); } /** * Creates a new instance of the wrapped class using the data from the * wrapper. This is used for deserialization. * @return An instance containing the data from the wrapper. */ public Shape unwrap() { return GeometryUtils.getShape(segments, isDouble); } }
[ "derek.kingston@us.af.mil" ]
derek.kingston@us.af.mil
7926b0313d76f89bb82d6ad55dbdf9a329faecb5
69ed18f94b2c1caf9742d983f5daf28f40614ca2
/BomWebPortal/src/com/bomwebportal/lts/web/acq/LtsAcqEdfRefController.java
bb1bdaa145b9f0c5e565679dd98f00dde6dddab3
[]
no_license
RodexterMalinao/springBoard
d1b4f9d2f7e76f63e2690f414863096e3e271369
aa4bf03395b12d923d28767e1561049c45ee3261
refs/heads/master
2020-09-03T07:21:15.415737
2019-12-16T07:12:22
2019-12-16T07:12:22
219,409,720
0
1
null
2019-12-16T07:12:23
2019-11-04T03:28:03
Java
UTF-8
Java
false
false
3,349
java
package com.bomwebportal.lts.web.acq; import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import org.springframework.validation.BindException; import org.springframework.web.servlet.ModelAndView; import org.springframework.web.servlet.mvc.SimpleFormController; import org.springframework.web.servlet.view.RedirectView; import com.bomwebportal.dto.BomSalesUserDTO; import com.bomwebportal.lts.dto.AcqOrderCaptureDTO; import com.bomwebportal.lts.dto.form.LtsEdfRefFormDTO; import com.bomwebportal.lts.dto.order.SbOrderDTO; import com.bomwebportal.lts.dto.order.ServiceDetailDTO; import com.bomwebportal.lts.dto.order.ServiceDetailOtherLtsDTO; import com.bomwebportal.lts.service.order.OrderModifyService; import com.bomwebportal.lts.util.LtsConstant; import com.bomwebportal.lts.util.LtsSbOrderHelper; import com.bomwebportal.lts.util.LtsSessionHelper; public class LtsAcqEdfRefController extends SimpleFormController { private final String commandName = "ltsEdfRefCmd"; private final String viewName = "/lts/acq/ltsacqedfref"; private final String nextView = "ltsacqedfref.html?submit=true"; protected OrderModifyService orderModifyService; public OrderModifyService getOrderModifyService() { return orderModifyService; } public void setOrderModifyService(OrderModifyService orderModifyService) { this.orderModifyService = orderModifyService; } public LtsAcqEdfRefController() { setCommandClass(LtsEdfRefFormDTO.class); setCommandName(commandName); setFormView(viewName); } @Override protected ModelAndView handleRequestInternal(HttpServletRequest request, HttpServletResponse response) throws Exception { AcqOrderCaptureDTO acqOrderCapture = LtsSessionHelper.getAcqOrderCapture(request); if (acqOrderCapture == null) { return new ModelAndView(LtsConstant.ERROR_VIEW); } return super.handleRequestInternal(request, response); } @Override public Object formBackingObject(HttpServletRequest request) throws ServletException { AcqOrderCaptureDTO acqOrderCapture = LtsSessionHelper.getAcqOrderCapture(request); SbOrderDTO sbOrder = acqOrderCapture.getSbOrder(); LtsEdfRefFormDTO form = new LtsEdfRefFormDTO(); if (sbOrder == null) { return form; } ServiceDetailDTO imsService = LtsSbOrderHelper.getImsService(sbOrder); if (imsService != null) { form.setEdfRef(((ServiceDetailOtherLtsDTO)imsService).getEdfRef()); } return form; } @Override protected ModelAndView onSubmit(HttpServletRequest request, HttpServletResponse response, Object command, BindException errors) throws Exception { AcqOrderCaptureDTO acqOrderCapture = LtsSessionHelper.getAcqOrderCapture(request); LtsEdfRefFormDTO form = (LtsEdfRefFormDTO)command; SbOrderDTO sbOrder = acqOrderCapture.getSbOrder(); ServiceDetailDTO imsService = LtsSbOrderHelper.getImsService(sbOrder); BomSalesUserDTO bomSalesUser = (BomSalesUserDTO)request.getSession().getAttribute(LtsConstant.SESSION_BOM_SALES_USER); if (imsService != null) { orderModifyService.updateEdfRef(sbOrder.getOrderId(), imsService.getDtlId(), form.getEdfRef(), bomSalesUser.getUsername()); } ((ServiceDetailOtherLtsDTO)imsService).setEdfRef(form.getEdfRef()); return new ModelAndView(new RedirectView(nextView)); } }
[ "acer_08_06@yahoo.com" ]
acer_08_06@yahoo.com
b56a9a25b3267ad0c0172618917fc24c4f25d1e7
6252c165657baa6aa605337ebc38dd44b3f694e2
/org.eclipse.epsilon.egl.sync/Scalability-Tests/boiler-To-Generate-600-Files/boiler-To-Generate-600-Files/syncregions-600Files/BoilerActuator2117.java
b815b6b2a84b8768e53da1971355779e7ce2f913
[]
no_license
soha500/EglSync
00fc49bcc73f7f7f7fb7641d0561ca2b9a8ea638
55101bc781349bb14fefc178bf3486e2b778aed6
refs/heads/master
2021-06-23T02:55:13.464889
2020-12-11T19:10:01
2020-12-11T19:10:01
139,832,721
0
1
null
2019-05-31T11:34:02
2018-07-05T10:20:00
Java
UTF-8
Java
false
false
263
java
package syncregions; public class BoilerActuator2117 { public execute(int temperatureDifference2117, boolean boilerStatus2117) { //sync _bfpnGUbFEeqXnfGWlV2117, behaviour Half Change - return temperature - targetTemperature; //endSync } }
[ "sultanalmutairi@172.20.10.2" ]
sultanalmutairi@172.20.10.2
60754b321e6afa76e0d752a3a9e14b230552dd54
a24ccb271d78b56bc4e7ccf2f3c5626730e2a071
/CoordinatorP/src/main/java/com/jcs/snackbar/widget/BlurKit.java
364b71facb3b031401731d36a53219d598887be6
[]
no_license
Jichensheng/ToolsPractice
c74e136183cbb9115bca197dee38a5b2efc447c9
c4e5b6788bf30915bd7c88080e0dee1e61265fa4
refs/heads/master
2021-01-19T19:35:51.359950
2017-09-07T11:33:10
2017-09-07T11:33:10
88,426,455
0
0
null
2017-08-15T02:54:06
2017-04-16T16:07:21
Java
UTF-8
Java
false
false
2,168
java
package com.jcs.snackbar.widget; import android.content.Context; import android.graphics.Bitmap; import android.graphics.Canvas; import android.graphics.Matrix; import android.support.v8.renderscript.Allocation; import android.support.v8.renderscript.Element; import android.support.v8.renderscript.RenderScript; import android.support.v8.renderscript.ScriptIntrinsicBlur; import android.view.View; public class BlurKit { private static BlurKit instance; private RenderScript rs; public static void init(Context context) { if (instance != null) { return; } instance = new BlurKit(); instance.rs = RenderScript.create(context); } public Bitmap blur(Bitmap src, int radius) { final Allocation input = Allocation.createFromBitmap(rs, src); final Allocation output = Allocation.createTyped(rs, input.getType()); final ScriptIntrinsicBlur script = ScriptIntrinsicBlur.create(rs, Element.U8_4(rs)); script.setRadius(radius); script.setInput(input); script.forEach(output); output.copyTo(src); return src; } public Bitmap blur(View src, int radius) { Bitmap bitmap = getBitmapForView(src, 1f); return blur(bitmap, radius); } public Bitmap fastBlur(View src, int radius, float downscaleFactor) { Bitmap bitmap = getBitmapForView(src, downscaleFactor); return blur(bitmap, radius); } private Bitmap getBitmapForView(View src, float downscaleFactor) { Bitmap bitmap = Bitmap.createBitmap( (int) (src.getWidth() * downscaleFactor), (int) (src.getHeight() * downscaleFactor), Bitmap.Config.ARGB_8888 ); Canvas canvas = new Canvas(bitmap); Matrix matrix = new Matrix(); matrix.preScale(downscaleFactor, downscaleFactor); canvas.setMatrix(matrix); src.draw(canvas); return bitmap; } public static BlurKit getInstance() { if (instance == null) { throw new RuntimeException("BlurKit not initialized!"); } return instance; } }
[ "jichensheng@foxmail.com" ]
jichensheng@foxmail.com
2c8943ebefe5fdc4684d0c1d352dae68198bd5c4
a335dfcca2110b943a8522941f445de951111066
/ServicePlatform/src/org/bimserver/serviceplatform/actionmgmt/DeleteAction.java
7e7e9461696065512dca5be3f6023eeaf69a1b31
[]
no_license
kyekiikyo/ServicePlatform
e741741b12db488e5ebde12ba6c755df469d6fcb
d38b4539ae3ef4603258ada410efbfa00d54ed6d
refs/heads/master
2021-12-10T23:17:22.555804
2016-09-30T05:24:36
2016-09-30T05:24:36
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,185
java
package org.bimserver.serviceplatform.actionmgmt; import java.util.Random; import org.bimserver.serviceplatform.DeadlockLoserDataAccessException; import org.bimserver.serviceplatform.ErrorCode; import org.bimserver.serviceplatform.HttpRequest; import org.bimserver.serviceplatform.RequestMapping; import org.bimserver.serviceplatform.RequestParameters; import org.bimserver.serviceplatform.ServerException; import org.bimserver.serviceplatform.UserException; import com.fasterxml.jackson.databind.JsonNode; public abstract class DeleteAction extends Action { public abstract JsonNode process(RequestParameters request) throws UserException, ServerException; public JsonNode process(HttpRequest request) throws Exception { return process(new RequestParameters(request, this.getClass().getAnnotation(RequestMapping.class))); }; public JsonNode processWithRetries(HttpRequest request) throws Exception { for (int i=0; i<10; i++) { try { return process(request); } catch (DeadlockLoserDataAccessException e) { Thread.sleep(i * new Random().nextInt(500)); } } throw new ServerException(ErrorCode.TOO_MANY_DEADLOCKS); } }
[ "ruben@logic-labs.nl" ]
ruben@logic-labs.nl
af028f1b397c2e0747068ca4e3cc7a1ce6b37524
6def7510eff84f1f87c3a8104d025acabe6daf72
/redisson/src/main/java/org/redisson/RedissonWriteLock.java
c5e9b709f0cb7bd11b467859310ecae7bc97c270
[ "Apache-2.0" ]
permissive
superhealth/redisson
3137702cd6d001efa9ea87a4d37fae8e35067dc1
09b2724c44567035c8806bfe4a79bdf355c816b8
refs/heads/master
2021-09-01T03:32:05.669015
2017-12-20T11:36:20
2017-12-20T11:36:20
115,315,003
1
0
null
2017-12-25T07:04:48
2017-12-25T07:04:48
null
UTF-8
Java
false
false
6,346
java
/** * Copyright 2016 Nikita Koksharov * * 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 to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.redisson; import java.util.Arrays; import java.util.UUID; import java.util.concurrent.TimeUnit; import java.util.concurrent.locks.Condition; import org.redisson.api.RFuture; import org.redisson.api.RLock; import org.redisson.client.codec.LongCodec; import org.redisson.client.codec.StringCodec; import org.redisson.client.protocol.RedisCommands; import org.redisson.client.protocol.RedisStrictCommand; import org.redisson.command.CommandAsyncExecutor; import org.redisson.pubsub.LockPubSub; import io.netty.util.concurrent.Future; import io.netty.util.concurrent.FutureListener; /** * Lock will be removed automatically if client disconnects. * * @author Nikita Koksharov * */ public class RedissonWriteLock extends RedissonLock implements RLock { protected RedissonWriteLock(CommandAsyncExecutor commandExecutor, String name, UUID id) { super(commandExecutor, name, id); } @Override String getChannelName() { return prefixName("redisson_rwlock", getName()); } @Override String getLockName(long threadId) { return super.getLockName(threadId) + ":write"; } @Override <T> RFuture<T> tryLockInnerAsync(long leaseTime, TimeUnit unit, long threadId, RedisStrictCommand<T> command) { internalLockLeaseTime = unit.toMillis(leaseTime); return commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, command, "local mode = redis.call('hget', KEYS[1], 'mode'); " + "if (mode == false) then " + "redis.call('hset', KEYS[1], 'mode', 'write'); " + "redis.call('hset', KEYS[1], ARGV[2], 1); " + "redis.call('pexpire', KEYS[1], ARGV[1]); " + "return nil; " + "end; " + "if (mode == 'write') then " + "if (redis.call('hexists', KEYS[1], ARGV[2]) == 1) then " + "redis.call('hincrby', KEYS[1], ARGV[2], 1); " + "local currentExpire = redis.call('pttl', KEYS[1]); " + "redis.call('pexpire', KEYS[1], currentExpire + ARGV[1]); " + "return nil; " + "end; " + "end;" + "return redis.call('pttl', KEYS[1]);", Arrays.<Object>asList(getName()), internalLockLeaseTime, getLockName(threadId)); } @Override protected RFuture<Boolean> unlockInnerAsync(long threadId) { return commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "local mode = redis.call('hget', KEYS[1], 'mode'); " + "if (mode == false) then " + "redis.call('publish', KEYS[2], ARGV[1]); " + "return 1; " + "end;" + "if (mode == 'write') then " + "local lockExists = redis.call('hexists', KEYS[1], ARGV[3]); " + "if (lockExists == 0) then " + "return nil;" + "else " + "local counter = redis.call('hincrby', KEYS[1], ARGV[3], -1); " + "if (counter > 0) then " + "redis.call('pexpire', KEYS[1], ARGV[2]); " + "return 0; " + "else " + "redis.call('hdel', KEYS[1], ARGV[3]); " + "if (redis.call('hlen', KEYS[1]) == 1) then " + "redis.call('del', KEYS[1]); " + "redis.call('publish', KEYS[2], ARGV[1]); " + "else " + // has unlocked read-locks "redis.call('hset', KEYS[1], 'mode', 'read'); " + "end; " + "return 1; "+ "end; " + "end; " + "end; " + "return nil;", Arrays.<Object>asList(getName(), getChannelName()), LockPubSub.unlockMessage, internalLockLeaseTime, getLockName(threadId)); } @Override public Condition newCondition() { throw new UnsupportedOperationException(); } @Override public RFuture<Boolean> forceUnlockAsync() { RFuture<Boolean> result = commandExecutor.evalWriteAsync(getName(), LongCodec.INSTANCE, RedisCommands.EVAL_BOOLEAN, "if (redis.call('hget', KEYS[1], 'mode') == 'write') then " + "redis.call('del', KEYS[1]); " + "redis.call('publish', KEYS[2], ARGV[1]); " + "return 1; " + "end; " + "return 0; ", Arrays.<Object>asList(getName(), getChannelName()), LockPubSub.unlockMessage); result.addListener(new FutureListener<Boolean>() { @Override public void operationComplete(Future<Boolean> future) throws Exception { if (future.isSuccess() && future.getNow()) { cancelExpirationRenewal(); } } }); return result; } @Override public boolean isLocked() { RFuture<String> future = commandExecutor.writeAsync(getName(), StringCodec.INSTANCE, RedisCommands.HGET, getName(), "mode"); String res = get(future); return "write".equals(res); } }
[ "abracham.mitchell@gmail.com" ]
abracham.mitchell@gmail.com
e115cdb36331d95d801bab590c28ac77060eea22
0c818a1b062cf3efa09de53e87653fc33ff08b09
/src/com/nisira/entidad/PARAMETRO_DISTRIBUCION.java
8e564de09933c284b0e60fffc17351a9aeccb9bd
[]
no_license
aburgosd91/MasterNisiraPatos
786dac77c43114d66c5624721b4760900fd8ffdf
92c7a503c29e89097f4f0513bec66aaf061fae6d
refs/heads/master
2021-01-20T01:23:28.380985
2017-04-24T20:25:53
2017-04-24T20:25:53
85,764,472
0
0
null
null
null
null
UTF-8
Java
false
false
3,663
java
package com.nisira.entidad; import com.nisira.annotation.ClavePrimaria; import com.nisira.annotation.Columna; import com.nisira.annotation.Tabla; import java.util.Date; @Tabla(nombre = "PARAMETRO_DISTRIBUCION") public class PARAMETRO_DISTRIBUCION { @ClavePrimaria @Columna private String IDEMPRESA; @ClavePrimaria @Columna private String IDPARAMETRO; @Columna private String NOMBRE; @Columna private Integer TIPO; @Columna private Date FECHACREACION; @Columna private Date FECHA_DETALLE; @Columna private Float ESTADO; /* Sets & Gets */ public void setIDEMPRESA(String IDEMPRESA) { this.IDEMPRESA = IDEMPRESA; } public String getIDEMPRESA() { return this.IDEMPRESA; } public void setIDPARAMETRO(String IDPARAMETRO) { this.IDPARAMETRO = IDPARAMETRO; } public String getIDPARAMETRO() { return this.IDPARAMETRO; } public void setNOMBRE(String NOMBRE) { this.NOMBRE = NOMBRE; } public String getNOMBRE() { return this.NOMBRE; } public void setTIPO(Integer TIPO) { this.TIPO = TIPO; } public Integer getTIPO() { return this.TIPO; } public void setFECHACREACION(Date FECHACREACION) { this.FECHACREACION = FECHACREACION; } public Date getFECHACREACION() { return this.FECHACREACION; } public void setFECHA_DETALLE(Date FECHA_DETALLE) { this.FECHA_DETALLE = FECHA_DETALLE; } public Date getFECHA_DETALLE() { return this.FECHA_DETALLE; } public void setESTADO(Float ESTADO) { this.ESTADO = ESTADO; } public Float getESTADO() { return this.ESTADO; } @Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((ESTADO == null) ? 0 : ESTADO.hashCode()); result = prime * result + ((FECHACREACION == null) ? 0 : FECHACREACION.hashCode()); result = prime * result + ((FECHA_DETALLE == null) ? 0 : FECHA_DETALLE.hashCode()); result = prime * result + ((IDEMPRESA == null) ? 0 : IDEMPRESA.hashCode()); result = prime * result + ((IDPARAMETRO == null) ? 0 : IDPARAMETRO.hashCode()); result = prime * result + ((NOMBRE == null) ? 0 : NOMBRE.hashCode()); result = prime * result + ((TIPO == null) ? 0 : TIPO.hashCode()); return result; } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PARAMETRO_DISTRIBUCION other = (PARAMETRO_DISTRIBUCION) obj; if (ESTADO == null) { if (other.ESTADO != null) return false; } else if (!ESTADO.equals(other.ESTADO)) return false; if (FECHACREACION == null) { if (other.FECHACREACION != null) return false; } else if (!FECHACREACION.equals(other.FECHACREACION)) return false; if (FECHA_DETALLE == null) { if (other.FECHA_DETALLE != null) return false; } else if (!FECHA_DETALLE.equals(other.FECHA_DETALLE)) return false; if (IDEMPRESA == null) { if (other.IDEMPRESA != null) return false; } else if (!IDEMPRESA.equals(other.IDEMPRESA)) return false; if (IDPARAMETRO == null) { if (other.IDPARAMETRO != null) return false; } else if (!IDPARAMETRO.equals(other.IDPARAMETRO)) return false; if (NOMBRE == null) { if (other.NOMBRE != null) return false; } else if (!NOMBRE.equals(other.NOMBRE)) return false; if (TIPO == null) { if (other.TIPO != null) return false; } else if (!TIPO.equals(other.TIPO)) return false; return true; } @Override public String toString() { return "[" + IDEMPRESA + ", " + IDPARAMETRO + ", " + NOMBRE + ", " + (TIPO==null?"Null":TIPO) + ", " + FECHACREACION + ", " + FECHA_DETALLE + ", " + ESTADO + "]"; } /* Sets & Gets FK*/ }
[ "aburgosd91@gmail.com" ]
aburgosd91@gmail.com
224024d17355a61b3a054c1325057e1713a74323
c4a765773c71885a63989a9430b749e8cd00e5d8
/cyber-iatoms-services/src/main/java/com/cybersoft4u/xian/iatoms/services/dbcp/EncryptedBasicDataSource.java
f603fea5a9f83277bb7dfc8456b487e0e3d98849
[]
no_license
momoDuan/Iatoms
78db9d5d67360226519e9a7f55aa7e48e531a635
54d5cd7b37725299da9f3e48c94610a4dd8245ce
refs/heads/master
2020-04-29T20:54:47.500276
2019-03-19T01:50:58
2019-03-19T01:50:58
176,397,020
0
1
null
null
null
null
UTF-8
Java
false
false
2,058
java
package com.cybersoft4u.xian.iatoms.services.dbcp; import org.apache.commons.dbcp.BasicDataSource; import com.cybersoft4u.xian.iatoms.common.IAtomsConstants; import com.cybersoft4u.xian.iatoms.common.utils.PasswordEncoderUtilities; import cafe.core.config.SystemConfigManager; /** * Purpose: BasicDataSource 加密字串 * @author evanliu * @since JDK 1.6 * @date 2017年8月2日 * @MaintenancePersonnel evanliu */ public class EncryptedBasicDataSource extends BasicDataSource { /** * Constructor:無參建構子 */ public EncryptedBasicDataSource() { super(); } /** * DB類別(IATOMS/FOMS) */ private String databaseType; /** * (non-Javadoc) * @see org.apache.commons.dbcp.BasicDataSource#setPassword(java.lang.String) *//* @Override public void setPassword(String password){ this.password = PasswordEncoderUtilities.decodePassword(password); } *//** * (non-Javadoc) * @see org.apache.commons.dbcp.BasicDataSource#setUsername(java.lang.String) *//* @Override public void setUsername(String username) { this.username = PasswordEncoderUtilities.decodePassword(username); }*/ /** * Purpose:初始化DB連接 * @author CrissZhang * @return void */ public void initDataSource(){ // database URL this.setUrl(SystemConfigManager.getProperty(this.databaseType, IAtomsConstants.PARAM_DATABASE_URL)); // database 用戶名 this.setUsername(PasswordEncoderUtilities.decodePassword(SystemConfigManager.getProperty(this.databaseType, IAtomsConstants.PARAM_DATABASE_USERNAME))); // database 密碼 this.setPassword(PasswordEncoderUtilities.decodePassword(SystemConfigManager.getProperty(this.databaseType, IAtomsConstants.PARAM_DATABASE_PWD))); } /** * @return the databaseType */ public String getDatabaseType() { return databaseType; } /** * @param databaseType the databaseType to set */ public void setDatabaseType(String databaseType) { this.databaseType = databaseType; } }
[ "carrieduan@cybersoft4u.com" ]
carrieduan@cybersoft4u.com
7238df5a8dddec5db7ebfecc5467acbe641dd1f9
09b7f281818832efb89617d6f6cab89478d49930
/root/projects/repository/source/java/org/alfresco/repo/domain/encoding/ibatis/EncodingDAOImpl.java
4200b641ae5d3d3c643c115111caceb4d8286253
[]
no_license
verve111/alfresco3.4.d
54611ab8371a6e644fcafc72dc37cdc3d5d8eeea
20d581984c2d22d5fae92e1c1674552c1427119b
refs/heads/master
2023-02-07T14:00:19.637248
2020-12-25T10:19:17
2020-12-25T10:19:17
323,932,520
1
1
null
null
null
null
UTF-8
Java
false
false
2,885
java
/* * Copyright (C) 2005-2010 Alfresco Software Limited. * * This file is part of Alfresco * * Alfresco is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Alfresco is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Alfresco. If not, see <http://www.gnu.org/licenses/>. */ package org.alfresco.repo.domain.encoding.ibatis; import org.alfresco.repo.domain.encoding.AbstractEncodingDAOImpl; import org.alfresco.repo.domain.encoding.EncodingEntity; import org.alfresco.repo.domain.mimetype.MimetypeEntity; import org.springframework.orm.ibatis.SqlMapClientTemplate; /** * iBatis-specific implementation of the Mimetype DAO. * * @author Derek Hulley * @since 3.2 */ public class EncodingDAOImpl extends AbstractEncodingDAOImpl { private static final String SELECT_ENCODING_BY_ID = "alfresco.content.select_EncodingById"; private static final String SELECT_ENCODING_BY_KEY = "alfresco.content.select_EncodingByKey"; private static final String INSERT_ENCODING = "alfresco.content.insert_Encoding"; private SqlMapClientTemplate template; public void setSqlMapClientTemplate(SqlMapClientTemplate sqlMapClientTemplate) { this.template = sqlMapClientTemplate; } @Override protected EncodingEntity getEncodingEntity(Long id) { EncodingEntity encodingEntity = new EncodingEntity(); encodingEntity.setId(id); encodingEntity = (EncodingEntity) template.queryForObject(SELECT_ENCODING_BY_ID, encodingEntity); // Done return encodingEntity; } @Override protected EncodingEntity getEncodingEntity(String encoding) { EncodingEntity encodingEntity = new EncodingEntity(); encodingEntity.setEncoding(encoding == null ? null : encoding.toLowerCase()); encodingEntity = (EncodingEntity) template.queryForObject(SELECT_ENCODING_BY_KEY, encodingEntity); // Could be null return encodingEntity; } @Override protected EncodingEntity createEncodingEntity(String encoding) { EncodingEntity encodingEntity = new EncodingEntity(); encodingEntity.setVersion(MimetypeEntity.CONST_LONG_ZERO); encodingEntity.setEncoding(encoding == null ? null : encoding.toLowerCase()); Long id = (Long) template.insert(INSERT_ENCODING, encodingEntity); encodingEntity.setId(id); // Done return encodingEntity; } }
[ "verve111@mail.ru" ]
verve111@mail.ru
c0ce2f9ea77fbaac487b3da0e176ade3ff306ddf
b21e385430d35b8598e0666a51723ce196bd3d76
/src/com/atguigu/prototype/deepclone/DeepCloneableTarget.java
c3f722ff6165b777164e45aef3e965feff79794d
[]
no_license
hufanglei/java-design
d66b37395f791124323d8f986eb3a23a311ea432
faf7c165519c1fd91a5408d20be8d84f5d4dc08d
refs/heads/master
2020-09-10T04:44:21.771479
2019-11-18T07:07:41
2019-11-18T07:07:41
221,651,445
0
0
null
null
null
null
UTF-8
Java
false
false
842
java
package com.atguigu.prototype.deepclone; import java.io.Serializable; public class DeepCloneableTarget implements Serializable, Cloneable{ private static final long serialVersionUID = 1L; private String cloneName; private String cloneClass; public DeepCloneableTarget(String cloneName, String cloneClass) { this.cloneName = cloneName; this.cloneClass = cloneClass; } //因为该类的属性,都是String , 因此我们这里使用默认的clone完成即可 @Override protected Object clone() throws CloneNotSupportedException { return super.clone(); } @Override public String toString() { return "DeepCloneableTarget{" + "cloneName='" + cloneName + '\'' + ", cloneClass='" + cloneClass + '\'' + '}'; } }
[ "690328661@qq.com" ]
690328661@qq.com
0620d6ebfda713392e0976e5ffff83c67ca8a77a
2a2a6a6107b3d5f5788f39815e5ca88a8332d8be
/java6/src/main/java/org/abqjug/reflectiontalk/Output.java
fc0547b57e37ffb063c7e0f33cce73dbe292113d
[]
no_license
johncarl81/reflectionTalk
c27d822b0634a76c18041466c2e4ef38e5827e4d
7608d47f825d1a995d29ab053e60d20b246c62e6
refs/heads/master
2020-05-16T21:17:44.509797
2011-08-31T03:10:28
2011-08-31T03:10:28
2,240,555
0
0
null
null
null
null
UTF-8
Java
false
false
564
java
package org.abqjug.reflectiontalk; import javax.tools.SimpleJavaFileObject; import java.io.ByteArrayOutputStream; import java.net.URI; class Output extends SimpleJavaFileObject { private final ByteArrayOutputStream baos = new ByteArrayOutputStream(); Output(String name, Kind kind) { super(URI.create("memo:///" + name.replace('.', '/') + kind.extension), kind); } byte[] toByteArray() { return this.baos.toByteArray(); } @Override public ByteArrayOutputStream openOutputStream() { return this.baos; } }
[ "johncarl81@gmail.com" ]
johncarl81@gmail.com
79af48aba4c7d65f7be95aa60c4e1d51533d4273
ad063462f74d94af10cd34ad6bfb39dd5a31760d
/src/main/java/com/library/datamodel/Json/GenerateIdRequest.java
22b25d38f980288d7c2f6932f93e419a8489af9b
[]
no_license
smallgod/library-dbmodels
a32c282d7e8b0858d305703d91f60004b14c3c2e
a648200b0c983a20c759037c208829e616b2c71a
refs/heads/master
2021-08-18T21:21:08.216948
2017-11-23T21:06:59
2017-11-23T21:06:59
111,849,984
0
0
null
null
null
null
UTF-8
Java
false
false
2,545
java
package com.library.datamodel.Json; import com.google.gson.annotations.SerializedName; import com.library.sgsharedinterface.JsonDataModel; import java.util.List; public class GenerateIdRequest implements JsonDataModel { /* JSON Request sample: { "method": "GENERATE_ID", "params": [ { "num_ids": 4, //I think we remove this, so that the bridge service tells us how many ids it has generated depending on what exist and doesn't "id_type": "LONG", //INTEGER "id": "FILE_ID", "existing_ids": [ 36382726, 958329744 ] }, { "num_ids": 3, //I think we remove this, so that the bridge service tells us how many ids it has generated depending on what exist and doesn't "id_type": "LONG", //INTEGER "id": "PROGRAM_ID", "existing_ids": [] } ] } */ @SerializedName(value = "method") private String methodName; @SerializedName(value = "params") private List<Params> params; public String getMethodName() { return methodName; } public void setMethodName(String methodName) { this.methodName = methodName; } public List<Params> getParams() { return params; } public void setParams(List<Params> params) { this.params = params; } public class Params { @SerializedName(value = "num_ids") private int numOfIds; @SerializedName(value = "id_type") private String idTypeToGenerate; @SerializedName(value = "id") private String id; @SerializedName(value = "existing_ids") private List<String> existingIdList; public int getNumOfIds() { return numOfIds; } public void setNumOfIds(int numOfIds) { this.numOfIds = numOfIds; } public String getIdTypeToGenerate() { return idTypeToGenerate; } public void setIdTypeToGenerate(String idTypeToGenerate) { this.idTypeToGenerate = idTypeToGenerate; } public String getId() { return id; } public void setId(String id) { this.id = id; } public List<String> getExistingIdList() { return existingIdList; } public void setExistingIdList(List<String> existingIdList) { this.existingIdList = existingIdList; } } }
[ "davies.mugume@gmail.com" ]
davies.mugume@gmail.com