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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
f45d0caf903b0256efa86f497253d2d81a4ebb06 | 02b3f9dc186c85d802c8142ba0920204a7a097cb | /src/main/java/com/example/reflect/demo/ReflectDemo4.java | 453ac901f29696692bff50d879450be3b56d2ce5 | [] | no_license | hufanglei/pattern-learn | 452581ee9e2d34c0a77cf3fa02812e88905cd3c3 | b7c031b9da8f4991b650815e7acd3e87790fe585 | refs/heads/master | 2022-08-02T01:52:29.406619 | 2020-06-07T01:55:58 | 2020-06-07T01:55:58 | 261,905,562 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,125 | java | package com.example.reflect.demo;
import java.lang.reflect.Constructor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
/**
* Title: ReflectDemo
* Description: TODO
*
* @author hfl
* @version V1.0
* @date 2020-05-02
*/
public class ReflectDemo4 {
public static void main(String[] args) throws ClassNotFoundException, InstantiationException, IllegalAccessException, NoSuchMethodException, InvocationTargetException, NoSuchFieldException {
// getMethodDemo();
getMethodDemo1();
}
private static void getMethodDemo1() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InstantiationException, InvocationTargetException {
Class<?> clazz = Class.forName("com.example.reflect.bean.Person");
//获取空参数一般方法
Method method = clazz.getMethod("paramMethod", String.class, int.class);
Object object = clazz.newInstance();
method.invoke(object, "小强", 23);
}
private static void getMethodDemo() throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {
Class<?> clazz = Class.forName("com.example.reflect.bean.Person");
Method[] methods = clazz.getMethods(); //获取的都是公有的方法
for (Method method : methods) {
System.out.println(method.getName());
}
System.out.println("-----------------------");
//只拿本类中的包括私有的
Method[] declaredMethods = clazz.getDeclaredMethods();
for (Method method : declaredMethods) {
System.out.println(method.getName());
}
System.out.println("-----------------------");
//获取空参数一般方法
Method method = clazz.getMethod("show", null);
//Object object = clazz.newInstance();
Constructor<?> constructor = clazz.getDeclaredConstructor(String.class, int.class);
Object o = constructor.newInstance("小王", 25);
method.invoke(o, null);
}
}
| [
"690328661@qq.com"
] | 690328661@qq.com |
035d8b64756a2d5da243a8233d9b8f8d2d555384 | fe273d9141ba4b751a7473f02389e6310582c570 | /SeriesGuide/src/main/java/com/battlelancer/seriesguide/loaders/TraktFriendsMovieHistoryLoader.java | 06e5bcb7157cfebe7dfdad6d6cd3d1d4864e6d1a | [
"Apache-2.0"
] | permissive | tasomaniac/SeriesGuide | 60f2ea67361706619054fc50eb241151dc21b992 | 04430c7375948c305d8c0cdd78fd3e014e4f613f | refs/heads/dev | 2020-12-07T13:41:14.752381 | 2015-11-12T08:40:36 | 2015-11-12T08:40:36 | 48,429,044 | 1 | 1 | null | 2015-12-22T11:45:26 | 2015-12-22T11:45:26 | null | UTF-8 | Java | false | false | 5,207 | java | /*
* Copyright 2015 Uwe Trottmann
*
* 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.battlelancer.seriesguide.loaders;
import android.content.Context;
import android.text.TextUtils;
import com.battlelancer.seriesguide.R;
import com.battlelancer.seriesguide.adapters.NowAdapter;
import com.battlelancer.seriesguide.settings.TraktCredentials;
import com.battlelancer.seriesguide.util.ServiceUtils;
import com.uwetrottmann.androidutils.GenericSimpleLoader;
import com.uwetrottmann.trakt.v2.TraktV2;
import com.uwetrottmann.trakt.v2.entities.Friend;
import com.uwetrottmann.trakt.v2.entities.HistoryEntry;
import com.uwetrottmann.trakt.v2.entities.Username;
import com.uwetrottmann.trakt.v2.enums.Extended;
import com.uwetrottmann.trakt.v2.enums.HistoryType;
import com.uwetrottmann.trakt.v2.exceptions.OAuthUnauthorizedException;
import com.uwetrottmann.trakt.v2.services.Users;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import retrofit.RetrofitError;
import timber.log.Timber;
/**
* Loads trakt friends, then returns the most recently watched movie for each friend.
*/
public class TraktFriendsMovieHistoryLoader extends GenericSimpleLoader<List<NowAdapter.NowItem>> {
public TraktFriendsMovieHistoryLoader(Context context) {
super(context);
}
@Override
public List<NowAdapter.NowItem> loadInBackground() {
TraktV2 trakt = ServiceUtils.getTraktV2WithAuth(getContext());
if (trakt == null) {
return null;
}
Users traktUsers = trakt.users();
// get all trakt friends
List<Friend> friends;
try {
friends = traktUsers.friends(Username.ME, Extended.IMAGES);
} catch (RetrofitError e) {
Timber.e(e, "Failed to load trakt friends");
return null;
} catch (OAuthUnauthorizedException e) {
TraktCredentials.get(getContext()).setCredentialsInvalid();
return null;
}
if (friends == null) {
return null;
}
int size = friends.size();
if (size == 0) {
return null;
}
// estimate list size
List<NowAdapter.NowItem> items = new ArrayList<>(size + 1);
// add header
items.add(
new NowAdapter.NowItem().header(getContext().getString(R.string.friends_recently)));
// add last watched movie for each friend
for (int i = 0; i < size; i++) {
Friend friend = friends.get(i);
// at least need a username
if (friend.user == null) {
continue;
}
String username = friend.user.username;
if (TextUtils.isEmpty(username)) {
continue;
}
// get last watched episode
List<HistoryEntry> history;
try {
history = traktUsers.history(new Username(username), HistoryType.MOVIES,
1, 1, Extended.IMAGES);
} catch (RetrofitError e) {
// abort, either lost connection or server error or other error
Timber.e(e, "Failed to load friend movie history");
return null;
} catch (OAuthUnauthorizedException ignored) {
// friend might have revoked friendship just now :(
continue;
}
if (history == null || history.size() == 0) {
// no history
continue;
}
HistoryEntry entry = history.get(0);
if (entry.watched_at == null || entry.movie == null) {
// missing required values
continue;
}
String poster = (entry.movie.images == null || entry.movie.images.poster == null) ? null
: entry.movie.images.poster.thumb;
String avatar = (friend.user.images == null || friend.user.images.avatar == null)
? null : friend.user.images.avatar.full;
NowAdapter.NowItem nowItem = new NowAdapter.NowItem().
displayData(
entry.watched_at.getMillis(),
"",
entry.movie.title,
poster
)
.tmdbId(entry.movie.ids == null ? null : entry.movie.ids.tmdb)
.friend(username, avatar, entry.action);
items.add(nowItem);
}
// only have a header? return nothing
if (items.size() == 1) {
return Collections.emptyList();
}
return items;
}
}
| [
"uwe.trottmann@gmail.com"
] | uwe.trottmann@gmail.com |
842740e138d7ac1f745cf4a8c331c897568e3802 | e0a2e4f069efaf254f37f2a59b9bb921864866f9 | /gravitee-rest-api-portal/gravitee-rest-api-portal-rest/src/test/java/io/gravitee/rest/api/portal/rest/mapper/RatingMapperTest.java | abb0be53e9637097acb96329424189be62223347 | [
"Apache-2.0"
] | permissive | kennethwsmith/gravitee-management-rest-api | e20cf1b7f224b106da4a2bf8e3fe78f8860f91d5 | 9240a5f4acb7f1f65abd8a6abdd0f94bc725eb11 | refs/heads/master | 2021-04-02T09:01:05.246692 | 2020-03-10T09:19:01 | 2020-03-11T10:22:28 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,778 | java | /**
* Copyright (C) 2015 The Gravitee team (http://gravitee.io)
*
* 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 io.gravitee.rest.api.portal.rest.mapper;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertNull;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.reset;
import java.time.Instant;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.junit.MockitoJUnitRunner;
import io.gravitee.rest.api.model.RatingAnswerEntity;
import io.gravitee.rest.api.model.RatingEntity;
import io.gravitee.rest.api.model.UserEntity;
import io.gravitee.rest.api.portal.rest.model.Rating;
import io.gravitee.rest.api.portal.rest.model.RatingAnswer;
import io.gravitee.rest.api.portal.rest.model.User;
import io.gravitee.rest.api.service.UserService;
/**
* @author Florent CHAMFROY (florent.chamfroy at graviteesource.com)
* @author GraviteeSource Team
*/
@RunWith(MockitoJUnitRunner.class)
public class RatingMapperTest {
private static final String RATING_API = "my-rating-api";
private static final String RATING_ID = "my-rating-id";
private static final String RATING_COMMENT = "my-rating-comment";
private static final String RATING_AUTHOR = "my-rating-author";
private static final String RATING_AUTHOR_DISPLAY_NAME = "my-rating-author-display-name";
private static final String RATING_TITLE = "my-rating-title";
private static final String RATING_RESPONSE_AUTHOR = "my-rating-response-author";
private static final String RATING_RESPONSE_COMMENT = "my-rating-response-comment";
private static final String RATING_RESPONSE_AUTHOR_DISPLAY_NAME = "my-rating-response-author-display-name";
private static final String RATING_RESPONSE_ID = "my-rating-response_ID";
@Mock
private UserService userService;
@Mock
private UserMapper userMapper;
@InjectMocks
private RatingMapper ratingMapper;
@Test
public void testConvert() {
reset(userService);
reset(userMapper);
Instant now = Instant.now();
Date nowDate = Date.from(now);
//init
RatingEntity ratingEntity = new RatingEntity();
RatingAnswerEntity ratingAnswerEntity = new RatingAnswerEntity();
ratingAnswerEntity.setComment(RATING_RESPONSE_COMMENT);
ratingAnswerEntity.setCreatedAt(nowDate);
ratingAnswerEntity.setId(RATING_RESPONSE_ID);
ratingAnswerEntity.setUser(RATING_RESPONSE_AUTHOR);
ratingAnswerEntity.setUserDisplayName(RATING_RESPONSE_AUTHOR_DISPLAY_NAME);
ratingEntity.setAnswers(Arrays.asList(ratingAnswerEntity));
ratingEntity.setApi(RATING_API);
ratingEntity.setComment(RATING_COMMENT);
ratingEntity.setCreatedAt(nowDate);
ratingEntity.setId(RATING_ID);
ratingEntity.setRate((byte)1);
ratingEntity.setTitle(RATING_TITLE);
ratingEntity.setUpdatedAt(nowDate);
ratingEntity.setUser(RATING_AUTHOR);
ratingEntity.setUserDisplayName(RATING_AUTHOR_DISPLAY_NAME);
UserEntity authorEntity = new UserEntity();
authorEntity.setId(RATING_AUTHOR);
UserEntity responseAuthorEntity = new UserEntity();
responseAuthorEntity.setId(RATING_RESPONSE_AUTHOR);
User author = new User();
author.setId(RATING_AUTHOR);
User responseAuthor = new User();
responseAuthor.setId(RATING_RESPONSE_AUTHOR);
doReturn(authorEntity).when(userService).findById(RATING_AUTHOR);
doReturn(responseAuthorEntity).when(userService).findById(RATING_RESPONSE_AUTHOR);
doReturn(author).when(userMapper).convert(authorEntity);
doReturn(responseAuthor).when(userMapper).convert(responseAuthorEntity);
Rating responseRating = ratingMapper.convert(ratingEntity);
assertNotNull(responseRating);
List<RatingAnswer> answers = responseRating.getAnswers();
assertNotNull(answers);
assertEquals(1, answers.size());
RatingAnswer ratingAnswer = answers.get(0);
assertNotNull(ratingAnswer);
assertEquals(RATING_RESPONSE_COMMENT, ratingAnswer.getComment());
assertEquals(now.toEpochMilli(), ratingAnswer.getDate().toInstant().toEpochMilli());
assertEquals(responseAuthor, ratingAnswer.getAuthor());
assertEquals(author, responseRating.getAuthor());
assertEquals(RATING_COMMENT, responseRating.getComment());
assertEquals(RATING_TITLE, responseRating.getTitle());
assertEquals(now.toEpochMilli(), responseRating.getDate().toInstant().toEpochMilli());
assertEquals(RATING_ID, responseRating.getId());
assertEquals(Integer.valueOf(1), responseRating.getValue());
}
@Test
public void testMinimalConvert() {
Rating responseRating = ratingMapper.convert(new RatingEntity());
assertNotNull(responseRating);
assertNull(responseRating.getAnswers());
assertNull(responseRating.getDate());
}
}
| [
"azize.elamrani@gmail.com"
] | azize.elamrani@gmail.com |
816a5723801f2f500d1da4a17e4ae58b21f3a29b | dcaeff088a8d3fc9ca7eeed5b9d0cddbd7ebfd94 | /src/org/eclipse/jgit/api/StashDropCommand.java | 23fbe0197f8153515422ccbc430c2eb10801433a | [] | no_license | NaruseII/ServerManager-GitDeploy | a36599b863fe12200e2399383ecb7ddac862e37d | e5b35086937533ba228dfea148876ab09eaf7211 | refs/heads/master | 2023-07-04T20:58:44.203614 | 2021-09-02T19:51:05 | 2021-09-02T19:51:05 | 402,486,650 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,529 | java | /*
* Copyright (C) 2012, GitHub Inc. and others
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Distribution License v. 1.0 which is available at
* https://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
package org.eclipse.jgit.api;
import static org.eclipse.jgit.lib.Constants.R_STASH;
import java.io.File;
import java.io.IOException;
import java.nio.file.StandardCopyOption;
import java.text.MessageFormat;
import java.util.List;
import org.eclipse.jgit.api.errors.GitAPIException;
import org.eclipse.jgit.api.errors.InvalidRefNameException;
import org.eclipse.jgit.api.errors.JGitInternalException;
import org.eclipse.jgit.api.errors.RefNotFoundException;
import org.eclipse.jgit.errors.LockFailedException;
import org.eclipse.jgit.internal.JGitText;
import org.eclipse.jgit.internal.storage.file.RefDirectory;
import org.eclipse.jgit.internal.storage.file.ReflogWriter;
import org.eclipse.jgit.lib.ObjectId;
import org.eclipse.jgit.lib.Ref;
import org.eclipse.jgit.lib.RefUpdate;
import org.eclipse.jgit.lib.RefUpdate.Result;
import org.eclipse.jgit.lib.ReflogEntry;
import org.eclipse.jgit.lib.ReflogReader;
import org.eclipse.jgit.lib.Repository;
import org.eclipse.jgit.util.FileUtils;
/**
* Command class to delete a stashed commit reference
* <p>
* Currently only supported on a traditional file repository using
* one-file-per-ref reflogs.
*
* @see <a href="http://www.kernel.org/pub/software/scm/git/docs/git-stash.html"
* >Git documentation about Stash</a>
* @since 2.0
*/
public class StashDropCommand extends GitCommand<ObjectId> {
private int stashRefEntry;
private boolean all;
/**
* Constructor for StashDropCommand.
*
* @param repo
* a {@link org.eclipse.jgit.lib.Repository} object.
*/
public StashDropCommand(Repository repo) {
super(repo);
if (!(repo.getRefDatabase() instanceof RefDirectory)) {
throw new UnsupportedOperationException(
JGitText.get().stashDropNotSupported);
}
}
/**
* Set the stash reference to drop (0-based).
* <p>
* This will default to drop the latest stashed commit (stash@{0}) if
* unspecified
*
* @param stashRef
* the 0-based index of the stash reference
* @return {@code this}
*/
public StashDropCommand setStashRef(int stashRef) {
if (stashRef < 0)
throw new IllegalArgumentException();
stashRefEntry = stashRef;
return this;
}
/**
* Set whether to drop all stashed commits
*
* @param all
* {@code true} to drop all stashed commits, {@code false} to
* drop only the stashed commit set via calling
* {@link #setStashRef(int)}
* @return {@code this}
*/
public StashDropCommand setAll(boolean all) {
this.all = all;
return this;
}
private Ref getRef() throws GitAPIException {
try {
return repo.exactRef(R_STASH);
} catch (IOException e) {
throw new InvalidRefNameException(MessageFormat.format(
JGitText.get().cannotRead, R_STASH), e);
}
}
private RefUpdate createRefUpdate(Ref stashRef) throws IOException {
RefUpdate update = repo.updateRef(R_STASH);
update.disableRefLog();
update.setExpectedOldObjectId(stashRef.getObjectId());
update.setForceUpdate(true);
return update;
}
private void deleteRef(Ref stashRef) {
try {
Result result = createRefUpdate(stashRef).delete();
if (Result.FORCED != result)
throw new JGitInternalException(MessageFormat.format(
JGitText.get().stashDropDeleteRefFailed, result));
} catch (IOException e) {
throw new JGitInternalException(JGitText.get().stashDropFailed, e);
}
}
private void updateRef(Ref stashRef, ObjectId newId) {
try {
RefUpdate update = createRefUpdate(stashRef);
update.setNewObjectId(newId);
Result result = update.update();
switch (result) {
case FORCED:
case NEW:
case NO_CHANGE:
return;
default:
throw new JGitInternalException(MessageFormat.format(
JGitText.get().updatingRefFailed, R_STASH, newId,
result));
}
} catch (IOException e) {
throw new JGitInternalException(JGitText.get().stashDropFailed, e);
}
}
/**
* {@inheritDoc}
* <p>
* Drop the configured entry from the stash reflog and return value of the
* stash reference after the drop occurs
*/
@Override
public ObjectId call() throws GitAPIException {
checkCallable();
Ref stashRef = getRef();
if (stashRef == null)
return null;
if (all) {
deleteRef(stashRef);
return null;
}
List<ReflogEntry> entries;
try {
ReflogReader reader = repo.getReflogReader(R_STASH);
if (reader == null) {
throw new RefNotFoundException(MessageFormat
.format(JGitText.get().refNotResolved, stashRef));
}
entries = reader.getReverseEntries();
} catch (IOException e) {
throw new JGitInternalException(JGitText.get().stashDropFailed, e);
}
if (stashRefEntry >= entries.size())
throw new JGitInternalException(
JGitText.get().stashDropMissingReflog);
if (entries.size() == 1) {
deleteRef(stashRef);
return null;
}
RefDirectory refdb = (RefDirectory) repo.getRefDatabase();
ReflogWriter writer = new ReflogWriter(refdb, true);
String stashLockRef = ReflogWriter.refLockFor(R_STASH);
File stashLockFile = refdb.logFor(stashLockRef);
File stashFile = refdb.logFor(R_STASH);
if (stashLockFile.exists())
throw new JGitInternalException(JGitText.get().stashDropFailed,
new LockFailedException(stashFile));
entries.remove(stashRefEntry);
ObjectId entryId = ObjectId.zeroId();
try {
for (int i = entries.size() - 1; i >= 0; i--) {
ReflogEntry entry = entries.get(i);
writer.log(stashLockRef, entryId, entry.getNewId(),
entry.getWho(), entry.getComment());
entryId = entry.getNewId();
}
try {
FileUtils.rename(stashLockFile, stashFile,
StandardCopyOption.ATOMIC_MOVE);
} catch (IOException e) {
throw new JGitInternalException(MessageFormat.format(
JGitText.get().renameFileFailed,
stashLockFile.getPath(), stashFile.getPath()),
e);
}
} catch (IOException e) {
throw new JGitInternalException(JGitText.get().stashDropFailed, e);
}
updateRef(stashRef, entryId);
try {
Ref newStashRef = repo.exactRef(R_STASH);
return newStashRef != null ? newStashRef.getObjectId() : null;
} catch (IOException e) {
throw new InvalidRefNameException(MessageFormat.format(
JGitText.get().cannotRead, R_STASH), e);
}
}
}
| [
"naruse.dev@gmail.com"
] | naruse.dev@gmail.com |
b06d938ba581c7bc77215759a03dcbfc9a7bbbe6 | 73be17993d40e32dc30f87f8e6af4f9cc865949e | /Java Programs (DSA)/FirstIndexOfNumber.java | 0e5ec88562b776794aaa8800880616a2da3e256e | [] | no_license | mitf/Hactoberfest_2021 | e4f26a14effb4eecb2764026fd23d6f0376e6b9b | 90f07681e2912ed80978c068d423b480960e01c9 | refs/heads/main | 2023-08-23T15:34:05.055331 | 2021-10-05T19:18:52 | 2021-10-05T19:18:52 | 415,580,085 | 1 | 0 | null | 2021-10-10T12:31:04 | 2021-10-10T12:31:03 | null | UTF-8 | Java | false | false | 1,567 | java | package recursion1;
import java.util.Scanner;
/*Given an array of length N and an integer x, you need to find and return the first index of integer x present in the array. Return -1 if it is not present in the array.
First index means, the index of first occurrence of x in the input array.
Do this recursively. Indexing in the array starts from 0.
Input Format :
Line 1 : An Integer N i.e. size of array
Line 2 : N integers which are elements of the array, separated by spaces
Line 3 : Integer x
Output Format :
first index or -1
Constraints :
1 <= N <= 10^3
Sample Input :
4
9 8 10 8
8
Sample Output :
1*/
public class FirstIndexOfNumber {
private static int firstIndexOccurrence(int[] arr, int x, int startIndex) {
if (startIndex >= arr.length) {
return -1;
}
if (arr[startIndex] == x) {
return startIndex;
}
return firstIndexOccurrence(arr, x, startIndex + 1);
}
public static int firstIndexOccurrence(int[] arr, int x) {
return firstIndexOccurrence(arr, x, 0);
}
public static int[] takeInput() {
Scanner scan = new Scanner(System.in);
int size = scan.nextInt();
int[] arr = new int[size];
for (int i = 0; i < size; i++) {
arr[i] = scan.nextInt();
}
return arr;
}
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
int[] arr = takeInput();
int x = scan.nextInt();
System.out.println("Index = " + firstIndexOccurrence(arr, x));
}
}
| [
"="
] | = |
f491c9b9824baa5121e6eacd2173748d35e8f773 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/30/30_370b78d64f94ceb7cadaa846d6be25e25cff3cd3/TaskEditor/30_370b78d64f94ceb7cadaa846d6be25e25cff3cd3_TaskEditor_s.java | 74ca0a2956fee63beb372128fa45036809720ab0 | [] | 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,711 | java | /* TaskEditor
* Written in 2012 by anonymous.
*
* To the extent possible under law, the author(s) have dedicated all copyright and related and neighbouring rights to
* this software to the public domain worldwide. This software is distributed without any warranty.
*
* Full license at <http://creativecommons.org/publicdomain/zero/1.0/>.
*/
package anonpds.TaskMistress;
import javax.swing.JTextArea;
import javax.swing.event.DocumentEvent;
import javax.swing.event.DocumentListener;
/**
* Class that implements an editor component for editing tasks in Task Mistress.
* @author anonpds <anonpds@gmail.com>
*/
@SuppressWarnings("serial")
public class TaskEditor extends JTextArea implements DocumentListener {
/** Tells whether the editor has changed since it was intialised. */
private boolean changed;
/** Default constructor. */
public TaskEditor() {
/* enable word wrapping */
this.setWrapStyleWord(true);
this.setLineWrap(true);
/* disable editing by default */
this.close(null);
/* add listener for text changes */
this.getDocument().addDocumentListener(this);
/* no changes */
this.changed = false;
}
/**
* Tells if the editor is open or closed.
* @return true is the editor is open, false if closed
*/
public boolean isOpen() {
return this.isEditable();
}
/**
* Tells whether the editor has changed since initialisation.
* @return true if the editor has changed, false if not
*/
public boolean hasChanged() {
return this.changed;
}
/**
* Opens the editor by setting the initial text and making the text editable.
* @param text the initial text of the editor
*/
public void open(String text) {
super.setText(text);
this.setEditable(true);
this.changed = false;
}
/**
* Closes the editor by making it non-editable and optionally setting a new text for it.
* @param text
*/
public void close(String text) {
if (text != null) this.setText(text);
this.setEditable(false);
this.changed = false;
}
/**
* Listens to text changes in the editor.
* @param e the change event
*/
@Override
public void changedUpdate(DocumentEvent e) {
this.changed = true;
}
/**
* Listens to text inserts in the editor.
* @param e the change event
*/
@Override
public void insertUpdate(DocumentEvent e) {
this.changed = true;
}
/**
* Listens to text removals in the editor.
* @param e the change event
*/
@Override
public void removeUpdate(DocumentEvent e) {
this.changed = true;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
0a44569088686ba342cb15ee2ad4973b61980fff | 8834218fae697508f4b5e16e803dd0c7a620cabf | /src/main/java/com/anjz/base/util/StringHelper.java | be075800b96ab34d40d9db860542b7a51c2e9d3d | [] | no_license | xxzds/frame_DS | 629efa9918d6f9b0b966ac6553458c35cd3d9e6d | a76841beff58b81e61433d27726d9fab373b427c | refs/heads/master | 2020-01-23T21:55:51.703318 | 2017-11-15T04:26:50 | 2017-11-15T04:26:50 | 74,729,729 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,217 | java | package com.anjz.base.util;
import java.util.Random;
public class StringHelper {
/**
* 非空处理
* @param value
* @param defaultValue
* @return
*/
public static String emptyIf(String value, String defaultValue) {
if (value == null || "".equals(value)) {
return defaultValue;
}
return value;
}
/**
* "abc_user"->"AbcUser"
* @param sqlName
* @return
*/
public static String makeAllWordFirstLetterUpperCase(String sqlName) {
String[] strs = sqlName.toLowerCase().split("_");
String result = "";
String preStr = "";
for (int i = 0; i < strs.length; i++) {
if (preStr.length() == 1) {
result += strs[i];
} else {
result += capitalize(strs[i]);
}
preStr = strs[i];
}
return result;
}
/**
* 替换
* @param inString 处理的字符串
* @param oldPattern 被替换的字符串
* @param newPattern 替换成的字符串
* @return
*/
public static String replace(String inString, String oldPattern, String newPattern) {
if (inString == null) {
return null;
}
if (oldPattern == null || newPattern == null) {
return inString;
}
StringBuffer sbuf = new StringBuffer();
// output StringBuffer we'll build up
int pos = 0; // our position in the old string
int index = inString.indexOf(oldPattern);
// the index of an occurrence we've found, or -1
int patLen = oldPattern.length();
while (index >= 0) {
sbuf.append(inString.substring(pos, index));
sbuf.append(newPattern);
pos = index + patLen;
index = inString.indexOf(oldPattern, pos);
}
sbuf.append(inString.substring(pos));
// remember to append any characters to the right of a match
return sbuf.toString();
}
/**
* 首字母大写
* @param str
* @return
*/
public static String capitalize(String str) {
return changeFirstCharacterCase(str, true);
}
/**
* 首字母小写
* @param str
* @return
*/
public static String uncapitalize(String str) {
return changeFirstCharacterCase(str, false);
}
private static String changeFirstCharacterCase(String str, boolean capitalize) {
if (str == null || str.length() == 0) {
return str;
}
StringBuffer buf = new StringBuffer(str.length());
if (capitalize) {
buf.append(Character.toUpperCase(str.charAt(0)));
} else {
buf.append(Character.toLowerCase(str.charAt(0)));
}
buf.append(str.substring(1));
return buf.toString();
}
private static final Random RANDOM = new Random();
public static String randomNumeric(int count) {
return random(count, false, true);
}
public static String random(int count, boolean letters, boolean numbers) {
return random(count, 0, 0, letters, numbers);
}
public static String random(int count, int start, int end, boolean letters, boolean numbers) {
return random(count, start, end, letters, numbers, null, RANDOM);
}
public static String random(int count, int start, int end, boolean letters, boolean numbers, char[] chars,
Random random) {
if (count == 0) {
return "";
} else if (count < 0) {
throw new IllegalArgumentException("Requested random string length " + count + " is less than 0.");
}
if ((start == 0) && (end == 0)) {
end = 'z' + 1;
start = ' ';
if (!letters && !numbers) {
start = 0;
end = Integer.MAX_VALUE;
}
}
char[] buffer = new char[count];
int gap = end - start;
while (count-- != 0) {
char ch;
if (chars == null) {
ch = (char) (random.nextInt(gap) + start);
} else {
ch = chars[random.nextInt(gap) + start];
}
if ((letters && Character.isLetter(ch)) || (numbers && Character.isDigit(ch)) || (!letters && !numbers)) {
if (ch >= 56320 && ch <= 57343) {
if (count == 0) {
count++;
} else {
// low surrogate, insert high surrogate after putting it
// in
buffer[count] = ch;
count--;
buffer[count] = (char) (55296 + random.nextInt(128));
}
} else if (ch >= 55296 && ch <= 56191) {
if (count == 0) {
count++;
} else {
// high surrogate, insert low surrogate before putting
// it in
buffer[count] = (char) (56320 + random.nextInt(128));
count--;
buffer[count] = ch;
}
} else if (ch >= 56192 && ch <= 56319) {
// private high surrogate, no effing clue, so skip it
count++;
} else {
buffer[count] = ch;
}
} else {
count++;
}
}
return new String(buffer);
}
/**
* Convert a name in camelCase to an underscored name in lower case. Any upper case letters are converted to lower
* case with a preceding underscore.
*
* @param filteredName the string containing original name
* @return the converted name
*/
public static String toUnderscoreName(String name) {
if (name == null)
return null;
String filteredName = name;
if (filteredName.indexOf("_") >= 0 && filteredName.equals(filteredName.toUpperCase())) {
filteredName = filteredName.toLowerCase();
}
if (filteredName.indexOf("_") == -1 && filteredName.equals(filteredName.toUpperCase())) {
filteredName = filteredName.toLowerCase();
}
StringBuffer result = new StringBuffer();
if (filteredName != null && filteredName.length() > 0) {
result.append(filteredName.substring(0, 1).toLowerCase());
for (int i = 1; i < filteredName.length(); i++) {
String preChart = filteredName.substring(i - 1, i);
String c = filteredName.substring(i, i + 1);
if (c.equals("_")) {
result.append("_");
continue;
}
if (preChart.equals("_")) {
result.append(c.toLowerCase());
continue;
}
if (c.matches("\\d")) {
result.append(c);
} else if (c.equals(c.toUpperCase())) {
result.append("_");
result.append(c.toLowerCase());
} else {
result.append(c);
}
}
}
return result.toString();
}
/**
* 测试
* @param args
*/
public static void main(String[] args) {
String filedName=StringHelper.makeAllWordFirstLetterUpperCase("abc_user");
System.out.println(filedName);
System.out.println(StringHelper.replace("abcda", "a", "x"));
System.out.println(StringHelper.randomNumeric(10));
System.out.println(StringHelper.toUnderscoreName("SysRoleResourcePermission"));
}
}
| [
"1114332905@qq.com"
] | 1114332905@qq.com |
ab2009c245c9308088a65c5dacc1fdf111c26496 | 31d2308e5940248111cda7990c3f3143640b4457 | /ruoyi-common/src/main/java/com/ruoyi/common/exception/file/InvalidExtensionException.java | 8954bbb109371fface4e161f8f10bf570aac2d20 | [
"MIT"
] | permissive | hunterllb/RuoYi | 39f22fe44f93752ad891d0b8cf074302e846a52e | 28387c46e2d9d7a5172f312a953f7b4d1b9a60c6 | refs/heads/master | 2022-04-28T08:24:40.750871 | 2022-03-09T02:01:11 | 2022-03-09T02:01:11 | 220,368,095 | 0 | 0 | MIT | 2019-11-08T02:12:20 | 2019-11-08T02:12:18 | null | UTF-8 | Java | false | false | 2,484 | java | package com.ruoyi.common.exception.file;
import java.util.Arrays;
import org.apache.commons.fileupload.FileUploadException;
/**
* 文件上传 误异常类
*
* @author ruoyi
*/
public class InvalidExtensionException extends FileUploadException
{
private static final long serialVersionUID = 1L;
private String[] allowedExtension;
private String extension;
private String filename;
public InvalidExtensionException(String[] allowedExtension, String extension, String filename)
{
super("filename : [" + filename + "], extension : [" + extension + "], allowed extension : [" + Arrays.toString(allowedExtension) + "]");
this.allowedExtension = allowedExtension;
this.extension = extension;
this.filename = filename;
}
public String[] getAllowedExtension()
{
return allowedExtension;
}
public String getExtension()
{
return extension;
}
public String getFilename()
{
return filename;
}
public static class InvalidImageExtensionException extends InvalidExtensionException
{
private static final long serialVersionUID = 1L;
public InvalidImageExtensionException(String[] allowedExtension, String extension, String filename)
{
super(allowedExtension, extension, filename);
}
}
public static class InvalidFlashExtensionException extends InvalidExtensionException
{
private static final long serialVersionUID = 1L;
public InvalidFlashExtensionException(String[] allowedExtension, String extension, String filename)
{
super(allowedExtension, extension, filename);
}
}
public static class InvalidMediaExtensionException extends InvalidExtensionException
{
private static final long serialVersionUID = 1L;
public InvalidMediaExtensionException(String[] allowedExtension, String extension, String filename)
{
super(allowedExtension, extension, filename);
}
}
public static class InvalidVideoExtensionException extends InvalidExtensionException
{
private static final long serialVersionUID = 1L;
public InvalidVideoExtensionException(String[] allowedExtension, String extension, String filename)
{
super(allowedExtension, extension, filename);
}
}
}
| [
"yzz_ivy@163.com"
] | yzz_ivy@163.com |
ed3536559ed46f630e55f14a21c43688e5784bb5 | 271f1e8ae17b8ea10721f04125440a229633954a | /Mini_pro/src/unittests/Point3D_Test.java | 31b73728eaff63730219359cad83001f9c01cb9c | [] | no_license | weinbergA/miniProjectJava | 30e2217dcfda2fc056dae56f2c4fa5920784328c | 7d96065faf20e1e8b85585975cf3298e567b8c6e | refs/heads/master | 2020-03-15T18:21:36.824281 | 2018-05-06T19:31:57 | 2018-05-06T19:31:57 | 125,711,337 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 329 | java | package unittests;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import primitives.Point3D;
public class Point3D_Test {
Point3D p1 = new Point3D(1, 2, 3);
Point3D p2 = new Point3D(-4, -3, -2);
@Test
public void distanceTest() {
assertTrue(p1.distance(p2) == Math.sqrt(75));
}
}
| [
"you@example.com"
] | you@example.com |
50f1461fc0c3fe4b3d7efd54f27e263023831088 | d60e287543a95a20350c2caeabafbec517cabe75 | /LACCPlus/HBase/2520_2.java | 29ad7d8df0a6f262e3ed53f8ad8a467906acfdc8 | [
"MIT"
] | permissive | sgholamian/log-aware-clone-detection | 242067df2db6fd056f8d917cfbc143615c558b2c | 9993cb081c420413c231d1807bfff342c39aa69a | refs/heads/main | 2023-07-20T09:32:19.757643 | 2021-08-27T15:02:50 | 2021-08-27T15:02:50 | 337,837,827 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 688 | java | //,temp,THBaseService.java,7537,7548,temp,THBaseService.java,6633,6644
//,2
public class xxx {
public void onComplete(Void o) {
deleteTable_result result = new deleteTable_result();
try {
fcall.sendResponse(fb, result, org.apache.thrift.protocol.TMessageType.REPLY,seqid);
} catch (org.apache.thrift.transport.TTransportException e) {
_LOGGER.error("TTransportException writing to internal frame buffer", e);
fb.close();
} catch (java.lang.Exception e) {
_LOGGER.error("Exception writing to internal frame buffer", e);
onError(e);
}
}
}; | [
"sgholami@uwaterloo.ca"
] | sgholami@uwaterloo.ca |
27af586b9bf087ce2e5030adb72c26fb0bd3f09e | 5fea7aa14b5db9be014439121ee7404b61c004aa | /src/com/tms/collab/messaging/ui/Line.java | 947b7406135886c6003a026c62f81b6a63453358 | [] | no_license | fairul7/eamms | d7ae6c841e9732e4e401280de7e7d33fba379835 | a4ed0495c0d183f109be20e04adbf53e19925a8c | refs/heads/master | 2020-07-06T06:14:46.330124 | 2013-05-31T04:18:19 | 2013-05-31T04:18:19 | 28,168,318 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,371 | java | package com.tms.collab.messaging.ui;
import kacang.ui.Event;
import kacang.ui.Forward;
import kacang.ui.Widget;
/**
* A Line widget, representing the <hr> in html tag.
*/
public class Line extends Widget {
private String align;
private String clazz;
private Boolean noShade = Boolean.FALSE;
private String dir;
private String lang;
private String onclick;
private String ondbclick;
private String onkeydown;
private String onkeypress;
private String onkeyup;
private String onmousedown;
private String onmouseover;
private String onmouseup;
private String size;
private String style;
private String width;
private String title;
public Line(String name) {
super(name);
}
/**
* @see kacang.ui.Widget#getDefaultTemplate()
*/
public String getDefaultTemplate() {
return "line";
}
/**
* @see kacang.ui.Widget#actionPerformed(kacang.ui.Event)
*/
public Forward actionPerformed(Event evt) {
return super.actionPerformed(evt);
}
// getters / setters ===================================================
public String getAlign() {
return align;
}
public void setAlign(String align) {
this.align = align;
}
public String getClazz() {
return clazz;
}
public void setClazz(String clazz) {
this.clazz = clazz;
}
public String getDir() {
return dir;
}
public void setDir(String dir) {
this.dir = dir;
}
public String getLang() {
return lang;
}
public void setLang(String lang) {
this.lang = lang;
}
public Boolean getNoshade() {
return noShade;
}
public void setNoshade(Boolean noShade) {
this.noShade = noShade;
}
public String getOnclick() {
return onclick;
}
public void setOnclick(String onclick) {
this.onclick = onclick;
}
public String getOndbclick() {
return ondbclick;
}
public void setOndbclick(String ondbclick) {
this.ondbclick = ondbclick;
}
public String getOnkeydown() {
return onkeydown;
}
public void setOnkeydown(String onkeydown) {
this.onkeydown = onkeydown;
}
public String getOnkeypress() {
return onkeypress;
}
public void setOnkeypress(String onkeypress) {
this.onkeypress = onkeypress;
}
public String getOnkeyup() {
return onkeyup;
}
public void setOnkeyup(String onkeyup) {
this.onkeyup = onkeyup;
}
public String getOnmousedown() {
return onmousedown;
}
public void setOnmousedown(String onmousedown) {
this.onmousedown = onmousedown;
}
public String getOnmouseover() {
return onmouseover;
}
public void setOnmouseover(String onmouseover) {
this.onmouseover = onmouseover;
}
public String getOnmouseup() {
return onmouseup;
}
public void setOnmouseup(String onmouseup) {
this.onmouseup = onmouseup;
}
public String getSize() {
return size;
}
public void setSize(String size) {
this.size = size;
}
public String getStyle() {
return style;
}
public void setStyle(String style) {
this.style = style;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getWidth() {
return width;
}
public void setWidth(String width) {
this.width = width;
}
}
| [
"fairul@a9c4ac11-bb59-4888-a949-8c1c6fc09797"
] | fairul@a9c4ac11-bb59-4888-a949-8c1c6fc09797 |
d220daed5538ce40bb04d3801bede08958913310 | 105ff2705396d603b30760cb6e393e2e80e30793 | /internet_Architec/templates/thymeleaf-gtvt/src/main/java/com/asynclife/clonegod/App.java | 3e2c202368112728d8627f7ab970ad55ebd84064 | [] | no_license | clonegod/x01-lang-java | cfa878ccc0e86cace906d47b9c2a3085732fc835 | 640bdd04a47abf97189e761acd020f7d5a0f55e6 | refs/heads/master | 2020-03-13T15:00:36.761781 | 2018-06-06T16:03:32 | 2018-06-06T16:03:32 | 131,169,227 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 591 | java | package com.asynclife.clonegod;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableAutoConfiguration
@ComponentScan
public class App {
public static void main(String[] args) throws Exception {
SpringApplication app = new SpringApplication();
app.setWebEnvironment(true);
SpringApplication.run(App.class, args);
System.out.println("App start running...");
}
}
| [
"asynclife@163.com"
] | asynclife@163.com |
ba6de151979517bf83fc3dcfb5adecb94a9f245b | ef49b2bf76afcd2da90562249dc6f536fb9b5ec6 | /src/com/company/leetcode/before/_6.java | fc3d2ceac08534d2e1f9acf46823bc89bffa87a3 | [] | no_license | rjpacket/JavaAlgorithm | 5f675b7041a8e7e1b51eb1096269cd0a9cd53ef1 | e9cd152c0ef9e326d0b1eb1adba9e1d1ed6c480e | refs/heads/master | 2020-03-11T14:29:27.509536 | 2019-04-10T11:54:10 | 2019-04-10T11:54:10 | 130,056,194 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,851 | java | package com.company.leetcode.before;
/**
* 将字符串 "PAYPALISHIRING" 以Z字形排列成给定的行数:
* <p>
* P A H N
* A P L S I I G
* Y I R
* 之后从左往右,逐行读取字符:"PAHNAPLSIIGYIR"
* <p>
* 实现一个将字符串进行指定行数变换的函数:
* <p>
* string convert(string s, int numRows);
* 示例 1:
* <p>
* 输入: s = "PAYPALISHIRING", numRows = 3
* 输出: "PAHNAPLSIIGYIR"
* 示例 2:
* <p>
* 输入: s = "PAYPALISHIRING", numRows = 4
* 输出: "PINALSIGYAHRPI"
* 解释:
* <p>
* P I N
* A L S I G
* Y A H R
* P I
* Created by An on 2018/4/19.
*/
public class _6 {
public static void main(String[] args) {
System.out.println(convert("AB", 1));
}
public static String convert(String s, int numRows) {
if (numRows == 1) {
return s;
}
int length = s.length();
String a[][] = new String[numRows][length];
M:
for (int i = 0, j = 0, k = 0; i < length; ) {
for (int l = 0; l < numRows; l++) {
if (i >= length) {
break M;
}
a[j][k] = String.valueOf(s.charAt(i));
j++;
i++;
}
j -= 2;
k++;
for (int l = 0; l < numRows - 2; l++) {
if (i >= length) {
break M;
}
a[j][k] = String.valueOf(s.charAt(i));
j--;
k++;
i++;
}
}
String result = "";
for (int i = 0; i < numRows; i++) {
for (int j = 0; j < length; j++) {
if (a[i][j] != null) {
result += a[i][j];
}
}
}
return result;
}
}
| [
"jimbo922@163.com"
] | jimbo922@163.com |
6cb8a0c069044ce959ed626955638456e2ce9856 | bbe10639bb9c8f32422122c993530959534560e1 | /delivery/app-release_source_from_JADX/com/google/android/gms/common/internal/zzaa.java | e07b9dca1e507f413c78e4192c450b8da84a58e3 | [
"Apache-2.0"
] | permissive | ANDROFAST/delivery_articulos | dae74482e41b459963186b6e7e3d6553999c5706 | ddcc8b06d7ea2895ccda2e13c179c658703fec96 | refs/heads/master | 2020-04-07T15:13:18.470392 | 2018-11-21T02:15:19 | 2018-11-21T02:15:19 | 158,476,390 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,068 | java | package com.google.android.gms.common.internal;
import android.os.Parcel;
import android.os.Parcelable.Creator;
import com.google.android.gms.common.api.Scope;
import com.google.android.gms.common.internal.safeparcel.zza;
import com.google.android.gms.common.internal.safeparcel.zzb;
public class zzaa implements Creator<SignInButtonConfig> {
static void zza(SignInButtonConfig signInButtonConfig, Parcel parcel, int i) {
int zzav = zzb.zzav(parcel);
zzb.zzc(parcel, 1, signInButtonConfig.mVersionCode);
zzb.zzc(parcel, 2, signInButtonConfig.zzqL());
zzb.zzc(parcel, 3, signInButtonConfig.zzqM());
zzb.zza(parcel, 4, signInButtonConfig.zzqN(), i, false);
zzb.zzI(parcel, zzav);
}
public /* synthetic */ Object createFromParcel(Parcel x0) {
return zzar(x0);
}
public /* synthetic */ Object[] newArray(int x0) {
return zzca(x0);
}
public SignInButtonConfig zzar(Parcel parcel) {
int i = 0;
int zzau = zza.zzau(parcel);
Scope[] scopeArr = null;
int i2 = 0;
int i3 = 0;
while (parcel.dataPosition() < zzau) {
int zzat = zza.zzat(parcel);
switch (zza.zzcc(zzat)) {
case 1:
i3 = zza.zzg(parcel, zzat);
break;
case 2:
i2 = zza.zzg(parcel, zzat);
break;
case 3:
i = zza.zzg(parcel, zzat);
break;
case 4:
scopeArr = (Scope[]) zza.zzb(parcel, zzat, Scope.CREATOR);
break;
default:
zza.zzb(parcel, zzat);
break;
}
}
if (parcel.dataPosition() == zzau) {
return new SignInButtonConfig(i3, i2, i, scopeArr);
}
throw new zza.zza("Overread allowed size end=" + zzau, parcel);
}
public SignInButtonConfig[] zzca(int i) {
return new SignInButtonConfig[i];
}
}
| [
"cespedessanchezalex@gmail.com"
] | cespedessanchezalex@gmail.com |
48a16937826ae4f8797445ba925b0cd8a1b1563f | f319ca2889a00a8e01b6a0d48e86d012115c85f5 | /src/test/java/com/wang/jmonkey/test/modules/ieg/ImportSchoolParam.java | 9002871b2858b38dce8c2a3c72128b7405895903 | [] | no_license | hejiawang/ieg | 016fa29b7559971cbc87bf78bb9063869082d8e8 | 9f48ee0f1ca61dc09d1ea6432a8372751957a75b | refs/heads/master | 2022-07-06T20:54:50.481108 | 2019-12-18T11:47:24 | 2019-12-18T11:47:24 | 182,397,642 | 0 | 1 | null | 2022-06-17T02:07:18 | 2019-04-20T11:29:38 | Java | UTF-8 | Java | false | false | 1,193 | java | package com.wang.jmonkey.test.modules.ieg;
import com.wang.jmonkey.common.utils.poi.annotation.ExcelField;
import lombok.Data;
import lombok.experimental.Accessors;
@Data
@Accessors(chain = true)
public class ImportSchoolParam {
/**
* 批次代码 专科批7 本科批3
*/
@ExcelField(title="pcdm", align=2)
private String pcdm;
/**
* 科类代码 1是文史 5是理科
*/
@ExcelField(title="kldm", align=2)
private String kldm;
/**
* 投档单位
*/
@ExcelField(title="tddw", align=2)
private String tddw;
/**
* 投档单位名称
*/
@ExcelField(title="tddwmc", align=2)
private String tddwmc;
/**
* 院校代码
*/
@ExcelField(title="yxdh", align=2)
private String yxdh;
/**
* 专业代码
*/
@ExcelField(title="zydh", align=2)
private String zydh;
/**
* 专业名称
*/
@ExcelField(title="zymc", align=2)
private String zymc;
/**
* 原计划数
*/
@ExcelField(title="yjhs", align=2)
private String yjhs;
/**
* 录取数
*/
@ExcelField(title="lqs", align=2)
private String lqs;
}
| [
"952327407@qq.com"
] | 952327407@qq.com |
72227690f4c0da289991da7e313764d93a58da96 | a00326c0e2fc8944112589cd2ad638b278f058b9 | /src/main/java/000/136/434/CWE369_Divide_by_Zero__int_database_modulo_01.java | ecd9ba4ce04be46152455dedf1c7d588e423ccad | [] | no_license | Lanhbao/Static-Testing-for-Juliet-Test-Suite | 6fd3f62713be7a084260eafa9ab221b1b9833be6 | b095b11c7cb6d4a5bb2b76181e35d6ee00e96e68 | refs/heads/master | 2020-08-24T13:34:04.004149 | 2019-10-25T09:26:00 | 2019-10-25T09:26:00 | 216,822,684 | 0 | 1 | null | 2019-11-08T09:51:54 | 2019-10-22T13:37:13 | Java | UTF-8 | Java | false | false | 7,643 | java | /* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE369_Divide_by_Zero__int_database_modulo_01.java
Label Definition File: CWE369_Divide_by_Zero__int.label.xml
Template File: sources-sinks-01.tmpl.java
*/
/*
* @description
* CWE: 369 Divide by zero
* BadSource: database Read data from a database
* GoodSource: A hardcoded non-zero, non-min, non-max, even number
* Sinks: modulo
* GoodSink: Check for zero before modulo
* BadSink : Modulo by a value that may be zero
* Flow Variant: 01 Baseline
*
* */
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
public class CWE369_Divide_by_Zero__int_database_modulo_01 extends AbstractTestCase
{
public void bad() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* Read data from a database */
{
Connection connection = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
try
{
/* setup the connection */
connection = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
preparedStatement = connection.prepareStatement("select name from users where id=0");
resultSet = preparedStatement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
String stringNumber = resultSet.getString(1);
if (stringNumber != null) /* avoid NPD incidental warnings */
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch (NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error with SQL statement", exceptSql);
}
finally
{
/* Close database objects */
try
{
if (resultSet != null)
{
resultSet.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", exceptSql);
}
try
{
if (preparedStatement != null)
{
preparedStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing PreparedStatement", exceptSql);
}
try
{
if (connection != null)
{
connection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
/* POTENTIAL FLAW: Zero modulus will cause an issue. An integer division will
result in an exception. */
IO.writeLine("100%" + data + " = " + (100 % data) + "\n");
}
public void good() throws Throwable
{
goodG2B();
goodB2G();
}
/* goodG2B() - use goodsource and badsink */
private void goodG2B() throws Throwable
{
int data;
/* FIX: Use a hardcoded number that won't cause underflow, overflow, divide by zero, or loss-of-precision issues */
data = 2;
/* POTENTIAL FLAW: Zero modulus will cause an issue. An integer division will
result in an exception. */
IO.writeLine("100%" + data + " = " + (100 % data) + "\n");
}
/* goodB2G() - use badsource and goodsink */
private void goodB2G() throws Throwable
{
int data;
data = Integer.MIN_VALUE; /* Initialize data */
/* Read data from a database */
{
Connection connection = null;
PreparedStatement preparedStatement = null;
ResultSet resultSet = null;
try
{
/* setup the connection */
connection = IO.getDBConnection();
/* prepare and execute a (hardcoded) query */
preparedStatement = connection.prepareStatement("select name from users where id=0");
resultSet = preparedStatement.executeQuery();
/* POTENTIAL FLAW: Read data from a database query resultset */
String stringNumber = resultSet.getString(1);
if (stringNumber != null) /* avoid NPD incidental warnings */
{
try
{
data = Integer.parseInt(stringNumber.trim());
}
catch (NumberFormatException exceptNumberFormat)
{
IO.logger.log(Level.WARNING, "Number format exception parsing data from string", exceptNumberFormat);
}
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error with SQL statement", exceptSql);
}
finally
{
/* Close database objects */
try
{
if (resultSet != null)
{
resultSet.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing ResultSet", exceptSql);
}
try
{
if (preparedStatement != null)
{
preparedStatement.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing PreparedStatement", exceptSql);
}
try
{
if (connection != null)
{
connection.close();
}
}
catch (SQLException exceptSql)
{
IO.logger.log(Level.WARNING, "Error closing Connection", exceptSql);
}
}
}
/* FIX: test for a zero modulus */
if (data != 0)
{
IO.writeLine("100%" + data + " = " + (100 % data) + "\n");
}
else
{
IO.writeLine("This would result in a modulo by zero");
}
}
/* Below is the main(). It is only used when building this testcase on
* its own for testing or for building a binary to use in testing binary
* analysis tools. It is not used when compiling all the testcases as one
* application, which is how source code analysis tools are tested.
*/
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
| [
"anhtluet12@gmail.com"
] | anhtluet12@gmail.com |
258f5b8cf44df239a8a4a7a9aa5b1adef7c01dc0 | 69ec2ce61fdb31b5f084bfbb13e378734c14c686 | /org.osgi.test.cases.framework.secure/src/org/osgi/test/cases/framework/secure/classloading/tb6c/Activator.java | 2cc737ec457d9353a375802c99abceb23189757b | [
"Apache-2.0"
] | permissive | henrykuijpers/osgi | f23750269f2817cb60e797bbafc29183e1bae272 | 063c29cb12eadaab59df75dfa967978c8052c4da | refs/heads/main | 2023-02-02T08:51:39.266433 | 2020-12-23T12:57:12 | 2020-12-23T12:57:12 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,673 | java | /*
* Copyright (c) OSGi Alliance (2004, 2016). All Rights Reserved.
*
* Implementation of certain elements of the OSGi Specification may be subject
* to third party intellectual property rights, including without limitation,
* patent rights (such a third party may or may not be a member of the OSGi
* Alliance). The OSGi Alliance is not responsible and shall not be held
* responsible in any manner for identifying or failing to identify any or all
* such third party intellectual property rights.
*
* This document and the information contained herein are provided on an "AS IS"
* basis and THE OSGI ALLIANCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION
* HEREIN WILL NOT INFRINGE ANY RIGHTS AND ANY IMPLIED WARRANTIES OF
* MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT WILL THE
* OSGI ALLIANCE BE LIABLE FOR ANY LOSS OF PROFITS, LOSS OF BUSINESS, LOSS OF
* USE OF DATA, INTERRUPTION OF BUSINESS, OR FOR DIRECT, INDIRECT, SPECIAL OR
* EXEMPLARY, INCIDENTIAL, PUNITIVE OR CONSEQUENTIAL DAMAGES OF ANY KIND IN
* CONNECTION WITH THIS DOCUMENT OR THE INFORMATION CONTAINED HEREIN, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH LOSS OR DAMAGE.
*
* All Company, brand and product names may be trademarks that are the sole
* property of their respective owners. All rights reserved.
*/
package org.osgi.test.cases.framework.secure.classloading.tb6c;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.test.cases.framework.secure.classloading.exports.service.SomeService;
/**
* This bundle activator is used to register some services
*
* @author left
* @author $Id$
*/
public class Activator implements BundleActivator {
private ServiceRegistration<SomeService> sr;
/**
* Creates a new instance of Activator
*/
public Activator() {
}
/**
* Start the bundle and register the service.
*
* @param context the bundle context
* @throws Exception if some problem occur
* @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
*/
public void start(BundleContext context) throws Exception {
sr = context.registerService(SomeService.class,
new SomeServiceImpl(context.getBundle()), null);
}
/**
* Stop the bundle and unregister the service
*
* @param context the bundle context
* @throws Exception if some problem occur
* @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
*/
public void stop(BundleContext context) throws Exception {
sr.unregister();
}
}
| [
"hargrave@us.ibm.com"
] | hargrave@us.ibm.com |
c762958a6b55c8405ed814814caff8fece32fd35 | 1ce518b09521578e26e79a1beef350e7485ced8c | /source/app/src/main/java/com/google/gson/internal/p.java | 3cd1d7bce74ecbcf9374f32d079cf7d105b8e9ce | [] | no_license | yash2710/AndroidStudioProjects | 7180eb25e0f83d3f14db2713cd46cd89e927db20 | e8ba4f5c00664f9084f6154f69f314c374551e51 | refs/heads/master | 2021-01-10T01:15:07.615329 | 2016-04-03T09:19:01 | 2016-04-03T09:19:01 | 55,338,306 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,679 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.gson.internal;
import com.google.gson.Gson;
import com.google.gson.TypeAdapter;
import com.google.gson.reflect.TypeToken;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
// Referenced classes of package com.google.gson.internal:
// Excluder
final class p extends TypeAdapter
{
private TypeAdapter a;
private boolean b;
private boolean c;
private Gson d;
private TypeToken e;
private Excluder f;
p(Excluder excluder, boolean flag, boolean flag1, Gson gson, TypeToken typetoken)
{
f = excluder;
b = flag;
c = flag1;
d = gson;
e = typetoken;
super();
}
private TypeAdapter a()
{
TypeAdapter typeadapter = a;
if (typeadapter != null)
{
return typeadapter;
} else
{
TypeAdapter typeadapter1 = d.getDelegateAdapter(f, e);
a = typeadapter1;
return typeadapter1;
}
}
public final Object read(JsonReader jsonreader)
{
if (b)
{
jsonreader.skipValue();
return null;
} else
{
return a().read(jsonreader);
}
}
public final void write(JsonWriter jsonwriter, Object obj)
{
if (c)
{
jsonwriter.nullValue();
return;
} else
{
a().write(jsonwriter, obj);
return;
}
}
}
| [
"13bce123@nirmauni.ac.in"
] | 13bce123@nirmauni.ac.in |
0c7e57b819c13d244df56fbdde7ab63a1dc14067 | 261354cfb9111edd9a78b5cabaca64af9687628c | /src/main/java/com/megacrit/cardcrawl/mod/replay/modifiers/ChaoticModifier.java | 8d33f2ff7fe1333fe7bfa8fe2167b585fba05aa2 | [] | no_license | The-Evil-Pickle/Replay-the-Spire | 1c9258bd664ba0ff41f79d57180a090c502cdca3 | 1fcb4cedafa61f32b3d9c3bab2d6a687f9cbe718 | refs/heads/master | 2022-11-14T15:56:19.255784 | 2022-11-01T13:30:14 | 2022-11-01T13:30:14 | 122,853,479 | 39 | 19 | null | 2022-11-01T13:30:15 | 2018-02-25T16:26:38 | Java | UTF-8 | Java | false | false | 757 | java | package com.megacrit.cardcrawl.mod.replay.modifiers;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.daily.mods.AbstractDailyMod;
import com.megacrit.cardcrawl.helpers.ImageMaster;
import com.megacrit.cardcrawl.localization.RunModStrings;
public class ChaoticModifier extends AbstractDailyMod
{
public static final String ID = "replay:Chaotic";
private static final RunModStrings modStrings = CardCrawlGame.languagePack.getRunModString(ID);
public static final String NAME = modStrings.NAME;
public static final String DESC = modStrings.DESCRIPTION;
public ChaoticModifier() {
super(ID, NAME, DESC, null, true);
this.img = ImageMaster.loadImage("images/relics/cursedBlood.png");
}
} | [
"tobiaskipps@gmail.com"
] | tobiaskipps@gmail.com |
38eb7fc3e99cc02e44c618233a1757dfbcd63c96 | f7a40de5e51ecb60a273e19f939a41d00ff7df45 | /android/app/src/main/java/com/inso/plugin/manager/AppController.java | 75bdd5cf7c1b3a2d5ef4ce334825611659ea561f | [] | no_license | ftc300/inso | 50d35294990945916a9733a76a0847fc96fc183d | b08071da4de3068bec2289df11c34fe35d855447 | refs/heads/master | 2022-01-05T01:32:23.982350 | 2019-06-05T03:19:08 | 2019-06-05T03:19:08 | 164,582,442 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,353 | java | package com.inso.plugin.manager;
import android.app.Application;
import com.google.gson.Gson;
import com.inso.plugin.basic.BasicAct;
import java.util.LinkedList;
import java.util.List;
/**
* Created by chendong on 2017/3/30.
*/
public class AppController extends Application {
private List<BasicAct> mList = new LinkedList<>();
private static AppController instance;
public static Gson gson ;
private AppController() {
}
public synchronized static AppController getInstance() {
if (null == instance) {
instance = new AppController();
}
return instance;
}
public synchronized static Gson getGson() {
if (null == gson) {
gson = new Gson();
}
return gson;
}
// add Activity
public void addActivity(BasicAct activity) {
mList.add(activity);
}
// remove Activity
public void removeActivity(BasicAct activity) {
mList.remove(activity);
}
public void exit() {
try {
for (BasicAct activity : mList) {
if (activity != null)
activity.finish();
}
} catch (Exception e) {
e.printStackTrace();
}
}
@Override
public void onLowMemory() {
super.onLowMemory();
System.gc();
}
}
| [
"cd@inshowlife.com"
] | cd@inshowlife.com |
8b111f26b48061629fb2b3f18f3808e83df5b29f | 1fc6412873e6b7f6df6c9333276cd4aa729c259f | /CoreJava/src/com/corejava7/awt/GBC.java | 56c1c52290ee98f0e3c507a6a7ed1c70f388124e | [] | no_license | youzhibicheng/ThinkingJava | dbe9bec5b17e46c5c781a98f90e883078ebbd996 | 5390a57100ae210dc57bea445750c50b0bfa8fc4 | refs/heads/master | 2021-01-01T05:29:01.183768 | 2016-05-10T01:07:58 | 2016-05-10T01:07:58 | 58,379,014 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 3,698 | java | package com.corejava7.awt;
/*
GBC - A convenience class to tame the GridBagLayout
Copyright (C) 2002 Cay S. Horstmann (http://horstmann.com)
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
import java.awt.*;
/**
This class simplifies the use of the GridBagConstraints
class.
*/
public class GBC extends GridBagConstraints
{
/**
Constructs a GBC with a given gridx and gridy position and
all other grid bag constraint values set to the default.
@param gridx the gridx position
@param gridy the gridy position
*/
public GBC(int gridx, int gridy)
{
this.gridx = gridx;
this.gridy = gridy;
}
/**
Constructs a GBC with given gridx, gridy, gridwidth, gridheight
and all other grid bag constraint values set to the default.
@param gridx the gridx position
@param gridy the gridy position
@param gridwidth the cell span in x-direction
@param gridheight the cell span in y-direction
*/
public GBC(int gridx, int gridy, int gridwidth, int gridheight)
{
this.gridx = gridx;
this.gridy = gridy;
this.gridwidth = gridwidth;
this.gridheight = gridheight;
}
/**
Sets the anchor.
@param anchor the anchor value
@return this object for further modification
*/
public GBC setAnchor(int anchor)
{
this.anchor = anchor;
return this;
}
/**
Sets the fill direction.
@param fill the fill direction
@return this object for further modification
*/
public GBC setFill(int fill)
{
this.fill = fill;
return this;
}
/**
Sets the cell weights.
@param weightx the cell weight in x-direction
@param weighty the cell weight in y-direction
@return this object for further modification
*/
public GBC setWeight(double weightx, double weighty)
{
this.weightx = weightx;
this.weighty = weighty;
return this;
}
/**
Sets the insets of this cell.
@param distance the spacing to use in all directions
@return this object for further modification
*/
public GBC setInsets(int distance)
{
this.insets = new Insets(distance, distance, distance, distance);
return this;
}
/**
Sets the insets of this cell.
@param top the spacing to use on top
@param left the spacing to use to the left
@param bottom the spacing to use on the bottom
@param right the spacing to use to the right
@return this object for further modification
*/
public GBC setInsets(int top, int left, int bottom, int right)
{
this.insets = new Insets(top, left, bottom, right);
return this;
}
/**
Sets the internal padding
@param ipadx the internal padding in x-direction
@param ipady the internal padding in y-direction
@return this object for further modification
*/
public GBC setIpad(int ipadx, int ipady)
{
this.ipadx = ipadx;
this.ipady = ipady;
return this;
}
}
| [
"youzhibicheng@163.com"
] | youzhibicheng@163.com |
aba75de9f583713953aa4ea8c7c633180803082d | d54cc14cd058d20f27c56107b88d76cc27d4fd29 | /leopard-boot-data-parent/leopard-boot-redis/src/main/java/io/leopard/redis/autoconfigure/RedisAutoConfiguration.java | ab6559f25f4877198c68e5ae24667ff874628591 | [
"Apache-2.0"
] | permissive | ailu5949/leopard-boot | a59cea1a03b1b41712d29cf4091be76dca8316a7 | 33201a2962821475772a53ddce64f7f823f62242 | refs/heads/master | 2020-04-02T09:28:01.286249 | 2018-10-23T08:46:00 | 2018-10-23T08:46:00 | 154,294,038 | 1 | 0 | Apache-2.0 | 2018-10-23T08:46:20 | 2018-10-23T08:46:20 | null | UTF-8 | Java | false | false | 1,187 | java | package io.leopard.redis.autoconfigure;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import io.leopard.redis.Redis;
import io.leopard.redis.RedisImpl;
@Configuration
// @ConfigurationProperties(prefix = "zhaotong.redis")
@ConditionalOnProperty(prefix = "app.redis", name = "host", matchIfMissing = false)
@EnableConfigurationProperties(RedisProperties.class)
public class RedisAutoConfiguration {
// @Bean
// @ConfigurationProperties(prefix = "app.redis")
// public RedisProperties config() {
// DataSourceProperties ddd;
// RedisProperties config = new RedisProperties();
// return config;
// }
@Bean(name = "redis", initMethod = "init", destroyMethod = "destroy")
public Redis redis(RedisProperties redisConfig) {
String server = redisConfig.parseServer();
RedisImpl redis = new RedisImpl();
redis.setServer(server);
if (redisConfig.getMaxActive() != null) {
redis.setMaxActive(redisConfig.getMaxActive());
}
return redis;
}
} | [
"tanhaichao@gmail.com"
] | tanhaichao@gmail.com |
45f405af6130fb2744be54967c02f511b5ecbb9c | 6c324818f5bdd47465f7531c30af698f3e6e87f0 | /src/main/java/com/sample/soap/xml/dm/ServiceFault.java | d42e5a84bdea0b5bbc01434f6242edf75f77a8c6 | [] | no_license | nandpoot23/SpringBootMapStructSoapService | 7ff00efbd25a20a50df5b278ac9262f61017451b | 1f82cbaebbae5eda8a2a9d61fb34c25ba782eb80 | refs/heads/master | 2021-01-01T20:32:48.865380 | 2017-07-31T12:13:13 | 2017-07-31T12:13:13 | 98,884,743 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 507 | java | package com.sample.soap.xml.dm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ServiceFault", propOrder = { "messages" })
public class ServiceFault {
protected MessagesType messages;
public MessagesType getMessages() {
return messages;
}
public void setMessages(MessagesType messages) {
this.messages = messages;
}
}
| [
"mlahariya@xavient.com"
] | mlahariya@xavient.com |
6357466556c294b6972e7a0961549a5736124022 | 8ad91bde8b4b8c3f76e555119cafecd942549933 | /schlep-core/src/main/java/com/netflix/schlep/mapper/DefaultSerializerProvider.java | bd4943ad64f700bc84753bf02d8a96672e292ac2 | [
"Apache-2.0"
] | permissive | DoctoralDisaster/schlep | c2d1635501fc50e23fa783e6476feadc3b567e59 | f51ecec1ca5769850871b8aa4f23e025c347f669 | refs/heads/master | 2021-01-22T03:25:40.094569 | 2013-10-09T18:04:40 | 2013-10-09T18:04:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 302 | java | package com.netflix.schlep.mapper;
import com.netflix.schlep.mapper.jackson.JacksonSerializerProvider;
public class DefaultSerializerProvider extends BaseSerializerProvider {
public DefaultSerializerProvider() {
this.setDefaultSerializerProvider(new JacksonSerializerProvider());
}
}
| [
"elandau@yahoo.com"
] | elandau@yahoo.com |
b6598e206f120771413d23215ad65a49567fd66b | 9c9c0a6cd542d5b1c2329209abf144249e275609 | /src/java/com/zimbra/qa/selenium/projects/ajax/tests/calendar/mountpoints/viewer/actions/ShowOriginal.java | 3045a1f791c936924d4ccaad25263be409a45235 | [] | no_license | jiteshsojitra/zm-selenium | 8e55ed108d08784485d22e03884f3d63571b44e2 | 4ed342c33433907a49d698c967a4eb24b435eb80 | refs/heads/develop | 2019-07-11T14:28:27.951485 | 2018-04-13T10:05:02 | 2018-04-13T10:05:02 | 91,348,171 | 0 | 0 | null | 2017-05-15T14:35:48 | 2017-05-15T14:35:48 | null | UTF-8 | Java | false | false | 5,638 | java | /*
* ***** BEGIN LICENSE BLOCK *****
* Zimbra Collaboration Suite Server
* Copyright (C) 2013, 2014, 2015, 2016 Synacor, Inc.
*
* This program is free software: you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free Software Foundation,
* version 2 of the License.
*
* This program 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 General Public License for more details.
* You should have received a copy of the GNU General Public License along with this program.
* If not, see <https://www.gnu.org/licenses/>.
* ***** END LICENSE BLOCK *****
*/
package com.zimbra.qa.selenium.projects.ajax.tests.calendar.mountpoints.viewer.actions;
import java.util.Calendar;
import org.testng.annotations.Test;
import com.zimbra.qa.selenium.framework.items.*;
import com.zimbra.qa.selenium.framework.ui.*;
import com.zimbra.qa.selenium.framework.util.*;
import com.zimbra.qa.selenium.projects.ajax.core.AjaxCore;
import com.zimbra.qa.selenium.projects.ajax.pages.SeparateWindow;
public class ShowOriginal extends AjaxCore {
public ShowOriginal() {
logger.info("New "+ ShowOriginal.class.getCanonicalName());
super.startingPage = app.zPageCalendar;
}
@Test (description = "Grantee views show original of the appointment from grantor's calendar",
groups = { "functional", "L2" })
public void ShowOriginal_01() throws HarnessException {
String apptSubject = ConfigProperties.getUniqueString();
String apptContent = ConfigProperties.getUniqueString();
String foldername = "folder" + ConfigProperties.getUniqueString();
String mountpointname = "mountpoint" + ConfigProperties.getUniqueString();
String windowUrl = "service/home/~/";
Calendar now = Calendar.getInstance();
ZDate startUTC = new ZDate(now.get(Calendar.YEAR), now.get(Calendar.MONTH) + 1, now.get(Calendar.DAY_OF_MONTH), 10, 0, 0);
ZDate endUTC = new ZDate(now.get(Calendar.YEAR), now.get(Calendar.MONTH) + 1, now.get(Calendar.DAY_OF_MONTH), 11, 0, 0);
FolderItem calendarFolder = FolderItem.importFromSOAP(ZimbraAccount.Account4(), FolderItem.SystemFolder.Calendar);
// Create a folder to share
ZimbraAccount.Account4().soapSend(
"<CreateFolderRequest xmlns='urn:zimbraMail'>"
+ "<folder name='" + foldername + "' l='" + calendarFolder.getId() + "' view='appointment'/>"
+ "</CreateFolderRequest>");
FolderItem folder = FolderItem.importFromSOAP(ZimbraAccount.Account4(), foldername);
// Share it
ZimbraAccount.Account4().soapSend(
"<FolderActionRequest xmlns='urn:zimbraMail'>"
+ "<action id='"+ folder.getId() +"' op='grant'>"
+ "<grant d='"+ app.zGetActiveAccount().EmailAddress +"' gt='usr' perm='r' view='appointment'/>"
+ "</action>"
+ "</FolderActionRequest>");
// Mount it
app.zGetActiveAccount().soapSend(
"<CreateMountpointRequest xmlns='urn:zimbraMail'>"
+ "<link l='1' name='"+ mountpointname +"' rid='"+ folder.getId() +"' zid='"+ ZimbraAccount.Account4().ZimbraId +"' view='appointment' color='5'/>"
+ "</CreateMountpointRequest>");
// Create appointment
ZimbraAccount.Account4().soapSend(
"<CreateAppointmentRequest xmlns='urn:zimbraMail'>"
+ "<m l='"+ folder.getId() +"' >"
+ "<inv method='REQUEST' type='event' status='CONF' draft='0' class='PUB' fb='B' transp='O' allDay='0' name='"+ apptSubject +"'>"
+ "<s d='"+ startUTC.toTimeZone(ZTimeZone.getLocalTimeZone().getID()).toYYYYMMDDTHHMMSS() +"' tz='"+ ZTimeZone.getLocalTimeZone().getID() +"'/>"
+ "<e d='"+ endUTC.toTimeZone(ZTimeZone.getLocalTimeZone().getID()).toYYYYMMDDTHHMMSS() +"' tz='"+ ZTimeZone.getLocalTimeZone().getID() +"'/>"
+ "<or a='"+ ZimbraAccount.Account4().EmailAddress +"'/>"
+ "<at role='REQ' ptst='NE' rsvp='1' a='" + app.zGetActiveAccount().EmailAddress + "'/>"
+ "</inv>"
+ "<e a='"+ app.zGetActiveAccount().EmailAddress +"' t='t'/>"
+ "<su>"+ apptSubject +"</su>"
+ "<mp content-type='text/plain'>"
+ "<content>" + apptContent + "</content>"
+ "</mp>"
+ "</m>"
+ "</CreateAppointmentRequest>");
// Verify appointment exists in current view
ZAssert.assertTrue(app.zPageCalendar.zVerifyAppointmentExists(apptSubject), "Verify appointment displayed in current view");
// Mark ON to mounted calendar folder and select the appointment
app.zTreeCalendar.zMarkOnOffCalendarFolder("Calendar");
app.zTreeCalendar.zMarkOnOffCalendarFolder(mountpointname);
// Appointment show original
SeparateWindow window = (SeparateWindow)app.zPageCalendar.zListItem(Action.A_RIGHTCLICK,Button.O_SHOW_ORIGINAL_MENU, apptSubject);
try {
window.zSetWindowTitle(windowUrl);
ZAssert.assertTrue(window.zIsWindowOpen(windowUrl),"Verify the window is opened and switch to it");
SleepUtil.sleepMedium();
// Verify show original window content
String body = window.sGetBodyText();
ZAssert.assertStringContains(body, apptSubject, "Verify subject in show original");
ZAssert.assertStringContains(body, apptContent, "Verify content in show original");
ZAssert.assertStringContains(body, "BEGIN:VCALENDAR", "Verify BEGIN header in show original");
ZAssert.assertStringContains(body, "END:VCALENDAR", "Verify END header in show original");
ZAssert.assertStringContains(body, "ORGANIZER:mailto:" + ZimbraAccount.Account4().EmailAddress, "Verify organizer value in show original");
} finally {
app.zPageMain.zCloseWindow(window, windowUrl, app);
}
}
}
| [
"jitesh.sojitra@synacor.com"
] | jitesh.sojitra@synacor.com |
3f271bff917d6617e59b80cc301e77987d5b1877 | 2b2fcb1902206ad0f207305b9268838504c3749b | /WakfuClientSources/srcx/class_9808_dMS.java | 9c3838d29fd69384153444a58cd4a4f6c2a2b79a | [] | no_license | shelsonjava/Synx | 4fbcee964631f747efc9296477dee5a22826791a | 0cb26d5473ba1f36a3ea1d7163a5b9e6ebcb0b1d | refs/heads/master | 2021-01-15T13:51:41.816571 | 2013-11-17T10:46:22 | 2013-11-17T10:46:22 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,444 | java | import java.util.Locale;
public class dMS
{
private String name;
private boolean optional;
private boolean eOD;
private String description;
private String mdw;
public void setName(String paramString)
{
if (!dnE.kb(paramString)) {
throw new cJ("Illegal name [" + paramString + "] for attribute");
}
this.name = paramString.toLowerCase(Locale.ENGLISH);
}
public String getName()
{
return this.name;
}
public void iJ(boolean paramBoolean)
{
this.optional = paramBoolean;
}
public boolean dpF()
{
return this.optional;
}
public void kF(boolean paramBoolean)
{
this.eOD = paramBoolean;
}
public boolean dpG()
{
return this.eOD;
}
public void setDescription(String paramString)
{
this.description = paramString;
}
public String getDescription()
{
return this.description;
}
public void bK(String paramString)
{
this.mdw = paramString;
}
public String bFa()
{
return this.mdw;
}
public boolean equals(Object paramObject)
{
if (paramObject == null) {
return false;
}
if (paramObject.getClass() != getClass()) {
return false;
}
dMS localdMS = (dMS)paramObject;
return (dnE.x(this.name, localdMS.name)) && (this.optional == localdMS.optional) && (this.eOD == localdMS.eOD) && (dnE.x(this.mdw, localdMS.mdw));
}
public int hashCode()
{
return dnE.bo(this.name);
}
} | [
"music_inme@hotmail.fr"
] | music_inme@hotmail.fr |
87dc9d15b961a64ef0e0c15f8e26d06570bb5180 | 3dd35c0681b374ce31dbb255b87df077387405ff | /generated/com/guidewire/_generated/entity/UWCompanyInternalAccess.java | 9102663ba4d0e88f430134f27264dd2915c4f0e0 | [] | no_license | walisashwini/SBTBackup | 58b635a358e8992339db8f2cc06978326fed1b99 | 4d4de43576ec483bc031f3213389f02a92ad7528 | refs/heads/master | 2023-01-11T09:09:10.205139 | 2020-11-18T12:11:45 | 2020-11-18T12:11:45 | 311,884,817 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 777 | java | package com.guidewire._generated.entity;
@javax.annotation.Generated(value = "com.guidewire.pl.metadata.codegen.Codegen", comments = "UWCompany.eti;UWCompany.eix;UWCompany.etx")
@java.lang.SuppressWarnings(value = {"deprecation", "unchecked"})
public class UWCompanyInternalAccess {
public static final com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.UWCompany, com.guidewire._generated.entity.UWCompanyInternal>> FRIEND_ACCESSOR = new com.guidewire.pl.system.internal.FriendAccessor<com.guidewire.pl.persistence.code.InstantiableEntityFriendAccess<entity.UWCompany, com.guidewire._generated.entity.UWCompanyInternal>>(entity.UWCompany.class);
private UWCompanyInternalAccess() {
}
} | [
"ashwini@cruxxtechnologies.com"
] | ashwini@cruxxtechnologies.com |
91c5896529feeeaf095dd8dd21daed2ff59a53d4 | 8782061b1e1223488a090f9f3f3b8dfe489e054a | /storeMongoDB/projects/ABCD/apache_kafka/main/1.java | f01bb3eb1f9a1e3653f73a5deb3c844d05aea379 | [] | no_license | ryosuke-ku/TCS_init | 3cb79a46aa217e62d8fff13d600f2a9583df986c | e1207d68bdc9d2f1eed63ef44a672b5a37b45633 | refs/heads/master | 2020-08-08T18:40:17.929911 | 2019-10-18T01:06:32 | 2019-10-18T01:06:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 867 | java | public void poll(long now) {
invokeCompletedOffsetCommitCallbacks();
if (subscriptions.partitionsAutoAssigned() && coordinatorUnknown()) {
ensureCoordinatorReady();
now = time.milliseconds();
}
if (needRejoin()) {
// due to a race condition between the initial metadata fetch and the initial rebalance,
// we need to ensure that the metadata is fresh before joining initially. This ensures
// that we have matched the pattern against the cluster's topics at least once before joining.
if (subscriptions.hasPatternSubscription())
client.ensureFreshMetadata();
ensureActiveGroup();
now = time.milliseconds();
}
pollHeartbeat(now);
maybeAutoCommitOffsetsAsync(now);
}
| [
"naist1020@gmail.com"
] | naist1020@gmail.com |
43d2b0f67edfed35337c91634dcb890a2d122786 | d7045b3be26437db0d390dae56d2a82f02f1acac | /hawtdispatch/src/main/java/org/fusesource/hawtdispatch/internal/util/IntegerCounter.java | 373108fbfb09391ae196cfda263b4ba31cc3e516 | [
"Apache-2.0"
] | permissive | chirino/hawtdispatch | f035fbd690f311acdb2d5435bf7d82ad2c650f2b | 649d28f8c5371f6d136d327813caf03df81e4186 | refs/heads/master | 2023-07-13T06:41:35.394186 | 2012-02-13T16:07:35 | 2012-02-13T16:07:35 | 553,391 | 14 | 4 | null | null | null | null | UTF-8 | Java | false | false | 2,432 | java | /**
* Copyright (C) 2012 FuseSource, Inc.
* http://fusesource.com
*
* 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.fusesource.hawtdispatch.internal.util;
/**
*
* @author <a href="http://hiramchirino.com">Hiram Chirino</a>
*
*/
public class IntegerCounter {
int counter;
public IntegerCounter() {
}
public IntegerCounter(int count) {
this.counter = count;
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
IntegerCounter other = (IntegerCounter) obj;
if (counter != other.counter)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + counter;
return result;
}
public final int addAndGet(int delta) {
counter+=delta;
return counter;
}
public final int decrementAndGet() {
return --counter;
}
public final int get() {
return counter;
}
public final int getAndAdd(int delta) {
int rc = counter;
counter += delta;
return rc;
}
public final int getAndDecrement() {
int rc = counter;
counter --;
return rc;
}
public final int getAndIncrement() {
return counter++;
}
public final int getAndSet(int newValue) {
int rc = counter;
counter = newValue;
return rc;
}
public final int incrementAndGet() {
return ++counter;
}
public int intValue() {
return counter;
}
public final void set(int newValue) {
counter = newValue;
}
public String toString() {
return Integer.toString(counter);
}
}
| [
"hiram@hiramchirino.com"
] | hiram@hiramchirino.com |
0bf62cd5faab38e0205c46e7d19e43d8984bc434 | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_15_5/Status/LteSonPciGetResult.java | cba08ec8633e57ffcb646260a1bf5d8a2aca6da4 | [] | no_license | AirspanNetworks/SWITModules | 8ae768e0b864fa57dcb17168d015f6585d4455aa | 7089a4b6456621a3abd601cc4592d4b52a948b57 | refs/heads/master | 2022-11-24T11:20:29.041478 | 2020-08-09T07:20:03 | 2020-08-09T07:20:03 | 184,545,627 | 1 | 0 | null | 2022-11-16T12:35:12 | 2019-05-02T08:21:55 | Java | UTF-8 | Java | false | false | 5,028 | java |
package Netspan.NBI_15_5.Status;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for LteSonPciGetResult complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="LteSonPciGetResult">
* <complexContent>
* <extension base="{http://Airspan.Netspan.WebServices}WsResponse">
* <sequence>
* <element name="NodeResult" type="{http://Airspan.Netspan.WebServices}NodeStatusResultValues"/>
* <element name="Name" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="NodeId" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="PciStatus" type="{http://Airspan.Netspan.WebServices}ManualAutomaticValues" minOccurs="0"/>
* <element name="Cell" type="{http://Airspan.Netspan.WebServices}LtePciStatusWs" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "LteSonPciGetResult", propOrder = {
"nodeResult",
"name",
"nodeId",
"pciStatus",
"cell"
})
public class LteSonPciGetResult
extends WsResponse
{
@XmlElement(name = "NodeResult", required = true)
@XmlSchemaType(name = "string")
protected NodeStatusResultValues nodeResult;
@XmlElement(name = "Name")
protected String name;
@XmlElement(name = "NodeId")
protected String nodeId;
@XmlElementRef(name = "PciStatus", namespace = "http://Airspan.Netspan.WebServices", type = JAXBElement.class, required = false)
protected JAXBElement<ManualAutomaticValues> pciStatus;
@XmlElement(name = "Cell")
protected List<LtePciStatusWs> cell;
/**
* Gets the value of the nodeResult property.
*
* @return
* possible object is
* {@link NodeStatusResultValues }
*
*/
public NodeStatusResultValues getNodeResult() {
return nodeResult;
}
/**
* Sets the value of the nodeResult property.
*
* @param value
* allowed object is
* {@link NodeStatusResultValues }
*
*/
public void setNodeResult(NodeStatusResultValues value) {
this.nodeResult = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
/**
* Gets the value of the nodeId property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNodeId() {
return nodeId;
}
/**
* Sets the value of the nodeId property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNodeId(String value) {
this.nodeId = value;
}
/**
* Gets the value of the pciStatus property.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link ManualAutomaticValues }{@code >}
*
*/
public JAXBElement<ManualAutomaticValues> getPciStatus() {
return pciStatus;
}
/**
* Sets the value of the pciStatus property.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link ManualAutomaticValues }{@code >}
*
*/
public void setPciStatus(JAXBElement<ManualAutomaticValues> value) {
this.pciStatus = value;
}
/**
* Gets the value of the cell property.
*
* <p>
* This accessor method returns a reference to the live list,
* not a snapshot. Therefore any modification you make to the
* returned list will be present inside the JAXB object.
* This is why there is not a <CODE>set</CODE> method for the cell property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getCell().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link LtePciStatusWs }
*
*
*/
public List<LtePciStatusWs> getCell() {
if (cell == null) {
cell = new ArrayList<LtePciStatusWs>();
}
return this.cell;
}
}
| [
"build.Airspan.com"
] | build.Airspan.com |
2b4d8a5b24eb88abb5abdc38842a5209b480a76a | ed0feac1cadc64a49d4f891d608e60ef4f45c43b | /rest-api/src/test/java/gov/cms/qpp/conversion/api/RestApiApplicationTest.java | 380e8c34aeb43c7ac05235bc92474a3a43a7f0e5 | [
"CC0-1.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-public-domain"
] | permissive | Gramos30/qpp-conversion-tool | 80fd9688319bbc506ddc6fedde053747ff13e826 | cb07b9923cb12a7a93e08babdaf870b9b4839a21 | refs/heads/master | 2020-03-08T04:20:37.564533 | 2018-03-26T20:38:40 | 2018-03-26T20:38:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 504 | java | package gov.cms.qpp.conversion.api;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
@RunWith(SpringRunner.class)
@SpringBootTest(classes = RestApiApplication.class)
public class RestApiApplicationTest {
@Test
public void contextLoads() {
}
@Test
public void testMain() {
RestApiApplication.main(new String[] {
"--spring.main.web-environment=false"
});
}
}
| [
"ad@mharrison.us"
] | ad@mharrison.us |
76c167832fdf56f82ab23dd5ee982b6032e5c157 | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/aa/a/c.java | 72bb64a09fafcaa16f5299fac3077a8b00850a54 | [] | no_license | 0jinxing/wechat-apk-source | 544c2d79bfc10261eb36389c1edfdf553d8f312a | f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d | refs/heads/master | 2020-06-07T20:06:03.580028 | 2019-06-21T09:17:26 | 2019-06-21T09:17:26 | 193,069,132 | 9 | 4 | null | null | null | null | UTF-8 | Java | false | false | 723 | java | package com.tencent.mm.plugin.aa.a;
import com.tencent.matrix.trace.core.AppMethodBeat;
public final class c
implements com.tencent.mm.vending.c.b<b>
{
protected b glu;
public final c.a glv;
public c()
{
this(new b());
AppMethodBeat.i(40596);
AppMethodBeat.o(40596);
}
private c(b paramb)
{
AppMethodBeat.i(40597);
this.glv = new c.a(this);
this.glu = paramb;
AppMethodBeat.o(40597);
}
public final b aof()
{
return this.glu;
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes6-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.aa.a.c
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
77a9cba054bd68049d62e7ecd8b4db9a7dc876d2 | 9b467b53005cc1c24326dc56735453b8702def77 | /epragati-reg-services/src/main/java/org/epragati/tax/service/TaxService.java | 98d680cc8f41cbe0b008ec3caf685b1853de33d4 | [] | no_license | otkp/23-REG-SERVICES | 50c41626e6c6e457f819784ada305497d20c23a3 | b238d6ab8f8b7a26f58ff099e17ecdbdc32f430b | refs/heads/master | 2022-12-20T12:49:35.996628 | 2020-10-16T10:40:50 | 2020-10-16T10:40:50 | 304,596,693 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 525 | java | package org.epragati.tax.service;
import java.util.List;
import org.epragati.master.dto.StagingRegistrationDetailsDTO;
public interface TaxService {
/**
* getting tax details
* @param stagingRegDetails
* @return
*/
StagingRegistrationDetailsDTO getTaxDetails(StagingRegistrationDetailsDTO stagingRegDetails);
/**
*
* @param State
* @param classOfVehicle
* @param seatingCapacity
* @return
*/
List<String> getTaxTypes(String State, String classOfVehicle, Integer seatingCapacity,Integer gvw);
}
| [
"8186067656kpsr@gmail.com"
] | 8186067656kpsr@gmail.com |
3830ec25324a263fc9db84d3a8ea40ec84e5ecea | ab1b6e7b92517e4425bb3ae817041b7697f98558 | /drools-compiler/src/main/java/org/drools/compiler/xml/rules/FieldBindingHandler.java | f761b2ddd648cb8a1dc550362ac3dcd87fe30dbb | [] | no_license | jayzhk/drools51 | 2a1ee1a3a9284e79b294aa39d7050b35ffac6f31 | 98c4067df30c060ec19c0ae70244cc089ae43e56 | refs/heads/master | 2021-05-08T07:11:39.985092 | 2017-10-18T15:13:50 | 2017-10-18T15:13:50 | 106,695,906 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,132 | java | package org.drools.compiler.xml.rules;
/*
* Copyright 2005 JBoss 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.
*/
import java.util.HashSet;
import org.drools.lang.descr.FieldBindingDescr;
import org.drools.lang.descr.FieldConstraintDescr;
import org.drools.lang.descr.PatternDescr;
import org.drools.lang.descr.PredicateDescr;
import org.drools.xml.BaseAbstractHandler;
import org.drools.xml.ExtensibleXmlParser;
import org.drools.xml.Handler;
import org.w3c.dom.Element;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
/**
* @author mproctor
*/
public class FieldBindingHandler extends BaseAbstractHandler
implements
Handler {
public FieldBindingHandler() {
if ( (this.validParents == null) && (this.validPeers == null) ) {
this.validParents = new HashSet();
this.validParents.add( PatternDescr.class );
this.validPeers = new HashSet();
this.validPeers.add( null );
this.validPeers.add( FieldConstraintDescr.class );
this.validPeers.add( PredicateDescr.class );
this.validPeers.add( FieldBindingDescr.class );
this.allowNesting = false;
}
}
public Object start(final String uri,
final String localName,
final Attributes attrs,
final ExtensibleXmlParser parser) throws SAXException {
parser.startElementBuilder( localName,
attrs );
final String identifier = attrs.getValue( "identifier" );
final String fieldName = attrs.getValue( "field-name" );
emptyAttributeCheck( localName, "identifier", identifier, parser );
emptyAttributeCheck( localName, "fieldName", fieldName, parser );
final FieldBindingDescr fieldBindingDescr = new FieldBindingDescr( fieldName,
identifier );
return fieldBindingDescr;
}
public Object end(final String uri,
final String localName,
final ExtensibleXmlParser parser) throws SAXException {
final Element element = parser.endElementBuilder();
final FieldBindingDescr fieldBindingDescr = (FieldBindingDescr) parser.getCurrent();
final PatternDescr patternDescr = (PatternDescr) parser.getParent( );
patternDescr.addConstraint( fieldBindingDescr );
return fieldBindingDescr;
}
public Class generateNodeFor() {
return FieldBindingDescr.class;
}
} | [
"jay.zeng@hotmail.com"
] | jay.zeng@hotmail.com |
6af8bc141580dcda3d726c76ca41994acfca649a | c699fe58ca7b58a34f47cc3259fb8d567c676866 | /softwarereuse/reuze/demo/demoGIF.java | 1212f9d41891b120b30315a336f9202c14e04435 | [] | no_license | ammarblue/brad-baze-code-bank | 9b0b300ab09f5ed315ce6ac0a8352fcd8a6e03e8 | 0cc496fbdef4f7b466d4905c23ae0bedaf9624c9 | refs/heads/master | 2021-01-01T05:47:15.497877 | 2013-05-31T15:05:31 | 2013-05-31T15:05:31 | 39,472,729 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,205 | java | package reuze.demo;
//import java.awt.image.BufferedImage;
import java.util.ArrayList;
import com.software.reuze.z_BufferedImage;
import com.software.reuze.z_GIFDecoder;
import processing.core.PApplet;
import processing.core.PConstants;
import processing.core.PImage;
public class demoGIF extends PApplet {
ArrayList<PImage> animation;
public void setup() {
size(400, 200);
frameRate(10);
animation= new ArrayList<PImage>();
z_GIFDecoder d = new z_GIFDecoder();
d.read("./data/bonusmany.gif");
int n = d.getFrameCount();
for (int i = 0; i < n; i++) {
z_BufferedImage frame = d.getFrame(i); // frame i
int t = d.getDelay(i); // display duration of frame in milliseconds
System.out.println(i+" "+t);
PImage img=new PImage(frame.getWidth(),frame.getHeight(),PConstants.ARGB);
img.loadPixels();
frame.getRGB(0, 0, img.width, img.height, img.pixels, 0, img.width);
img.updatePixels();
img.resize(32,32);
animation.add(img);
}
}
int frame;
public void draw() {
background(255 / (float)height * (mouseY+1));
if (animation.size()!=0) {
int i=frame%animation.size();
image(animation.get(i),50,50);
frame++;
}
}
}
| [
"in_tech@mac.com"
] | in_tech@mac.com |
799be86315748bfc4d3a829d59f958f748660e95 | 1455f48f30a3b5378fadf148b5cb23058b852c99 | /hframe-webgenerator/src/main/java/com/hframework/generator/web/constants/CreatorConst.java | 6678711f97c3b3028dda1043e138c502cedf0f55 | [] | no_license | luchao0111/hframework | 764d02d40e6b3ffbc77c5604eb03aaee2b52758c | 1ab0ebd8bd75c2aa305b55232fa96e7ac4cb85c4 | refs/heads/master | 2023-01-30T01:05:16.638719 | 2019-06-27T06:38:20 | 2019-06-27T06:38:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package com.hframework.generator.web.constants;
/**
* 生成器常量定义类
* @author zhangqh6
*
*/
public class CreatorConst {
// public static String PROJECT_BASE_FILE_PATH = "project_base_file_path";
public static String PROJECT_SRC_FILE_PATH = "project_src_file_path";
// public static String PROJECT_TOMCAT_BASE_FILE_PATH = "project_tomcat_base_file_path";
public static String SQL_FILE_PATH = "sql_file_path";
public static String TARGET_PROJECT_BASE_PATH = "target_project_base_path";
public static String GENERATOR_CONFIG_PATH = "generator_config_path";
public static String GENERATOR_TMP_DIR = "generator_tmp_dir";
public static String PO_CLASS_PACKAGE = "po_class_package";
public static String DAO_CLASS_PACKAGE = "dao_class_package";
public static String DAOIMPL_CLASS_PACKAGE = "daoimpl_class_package";
public static String SERVICE_CLASS_PACKAGE = "service_class_package";
public static String SERVICEIMPL_CLASS_PACKAGE = "serviceimpl_class_package";
public static String ACTION_CLASS_PACKAGE = "action_class_package";
}
| [
"zhangquanhong@ucfgroup.com"
] | zhangquanhong@ucfgroup.com |
45eca1210b513708bd9ed4e1f6e8ed5d01006677 | 5507f8bc6f6206aa4466cca116ac31abc35eba68 | /impl/AbstractBaseList.java | ed7ad0ac133d224e359c8746fb5a8322e049b444 | [
"BSD-3-Clause"
] | permissive | jchildress/com.powerdata.openpa | 71a8b290a21a37dd2eb96c6e1131d796c34c8464 | a308dd4f8729e9874820a4c4c2f93adf2324315e | refs/heads/master | 2021-01-06T18:25:09.247831 | 2016-05-18T21:41:20 | 2016-05-18T21:41:20 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 966 | java | package com.powerdata.openpa.impl;
/*
* Copyright (c) 2016, PowerData Corporation, Incremental Systems Corporation
* All rights reserved.
* Licensed under the BSD-3 Clause License.
* See full license at https://powerdata.github.io/openpa/LICENSE.md
*/
import java.util.AbstractList;
import com.powerdata.openpa.BaseList;
import com.powerdata.openpa.BaseObject;
public abstract class AbstractBaseList<T extends BaseObject> extends AbstractList<T> implements BaseList<T>
{
protected int _size;
protected AbstractBaseList(int size)
{
_size = size;
}
protected AbstractBaseList()
{
_size = 0;
}
@Override
public int size()
{
return _size;
}
@Override
public boolean objEquals(int ndx, Object obj)
{
BaseObject o = (BaseObject) obj;
return getListMeta().equals(o.getList().getListMeta()) && getKey(ndx) == o.getKey();
}
@Override
public int objHash(int ndx)
{
return BaseList.CalcListHash(getListMeta(), getKey(ndx));
}
}
| [
"chris@powerdata.com"
] | chris@powerdata.com |
8ff0b15da12227c46b1ff09d85d4b198fe4fec18 | d383d855e48ee2f5da65791f4052533eca339369 | /src/test/java/com/alibaba/druid/bvt/sql/oceanbase/OceanbaseCreateTableTest_subPartition.java | 5131f927699a9e124c512d87497549ffdb2771af | [
"Apache-2.0"
] | permissive | liuxing7954/druid-source | 0e2dc0b1a2f498045b8689d6431764f4f4525070 | fc27b5ac4695dc42e1daa62db012adda7c217d36 | refs/heads/master | 2022-12-21T14:53:26.923986 | 2020-02-29T07:15:15 | 2020-02-29T07:15:15 | 243,908,145 | 1 | 1 | NOASSERTION | 2022-12-16T09:54:44 | 2020-02-29T05:07:04 | Java | UTF-8 | Java | false | false | 3,775 | java | /*
* Copyright 1999-2018 Alibaba Group Holding Ltd.
*
* 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.alibaba.druid.bvt.sql.oceanbase;
import java.util.List;
import org.junit.Assert;
import com.alibaba.druid.sql.MysqlTest;
import com.alibaba.druid.sql.SQLUtils;
import com.alibaba.druid.sql.ast.SQLStatement;
import com.alibaba.druid.sql.dialect.mysql.parser.MySqlStatementParser;
import com.alibaba.druid.sql.dialect.mysql.visitor.MySqlSchemaStatVisitor;
public class OceanbaseCreateTableTest_subPartition extends MysqlTest {
public void test_0() throws Exception {
String sql = "CREATE TABLE ts (id INT, purchased DATE) " //
+ "PARTITION BY RANGE(YEAR(purchased)) " //
+ "SUBPARTITION BY HASH(TO_DAYS(purchased)) " //
+ "SUBPARTITIONS 2 ( " //
+ "PARTITION p0 VALUES LESS THAN (1990), " //
+ "PARTITION p1 VALUES LESS THAN (2000), " //
+ "PARTITION p2 VALUES LESS THAN MAXVALUE )"; //
MySqlStatementParser parser = new MySqlStatementParser(sql);
List<SQLStatement> stmtList = parser.parseStatementList();
SQLStatement stmt = stmtList.get(0);
{
String result = SQLUtils.toMySqlString(stmt);
Assert.assertEquals("CREATE TABLE ts ("
+ "\n\tid INT,"
+ "\n\tpurchased DATE"
+ "\n)"
+ "\nPARTITION BY RANGE (YEAR(purchased))"
+ "\nSUBPARTITION BY HASH (TO_DAYS(purchased)) SUBPARTITIONS 2 ("
+ "\n\tPARTITION p0 VALUES LESS THAN (1990),"
+ "\n\tPARTITION p1 VALUES LESS THAN (2000),"
+ "\n\tPARTITION p2 VALUES LESS THAN MAXVALUE"
+ "\n)",
result);
}
{
String result = SQLUtils.toMySqlString(stmt, SQLUtils.DEFAULT_LCASE_FORMAT_OPTION);
Assert.assertEquals("create table ts ("
+ "\n\tid INT,"
+ "\n\tpurchased DATE"
+ "\n)"
+ "\npartition by range (YEAR(purchased))"
+ "\nsubpartition by hash (TO_DAYS(purchased)) subpartitions 2 ("
+ "\n\tpartition p0 values less than (1990),"
+ "\n\tpartition p1 values less than (2000),"
+ "\n\tpartition p2 values less than maxvalue"
+ "\n)",
result);
}
Assert.assertEquals(1, stmtList.size());
MySqlSchemaStatVisitor visitor = new MySqlSchemaStatVisitor();
stmt.accept(visitor);
System.out.println("Tables : " + visitor.getTables());
System.out.println("fields : " + visitor.getColumns());
System.out.println("coditions : " + visitor.getConditions());
System.out.println("orderBy : " + visitor.getOrderByColumns());
Assert.assertEquals(1, visitor.getTables().size());
Assert.assertEquals(2, visitor.getColumns().size());
Assert.assertEquals(0, visitor.getConditions().size());
// Assert.assertTrue(visitor.getTables().containsKey(new TableStat.Name("t_basic_store")));
}
}
| [
"jixiaoyi@apexsoft.com.cn"
] | jixiaoyi@apexsoft.com.cn |
7fd2aa482c8dd8622e9db91b2a39b9a2ad56e1c8 | c20f74f7d4eebcf0b545413fbc3d7924e665e1a3 | /impl/src/main/java/org/jboss/arquillian/ajocado/locator/JQueryLocator.java | e95a91f93082b94bfa5ae38129d2bdcac2b70d20 | [] | no_license | lfryc/arquillian-ajocado | 3dfccc1067b3e526015c8674aae836259699d359 | 82c5cdbae3a07872e1f150642d4f28ae3d49063f | refs/heads/master | 2021-07-08T10:26:43.488427 | 2012-08-02T21:02:03 | 2012-08-02T21:02:03 | 1,339,921 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,093 | java | /**
* JBoss, Home of Professional Open Source
* Copyright 2011, Red Hat, Inc. and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* This 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.
*
* This software 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 this software; if not, write to the Free
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
package org.jboss.arquillian.ajocado.locator;
import org.jboss.arquillian.ajocado.format.SimplifiedFormat;
import org.jboss.arquillian.ajocado.locator.element.AbstractIterableLocator;
import org.jboss.arquillian.ajocado.locator.element.ElementLocationStrategy;
import org.jboss.arquillian.ajocado.locator.element.ExtendedLocator;
import org.jboss.arquillian.ajocado.locator.element.FilterableLocator;
/**
* <p>
* Locates the element using <a href="http://api.jquery.com/category/selectors/">JQuery Selector</a> syntax.
* </p>
*
* <p>
* This syntax is extended in AjaxSelenium by new filters similar to <tt><a
* href="http://api.jquery.com/contains-selector/">:contains(text)</a></tt>
* </p>
*
* <ul>
* <li><tt>:textStartsWith(textPattern)</tt> - trimmed element text are matched to start with given textPattern</li>
* <li><tt>:textEndsWith(textPattern)</tt> - trimmed element text are matched to end with given textPattern</li>
* <li><tt>:textEquals(textPattern)</tt> - trimmed element text are compared to exact match with given textPattern</li>
* </ul>
*
* @author <a href="mailto:lfryc@redhat.com">Lukas Fryc</a>
* @version $Revision$
*/
public class JQueryLocator extends AbstractIterableLocator<JQueryLocator> implements ExtendedLocator<JQueryLocator>,
FilterableLocator<JQueryLocator> {
/**
* Instantiates a new jQuery locator.
*
* @param jquerySelector
* the jquery selector
*/
public JQueryLocator(String jquerySelector) {
super(jquerySelector);
}
/*
* (non-Javadoc)
*
* @see org.jboss.arquillian.ajocado.locator.Locator#getLocationStrategy()
*/
public ElementLocationStrategy getLocationStrategy() {
return ElementLocationStrategy.JQUERY;
}
/*
* (non-Javadoc)
*
* @see org.jboss.arquillian.ajocado.locator.element.IterableLocator#get(int)
*/
public JQueryLocator get(int index) {
return new JQueryLocator(SimplifiedFormat.format("{0}:eq({1})", getRawLocator(), index - 1));
}
/*
* (non-Javadoc)
*
* @see
* org.jboss.arquillian.ajocado.locator.CompoundableLocator#getChild(org.jboss.test.selenium.locator.CompoundableLocator
* )
*/
public JQueryLocator getChild(JQueryLocator elementLocator) {
return new JQueryLocator(SimplifiedFormat.format("{0} > {1}", getRawLocator(), elementLocator.getRawLocator()));
}
/*
* (non-Javadoc)
*
* @see org.jboss.arquillian.ajocado.locator.CompoundableLocator#getDescendant
* (org.jboss.arquillian.ajocado.locator.CompoundableLocator )
*/
public JQueryLocator getDescendant(JQueryLocator elementLocator) {
return new JQueryLocator(SimplifiedFormat.format("{0} {1}", getRawLocator(), elementLocator.getRawLocator()));
}
@Override
public JQueryLocator format(Object... args) {
return (JQueryLocator) super.format(args);
}
@Override
public JQueryLocator filter(String extension) {
return new JQueryLocator(getRawLocator() + extension);
}
}
| [
"lfryc@redhat.com"
] | lfryc@redhat.com |
dbd35e794e863e5bf7fae270fac09bd22e912b47 | 3cf870ec335aa1b95e8776ea9b2a9d6495377628 | /admin-sponge/build/tmp/recompileMc/sources/net/minecraft/command/RecipeCommand.java | 29e7f8b1a69394a64788dad989035ae68ed31c50 | [] | no_license | yk133/MyMc | d6498607e7f1f932813178e7d0911ffce6e64c83 | e1ae6d97415583b1271ee57ac96083c1350ac048 | refs/heads/master | 2020-04-03T16:23:09.774937 | 2018-11-05T12:17:39 | 2018-11-05T12:17:39 | 155,402,500 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,731 | java | package net.minecraft.command;
import com.google.common.collect.Lists;
import java.util.Collections;
import java.util.List;
import javax.annotation.Nullable;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraft.item.crafting.CraftingManager;
import net.minecraft.item.crafting.IRecipe;
import net.minecraft.server.MinecraftServer;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.math.BlockPos;
public class RecipeCommand extends CommandBase
{
public String func_71517_b()
{
return "recipe";
}
public int func_82362_a()
{
return 2;
}
public String func_71518_a(ICommandSender p_71518_1_)
{
return "commands.recipe.usage";
}
public void func_184881_a(MinecraftServer p_184881_1_, ICommandSender p_184881_2_, String[] p_184881_3_) throws CommandException
{
if (p_184881_3_.length < 2)
{
throw new WrongUsageException("commands.recipe.usage", new Object[0]);
}
else
{
boolean flag = "give".equalsIgnoreCase(p_184881_3_[0]);
boolean flag1 = "take".equalsIgnoreCase(p_184881_3_[0]);
if (!flag && !flag1)
{
throw new WrongUsageException("commands.recipe.usage", new Object[0]);
}
else
{
for (EntityPlayerMP entityplayermp : func_193513_a(p_184881_1_, p_184881_2_, p_184881_3_[1]))
{
if ("*".equals(p_184881_3_[2]))
{
if (flag)
{
entityplayermp.func_192021_a(this.func_192556_d());
func_152373_a(p_184881_2_, this, "commands.recipe.give.success.all", new Object[] {entityplayermp.func_70005_c_()});
}
else
{
entityplayermp.func_192022_b(this.func_192556_d());
func_152373_a(p_184881_2_, this, "commands.recipe.take.success.all", new Object[] {entityplayermp.func_70005_c_()});
}
}
else
{
IRecipe irecipe = CraftingManager.func_193373_a(new ResourceLocation(p_184881_3_[2]));
if (irecipe == null)
{
throw new CommandException("commands.recipe.unknownrecipe", new Object[] {p_184881_3_[2]});
}
if (irecipe.isDynamic())
{
throw new CommandException("commands.recipe.unsupported", new Object[] {p_184881_3_[2]});
}
List<IRecipe> list = Lists.newArrayList(irecipe);
if (flag == entityplayermp.getRecipeBook().isUnlocked(irecipe))
{
String s = flag ? "commands.recipe.alreadyHave" : "commands.recipe.dontHave";
throw new CommandException(s, new Object[] {entityplayermp.func_70005_c_(), irecipe.getRecipeOutput().func_82833_r()});
}
if (flag)
{
entityplayermp.func_192021_a(list);
func_152373_a(p_184881_2_, this, "commands.recipe.give.success.one", new Object[] {entityplayermp.func_70005_c_(), irecipe.getRecipeOutput().func_82833_r()});
}
else
{
entityplayermp.func_192022_b(list);
func_152373_a(p_184881_2_, this, "commands.recipe.take.success.one", new Object[] {irecipe.getRecipeOutput().func_82833_r(), entityplayermp.func_70005_c_()});
}
}
}
}
}
}
private List<IRecipe> func_192556_d()
{
return Lists.newArrayList(CraftingManager.field_193380_a);
}
public List<String> func_184883_a(MinecraftServer p_184883_1_, ICommandSender p_184883_2_, String[] p_184883_3_, @Nullable BlockPos p_184883_4_)
{
if (p_184883_3_.length == 1)
{
return func_71530_a(p_184883_3_, new String[] {"give", "take"});
}
else if (p_184883_3_.length == 2)
{
return func_71530_a(p_184883_3_, p_184883_1_.getOnlinePlayerNames());
}
else
{
return p_184883_3_.length == 3 ? func_175762_a(p_184883_3_, CraftingManager.field_193380_a.getKeys()) : Collections.emptyList();
}
}
} | [
"1060682109@qq.com"
] | 1060682109@qq.com |
73acd2aa456d63ce038f3af34028fd57bdfe1e11 | 7e5377ed442f27089312f2a973e59b1bd9a1f8ab | /app/src/main/java/com/prolificwebworks/theclubix/entities/SongsData.java | df96f6e5beac15ca25fd8370063681f8d9e5b0f7 | [] | no_license | 029vaibhav/Clubix | 7d08c392a3a6a17c0161b1224e04bcb8d52c41fb | 54cbe0ef84a64365f6b9312ef0c2dd57a5eb9dc4 | refs/heads/master | 2020-12-27T15:26:36.564992 | 2015-10-13T17:51:37 | 2015-10-13T17:51:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,428 | java | package com.prolificwebworks.theclubix.entities;
import java.util.List;
/**
* Created by vaibhav on 9/10/15.
*/
public class SongsData {
private String clx_youtube_url;
private String clx_song_artist_name;
private String clx_song_upload_url;
private String snap_isAutoPosted;
private String clx_soundcloud_url;
private String clx_song_name;
private List<SnapFB> snapFB;
private String postId;
private String post_content;
private String clx_itunes_url;
private String clx_song_release_date;
private String snapEdIT;
private String recurrence_every;
private String clx_song_description;
private String clx_beatport_url;
private String event_venue_name;
private String post_author;
private String song_image;
private String event_show_map;
private String post_title;
private List<SnapTW> snapTW;
private String clx_song_url;
private String post_date;
public String getClx_youtube_url ()
{
return clx_youtube_url;
}
public void setClx_youtube_url (String clx_youtube_url)
{
this.clx_youtube_url = clx_youtube_url;
}
public String getClx_song_artist_name ()
{
return clx_song_artist_name;
}
public void setClx_song_artist_name (String clx_song_artist_name)
{
this.clx_song_artist_name = clx_song_artist_name;
}
public String getClx_song_upload_url ()
{
return clx_song_upload_url;
}
public void setClx_song_upload_url (String clx_song_upload_url)
{
this.clx_song_upload_url = clx_song_upload_url;
}
public String getSnap_isAutoPosted ()
{
return snap_isAutoPosted;
}
public void setSnap_isAutoPosted (String snap_isAutoPosted)
{
this.snap_isAutoPosted = snap_isAutoPosted;
}
public String getClx_soundcloud_url ()
{
return clx_soundcloud_url;
}
public void setClx_soundcloud_url (String clx_soundcloud_url)
{
this.clx_soundcloud_url = clx_soundcloud_url;
}
public String getClx_song_name ()
{
return clx_song_name;
}
public void setClx_song_name (String clx_song_name)
{
this.clx_song_name = clx_song_name;
}
public List<SnapFB> getSnapFB ()
{
return snapFB;
}
public void setSnapFB (List<SnapFB> snapFB)
{
this.snapFB = snapFB;
}
public String getPostId ()
{
return postId;
}
public void setPostId (String postId)
{
this.postId = postId;
}
public String getPost_content ()
{
return post_content;
}
public void setPost_content (String post_content)
{
this.post_content = post_content;
}
public String getClx_itunes_url ()
{
return clx_itunes_url;
}
public void setClx_itunes_url (String clx_itunes_url)
{
this.clx_itunes_url = clx_itunes_url;
}
public String getClx_song_release_date ()
{
return clx_song_release_date;
}
public void setClx_song_release_date (String clx_song_release_date)
{
this.clx_song_release_date = clx_song_release_date;
}
public String getSnapEdIT ()
{
return snapEdIT;
}
public void setSnapEdIT (String snapEdIT)
{
this.snapEdIT = snapEdIT;
}
public String getRecurrence_every ()
{
return recurrence_every;
}
public void setRecurrence_every (String recurrence_every)
{
this.recurrence_every = recurrence_every;
}
public String getClx_song_description ()
{
return clx_song_description;
}
public void setClx_song_description (String clx_song_description)
{
this.clx_song_description = clx_song_description;
}
public String getClx_beatport_url ()
{
return clx_beatport_url;
}
public void setClx_beatport_url (String clx_beatport_url)
{
this.clx_beatport_url = clx_beatport_url;
}
public String getEvent_venue_name ()
{
return event_venue_name;
}
public void setEvent_venue_name (String event_venue_name)
{
this.event_venue_name = event_venue_name;
}
public String getPost_author ()
{
return post_author;
}
public void setPost_author (String post_author)
{
this.post_author = post_author;
}
public String getSong_image ()
{
return song_image;
}
public void setSong_image (String song_image)
{
this.song_image = song_image;
}
public String getEvent_show_map ()
{
return event_show_map;
}
public void setEvent_show_map (String event_show_map)
{
this.event_show_map = event_show_map;
}
public String getPost_title ()
{
return post_title;
}
public void setPost_title (String post_title)
{
this.post_title = post_title;
}
public List<SnapTW> getSnapTW ()
{
return snapTW;
}
public void setSnapTW (List<SnapTW> snapTW)
{
this.snapTW = snapTW;
}
public String getClx_song_url ()
{
return clx_song_url;
}
public void setClx_song_url (String clx_song_url)
{
this.clx_song_url = clx_song_url;
}
public String getPost_date ()
{
return post_date;
}
public void setPost_date (String post_date)
{
this.post_date = post_date;
}
@Override
public String toString()
{
return "ClassPojo [clx_youtube_url = "+clx_youtube_url+", clx_song_artist_name = "+clx_song_artist_name+", clx_song_upload_url = "+clx_song_upload_url+", snap_isAutoPosted = "+snap_isAutoPosted+", clx_soundcloud_url = "+clx_soundcloud_url+", clx_song_name = "+clx_song_name+", snapFB = "+snapFB+", postId = "+postId+", post_content = "+post_content+", clx_itunes_url = "+clx_itunes_url+", clx_song_release_date = "+clx_song_release_date+", snapEdIT = "+snapEdIT+", recurrence_every = "+recurrence_every+", clx_song_description = "+clx_song_description+", clx_beatport_url = "+clx_beatport_url+", event_venue_name = "+event_venue_name+", post_author = "+post_author+", song_image = "+song_image+", event_show_map = "+event_show_map+", post_title = "+post_title+", snapTW = "+snapTW+", clx_song_url = "+clx_song_url+", post_date = "+post_date+"]";
}
}
| [
"vaibs4007@rediff.com"
] | vaibs4007@rediff.com |
4afcecfffcda3d63c4c4271573eaacb94c6e4c5d | 2f1e7a0134d6b8c078c5ce6049f132296ff94422 | /pagingBoard/src/com/board/biz/BoardBizImpl.java | 180e084673d446f629e5cd138306afdc2e590944 | [] | no_license | Dasommm/Servlet | 91f2433e1fa3fdc739e46bd4cdf55858fcdd57ff | 275c17fed7797ebb845bd0d7423a753a9e4c1386 | refs/heads/master | 2021-05-20T18:57:20.902054 | 2020-04-02T07:51:57 | 2020-04-02T07:51:57 | 252,380,396 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 687 | java | package com.board.biz;
import java.util.List;
import com.board.dao.BoardDao;
import com.board.dao.BoardDaoImpl;
import com.board.dto.BoardDto;
import com.board.dto.PagingDto;
public class BoardBizImpl implements BoardBiz {
private BoardDao dao = new BoardDaoImpl();
@Override
public List<BoardDto> selectAll(PagingDto dto) {
int currentpage = dto.getCurrentpage();
int totalrows = dto.getTotalrows();
int to = totalrows * (currentpage -1)+1;
int from = totalrows * currentpage;
return dao.selectAll(to, from);
}
@Override
public int totalPage(int totalrows) {
int totalpage = (int)Math.ceil((double)dao.totalPage()/totalrows);
return totalpage;
}
}
| [
"dasom.kwon92@gmail.com"
] | dasom.kwon92@gmail.com |
957c6d7f8e096c49ecfd42cc9c38d30b50615366 | 3fc503bed9e8ba2f8c49ebf7783bcdaa78951ba8 | /TRAVACC_R5/ndcfacades/src/de/hybris/platform/ndcfacades/ndc/AircraftMetadataType.java | 62cee09348b513268c209db977ef2e418fc204cd | [] | no_license | RabeS/model-T | 3e64b2dfcbcf638bc872ae443e2cdfeef4378e29 | bee93c489e3a2034b83ba331e874ccf2c5ff10a9 | refs/heads/master | 2021-07-01T02:13:15.818439 | 2020-09-05T08:33:43 | 2020-09-05T08:33:43 | 147,307,585 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,558 | java | //
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.8-b130911.1802
// 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: 2017.02.07 at 04:46:04 PM GMT
//
package de.hybris.platform.ndcfacades.ndc;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* A data type for AIRCRAFT Metadata.
*
* <p>Java class for AircraftMetadataType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="AircraftMetadataType">
* <complexContent>
* <extension base="{http://www.iata.org/IATA/EDIST}MetadataObjectBaseType">
* <sequence>
* <element name="TailNumber" type="{http://www.iata.org/IATA/EDIST}ContextSimpleType" minOccurs="0"/>
* <element name="Name" type="{http://www.iata.org/IATA/EDIST}ProperNameSimpleType" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "AircraftMetadataType", propOrder = {
"tailNumber",
"name"
})
public class AircraftMetadataType
extends MetadataObjectBaseType
{
@XmlElement(name = "TailNumber")
protected String tailNumber;
@XmlElement(name = "Name")
protected String name;
/**
* Gets the value of the tailNumber property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getTailNumber() {
return tailNumber;
}
/**
* Sets the value of the tailNumber property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setTailNumber(String value) {
this.tailNumber = value;
}
/**
* Gets the value of the name property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getName() {
return name;
}
/**
* Sets the value of the name property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setName(String value) {
this.name = value;
}
}
| [
"sebastian.rulik@gmail.com"
] | sebastian.rulik@gmail.com |
403c8a3316c34bc7ff1d9a9b4b86c942ec6c832f | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Honor5C-7.0/src/main/java/java/net/StandardProtocolFamily.java | a58390082579c475920804fbe45c25030d0dc07f | [] | no_license | morningblu/HWFramework | 0ceb02cbe42585d0169d9b6c4964a41b436039f5 | 672bb34094b8780806a10ba9b1d21036fd808b8e | refs/heads/master | 2023-07-29T05:26:14.603817 | 2021-09-03T05:23:34 | 2021-09-03T05:23:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,472 | java | package java.net;
public enum StandardProtocolFamily implements ProtocolFamily {
;
static {
/* JADX: method processing error */
/*
Error: jadx.core.utils.exceptions.DecodeException: Load method exception in method: java.net.StandardProtocolFamily.<clinit>():void
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:113)
at jadx.core.dex.nodes.ClassNode.load(ClassNode.java:256)
at jadx.core.ProcessClass.process(ProcessClass.java:34)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:281)
at jadx.api.JavaClass.decompile(JavaClass.java:59)
at jadx.api.JadxDecompiler$1.run(JadxDecompiler.java:161)
Caused by: jadx.core.utils.exceptions.DecodeException: in method: java.net.StandardProtocolFamily.<clinit>():void
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:46)
at jadx.core.dex.nodes.MethodNode.load(MethodNode.java:98)
... 5 more
Caused by: java.lang.IllegalArgumentException: bogus opcode: 0073
at com.android.dx.io.OpcodeInfo.get(OpcodeInfo.java:1197)
at com.android.dx.io.OpcodeInfo.getFormat(OpcodeInfo.java:1212)
at com.android.dx.io.instructions.DecodedInstruction.decode(DecodedInstruction.java:72)
at jadx.core.dex.instructions.InsnDecoder.decodeInsns(InsnDecoder.java:43)
... 6 more
*/
/*
// Can't load method instructions.
*/
throw new UnsupportedOperationException("Method not decompiled: java.net.StandardProtocolFamily.<clinit>():void");
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
eabbb7ddcea8f6dd36136111fb8f0bcc2bce46ca | 0e06e096a9f95ab094b8078ea2cd310759af008b | /classes35-dex2jar/com/google/android/gms/internal/drive/zzcq.java | aa58b5617ad526ca34c19f6a2f451f1542eae6fa | [] | no_license | Manifold0/adcom_decompile | 4bc2907a057c73703cf141dc0749ed4c014ebe55 | fce3d59b59480abe91f90ba05b0df4eaadd849f7 | refs/heads/master | 2020-05-21T02:01:59.787840 | 2019-05-10T00:36:27 | 2019-05-10T00:36:27 | 185,856,424 | 1 | 2 | null | 2019-05-10T00:36:28 | 2019-05-09T19:04:28 | Java | UTF-8 | Java | false | false | 848 | java | //
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.internal.drive;
import android.os.RemoteException;
import com.google.android.gms.tasks.TaskCompletionSource;
import com.google.android.gms.common.api.Api$AnyClient;
import com.google.android.gms.common.api.internal.ListenerHolder$ListenerKey;
import com.google.android.gms.drive.DriveResource;
import com.google.android.gms.common.api.internal.UnregisterListenerMethod;
final class zzcq extends UnregisterListenerMethod<zzaw, zzdi>
{
private final /* synthetic */ DriveResource zzfo;
private final /* synthetic */ zzdi zzfp;
zzcq(final zzch zzch, final ListenerHolder$ListenerKey listenerHolder$ListenerKey, final DriveResource zzfo, final zzdi zzfp) {
this.zzfo = zzfo;
this.zzfp = zzfp;
super(listenerHolder$ListenerKey);
}
}
| [
"querky1231@gmail.com"
] | querky1231@gmail.com |
956feaa45b10bba13d25f87e7eab34a6c1fea835 | d73fb068e789ac96121d25c8d59aee46df78afad | /app/src/main/java/com/zzu/ehome/ehomefordoctor/mvp/view/IOnLineView.java | 8cd910189bd05045ad1f1d9cf79511e179982157 | [] | no_license | xtfgq/ehomedoctor | 1d0e21a800e0e11b9de8274015dec5336cf70fb0 | 7d547e58862e8e8a20ce0d4e8a87eefe80e2010c | refs/heads/master | 2020-06-23T23:05:56.455465 | 2017-08-01T09:45:17 | 2017-08-01T09:45:17 | 74,632,675 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 326 | java | package com.zzu.ehome.ehomefordoctor.mvp.view;
import com.zzu.ehome.ehomefordoctor.entity.UsersBySignDoctor;
import java.util.List;
import static android.R.id.list;
/**
* Created by Administrator on 2016/10/15.
*/
public interface IOnLineView {
void onLineSuccess(String str);
void onLineErroe(Exception e);
}
| [
"gq820125@163.com"
] | gq820125@163.com |
2a756c1717b6641932eb3e7c194334f1589d61e4 | 36e3674e96cff7fce4cba244e8a3e94136fdcc4b | /JestSPL/Jest/source_gen/io/searchbox/core/search/aggregation/TermsAggregation.java | b6e825ee194bac30a0cf714c6bafdd6aa3d453d8 | [] | no_license | hui8958/SPLE_Project | efa79728a288cb798ab9d7d5a1b993c295895ff5 | f659dec562e7321d2e6e72983a47bca4657f3a3c | refs/heads/master | 2020-06-28T19:28:31.925001 | 2016-11-22T15:19:37 | 2016-11-22T15:19:37 | 74,481,878 | 0 | 2 | null | null | null | null | UTF-8 | Java | false | false | 4,226 | java | package io.searchbox.core.search.aggregation;
/*Generated by MPS */
import java.util.List;
import java.util.LinkedList;
import com.google.gson.JsonObject;
import com.google.gson.JsonArray;
import com.google.gson.JsonElement;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.HashCodeBuilder;
public class TermsAggregation extends BucketAggregation {
public static final String TYPE = "terms";
private Long docCountErrorUpperBound;
private Long sumOtherDocCount;
private List<TermsAggregation.Entry> buckets = new LinkedList<TermsAggregation.Entry>();
public TermsAggregation(String name, JsonObject termAggregation) {
super(name, termAggregation);
if (termAggregation.has(String.valueOf(AggregationField.DOC_COUNT_ERROR_UPPER_BOUND))) {
docCountErrorUpperBound = termAggregation.get(String.valueOf(AggregationField.DOC_COUNT_ERROR_UPPER_BOUND)).getAsLong();
}
if (termAggregation.has(String.valueOf(AggregationField.SUM_OTHER_DOC_COUNT))) {
sumOtherDocCount = termAggregation.get(String.valueOf(AggregationField.SUM_OTHER_DOC_COUNT)).getAsLong();
}
if (termAggregation.has(String.valueOf(AggregationField.BUCKETS)) && termAggregation.get(String.valueOf(AggregationField.BUCKETS)).isJsonArray()) {
parseBuckets(termAggregation.get(String.valueOf(AggregationField.BUCKETS)).getAsJsonArray());
}
}
private void parseBuckets(JsonArray bucketsSource) {
for (JsonElement bucketElement : bucketsSource) {
JsonObject bucket = (JsonObject) bucketElement;
if (bucket.has(String.valueOf(AggregationField.KEY_AS_STRING))) {
buckets.add(new TermsAggregation.Entry(bucket, bucket.get(String.valueOf(AggregationField.KEY)).getAsString(), bucket.get(String.valueOf(AggregationField.KEY_AS_STRING)).getAsString(), bucket.get(String.valueOf(AggregationField.DOC_COUNT)).getAsLong()));
} else {
buckets.add(new TermsAggregation.Entry(bucket, bucket.get(String.valueOf(AggregationField.KEY)).getAsString(), bucket.get(String.valueOf(AggregationField.DOC_COUNT)).getAsLong()));
}
}
}
public Long getDocCountErrorUpperBound() {
return docCountErrorUpperBound;
}
public Long getSumOtherDocCount() {
return sumOtherDocCount;
}
public List<TermsAggregation.Entry> getBuckets() {
return buckets;
}
public class Entry extends Bucket {
private String key;
private String keyAsString;
public Entry(JsonObject bucket, String key, Long count) {
this(bucket, key, key, count);
}
public Entry(JsonObject bucket, String key, String keyAsString, Long count) {
super(bucket, count);
this.key = key;
this.keyAsString = keyAsString;
}
public String getKey() {
return key;
}
public String getKeyAsString() {
return keyAsString;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
TermsAggregation.Entry rhs = (TermsAggregation.Entry) obj;
return new EqualsBuilder().appendSuper(super.equals(obj)).append(key, rhs.key).append(keyAsString, rhs.keyAsString).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder().append(getCount()).append(getKey()).append(keyAsString).toHashCode();
}
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (obj == this) {
return true;
}
if (obj.getClass() != getClass()) {
return false;
}
TermsAggregation rhs = (TermsAggregation) obj;
return new EqualsBuilder().appendSuper(super.equals(obj)).append(buckets, rhs.buckets).append(docCountErrorUpperBound, rhs.docCountErrorUpperBound).append(sumOtherDocCount, rhs.sumOtherDocCount).isEquals();
}
@Override
public int hashCode() {
return new HashCodeBuilder().appendSuper(super.hashCode()).append(docCountErrorUpperBound).append(sumOtherDocCount).append(buckets).toHashCode();
}
}
| [
"hui8958@gmail.com"
] | hui8958@gmail.com |
7d1e72fd2856bf0a8691dd6f0f82ca92ea634b73 | 647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4 | /com.tencent.mm/classes.jar/com/tencent/mm/protocal/protobuf/sj.java | 5d01d2667ff3a26cf6dcb749c9657ebf66361773 | [] | no_license | tsuzcx/qq_apk | 0d5e792c3c7351ab781957bac465c55c505caf61 | afe46ef5640d0ba6850cdefd3c11badbd725a3f6 | refs/heads/main | 2022-07-02T10:32:11.651957 | 2022-02-01T12:41:38 | 2022-02-01T12:41:38 | 453,860,108 | 36 | 9 | null | 2022-01-31T09:46:26 | 2022-01-31T02:43:22 | Java | UTF-8 | Java | false | false | 3,691 | java | package com.tencent.mm.protocal.protobuf;
import com.tencent.matrix.trace.core.AppMethodBeat;
import java.util.LinkedList;
public final class sj
extends erp
{
public eh YXl;
public String YXm;
public final int op(int paramInt, Object... paramVarArgs)
{
AppMethodBeat.i(91372);
if (paramInt == 0)
{
paramVarArgs = (i.a.a.c.a)paramVarArgs[0];
if (this.BaseRequest != null)
{
paramVarArgs.qD(1, this.BaseRequest.computeSize());
this.BaseRequest.writeFields(paramVarArgs);
}
if (this.YXl != null)
{
paramVarArgs.qD(2, this.YXl.computeSize());
this.YXl.writeFields(paramVarArgs);
}
if (this.YXm != null) {
paramVarArgs.g(3, this.YXm);
}
AppMethodBeat.o(91372);
return 0;
}
if (paramInt == 1) {
if (this.BaseRequest == null) {
break label478;
}
}
label478:
for (int i = i.a.a.a.qC(1, this.BaseRequest.computeSize()) + 0;; i = 0)
{
paramInt = i;
if (this.YXl != null) {
paramInt = i + i.a.a.a.qC(2, this.YXl.computeSize());
}
i = paramInt;
if (this.YXm != null) {
i = paramInt + i.a.a.b.b.a.h(3, this.YXm);
}
AppMethodBeat.o(91372);
return i;
if (paramInt == 2)
{
paramVarArgs = new i.a.a.a.a((byte[])paramVarArgs[0], unknownTagHandler);
for (paramInt = erp.getNextFieldNumber(paramVarArgs); paramInt > 0; paramInt = erp.getNextFieldNumber(paramVarArgs)) {
if (!super.populateBuilderWithField(paramVarArgs, this, paramInt)) {
paramVarArgs.kFT();
}
}
AppMethodBeat.o(91372);
return 0;
}
if (paramInt == 3)
{
Object localObject1 = (i.a.a.a.a)paramVarArgs[0];
sj localsj = (sj)paramVarArgs[1];
paramInt = ((Integer)paramVarArgs[2]).intValue();
Object localObject2;
switch (paramInt)
{
default:
AppMethodBeat.o(91372);
return -1;
case 1:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new kc();
if ((localObject1 != null) && (localObject1.length > 0)) {
((kc)localObject2).parseFrom((byte[])localObject1);
}
localsj.BaseRequest = ((kc)localObject2);
paramInt += 1;
}
AppMethodBeat.o(91372);
return 0;
case 2:
paramVarArgs = ((i.a.a.a.a)localObject1).aMP(paramInt);
i = paramVarArgs.size();
paramInt = 0;
while (paramInt < i)
{
localObject1 = (byte[])paramVarArgs.get(paramInt);
localObject2 = new eh();
if ((localObject1 != null) && (localObject1.length > 0)) {
((eh)localObject2).parseFrom((byte[])localObject1);
}
localsj.YXl = ((eh)localObject2);
paramInt += 1;
}
AppMethodBeat.o(91372);
return 0;
}
localsj.YXm = ((i.a.a.a.a)localObject1).ajGk.readString();
AppMethodBeat.o(91372);
return 0;
}
AppMethodBeat.o(91372);
return -1;
}
}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes2.jar
* Qualified Name: com.tencent.mm.protocal.protobuf.sj
* JD-Core Version: 0.7.0.1
*/ | [
"98632993+tsuzcx@users.noreply.github.com"
] | 98632993+tsuzcx@users.noreply.github.com |
dae33f9102321991a9563489674f441f9d7d675d | 5d2f845d1e3f08c65dbc0f0bcacfc20247e7445c | /hibernate-problems/src/main/java/hello/entity/nPlusOneProblem/Comment.java | ac8978cea79da36afa3f4d7605850a076279b1cc | [] | no_license | Freeongoo/spring-examples | 15cf87912ddeb2a3de294375bbf404451f622e01 | 48ffdf267837f95e67bf1f702812b57647afbf5e | refs/heads/master | 2022-01-28T21:33:53.275548 | 2021-03-29T14:07:20 | 2021-03-29T14:07:20 | 148,529,220 | 17 | 17 | null | 2022-01-21T23:22:14 | 2018-09-12T19:12:31 | Java | UTF-8 | Java | false | false | 1,013 | java | package hello.entity.nPlusOneProblem;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import hello.entity.AbstractBaseEntity;
import org.hibernate.annotations.OnDelete;
import org.hibernate.annotations.OnDeleteAction;
import javax.persistence.*;
@Entity
@Table(name = "comment")
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown = true)
public class Comment extends AbstractBaseEntity<Long> {
// Lazy
@ManyToOne(fetch = FetchType.LAZY, optional = false)
@JoinColumn(name = "post_id", nullable = false)
@OnDelete(action = OnDeleteAction.CASCADE)
private Post post;
public Comment() {
}
public Comment(String name) {
this.name = name;
}
public Comment(String name, Post post) {
this.name = name;
this.post = post;
}
public Post getPost() {
return post;
}
public void setPost(Post post) {
this.post = post;
}
}
| [
"freeongoo@gmail.com"
] | freeongoo@gmail.com |
d687c313e3f37fcca5501c91ea145ceb9be08c95 | 33e1da53d56cecb7f9a81e508ef0baa98a67a654 | /aliyun-java-sdk-market/src/main/java/com/aliyuncs/market/model/v20151101/CreateRateRequest.java | 1e61042c0435ceee368124168600944633e1c8ce | [
"Apache-2.0"
] | permissive | atptro/aliyun-openapi-java-sdk | ad91f2bd221baa742b5de970e4639a4a129fe692 | 4be810bae7156b0386b29d47bef3878a08fa6ad2 | refs/heads/master | 2020-06-14T11:57:46.313857 | 2019-07-03T05:57:50 | 2019-07-03T05:57:50 | 164,553,262 | 0 | 0 | NOASSERTION | 2019-01-08T04:44:56 | 2019-01-08T03:39:41 | Java | UTF-8 | Java | false | false | 1,890 | java | /*
* 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.aliyuncs.market.model.v20151101;
import com.aliyuncs.RpcAcsRequest;
/**
* @author auto create
* @version
*/
public class CreateRateRequest extends RpcAcsRequest<CreateRateResponse> {
public CreateRateRequest() {
super("Market", "2015-11-01", "CreateRate");
}
private String score;
private String orderId;
private String requestId;
private String content;
public String getScore() {
return this.score;
}
public void setScore(String score) {
this.score = score;
if(score != null){
putQueryParameter("Score", score);
}
}
public String getOrderId() {
return this.orderId;
}
public void setOrderId(String orderId) {
this.orderId = orderId;
if(orderId != null){
putQueryParameter("OrderId", orderId);
}
}
public String getRequestId() {
return this.requestId;
}
public void setRequestId(String requestId) {
this.requestId = requestId;
if(requestId != null){
putQueryParameter("RequestId", requestId);
}
}
public String getContent() {
return this.content;
}
public void setContent(String content) {
this.content = content;
if(content != null){
putQueryParameter("Content", content);
}
}
@Override
public Class<CreateRateResponse> getResponseClass() {
return CreateRateResponse.class;
}
}
| [
"sdk-team@alibabacloud.com"
] | sdk-team@alibabacloud.com |
f229d787709a216f18af7c394e99d60bb4e35242 | 6e41615e6f4850cf891e52c2710aeeee0704e9ca | /src/main/java/br/ucb/prevejo/previsao/operacao/veiculo/VeiculoInstanteSerializer.java | 52fc07167d1eab470fbbc41a5f13d8890caf115d | [] | no_license | prevejo/appservice | 2d0150fcb22639011a583ea217df41f8c0c6befb | 5d11a0e623ad6b1fe0ec1213d49d67d87b9ecae4 | refs/heads/master | 2021-06-22T01:55:39.828402 | 2020-09-03T16:58:33 | 2020-09-03T16:58:33 | 226,908,051 | 0 | 0 | null | 2021-06-04T02:21:44 | 2019-12-09T15:47:12 | Java | UTF-8 | Java | false | false | 899 | java | package br.ucb.prevejo.previsao.operacao.veiculo;
import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.databind.SerializerProvider;
import com.fasterxml.jackson.databind.ser.std.StdSerializer;
import java.io.IOException;
import java.util.Arrays;
import java.util.stream.Collectors;
public class VeiculoInstanteSerializer extends StdSerializer<VeiculoInstante> {
public VeiculoInstanteSerializer() {
super(VeiculoInstante.class);
}
@Override
public void serialize(VeiculoInstante veiculoInstante, JsonGenerator jsonGenerator, SerializerProvider serializerProvider) throws IOException {
jsonGenerator.writeStartObject();
jsonGenerator.writeObjectField("veiculo", veiculoInstante.getInstante());
jsonGenerator.writeObjectField("historico", veiculoInstante.getHistorico());
jsonGenerator.writeEndObject();
}
}
| [
"universo42.01@gmail.com"
] | universo42.01@gmail.com |
c1eacaf09dfc98e55406e283f02676241cd9daae | 10378c580b62125a184f74f595d2c37be90a5769 | /com/github/steveice10/netty/handler/codec/compression/Bzip2HuffmanAllocator.java | 6c57b36579aaf871f90bcd635bfbd4f76a8f7512 | [] | no_license | ClientPlayground/Melon-Client | 4299d7f3e8f2446ae9f225c0d7fcc770d4d48ecb | afc9b11493e15745b78dec1c2b62bb9e01573c3d | refs/heads/beta-v2 | 2023-04-05T20:17:00.521159 | 2021-03-14T19:13:31 | 2021-03-14T19:13:31 | 347,509,882 | 33 | 19 | null | 2021-03-14T19:13:32 | 2021-03-14T00:27:40 | null | UTF-8 | Java | false | false | 3,698 | java | package com.github.steveice10.netty.handler.codec.compression;
final class Bzip2HuffmanAllocator {
private static int first(int[] array, int i, int nodesToMove) {
int length = array.length;
int limit = i;
int k = array.length - 2;
while (i >= nodesToMove && array[i] % length > limit) {
k = i;
i -= limit - i + 1;
}
i = Math.max(nodesToMove - 1, i);
while (k > i + 1) {
int temp = i + k >>> 1;
if (array[temp] % length > limit) {
k = temp;
continue;
}
i = temp;
}
return k;
}
private static void setExtendedParentPointers(int[] array) {
int length = array.length;
array[0] = array[0] + array[1];
for (int headNode = 0, tailNode = 1, topNode = 2; tailNode < length - 1; tailNode++) {
int temp;
if (topNode >= length || array[headNode] < array[topNode]) {
temp = array[headNode];
array[headNode++] = tailNode;
} else {
temp = array[topNode++];
}
if (topNode >= length || (headNode < tailNode && array[headNode] < array[topNode])) {
temp += array[headNode];
array[headNode++] = tailNode + length;
} else {
temp += array[topNode++];
}
array[tailNode] = temp;
}
}
private static int findNodesToRelocate(int[] array, int maximumLength) {
int currentNode = array.length - 2;
for (int currentDepth = 1; currentDepth < maximumLength - 1 && currentNode > 1; currentDepth++)
currentNode = first(array, currentNode - 1, 0);
return currentNode;
}
private static void allocateNodeLengths(int[] array) {
int firstNode = array.length - 2;
int nextNode = array.length - 1;
for (int currentDepth = 1, availableNodes = 2; availableNodes > 0; currentDepth++) {
int lastNode = firstNode;
firstNode = first(array, lastNode - 1, 0);
for (int i = availableNodes - lastNode - firstNode; i > 0; i--)
array[nextNode--] = currentDepth;
availableNodes = lastNode - firstNode << 1;
}
}
private static void allocateNodeLengthsWithRelocation(int[] array, int nodesToMove, int insertDepth) {
int firstNode = array.length - 2;
int nextNode = array.length - 1;
int currentDepth = (insertDepth == 1) ? 2 : 1;
int nodesLeftToMove = (insertDepth == 1) ? (nodesToMove - 2) : nodesToMove;
for (int availableNodes = currentDepth << 1; availableNodes > 0; currentDepth++) {
int lastNode = firstNode;
firstNode = (firstNode <= nodesToMove) ? firstNode : first(array, lastNode - 1, nodesToMove);
int offset = 0;
if (currentDepth >= insertDepth) {
offset = Math.min(nodesLeftToMove, 1 << currentDepth - insertDepth);
} else if (currentDepth == insertDepth - 1) {
offset = 1;
if (array[firstNode] == lastNode)
firstNode++;
}
for (int i = availableNodes - lastNode - firstNode + offset; i > 0; i--)
array[nextNode--] = currentDepth;
nodesLeftToMove -= offset;
availableNodes = lastNode - firstNode + offset << 1;
}
}
static void allocateHuffmanCodeLengths(int[] array, int maximumLength) {
switch (array.length) {
case 2:
array[1] = 1;
case 1:
array[0] = 1;
return;
}
setExtendedParentPointers(array);
int nodesToRelocate = findNodesToRelocate(array, maximumLength);
if (array[0] % array.length >= nodesToRelocate) {
allocateNodeLengths(array);
} else {
int insertDepth = maximumLength - 32 - Integer.numberOfLeadingZeros(nodesToRelocate - 1);
allocateNodeLengthsWithRelocation(array, nodesToRelocate, insertDepth);
}
}
}
| [
"Hot-Tutorials@users.noreply.github.com"
] | Hot-Tutorials@users.noreply.github.com |
2bcd4a654e138802eb6d107e817a8c35e19dd989 | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/com/avito/android/di/SessionRefresherModule_ProvideSessionInterceptorFactory.java | 96023d605bc875baff30333d5a6d2091dd800cd7 | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,724 | java | package com.avito.android.di;
import com.avito.android.Features;
import com.avito.android.account.AccountStorageInteractor;
import com.avito.android.remote.interceptor.SessionInterceptor;
import com.avito.android.session_refresh.SessionRefresher;
import dagger.internal.Factory;
import dagger.internal.Preconditions;
import javax.inject.Provider;
public final class SessionRefresherModule_ProvideSessionInterceptorFactory implements Factory<SessionInterceptor> {
public final Provider<AccountStorageInteractor> a;
public final Provider<SessionRefresher> b;
public final Provider<Features> c;
public SessionRefresherModule_ProvideSessionInterceptorFactory(Provider<AccountStorageInteractor> provider, Provider<SessionRefresher> provider2, Provider<Features> provider3) {
this.a = provider;
this.b = provider2;
this.c = provider3;
}
public static SessionRefresherModule_ProvideSessionInterceptorFactory create(Provider<AccountStorageInteractor> provider, Provider<SessionRefresher> provider2, Provider<Features> provider3) {
return new SessionRefresherModule_ProvideSessionInterceptorFactory(provider, provider2, provider3);
}
public static SessionInterceptor provideSessionInterceptor(AccountStorageInteractor accountStorageInteractor, SessionRefresher sessionRefresher, Features features) {
return (SessionInterceptor) Preconditions.checkNotNullFromProvides(SessionRefresherModule.INSTANCE.provideSessionInterceptor(accountStorageInteractor, sessionRefresher, features));
}
@Override // javax.inject.Provider
public SessionInterceptor get() {
return provideSessionInterceptor(this.a.get(), this.b.get(), this.c.get());
}
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
673201b61e9240a9c4d0546fb7dab6e63e8b34cf | c9da71648dfc400548884bc309cca823450e8663 | /ICBC-Probe-Project/icbc-probe-common/src/main/java/org/xbill/DNS/MINFORecord.java | dbf0e99c420086cf42a25d75b9cb9b860059dca7 | [] | no_license | chrisyun/macho-project-home | 810f984601bd42bc8bf6879b278e2cde6230e1d8 | f79f18f980178ebd01d3e916829810e94fd7dc04 | refs/heads/master | 2016-09-05T17:10:18.021448 | 2014-05-22T07:46:09 | 2014-05-22T07:46:09 | 36,444,782 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,183 | java | // Copyright (c) 2004 Brian Wellington (bwelling@xbill.org)
package org.xbill.DNS;
import java.io.IOException;
/**
* Mailbox information Record - lists the address responsible for a mailing
* list/mailbox and the address to receive error messages relating to the
* mailing list/mailbox.
*
* @author Brian Wellington
*/
public class MINFORecord extends Record {
private static final long serialVersionUID = -3962147172340353796L;
private Name responsibleAddress;
private Name errorAddress;
MINFORecord() {
}
Record getObject() {
return new MINFORecord();
}
/**
* Creates an MINFO Record from the given data
*
* @param responsibleAddress
* The address responsible for the mailing list/mailbox.
* @param errorAddress
* The address to receive error messages relating to the mailing
* list/mailbox.
*/
public MINFORecord(Name name, int dclass, long ttl, Name responsibleAddress, Name errorAddress) {
super(name, Type.MINFO, dclass, ttl);
this.responsibleAddress = checkName("responsibleAddress", responsibleAddress);
this.errorAddress = checkName("errorAddress", errorAddress);
}
void rrFromWire(DNSInput in) throws IOException {
responsibleAddress = new Name(in);
errorAddress = new Name(in);
}
void rdataFromString(Tokenizer st, Name origin) throws IOException {
responsibleAddress = st.getName(origin);
errorAddress = st.getName(origin);
}
/** Converts the MINFO Record to a String */
String rrToString() {
StringBuffer sb = new StringBuffer();
sb.append(responsibleAddress);
sb.append(" ");
sb.append(errorAddress);
return sb.toString();
}
/** Gets the address responsible for the mailing list/mailbox. */
public Name getResponsibleAddress() {
return responsibleAddress;
}
/**
* Gets the address to receive error messages relating to the mailing
* list/mailbox.
*/
public Name getErrorAddress() {
return errorAddress;
}
void rrToWire(DNSOutput out, Compression c, boolean canonical) {
responsibleAddress.toWire(out, null, canonical);
errorAddress.toWire(out, null, canonical);
}
}
| [
"machozhao@gmail.com"
] | machozhao@gmail.com |
0a729effb2b5b200f12a7939500bf845838cbde6 | cca87c4ade972a682c9bf0663ffdf21232c9b857 | /com/tencent/mm/e/a/pw.java | 48bfa6a377ccbb2113ccfcef91500b0357fe2e08 | [] | 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 | 343 | java | package com.tencent.mm.e.a;
import com.tencent.mm.sdk.b.b;
public final class pw extends b {
public a fWW;
public static final class a {
public int status;
}
public pw() {
this((byte) 0);
}
private pw(byte b) {
this.fWW = new a();
this.use = false;
this.nFq = null;
}
}
| [
"lizhangliao@xiaohongchun.com"
] | lizhangliao@xiaohongchun.com |
97785ab89e8639f05e673ffaa6a2c79693238fd2 | f321db1ace514d08219cc9ba5089ebcfff13c87a | /generated-tests/adynamosa/tests/s1013/3_gson/evosuite-tests/com/google/gson/internal/LinkedHashTreeMap_ESTest_scaffolding.java | 3568026b5e37112d9494f93004fb60f452ff69d3 | [] | no_license | sealuzh/dynamic-performance-replication | 01bd512bde9d591ea9afa326968b35123aec6d78 | f89b4dd1143de282cd590311f0315f59c9c7143a | refs/heads/master | 2021-07-12T06:09:46.990436 | 2020-06-05T09:44:56 | 2020-06-05T09:44:56 | 146,285,168 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 5,676 | java | /**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Mon Jul 22 19:14:16 GMT 2019
*/
package com.google.gson.internal;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
import org.junit.AfterClass;
import org.evosuite.runtime.sandbox.Sandbox;
import org.evosuite.runtime.sandbox.Sandbox.SandboxMode;
import static org.evosuite.shaded.org.mockito.Mockito.*;
@EvoSuiteClassExclude
public class LinkedHashTreeMap_ESTest_scaffolding {
@org.junit.Rule
public org.evosuite.runtime.vnet.NonFunctionalRequirementRule nfr = new org.evosuite.runtime.vnet.NonFunctionalRequirementRule();
private static final java.util.Properties defaultProperties = (java.util.Properties) java.lang.System.getProperties().clone();
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.google.gson.internal.LinkedHashTreeMap";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfThreads = 100;
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
org.evosuite.runtime.RuntimeSettings.mockSystemIn = true;
org.evosuite.runtime.RuntimeSettings.sandboxMode = org.evosuite.runtime.sandbox.Sandbox.SandboxMode.RECOMMENDED;
org.evosuite.runtime.sandbox.Sandbox.initializeSecurityManagerForSUT();
org.evosuite.runtime.classhandling.JDKClassResetter.init();
setSystemProperties();
initializeClasses();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
try { initMocksToAvoidTimeoutsInTheTests(); } catch(ClassNotFoundException e) {}
}
@AfterClass
public static void clearEvoSuiteFramework(){
Sandbox.resetDefaultSecurityManager();
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().initHandler();
org.evosuite.runtime.sandbox.Sandbox.goingToExecuteSUTCode();
setSystemProperties();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.Runtime.getInstance().resetRuntime();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.jvm.ShutdownHookHandler.getInstance().safeExecuteAddedHooks();
org.evosuite.runtime.classhandling.JDKClassResetter.reset();
resetClasses();
org.evosuite.runtime.sandbox.Sandbox.doneWithExecutingSUTCode();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
public static void setSystemProperties() {
java.lang.System.setProperties((java.util.Properties) defaultProperties.clone());
java.lang.System.setProperty("user.dir", "/home/apaniche/performance/Dataset/gordon_scripts/projects/3_gson");
java.lang.System.setProperty("java.io.tmpdir", "/tmp");
}
private static void initializeClasses() {
org.evosuite.runtime.classhandling.ClassStateSupport.initializeClasses(LinkedHashTreeMap_ESTest_scaffolding.class.getClassLoader() ,
"com.google.gson.internal.LinkedHashTreeMap",
"com.google.gson.internal.LinkedHashTreeMap$AvlIterator",
"com.google.gson.internal.LinkedHashTreeMap$1",
"com.google.gson.internal.LinkedHashTreeMap$Node",
"com.google.gson.internal.LinkedHashTreeMap$LinkedTreeMapIterator",
"com.google.gson.internal.LinkedHashTreeMap$EntrySet$1",
"com.google.gson.internal.LinkedHashTreeMap$KeySet$1",
"com.google.gson.internal.LinkedHashTreeMap$EntrySet",
"com.google.gson.internal.LinkedHashTreeMap$KeySet",
"com.google.gson.internal.LinkedHashTreeMap$AvlBuilder"
);
}
private static void initMocksToAvoidTimeoutsInTheTests() throws ClassNotFoundException {
mock(Class.forName("java.lang.Comparable", false, LinkedHashTreeMap_ESTest_scaffolding.class.getClassLoader()));
mock(Class.forName("java.util.Comparator", false, LinkedHashTreeMap_ESTest_scaffolding.class.getClassLoader()));
mock(Class.forName("java.util.function.BiConsumer", false, LinkedHashTreeMap_ESTest_scaffolding.class.getClassLoader()));
mock(Class.forName("java.util.function.BiFunction", false, LinkedHashTreeMap_ESTest_scaffolding.class.getClassLoader()));
}
private static void resetClasses() {
org.evosuite.runtime.classhandling.ClassResetter.getInstance().setClassLoader(LinkedHashTreeMap_ESTest_scaffolding.class.getClassLoader());
org.evosuite.runtime.classhandling.ClassStateSupport.resetClasses(
"com.google.gson.internal.LinkedHashTreeMap$1",
"com.google.gson.internal.LinkedHashTreeMap",
"com.google.gson.internal.LinkedHashTreeMap$Node",
"com.google.gson.internal.LinkedHashTreeMap$AvlIterator",
"com.google.gson.internal.LinkedHashTreeMap$AvlBuilder",
"com.google.gson.internal.LinkedHashTreeMap$EntrySet",
"com.google.gson.internal.LinkedHashTreeMap$KeySet",
"com.google.gson.internal.LinkedHashTreeMap$LinkedTreeMapIterator",
"com.google.gson.internal.LinkedHashTreeMap$EntrySet$1",
"com.google.gson.internal.LinkedHashTreeMap$KeySet$1"
);
}
}
| [
"granogiovanni90@gmail.com"
] | granogiovanni90@gmail.com |
67d8de984638c82c24e7c1e97b277058bd290c78 | 06bb1087544f7252f6a83534c5427975f1a6cfc7 | /modules/cesecore-common/src/org/cesecore/keys/token/AvailableCryptoToken.java | 7ff861a08472fd10daf0cb154413c6e639541170 | [] | no_license | mvilche/ejbca-ce | 65f2b54922eeb47aa7a132166ca5dfa862cee55b | a89c66218abed47c7b310c3999127409180969dd | refs/heads/master | 2021-03-08T08:51:18.636030 | 2020-03-12T18:53:18 | 2020-03-12T18:53:18 | 246,335,702 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,961 | java | /*************************************************************************
* *
* CESeCore: CE Security Core *
* *
* This software 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. *
* *
* See terms of license at gnu.org. *
* *
*************************************************************************/
package org.cesecore.keys.token;
/**
* Value class containing information about an available crypto token registered to the CryptoTokenCache.
*
* @version $Id: AvailableCryptoToken.java 17625 2013-09-20 07:12:06Z netmackan $
*/
public class AvailableCryptoToken {
private String classpath;
private String name;
private boolean translateable;
private boolean use;
public AvailableCryptoToken(String classpath, String name, boolean translateable, boolean use){
this.classpath = classpath;
this.name = name;
this.translateable = translateable;
this.use = use;
}
/**
* Method returning the classpath used to create the plugin. Must implement the HardCAToken interface.
*
*/
public String getClassPath(){
return this.classpath;
}
/**
* Method returning the general name of the plug-in used in the adminweb-gui. If translateable flag is
* set then must the resource be in the language files.
*
*/
public String getName(){
return this.name;
}
/**
* Indicates if the name should be translated in the adminweb-gui.
*
*/
public boolean isTranslateable(){
return this.translateable;
}
/**
* Indicates if the plug should be used in the system or if it's a dummy or test class.
*
*/
public boolean isUsed(){
return this.use;
}
/** Classpath is considered the key for AvailableCryptoToken */
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = prime * result + ((classpath == null) ? 0 : classpath.hashCode());
return result;
}
/** Classpath is considered the key for AvailableCryptoToken */
@Override
public boolean equals(final Object obj) {
if (this == obj) {
return true;
}
if (obj == null) {
return false;
}
if (getClass() != obj.getClass()) {
return false;
}
final AvailableCryptoToken other = (AvailableCryptoToken) obj;
if (classpath == null) {
if (other.classpath != null) {
return false;
}
} else if (!classpath.equals(other.classpath)) {
return false;
}
return true;
}
}
| [
"mfvilche@gmail.com"
] | mfvilche@gmail.com |
c9ec76980c22a6b59ecb8ff4a6647f279a87824b | 4ec3bf36837420a2cb84bec4adb772d2664f6e92 | /FrameworkDartesESP_alunosSDIS/brokerOM2M/org.eclipse.om2m/org.eclipse.om2m.android.dashboard/src/main/java/org/eclipse/om2m/android/dashboard/CustomSecondaryActivity.java | c828c62d47527b8f4ae7ca3d0d4695069574800d | [] | no_license | BaltasarAroso/SDIS_OM2M | 1f2ce310b3c1bf64c2a95ad9d236c64bf672abb0 | 618fdb4da1aba5621a85e49dae0442cafef5ca31 | refs/heads/master | 2020-04-08T19:08:22.073674 | 2019-01-20T15:42:48 | 2019-01-20T15:42:48 | 159,641,777 | 0 | 2 | null | 2020-03-06T15:49:51 | 2018-11-29T09:35:02 | C | UTF-8 | Java | false | false | 1,562 | java | /*******************************************************************************
* Copyright (c) 2013, 2017 Orange.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* BAREAU Cyrille <cyrille.bareau@orange.com>,
* BONNARDEL Gregory <gbonnardel.ext@orange.com>,
* BOLLE Sebastien <sebastien.bolle@orange.com>.
*******************************************************************************/
package org.eclipse.om2m.android.dashboard;
import org.eclipse.om2m.android.dashboard.R;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
public class CustomSecondaryActivity extends Activity {
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.menu_secondary, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
switch(item.getItemId()) {
case R.id.menu_help:
// to be overridden
break;
case android.R.id.home:
Intent mainActivity = new Intent(CustomSecondaryActivity.this, DashboardActivity.class);
mainActivity.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
startActivity(mainActivity);
break;
default:
break;
}
return true;
}
}
| [
"ba_aroso@icloud.com"
] | ba_aroso@icloud.com |
aebd2ae023d377cc635f1c66a0377f804b01f6ae | e72267e4c674dc3857dc91db556572534ecf6d29 | /spring-mybatis-master/src/main/java/org/mybatis/spring/annotation/MapperScannerRegistrar.java | 17de0b5f15525d9391b056ab9474c8dd14eedb67 | [
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | lydon-GH/mybatis-study | 4be7f279529a33ead3efa9cd79d60cd44d2184a9 | a8a89940bfa6bb790e78e1c28b0c7c0a5d69e491 | refs/heads/main | 2023-07-29T06:55:56.549751 | 2021-09-04T09:08:25 | 2021-09-04T09:08:25 | 403,011,812 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,199 | java | /*
* Copyright ${license.git.copyrightYears} 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
*
* 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.mybatis.spring.annotation;
import java.lang.annotation.Annotation;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;
import org.mybatis.spring.mapper.ClassPathMapperScanner;
import org.mybatis.spring.mapper.MapperFactoryBean;
import org.mybatis.spring.mapper.MapperScannerConfigurer;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.support.AbstractBeanDefinition;
import org.springframework.beans.factory.support.BeanDefinitionBuilder;
import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.beans.factory.support.BeanNameGenerator;
import org.springframework.context.ResourceLoaderAware;
import org.springframework.context.annotation.ImportBeanDefinitionRegistrar;
import org.springframework.core.annotation.AnnotationAttributes;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.type.AnnotationMetadata;
import org.springframework.util.ClassUtils;
import org.springframework.util.StringUtils;
/**
* A {@link ImportBeanDefinitionRegistrar} to allow annotation configuration of MyBatis mapper scanning. Using
* an @Enable annotation allows beans to be registered via @Component configuration, whereas implementing
* {@code BeanDefinitionRegistryPostProcessor} will work for XML configuration.
*
* @author Michael Lanyon
* @author Eduardo Macarron
* @author Putthiphong Boonphong
*
* @see MapperFactoryBean
* @see ClassPathMapperScanner
* @since 1.2.0
*/
public class MapperScannerRegistrar implements ImportBeanDefinitionRegistrar, ResourceLoaderAware {
/**
* {@inheritDoc}
*
* @deprecated Since 2.0.2, this method not used never.
*/
@Override
@Deprecated
public void setResourceLoader(ResourceLoader resourceLoader) {
// NOP
}
/**
* {@inheritDoc}
*/
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
AnnotationAttributes mapperScanAttrs = AnnotationAttributes
.fromMap(importingClassMetadata.getAnnotationAttributes(MapperScan.class.getName()));
if (mapperScanAttrs != null) {
registerBeanDefinitions(importingClassMetadata, mapperScanAttrs, registry,
generateBaseBeanName(importingClassMetadata, 0));
}
}
void registerBeanDefinitions(AnnotationMetadata annoMeta, AnnotationAttributes annoAttrs,
BeanDefinitionRegistry registry, String beanName) {
BeanDefinitionBuilder builder = BeanDefinitionBuilder.genericBeanDefinition(MapperScannerConfigurer.class);
builder.addPropertyValue("processPropertyPlaceHolders", true);
Class<? extends Annotation> annotationClass = annoAttrs.getClass("annotationClass");
if (!Annotation.class.equals(annotationClass)) {
builder.addPropertyValue("annotationClass", annotationClass);
}
Class<?> markerInterface = annoAttrs.getClass("markerInterface");
if (!Class.class.equals(markerInterface)) {
builder.addPropertyValue("markerInterface", markerInterface);
}
Class<? extends BeanNameGenerator> generatorClass = annoAttrs.getClass("nameGenerator");
if (!BeanNameGenerator.class.equals(generatorClass)) {
builder.addPropertyValue("nameGenerator", BeanUtils.instantiateClass(generatorClass));
}
Class<? extends MapperFactoryBean> mapperFactoryBeanClass = annoAttrs.getClass("factoryBean");
if (!MapperFactoryBean.class.equals(mapperFactoryBeanClass)) {
builder.addPropertyValue("mapperFactoryBeanClass", mapperFactoryBeanClass);
}
String sqlSessionTemplateRef = annoAttrs.getString("sqlSessionTemplateRef");
if (StringUtils.hasText(sqlSessionTemplateRef)) {
builder.addPropertyValue("sqlSessionTemplateBeanName", annoAttrs.getString("sqlSessionTemplateRef"));
}
String sqlSessionFactoryRef = annoAttrs.getString("sqlSessionFactoryRef");
if (StringUtils.hasText(sqlSessionFactoryRef)) {
builder.addPropertyValue("sqlSessionFactoryBeanName", annoAttrs.getString("sqlSessionFactoryRef"));
}
List<String> basePackages = new ArrayList<>();
basePackages.addAll(
Arrays.stream(annoAttrs.getStringArray("value")).filter(StringUtils::hasText).collect(Collectors.toList()));
basePackages.addAll(Arrays.stream(annoAttrs.getStringArray("basePackages")).filter(StringUtils::hasText)
.collect(Collectors.toList()));
basePackages.addAll(Arrays.stream(annoAttrs.getClassArray("basePackageClasses")).map(ClassUtils::getPackageName)
.collect(Collectors.toList()));
if (basePackages.isEmpty()) {
basePackages.add(getDefaultBasePackage(annoMeta));
}
String lazyInitialization = annoAttrs.getString("lazyInitialization");
if (StringUtils.hasText(lazyInitialization)) {
builder.addPropertyValue("lazyInitialization", lazyInitialization);
}
String defaultScope = annoAttrs.getString("defaultScope");
if (!AbstractBeanDefinition.SCOPE_DEFAULT.equals(defaultScope)) {
builder.addPropertyValue("defaultScope", defaultScope);
}
builder.addPropertyValue("basePackage", StringUtils.collectionToCommaDelimitedString(basePackages));
registry.registerBeanDefinition(beanName, builder.getBeanDefinition());
}
private static String generateBaseBeanName(AnnotationMetadata importingClassMetadata, int index) {
return importingClassMetadata.getClassName() + "#" + MapperScannerRegistrar.class.getSimpleName() + "#" + index;
}
private static String getDefaultBasePackage(AnnotationMetadata importingClassMetadata) {
return ClassUtils.getPackageName(importingClassMetadata.getClassName());
}
/**
* A {@link MapperScannerRegistrar} for {@link MapperScans}.
*
* @since 2.0.0
*/
static class RepeatingRegistrar extends MapperScannerRegistrar {
/**
* {@inheritDoc}
*/
@Override
public void registerBeanDefinitions(AnnotationMetadata importingClassMetadata, BeanDefinitionRegistry registry) {
AnnotationAttributes mapperScansAttrs = AnnotationAttributes
.fromMap(importingClassMetadata.getAnnotationAttributes(MapperScans.class.getName()));
if (mapperScansAttrs != null) {
AnnotationAttributes[] annotations = mapperScansAttrs.getAnnotationArray("value");
for (int i = 0; i < annotations.length; i++) {
registerBeanDefinitions(importingClassMetadata, annotations[i], registry,
generateBaseBeanName(importingClassMetadata, i));
}
}
}
}
}
| [
"447172979@qq.com"
] | 447172979@qq.com |
385aab61d9d0ca67e31aee2a77c85f4ec864aaad | 52dd205230ba5ddbe46fa16e8ca6a869ede52096 | /oracle/com-jy-platform-system/src/main/java/com/jy/modules/platform/bizauth/vmrulemapping/job/AutoFlushVmruleMappingTask.java | 1c6ab922e69f187545d85383f2845762bb6c114e | [] | no_license | wangshuaibo123/BI | f5bfca6bcc0d3d0d1bec973ae5864e1bca697ac3 | a44f8621a208cfb02e4ab5dc1e576056d62ff37c | refs/heads/master | 2021-05-04T16:20:22.382751 | 2018-01-29T11:02:05 | 2018-01-29T11:02:05 | 120,247,955 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,703 | java | package com.jy.modules.platform.bizauth.vmrulemapping.job;
import java.io.Serializable;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.SchedulerContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Component;
import com.jy.modules.platform.bizauth.vmrulemapping.dto.VmruleMappingDTO;
import com.jy.modules.platform.bizauth.vmrulemapping.service.VmruleMappingService;
import com.jy.modules.platform.bizauth.vmtreeinfo.dto.VmtreeInfoDTO;
import com.jy.modules.platform.bizauth.vmtreeinfo.service.VmtreeInfoService;
/**
* @description:新增门店 定时刷新数据权限定时任务入口
* 建议定时任务每天执行1或2次。
* @author chengang
* @date: 2016年7月21日 下午4:01:12
*/
@Component("com.jy.modules.platform.bizauth.vmrulemapping.job.AutoFlushVmruleMappingTask")
public class AutoFlushVmruleMappingTask implements Serializable, Job{
private static final long serialVersionUID = 1L;
private static final Logger logger = LoggerFactory.getLogger(AutoFlushVmruleMappingTask.class);
//控制 不允许 多线程 执行 public void execute(JobExecutionContext context) throws JobExecutionException 方法
private static boolean isNext = true;
private VmtreeInfoService vmtreeInfoService;
private VmruleMappingService vmruleMappingService;
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
if(!isNext){
logger.info("------------AutoFlushVmruleMappingTask-------isNext:"+isNext);
return ;
}
isNext = false;
SchedulerContext cont;
try {
cont = context.getScheduler().getContext();
ApplicationContext appCtx = (ApplicationContext) cont.get("applicationContextKey");
vmtreeInfoService = (VmtreeInfoService)appCtx.getBean(VmtreeInfoService.class);
vmruleMappingService = (VmruleMappingService)appCtx.getBean(VmruleMappingService.class);
//查询虚拟树一段时间内新增的数据
Map<String,Object> searchParams = new HashMap<String,Object>();
searchParams.put("createTime_interval", 60 * 24);//查询一天以内修改的数据
VmtreeInfoDTO vmtreeInfoParam = new VmtreeInfoDTO();
searchParams.put("dto", vmtreeInfoParam);
List vmtreeInfoList = vmtreeInfoService.searchVmtreeInfo(searchParams);
//没有数据
if(vmtreeInfoList==null || vmtreeInfoList.size()<=0){
return;
}
VmtreeInfoDTO vmtreeInfoDTO = null;
VmtreeInfoDTO parentVmtreeInfoDTO = null;
Long parentOrgId = null;
//遍历所有最近新增的机构
for(int i=0;i<vmtreeInfoList.size();i++){
vmtreeInfoDTO = (VmtreeInfoDTO)vmtreeInfoList.get(i);
parentOrgId = vmtreeInfoDTO.getParentId();
while(parentOrgId!=null && parentOrgId.longValue()>0L){
//如果父机构不存在,就不继续刷新数据权限了
parentVmtreeInfoDTO = vmtreeInfoService.queryVmtreeInfoByPrimaryKey(parentOrgId.toString(), vmtreeInfoDTO.getOrgType());
if(parentVmtreeInfoDTO.getOrgName()==null || "".equals(parentVmtreeInfoDTO.getOrgName())){
break;
}
//查找是否有“人对parentOrgId”的映射
Map<String,Object> searchVmruleMappingParams = new HashMap<String,Object>();
VmruleMappingDTO vmruleMappingParam = new VmruleMappingDTO();
vmruleMappingParam.setMapType("2");//人对机构
vmruleMappingParam.setMapValue(parentOrgId.toString());
searchVmruleMappingParams.put("dto", vmruleMappingParam);
searchVmruleMappingParams.put("vmTableName",parentVmtreeInfoDTO.getOrgType() + "_" + "VMRULE_MAPPING");
List vmruleMappingList = vmruleMappingService.searchVmruleMapping(searchVmruleMappingParams);
//如果有“人对parentOrgId”的映射,刷新此映射
if(vmruleMappingList!=null && vmruleMappingList.size()>0){
VmruleMappingDTO vmruleMappingDTO = null;
for(int j=0;j<vmruleMappingList.size();j++){
vmruleMappingDTO = (VmruleMappingDTO)vmruleMappingList.get(j);
//刷新数据权限
vmruleMappingService.fulshVmruleMapping(vmruleMappingDTO.getId()+"", vmruleMappingDTO.getOrgType());
}
}
//继续刷新父机构的数据权限
parentOrgId = parentVmtreeInfoDTO.getParentId();
}
}
}
catch(Exception ex){
logger.error("---------------AutoFlushVmruleMappingTask-------error----------"+ex.getMessage());
}
finally{
logger.info("----------------AutoFlushVmruleMappingTask-------end-------------");
isNext= true;
}
}
}
| [
"gangchen1@jieyuechina.com"
] | gangchen1@jieyuechina.com |
38451fd0fe41377c96205c6df6a7557080e34aa2 | 6980da38a4a2daa7c967bb63936a9d49ee42e1fd | /drools-wb-screens/drools-wb-guided-dtable-editor/drools-wb-guided-dtable-editor-client/src/test/java/org/drools/workbench/screens/guided/dtable/client/widget/table/columns/dom/datepicker/DatePickerSingletonDOMElementFactoryTest.java | f6d802ac0e5ed9dc799c1e0b8d77fefd547a7fd7 | [
"Apache-2.0"
] | permissive | danielezonca/drools-wb | 4ec7a0cffaa427bbf13d9de828050fee08a836c7 | 6f9c30958c2610763c50acf8b553ec53fdcb4b65 | refs/heads/master | 2021-06-25T15:08:00.499469 | 2020-10-09T11:46:30 | 2020-10-09T11:46:30 | 129,713,286 | 0 | 1 | Apache-2.0 | 2019-01-14T17:53:29 | 2018-04-16T08:51:08 | Java | UTF-8 | Java | false | false | 4,217 | java | /*
* Copyright 2018 Red Hat, Inc. and/or its affiliates.
*
* 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.drools.workbench.screens.guided.dtable.client.widget.table.columns.dom.datepicker;
import java.util.Date;
import java.util.HashMap;
import com.google.gwt.i18n.client.DateTimeFormat;
import com.google.gwt.junit.GWTMockUtilities;
import org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView;
import org.junit.BeforeClass;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.kie.workbench.common.services.shared.preferences.ApplicationPreferences;
import org.kie.workbench.common.widgets.client.util.TimeZoneUtils;
import org.mockito.Mock;
import org.powermock.api.mockito.PowerMockito;
import org.powermock.core.classloader.annotations.PrepareForTest;
import org.powermock.modules.junit4.PowerMockRunner;
import org.uberfire.ext.widgets.common.client.common.DatePicker;
import org.uberfire.ext.wires.core.grids.client.widget.layer.GridLayer;
import org.uberfire.ext.wires.core.grids.client.widget.layer.impl.GridLienzoPanel;
import static org.junit.Assert.assertEquals;
import static org.kie.workbench.common.services.shared.preferences.ApplicationPreferences.DATE_FORMAT;
import static org.kie.workbench.common.services.shared.preferences.ApplicationPreferences.KIE_TIMEZONE_OFFSET;
import static org.mockito.Matchers.anyString;
import static org.mockito.Mockito.doReturn;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.spy;
import static org.mockito.Mockito.when;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
@PrepareForTest({DatePickerSingletonDOMElementFactory.class, DateTimeFormat.class, TimeZoneUtils.class})
@RunWith(PowerMockRunner.class)
public class DatePickerSingletonDOMElementFactoryTest {
private static final String TEST_DATE_FORMAT = "MM-dd-yyyy HH:mm:ss Z";
@Mock
private GridLienzoPanel gridPanel;
@Mock
private GridLayer gridLayer;
@Mock
private GuidedDecisionTableView gridWidget;
@Mock
private DatePicker datePicker;
@BeforeClass
public static void setupStatic() {
preventGWTCreateError();
setStandardTimeZone();
mockStaticMethods();
initializeApplicationPreferences();
}
private static void preventGWTCreateError() {
GWTMockUtilities.disarm();
}
private static void initializeApplicationPreferences() {
ApplicationPreferences.setUp(new HashMap<String, String>() {{
put(KIE_TIMEZONE_OFFSET, "10800000");
put(DATE_FORMAT, TEST_DATE_FORMAT);
}});
}
private static void mockStaticMethods() {
mockStatic(DateTimeFormat.class);
PowerMockito.when(DateTimeFormat.getFormat(anyString())).thenReturn(mock(DateTimeFormat.class));
}
private static void setStandardTimeZone() {
System.setProperty("user.timezone", "Europe/Vilnius");
}
@Test
public void testGetValue() {
final DatePickerSingletonDOMElementFactory factory = spy(makeFactory());
final Date date = mock(Date.class);
final Date convertedDate = mock(Date.class);
doReturn(datePicker).when(factory).getWidget();
when(datePicker.getValue()).thenReturn(date);
mockStatic(TimeZoneUtils.class);
PowerMockito.when(TimeZoneUtils.convertToServerTimeZone(date)).thenReturn(convertedDate);
final Date actualDate = factory.getValue();
assertEquals(convertedDate, actualDate);
}
private DatePickerSingletonDOMElementFactory makeFactory() {
return new DatePickerSingletonDOMElementFactory(gridPanel, gridLayer, gridWidget);
}
}
| [
"manstis@users.noreply.github.com"
] | manstis@users.noreply.github.com |
2ece434e8e7e14f923677ba14addf4a4626b15a7 | 127d445be6bfaed1e279bd9a72af3ed4874a6319 | /src/main/java/com/cnt/service/CountryService.java | 14a4f044c2aafb96404d2c1d395062c359eb412d | [] | no_license | tolip05/CNT | 6aa599bd3338d524b2b874e778b3d94b51b8ba6c | 2bef6d831984b204a3c7cf46e16f15a385f65d9c | refs/heads/main | 2023-04-13T02:51:59.703212 | 2021-04-20T04:58:37 | 2021-04-20T04:58:37 | 358,970,521 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 321 | java | package com.cnt.service;
import com.cnt.domein.entities.Country;
import com.cnt.domein.models.service.RequestServiceModel;
import com.cnt.domein.models.views.ResultViewModel;
public interface CountryService {
ResultViewModel calculate(RequestServiceModel requestServiceModel);
boolean createCountry(Country country);
}
| [
"kosta1980@abv.bg"
] | kosta1980@abv.bg |
a6e20814b92f10dfc1a23869de3266ee2154afea | e0ffaa78078bba94b5ad7897ce4baf9636d5e50d | /plugins/edu.kit.ipd.sdq.modsim.hla.edit/src/edu/kit/ipd/sdq/modsim/hla/ieee1516/omt/provider/UpdateRateTypeItemProvider.java | e84da6d9cfd677278b34390e286f579a730ea9ff | [] | no_license | kit-sdq/RTI_Plugin | 828fbf76771c1fb898d12833ec65b40bbb213b3f | bc57398be3d36e54d8a2c8aaac44c16506e6310c | refs/heads/master | 2021-05-05T07:46:18.402561 | 2019-01-30T13:26:01 | 2019-01-30T13:26:01 | 118,887,589 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,696 | java | /**
*/
package edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.provider;
import edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.OmtFactory;
import edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.OmtPackage;
import edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.UpdateRateType;
import java.util.Collection;
import java.util.List;
import org.eclipse.emf.common.notify.AdapterFactory;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.common.util.ResourceLocator;
import org.eclipse.emf.ecore.EStructuralFeature;
import org.eclipse.emf.edit.provider.ComposeableAdapterFactory;
import org.eclipse.emf.edit.provider.IEditingDomainItemProvider;
import org.eclipse.emf.edit.provider.IItemLabelProvider;
import org.eclipse.emf.edit.provider.IItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.IItemPropertySource;
import org.eclipse.emf.edit.provider.IStructuredItemContentProvider;
import org.eclipse.emf.edit.provider.ITreeItemContentProvider;
import org.eclipse.emf.edit.provider.ItemPropertyDescriptor;
import org.eclipse.emf.edit.provider.ItemProviderAdapter;
import org.eclipse.emf.edit.provider.ViewerNotification;
/**
* This is the item provider adapter for a {@link edu.kit.ipd.sdq.modsim.hla.ieee1516.omt.UpdateRateType} object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public class UpdateRateTypeItemProvider
extends ItemProviderAdapter
implements
IEditingDomainItemProvider,
IStructuredItemContentProvider,
ITreeItemContentProvider,
IItemLabelProvider,
IItemPropertySource {
/**
* This constructs an instance from a factory and a notifier.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public UpdateRateTypeItemProvider(AdapterFactory adapterFactory) {
super(adapterFactory);
}
/**
* This returns the property descriptors for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
if (itemPropertyDescriptors == null) {
super.getPropertyDescriptors(object);
addIdtagPropertyDescriptor(object);
addNotesPropertyDescriptor(object);
}
return itemPropertyDescriptors;
}
/**
* This adds a property descriptor for the Idtag feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addIdtagPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UpdateRateType_idtag_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UpdateRateType_idtag_feature", "_UI_UpdateRateType_type"),
OmtPackage.eINSTANCE.getUpdateRateType_Idtag(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This adds a property descriptor for the Notes feature.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
protected void addNotesPropertyDescriptor(Object object) {
itemPropertyDescriptors.add
(createItemPropertyDescriptor
(((ComposeableAdapterFactory)adapterFactory).getRootAdapterFactory(),
getResourceLocator(),
getString("_UI_UpdateRateType_notes_feature"),
getString("_UI_PropertyDescriptor_description", "_UI_UpdateRateType_notes_feature", "_UI_UpdateRateType_type"),
OmtPackage.eINSTANCE.getUpdateRateType_Notes(),
true,
false,
false,
ItemPropertyDescriptor.GENERIC_VALUE_IMAGE,
null,
null));
}
/**
* This specifies how to implement {@link #getChildren} and is used to deduce an appropriate feature for an
* {@link org.eclipse.emf.edit.command.AddCommand}, {@link org.eclipse.emf.edit.command.RemoveCommand} or
* {@link org.eclipse.emf.edit.command.MoveCommand} in {@link #createCommand}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Collection<? extends EStructuralFeature> getChildrenFeatures(Object object) {
if (childrenFeatures == null) {
super.getChildrenFeatures(object);
childrenFeatures.add(OmtPackage.eINSTANCE.getUpdateRateType_Name());
childrenFeatures.add(OmtPackage.eINSTANCE.getUpdateRateType_Rate());
childrenFeatures.add(OmtPackage.eINSTANCE.getUpdateRateType_Semantics());
childrenFeatures.add(OmtPackage.eINSTANCE.getUpdateRateType_Any());
childrenFeatures.add(OmtPackage.eINSTANCE.getUpdateRateType_AnyAttribute());
}
return childrenFeatures;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EStructuralFeature getChildFeature(Object object, Object child) {
// Check the type of the specified child object and return the proper feature to use for
// adding (see {@link AddCommand}) it as a child.
return super.getChildFeature(object, child);
}
/**
* This returns UpdateRateType.gif.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public Object getImage(Object object) {
return overlayImage(object, getResourceLocator().getImage("full/obj16/UpdateRateType"));
}
/**
* This returns the label text for the adapted class.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public String getText(Object object) {
String label = ((UpdateRateType)object).getIdtag();
return label == null || label.length() == 0 ?
getString("_UI_UpdateRateType_type") :
getString("_UI_UpdateRateType_type") + " " + label;
}
/**
* This handles model notifications by calling {@link #updateChildren} to update any cached
* children and by creating a viewer notification, which it passes to {@link #fireNotifyChanged}.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public void notifyChanged(Notification notification) {
updateChildren(notification);
switch (notification.getFeatureID(UpdateRateType.class)) {
case OmtPackage.UPDATE_RATE_TYPE__IDTAG:
case OmtPackage.UPDATE_RATE_TYPE__NOTES:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), false, true));
return;
case OmtPackage.UPDATE_RATE_TYPE__NAME:
case OmtPackage.UPDATE_RATE_TYPE__RATE:
case OmtPackage.UPDATE_RATE_TYPE__SEMANTICS:
case OmtPackage.UPDATE_RATE_TYPE__ANY:
case OmtPackage.UPDATE_RATE_TYPE__ANY_ATTRIBUTE:
fireNotifyChanged(new ViewerNotification(notification, notification.getNotifier(), true, false));
return;
}
super.notifyChanged(notification);
}
/**
* This adds {@link org.eclipse.emf.edit.command.CommandParameter}s describing the children
* that can be created under this object.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected void collectNewChildDescriptors(Collection<Object> newChildDescriptors, Object object) {
super.collectNewChildDescriptors(newChildDescriptors, object);
newChildDescriptors.add
(createChildParameter
(OmtPackage.eINSTANCE.getUpdateRateType_Name(),
OmtFactory.eINSTANCE.createIdentifierType()));
newChildDescriptors.add
(createChildParameter
(OmtPackage.eINSTANCE.getUpdateRateType_Rate(),
OmtFactory.eINSTANCE.createRateType()));
newChildDescriptors.add
(createChildParameter
(OmtPackage.eINSTANCE.getUpdateRateType_Semantics(),
OmtFactory.eINSTANCE.createString()));
}
/**
* Return the resource locator for this item provider's resources.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
public ResourceLocator getResourceLocator() {
return Hla_metamodelEditPlugin.INSTANCE;
}
}
| [
"gruen.jojo.develop@gmail.com"
] | gruen.jojo.develop@gmail.com |
7ffec67bd3eab2f6c9cdbb629fabd7c449d5eeb3 | 8af1164bac943cef64e41bae312223c3c0e38114 | /results-java/apache--kafka/d0e436c471ba4122ddcc0f7a1624546f97c4a517/after/WorkerTaskTest.java | 7ea4249b51df1da4de61d1a3f6538f954a0c7e19 | [] | no_license | fracz/refactor-extractor | 3ae45c97cc63f26d5cb8b92003b12f74cc9973a9 | dd5e82bfcc376e74a99e18c2bf54c95676914272 | refs/heads/master | 2021-01-19T06:50:08.211003 | 2018-11-30T13:00:57 | 2018-11-30T13:00:57 | 87,353,478 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,517 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.kafka.connect.runtime;
import org.apache.kafka.connect.sink.SinkTask;
import org.apache.kafka.connect.util.ConnectorTaskId;
import org.easymock.EasyMock;
import org.easymock.IAnswer;
import org.junit.Test;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.CountDownLatch;
import static org.easymock.EasyMock.expectLastCall;
import static org.easymock.EasyMock.partialMockBuilder;
import static org.easymock.EasyMock.replay;
import static org.easymock.EasyMock.verify;
public class WorkerTaskTest {
private static final Map<String, String> TASK_PROPS = new HashMap<>();
static {
TASK_PROPS.put(TaskConfig.TASK_CLASS_CONFIG, TestSinkTask.class.getName());
}
private static final TaskConfig TASK_CONFIG = new TaskConfig(TASK_PROPS);
@Test
public void standardStartup() {
ConnectorTaskId taskId = new ConnectorTaskId("foo", 0);
TaskStatus.Listener statusListener = EasyMock.createMock(TaskStatus.Listener.class);
WorkerTask workerTask = partialMockBuilder(WorkerTask.class)
.withConstructor(ConnectorTaskId.class, TaskStatus.Listener.class, TargetState.class)
.withArgs(taskId, statusListener, TargetState.STARTED)
.addMockedMethod("initialize")
.addMockedMethod("execute")
.addMockedMethod("close")
.createStrictMock();
workerTask.initialize(TASK_CONFIG);
expectLastCall();
workerTask.execute();
expectLastCall();
statusListener.onStartup(taskId);
expectLastCall();
workerTask.close();
expectLastCall();
statusListener.onShutdown(taskId);
expectLastCall();
replay(workerTask);
workerTask.initialize(TASK_CONFIG);
workerTask.run();
workerTask.stop();
workerTask.awaitStop(1000L);
verify(workerTask);
}
@Test
public void stopBeforeStarting() {
ConnectorTaskId taskId = new ConnectorTaskId("foo", 0);
TaskStatus.Listener statusListener = EasyMock.createMock(TaskStatus.Listener.class);
WorkerTask workerTask = partialMockBuilder(WorkerTask.class)
.withConstructor(ConnectorTaskId.class, TaskStatus.Listener.class, TargetState.class)
.withArgs(taskId, statusListener, TargetState.STARTED)
.addMockedMethod("initialize")
.addMockedMethod("execute")
.addMockedMethod("close")
.createStrictMock();
workerTask.initialize(TASK_CONFIG);
EasyMock.expectLastCall();
workerTask.close();
EasyMock.expectLastCall();
replay(workerTask);
workerTask.initialize(TASK_CONFIG);
workerTask.stop();
workerTask.awaitStop(1000L);
// now run should not do anything
workerTask.run();
verify(workerTask);
}
@Test
public void cancelBeforeStopping() throws Exception {
ConnectorTaskId taskId = new ConnectorTaskId("foo", 0);
TaskStatus.Listener statusListener = EasyMock.createMock(TaskStatus.Listener.class);
WorkerTask workerTask = partialMockBuilder(WorkerTask.class)
.withConstructor(ConnectorTaskId.class, TaskStatus.Listener.class, TargetState.class)
.withArgs(taskId, statusListener, TargetState.STARTED)
.addMockedMethod("initialize")
.addMockedMethod("execute")
.addMockedMethod("close")
.createStrictMock();
final CountDownLatch stopped = new CountDownLatch(1);
final Thread thread = new Thread() {
@Override
public void run() {
try {
stopped.await();
} catch (Exception e) {
}
}
};
workerTask.initialize(TASK_CONFIG);
EasyMock.expectLastCall();
workerTask.execute();
expectLastCall().andAnswer(new IAnswer<Void>() {
@Override
public Void answer() throws Throwable {
thread.start();
return null;
}
});
statusListener.onStartup(taskId);
expectLastCall();
workerTask.close();
expectLastCall();
// there should be no call to onShutdown()
replay(workerTask);
workerTask.initialize(TASK_CONFIG);
workerTask.run();
workerTask.stop();
workerTask.cancel();
stopped.countDown();
thread.join();
verify(workerTask);
}
private static abstract class TestSinkTask extends SinkTask {
}
} | [
"fraczwojciech@gmail.com"
] | fraczwojciech@gmail.com |
4b38ceabc6f977404148a669ddffcba1f98187b0 | f34602b407107a11ce0f3e7438779a4aa0b1833e | /professor/dvl/roadnet-client/src/main/java/org/datacontract/schemas/_2004/_07/roadnet_apex_server_services_wcfshared_datacontracts/DataWarehouseTelematicsDeviceInputOutputAccessoryDimension.java | d924d61023a1d94da3ce604871ff8610c6f92988 | [] | no_license | ggmoura/treinar_11836 | a447887dc65c78d4bd87a70aab2ec9b72afd5d87 | 0a91f3539ccac703d9f59b3d6208bf31632ddf1c | refs/heads/master | 2022-06-14T13:01:27.958568 | 2020-04-04T01:41:57 | 2020-04-04T01:41:57 | 237,103,996 | 0 | 2 | null | 2022-05-20T21:24:49 | 2020-01-29T23:36:21 | Java | UTF-8 | Java | false | false | 3,214 | java |
package org.datacontract.schemas._2004._07.roadnet_apex_server_services_wcfshared_datacontracts;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElementRef;
import javax.xml.bind.annotation.XmlType;
import com.roadnet.apex.datacontracts.AggregateRootEntity;
/**
* <p>Classe Java de DataWarehouseTelematicsDeviceInputOutputAccessoryDimension complex type.
*
* <p>O seguinte fragmento do esquema especifica o conteúdo esperado contido dentro desta classe.
*
* <pre>
* <complexType name="DataWarehouseTelematicsDeviceInputOutputAccessoryDimension">
* <complexContent>
* <extension base="{http://roadnet.com/apex/DataContracts/}AggregateRootEntity">
* <sequence>
* <element name="Description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* <element name="Identifier" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DataWarehouseTelematicsDeviceInputOutputAccessoryDimension", propOrder = {
"description",
"identifier"
})
public class DataWarehouseTelematicsDeviceInputOutputAccessoryDimension
extends AggregateRootEntity
{
@XmlElementRef(name = "Description", namespace = "http://schemas.datacontract.org/2004/07/Roadnet.Apex.Server.Services.WCFShared.DataContracts.DataWarehouse", type = JAXBElement.class, required = false)
protected JAXBElement<String> description;
@XmlElementRef(name = "Identifier", namespace = "http://schemas.datacontract.org/2004/07/Roadnet.Apex.Server.Services.WCFShared.DataContracts.DataWarehouse", type = JAXBElement.class, required = false)
protected JAXBElement<String> identifier;
/**
* Obtém o valor da propriedade description.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getDescription() {
return description;
}
/**
* Define o valor da propriedade description.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setDescription(JAXBElement<String> value) {
this.description = value;
}
/**
* Obtém o valor da propriedade identifier.
*
* @return
* possible object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public JAXBElement<String> getIdentifier() {
return identifier;
}
/**
* Define o valor da propriedade identifier.
*
* @param value
* allowed object is
* {@link JAXBElement }{@code <}{@link String }{@code >}
*
*/
public void setIdentifier(JAXBElement<String> value) {
this.identifier = value;
}
}
| [
"gleidson.gmoura@gmail.com"
] | gleidson.gmoura@gmail.com |
c70395882664571d789225b2c792f56a1f017bbc | e3a37aaf17ec41ddc7051f04b36672db62a7863d | /business-service/schedule-service-project/schedule-service/src/main/java/com/iot/schedule/job/AirSwitchEventJob.java | e4928e22bae9e571b5bb016f9190eca145bd5891 | [] | no_license | github4n/cloud | 68477a7ecf81d1526b1b08876ca12cfe575f7788 | 7974042dca1ee25b433177e2fe6bda1de28d909a | refs/heads/master | 2020-04-18T02:04:33.509889 | 2019-01-13T02:19:32 | 2019-01-13T02:19:32 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,621 | java | package com.iot.schedule.job;
import com.alibaba.fastjson.JSON;
import com.google.common.base.Strings;
import com.iot.airswitch.api.AirSwitchStatisticsApi;
import com.iot.common.helper.ApplicationContextHelper;
import com.iot.schedule.common.ScheduleConstants;
import org.quartz.Job;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import java.util.List;
import java.util.Map;
/**
* @Author: Xieby
* @Date: 2018/11/15
* @Description: *
*/
public class AirSwitchEventJob implements Job {
@Override
public void execute(JobExecutionContext context) throws JobExecutionException {
System.out.println("========================= air switch event job start ======================");
try {
Map<String, Object> data =(Map<String, Object>) context.getMergedJobDataMap().get(ScheduleConstants.JOB_DATA_KEY);
String ids = data.get("tenantIds") == null ? null : data.get("tenantIds").toString();
if (Strings.isNullOrEmpty(ids)) {
return;
}
List<Long> idList = JSON.parseArray(ids, Long.class);
System.out.println("tenant ids = " + JSON.toJSONString(idList));
AirSwitchStatisticsApi statisticsApi = ApplicationContextHelper.getBean(AirSwitchStatisticsApi.class);
for (Long tenantId : idList) {
statisticsApi.countAirSwitchEvent(tenantId);
}
} catch (Exception e) {
e.printStackTrace();
}
System.out.println("========================= air switch event job end ======================");
}
}
| [
"qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL"
] | qizhiyong@LDS-Z-C5497.LEEDARSON.LOCAL |
243e90b7613fa258cacd9aa72085d8933a9a15e4 | 6d4245b56d4448c6dbbbb167c0782715a50104d7 | /tika-server/src/main/java/org/apache/tika/server/TikaServerParseExceptionMapper.java | fe1d12ca046ffa4ae4218795ea41480646f27ef2 | [
"LGPL-2.1-or-later",
"CDDL-1.0",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-unknown",
"ICU",
"LicenseRef-scancode-iptc-2006",
"LicenseRef-scancode-unrar",
"LicenseRef-scancode-bsd-simplified-darwin",
"NetCDF",
"LicenseRef-scancode-public-domain"
] | permissive | HyperDunk/DR-TIKA | 8b9e844440c7d867fc61fa4f1b9d36b06f29faf5 | 1a0c455e9035632709f53bff76db03fc132ac694 | refs/heads/trunk | 2020-03-29T23:01:58.931883 | 2015-04-29T04:58:18 | 2015-04-29T04:58:18 | 33,805,537 | 1 | 1 | Apache-2.0 | 2020-02-11T05:32:06 | 2015-04-12T06:11:04 | Java | UTF-8 | Java | false | false | 3,666 | java | package org.apache.tika.server;
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Response;
import javax.ws.rs.ext.ExceptionMapper;
import javax.ws.rs.ext.Provider;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.io.Writer;
import org.apache.poi.hwpf.OldWordFileFormatException;
import org.apache.tika.exception.EncryptedDocumentException;
import org.apache.tika.exception.TikaException;
@Provider
public class TikaServerParseExceptionMapper implements ExceptionMapper<TikaServerParseException> {
private final boolean returnStack;
public TikaServerParseExceptionMapper(boolean returnStack) {
this.returnStack = returnStack;
}
public Response toResponse(TikaServerParseException e) {
if (e.getMessage() != null &&
e.getMessage().equals(Response.Status.UNSUPPORTED_MEDIA_TYPE.toString())) {
return buildResponse(e, 415);
}
Throwable cause = e.getCause();
if (cause == null) {
return buildResponse(e, Response.Status.INTERNAL_SERVER_ERROR.getStatusCode());
} else {
if (cause instanceof EncryptedDocumentException) {
return buildResponse(cause, 422);
} else if (cause instanceof TikaException) {
//unsupported media type
Throwable causeOfCause = cause.getCause();
if (causeOfCause instanceof WebApplicationException) {
return ((WebApplicationException) causeOfCause).getResponse();
}
return buildResponse(cause, 422);
} else if (cause instanceof IllegalStateException) {
return buildResponse(cause, 422);
} else if (cause instanceof OldWordFileFormatException) {
return buildResponse(cause, 422);
} else if (cause instanceof WebApplicationException) {
return ((WebApplicationException) e.getCause()).getResponse();
} else {
return buildResponse(e, 500);
}
}
}
private Response buildResponse(Throwable cause, int i) {
if (returnStack && cause != null) {
Writer result = new StringWriter();
PrintWriter writer = new PrintWriter(result);
cause.printStackTrace(writer);
writer.flush();
try {
result.flush();
} catch (IOException e) {
//something went seriously wrong
return Response.status(500).build();
}
return Response.status(i).entity(result.toString()).type("text/plain").build();
} else {
return Response.status(i).build();
}
}
}
| [
"tallison@apache.org"
] | tallison@apache.org |
2d729ec8e5df18a83e1bb3e3054957724ad37c4d | afd3a2aff126c345536d1b9ff1c2e19aa8aed139 | /source/branches/prototype-v2/at.rc.tacos.client.ui/src/at/rc/tacos/client/ui/controller/EmptyTransportAction.java | a24aa5f15f19a562c192de0e3fe81e6c2e1af76c | [] | no_license | mheiss/rc-tacos | 5705e6e8aabe0b98b2626af0a6a9598dd5a7a41d | df7e1dbef5287d46ee2fc9c3f76f0f7f0ffeb08b | refs/heads/master | 2021-01-09T05:27:45.141578 | 2017-02-02T22:15:58 | 2017-02-02T22:15:58 | 80,772,164 | 0 | 0 | null | null | null | null | ISO-8859-1 | Java | false | false | 3,076 | java | package at.rc.tacos.client.ui.controller;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.window.Window;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.PlatformUI;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import at.rc.tacos.client.net.NetWrapper;
import at.rc.tacos.platform.iface.IProgramStatus;
import at.rc.tacos.platform.iface.ITransportStatus;
import at.rc.tacos.platform.model.Transport;
import at.rc.tacos.platform.net.message.UpdateMessage;
/**
* Assigns the transport as an empty transport
*
* @author b.thek
*/
public class EmptyTransportAction extends Action implements ITransportStatus, IProgramStatus {
private Logger log = LoggerFactory.getLogger(EmptyTransportAction.class);
private TableViewer viewer;
/**
* Default class constructor.
*
* @param viewer
* the table viewer
*/
public EmptyTransportAction(TableViewer viewer) {
this.viewer = viewer;
setText("Leerfahrt");
setToolTipText("Macht aus dem Transport eine Leerfahrt");
}
@Override
public void run() {
// get the selected transport
ISelection selection = viewer.getSelection();
Transport transport = (Transport) ((IStructuredSelection) selection).getFirstElement();
// check if the object is currently locked
if (transport.isLocked()) {
boolean forceEdit = MessageDialog.openQuestion(Display.getCurrent().getActiveShell(), "Information: Eintrag wird bearbeitet",
"Der Transport,den Sie bearbeiten möchten wird bereits von " + transport.getLockedBy() + " bearbeitet.\n"
+ "Ein gleichzeitiges Bearbeiten kann zu unerwarteten Fehlern führen!\n\n"
+ "Es wird dringend empfohlen, den Transport erst nach Freigabe durch " + transport.getLockedBy()
+ " als Leerfahrt zu kennzeichnen!\n\n" + "Möchten Sie das Fahrzeug trotzdem bearbeiten?");
if (!forceEdit)
return;
// log the override of the lock
String username = NetWrapper.getSession().getUsername();
log.warn("Der Eintrag " + transport + " wird trotz Sperrung durch " + transport.getLockedBy() + " von " + username + " bearbeitet");
}
// confirm the cancel
InputDialog dlg = new InputDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(), "Leerfahrt",
"Bitte geben Sie Informationen zur Leerfahrt ein", null, null);
if (dlg.open() == Window.OK) {
transport.setNotes(transport.getNotes() + " Leerfahrtinformation: " + dlg.getValue());
transport.setProgramStatus(PROGRAM_STATUS_JOURNAL);
// remove the lock
transport.setLocked(false);
transport.setLockedBy(null);
// send the update
UpdateMessage<Transport> updateMessage = new UpdateMessage<Transport>(transport);
updateMessage.asnchronRequest(NetWrapper.getSession());
}
}
}
| [
"michael.heiss@outlook.at"
] | michael.heiss@outlook.at |
3596f12ffed542da1b9639d18395426982ac33a5 | 9b294c3bf262770e9bac252b018f4b6e9412e3ee | /camerazadas/source/apk/com.sonyericsson.android.camera/src-cfr/com/google/android/gms/common/data/f.java | 1e68964bf3ce2453b8d26935969218646faa6017 | [] | no_license | h265/camera | 2c00f767002fd7dbb64ef4dc15ff667e493cd937 | 77b986a60f99c3909638a746c0ef62cca38e4235 | refs/heads/master | 2020-12-30T22:09:17.331958 | 2015-08-25T01:22:25 | 2015-08-25T01:22:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,566 | java | /*
* Decompiled with CFR 0_100.
*/
package com.google.android.gms.common.data;
import android.database.CursorWindow;
import android.os.Bundle;
import android.os.Parcel;
import android.os.Parcelable;
import com.google.android.gms.common.data.DataHolder;
import com.google.android.gms.common.internal.safeparcel.a;
import com.google.android.gms.common.internal.safeparcel.b;
public class f
implements Parcelable.Creator<DataHolder> {
static void a(DataHolder dataHolder, Parcel parcel, int n) {
int n2 = b.D(parcel);
b.a(parcel, 1, dataHolder.gB(), false);
b.c(parcel, 1000, dataHolder.getVersionCode());
b.a((Parcel)parcel, (int)2, (Parcelable[])dataHolder.gC(), (int)n, (boolean)false);
b.c(parcel, 3, dataHolder.getStatusCode());
b.a(parcel, 4, dataHolder.gy(), false);
b.H(parcel, n2);
}
public DataHolder[] at(int n) {
return new DataHolder[n];
}
@Override
public /* synthetic */ Object createFromParcel(Parcel parcel) {
return this.z(parcel);
}
@Override
public /* synthetic */ Object[] newArray(int n) {
return this.at(n);
}
public DataHolder z(Parcel object) {
int n = 0;
Bundle bundle = null;
int n2 = a.C((Parcel)object);
CursorWindow[] arrcursorWindow = null;
String[] arrstring = null;
int n3 = 0;
block7 : while (object.dataPosition() < n2) {
int n4 = a.B((Parcel)object);
switch (a.aD(n4)) {
default: {
a.b((Parcel)object, n4);
continue block7;
}
case 1: {
arrstring = a.A((Parcel)object, n4);
continue block7;
}
case 1000: {
n3 = a.g((Parcel)object, n4);
continue block7;
}
case 2: {
arrcursorWindow = a.b((Parcel)object, n4, CursorWindow.CREATOR);
continue block7;
}
case 3: {
n = a.g((Parcel)object, n4);
continue block7;
}
case 4:
}
bundle = a.q((Parcel)object, n4);
}
if (object.dataPosition() != n2) {
throw new a.a("Overread allowed size end=" + n2, (Parcel)object);
}
object = new DataHolder(n3, arrstring, arrcursorWindow, n, bundle);
object.gA();
return object;
}
}
| [
"jmrm@ua.pt"
] | jmrm@ua.pt |
d832ef67dae42e6187265d51e9a2aebf295a7cc7 | ba90ba9bcf91c4dbb1121b700e48002a76793e96 | /com-gameportal-web/src/main/java/com/gameportal/web/user/dao/MemberXimaDetailDao.java | 28bccd56185c43fdd0cc32ae44726fbc9a51ea08 | [] | no_license | portalCMS/xjw | 1ab2637964fd142f8574675bd1c7626417cf96d9 | f1bdba0a0602b8603444ed84f6d7afafaa308b63 | refs/heads/master | 2020-04-16T13:33:21.792588 | 2019-01-18T02:29:40 | 2019-01-18T02:29:40 | 165,632,513 | 0 | 9 | null | null | null | null | UTF-8 | Java | false | false | 854 | java | package com.gameportal.web.user.dao;
import java.util.List;
import java.util.Map;
import org.apache.commons.lang.ObjectUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.stereotype.Component;
import com.gameportal.web.user.model.MemberXimaDetail;
@Component
@SuppressWarnings("all")
public class MemberXimaDetailDao extends BaseIbatisDAO {
@Override
public Class getEntityClass() {
return MemberXimaDetail.class;
}
public boolean saveOrUpdate(MemberXimaDetail entity) {
if (entity.getMxdid() == null)
return StringUtils.isNotBlank(ObjectUtils.toString(save(entity))) ? true
: false;
else
return update(entity);
}
public List<MemberXimaDetail> findMemberXimaDetailList(Map<String, Object> params){
return getSqlMapClientTemplate().queryForList(getSimpleName()+".pageSelectDetail",params);
}
}
| [
"sunny@gmail.com"
] | sunny@gmail.com |
5b93117d16cc67a9ac674a61b009e555bb7674d1 | 0ea271177f5c42920ac53cd7f01f053dba5c14e4 | /5.3.5/sources/com/google/android/gms/wearable/internal/zzhf.java | 6593c6064ba97574b3981deebfdc8673618ddc81 | [] | no_license | alireza-ebrahimi/telegram-talaeii | 367a81a77f9bc447e729b2ca339f9512a4c2860e | 68a67e6f104ab8a0888e63c605e8bbad12c4a20e | refs/heads/master | 2020-03-21T13:44:29.008002 | 2018-12-09T10:30:29 | 2018-12-09T10:30:29 | 138,622,926 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 348 | java | package com.google.android.gms.wearable.internal;
import com.google.android.gms.common.api.Status;
import com.google.android.gms.common.api.internal.zzn;
final class zzhf extends zzgm<Status> {
public zzhf(zzn<Status> zzn) {
super(zzn);
}
public final void zza(zzbn zzbn) {
zzav(new Status(zzbn.statusCode));
}
}
| [
"alireza.ebrahimi2006@gmail.com"
] | alireza.ebrahimi2006@gmail.com |
a3571d61fd5e95c3a77aa5c855cb6b2e91db96c0 | e7083e92e1670b6d93ffc867b0c38668ee146c67 | /JSR352.Annotations/src/javax/batch/annotation/StepListener.java | c539e96d3036dcb3a8e87e320224d7e5b8350b93 | [
"Apache-2.0"
] | permissive | mminella/jsr-352-ri-tck | 5e3330feb717ddb96ef74bf59f433401a9fac939 | 6c08c0fecc93667852a9fa0e77d9c2dfc5c1c398 | refs/heads/master | 2021-01-20T11:30:24.031435 | 2013-01-02T15:13:24 | 2013-01-02T15:13:24 | 7,408,437 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,085 | java | /*
* Copyright 2012 International Business Machines Corp.
*
* See the NOTICE file distributed with this work for additional information
* regarding copyright ownership. 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 javax.batch.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface StepListener {
public String value() default "";
}
| [
"mminella@vmware.com"
] | mminella@vmware.com |
3b930510ed56b701e7039d50aa145075231f372b | e49bffe6fb1b90ae06cfd4b4395bfef6ae97ef93 | /springboots/Microservices/mssc-beer-service/src/main/java/elearning/sfg/beer/brewery/dtos/CustomerDto.java | 53fb0bf35dd7f024a730e60ab86e35ddd8850564 | [] | no_license | mkejeiri/Toolbox | ca86901149179eb54d2a66df18c36dfb737bc018 | a64fcf71243fedf8ad73521a827f114d912b3040 | refs/heads/master | 2023-04-09T22:41:25.131280 | 2021-04-06T12:49:01 | 2021-04-06T12:49:01 | 297,075,481 | 0 | 1 | null | 2021-01-01T18:18:35 | 2020-09-20T12:51:41 | Java | UTF-8 | Java | false | false | 884 | java | package elearning.sfg.beer.brewery.dtos;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.time.OffsetDateTime;
import java.util.UUID;
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public class CustomerDto {
@JsonProperty("id")
private UUID id = null;
@JsonProperty("version")
private Integer version = null;
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssZ", shape = JsonFormat.Shape.STRING)
@JsonProperty("createdDate")
private OffsetDateTime createdDate = null;
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssZ", shape = JsonFormat.Shape.STRING)
@JsonProperty("lastModifiedDate")
private OffsetDateTime lastModifiedDate = null;
private String name;
}
| [
"kejeiri@gmail.com"
] | kejeiri@gmail.com |
a4ac682a874f921949f90bfcd63f4c0b6c7aab97 | 7344866370bd60505061fcc7e8c487339a508bb9 | /jOpenCalendar/src/org/jopencalendar/ui/ItemPartViewLayouter.java | 8d9f7fa85820dbca5388ca9d75616d42c8bd5d55 | [] | no_license | sanogotech/openconcerto_ERP_JAVA | ed3276858f945528e96a5ccfdf01a55b58f92c8d | 4d224695be0a7a4527851a06d8b8feddfbdd3d0e | refs/heads/master | 2023-04-11T09:51:29.952287 | 2021-04-21T14:39:18 | 2021-04-21T14:39:18 | 360,197,474 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 898 | java | package org.jopencalendar.ui;
import java.util.List;
public class ItemPartViewLayouter {
public void layout(List<ItemPartView> items) {
final int size = items.size();
int maxX = 0;
for (int i = 0; i < size; i++) {
ItemPartView p = items.get(i);
for (int j = 0; j < i; j++) {
ItemPartView layoutedPart = items.get(j);
if (layoutedPart.conflictWith(p)) {
if (layoutedPart.getX() == p.getX()) {
p.setX(Math.max(p.getX(), layoutedPart.getX() + 1));
if (maxX < p.getX()) {
maxX = p.getX();
}
}
}
}
}
for (int i = 0; i < size; i++) {
ItemPartView p = items.get(i);
p.setMaxColumn(maxX + 1);
}
}
}
| [
"davask.42@gmail.com"
] | davask.42@gmail.com |
56799f356b38323added06c83b62ad67d00275e4 | f9b7dcbd841a0b3dd0fcd2f0941d498346f88599 | /chrome/android/javatests/src/org/chromium/chrome/browser/payments/PaymentHandlerEnableDelegationsTest.java | afae8da54d0fa13972d4622f1b6ee191b7c0e07b | [
"BSD-3-Clause"
] | permissive | browser-auto/chromium | 58bace4173da259625cb3c4725f9d7ec6a4d2e03 | 36d524c252b60b059deaf7849fb6b082bee3018d | refs/heads/master | 2022-11-16T12:38:05.031058 | 2019-11-18T12:28:56 | 2019-11-18T12:28:56 | 222,449,220 | 1 | 0 | BSD-3-Clause | 2019-11-18T12:55:08 | 2019-11-18T12:55:07 | null | UTF-8 | Java | false | false | 6,530 | java | // Copyright 2019 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.payments;
import android.support.test.InstrumentationRegistry;
import android.support.test.filters.MediumTest;
import android.view.View;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.ClassRule;
import org.junit.Rule;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.chromium.base.test.util.CallbackHelper;
import org.chromium.base.test.util.CommandLineFlags;
import org.chromium.base.test.util.Feature;
import org.chromium.chrome.browser.ChromeSwitches;
import org.chromium.chrome.test.ChromeJUnit4ClassRunner;
import org.chromium.chrome.test.ui.DisableAnimationsTestRule;
import org.chromium.content_public.browser.test.util.JavaScriptUtils;
import org.chromium.net.test.EmbeddedTestServer;
import org.chromium.net.test.ServerCertificate;
/** An integration test for shipping address and payer's contact information delegation. */
@RunWith(ChromeJUnit4ClassRunner.class)
@CommandLineFlags.Add({ChromeSwitches.DISABLE_FIRST_RUN_EXPERIENCE,
PaymentRequestTestRule.ENABLE_EXPERIMENTAL_WEB_PLATFORM_FEATURES})
@MediumTest
public class PaymentHandlerEnableDelegationsTest {
// Disable animations to reduce flakiness.
@ClassRule
public static DisableAnimationsTestRule sNoAnimationsRule = new DisableAnimationsTestRule();
// Open a tab on the blank page first to initiate the native bindings required by the test
// server.
@Rule
public PaymentRequestTestRule mRule = new PaymentRequestTestRule("about:blank");
// Host the tests on https://127.0.0.1, because file:// URLs cannot have service workers.
private EmbeddedTestServer mServer;
@Before
public void setUp() throws Throwable {
mServer = EmbeddedTestServer.createAndStartHTTPSServer(
InstrumentationRegistry.getContext(), ServerCertificate.CERT_OK);
mRule.startMainActivityWithURL(
mServer.getURL("/components/test/data/payments/payment_handler.html"));
// Find the web contents where JavaScript will be executed and instrument the browser
// payment sheet.
mRule.openPage();
}
private void installPaymentHandlerWithDelegations(String delegations) throws Throwable {
Assert.assertEquals("\"success\"",
JavaScriptUtils.runJavascriptWithAsyncResult(
mRule.getActivity().getCurrentWebContents(),
"install().then(result => {domAutomationController.send(result);});"));
Assert.assertEquals("\"success\"",
JavaScriptUtils.runJavascriptWithAsyncResult(
mRule.getActivity().getCurrentWebContents(),
"enableDelegations(" + delegations
+ ").then(result => {domAutomationController.send(result);});"));
}
@After
public void tearDown() {
mServer.stopAndDestroyServer();
}
private void createPaymentRequestAndWaitFor(String paymentOptions, CallbackHelper helper)
throws Throwable {
int callCount = helper.getCallCount();
Assert.assertEquals("\"success\"",
mRule.runJavaScriptCodeInCurrentTab(
"paymentRequestWithOptions(" + paymentOptions + ");"));
helper.waitForCallback(callCount);
}
@Test
@Feature({"Payments"})
@MediumTest
public void testShippingDelegation() throws Throwable {
installPaymentHandlerWithDelegations("['shippingAddress']");
// The pay button should be enabled when shipping address is requested and the selected
// payment instrument can provide it.
createPaymentRequestAndWaitFor("{requestShipping: true}", mRule.getReadyToPay());
}
@Test
@Feature({"Payments"})
@MediumTest
public void testContactDelegation() throws Throwable {
installPaymentHandlerWithDelegations("['payerName', 'payerEmail', 'payerPhone']");
// The pay button should be enabled when payer's contact information is requested and the
// selected payment instrument can provide it.
createPaymentRequestAndWaitFor(
"{requestPayerName: true, requestPayerEmail: true, requestPayerPhone: true}",
mRule.getReadyToPay());
}
@Test
@Feature({"Payments"})
@MediumTest
public void testShippingAndContactInfoDelegation() throws Throwable {
installPaymentHandlerWithDelegations(
"['shippingAddress', 'payerName', 'payerEmail', 'payerPhone']");
// The pay button should be enabled when shipping address and payer's contact information
// are requested and the selected payment instrument can provide them.
createPaymentRequestAndWaitFor(
"{requestShipping: true, requestPayerName: true, requestPayerEmail: true,"
+ " requestPayerPhone: true}",
mRule.getReadyToPay());
}
@Test
@Feature({"Payments"})
@MediumTest
public void testPartialDelegationShippingNotSupported() throws Throwable {
installPaymentHandlerWithDelegations("['payerName', 'payerEmail', 'payerPhone']");
createPaymentRequestAndWaitFor(
"{requestShipping: true, requestPayerName: true, requestPayerEmail: true}",
mRule.getReadyForInput());
// Shipping section must exist in payment sheet since shipping address is requested and
// won't be provided by the selected payment handler.
Assert.assertEquals(View.VISIBLE,
mRule.getPaymentRequestUI().getShippingAddressSectionForTest().getVisibility());
}
@Test
@Feature({"Payments"})
@MediumTest
public void testPartialDelegationContactInfoNotSupported() throws Throwable {
installPaymentHandlerWithDelegations("['shippingAddress']");
createPaymentRequestAndWaitFor(
"{requestShipping: true, requestPayerName: true, requestPayerEmail: true}",
mRule.getReadyForInput());
// Contact section must exist in payment sheet since payer's name and email are requested
// and won't be provided by the selected payment handler.
Assert.assertEquals(View.VISIBLE,
mRule.getPaymentRequestUI().getContactDetailsSectionForTest().getVisibility());
}
}
| [
"commit-bot@chromium.org"
] | commit-bot@chromium.org |
fa2da0a360ef3f19d3b48a162af2abd31b5f9ad6 | cf729a7079373dc301d83d6b15e2451c1f105a77 | /adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201601/cm/BudgetServiceInterfacequeryResponse.java | 60cebb09032c785cf934f4d7dac5b22163f70f56 | [] | no_license | cvsogor/Google-AdWords | 044a5627835b92c6535f807ea1eba60c398e5c38 | fe7bfa2ff3104c77757a13b93c1a22f46e98337a | refs/heads/master | 2023-03-23T05:49:33.827251 | 2021-03-17T14:35:13 | 2021-03-17T14:35:13 | 348,719,387 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,538 | java |
package com.google.api.ads.adwords.jaxws.v201601.cm;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for queryResponse element declaration.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <element name="queryResponse">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="rval" type="{https://adwords.google.com/api/adwords/cm/v201601}BudgetPage" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"rval"
})
@XmlRootElement(name = "queryResponse")
public class BudgetServiceInterfacequeryResponse {
protected BudgetPage rval;
/**
* Gets the value of the rval property.
*
* @return
* possible object is
* {@link BudgetPage }
*
*/
public BudgetPage getRval() {
return rval;
}
/**
* Sets the value of the rval property.
*
* @param value
* allowed object is
* {@link BudgetPage }
*
*/
public void setRval(BudgetPage value) {
this.rval = value;
}
}
| [
"vacuum13@gmail.com"
] | vacuum13@gmail.com |
7efd090c3d0e33592c88bae7ca14c470869f9fc8 | 4025af4d2bacf3568cfdd55d85573ed26d606236 | /mybatis-3.5.2/src/test/java/org/apache/ibatis/submitted/enumtypehandler_on_annotation/EnumTypeHandlerUsingAnnotationTest.java | 00d1285bdcc3ca57523598155d652f07aef5c61e | [
"BSD-3-Clause",
"Apache-2.0"
] | permissive | MooNkirA/mybatis-note | f3e1ede680b0f511346a649895ae1bf71c69d616 | 25e952c13406fd0579750b25089d2cf2b1bdacec | refs/heads/master | 2022-03-04T20:11:26.770175 | 2021-12-18T02:31:10 | 2021-12-18T02:31:10 | 223,528,278 | 0 | 0 | null | 2021-12-18T02:31:13 | 2019-11-23T04:04:03 | Java | UTF-8 | Java | false | false | 5,136 | java | /**
* Copyright 2009-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
*
* 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.ibatis.submitted.enumtypehandler_on_annotation;
import org.apache.ibatis.BaseDataTest;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.apache.ibatis.session.SqlSessionFactoryBuilder;
import org.junit.jupiter.api.AfterEach;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
import java.io.Reader;
import static org.assertj.core.api.Assertions.assertThat;
/**
* Tests for type handler of enum using annotations.
*
* @since #444
*
* @author Kazuki Shimizu
*
* @see org.apache.ibatis.annotations.Arg
* @see org.apache.ibatis.annotations.Result
* @see org.apache.ibatis.annotations.TypeDiscriminator
*/
class EnumTypeHandlerUsingAnnotationTest {
private static SqlSessionFactory sqlSessionFactory;
private SqlSession sqlSession;
@BeforeAll
static void initDatabase() throws Exception {
try (Reader reader = Resources.getResourceAsReader("org/apache/ibatis/submitted/enumtypehandler_on_annotation/mybatis-config.xml")) {
sqlSessionFactory = new SqlSessionFactoryBuilder().build(reader);
sqlSessionFactory.getConfiguration().getMapperRegistry().addMapper(PersonMapper.class);
}
BaseDataTest.runScript(sqlSessionFactory.getConfiguration().getEnvironment().getDataSource(),
"org/apache/ibatis/submitted/enumtypehandler_on_annotation/CreateDB.sql");
}
@BeforeEach
void openSqlSession() {
this.sqlSession = sqlSessionFactory.openSession();
}
@AfterEach
void closeSqlSession() {
sqlSession.close();
}
@Test
void testForArg() {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
{
Person person = personMapper.findOneUsingConstructor(1);
assertThat(person.getId()).isEqualTo(1);
assertThat(person.getFirstName()).isEqualTo("John");
assertThat(person.getLastName()).isEqualTo("Smith");
assertThat(person.getPersonType()).isEqualTo(Person.PersonType.PERSON); // important
}
{
Person employee = personMapper.findOneUsingConstructor(2);
assertThat(employee.getId()).isEqualTo(2);
assertThat(employee.getFirstName()).isEqualTo("Mike");
assertThat(employee.getLastName()).isEqualTo("Jordan");
assertThat(employee.getPersonType()).isEqualTo(Person.PersonType.EMPLOYEE); // important
}
}
@Test
void testForResult() {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
{
Person person = personMapper.findOneUsingSetter(1);
assertThat(person.getId()).isEqualTo(1);
assertThat(person.getFirstName()).isEqualTo("John");
assertThat(person.getLastName()).isEqualTo("Smith");
assertThat(person.getPersonType()).isEqualTo(Person.PersonType.PERSON); // important
}
{
Person employee = personMapper.findOneUsingSetter(2);
assertThat(employee.getId()).isEqualTo(2);
assertThat(employee.getFirstName()).isEqualTo("Mike");
assertThat(employee.getLastName()).isEqualTo("Jordan");
assertThat(employee.getPersonType()).isEqualTo(Person.PersonType.EMPLOYEE); // important
}
}
@Test
void testForTypeDiscriminator() {
PersonMapper personMapper = sqlSession.getMapper(PersonMapper.class);
{
Person person = personMapper.findOneUsingTypeDiscriminator(1);
assertThat(person.getClass()).isEqualTo(Person.class); // important
assertThat(person.getId()).isEqualTo(1);
assertThat(person.getFirstName()).isEqualTo("John");
assertThat(person.getLastName()).isEqualTo("Smith");
assertThat(person.getPersonType()).isEqualTo(Person.PersonType.PERSON);
}
{
Person employee = personMapper.findOneUsingTypeDiscriminator(2);
assertThat(employee.getClass()).isEqualTo(Employee.class); // important
assertThat(employee.getId()).isEqualTo(2);
assertThat(employee.getFirstName()).isEqualTo("Mike");
assertThat(employee.getLastName()).isEqualTo("Jordan");
assertThat(employee.getPersonType()).isEqualTo(Person.PersonType.EMPLOYEE);
}
}
}
| [
"lje888@126.com"
] | lje888@126.com |
6cc59e25c428d2c7b512df66ad7af599e88e2cae | a4b88840d3d30b07aa00e69259a7b1c035441a85 | /espd-edm/src/main/java/oasis/names/specification/ubl/schema/xsd/commonbasiccomponents_2/TaxLevelCodeType.java | 22e446b0b99ed8e4e5065868b471683d19bff706 | [] | no_license | AgID/espd-builder | e342712abc87824d402a90ad87f312a243165970 | 3614d526d574ad979aafa6da429e409debc73dd8 | refs/heads/master | 2022-12-23T20:36:03.500212 | 2020-01-30T16:48:37 | 2020-01-30T16:48:37 | 225,416,148 | 3 | 0 | null | 2022-12-16T09:49:58 | 2019-12-02T16:08:38 | Java | UTF-8 | Java | false | false | 3,596 | java | //
// Questo file è stato generato dall'architettura JavaTM per XML Binding (JAXB) Reference Implementation, v2.2.11
// Vedere <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Qualsiasi modifica a questo file andrà persa durante la ricompilazione dello schema di origine.
// Generato il: 2019.02.25 alle 12:32:23 PM CET
//
package oasis.names.specification.ubl.schema.xsd.commonbasiccomponents_2;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
import oasis.names.specification.ubl.schema.xsd.unqualifieddatatypes_2.CodeType;
import org.jvnet.jaxb2_commons.lang.Equals2;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy2;
import org.jvnet.jaxb2_commons.lang.HashCode2;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy2;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBToStringStrategy;
import org.jvnet.jaxb2_commons.lang.ToString2;
import org.jvnet.jaxb2_commons.lang.ToStringStrategy2;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
/**
* <p>Classe Java per TaxLevelCodeType complex type.
*
* <p>Il seguente frammento di schema specifica il contenuto previsto contenuto in questa classe.
*
* <pre>
* <complexType name="TaxLevelCodeType">
* <simpleContent>
* <restriction base="<urn:oasis:names:specification:ubl:schema:xsd:UnqualifiedDataTypes-2>CodeType">
* </restriction>
* </simpleContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "TaxLevelCodeType")
public class TaxLevelCodeType
extends CodeType
implements Serializable, Equals2, HashCode2, ToString2
{
private final static long serialVersionUID = 100L;
public String toString() {
final ToStringStrategy2 strategy = JAXBToStringStrategy.INSTANCE;
final StringBuilder buffer = new StringBuilder();
append(null, buffer, strategy);
return buffer.toString();
}
public StringBuilder append(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
strategy.appendStart(locator, this, buffer);
appendFields(locator, buffer, strategy);
strategy.appendEnd(locator, this, buffer);
return buffer;
}
public StringBuilder appendFields(ObjectLocator locator, StringBuilder buffer, ToStringStrategy2 strategy) {
super.appendFields(locator, buffer, strategy);
return buffer;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy2 strategy) {
if ((object == null)||(this.getClass()!= object.getClass())) {
return false;
}
if (this == object) {
return true;
}
if (!super.equals(thisLocator, thatLocator, object, strategy)) {
return false;
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy2 strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy2 strategy) {
int currentHashCode = super.hashCode(locator, strategy);
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy2 strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}
| [
"mpetruzzi@pccube.com"
] | mpetruzzi@pccube.com |
932e170a8a90c188a2ace060113bd4a7cb77b722 | 51c3050325d2584824915efba70f003dd943ffa6 | /lib-tool/src/main/java/com/views/customedittext/MyKeyboardView.java | 7ec7c920078fa18120c3e6c96e48a7b2f26838e2 | [] | no_license | beyond-snail/xywf | 2fff68e7e47238b8bae2256968adae52261844c2 | 87888ba76d1a8b3d86276a55aff625eeea406042 | refs/heads/master | 2021-05-06T07:04:48.164434 | 2018-10-29T08:23:16 | 2018-10-29T08:23:16 | 113,928,842 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,681 | java | package com.views.customedittext;
import android.content.Context;
import android.content.res.Resources;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.Rect;
import android.graphics.drawable.Drawable;
import android.inputmethodservice.Keyboard;
import android.inputmethodservice.KeyboardView;
import android.util.AttributeSet;
import com.tool.R;
import java.util.List;
/**
* Created by zhuanghongji on 2015/12/10.
*/
public class MyKeyboardView extends KeyboardView {
private Drawable mKeyBgDrawable;
private Drawable mOpKeyBgDrawable;
private Drawable mOpkeyBgDrawable1;
private Resources mRes;
public MyKeyboardView(Context context, AttributeSet attrs) {
this(context, attrs, 0);
}
public MyKeyboardView(Context context, AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
initResources(context);
}
private void initResources(Context context) {
mRes = context.getResources();
mKeyBgDrawable = mRes.getDrawable(R.drawable.relay_bg);
mOpKeyBgDrawable = mRes.getDrawable(R.drawable.relay_bg);
mOpkeyBgDrawable1 = mRes.getDrawable(R.drawable.relay_bg);
}
@Override
public void onDraw(Canvas canvas) {
List<Keyboard.Key> keys = getKeyboard().getKeys();
for (Keyboard.Key key : keys) {
canvas.save();
int offsetY = 0;
if (key.y == 0) {
offsetY = 1;
}
int initDrawY = key.y + offsetY;
Rect rect = new Rect(key.x, initDrawY, key.x + key.width, key.y + key.height);
canvas.clipRect(rect);
int primaryCode = -1;
if (null != key.codes && key.codes.length != 0) {
primaryCode = key.codes[0];
}
Drawable drawable = null;
if (primaryCode == -3 ) {
drawable = mOpkeyBgDrawable1;
} else if (primaryCode == -5) {
drawable = mOpKeyBgDrawable;
} else if (primaryCode != -1) {
drawable = mKeyBgDrawable;
}
if (null != drawable) {
int[] state = key.getCurrentDrawableState();
drawable.setState(state);
drawable.setBounds(rect);
drawable.draw(canvas);
}
Paint paint = new Paint();
paint.setAntiAlias(true);
paint.setTextAlign(Paint.Align.CENTER);
paint.setTextSize(30);
// paint.setFakeBoldText(true);
if (primaryCode == -3 || primaryCode == -5){
paint.setColor(mRes.getColor(R.color.white));
} else {
paint.setColor(mRes.getColor(R.color.white));
}
if (key.label != null) {
canvas.drawText(
key.label.toString(),
key.x + (key.width / 2),
initDrawY + (key.height + paint.getTextSize() - paint.descent()) / 2,
paint
);
} else if (key.icon != null) {
int intriWidth = key.icon.getIntrinsicWidth();
int intriHeight = key.icon.getIntrinsicHeight();
final int drawableX = key.x + (key.width - intriWidth) / 2;
final int drawableY = initDrawY + (key.height - intriHeight) / 2;
key.icon.setBounds(drawableX, drawableY,
drawableX + intriWidth, drawableY + intriHeight);
key.icon.draw(canvas);
}
canvas.restore();
}
}
}
| [
"wu15979937502"
] | wu15979937502 |
2c812327bf62d92a911cdeb2812bf3d39630d9ff | b04471b102b2285f0b8a94ce6e3dc88fc9c750af | /rest-assert-core/src/test/java/com/github/mjeanroy/restassert/core/data/StrictTransportSecurityBuilderTest.java | 760a502af696fe6bfbd9dec48b8a7bdc2afabfe7 | [] | no_license | mjeanroy/rest-assert | 795f59cbb2e1b6fac59408439a1fae5ee97d88d1 | b9ea9318c1907cc45a6afd42ac200b1ead97f000 | refs/heads/master | 2022-12-25T06:02:07.555504 | 2022-05-21T14:25:43 | 2022-05-21T14:25:43 | 128,626,910 | 0 | 0 | null | 2022-11-16T03:00:14 | 2018-04-08T09:58:49 | Java | UTF-8 | Java | false | false | 2,337 | java | /**
* The MIT License (MIT)
*
* Copyright (c) 2014-2021 Mickael Jeanroy
*
* 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.github.mjeanroy.restassert.core.data;
import org.junit.Test;
import static org.assertj.core.api.Assertions.assertThat;
public class StrictTransportSecurityBuilderTest {
@Test
public void it_should_create_strict_transport_security_with_max_age() {
StrictTransportSecurity sts = StrictTransportSecurity.builder(3600).build();
assertThat(sts.getMaxAge()).isEqualTo(3600);
assertThat(sts.isIncludeSubDomains()).isFalse();
assertThat(sts.isPreload()).isFalse();
}
@Test
public void it_should_create_strict_transport_security_with_include_sub_domains() {
StrictTransportSecurity sts = StrictTransportSecurity.builder(3600)
.includeSubDomains()
.build();
assertThat(sts.getMaxAge()).isEqualTo(3600);
assertThat(sts.isIncludeSubDomains()).isTrue();
assertThat(sts.isPreload()).isFalse();
}
@Test
public void it_should_create_strict_transport_security_with_include_preload() {
StrictTransportSecurity sts = StrictTransportSecurity.builder(3600)
.includeSubDomains()
.preload()
.build();
assertThat(sts.getMaxAge()).isEqualTo(3600);
assertThat(sts.isIncludeSubDomains()).isTrue();
assertThat(sts.isPreload()).isTrue();
}
}
| [
"mickael.jeanroy@gmail.com"
] | mickael.jeanroy@gmail.com |
0cdcfdac89726a1c283f5d52c22f319d4db2a4a1 | 85909013a05f19222cd51221543c46d78c59ee44 | /trunk/branches/bevy-v0/src/com/thesunsoft/bevy/EventsActivity.java | 9392834a156b9418cb1cf2c9244b6979d7bc2488 | [] | no_license | BGCX067/f9a1ab62397a0d40be2a21a12154aef8-svn-to-git | 5be3a512cb303e156c806968badf738c8f35753f | fa9641306ab5220f1916373c33683fc6566074b3 | refs/heads/master | 2016-09-01T08:52:17.662197 | 2015-12-28T14:39:31 | 2015-12-28T14:39:31 | 48,836,134 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,992 | java | package com.thesunsoft.bevy;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import org.json.JSONArray;
import org.json.JSONObject;
import android.content.Context;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.text.TextUtils;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.AdapterView;
import android.widget.Button;
import android.widget.ListView;
import android.widget.AdapterView.OnItemClickListener;
import com.facebook.HttpMethod;
import com.facebook.Request;
import com.facebook.RequestAsyncTask;
import com.facebook.Response;
import com.facebook.Session;
import com.facebook.model.GraphObject;
import com.thesunsoft.bevy.R;
import com.thesunsoft.bevy.adapters.LikeAdapter;
import com.thesunsoft.bevy.model.LikeObj;
public class EventsActivity extends FragmentActivity implements OnClickListener, OnItemClickListener{
private static final String TAG= "PeopleActivity";
private static final String MY_LIKES = "me/events";
private static final String ID = "id";
private static final String NAME = "name";
private static final String CATEGORY = "category";
private static final String IMAGE = "picture";
private static final String LINK = "link";
private RequestAsyncTask taskLike=null;
private ListView listView;
private LikeAdapter adapter;
private Context context;
private Button btnCancel;
private ArrayList<LikeObj> lists = new ArrayList<LikeObj>();
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_events);
this.context = this;
initCompnent();
setActionListener();
//this.loadData();
}
private void initCompnent(){
listView = (ListView)findViewById(R.id.list_view_like);
btnCancel = (Button)findViewById(R.id.btn_cancel);
adapter = new LikeAdapter(context, lists);
listView.setAdapter(adapter);
}
private void setActionListener(){
listView.setOnItemClickListener(this);
btnCancel.setOnClickListener(this);
}
@Override
protected void onDestroy() {
super.onDestroy();
if(taskLike!=null)
taskLike.cancel(true);
}
public void loadData(){
Session session = Session.getActiveSession();
if(session==null){
session = Session.openActiveSessionFromCache(this);
}else if(session.isOpened()){
Set<String> fields = new HashSet<String>();
Bundle params =new Bundle();
//params.putString("type", "like");
//params.putString("q", "platform");
//params.putString("type", "post");
//params.putString("q", "watermelon");
//params.putString("object", "website");
String[] requiredFields = new String[]{
ID,
NAME,
CATEGORY,
IMAGE,
LINK
};
fields.addAll(Arrays.asList(requiredFields));
params.putString("fields", TextUtils.join(",", fields));
params.putInt("limit", 1000);
Request request = new Request(session, MY_LIKES, params, HttpMethod.GET, new Request.Callback() {
@Override
public void onCompleted(Response response) {
// TODO Auto-generated method stub
try
{
GraphObject go = response.getGraphObject();
JSONObject jso = go.getInnerJSONObject();
JSONArray arr = jso.getJSONArray("data");
for ( int i = 0; i < (arr.length()); i++ )
{
JSONObject json_obj = arr.getJSONObject(i);
LikeObj likeObj = new LikeObj();
likeObj.setId(json_obj.getString("id"));
likeObj.setName(json_obj.getString("name"));
likeObj.setCategory(json_obj.getString("category"));
likeObj.setLink(json_obj.getString("link"));
JSONObject picture_obj = json_obj.getJSONObject("picture");
//Log.e(TAG, "picture_obj=>"+picture_obj.toString());
JSONObject picture_data = picture_obj.getJSONObject("data");
likeObj.setImageUrl(picture_data.getString("url"));
Log.e(TAG, "picture_obj=>"+i+"=>"+picture_data.getString("url"));
lists.add(likeObj);
}
}
catch ( Throwable t )
{
t.printStackTrace();
}
if(lists.size()!=0){
adapter.notifyDataSetChanged();
}
}
});
taskLike = new RequestAsyncTask(request);
taskLike.execute();
}
}
@Override
public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {
// TODO Auto-generated method stub
}
@Override
public void onClick(View v) {
// TODO Auto-generated method stub
if(v.getId() == R.id.btn_cancel){
finish();
}
}
}
| [
"you@example.com"
] | you@example.com |
6396b51835ca0bbf8f5887fe7c363090466d5991 | d125d66b96996a62a9ca8f7546eb80534fc30cdc | /platform/lang-api/src/com/intellij/psi/codeStyle/arrangement/model/ArrangementSettingsNodeVisitor.java | e217ea55bea612b57b7b488e45d875f35a5201ab | [
"Apache-2.0"
] | permissive | bolinfest/intellij-community | a39664fc138def4db31fdadf658edca2dea40ad7 | c700754a823a50af192fce509e5cb51ffcccbd61 | refs/heads/master | 2020-12-25T17:05:46.117944 | 2012-08-13T14:37:12 | 2012-08-13T15:55:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 932 | java | /*
* Copyright 2000-2012 JetBrains s.r.o.
*
* 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.intellij.psi.codeStyle.arrangement.model;
import org.jetbrains.annotations.NotNull;
/**
* @author Denis Zhdanov
* @since 8/8/12 1:20 PM
*/
public interface ArrangementSettingsNodeVisitor {
void visit(@NotNull ArrangementSettingsAtomNode node);
void visit(@NotNull ArrangementSettingsCompositeNode node);
}
| [
"Denis.Zhdanov@jetbrains.com"
] | Denis.Zhdanov@jetbrains.com |
6c2fd91fad9055f68303fd0877c6c4760ddbdd37 | b68a7a188a3c209aede324dd079f77b4d6a357f2 | /org.xworker.plugin/src/org/xworker/plugin/actions/ThingFlowAction.java | e6ee332e777f3c720d3edba1a3d0a2815e7f25e9 | [] | no_license | x-meta/xworker_eclipse_plugin | dcbc2673cd1c69a153e828da4474e67a3f35a015 | 884e51002490a366ef05003ee3f9435ee7fe3b8b | refs/heads/master | 2020-08-27T16:57:32.510836 | 2019-10-25T03:34:16 | 2019-10-25T03:34:16 | 217,439,021 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,716 | java | package org.xworker.plugin.actions;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.IWorkbenchWindowActionDelegate;
import org.xmeta.Thing;
import org.xmeta.World;
import org.xworker.plugin.Activator;
public class ThingFlowAction implements IWorkbenchWindowActionDelegate {
Shell shell = null;
@Override
public void dispose() {
}
@Override
public void init(IWorkbenchWindow window) {
shell = window.getShell();
//ExplorerContext必须有shell变量,以便打开事物等时使用
//
if(Activator.explorerActionContext.get("shell") == null){
Activator.explorerActionContext.getScope(0).put("shell", shell);
}
}
@Override
public void run(IAction action) {
if(Activator.explorerActionContext.get("shell") == null){
return;
}
World world = World.getInstance();
Thing scriptThing = world.getThing("xworker.ide.worldExplorer.eclipse.Scripts");
Map<String, Object> context = new HashMap<String, Object>();
Thing thingFlowComposite = world.getThing("xworker.ide.worldExplorer.swt.flows.ThingFlowManager/@shell/@mainComposite");
context.put("compositeThing", thingFlowComposite);
context.put("title", thingFlowComposite.getMetadata().getLabel());
context.put("path", thingFlowComposite.getMetadata().getPath());
scriptThing.doAction("openThingComposite", Activator.explorerActionContext, context);
}
@Override
public void selectionChanged(IAction action, ISelection selection) {
}
}
| [
"zhangyuxiang@tom.com"
] | zhangyuxiang@tom.com |
192236a70164445c44946bd681d5218c99f2057b | 308297e6347afc16baa6aec4bb2b7294d8a5b4b7 | /java/com/dbzwcg/model/match/phase/combat/CombatPhase.java | 689113227bd3434117637a38809407ec89654066 | [] | no_license | csiqueirasilva/dbzccg | 2ad545c463e7d2437d209e68ae1bf44d6a562458 | d28bd968a3133ba5afb182bc434f0c866594aa6b | refs/heads/master | 2020-12-24T16:07:53.452040 | 2014-10-13T10:15:58 | 2014-10-13T10:15:58 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,877 | java | /*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.dbzwcg.model.match.phase.combat;
import com.dbzwcg.model.match.phase.Phase;
import com.dbzwcg.model.match.phase.combat.internal.InternalCombatPhase;
import com.dbzwcg.model.match.players.MatchPlayer;
import com.dbzwcg.types.PhaseType;
import java.util.List;
import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.PrimaryKeyJoinColumn;
import javax.persistence.Table;
/**
*
* @author csiqueira
*/
@PrimaryKeyJoinColumn
@Entity
@Table
public class CombatPhase extends Phase {
@OneToMany(cascade = CascadeType.ALL, orphanRemoval = true)
private List<InternalCombatPhase> phases;
@JoinColumn
@OneToOne( optional = false, cascade = CascadeType.ALL)
private MatchPlayer declaringPlayer;
@JoinColumn
@OneToOne( optional = false, cascade = CascadeType.ALL)
private MatchPlayer declaredPlayer;
public CombatPhase() {
super.type = PhaseType.COMBAT;
}
public List<InternalCombatPhase> getPhases() {
return phases;
}
public void setPhases(List<InternalCombatPhase> phases) {
this.phases = phases;
}
public MatchPlayer getDeclaringPlayer() {
return declaringPlayer;
}
public void setDeclaringPlayer(MatchPlayer declaringPlayer) {
this.declaringPlayer = declaringPlayer;
}
public MatchPlayer getDeclaredPlayer() {
return declaredPlayer;
}
public void setDeclaredPlayer(MatchPlayer declaredPlayer) {
this.declaredPlayer = declaredPlayer;
}
@Override
public String getName() {
return "COMBAT PHASE";
}
}
| [
"csiqueirasilva@gmail.com"
] | csiqueirasilva@gmail.com |
ba86d41d41b1308ca8bf32739307ea9da453a6c7 | fc48d88dac0740b2d30e3125c97b42103103872f | /src/main/java/grondag/canvas/buffer/packing/BufferPacker.java | 9cd3c71ae681bc4d2b83250216c8b4c70428205d | [
"Apache-2.0"
] | permissive | Dobby233Liu/canvas | b543c652e6cc4cd07416033057bb5af46f5c12d4 | 11f3bd588ba8445505dd59b7e244b31cf6c102ee | refs/heads/master | 2021-05-22T14:14:47.056742 | 2020-04-04T10:06:48 | 2020-04-04T10:06:48 | 252,958,870 | 0 | 0 | Apache-2.0 | 2020-04-22T08:40:07 | 2020-04-04T09:41:13 | Java | UTF-8 | Java | false | false | 2,760 | java | /*******************************************************************************
* Copyright 2019 grondag
*
* 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 grondag.canvas.buffer.packing;
import java.nio.IntBuffer;
import it.unimi.dsi.fastutil.objects.ObjectArrayList;
import grondag.canvas.buffer.allocation.AllocationProvider;
import grondag.canvas.draw.DelegateLists;
import grondag.canvas.draw.DrawableDelegate;
import grondag.canvas.material.MaterialState;
import grondag.canvas.material.MaterialVertexFormat;
public class BufferPacker {
private static final ThreadLocal<BufferPacker> THREADLOCAL = ThreadLocal.withInitial(BufferPacker::new);
ObjectArrayList<DrawableDelegate> delegates;
VertexCollectorList collectorList;
AllocationProvider allocator;
private BufferPacker() {
//private
}
/** Does not retain packing list reference */
public static ObjectArrayList<DrawableDelegate> pack(BufferPackingList packingList, VertexCollectorList collectorList, AllocationProvider allocator) {
final BufferPacker packer = THREADLOCAL.get();
final ObjectArrayList<DrawableDelegate> result = DelegateLists.getReadyDelegateList();
packer.delegates = result;
packer.collectorList = collectorList;
packer.allocator = allocator;
packingList.forEach(packer);
packer.delegates = null;
packer.collectorList = null;
packer.allocator = null;
return result;
}
public void accept(MaterialState materialState, int vertexStart, int vertexCount) {
final VertexCollector collector = collectorList.get(materialState);
final MaterialVertexFormat format = collector.format();
final int stride = format.vertexStrideBytes;
allocator.claimAllocation(vertexCount * stride, ref -> {
final int byteOffset = ref.byteOffset();
final int byteCount = ref.byteCount();
final int intLength = byteCount / 4;
ref.buffer().lockForWrite();
final IntBuffer intBuffer = ref.intBuffer();
intBuffer.position(byteOffset / 4);
intBuffer.put(collector.rawData(), vertexStart * stride / 4, intLength);
ref.buffer().unlockForWrite();
delegates.add(DrawableDelegate.claim(ref, materialState, byteCount / stride, format));
});
}
}
| [
"grondag@gmail.com"
] | grondag@gmail.com |
c06b08e080633c1c337c7128eb7010214133850a | 56cf34c40c5048b7b5f9a257288bba1c34b1d5e2 | /src/org/xpup/hafmis/sysloan/specialbiz/bailenrol/action/BailenRolTaSaveAC.java | dcf67971ca3ee8d3d6f02e44d6d76b2160144fd8 | [] | no_license | witnesslq/zhengxin | 0a62d951dc69d8d6b1b8bcdca883ee11531fbb83 | 0ea9ad67aa917bd1911c917334b6b5f9ebfd563a | refs/heads/master | 2020-12-30T11:16:04.359466 | 2012-06-27T13:43:40 | 2012-06-27T13:43:40 | null | 0 | 0 | null | null | null | null | GB18030 | Java | false | false | 4,055 | java | package org.xpup.hafmis.sysloan.specialbiz.bailenrol.action;
import java.math.BigDecimal;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;
import org.apache.struts.action.ActionMessages;
import org.xpup.common.exception.BusinessException;
import org.xpup.common.util.BSUtils;
import org.xpup.hafmis.orgstrct.dto.SecurityInfo;
import org.xpup.hafmis.sysloan.specialbiz.bailenrol.bsinterface.IBailenRolBS;
import org.xpup.hafmis.sysloan.specialbiz.bailenrol.dto.BailenRolTaDTO;
import org.xpup.hafmis.sysloan.specialbiz.bailenrol.dto.BailenRolTaPrintDTO;
import org.xpup.hafmis.sysloan.specialbiz.bailenrol.form.BailenRolTaAF;
/**
* @author 王野 2007-10-02
*/
public class BailenRolTaSaveAC extends Action {
public ActionForward execute(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) {
ActionMessages messages = null;
BailenRolTaPrintDTO bailenRolTaPrintDTO = new BailenRolTaPrintDTO();
BailenRolTaDTO bailenRolTaDTO = new BailenRolTaDTO();
BailenRolTaAF bailenRolTaAF = (BailenRolTaAF) form;
IBailenRolBS bailenRolBS = (IBailenRolBS) BSUtils.getBusinessService(
"bailenRolBS", this, mapping.getModuleConfig());
try {
messages = new ActionMessages();
if (!isTokenValid(request)) {
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(
"请不要重复提交!", false));
saveErrors(request, messages);
} else {
resetToken(request);
SecurityInfo securityInfo = (SecurityInfo) request.getSession()
.getAttribute("SecurityInfo");
String contractId = bailenRolTaAF.getContractId().trim();
String borrowerName = bailenRolTaAF.getBorrowerName().trim();
String cardKind = bailenRolTaAF.getCardKind().trim();
String cardNum = bailenRolTaAF.getCardNum().trim();
String loanBankName = bailenRolTaAF.getLoanBankName().trim();// 从页面获取的收款银行ID
String loanBankId = bailenRolTaAF.getLoanBankId().trim();// 从页面获取的收款银行ID 2007-11-12修改
String loanKouAcc = bailenRolTaAF.getLoanKouAcc().trim();
String loanKouAccHidden = bailenRolTaAF.getLoanKouAccHidden().trim();// 从页面隐藏域获取的贷款账号 2007-11-12修改
String bizDate = bailenRolTaAF.getBizDate().trim();
String occurMoney = bailenRolTaAF.getOccurMoney().toString();// 保证金金额
// form to dto
bailenRolTaDTO.setContractId(contractId);
bailenRolTaDTO.setBorrowerName(borrowerName);
bailenRolTaDTO.setCardKind(cardKind);
bailenRolTaDTO.setCardNum(cardNum);
bailenRolTaDTO.setLoanBankName(loanBankName);
bailenRolTaDTO.setLoanBankId(loanBankId);// 2007-11-12修改
bailenRolTaDTO.setLoanKouAcc(loanKouAcc);
bailenRolTaDTO.setLoanKouAccHidden(loanKouAccHidden);// 2007-11-12修改
bailenRolTaDTO.setBizDate(bizDate);
bailenRolTaDTO.setOccurMoney(new BigDecimal(occurMoney));
// 添加保证金登记信息,并返回PL202头表ID
bailenRolTaPrintDTO = bailenRolBS.saveBailenRol(bailenRolTaDTO, securityInfo);
bailenRolTaAF.reset(mapping, request);
request.setAttribute("printInfo", "print");
}
} catch (BusinessException bex) {
messages = new ActionMessages();
messages.add(ActionMessages.GLOBAL_MESSAGE, new ActionMessage(bex
.getMessage(), false));
saveErrors(request, messages);
} catch (Exception e) {
e.printStackTrace();
}
request.getSession().setAttribute("bailenRolTaPrintDTO", bailenRolTaPrintDTO);
return mapping.findForward("bailenRolTaShowAC");
}
}
| [
"yuelaotou@gmail.com"
] | yuelaotou@gmail.com |
fad2f55ff593d6226364dad4093532cb806c50b4 | c7abbf8d3b9981cf371bc0189402639303cfc43c | /src/test/java/ordering/old/FindProductsByPrice.java | d60fae6406815125623fef82255e40ef1abdab2f | [] | no_license | alpakhatri/product-hierarchy | feb647e67c4202f1ab8fc29ec3cca3162871f1da | ceeff275872dc56c1b238042b054e88a989285b4 | refs/heads/master | 2021-08-24T02:45:36.528748 | 2017-12-07T18:24:12 | 2017-12-07T18:24:12 | 112,466,100 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,371 | java | package ordering.old;
//package ordering;
//
//import java.io.FileReader;
//import java.io.IOException;
//import java.io.Reader;
//import java.util.ArrayList;
//import java.util.List;
//import java.util.stream.Collectors;
//import java.util.stream.Stream;
//
//import org.junit.Assert;
//import org.tesco.boss.ordering.dto.Category;
//import org.tesco.boss.ordering.dto.MenuItem;
//import org.tesco.boss.ordering.dto.Product;
//import org.tesco.boss.ordering.utils.ProductPriceComparator;
//import org.tesco.boss.ordering.utils.ProductTree;
//
//import com.google.gson.Gson;
//
//import cucumber.api.java.en.Given;
//import cucumber.api.java.en.Then;
//import cucumber.api.java.en.When;
//
//public class FindProductsByPrice {
//
// MenuItem menuItem =null;
// Product productToBeSearched = null;
//
// Category availableCategoryForSearch = null;
// ProductTree tree = new ProductTree() ;
// List<Product> productsFound = new ArrayList<>();
//
// Product productNotToBeFound = null;
//
//
// @Given("A price and a category")
// public void givenProductAndCategory(){
// Gson gson = new Gson();
// try (Reader reader = new FileReader("/workspace/tesco/product-hierarchy/src/test/resources/data.json")) {
// menuItem = gson.fromJson(reader, MenuItem.class);
// } catch (IOException e) {
// System.out.println(e.getMessage());
// }
// availableCategoryForSearch = new Category("Fresh Food");
// productToBeSearched = new Product(null,30.0);
// tree.setComparator(new ProductPriceComparator());
//
// }
//
// @When("I search for price in that category")
// public void searchProduct(){
// Stream<Category> categories = menuItem.getCategories().stream().filter(category -> category.getName().equals(availableCategoryForSearch.getName()));
// categories.forEach(category ->
// {
// List<Product> products = category.getSubcategories().stream().map(subCat -> subCat.getProducts()).flatMap(product -> product.stream()).collect(Collectors.toList());
// products.forEach(product -> tree.insert(product));
// });
// tree.inOrderTraversal();
// productsFound = tree.searchByPrice(tree.getRoot(),productToBeSearched,productsFound);
//
// }
//
// @Then("I get all the products with same price")
// public void getProductPrice(){
//
// Assert.assertTrue(!productsFound.isEmpty());
// Assert.assertEquals(1,productsFound.size());
// }
//}
| [
"you@example.com"
] | you@example.com |
f7ff734376851693a70e258cfc431de4db61b93b | ac7c1a8c3d1e812da141970804ed86b5c5abacea | /Toy Language Interpreter JavaFx/Assignment8/src/Model/Statement/WhileStatement.java | e051928f5e3f2f46a556b7c1c514d3c36bae9902 | [] | no_license | Boress23/Advanced-Methods-of-Programming | fe111e5f09090b166ccfb40a1a68cfeeec9d1fb9 | faf67373dcbc926a180122a7e06a88544ef03a29 | refs/heads/master | 2022-01-07T06:47:23.764189 | 2022-01-02T17:08:13 | 2022-01-02T17:08:13 | 415,936,974 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,679 | java | package Model.Statement;
import Collection.Dictionary.MyIDictionary;
import Collection.Stack.MyIStack;
import Collection.Stack.MyStack;
import Model.Exceptions.ToyLanguageInterpreterException;
import Model.Expression.Expression;
import Model.ProgramState;
import java.io.FileNotFoundException;
public class WhileStatement implements IStatement {
private Expression expression;
private IStatement statement;
public WhileStatement(Expression expression, IStatement statement){
this.expression = expression;
this.statement = statement;
}
public Expression getExpression() {
return expression;
}
public void setExpression(Expression expression) {
this.expression = expression;
}
public IStatement getStatement() {
return statement;
}
public void setStatement(IStatement statement) {
this.statement = statement;
}
@Override
public String toString() {
return "while( " + expression.toString() + ") { " + statement.toString() + " }";
}
@Override
public ProgramState execute(ProgramState state) throws Exception {
MyIDictionary<String, Integer> symbolTable = state.getSymbolTable();
MyIDictionary<Integer, Integer> heapTable = state.getHeap();
Integer expressionResult;
expressionResult = expression.evaluate(symbolTable, heapTable);
if(!expressionResult. equals(0)){
MyIStack<IStatement> stack = state.getExecutionStack();
stack.push(this);
state.setExecutionStack((MyStack<IStatement>) stack);
statement.execute(state);
}
return null;
}
}
| [
"todorananacorina13@gmail.com"
] | todorananacorina13@gmail.com |
6bd1379587247ece5afdad680eec0e239d2a5ae8 | 37d24d0734e6b7a2157c29b9103701ad3f217604 | /src/main/java/com/example/springhumo/constant/ReconciliationStatus.java | c115f3f6bcf1ac491b58491255eca36e1f85df82 | [] | no_license | ABDUVOHID771/humo | d5b494fdd4ee27064c796bd8380e4cd153f04cd1 | 2959b4622175f500903019eb2a5b390daaef2da4 | refs/heads/master | 2022-12-19T07:28:45.678184 | 2020-09-29T08:31:48 | 2020-09-29T08:31:48 | 299,552,740 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 162 | java | package com.example.springhumo.constant;
public enum ReconciliationStatus {
CREATED,
CONFIRMED,
ERROR;
private ReconciliationStatus() {
}
}
| [
"aristakrat31@gmail.com"
] | aristakrat31@gmail.com |
7f6787a54d5dc373725e0f982bcca4a2f73f3a30 | 61602d4b976db2084059453edeafe63865f96ec5 | /com/alipay/android/phone/mrpc/core/l.java | a8f23db22a6ef2a1f83f44550e38ad9b2e75592d | [] | no_license | ZoranLi/thunder | 9d18fd0a0ec0a5bb3b3f920f9413c1ace2beb4d0 | 0778679ef03ba1103b1d9d9a626c8449b19be14b | refs/heads/master | 2020-03-20T23:29:27.131636 | 2018-06-19T06:43:26 | 2018-06-19T06:43:26 | 137,848,886 | 12 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,974 | java | package com.alipay.android.phone.mrpc.core;
import android.content.Context;
import anet.channel.strategy.dispatch.DispatchConstants;
import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ThreadPoolExecutor;
import java.util.concurrent.ThreadPoolExecutor.CallerRunsPolicy;
import java.util.concurrent.TimeUnit;
public final class l implements ab {
private static l b;
private static final ThreadFactory i = new n();
Context a;
private ThreadPoolExecutor c = new ThreadPoolExecutor(10, 11, 3, TimeUnit.SECONDS, new ArrayBlockingQueue(20), i, new CallerRunsPolicy());
private b d = b.a(DispatchConstants.ANDROID);
private long e;
private long f;
private long g;
private int h;
private l(android.content.Context r10) {
/* JADX: method processing error */
/*
Error: java.lang.NullPointerException
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.searchTryCatchDominators(ProcessTryCatchRegions.java:75)
at jadx.core.dex.visitors.regions.ProcessTryCatchRegions.process(ProcessTryCatchRegions.java:45)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.postProcessRegions(RegionMakerVisitor.java:63)
at jadx.core.dex.visitors.regions.RegionMakerVisitor.visit(RegionMakerVisitor.java:58)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:31)
at jadx.core.dex.visitors.DepthTraversal.visit(DepthTraversal.java:17)
at jadx.core.ProcessClass.process(ProcessClass.java:37)
at jadx.core.ProcessClass.processDependencies(ProcessClass.java:59)
at jadx.core.ProcessClass.process(ProcessClass.java:42)
at jadx.api.JadxDecompiler.processClass(JadxDecompiler.java:306)
at jadx.api.JavaClass.decompile(JavaClass.java:62)
*/
/*
r9 = this;
r9.<init>();
r9.a = r10;
r10 = "android";
r10 = com.alipay.android.phone.mrpc.core.b.a(r10);
r9.d = r10;
r10 = new java.util.concurrent.ThreadPoolExecutor;
r5 = java.util.concurrent.TimeUnit.SECONDS;
r6 = new java.util.concurrent.ArrayBlockingQueue;
r0 = 20;
r6.<init>(r0);
r7 = i;
r8 = new java.util.concurrent.ThreadPoolExecutor$CallerRunsPolicy;
r8.<init>();
r1 = 10;
r2 = 11;
r3 = 3;
r0 = r10;
r0.<init>(r1, r2, r3, r5, r6, r7, r8);
r9.c = r10;
r10 = 1;
r0 = r9.c; Catch:{ Exception -> 0x0031 }
r0.allowCoreThreadTimeOut(r10); Catch:{ Exception -> 0x0031 }
L_0x0031:
r0 = r9.a;
android.webkit.CookieSyncManager.createInstance(r0);
r0 = android.webkit.CookieManager.getInstance();
r0.setAcceptCookie(r10);
return;
*/
throw new UnsupportedOperationException("Method not decompiled: com.alipay.android.phone.mrpc.core.l.<init>(android.content.Context):void");
}
public static final l a(Context context) {
return b != null ? b : b(context);
}
private static final synchronized l b(Context context) {
synchronized (l.class) {
if (b != null) {
l lVar = b;
return lVar;
}
l lVar2 = new l(context);
b = lVar2;
return lVar2;
}
}
public final b a() {
return this.d;
}
public final Future<u> a(t tVar) {
if (s.a(this.a)) {
StringBuilder stringBuilder = new StringBuilder("HttpManager");
stringBuilder.append(hashCode());
stringBuilder.append(": Active Task = %d, Completed Task = %d, All Task = %d,Avarage Speed = %d KB/S, Connetct Time = %d ms, All data size = %d bytes, All enqueueConnect time = %d ms, All socket time = %d ms, All request times = %d times");
String stringBuilder2 = stringBuilder.toString();
Object[] objArr = new Object[9];
objArr[0] = Integer.valueOf(this.c.getActiveCount());
objArr[1] = Long.valueOf(this.c.getCompletedTaskCount());
objArr[2] = Long.valueOf(this.c.getTaskCount());
long j = 0;
objArr[3] = Long.valueOf(this.g == 0 ? 0 : ((this.e * 1000) / this.g) >> 10);
if (this.h != 0) {
j = this.f / ((long) this.h);
}
objArr[4] = Long.valueOf(j);
objArr[5] = Long.valueOf(this.e);
objArr[6] = Long.valueOf(this.f);
objArr[7] = Long.valueOf(this.g);
objArr[8] = Integer.valueOf(this.h);
String.format(stringBuilder2, objArr);
}
Object qVar = new q(this, (o) tVar);
Object mVar = new m(this, qVar, qVar);
this.c.execute(mVar);
return mVar;
}
public final void a(long j) {
this.e += j;
}
public final void b(long j) {
this.f += j;
this.h++;
}
public final void c(long j) {
this.g += j;
}
}
| [
"lizhangliao@xiaohongchun.com"
] | lizhangliao@xiaohongchun.com |
4cc810e8d261f7d2693e861d6c03b4e0b6766970 | 97b46ff38b675d934948ff3731cf1607a1cc0fc9 | /Server/java/pk/elfo/gameserver/model/zone/type/L2NoSummonFriendZone.java | de9d366c3187e75a9876f6cfb2dd62b9253b5d54 | [] | no_license | l2brutal/pk-elfo_H5 | a6703d734111e687ad2f1b2ebae769e071a911a4 | 766fa2a92cb3dcde5da6e68a7f3d41603b9c037e | refs/heads/master | 2020-12-28T13:33:46.142303 | 2016-01-20T09:53:10 | 2016-01-20T09:53:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,530 | java | /*
* Copyright (C) 2004-2013 L2J Server
*
* This file is part of L2J Server.
*
* L2J Server is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* L2J Server 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
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package pk.elfo.gameserver.model.zone.type;
import pk.elfo.gameserver.model.actor.L2Character;
import pk.elfo.gameserver.model.zone.L2ZoneType;
import pk.elfo.gameserver.model.zone.ZoneId;
/**
* A simple no summon zone
* @author JIV
*/
public class L2NoSummonFriendZone extends L2ZoneType
{
public L2NoSummonFriendZone(int id)
{
super(id);
}
@Override
protected void onEnter(L2Character character)
{
character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, true);
}
@Override
protected void onExit(L2Character character)
{
character.setInsideZone(ZoneId.NO_SUMMON_FRIEND, false);
}
@Override
public void onDieInside(L2Character character)
{
}
@Override
public void onReviveInside(L2Character character)
{
}
}
| [
"PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba"
] | PkElfo@13720c4f-9a1f-4619-977f-b36a0ac534ba |
51c933202ba6323bf82c4fb3b2900cb9f00a4172 | e820097c99fb212c1c819945e82bd0370b4f1cf7 | /gwt-sh/src/main/java/com/skynet/spms/manager/stockServiceBusiness/outStockRoomBusiness/PickingListManager.java | d834c159d462002af3f83e04d09ab7850f2bd063 | [] | no_license | jayanttupe/springas-train-example | 7b173ca4298ceef543dc9cf8ae5f5ea365431453 | adc2e0f60ddd85d287995f606b372c3d686c3be7 | refs/heads/master | 2021-01-10T10:37:28.615899 | 2011-12-20T07:47:31 | 2011-12-20T07:47:31 | 36,887,613 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,115 | java | package com.skynet.spms.manager.stockServiceBusiness.outStockRoomBusiness;
import java.util.List;
import java.util.Map;
import com.skynet.spms.manager.CommonManager;import com.skynet.spms.persistence.entity.stockServiceBusiness.outStockRoomBusiness.pickingList.PickingList;
/**
* 配料单信息Manager实现类
* @author HDJ
* @version 1.0
* @date 2011-07-12
*/
public interface PickingListManager extends CommonManager<PickingList>{
/**
* 删除配料单相关信息
* @param number
*/
public void deletePickingList(String number);
/**
* 获取配料单相关信息
* @param values
* @param startRow
* @param endRow
* @return 配料单相关信息
*/
public List<PickingList> getPickingList(Map values, int startRow, int endRow);
/**
* 保存配料单相关信息
* @param pickingList
* @return 配料单相关信息
*/
public PickingList SavePickingList(PickingList pickingList);
/**
* 更新状态
* @param pickingListIDs
* @param status
*/
public void updateStatus(String[] pickingListIDs, String status);
} | [
"usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d"
] | usedtolove@3b6edebd-8678-f8c2-051a-d8e859c3524d |
d00d072d0ef99ac9b0d9b46818a8ab6204803762 | b00c54389a95d81a22e361fa9f8bdf5a2edc93e3 | /frameworks/support/v8/renderscript/java/src/android/support/v8/renderscript/RenderScriptThunker.java | bb6bf7366f27200100e1f3714401dec51089ef4c | [] | no_license | mirek190/x86-android-5.0 | 9d1756fa7ff2f423887aa22694bd737eb634ef23 | eb1029956682072bb7404192a80214189f0dc73b | refs/heads/master | 2020-05-27T01:09:51.830208 | 2015-10-07T22:47:36 | 2015-10-07T22:47:36 | 41,942,802 | 15 | 20 | null | 2020-03-09T00:21:03 | 2015-09-05T00:11:19 | null | UTF-8 | Java | false | false | 4,826 | java | /*
* Copyright (C) 2013 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 android.support.v8.renderscript;
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.content.res.AssetManager;
import android.os.Process;
import android.util.Log;
import android.view.Surface;
class RenderScriptThunker extends RenderScript {
android.renderscript.RenderScript mN;
void validate() {
if (mN == null) {
throw new RSInvalidStateException("Calling RS with no Context active.");
}
}
public void setPriority(Priority p) {
try {
if (p == Priority.LOW) mN.setPriority(android.renderscript.RenderScript.Priority.LOW);
if (p == Priority.NORMAL) mN.setPriority(android.renderscript.RenderScript.Priority.NORMAL);
} catch (android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
}
}
RenderScriptThunker(Context ctx) {
super(ctx);
isNative = true;
}
public static RenderScript create(Context ctx, int sdkVersion) {
try {
RenderScriptThunker rs = new RenderScriptThunker(ctx);
Class<?> javaRS = Class.forName("android.renderscript.RenderScript");
Class[] signature = {Context.class, Integer.TYPE};
Object[] args = {ctx, new Integer(sdkVersion)};
Method create = javaRS.getDeclaredMethod("create", signature);
rs.mN = (android.renderscript.RenderScript)create.invoke(null, args);
return rs;
}
catch(android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
} catch (Exception e) {
throw new RSRuntimeException("Failure to create platform RenderScript context");
}
}
public void contextDump() {
try {
mN.contextDump();
} catch (android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
}
}
public void finish() {
try {
mN.finish();
} catch (android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
}
}
public void destroy() {
try {
mN.destroy();
mN = null;
} catch (android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
}
}
public void setMessageHandler(RSMessageHandler msg) {
mMessageCallback = msg;
try {
android.renderscript.RenderScript.RSMessageHandler handler =
new android.renderscript.RenderScript.RSMessageHandler() {
public void run() {
mMessageCallback.mData = mData;
mMessageCallback.mID = mID;
mMessageCallback.mLength = mLength;
mMessageCallback.run();
}
};
mN.setMessageHandler(handler);
} catch (android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
}
}
public void setErrorHandler(RSErrorHandler msg) {
mErrorCallback = msg;
try {
android.renderscript.RenderScript.RSErrorHandler handler =
new android.renderscript.RenderScript.RSErrorHandler() {
public void run() {
mErrorCallback.mErrorMessage = mErrorMessage;
mErrorCallback.mErrorNum = mErrorNum;
mErrorCallback.run();
}
};
mN.setErrorHandler(handler);
} catch (android.renderscript.RSRuntimeException e) {
throw ExceptionThunker.convertException(e);
}
}
boolean equals(Object obj1, Object obj2) {
if (obj2 instanceof android.support.v8.renderscript.BaseObj) {
return ((android.renderscript.BaseObj)obj1).equals(((android.support.v8.renderscript.BaseObj)obj2).getNObj());
}
return false;
}
}
| [
"mirek190@gmail.com"
] | mirek190@gmail.com |
1b4ffdcd90a2054683ecc73c59bffcbebcd022e4 | 6ae307399ef9cf162620acc59ca0c76ab6c06d2a | /forge/mcp/temp/src/minecraft/net/minecraft/command/CommandWeather.java | b121db0ceeb6ce3b8513fd229b09667c593be068 | [
"BSD-3-Clause"
] | permissive | SuperStarGamesNetwork/IronManMod | b153ee5024066bf1ea74d7e2fc88848044801b30 | 6ae7ae4bb570e95a28048b991dec9e126da3d5e3 | refs/heads/master | 2021-01-16T18:29:24.771631 | 2014-08-08T14:08:52 | 2014-08-08T14:08:52 | 15,351,078 | 1 | 0 | null | 2013-12-21T04:20:44 | 2013-12-21T00:00:10 | Java | UTF-8 | Java | false | false | 2,280 | java | package net.minecraft.command;
import java.util.List;
import java.util.Random;
import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.server.MinecraftServer;
import net.minecraft.world.WorldServer;
import net.minecraft.world.storage.WorldInfo;
public class CommandWeather extends CommandBase {
public String func_71517_b() {
return "weather";
}
public int func_82362_a() {
return 2;
}
public String func_71518_a(ICommandSender p_71518_1_) {
return "commands.weather.usage";
}
public void func_71515_b(ICommandSender p_71515_1_, String[] p_71515_2_) {
if(p_71515_2_.length >= 1 && p_71515_2_.length <= 2) {
int var3 = (300 + (new Random()).nextInt(600)) * 20;
if(p_71515_2_.length >= 2) {
var3 = func_71532_a(p_71515_1_, p_71515_2_[1], 1, 1000000) * 20;
}
WorldServer var4 = MinecraftServer.func_71276_C().field_71305_c[0];
WorldInfo var5 = var4.func_72912_H();
var5.func_76080_g(var3);
var5.func_76090_f(var3);
if("clear".equalsIgnoreCase(p_71515_2_[0])) {
var5.func_76084_b(false);
var5.func_76069_a(false);
func_71522_a(p_71515_1_, "commands.weather.clear", new Object[0]);
} else if("rain".equalsIgnoreCase(p_71515_2_[0])) {
var5.func_76084_b(true);
var5.func_76069_a(false);
func_71522_a(p_71515_1_, "commands.weather.rain", new Object[0]);
} else {
if(!"thunder".equalsIgnoreCase(p_71515_2_[0])) {
throw new WrongUsageException("commands.weather.usage", new Object[0]);
}
var5.func_76084_b(true);
var5.func_76069_a(true);
func_71522_a(p_71515_1_, "commands.weather.thunder", new Object[0]);
}
} else {
throw new WrongUsageException("commands.weather.usage", new Object[0]);
}
}
public List func_71516_a(ICommandSender p_71516_1_, String[] p_71516_2_) {
return p_71516_2_.length == 1?func_71530_a(p_71516_2_, new String[]{"clear", "rain", "thunder"}):null;
}
}
| [
"Perry@Perrys-Mac-Pro.local"
] | Perry@Perrys-Mac-Pro.local |
aac590dca1b6ad09b73410aa674b666c0992d61b | be73270af6be0a811bca4f1710dc6a038e4a8fd2 | /crash-reproduction-moho/results/MATH-85b-3-3-NSGA_II-WeightedSum:TestLen:CallDiversity/org/apache/commons/math/distribution/AbstractContinuousDistribution_ESTest.java | 2bb61779b2cc50c9d5dfcdb4bffc4851512563c9 | [] | no_license | STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application | cf118b23ecb87a8bf59643e42f7556b521d1f754 | 3bb39683f9c343b8ec94890a00b8f260d158dfe3 | refs/heads/master | 2022-07-29T14:44:00.774547 | 2020-08-10T15:14:49 | 2020-08-10T15:14:49 | 285,804,495 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 603 | java | /*
* This file was automatically generated by EvoSuite
* Thu Apr 02 05:04:55 UTC 2020
*/
package org.apache.commons.math.distribution;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class AbstractContinuousDistribution_ESTest extends AbstractContinuousDistribution_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
5d6b3d87e4f25ff81b104c00322c2df5401b272c | 827bf064e482700d7ded2cd0a3147cb9657db883 | /source_NewVersion/src/com/google/gson/internal/bind/TypeAdapters$16.java | cf38d3e6015617681d5456c3958b330bd43f533c | [] | no_license | cody0117/LearnAndroid | d30b743029f26568ccc6dda4313a9d3b70224bb6 | 02fd4d2829a0af8a1706507af4b626783524813e | refs/heads/master | 2021-01-21T21:10:18.553646 | 2017-02-12T08:43:24 | 2017-02-12T08:43:24 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,519 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.google.gson.internal.bind;
import com.google.gson.JsonIOException;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import java.net.URI;
import java.net.URISyntaxException;
// Referenced classes of package com.google.gson.internal.bind:
// TypeAdapter
class extends TypeAdapter
{
public volatile Object read(JsonReader jsonreader)
{
return read(jsonreader);
}
public URI read(JsonReader jsonreader)
{
if (jsonreader.peek() != JsonToken.NULL) goto _L2; else goto _L1
_L1:
jsonreader.nextNull();
_L4:
return null;
_L2:
String s = jsonreader.nextString();
if ("null".equals(s)) goto _L4; else goto _L3
_L3:
URI uri = new URI(s);
return uri;
URISyntaxException urisyntaxexception;
urisyntaxexception;
throw new JsonIOException(urisyntaxexception);
}
public volatile void write(JsonWriter jsonwriter, Object obj)
{
write(jsonwriter, (URI)obj);
}
public void write(JsonWriter jsonwriter, URI uri)
{
String s;
if (uri == null)
{
s = null;
} else
{
s = uri.toASCIIString();
}
jsonwriter.value(s);
}
()
{
}
}
| [
"em3888@gmail.com"
] | em3888@gmail.com |
83ef13810934851949187372414d10c25216933d | 3bc271314b8e7479c804da7073b539d247600428 | /src/main/java/bnfc/abs/Absyn/NormalFunBody.java | 5e8a89bda1e5444e035d4edc69be1ce205a8f3ad | [
"Apache-2.0"
] | permissive | peteryhwong/jabsc | 2c099d8260afde3a40979a9b912c4e324bae857b | e01e86cdefaebd4337332b157374fced8b537e00 | refs/heads/master | 2020-04-07T23:46:42.357421 | 2016-04-10T21:30:30 | 2016-04-10T21:30:30 | 40,371,728 | 0 | 0 | null | 2015-08-07T17:10:47 | 2015-08-07T17:10:47 | null | UTF-8 | Java | false | false | 671 | java | package bnfc.abs.Absyn; // Java Package generated by the BNF Converter.
public class NormalFunBody extends FunBody {
public final PureExp pureexp_;
public NormalFunBody(PureExp p1) { pureexp_ = p1; }
public <R,A> R accept(bnfc.abs.Absyn.FunBody.Visitor<R,A> v, A arg) { return v.visit(this, arg); }
public boolean equals(Object o) {
if (this == o) return true;
if (o instanceof bnfc.abs.Absyn.NormalFunBody) {
bnfc.abs.Absyn.NormalFunBody x = (bnfc.abs.Absyn.NormalFunBody)o;
return this.pureexp_.equals(x.pureexp_);
}
return false;
}
public int hashCode() {
return this.pureexp_.hashCode();
}
}
| [
"serbanescu.vlad.nicolae@gmail.com"
] | serbanescu.vlad.nicolae@gmail.com |
99bd252afe5650445950ff1a399e2d6f88e717dc | 183e4126b2fdb9c4276a504ff3ace42f4fbcdb16 | /II семестр/Об'єктно орієнтоване програмування/Мазан/Лабораторна №5/src/Vegetable.java | 2d14c68d2fd9c045fd3147cf75eea800a3c07301 | [] | no_license | Computer-engineering-FICT/Computer-engineering-FICT | ab625e2ca421af8bcaff74f0d37ac1f7d363f203 | 80b64b43d2254e15338060aa4a6d946e8bd43424 | refs/heads/master | 2023-08-10T08:02:34.873229 | 2019-06-22T22:06:19 | 2019-06-22T22:06:19 | 193,206,403 | 3 | 0 | null | 2023-07-22T09:01:05 | 2019-06-22T07:41:22 | HTML | UTF-8 | Java | false | false | 585 | java | public class Vegetable extends Salad {
public String name = "";
public int nutrition = 0;
public Vegetable(String name, int calories_value) {
try {
this.name = name;
this.nutrition = calories_value;
}
catch (Exception exc) {
System.out.println("Ви ввели неправильні дані для описання овоча");
}
}
@Override
public void print() {
System.out.printf("%10s; %20d кал\n", name, nutrition);
}
public void find_by_nutrition() {
}
}
| [
"mazanyan027@gmail.com"
] | mazanyan027@gmail.com |
7183bfacd0125c854257e64c956c47a369b80fc2 | 028cbe18b4e5c347f664c592cbc7f56729b74060 | /external/modules/msv/tahiti/src/com/sun/tahiti/grammar/InterfaceItem.java | 657ec31a37d52b3e0e5f765a57e1861a657ff7f7 | [] | no_license | dmatej/Glassfish-SVN-Patched | 8d355ff753b23a9a1bd9d7475fa4b2cfd3b40f9e | 269e29ba90db6d9c38271f7acd2affcacf2416f1 | refs/heads/master | 2021-05-28T12:55:06.267463 | 2014-11-11T04:21:44 | 2014-11-11T04:21:44 | 23,610,469 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 782 | java | /*
* @(#)$Id: InterfaceItem.java 923 2001-07-20 20:45:03Z Bear $
*
* Copyright 2001 Sun Microsystems, Inc. All Rights Reserved.
*
* This software is the proprietary information of Sun Microsystems, Inc.
* Use is subject to license terms.
*
*/
package com.sun.tahiti.grammar;
import com.sun.msv.grammar.Expression;
/**
* represents a generated interface.
*
* @author
* <a href="mailto:kohsuke.kawaguchi@sun.com">Kohsuke KAWAGUCHI</a>
*/
public class InterfaceItem extends TypeItem {
protected InterfaceItem( String name, Expression body ) {
super(name);
this.exp = body;
}
public Type getSuperType() { return null; } // interfaces do not have the super type.
public Object visitJI( JavaItemVisitor visitor ) {
return visitor.onInterface(this);
}
}
| [
"janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5"
] | janey@6f3ba3e3-413c-0410-a8aa-90bee3ab43b5 |
b0cce1dad693cba8f25cae80bdda4d7467f28b3a | e4088d9fa5611c4111699bf483b6b87ae2395745 | /tnblibrary/src/main/java/com/example/sifiso/tnblibrary/MainActivity.java | 110c786e1458fa8d9408589f1856a39514b21b1d | [] | no_license | manqoba1/TNBAppSuites | 4060900d32cbd62e34b05f4cd55a2c80a25c51d0 | 2b36dab0501a7552c1c7f791adf431a6fcaf6492 | refs/heads/master | 2016-09-06T06:39:24.865120 | 2015-08-24T17:31:23 | 2015-08-24T17:31:23 | 37,603,708 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,134 | java | package com.example.sifiso.tnblibrary;
import android.support.v7.app.ActionBarActivity;
import android.os.Bundle;
import android.view.Menu;
import android.view.MenuItem;
public class MainActivity extends ActionBarActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main_pager);
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
// Inflate the menu; this adds items to the action bar if it is present.
getMenuInflater().inflate(R.menu.menu_main, menu);
return true;
}
@Override
public boolean onOptionsItemSelected(MenuItem item) {
// Handle action bar item clicks here. The action bar will
// automatically handle clicks on the Home/Up button, so long
// as you specify a parent activity in AndroidManifest.xml.
int id = item.getItemId();
//noinspection SimplifiableIfStatement
if (id == R.id.action_settings) {
return true;
}
return super.onOptionsItemSelected(item);
}
}
| [
"snpeace.sifiso@gmail.com"
] | snpeace.sifiso@gmail.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.