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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
929cb2b99f4773a65105cb0f1257c5237e35cf9c | 8037278735b7daade0b8f13ca1dc731aff629327 | /src/main/java/cn/ximcloud/itsource/before/day20_thread_2/_13Timer/TestTimer.java | 677b7cd82f8fae971a074de5d24ad3f1d109a027 | [] | no_license | usami-muzugi/itsource | 1cc0cd07bc9b1a4e771a886df8ad04790970b318 | 2cd92335a8ed86d5831da72c431bbf9222edf424 | refs/heads/master | 2020-03-22T13:13:31.215302 | 2018-09-22T15:30:07 | 2018-09-22T15:30:07 | 140,092,256 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 918 | java | package cn.ximcloud.itsource.before.day20_thread_2._13Timer;
import java.util.Timer;
public class TestTimer {
/*
* 定时任务:
* java.util.TimerTask由 Timer 安排为一次执行或重复执行的任务。
* Timer 一种工具,线程用其安排以后在后台线程中执行的任务
*
* Timer() 创建一个新计时器。
*
* */
public static void main(String[] args) {
Timer timer = new Timer();
//void schedule(TimerTask task, long delay) 安排在指定延迟后执行指定的任务。
MyTimerTask mtt = new MyTimerTask();
//timer.schedule(mtt, 3000);
// void schedule(TimerTask task, Date time)安排在指定的时间执行指定的任务。
//timer.schedule(mtt, new Date( System.currentTimeMillis()+5000 ));
MyThread myThread = new MyThread();
//timer.schedule(myThread, 5000);
}
}
| [
"715759898@qq.com"
] | 715759898@qq.com |
90154eced206d9e02f980fa87c4b72d6742d0f4e | ba75b7f7c5b649a852c5fd4726a52f10b2710cdb | /smack-experimental/src/test/java/org/jivesoftware/smackx/mam/MamTest.java | 3327f838450a6870c3da4a28c8d7fad018b83e90 | [
"Apache-2.0"
] | permissive | guardianproject/smack-omemo | 49a7c57b190e5f1689f4193fcf7b5a95ecc44bf0 | aa3a2aceb1594d23c333f101046419f067302221 | refs/heads/4.2 | 2021-01-19T04:34:33.933792 | 2017-04-06T03:21:43 | 2017-04-06T03:21:43 | 87,381,774 | 1 | 3 | null | 2017-04-06T03:20:20 | 2017-04-06T03:20:20 | null | UTF-8 | Java | false | false | 1,763 | java | /**
*
* Copyright 2016-2017 Fernando Ramirez
*
* 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.jivesoftware.smackx.mam;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import org.jivesoftware.smack.DummyConnection;
import org.jivesoftware.smack.XMPPConnection;
import org.jivesoftware.smackx.InitExtensions;
import org.jivesoftware.smackx.xdata.packet.DataForm;
import org.junit.Before;
public class MamTest extends InitExtensions {
protected XMPPConnection connection;
protected String queryId;
protected MamManager mamManager;
@Before
public void setup() {
// mock connection
connection = new DummyConnection();
// test query id
queryId = "testid";
// MamManager instance
mamManager = MamManager.getInstanceFor(connection);
}
protected DataForm getNewMamForm() throws NoSuchMethodException, SecurityException, IllegalAccessException,
IllegalArgumentException, InvocationTargetException {
Method methodGetNewMamForm = MamManager.class.getDeclaredMethod("getNewMamForm");
methodGetNewMamForm.setAccessible(true);
return (DataForm) methodGetNewMamForm.invoke(mamManager);
}
}
| [
"flo@geekplace.eu"
] | flo@geekplace.eu |
0ed0d8e883a4815ed23076505ea88c97d270615c | 172a166f71239224567cf23224b66f05e31f991d | /spring-exp/spring-cache-exp/src/test/java/cz/znj/kvr/sw/exp/java/spring/cache/CacheTest.java | 4af0772a957c5d36e03f72858fbaf6c81ae822cf | [
"Apache-2.0"
] | permissive | kvr000/zbynek-java-exp | 0c7f5a043837b63eed59c9bea763e76c2ad4d1dc | 77ab2ab238d4a81f0ed6541c511cb6419fb494a2 | refs/heads/master | 2023-07-19T18:04:07.332557 | 2023-06-11T00:33:41 | 2023-06-11T00:33:41 | 70,768,304 | 6 | 0 | Apache-2.0 | 2023-01-29T21:30:53 | 2016-10-13T04:16:17 | JavaScript | UTF-8 | Java | false | false | 2,344 | java | package cz.znj.kvr.sw.exp.java.spring.cache;
import lombok.Getter;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.cache.CacheManager;
import org.springframework.cache.annotation.Cacheable;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.cache.concurrent.ConcurrentMapCacheManager;
import org.springframework.cache.support.SimpleCacheManager;
import org.springframework.context.annotation.*;
import org.springframework.stereotype.Service;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import javax.cache.annotation.CacheResult;
import javax.inject.Inject;
import java.util.Collections;
import java.util.concurrent.atomic.AtomicLong;
@ContextConfiguration(classes = CacheTest.MainConfig.class)
@RunWith(SpringJUnit4ClassRunner.class)
public class CacheTest
{
@Inject
private TestService testService;
@Test
public void testCache()
{
AtomicLong callCounter = testService.getCallCounter();
Assert.assertEquals(0, callCounter.longValue());
testService.method("Zbynek");
Assert.assertEquals(1, callCounter.longValue());
testService.method("Zbynek");
Assert.assertEquals(1, callCounter.longValue());
testService.method("Zbynek");
testService.method("Zbynek");
testService.method("Zbynek");
testService.method("Zbynek");
testService.method("Zbynek");
testService.method("Zbynek");
Assert.assertEquals(1, callCounter.longValue());
}
public interface TestService
{
public AtomicLong getCallCounter();
String method(String name);
}
@Service
public static class TestServiceImpl implements TestService
{
@Getter
private AtomicLong callCounter = new AtomicLong();
@CacheResult(cacheName = "method")
@Cacheable(cacheNames = "method")
public String method(String name) {
callCounter.incrementAndGet();
return "Hello "+name;
}
}
@Configuration
@EnableCaching
public static class MainConfig
{
@Bean
public CacheManager cacheManager()
{
ConcurrentMapCacheManager cacheManager = new ConcurrentMapCacheManager();
cacheManager.setCacheNames(Collections.singleton("method"));
return cacheManager;
}
@Bean
public TestService testService()
{
return new TestServiceImpl();
}
}
}
| [
"kvr000@gmail.com"
] | kvr000@gmail.com |
37c9906ac04298db1b140727532afbecf8dcacd4 | 3bab9165ac34eea6ad259786b4bc9649bb43e02c | /src/com/bytetube/_05_queue/Main.java | e42542d9f8c29f68cfebb7e32897278f1ccb42bb | [] | no_license | MrDenial/ds-algo | 9b1d09bb46bfffaad2d09cfa527b8e71a32330ef | aa0b966678fe367af7dce903dd12c6198d8f346f | refs/heads/master | 2022-11-07T06:13:15.403315 | 2020-06-23T02:14:29 | 2020-06-23T02:14:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 628 | java | package com.bytetube._05_queue;
public class Main {
public static void main(String[] args) {
// Queue<Integer> queue = new Queue<>();
// for (int i = 0; i < 10; i++) {
// queue.enQueue(i);
// }
//
// while (!queue.isEmpty()){
// Integer deQueue = queue.deQueue();
// System.out.print(deQueue+" ");
// }
DeQueue<Integer> deQueue = new DeQueue<>();
for (int i = 0; i < 10; i++) {
deQueue.enQueueFront(i);
}
while (!deQueue.isEmpty()){
System.out.print(deQueue.deQueueFront()+" ");
}
}
}
| [
"dallucus@gmail.com"
] | dallucus@gmail.com |
9fcce9cf7d20e365f66189d9dfed7a9edf900f9d | afb6300a642ae80ff353a7a61dee14061954c41d | /sphere-models/src/it/java/io/sphere/sdk/client/ApacheClientTest.java | a0b29b4f8a3e80c5c5465d0dec0e8cd7eda9bcdc | [
"Apache-2.0",
"LicenseRef-scancode-warranty-disclaimer"
] | permissive | z0lope0z/sphere-jvm-sdk | 2b5935527114301c934722acea2796f9c4be259c | a741e0b01a2319d057ab3147191a0461e55dc46c | refs/heads/master | 2021-01-17T18:51:28.803314 | 2015-04-28T11:31:47 | 2015-04-28T11:31:47 | 34,769,049 | 1 | 0 | null | 2015-04-29T02:56:50 | 2015-04-29T02:56:49 | null | UTF-8 | Java | false | false | 919 | java | package io.sphere.sdk.client;
import io.sphere.sdk.http.HttpClient;
import io.sphere.sdk.projects.Project;
import io.sphere.sdk.projects.queries.ProjectGet;
import io.sphere.sdk.test.IntegrationTest;
import org.junit.Test;
import static org.fest.assertions.Assertions.assertThat;
public class ApacheClientTest extends IntegrationTest {
@Test
public void itWorks() throws Exception {
final SphereClientConfig config = getSphereConfig();
final HttpClient httpClient = ApacheHttpClientAdapter.of();
final SphereAccessTokenSupplier supplier = SphereAccessTokenSupplier.ofOneTimeFetchingToken(config, httpClient, false);
final SphereClient client = SphereClient.of(config, httpClient, supplier);
final Project project = client.execute(ProjectGet.of()).toCompletableFuture().join();
assertThat(project.getKey()).isEqualTo(getSphereConfig().getProjectKey());
}
}
| [
"michael.schleichardt@commercetools.de"
] | michael.schleichardt@commercetools.de |
b2e66b3be2402f8a1f846170bad76bae406b9385 | fd757a0153a1eea9e22ba15490b811401996d12c | /redisson-hibernate/redisson-hibernate-52/src/main/java/org/redisson/hibernate/region/BaseRegion.java | 488c47efdf47d301661ec45778cb7b93e9a33220 | [
"LicenseRef-scancode-dco-1.1",
"Apache-2.0"
] | permissive | rupertw/redisson | d6bf0dc518aed3d597a4dd61781c84e356e810cf | d805a177546fc14788e731d3a29c6d0374eabcb1 | refs/heads/master | 2022-05-10T23:58:51.427841 | 2022-03-24T10:47:54 | 2022-03-24T10:47:54 | 188,511,380 | 1 | 0 | Apache-2.0 | 2019-05-25T02:29:21 | 2019-05-25T02:29:21 | null | UTF-8 | Java | false | false | 7,380 | java | /**
* Copyright (c) 2013-2021 Nikita Koksharov
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.redisson.hibernate.region;
import java.util.Collections;
import java.util.Map;
import java.util.Properties;
import java.util.concurrent.TimeUnit;
import org.hibernate.cache.CacheException;
import org.hibernate.cache.spi.CacheDataDescription;
import org.hibernate.cache.spi.GeneralDataRegion;
import org.hibernate.cache.spi.RegionFactory;
import org.hibernate.cache.spi.TransactionalDataRegion;
import org.hibernate.engine.spi.SharedSessionContractImplementor;
import org.redisson.api.RFuture;
import org.redisson.api.RMapCache;
import org.redisson.connection.ConnectionManager;
import org.redisson.hibernate.RedissonRegionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
*
* @author Nikita Koksharov
*
*/
public class BaseRegion implements TransactionalDataRegion, GeneralDataRegion {
private final Logger logger = LoggerFactory.getLogger(getClass());
final RMapCache<Object, Object> mapCache;
final RegionFactory regionFactory;
final CacheDataDescription metadata;
final ConnectionManager connectionManager;
int ttl;
int maxIdle;
int size;
boolean fallback;
volatile boolean fallbackMode;
public BaseRegion(RMapCache<Object, Object> mapCache, ConnectionManager connectionManager, RegionFactory regionFactory, CacheDataDescription metadata, Properties properties, String defaultKey) {
super();
this.mapCache = mapCache;
this.regionFactory = regionFactory;
this.metadata = metadata;
this.connectionManager = connectionManager;
String maxEntries = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_ENTRIES_SUFFIX);
if (maxEntries != null) {
size = Integer.valueOf(maxEntries);
mapCache.setMaxSize(size);
}
String timeToLive = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.TTL_SUFFIX);
if (timeToLive != null) {
ttl = Integer.valueOf(timeToLive);
}
String maxIdleTime = getProperty(properties, mapCache.getName(), defaultKey, RedissonRegionFactory.MAX_IDLE_SUFFIX);
if (maxIdleTime != null) {
maxIdle = Integer.valueOf(maxIdleTime);
}
String fallbackValue = (String) properties.getOrDefault(RedissonRegionFactory.FALLBACK, "false");
fallback = Boolean.valueOf(fallbackValue);
}
private String getProperty(Properties properties, String name, String defaultKey, String suffix) {
String value = properties.getProperty(RedissonRegionFactory.CONFIG_PREFIX + name + suffix);
if (value != null) {
return value;
}
String defValue = properties.getProperty(RedissonRegionFactory.CONFIG_PREFIX + defaultKey + suffix);
if (defValue != null) {
return defValue;
}
return null;
}
private void ping() {
fallbackMode = true;
connectionManager.newTimeout(t -> {
RFuture<Boolean> future = mapCache.isExistsAsync();
future.whenComplete((r, ex) -> {
if (ex == null) {
fallbackMode = false;
} else {
ping();
}
});
}, 1, TimeUnit.SECONDS);
}
@Override
public boolean isTransactionAware() {
// TODO Auto-generated method stub
return false;
}
@Override
public CacheDataDescription getCacheDataDescription() {
return metadata;
}
@Override
public String getName() {
return mapCache.getName();
}
@Override
public void destroy() throws CacheException {
try {
mapCache.destroy();
} catch (Exception e) {
throw new CacheException(e);
}
}
@Override
public boolean contains(Object key) {
if (fallbackMode) {
return false;
}
try {
return mapCache.containsKey(key);
} catch (Exception e) {
if (fallback) {
ping();
logger.error(e.getMessage(), e);
return false;
}
throw new CacheException(e);
}
}
@Override
public long getSizeInMemory() {
return mapCache.sizeInMemory();
}
@Override
public long getElementCountInMemory() {
return mapCache.size();
}
@Override
public long getElementCountOnDisk() {
return -1;
}
@Override
public Map<?, ?> toMap() {
return Collections.unmodifiableMap(mapCache);
}
@Override
public long nextTimestamp() {
return regionFactory.nextTimestamp();
}
@Override
public int getTimeout() {
// 60 seconds (normalized value)
return (1 << 12) * 60000;
}
@Override
public Object get(SharedSessionContractImplementor session, Object key) throws CacheException {
if (fallbackMode) {
return null;
}
try {
if (maxIdle == 0 && size == 0) {
return mapCache.getWithTTLOnly(key);
}
return mapCache.get(key);
} catch (Exception e) {
if (fallback) {
ping();
logger.error(e.getMessage(), e);
return null;
}
throw new CacheException(e);
}
}
@Override
public void put(SharedSessionContractImplementor session, Object key, Object value) throws CacheException {
if (fallbackMode) {
return;
}
try {
mapCache.fastPut(key, value, ttl, TimeUnit.MILLISECONDS, maxIdle, TimeUnit.MILLISECONDS);
} catch (Exception e) {
if (fallback) {
ping();
logger.error(e.getMessage(), e);
return;
}
throw new CacheException(e);
}
}
@Override
public void evict(Object key) throws CacheException {
if (fallbackMode) {
return;
}
try {
mapCache.fastRemove(key);
} catch (Exception e) {
if (fallback) {
ping();
logger.error(e.getMessage(), e);
return;
}
throw new CacheException(e);
}
}
@Override
public void evictAll() throws CacheException {
if (fallbackMode) {
return;
}
try {
mapCache.clear();
} catch (Exception e) {
if (fallback) {
ping();
logger.error(e.getMessage(), e);
return;
}
throw new CacheException(e);
}
}
}
| [
"nkoksharov@redisson.pro"
] | nkoksharov@redisson.pro |
47a5f45558d835c33872da38ae0d82e3fd8fc136 | 53d4ae8ee19c4fd09f4728609e2c04fc9f457619 | /src/main/java/tsuteto/spelunker/item/Item1up.java | e29b48b92ef0d48b54925dae824ff7e217a210f1 | [] | no_license | Tsuteto/SpelunkerMod-MC1.7.10 | 276354cd77244cf538113798a9228e895336d24f | af7c6bd0f874a9fc6e097499e56f6717305a99ef | refs/heads/master | 2020-12-24T13:16:14.616669 | 2016-03-12T10:32:18 | 2016-03-12T10:32:18 | 18,337,166 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 962 | java | package tsuteto.spelunker.item;
import net.minecraft.item.ItemStack;
import net.minecraft.world.World;
import tsuteto.spelunker.constants.SpelunkerDifficulty;
import tsuteto.spelunker.constants.SpelunkerGameMode;
import tsuteto.spelunker.player.SpelunkerPlayerMP;
public class Item1up extends SpelunkerItem
{
@Override
public void giveEffect(ItemStack itemStack, World world, SpelunkerPlayerMP spelunker)
{
if (spelunker.gameMode == SpelunkerGameMode.Arcade)
{
spelunker.increaseLife(1);
}
else
{
spelunker.player().addExperience(30);
}
spelunker.playSound("spelunker:1up", 1.0F, 1.0F);
}
@Override
public boolean spawnCheck(SpelunkerPlayerMP spelunker, SpelunkerDifficulty difficulty, boolean isDarkPlace, double posY)
{
return spelunker.gameMode == SpelunkerGameMode.Arcade
&& posY <= 20 && posY >= 6 && isDarkPlace;
}
}
| [
"midis.cube@gmail.com"
] | midis.cube@gmail.com |
b53c904153d2ffa0de148a4ff2647adac37a2bfa | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_577530299e8927d6cb63d628eb5b33027829151b/Camera/2_577530299e8927d6cb63d628eb5b33027829151b_Camera_s.java | e13fe04c5675f13bfc4e1148f4e2f5ac065dd97c | [] | 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 | 6,536 | java | package com.badlogic.gdx.graphics.tmp;
import com.badlogic.gdx.Gdx;
import com.badlogic.gdx.Graphics;
import com.badlogic.gdx.Input;
import com.badlogic.gdx.graphics.GL10;
import com.badlogic.gdx.graphics.GL11;
import com.badlogic.gdx.graphics.GLU;
import com.badlogic.gdx.graphics.g2d.SpriteBatch;
import com.badlogic.gdx.math.Matrix4;
import com.badlogic.gdx.math.Vector3;
import com.badlogic.gdx.math.collision.Ray;
/**
* Base class for {@link OrthographicCamera} and {@link PerspectiveCamera}.
* @author mzechner
*
*/
public abstract class Camera {
/** the position of the camera **/
public final Vector3 position = new Vector3();
/** the unit length direction vector of the camera **/
public final Vector3 direction = new Vector3(0, 0, -1);
/** the unit length up vector of the camera **/
public final Vector3 up = new Vector3(0, 1, 0);
/** the projection matrix **/
public final Matrix4 projection = new Matrix4();
/** the view matrix **/
public final Matrix4 view = new Matrix4();
/** the combined projection and view matrix **/
public final Matrix4 combined = new Matrix4();
/** the inverse combined projection and view matrix **/
public final Matrix4 invProjectionView = new Matrix4();
/** the near clipping plane distance, has to be positive **/
public float near = 1;
/** the far clipping plane distance, has to be positive **/
public float far = 100;
/** the viewport width **/
public float viewportWidth = 0;
/** the viewport height **/
public float viewportHeight = 0;
/** the frustum **/
public final Frustum frustum = new Frustum();
private final Matrix4 tmpMat = new Matrix4();
private final Vector3 tmpVec = new Vector3();
/**
* Recalculates the projection and view matrix of this
* camera and the frustum planes. Use this after you've manipulated
* any of the attributes of the camera.
*/
public abstract void update();
/**
* Sets the current projection and model-view matrix of this camera.
* Only works with {@link GL10} and {@link GL11} of course. The parameter is there
* to remind you that it does not work with GL20. Make sure to call
* {@link #update()} before calling this method so all matrices are up to date.
*
* @param gl the GL10 or GL11 instance.
*/
public void apply(GL10 gl) {
gl.glMatrixMode(GL10.GL_PROJECTION);
gl.glLoadMatrixf(projection.val, 0);
gl.glMatrixMode(GL10.GL_MODELVIEW);
gl.glLoadMatrixf(view.val, 0);
}
/**
* Recalculates the direction of the camera to look at the point
* (x, y, z).
* @param x the x-coordinate of the point to look at
* @param y the x-coordinate of the point to look at
* @param z the x-coordinate of the point to look at
*/
public void lookAt(float x, float y, float z) {
direction.set(x, y, z).sub(position).nor();
}
/**
* Rotates the direction and up vector of this camera by the
* given angle around the given axis. The direction and up
* vector will not be orthogonalized.
*
* @param angle the angle
* @param axisX the x-component of the axis
* @param axisY the y-component of the axis
* @param axisZ the z-component of the axis
*/
public void rotate(float angle, float axisX, float axisY, float axisZ) {
tmpMat.setToRotation(tmpVec.set(axisX, axisY, axisZ), angle);
direction.mul(tmpMat).nor();
up.mul(tmpMat).nor();
}
/**
* Moves the camera by the given amount on each axis.
* @param x the displacement on the x-axis
* @param y the displacement on the y-axis
* @param z the displacement on the z-axis
*/
public void translate(float x, float y, float z) {
position.add(x, y, z);
}
/**
* Function to translate a point given in window (or window)
* coordinates to world space. It's the same as {@link GLU#gluUnProject(float, float, float, float[], int, float[], int, int[], int, float[], int)}
* but does not rely on OpenGL. The viewport is assuemd to span the whole screen
* and is fetched from {@link Graphics#getWidth()} and {@link Graphics#getHeight()}. The
* x- and y-coordinate of vec are assumed to be in window coordinates (origin is the
* top left corner, y pointing down, x pointing to the right) as reported by the
* touch methods in {@link Input}. A z-coordinate of 0 will return a point on the
* near plane, a z-coordinate of 1 will return a point on the far plane.
*
* @param vec the point in window coordinates
*/
public void unproject(Vector3 vec) {
vec.x = (2 * vec.x) / Gdx.graphics.getWidth() - 1;
vec.y = (2 * (Gdx.graphics.getHeight() - vec.y - 1)) / Gdx.graphics.getHeight() - 1;
vec.z = 2 * vec.z - 1;
vec.prj(invProjectionView);
}
/**
* Projects the {@link Vector3} given in object/world space to window coordinates. It's the
* same as {@link GLU#gluProject(float, float, float, float[], int, float[], int, int[], int, float[], int)} with
* one small deviation:
* The viewport is assumed to span the whole screen. The window coordinate
* system has its origin in the <b>bottom</b> left, with the y-axis pointing <b>upwards</b>
* and the x-axis pointing to the right. This makes it easily useable in conjunction with
* {@link SpriteBatch} and similar classes.
* @param vec the position in object/world space.
*/
public void project(Vector3 vec) {
vec.prj(combined);
vec.x = Gdx.graphics.getWidth() * (vec.x + 1) / 2;
vec.y = Gdx.graphics.getHeight() * (vec.y + 1) / 2;
vec.z = (vec.z + 1) / 2;
}
final Ray ray = new Ray(new Vector3(), new Vector3());
/**
* Creates a picking {@link Ray} from the coordinates given in window
* coordinates. It is assumed that the viewport spans the whole screen.
* The window coordinates origin is assumed to be in the top left corner,
* its y-axis pointing down, the x-axis pointing to the right. The
* returned instance is not a new instance but an internal member only
* accessible via this function.
*
* @param x the x-coordinate in window coordinates.
* @param y the y-coordinate in window coordinates.
* @return the picking Ray.
*/
public Ray getPickRay(float x, float y) {
unproject(ray.origin.set(x, y, 0));
unproject(ray.direction.set(x, y, 1));
ray.direction.sub(ray.origin).nor();
return ray;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
16d0df835b0d5ff99f663bafedf9f81efbc6621f | 5d69d80b9f723eaacf5bebd7e7745c6b842d68e8 | /src/com/i/exceptionhandling/practise/ImplicitlyNestedTry.java | ae2b5fb5305af42dbd8c930336a18346e516f1f3 | [] | no_license | Bishnu-KC/ChapterWise | 0c06423393316fed91fa7ac6bb17b4c2dfea834c | 079e39091a91878ecde97d6364b71e1a7240e35d | refs/heads/master | 2020-03-28T16:28:16.819773 | 2018-09-13T21:11:00 | 2018-09-13T21:11:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 666 | java | package com.i.exceptionhandling.practise;
import java.util.*;
class ImplicitlyNestedTry {
public static void nTry(int a)
{
try
{
System.out.println("Enter for a:");
if(a==1)
a=a/(a-a);
if(a==2)
{
int c[]= {1};
c[10]=99;
}
}
catch(ArrayIndexOutOfBoundsException e)
{
e.printStackTrace();
}
}
public static void main(String[] args) {
Scanner s=new Scanner(System.in);
try
{
System.out.println("Enter for a:");
int a=s.nextInt();
int b=42/a;
System.out.println("a: "+a);
nTry(a);
}
catch(ArithmeticException e)
{
e.printStackTrace();
System.out.println("DBZ"+e);
}
}
}
| [
"kcbishnu8@outlook.com"
] | kcbishnu8@outlook.com |
6ad9f5d1cd525c2c2a4f666b0972059ee5925d13 | 49ce608198f43cb9e53481de3f69b1813bc9f602 | /src/main/java/com/threedsoft/shipping/dto/requests/FacilityCarrierCreationRequestDTO.java | 292b7bc1085db9c248e45565574813bb945308c3 | [] | no_license | knpillutla/shipping-idd | 7b2645cfc0ae0ae17d659ee9c2cf04e0c37a314b | 2156cd40b9a0a82973d7260d247ed5e1890b3960 | refs/heads/master | 2020-03-30T02:59:45.061447 | 2018-12-28T03:27:59 | 2018-12-28T03:27:59 | 150,662,654 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 704 | java | package com.threedsoft.shipping.dto.requests;
import java.time.LocalDateTime;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility;
import com.threedsoft.util.dto.WMSRequestDTO;
import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@JsonAutoDetect(fieldVisibility = Visibility.ANY)
@JsonInclude(JsonInclude.Include.NON_DEFAULT)
@NoArgsConstructor
@Data
@AllArgsConstructor
public class FacilityCarrierCreationRequestDTO extends WMSRequestDTO{
String busName;
Integer locnNbr;
String carrierCode;
String accountNbr;
}
| [
"knpillutla@gmail.com"
] | knpillutla@gmail.com |
19d84106bc0df9b901ab5fcab2cd6489ea91d701 | fa6f835db209fb4cb922b2d998b63798d9a0dc05 | /src/main/java/com/interview/intterviewbit/string/RomanToInteger.java | b45f0d9ab33a8d7984b82428a8a0845ae14eee97 | [] | no_license | jojo8775/interview-bit | e93afd18e7414026e2c3a5d19b23a685ff1e159f | 4056dc85be45b4ee4ed4d7e59952fe42e22fdbaf | refs/heads/master | 2020-12-21T03:43:17.940493 | 2017-05-23T01:04:52 | 2017-05-23T01:04:52 | 58,096,839 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 763 | java | package com.interview.intterviewbit.string;
/**
* Given a roman numeral, convert it to an integer.
*
* Input is guaranteed to be within the range from 1 to 3999.
*
* @author jojo
*
*/
public class RomanToInteger {
public int convertToInteger(String s) {
int i = s.length() - 1, result = 0, cur = 0, prev = 0;
while (i >= 0) {
cur = findNumber(s.charAt(i--));
if (prev > cur) {
result -= cur;
} else {
result += cur;
}
prev = cur;
}
return result;
}
private int findNumber(char ch) {
switch (ch) {
case 'I':
return 1;
case 'V':
return 5;
case 'X':
return 10;
case 'L':
return 50;
case 'C':
return 100;
case 'D':
return 500;
case 'M':
return 1000;
default:
return 0;
}
}
}
| [
"chiranjeeb.nandy@yahoo.com"
] | chiranjeeb.nandy@yahoo.com |
fa0743f73f9b0d6117bc591a5cdb896a040cc2ad | 024cc651169340a2609e99c6e7ce7544f6ebf483 | /netcar-service/src/main/java/com/zhcx/netcar/netcarservice/utils/StatisticalUtil.java | f5e527ab95ab9ff41ed55f3014e636a2a2dc7e0d | [] | no_license | 3103509329/transfer_trolley | cb1df2df0c05013615091c36f87460b85a98239e | e8b8cd0f17062457a00188771c8d99ed2340e02b | refs/heads/master | 2023-01-28T23:11:45.245311 | 2020-12-09T03:30:00 | 2020-12-09T03:30:00 | 319,565,360 | 0 | 0 | null | 2020-12-10T14:11:46 | 2020-12-08T07:51:32 | Java | UTF-8 | Java | false | false | 5,434 | java | package com.zhcx.netcar.netcarservice.utils;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;
import java.text.ParseException;
import java.util.*;
import static org.apache.commons.lang3.time.DateUtils.parseDate;
/**
* @author Lee
* @email 570815140@qq.com
* @date 2019/6/11 10:24
* 报表统计统计类
**/
@Component
public class StatisticalUtil {
private static String YEAR_FORMAT = "yyyy";
private static String MONTH_FORMAT = "yyyy-MM";
private static String DAY_FORMAT = "yyyy-MM-dd";
public List<Map<String, Object>> dataInit(String dateStr, String dateType) {
List result = null;
switch (dateType) {
case "year":
result = getMonthListOfYear(StringToDate(dateStr, YEAR_FORMAT));
break;
case "month":
//判断月份
result = getDayListOfMonth(StringToDate(dateStr, MONTH_FORMAT));
break;
case "day":
result = getHourListOfDay(StringToDate(dateStr, DAY_FORMAT));
break;
default:
}
return result;
}
/**
* 获取当前月每天的日期
* @return
*/
public static List getDayListOfMonth(Date date) {
List list = Lists.newArrayList();
Calendar calendar = Calendar.getInstance();
calendar.setTime(date);
//年份
int year = calendar.get(Calendar.YEAR);
//月份
int month = calendar.get(Calendar.MONTH) + 1;
int day = calendar.getActualMaximum(Calendar.DATE);
String yearStr = String.valueOf(year);
String monthStr = "";
String dayStr = "";
if(month < 10){
monthStr = "0" + month;
} else {
monthStr = "" + month;
}
for (int i = 1; i <= day; i++) {
Map map = Maps.newHashMap();
if (i < 10) {
dayStr = "0" + i;
} else {
dayStr = "" + i;
}
String aDate = yearStr + "-" + monthStr + "-" + dayStr;
map.put("total", 0);
map.put("moment", aDate);
list.add(map);
}
return list;
}
/**
* 获取指定年的每月日期
* @return
*/
public static List getMonthListOfYear(Date date) {
List list = Lists.newArrayList();
Calendar calendar = Calendar.getInstance(Locale.CHINA);
calendar.setTime(date);
//年份
int year = calendar.get(Calendar.YEAR);
String yearStr = String.valueOf(year);
String monthStr = "";
for (int i = 1; i <= 12; i++) {
Map map = Maps.newHashMap();
if(i < 10){
monthStr = "0" + i;
} else {
monthStr = "" + i;
}
String aDate = yearStr + "-" + monthStr;
map.put("total", 0);
map.put("moment", aDate);
list.add(map);
}
return list;
}
/**
* 获取指定天每小时的日期
* @return
*/
public static List getHourListOfDay(Date date) {
List list = Lists.newArrayList();
Calendar calendar = Calendar.getInstance(Locale.CHINA);
calendar.setTime(date);
String yearStr = "";
String monthStr = "";
String dayStr = "";
String hourStr = "";
//年份
int year = calendar.get(Calendar.YEAR);
yearStr = String.valueOf(year);
//月份
int month = calendar.get(Calendar.MONTH) + 1;
if(month < 10){
monthStr = "0" + month;
} else {
monthStr = "" + month;
}
int day = calendar.get(Calendar.DATE);
if(day < 10){
dayStr = "0" + day;
} else {
dayStr = "" + day;
}
for (int i = 1; i < 24; i++) {
Map map = Maps.newHashMap();
if(i < 10){
hourStr = "0" + i;
} else {
hourStr = "" + i;
}
String aDate = yearStr + "-" + monthStr + "-" + dayStr + " " + hourStr;
map.put("total", 0);
map.put("moment", aDate);
list.add(map);
}
return list;
}
/**
* 获取当前月每天的日期
* @return
*/
public static List<Map<String,Object>> getSomeDayListOfMonth(Date finalStartDate,Date finalEndDate) {
List<Map<String,Object>> list = Lists.newArrayList();
Calendar calendar = Calendar.getInstance();
while (finalEndDate.getTime() >= finalStartDate.getTime()) {
String moment = DateUtil.getYMDFormat(finalStartDate);
Map<String,Object> map = Maps.newHashMap();
map.put("total", 0);
map.put("moment", moment);
list.add(map);
calendar.setTime(finalStartDate);
calendar.add(Calendar.DATE, 1);
finalStartDate = calendar.getTime();
}
return list;
}
public static Date StringToDate(String date,String format) {
if (StringUtils.isNotBlank(date)) {
try {
return parseDate(date, format);
} catch (ParseException e) {
}
}
return null;
}
}
| [
"3103509329@qq.com"
] | 3103509329@qq.com |
c4ef63083e8c63d18c5bedcb9bab579b036aa825 | 6a649709010f35916b58ad639eb24dc9d7452344 | /AL-Game/src/com/aionemu/gameserver/skillengine/condition/DpCondition.java | e67ffe6cc6373d4ceb08acf9ec201694cc395732 | [] | no_license | soulxj/aion-cn | 807860611e746d8d4c456a769a36d3274405fd7e | 8a0a53cf8f99233cbee82f341f2b5c33be0364fa | refs/heads/master | 2016-09-11T01:12:19.660692 | 2014-08-11T14:59:38 | 2014-08-11T14:59:38 | 41,342,802 | 2 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,448 | java | /*
* This file is part of aion-unique <aion-unique.org>.
*
* aion-unique 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.
*
* aion-unique 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 aion-unique. If not, see <http://www.gnu.org/licenses/>.
*/
package com.aionemu.gameserver.skillengine.condition;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlType;
import com.aionemu.gameserver.model.gameobjects.player.Player;
import com.aionemu.gameserver.skillengine.model.Skill;
/**
* @author ATracer
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "DpCondition")
public class DpCondition extends Condition {
@XmlAttribute(required = true)
protected int value;
@Override
public boolean validate(Skill skill) {
return ((Player) skill.getEffector()).getCommonData().getDp() >= value;
}
}
| [
"feidebugao@gmail.com"
] | feidebugao@gmail.com |
3301805b87d6e39eb3779128a447fc024f1f8e2b | aa5f25d714519ccfda2a89f382dfcefe1b3642fc | /trunk/dmisArea/src/com/techstar/dmis/entity/ZdhRmrec.java | 1095c52a161966802f38f7c2c6c1b6b4afd8bdcc | [] | no_license | BGCX261/zhouwei-repository-svn-to-git | 2b85060757568fadc0d45b526e2546ed1965d48a | cd7f50db245727418d5f1c0061681c11703d073e | refs/heads/master | 2021-01-23T03:44:27.914196 | 2015-08-25T15:45:29 | 2015-08-25T15:45:29 | 41,599,666 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,538 | java | package com.techstar.dmis.entity;
import java.io.Serializable;
/**
* Domain classe for 遥测数据修改记录
* This classe is based on ValueObject Pattern
* @author
* @date
*/
public class ZdhRmrec implements Serializable {
public ZdhRmrec() {
}
private String fstationname;//变电站名称
private String switchno;//开关号
private String changeexplanationo;//数据变化说明
private int modificationdatano;//修改遥测数据量
private String modificationreason;//修改原因
private java.sql.Date modificationdate;//数据修改日期
private String remarks;//备注
private String sys_fille;//填写人
private String sys_filldept;//填写单位
private java.sql.Timestamp sys_filltime;//填写时间
private int sys_isvalid;//是否有效字段
private String sys_dataowner;//数据所属单位
private String recordno;//记录编号
private int version;//数据库版本控制
private com.techstar.dmis.entity.ZdhAutoondutylog zzdhrmrec1;
private com.techstar.dmis.entity.StdStation zzdhrmrec4;
private com.techstar.dmis.entity.ZdhCharalterrecord zzdhrmrec2;
/**
* getters and setters
*/
public void setFstationname(String fstationname){
this.fstationname=fstationname;
}
public String getFstationname(){
return fstationname;
}
public void setSwitchno(String switchno){
this.switchno=switchno;
}
public String getSwitchno(){
return switchno;
}
public void setChangeexplanationo(String changeexplanationo){
this.changeexplanationo=changeexplanationo;
}
public String getChangeexplanationo(){
return changeexplanationo;
}
public void setModificationdatano(int modificationdatano){
this.modificationdatano=modificationdatano;
}
public int getModificationdatano(){
return modificationdatano;
}
public void setModificationreason(String modificationreason){
this.modificationreason=modificationreason;
}
public String getModificationreason(){
return modificationreason;
}
public void setModificationdate(java.sql.Date modificationdate){
this.modificationdate=modificationdate;
}
public java.sql.Date getModificationdate(){
return modificationdate;
}
public void setRemarks(String remarks){
this.remarks=remarks;
}
public String getRemarks(){
return remarks;
}
public void setSys_fille(String sys_fille){
this.sys_fille=sys_fille;
}
public String getSys_fille(){
return sys_fille;
}
public void setSys_filldept(String sys_filldept){
this.sys_filldept=sys_filldept;
}
public String getSys_filldept(){
return sys_filldept;
}
public void setSys_filltime(java.sql.Timestamp sys_filltime){
this.sys_filltime=sys_filltime;
}
public java.sql.Timestamp getSys_filltime(){
return sys_filltime;
}
public void setSys_isvalid(int sys_isvalid){
this.sys_isvalid=sys_isvalid;
}
public int getSys_isvalid(){
return sys_isvalid;
}
public void setSys_dataowner(String sys_dataowner){
this.sys_dataowner=sys_dataowner;
}
public String getSys_dataowner(){
return sys_dataowner;
}
public void setRecordno(String recordno){
this.recordno=recordno;
}
public String getRecordno(){
return recordno;
}
public void setVersion(int version){
this.version=version;
}
public int getVersion(){
return version;
}
public void setZzdhrmrec1(com.techstar.dmis.entity.ZdhAutoondutylog zzdhrmrec1){
this.zzdhrmrec1=zzdhrmrec1;
}
public com.techstar.dmis.entity.ZdhAutoondutylog getZzdhrmrec1(){
return zzdhrmrec1;
}
public void setZzdhrmrec4(com.techstar.dmis.entity.StdStation zzdhrmrec4){
this.zzdhrmrec4=zzdhrmrec4;
}
public com.techstar.dmis.entity.StdStation getZzdhrmrec4(){
return zzdhrmrec4;
}
public void setZzdhrmrec2(com.techstar.dmis.entity.ZdhCharalterrecord zzdhrmrec2){
this.zzdhrmrec2=zzdhrmrec2;
}
public com.techstar.dmis.entity.ZdhCharalterrecord getZzdhrmrec2(){
return zzdhrmrec2;
}
} | [
"you@example.com"
] | you@example.com |
b81a29d2b7050a200c3979d9c16f086f56a522e4 | f5b407377a491a7cd475414c7faeed18468ac5b0 | /feilong-core/src/test/java/com/feilong/core/bean/convertutiltest/ToMapTransformerTest.java | b22c85ecac8ddd10481052078c41bd7f2529f199 | [
"Apache-2.0"
] | permissive | luchao0111/feilong | 100a7b7784fc6fbfb8252bd468c52899dc4b5169 | 4024b8abb5b19f1378295fa8d1bd8ee3b86cfdad | refs/heads/master | 2022-05-29T02:09:55.324155 | 2020-05-06T14:50:17 | 2020-05-06T14:50:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,136 | java | /*
* Copyright (C) 2008 feilong
*
* 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.feilong.core.bean.convertutiltest;
import static com.feilong.core.bean.ConvertUtil.toArray;
import static com.feilong.core.bean.ConvertUtil.toMap;
import static java.util.Collections.emptyMap;
import static org.hamcrest.Matchers.allOf;
import static org.hamcrest.Matchers.hasEntry;
import static org.junit.Assert.assertEquals;
import static org.hamcrest.MatcherAssert.assertThat;
import java.util.HashMap;
import java.util.Map;
import org.apache.commons.collections4.Transformer;
import org.junit.Test;
import com.feilong.core.util.transformer.SimpleClassTransformer;
/**
* The Class ConvertUtilToMapTransformerTest.
*
* @author <a href="http://feitianbenyue.iteye.com/">feilong</a>
*/
public class ToMapTransformerTest{
/**
* Test same transformer.
*/
@Test
public void testSameTransformer(){
Map<String, String> map = toMap("1", "2");
Transformer<String, Integer> transformer = new SimpleClassTransformer<>(Integer.class);
//key和value 都转成integer 使用相同的转换器
Map<Integer, Integer> returnMap = toMap(map, transformer, transformer);
assertThat(returnMap, allOf(hasEntry(1, 2)));
}
/**
* Test array.
*/
@Test
public void testMap(){
Map<String, String> map = toMap("1", "2,2");
Transformer<String, Integer> keyTransformer = new SimpleClassTransformer<>(Integer.class);
Transformer<String, Integer[]> valueTransformer = new SimpleClassTransformer<>(Integer[].class);
//key和value转成不同的类型
Map<Integer, Integer[]> returnMap = toMap(map, keyTransformer, valueTransformer);
assertThat(returnMap, allOf(hasEntry(1, toArray(2, 2))));
}
/**
* Test array to array.
*/
@Test
public void testMapToArray(){
Map<String[], String[]> map = toMap(toArray("1"), toArray("2", "8"));
Transformer<String[], Integer[]> keyTransformer = new SimpleClassTransformer<>(Integer[].class);
Transformer<String[], Long[]> valueTransformer = new SimpleClassTransformer<>(Long[].class);
//key和value转成不同的类型
Map<Integer[], Long[]> returnMap = toMap(map, keyTransformer, valueTransformer);
assertThat(returnMap, allOf(hasEntry(toArray(1), toArray(2L, 8L))));
}
//---------------------------------------------------------------
/**
* Test array null key transformer.
*/
@Test
public void testMapNullKeyTransformer(){
Map<String, String> map = toMap("1", "2,2");
Transformer<String, Integer[]> valueTransformer = new SimpleClassTransformer<>(Integer[].class);
Map<String, Integer[]> returnMap = toMap(map, null, valueTransformer);
assertThat(returnMap, allOf(hasEntry("1", toArray(2, 2))));
}
/**
* Test array null value transformer.
*/
@Test
public void testMapNullValueTransformer(){
Map<String, String> map = toMap("1", "2,2");
Transformer<String, Integer> keyTransformer = new SimpleClassTransformer<>(Integer.class);
Map<Integer, String> returnMap = toMap(map, keyTransformer, null);
assertThat(returnMap, allOf(hasEntry(1, "2,2")));
}
/**
* Test transformer null target type.
*/
@Test(expected = NullPointerException.class)
public void testTransformerNullTargetType(){
Map<String, String> map = toMap("1", "2,2");
Transformer<String, Integer> keyTransformer = new SimpleClassTransformer<>(null);
Map<Integer, String> returnMap = toMap(map, keyTransformer, null);
assertThat(returnMap, allOf(hasEntry(1, "2,2")));
}
//---------------------------------------------------------------
/**
* Test null input map.
*/
@Test
public void testNullInputMap(){
Transformer<String, Integer> transformer = new SimpleClassTransformer<>(Integer.class);
//key和value 都转成integer 使用相同的转换器
Map<Integer, Integer> returnMap = toMap(null, transformer, transformer);
assertEquals(emptyMap(), returnMap);
}
/**
* Test empty input map.
*/
@Test
public void testEmptyInputMap(){
Transformer<String, Integer> transformer = new SimpleClassTransformer<>(Integer.class);
//key和value 都转成integer 使用相同的转换器
Map<Integer, Integer> returnMap = toMap(new HashMap<String, String>(), transformer, transformer);
assertEquals(emptyMap(), returnMap);
}
}
| [
"venusdrogon@163.com"
] | venusdrogon@163.com |
f4190ee120066888deb81bf271064e9a169b0443 | 32870824d4b9e90f4bfd384e6a3117757eeded14 | /src/main/java/com/github/alexthe666/alexsmobs/misc/MatchesBananaTagCondition.java | 0252ab1ae00256a6c152336de62b1f0815a93657 | [] | no_license | othuntgithub/AlexsMobs | d69fc9c007f0bb1bfa911f6abf91c3ae7cd5ac6a | 7ad3e9fd6448bec487fbf8c8e6c1d70460df1d62 | refs/heads/main | 2023-03-09T05:08:25.656513 | 2021-02-21T03:21:16 | 2021-02-21T03:21:16 | 330,071,521 | 0 | 0 | null | 2021-01-16T02:58:06 | 2021-01-16T02:58:06 | null | UTF-8 | Java | false | false | 2,106 | java | package com.github.alexthe666.alexsmobs.misc;
import com.github.alexthe666.alexsmobs.CommonProxy;
import com.google.common.collect.ImmutableSet;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonObject;
import com.google.gson.JsonSerializationContext;
import com.google.gson.JsonSyntaxException;
import net.minecraft.advancements.criterion.StatePropertiesPredicate;
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.loot.*;
import net.minecraft.loot.conditions.BlockStateProperty;
import net.minecraft.loot.conditions.ILootCondition;
import net.minecraft.loot.conditions.LootConditionManager;
import net.minecraft.tags.BlockTags;
import net.minecraft.tags.ITag;
import net.minecraft.util.JSONUtils;
import net.minecraft.util.ResourceLocation;
import net.minecraft.util.registry.Registry;
import java.util.Set;
public class MatchesBananaTagCondition implements ILootCondition {
private ITag<Block> match;
private MatchesBananaTagCondition() {
match = BlockTags.getCollection().get(AMTagRegistry.DROPS_BANANAS);
}
public LootConditionType func_230419_b_() {
return CommonProxy.MATCHES_BANANA_CONDTN;
}
public Set<LootParameter<?>> getRequiredParameters() {
return ImmutableSet.of();
}
public boolean test(LootContext p_test_1_) {
if(match == null){
match = BlockTags.getCollection().get(AMTagRegistry.DROPS_BANANAS);
}
BlockState block = p_test_1_.get(LootParameters.BLOCK_STATE);
return block != null && match != null && match.contains(block.getBlock());
}
public static class Serializer implements ILootSerializer<MatchesBananaTagCondition> {
public Serializer() {
}
public void serialize(JsonObject p_230424_1_, MatchesBananaTagCondition p_230424_2_, JsonSerializationContext p_230424_3_) {
}
public MatchesBananaTagCondition deserialize(JsonObject p_230423_1_, JsonDeserializationContext p_230423_2_) {
return new MatchesBananaTagCondition();
}
}
}
| [
"alex.rowlands@cox.net"
] | alex.rowlands@cox.net |
7ff1fa30acf53f29bb9f983b736cd40202323b71 | bc72ee46488983c11a4ab7ebb3f52aa9637bb988 | /src/main/java/quoters/TalkingRobotImpl.java | e7033755ab3303fa21b8b8b79d062b7ce4bb5386 | [] | no_license | mmalyutin/myspring-MINSK-2017-aprel | 78e56780017466c04f0d94dc58fa77c6140b02b8 | ab84338b2f4966c2590d118585000ebc281b3f30 | refs/heads/master | 2021-06-11T04:59:03.711799 | 2017-04-22T12:07:15 | 2017-04-22T12:07:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 567 | java | package quoters;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.PostConstruct;
import java.util.Arrays;
import java.util.List;
/**
* Created by Evegeny on 21/04/2017.
*/
@Component
public class TalkingRobotImpl implements TalkingRobot {
@Film
private List<Quoter> quoters = Arrays.asList((Quoter) () ->
System.out.println("This is default"));
@Override
@PostConstruct
public void talk() {
quoters.forEach(Quoter::sayQuote);
}
}
| [
"papakita2009"
] | papakita2009 |
07314e16c24ce9c79813ce3c7bdea4c7eb89d511 | c9bdb85c82a1d2e3fa9f7cfff9590d774b222b26 | /miser/miser-api/miser-api-facade/target/classes/com/hoau/miser/module/api/facade/shared/domain/PrivilegeContractDetailEntity.java | b70c616e2a9f42a92da010d6e14c5b4a8e962e58 | [] | no_license | wangfuguo/mi-proj | 9d5c159719ee3c4da7bedd01dd297713bb811ced | 2920971b310262a575cd3b767827d4633c596666 | refs/heads/master | 2020-03-08T07:03:24.984087 | 2018-04-04T00:44:35 | 2018-04-04T00:44:35 | 127,985,673 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,300 | java | package com.hoau.miser.module.api.facade.shared.domain;
import com.hoau.hbdp.framework.entity.BaseEntity;
/**
* 越发越惠客户合同明细实体类
* ClassName: DiscountPrivilegeContractDetailEntity
* @author 286330付于令
* @date 2016年1月12日
* @version V1.0
*/
public class PrivilegeContractDetailEntity extends BaseEntity{
private static final long serialVersionUID = 6280004521164934837L;
private String customerContractId; // 越发越惠客户合同ID
private Double startAmount; // 发货金额段起
private Double endAmount; // 发货金额段止
private Double ddMinFreightDiscount; // 定日达纯运费最低折扣
private Double duMinFreightDiscount; // 经济快运纯运费最低折扣
private Double maxCouponScale; // 最高返券比例
private String dataOrign; // 数据来源
private String remark; // 备注
private String active; // 是否可用
public String getCustomerContractId() {
return customerContractId;
}
public void setCustomerContractId(String customerContractId) {
this.customerContractId = customerContractId;
}
public Double getStartAmount() {
return startAmount;
}
public void setStartAmount(Double startAmount) {
this.startAmount = startAmount;
}
public Double getEndAmount() {
return endAmount;
}
public void setEndAmount(Double endAmount) {
this.endAmount = endAmount;
}
public Double getDdMinFreightDiscount() {
return ddMinFreightDiscount;
}
public void setDdMinFreightDiscount(Double ddMinFreightDiscount) {
this.ddMinFreightDiscount = ddMinFreightDiscount;
}
public Double getDuMinFreightDiscount() {
return duMinFreightDiscount;
}
public void setDuMinFreightDiscount(Double duMinFreightDiscount) {
this.duMinFreightDiscount = duMinFreightDiscount;
}
public Double getMaxCouponScale() {
return maxCouponScale;
}
public void setMaxCouponScale(Double maxCouponScale) {
this.maxCouponScale = maxCouponScale;
}
public String getDataOrign() {
return dataOrign;
}
public void setDataOrign(String dataOrign) {
this.dataOrign = dataOrign;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public String getActive() {
return active;
}
public void setActive(String active) {
this.active = active;
}
}
| [
"wangfuguo_wfg@163.com"
] | wangfuguo_wfg@163.com |
f8f9bbbff7b0e05cc01dbb69b5332fd77283a631 | e7ee311e20b40c87bf6d23a53a1d7b11fd29d2c3 | /src/chosun/ciis/as/aset/rec/AS_ASET_1109_LCURLISTRecord.java | 689bc96e2d292110bccdac0929c59531f5df17b1 | [] | no_license | nosmoon/misdevteam | 4e3695ef7bbdcd231bb84d7d8d7df54a23ff0a60 | 1829d5bd489eb6dd307ca244f0e183a31a1de773 | refs/heads/master | 2020-04-15T15:57:05.480056 | 2019-01-10T01:12:01 | 2019-01-10T01:12:01 | 164,812,547 | 1 | 0 | null | null | null | null | UHC | Java | false | false | 2,081 | java | /***************************************************************************************************
* 파일명 : .java
* 기능 : 독자우대-구독신청
* 작성일자 : 2007-05-22
* 작성자 : 김대섭
***************************************************************************************************/
/***************************************************************************************************
* 수정내역 :
* 수정자 :
* 수정일자 :
* 백업 :
***************************************************************************************************/
package chosun.ciis.as.aset.rec;
import java.sql.*;
import chosun.ciis.as.aset.dm.*;
import chosun.ciis.as.aset.ds.*;
/**
*
*/
public class AS_ASET_1109_LCURLISTRecord extends java.lang.Object implements java.io.Serializable{
public String rcpm_dt;
public String rcpm_clsf;
public String rcpm_amt;
public String actu_slip;
public String rmtt_dt;
public String rmtt_plac;
public String remk;
public AS_ASET_1109_LCURLISTRecord(){}
public void setRcpm_dt(String rcpm_dt){
this.rcpm_dt = rcpm_dt;
}
public void setRcpm_clsf(String rcpm_clsf){
this.rcpm_clsf = rcpm_clsf;
}
public void setRcpm_amt(String rcpm_amt){
this.rcpm_amt = rcpm_amt;
}
public void setActu_slip(String actu_slip){
this.actu_slip = actu_slip;
}
public void setRmtt_dt(String rmtt_dt){
this.rmtt_dt = rmtt_dt;
}
public void setRmtt_plac(String rmtt_plac){
this.rmtt_plac = rmtt_plac;
}
public void setRemk(String remk){
this.remk = remk;
}
public String getRcpm_dt(){
return this.rcpm_dt;
}
public String getRcpm_clsf(){
return this.rcpm_clsf;
}
public String getRcpm_amt(){
return this.rcpm_amt;
}
public String getActu_slip(){
return this.actu_slip;
}
public String getRmtt_dt(){
return this.rmtt_dt;
}
public String getRmtt_plac(){
return this.rmtt_plac;
}
public String getRemk(){
return this.remk;
}
}
/* 작성시간 : Thu Apr 02 09:57:20 KST 2009 */ | [
"DLCOM000@172.16.30.11"
] | DLCOM000@172.16.30.11 |
effa7a7894f075fea455f7bc0fa4fa9476b2075d | da889968b2cc15fc27f974e30254c7103dc4c67e | /Optimization Algorithm_GUI/src/Algorithm_Carpool/PSO2_AB_2Si_ApproachI/Convert_Function.java | 3f5dc26c41007fd1cf4395d0121c527f498933a6 | [] | no_license | say88888/My_Project_thesis | fcd4d96b34de8627fa054146eb6164b7c3636344 | 04908ea3ed6b7a9c1939a5d8e16dfc65d66437f4 | refs/heads/master | 2020-04-10T08:32:37.106239 | 2018-12-08T05:52:44 | 2018-12-08T05:52:44 | 160,908,221 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,713 | java | package Algorithm_Carpool.PSO2_AB_2Si_ApproachI;
import java.util.ArrayList;
import java.util.List;
public class Convert_Function extends PSO2_AB_2Si_ApproachI {
private static int[] rid=new int[P];
private static double[] Si=new double[P*2];
private static int[] A=new int[P];
private static int[] B=new int[2*P];
private static int[] Si_p = new int[P*2];
private static int[] binaryX=new int[D];
private static int[] binaryY=new int[P];
private static int[][] X;
private static int[][] Y;
public static void main(double[] X,double[] Y){
rid=new int[P];
Si=new double[P*2];
A=new int[P];
B=new int[2*P];
Si_p = new int[P*2];
binaryX=new int[D];
binaryY=new int[P];
int number;
for(int d=0;d<P;d++){
if(Md.get(d).size()>0){
number=(int) Math.round(((Md.get(d).size()-1)*(X[d]+Vmax))/(2*Vmax)+1);
rid[d]=number;
}
else
{
rid[d]=0;
}
}
for(int d=0;d<Y.length;d++)
Si[d]=Y[d];
Si_p=sortSi(Si);
A=Get_A(rid);
B=Get_B(A,Si_p);
getbinaryXY();
}
public static int[] Get_A(int[] rid) {
// TODO Auto-generated method stub
int[] A=new int[P];
for (int i = 0; i < P; i++)
if(rid[i]!=0){
A[i]=Md.get(i).get(rid[i]-1);
}else{A[i]=0;}
return A;
}
public static int[] Get_B(int[] A,int[] Si) {
List<List<Integer>> B = new ArrayList<List<Integer>>();
for (int j = 1; j <= D; j++) {
List<Integer> b = new ArrayList<Integer>();
List<Integer> b1 = new ArrayList<Integer>();
for (int i = 0; i < P; i++)
if (A[i] == j)
b.add(i+1);
if(b.size()>0){
for(int i=0;i<Si.length;i++)
for(int k=0;k<b.size();k++)
{
if(Si[i]==b.get(k) || Si[i]==-(b.get(k)))
{
b1.add(Si[i]);
}
}
}
B.add(b1);
}
List Bstring = new ArrayList<Integer>();
for (int d = 0; d < B.size(); d++)
for (int n= 0; n < B.get(d).size(); n++)
Bstring.add(B.get(d).get(n));
int[] B1=new int[P*2];
for (int i = 0; i < Bstring.size(); i++)
B1[i] = (int) Bstring.get(i);
return B1;
}
static int[] Get_binaryX(int[] A) {
List<List<Integer>> Dlist = new ArrayList<List<Integer>>();
int[][] Adp = new int[D][P];
for (int d = 0; d < D; d++){
List<Integer> list = new ArrayList<Integer>();
for (int p = 0; p < P; p++) {
if (A[p] == (d + 1)){
Adp[d][p] = 1;
list.add(p+1);
}else
Adp[d][p] = 0;
}
Dlist.add(list);
}
int [][]X = new int[D][];
for (int i = 0; i < D; i++)
X[i] = new int[1];
for (int d = 0; d < X.length; d++) {
for (int j = 0; j < X[d].length; j++) {
int a = 0;
for (int p = 0; p < P; p++)
a += Adp[d][p];
if (a >= 1)
X[d][j] = 1;
else
X[d][j] = 0;
}
}
int[] X1=new int[D];
for (int d = 0; d < X.length; d++)
for (int j = 0; j < X[d].length; j++)
X1[d]=X[d][j];
return X1;
}
static int[] Get_binaryY(int[] A) {
List<List<Integer>> Dlist = new ArrayList<List<Integer>>();
int[][] Adp = new int[D][P];
for (int d = 0; d < D; d++){
List<Integer> list = new ArrayList<Integer>();
for (int p = 0; p < P; p++) {
if (A[p] == (d + 1)){
Adp[d][p] = 1;
list.add(p+1);
}else
Adp[d][p] = 0;
}
Dlist.add(list);
}
int [][] Y = new int[P][];
for (int i = 0; i < Y.length; i++)
Y[i] = new int[1];
for (int p = 0; p < Y.length; p++)
for (int h = 0; h < Y[p].length; h++) {
for (int d = 0; d < D; d++)
Y[p][h] += Adp[d][p];
}
int[] Y1=new int[P];
for (int p = 0; p < Y.length; p++)
for (int h = 0; h < Y[p].length; h++)
Y1[p]=Y[p][h];
return Y1;
}
static int[] sortSi(double[] Si)
{
//Step3 If the value of passenger location d+ is less than the value of passenger location d-, swap the values of passenger location d+ and the value of passenger location d-.
int[] Si_p=new int[P*2];
for(int i=0;i<P;i++) {
Si_p[i]=i+1;
Si_p[i+P]=-(i+1);
}
for(int i=0;i<(P*2)-1;i++)
for(int j=0;j<(P*2)-1;j++)
{
if(Si[j]<Si[j+1]){
double temp;
temp=Si[j];
Si[j]=Si[j+1];
Si[j+1]=temp;
int temp1;
temp1=Si_p[j];
Si_p[j]=Si_p[j+1];
Si_p[j+1]=temp1;
}
}
return Si_p;
}
static void getbinaryXY()
{
List<List<Integer>> Dlist = new ArrayList<List<Integer>>();
int[][] Adp = new int[D][P];
for (int d = 0; d < D; d++){
List<Integer> list = new ArrayList<Integer>();
for (int p = 0; p < P; p++) {
if (A[p] == (d + 1)){
Adp[d][p] = 1;
list.add(p+1);
}else
Adp[d][p] = 0;
}
Dlist.add(list);
}
Y = new int[P][];
for (int i = 0; i < Y.length; i++)
Y[i] = new int[1];
for (int p = 0; p < Y.length; p++)
for (int h = 0; h < Y[p].length; h++) {
for (int d = 0; d < D; d++)
Y[p][h] += Adp[d][p];
}
X = new int[D][];
for (int i = 0; i < D; i++)
X[i] = new int[1];
for (int d = 0; d < X.length; d++) {
for (int j = 0; j < X[d].length; j++) {
int a = 0;
for (int p = 0; p < P; p++)
a += Adp[d][p];
if (a >= 1)
X[d][j] = 1;
else
X[d][j] = 0;
}
}
for (int d = 0; d < X.length; d++)
for (int j = 0; j < X[d].length; j++)
binaryX[d]=X[d][j];
for (int p = 0; p < Y.length; p++)
for (int h = 0; h < Y[p].length; h++)
binaryY[p]=Y[p][h];
}
public static int getrid(int index) {
return rid[index];
}
public static double getSi(int index) {
return Si[index];
}
public static int getA(int index) {
return A[index];
}
public static int getB(int index) {
return B[index];
}
public static int getbinaryX(int index) {
return binaryX[index];
}
public static int getbinaryY(int index) {
return binaryY[index];
}
}
| [
"gtvsta99@gmail.com"
] | gtvsta99@gmail.com |
5681cd712fb59c970e6c026fd18036b097debbb1 | 69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e | /methods/Method_1559.java | 46611af31af70497f5e29192c9f27308b6e84a78 | [] | no_license | P79N6A/icse_20_user_study | 5b9c42c6384502fdc9588430899f257761f1f506 | 8a3676bc96059ea2c4f6d209016f5088a5628f3c | refs/heads/master | 2020-06-24T08:25:22.606717 | 2019-07-25T15:31:16 | 2019-07-25T15:31:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 350 | java | private synchronized void prune(LinkedEntry<T> bucket){
LinkedEntry<T> prev=bucket.prev;
LinkedEntry<T> next=bucket.next;
if (prev != null) {
prev.next=next;
}
if (next != null) {
next.prev=prev;
}
bucket.prev=null;
bucket.next=null;
if (bucket == mHead) {
mHead=next;
}
if (bucket == mTail) {
mTail=prev;
}
}
| [
"sonnguyen@utdallas.edu"
] | sonnguyen@utdallas.edu |
2bb6d060bd09eddb580f53c90baadd6371cee081 | 79a6cf43828280dde4a8957ab2878def495cde95 | /platform/platform-impl/src/main/java/com/asiainfo/rms/system/redis/dao/RedisCommonDAO.java | f024241f4a19a2503bbf7e20ece150b1b13933b9 | [] | no_license | zostudy/cb | aeee90afde5f83fc8fecb02073c724963cf3c44f | c18b3d6fb078d66bd45f446707e67d918ca57ae0 | refs/heads/master | 2020-05-17T22:24:44.910256 | 2019-05-07T09:29:39 | 2019-05-07T09:29:39 | 183,999,895 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,307 | java | package com.asiainfo.rms.system.redis.dao;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import org.springframework.data.redis.core.RedisTemplate;
import com.asiainfo.rms.system.redis.operations.ZosHashOperations;
import com.asiainfo.rms.system.redis.operations.ZosListOperations;
import com.asiainfo.rms.system.redis.operations.ZosSetOperations;
import com.asiainfo.rms.system.redis.operations.ZosValueOperations;
import com.asiainfo.rms.system.redis.operations.ZosZSetOperations;
public interface RedisCommonDAO<V, HK, HV> {
public RedisTemplate<String, ?> redisTemplate();
public ZosValueOperations opsForValue();
public ZosListOperations<V> opsForList();
public ZosSetOperations<V> opsForSet();
public ZosZSetOperations<V> opsForZSet();
public ZosHashOperations<HK, HV> opsForHash();
public RedisTemplate<String, ?> redisTemplate(RedisTemplate<String, ?> redisTemplate);
public ZosValueOperations opsForValue(ZosValueOperations opsForValue);
public ZosListOperations<V> opsForList(ZosListOperations<V> opsForList);
public ZosSetOperations<V> opsForSet(ZosSetOperations<V> opsForSet);
public ZosZSetOperations<V> opsForZSet(ZosZSetOperations<V> opsForZSet);
public ZosHashOperations<HK, HV> opsForHash(ZosHashOperations<HK, HV> opsForHash);
/**
* 设置数据生存时长
*
* @param key 键
* @param timeout 时长
* @param unit 时间单位
* @return boolean
*/
public Boolean expire(String key, final Long timeout, final TimeUnit unit);
/**
* 设置数据过期时间
*
* @param key 键
* @param date 过期时间
* @return boolean
*/
public Boolean expireAt(String key, Date date);
/**
* 移除指定的键值
*
* @param key 键
* @return boolean
*/
public Boolean persist(String key);
/**
* 清空选中的数据库
*
* @return boolean
*/
public Boolean flushDB();
/**
* 数据库大小
*
* @return long
*/
public Long dbSize();
/**
* 检测是否联通
*
* @return string
*/
public String ping();
public String valueKey(String correct, V value);
public String listKey(String correct, V value);
public String setKey(String correct, V value);
public String zsetKey(String correct, V value);
public String hashKey(String correct, V value);
}
| [
"wangrupeng@foxmail.com"
] | wangrupeng@foxmail.com |
772763966df7883f95f30dd76c2017e0b16c0bee | 8c49003ae8e7b5662a9ee3c79abdb908463bef41 | /springboot/src/main/java/com/java110/boot/controller/app/PropertyController.java | 92755241fa9ee495e2616fa82411d5765d17f6fb | [
"Apache-2.0"
] | permissive | java110/MicroCommunity | 1cae5db3f185207fdabe670eedf89cdc5c413676 | fbcdd1974f247b020114d3c9b3f649f9e48d3182 | refs/heads/master | 2023-08-05T13:44:19.646780 | 2023-01-09T10:09:54 | 2023-01-09T10:09:54 | 129,351,237 | 820 | 381 | Apache-2.0 | 2023-02-22T07:05:27 | 2018-04-13T05:15:52 | Java | UTF-8 | Java | false | false | 2,907 | java | /*
* Copyright 2017-2020 吴学文 and java110 team.
*
* 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.java110.boot.controller.app;
import com.alibaba.fastjson.JSONObject;
import com.java110.boot.smo.login.IPropertyAppLoginSMO;
import com.java110.core.base.controller.BaseController;
import com.java110.core.context.IPageData;
import com.java110.core.context.PageData;
import com.java110.core.log.LoggerFactory;
import com.java110.utils.constant.CommonConstant;
import com.java110.utils.util.StringUtil;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import javax.servlet.http.HttpServletRequest;
/**
* 微信小程序登录处理类
*/
@RestController
@RequestMapping(path = "/app")
public class PropertyController extends BaseController {
private final static Logger logger = LoggerFactory.getLogger(PropertyController.class);
@Autowired
private IPropertyAppLoginSMO propertyAppLoginSMOImpl;
/**
* 微信登录接口
*
* @param postInfo
* @param request
*/
@RequestMapping(path = "/loginProperty", method = RequestMethod.POST)
public ResponseEntity<String> loginProperty(@RequestBody String postInfo, HttpServletRequest request) {
/*IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA);*/
String appId = request.getHeader("APP_ID");
if(StringUtil.isEmpty(appId)){
appId = request.getHeader("APP-ID");
}
IPageData pd = PageData.newInstance().builder("", "", "", postInfo,
"login", "", "", "",
appId);
ResponseEntity<String> responseEntity = propertyAppLoginSMOImpl.doLogin(pd);
if(responseEntity.getStatusCode() != HttpStatus.OK){
return responseEntity;
}
JSONObject outParam = JSONObject.parseObject(responseEntity.getBody());
pd.setToken(outParam.getString("token"));
request.setAttribute(CommonConstant.CONTEXT_PAGE_DATA,pd);
return responseEntity;
}
}
| [
"928255095@qq.com"
] | 928255095@qq.com |
5c2111708749935985f04621688f51205c3fdbd9 | 58a8ed34f613c281a5faaaefe5da1788f5739d17 | /Application_code_source/eMybaby/sources/com/tuya/smart/sdk/constant/ServiceNotification.java | b9090b255aef9c5c5656a478f889aa2f9b6197b2 | [] | no_license | wagnerwave/Dossier_Hacking_de_peluche | 01c78629e52a94ed6a208e11ff7fcd268e10956e | 514f81b1e72d88e2b8835126b2151e368dcad7fb | refs/heads/main | 2023-03-31T13:28:06.247243 | 2021-03-25T23:03:38 | 2021-03-25T23:03:38 | 351,597,654 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 966 | java | package com.tuya.smart.sdk.constant;
import android.app.Notification;
import com.tuya.smart.common.Oo0;
import com.tuya.smart.common.o0o00o00o0;
public class ServiceNotification {
public static final int mGetNotificationId = 2018062716;
public static final ServiceNotification mServiceNotication = new ServiceNotification();
public Notification mNotification;
public ServiceNotification() {
o0o00o00o0 o0o00o00o0 = (o0o00o00o0) Oo0.O000000o(o0o00o00o0.class);
if (o0o00o00o0 != null) {
this.mNotification = o0o00o00o0.O0000o0();
}
}
public static ServiceNotification getInstance() {
return mServiceNotication;
}
public Notification getNotification() {
return this.mNotification;
}
public int getNotificationId() {
return mGetNotificationId;
}
public void setNotification(Notification notification) {
this.mNotification = notification;
}
}
| [
"alexandre1.wagner@epitech.eu"
] | alexandre1.wagner@epitech.eu |
d5a3d58a9f7af43486bcdd598b3232d4ec51728e | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/29/29_9c64ac7482fde7bd8f2893eec29870588fcdcd04/InjectionMetadata/29_9c64ac7482fde7bd8f2893eec29870588fcdcd04_InjectionMetadata_t.java | 53f04952532a3b56a14ca9a57153ab2fe078c80c | [] | 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 | 6,961 | java | /*
* Copyright 2002-2011 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.springframework.beans.factory.annotation;
import java.beans.PropertyDescriptor;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Member;
import java.lang.reflect.Method;
import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedHashSet;
import java.util.Set;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.beans.MutablePropertyValues;
import org.springframework.beans.PropertyValues;
import org.springframework.beans.factory.support.RootBeanDefinition;
import org.springframework.util.ReflectionUtils;
/**
* Internal class for managing injection metadata.
* Not intended for direct use in applications.
*
* <p>Used by {@link AutowiredAnnotationBeanPostProcessor},
* {@link org.springframework.context.annotation.CommonAnnotationBeanPostProcessor} and
* {@link org.springframework.orm.jpa.support.PersistenceAnnotationBeanPostProcessor}.
*
* @author Juergen Hoeller
* @since 2.5
*/
public class InjectionMetadata {
private final Log logger = LogFactory.getLog(InjectionMetadata.class);
private final Set<InjectedElement> injectedElements;
public InjectionMetadata(Class targetClass, Collection<InjectedElement> elements) {
this.injectedElements = new LinkedHashSet<InjectedElement>();
for (InjectedElement element : elements) {
if (logger.isDebugEnabled()) {
logger.debug("Found injected element on class [" + targetClass.getName() + "]: " + element);
}
this.injectedElements.add(element);
}
}
public void checkConfigMembers(RootBeanDefinition beanDefinition) {
for (Iterator<InjectedElement> it = this.injectedElements.iterator(); it.hasNext();) {
Member member = it.next().getMember();
if (!beanDefinition.isExternallyManagedConfigMember(member)) {
beanDefinition.registerExternallyManagedConfigMember(member);
}
else {
it.remove();
}
}
}
public void inject(Object target, String beanName, PropertyValues pvs) throws Throwable {
if (!this.injectedElements.isEmpty()) {
boolean debug = logger.isDebugEnabled();
for (InjectedElement element : this.injectedElements) {
if (debug) {
logger.debug("Processing injected method of bean '" + beanName + "': " + element);
}
element.inject(target, beanName, pvs);
}
}
}
public static abstract class InjectedElement {
protected final Member member;
protected final boolean isField;
protected final PropertyDescriptor pd;
protected volatile Boolean skip;
protected InjectedElement(Member member, PropertyDescriptor pd) {
this.member = member;
this.isField = (member instanceof Field);
this.pd = pd;
}
public final Member getMember() {
return this.member;
}
protected final Class getResourceType() {
if (this.isField) {
return ((Field) this.member).getType();
}
else if (this.pd != null) {
return this.pd.getPropertyType();
}
else {
return ((Method) this.member).getParameterTypes()[0];
}
}
protected final void checkResourceType(Class resourceType) {
if (this.isField) {
Class fieldType = ((Field) this.member).getType();
if (!(resourceType.isAssignableFrom(fieldType) || fieldType.isAssignableFrom(resourceType))) {
throw new IllegalStateException("Specified field type [" + fieldType +
"] is incompatible with resource type [" + resourceType.getName() + "]");
}
}
else {
Class paramType =
(this.pd != null ? this.pd.getPropertyType() : ((Method) this.member).getParameterTypes()[0]);
if (!(resourceType.isAssignableFrom(paramType) || paramType.isAssignableFrom(resourceType))) {
throw new IllegalStateException("Specified parameter type [" + paramType +
"] is incompatible with resource type [" + resourceType.getName() + "]");
}
}
}
/**
* Either this or {@link #getResourceToInject} needs to be overridden.
*/
protected void inject(Object target, String requestingBeanName, PropertyValues pvs) throws Throwable {
if (this.isField) {
Field field = (Field) this.member;
ReflectionUtils.makeAccessible(field);
field.set(target, getResourceToInject(target, requestingBeanName));
}
else {
if (checkPropertySkipping(pvs)) {
return;
}
try {
Method method = (Method) this.member;
ReflectionUtils.makeAccessible(method);
method.invoke(target, getResourceToInject(target, requestingBeanName));
}
catch (InvocationTargetException ex) {
throw ex.getTargetException();
}
}
}
/**
* Checks whether this injector's property needs to be skipped due to
* an explicit property value having been specified. Also marks the
* affected property as processed for other processors to ignore it.
*/
protected boolean checkPropertySkipping(PropertyValues pvs) {
if (this.skip == null) {
if (pvs != null) {
synchronized (pvs) {
if (this.skip == null) {
if (this.pd != null) {
if (pvs.contains(this.pd.getName())) {
// Explicit value provided as part of the bean definition.
this.skip = true;
return true;
}
else if (pvs instanceof MutablePropertyValues) {
((MutablePropertyValues) pvs).registerProcessedProperty(this.pd.getName());
}
}
}
}
}
this.skip = false;
}
return this.skip;
}
/**
* Either this or {@link #inject} needs to be overridden.
*/
protected Object getResourceToInject(Object target, String requestingBeanName) {
return null;
}
@Override
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (!(other instanceof InjectedElement)) {
return false;
}
InjectedElement otherElement = (InjectedElement) other;
return this.member.equals(otherElement.member);
}
@Override
public int hashCode() {
return this.member.getClass().hashCode() * 29 + this.member.getName().hashCode();
}
@Override
public String toString() {
return getClass().getSimpleName() + " for " + this.member;
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
f2d321f73adf63533a3247b73ffa383d02eabf0a | 87c12bd26186e41ed6197437e0b1b15bfcc68fda | /csharp-psi-impl/src/org/mustbe/consulo/csharp/lang/psi/impl/source/resolve/type/CSharpElementGroupTypeRef.java | 0a3aa32c9b04098b0394453d052a80c1e2e0efda | [
"Apache-2.0"
] | permissive | electrowolff/consulo-csharp | 660c784441f8b2fc1c4d536bd9bb80cb4dd68a4a | 99b54761b24b394d3fd18650de3a5f112a52aa9a | refs/heads/master | 2021-01-22T14:29:07.054813 | 2016-07-30T09:19:51 | 2016-07-30T09:19:51 | 65,971,141 | 0 | 0 | null | 2016-08-18T06:27:38 | 2016-08-18T06:27:37 | null | UTF-8 | Java | false | false | 2,503 | java | package org.mustbe.consulo.csharp.lang.psi.impl.source.resolve.type;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.mustbe.consulo.RequiredReadAction;
import org.mustbe.consulo.csharp.lang.psi.impl.source.CSharpLikeMethodDeclarationImplUtil;
import org.mustbe.consulo.csharp.lang.psi.impl.source.resolve.methodResolving.MethodCalcResult;
import org.mustbe.consulo.csharp.lang.psi.impl.source.resolve.methodResolving.MethodResolver;
import org.mustbe.consulo.csharp.lang.psi.resolve.CSharpElementGroup;
import org.mustbe.consulo.dotnet.psi.DotNetLikeMethodDeclaration;
import org.mustbe.consulo.dotnet.resolve.DotNetTypeRef;
import org.mustbe.consulo.dotnet.resolve.DotNetTypeRefWithCachedResult;
import org.mustbe.consulo.dotnet.resolve.DotNetTypeResolveResult;
import com.intellij.psi.PsiElement;
/**
* @author VISTALL
* @since 26.10.14
*/
public class CSharpElementGroupTypeRef extends DotNetTypeRefWithCachedResult implements CSharpFastImplicitTypeRef
{
private final CSharpElementGroup<?> myElementGroup;
public CSharpElementGroupTypeRef(CSharpElementGroup<?> elementGroup)
{
myElementGroup = elementGroup;
}
@RequiredReadAction
@NotNull
@Override
protected DotNetTypeResolveResult resolveResult()
{
return DotNetTypeResolveResult.EMPTY;
}
@RequiredReadAction
@NotNull
@Override
public String toString()
{
return myElementGroup.getName();
}
@RequiredReadAction
@Nullable
@Override
public DotNetTypeRef doMirror(@NotNull DotNetTypeRef another, PsiElement scope)
{
DotNetTypeResolveResult typeResolveResult = another.resolve();
if(typeResolveResult instanceof CSharpLambdaResolveResult)
{
DotNetTypeRef[] parameterTypeRefs = ((CSharpLambdaResolveResult) typeResolveResult).getParameterTypeRefs();
for(PsiElement psiElement : myElementGroup.getElements())
{
if(psiElement instanceof DotNetLikeMethodDeclaration)
{
DotNetTypeRef[] methodParameterTypeRef = ((DotNetLikeMethodDeclaration) psiElement).getParameterTypeRefs();
MethodCalcResult calc = MethodResolver.calc(parameterTypeRefs, methodParameterTypeRef, scope);
if(calc.isValidResult())
{
return new CSharpLambdaTypeRef(scope, null, CSharpLikeMethodDeclarationImplUtil.getParametersInfos((DotNetLikeMethodDeclaration) psiElement),
((DotNetLikeMethodDeclaration) psiElement).getReturnTypeRef());
}
}
}
}
return null;
}
@Override
public boolean isConversion()
{
return false;
}
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
ca7de0f824d3811c19c72dbe19749e995ce69cf3 | a018b5f80b3c9c7c48f0cbe585857123f12bc89d | /src/me/noodles/tutorial2/PluginCommand.java | fbb59eb863249a6373fdf448ec0bc1050bad1580 | [
"MIT"
] | permissive | BGHDDevelopment/YouTube-Tutorial-EP-2 | 8b2f95fa21f649d9493cd886c92422c805666ae4 | bd34c2bef5c32387029832d809375669e3f25539 | refs/heads/master | 2021-06-11T05:25:12.200189 | 2021-03-03T17:44:50 | 2021-03-03T17:44:50 | 128,555,852 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 607 | java | package me.noodles.tutorial2;
import org.bukkit.command.Command;
import org.bukkit.command.CommandExecutor;
import org.bukkit.command.CommandSender;
import org.bukkit.entity.Player;
import net.md_5.bungee.api.ChatColor;
public class PluginCommand implements CommandExecutor {
@Override
public boolean onCommand(CommandSender sender, Command cmd, String label, String[] args) {
Player player = (Player) sender;
player.sendMessage(ChatColor.AQUA + "Hi YouTube its BGHDDevelopment!");
player.sendMessage(ChatColor.RED + "Hi YouTube its BGHDDevelopmentX2!");
return true;
}
}
| [
"unconfigured@null.spigotmc.org"
] | unconfigured@null.spigotmc.org |
2965b14a33734daf0f3ab79de6ea55e72f5bbb59 | f20b41c85d1d9a6ad8f74c2b815cd657954af0ad | /frontend/dist/src/test/java/org/smartdeveloperhub/harvesters/it/testing/TestingUtilTest.java | 22728de3f034f2b12763c213267983e7da008d54 | [
"Apache-2.0"
] | permissive | SmartDeveloperHub/sdh-it-harvester | 67e6f1fa002949e807f5fd69f019e84e7453c370 | 122c1cc79debc9f78567384d141f58d0d56369d5 | refs/heads/master | 2021-01-18T19:10:19.603775 | 2016-07-18T17:24:04 | 2016-07-18T17:24:04 | 56,482,219 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,568 | java | /**
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* This file is part of the Smart Developer Hub Project:
* http://www.smartdeveloperhub.org/
*
* Center for Open Middleware
* http://www.centeropenmiddleware.com/
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* Copyright (C) 2015-2016 Center for Open Middleware.
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* 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.
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
* Artifact : org.smartdeveloperhub.harvesters.it.frontend:it-frontend-dist:0.1.0
* Bundle : it-frontend-dist-0.1.0.war
* #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=#
*/
package org.smartdeveloperhub.harvesters.it.testing;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.equalTo;
import static org.junit.Assert.fail;
import org.junit.Test;
import org.junit.runner.RunWith;
import com.jayway.restassured.response.Response;
import mockit.Expectations;
import mockit.Mocked;
import mockit.integration.junit4.JMockit;
@RunWith(JMockit.class)
public class TestingUtilTest {
private final String badData=
"@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .\n"+
"@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .\n"+
"@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .\n"+
"@prefix uri: <urn:nuñez> ;";
@Mocked Response response;
@Test
public void testAsModelResponseString() throws Exception {
new Expectations() {{
TestingUtilTest.this.response.asByteArray();this.result=TestingUtilTest.this.badData.getBytes();
}};
try {
TestingUtil.asModel(this.response, "http://localhost:8080/iri");
fail("Should fail on bad data");
} catch (final AssertionError e) {
assertThat(e.getMessage(),equalTo("Could not parse response for http://localhost:8080/iri as Turtle RDF data"));
}
}
}
| [
"m.esteban.gutierrez@gmail.com"
] | m.esteban.gutierrez@gmail.com |
41671db06ea9ac2d2427a487476a23c638198285 | 05e5bee54209901d233f4bfa425eb6702970d6ab | /net/minecraft/server/v1_7_R4/PathfinderGoalEatTile.java | 0e86f042ef69fee32ade0794d2a0f2e18efadcf3 | [] | no_license | TheShermanTanker/PaperSpigot-1.7.10 | 23f51ff301e7eb05ef6a3d6999dd2c62175c270f | ea9d33bcd075e00db27b7f26450f9dc8e6d18262 | refs/heads/master | 2022-12-24T10:32:09.048106 | 2020-09-25T15:43:22 | 2020-09-25T15:43:22 | 298,614,646 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,011 | java | /* */ package net.minecraft.server.v1_7_R4;
/* */
/* */ import org.bukkit.Material;
/* */ import org.bukkit.craftbukkit.v1_7_R4.event.CraftEventFactory;
/* */
/* */
/* */ public class PathfinderGoalEatTile
/* */ extends PathfinderGoal
/* */ {
/* */ private EntityInsentient b;
/* */ private World c;
/* */ int a;
/* */
/* */ public PathfinderGoalEatTile(EntityInsentient entityinsentient) {
/* 15 */ this.b = entityinsentient;
/* 16 */ this.c = entityinsentient.world;
/* 17 */ a(7);
/* */ }
/* */
/* */ public boolean a() {
/* 21 */ if (this.b.aI().nextInt(this.b.isBaby() ? 50 : 1000) != 0) {
/* 22 */ return false;
/* */ }
/* 24 */ int i = MathHelper.floor(this.b.locX);
/* 25 */ int j = MathHelper.floor(this.b.locY);
/* 26 */ int k = MathHelper.floor(this.b.locZ);
/* */
/* 28 */ return (this.c.getType(i, j, k) == Blocks.LONG_GRASS && this.c.getData(i, j, k) == 1) ? true : ((this.c.getType(i, j - 1, k) == Blocks.GRASS));
/* */ }
/* */
/* */
/* */ public void c() {
/* 33 */ this.a = 40;
/* 34 */ this.c.broadcastEntityEffect(this.b, (byte)10);
/* 35 */ this.b.getNavigation().h();
/* */ }
/* */
/* */ public void d() {
/* 39 */ this.a = 0;
/* */ }
/* */
/* */ public boolean b() {
/* 43 */ return (this.a > 0);
/* */ }
/* */
/* */ public int f() {
/* 47 */ return this.a;
/* */ }
/* */
/* */ public void e() {
/* 51 */ this.a = Math.max(0, this.a - 1);
/* 52 */ if (this.a == 4) {
/* 53 */ int i = MathHelper.floor(this.b.locX);
/* 54 */ int j = MathHelper.floor(this.b.locY);
/* 55 */ int k = MathHelper.floor(this.b.locZ);
/* */
/* 57 */ if (this.c.getType(i, j, k) == Blocks.LONG_GRASS) {
/* */
/* 59 */ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, this.b.world.getWorld().getBlockAt(i, j, k), Material.AIR, !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
/* 60 */ this.c.setAir(i, j, k, false);
/* */ }
/* */
/* 63 */ this.b.p();
/* 64 */ } else if (this.c.getType(i, j - 1, k) == Blocks.GRASS) {
/* */
/* 66 */ if (!CraftEventFactory.callEntityChangeBlockEvent(this.b, this.b.world.getWorld().getBlockAt(i, j - 1, k), Material.DIRT, !this.c.getGameRules().getBoolean("mobGriefing")).isCancelled()) {
/* 67 */ this.c.triggerEffect(2001, i, j - 1, k, Block.getId(Blocks.GRASS));
/* 68 */ this.c.setTypeAndData(i, j - 1, k, Blocks.DIRT, 0, 2);
/* */ }
/* */
/* 71 */ this.b.p();
/* */ }
/* */ }
/* */ }
/* */ }
/* Location: D:\Paper-1.7.10\PaperSpigot-1.7.10-R0.1-SNAPSHOT-latest.jar!\net\minecraft\server\v1_7_R4\PathfinderGoalEatTile.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"tanksherman27@gmail.com"
] | tanksherman27@gmail.com |
8f3439e372005c66f80b0c7f4ca8d3f96deaf0e8 | 754a0fdc13c70711b33a414e48f41333a7e8052d | /app/src/main/java/com/pbph/yuguo/response/GetAppWithdrawCashListResponse.java | 76421323592802b8f5dd71ae91b422375180c222 | [] | no_license | lianjf646/PbphYuGuo | b70b3315d9815af078101573066cbc215d46945c | 78e643cd1b0f142f96ce595fb0c5788b3e4bb09a | refs/heads/master | 2023-04-23T00:48:00.842462 | 2021-04-30T06:25:12 | 2021-04-30T06:25:12 | 363,044,826 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,077 | java | package com.pbph.yuguo.response;
import com.pbph.yuguo.base.BaseResponse;
import java.util.List;
/**
* 抵用券实体类
* Created by Administrator on 2018/8/6 0006.
*/
public class GetAppWithdrawCashListResponse extends BaseResponse {
/**
* data : {"dealsInfoDtoList":[{"createTime":"2018-08-21 21:30:33","dealPrice":100,"dealWay":0},{"createTime":"2018-08-21 21:30:54","dealPrice":100,"dealWay":0}]}
* totleSize : 2
*/
private DataBean data;
private int totleSize;
public DataBean getData() {
return data;
}
public void setData(DataBean data) {
this.data = data;
}
public int getTotleSize() {
return totleSize;
}
public void setTotleSize(int totleSize) {
this.totleSize = totleSize;
}
public static class DataBean {
private List<DealsInfoDtoListBean> dealsInfoDtoList;
public List<DealsInfoDtoListBean> getDealsInfoDtoList() {
return dealsInfoDtoList;
}
public void setDealsInfoDtoList(List<DealsInfoDtoListBean> dealsInfoDtoList) {
this.dealsInfoDtoList = dealsInfoDtoList;
}
public static class DealsInfoDtoListBean {
/**
* createTime : 2018-08-21 21:30:33
* dealPrice : 100
* dealWay : 0
*/
private String createTime;
private int dealPrice;
private int dealWay;
public String getCreateTime() {
return createTime;
}
public void setCreateTime(String createTime) {
this.createTime = createTime;
}
public int getDealPrice() {
return dealPrice;
}
public void setDealPrice(int dealPrice) {
this.dealPrice = dealPrice;
}
public int getDealWay() {
return dealWay;
}
public void setDealWay(int dealWay) {
this.dealWay = dealWay;
}
}
}
}
| [
"1548300188@qq.com"
] | 1548300188@qq.com |
c7dfcc3a4891ce0d61457b86a09347381030c38c | 508b36a019c51927f6e339ba842ee52006cfd944 | /src/main/java/sagex/remote/javarpc/JavaRPCHandler.java | e32375a807ed18206e13cd28a9d02d9784de488f | [
"Apache-2.0"
] | permissive | DanPerovich/sagetv-sagex-api | 798b1f8a56a859cb19a0cbaa54f4083a453d66cb | 2fed724ec8a381adba22f34c87e59750c83c2e81 | refs/heads/master | 2021-01-17T18:53:50.035026 | 2014-02-01T13:07:40 | 2014-02-01T13:07:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,685 | java | package sagex.remote.javarpc;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import sagex.remote.AbstractRPCHandler;
import sagex.remote.MarshalUtils;
import sagex.remote.RemoteRequest;
import sagex.remote.RemoteResponse;
import sagex.remote.SagexServlet.SageHandler;
import sagex.remote.rmi.RMIRPCHandler;
/**
* @deprecated use {@link RMIRPCHandler}
* @author sean
*
*/
public class JavaRPCHandler extends AbstractRPCHandler implements SageHandler {
public static final String SAGE_RPC_PATH = "rpcJava";
public static final String CMD_ARG = "request";
public JavaRPCHandler() {
super();
log.info("Sage Java RPC Servlet Created.");
}
public void handleRequest(String args[], HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String payload = req.getParameter(CMD_ARG);
resp.setContentType("text/plain");
PrintWriter pw = resp.getWriter();
pw.print(handleRPCCall(payload));
pw.flush();
}
public String handleRPCCall(String payload) {
RemoteResponse response = new RemoteResponse();
if (payload == null) {
response.setError(500, "Request did not contain a RPC Call.", new Exception("Missing Payload"));
} else {
try {
RemoteRequest request = (RemoteRequest) MarshalUtils.unmarshal(payload);
handleRPCCall(request, response);
} catch (Exception e) {
response.setError(500, "Failed to process the RPC Call!", e);
}
}
try {
return MarshalUtils.marshal(response);
} catch (IOException e) {
e.printStackTrace();
return null;
}
}
}
| [
"sean.stuckless@gmail.com"
] | sean.stuckless@gmail.com |
742c0bcaefe34eae2ff805d9e1e7594adcada439 | d7c5121237c705b5847e374974b39f47fae13e10 | /airspan.netspan/src/main/java/Netspan/NBI_17_0/Lte/RelayEnbPnpConfigCreateResponse.java | 4f52b3992fac5683af29d5bf328c1a2e8d7b2dd0 | [] | 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 | 1,884 | java |
package Netspan.NBI_17_0.Lte;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for anonymous complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="RelayEnbPnpConfigCreateResult" type="{http://Airspan.Netspan.WebServices}NodeActionResult" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"relayEnbPnpConfigCreateResult"
})
@XmlRootElement(name = "RelayEnbPnpConfigCreateResponse")
public class RelayEnbPnpConfigCreateResponse {
@XmlElement(name = "RelayEnbPnpConfigCreateResult")
protected NodeActionResult relayEnbPnpConfigCreateResult;
/**
* Gets the value of the relayEnbPnpConfigCreateResult property.
*
* @return
* possible object is
* {@link NodeActionResult }
*
*/
public NodeActionResult getRelayEnbPnpConfigCreateResult() {
return relayEnbPnpConfigCreateResult;
}
/**
* Sets the value of the relayEnbPnpConfigCreateResult property.
*
* @param value
* allowed object is
* {@link NodeActionResult }
*
*/
public void setRelayEnbPnpConfigCreateResult(NodeActionResult value) {
this.relayEnbPnpConfigCreateResult = value;
}
}
| [
"dshalom@airspan.com"
] | dshalom@airspan.com |
7782a74f6000d3cd72b4e64cf573bb939b332684 | 36a80ecec12da8bf43980768a920c28842d2763b | /src/main/java/com/tools20022/repository/codeset/PledgeeTypeCode.java | 6f6aedef08abfdd0f8e624a1e420c47a8b3139d8 | [] | no_license | bukodi/test02 | e9045f6f88d44a5833b1cf32b15a3d7b9a64aa83 | 30990a093e1239b4244c2a64191b6fe1eacf3b00 | refs/heads/master | 2021-05-08T03:22:32.792980 | 2017-10-24T23:00:52 | 2017-10-24T23:00:52 | 108,186,993 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,747 | java | package com.tools20022.repository.codeset;
import com.tools20022.metamodel.MMCode;
import com.tools20022.metamodel.MMCodeSet;
import java.util.Arrays;
import java.util.concurrent.atomic.AtomicReference;
/**
* Specifies the type of pledgee.
*/
public class PledgeeTypeCode {
final static private AtomicReference<MMCodeSet> mmObject_lazy = new AtomicReference<>();
/**
* Financial instruments are pledged to a regulatory body.
*/
public static final MMCode RegulatoryBody = new MMCode() {
{
registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "RegulatoryBody";
definition = "Financial instruments are pledged to a regulatory body.";
owner_lazy = () -> PledgeeTypeCode.mmObject();
codeName = "REGB";
}
};
/**
* Financial instruments are pledged to a counterparty.
*/
public static final MMCode Counterparty = new MMCode() {
{
registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.PROVISIONALLY_REGISTERED;
name = "Counterparty";
definition = "Financial instruments are pledged to a counterparty.";
owner_lazy = () -> PledgeeTypeCode.mmObject();
codeName = "CPTY";
}
};
static public MMCodeSet mmObject() {
mmObject_lazy.compareAndSet(null, new MMCodeSet() {
{
dataDictionary_lazy = () -> com.tools20022.repository.GeneratedRepository.dataDict;
registrationStatus = com.tools20022.metamodel.MMRegistrationStatus.REGISTERED;
name = "PledgeeTypeCode";
definition = "Specifies the type of pledgee.";
code_lazy = () -> Arrays.asList(com.tools20022.repository.codeset.PledgeeTypeCode.RegulatoryBody, com.tools20022.repository.codeset.PledgeeTypeCode.Counterparty);
}
});
return mmObject_lazy.get();
}
} | [
"bukodi@gmail.com"
] | bukodi@gmail.com |
02bb0dd5c9eaa13c29cd5ec93efc2392c7fdebbb | 35c9b4e30b05e17942f6a95544fc1a099e81bb7e | /interfaces/src/main/java/org/jeesl/interfaces/model/module/survey/question/JeeslSurveySection.java | 4fde5c6dedd6befbbbf74c656fc94b5b64bef80f | [] | no_license | kmeier86/jeesl | cef55c75e0b93173a97d7c54624a2a018cdadcfc | a86d8b8c99905a6bb1cd8a37cbec777bd17269a0 | refs/heads/master | 2020-12-28T16:47:24.936935 | 2020-02-20T12:20:57 | 2020-02-20T12:20:57 | 238,410,366 | 0 | 0 | null | 2020-02-20T12:20:58 | 2020-02-05T09:16:03 | Java | UTF-8 | Java | false | false | 2,445 | java | package org.jeesl.interfaces.model.module.survey.question;
import java.io.Serializable;
import java.util.List;
import org.jeesl.interfaces.model.marker.jpa.EjbRemoveable;
import org.jeesl.interfaces.model.marker.jpa.EjbSaveable;
import org.jeesl.interfaces.model.module.survey.core.JeeslSurveyTemplate;
import org.jeesl.interfaces.model.system.locale.JeeslDescription;
import org.jeesl.interfaces.model.system.locale.JeeslLang;
import org.jeesl.interfaces.model.with.EjbWithRendered;
import org.jeesl.interfaces.model.with.code.EjbWithCode;
import org.jeesl.interfaces.model.with.number.EjbWithLevel;
import org.jeesl.interfaces.model.with.position.EjbWithPosition;
import org.jeesl.interfaces.model.with.text.EjbWithRemark;
import net.sf.ahtutils.model.interfaces.with.EjbWithDescription;
import net.sf.ahtutils.model.interfaces.with.EjbWithLang;
import net.sf.ahtutils.model.interfaces.with.EjbWithVisible;
public interface JeeslSurveySection<L extends JeeslLang, D extends JeeslDescription,
TEMPLATE extends JeeslSurveyTemplate<L,D,?,TEMPLATE,?,?,?,SECTION,?,?>,
SECTION extends JeeslSurveySection<L,D,TEMPLATE,SECTION,QUESTION>,
QUESTION extends JeeslSurveyQuestion<L,D,SECTION,?,?,?,?,?,?,?,?>>
extends Serializable,EjbSaveable,EjbRemoveable
,EjbWithCode,EjbWithRemark,EjbWithPosition,EjbWithLevel,EjbWithVisible,EjbWithRendered,
EjbWithLang<L>,EjbWithDescription<D>
{
public enum Attributes{template,visible,position}
TEMPLATE getTemplate();
void setTemplate(TEMPLATE template);
SECTION getSection();
void setSection(SECTION section);
List<SECTION> getSections();
void setSections(List<SECTION> sections);
List<QUESTION> getQuestions();
void setQuestions(List<QUESTION> questions);
String getColumnClasses();
void setColumnClasses(String columnClasses);
Double getScoreLimit();
void setScoreLimit(Double scoreLimit);
Double getScoreNormalize();
void setScoreNormalize(Double scoreNormalize);
Boolean getShowCode();
void setShowCode(Boolean showCode);
Boolean getShowTopic();
void setShowTopic(Boolean showTopic);
Boolean getShowQuestion();
void setShowQuestion(Boolean showQuestion);
Boolean getShowRemark();
void setShowRemark(Boolean showRemark);
Boolean getShowLineBreakQuestion();
void setShowLineBreakQuestion(Boolean showLineBreakQuestion);
Boolean getShowLineBreakRemark();
void setShowLineBreakRemark(Boolean showLineBreakRemark);
} | [
"t.kisner@web.de"
] | t.kisner@web.de |
385d2ab9bf427d333f7c656a9bb4f60eb28eedf0 | 7a637e9654f3b6720d996e9b9003f53e40f94814 | /aylson-admin/src/main/java/com/aylson/dc/mem/service/ArticleService.java | ae5721d3d7e80196220c08771d81202d13f588bb | [] | no_license | hemin1003/aylson-parent | 118161fc9f7a06b583aa4edd23d36bdd6e000f33 | 1a2a4ae404705871717969449370da8531028ff9 | refs/heads/master | 2022-12-26T14:12:19.452615 | 2019-09-20T01:58:40 | 2019-09-20T01:58:40 | 97,936,256 | 161 | 103 | null | 2022-12-16T07:38:18 | 2017-07-21T10:30:03 | JavaScript | UTF-8 | Java | false | false | 1,964 | java | package com.aylson.dc.mem.service;
import java.util.List;
import com.aylson.core.frame.base.Page;
import com.aylson.core.frame.domain.Result;
import com.aylson.core.frame.service.BaseService;
import com.aylson.dc.mem.po.Article;
import com.aylson.dc.mem.po.ArticleRead;
import com.aylson.dc.mem.po.ArticleReply;
import com.aylson.dc.mem.search.ArticleSearch;
import com.aylson.dc.mem.vo.ArticleReadVo;
import com.aylson.dc.mem.vo.ArticleReplyVo;
import com.aylson.dc.mem.vo.ArticleVo;
public interface ArticleService extends BaseService<Article,ArticleSearch> {
/**
* 添加读取情况
* @param articleRead
* @return
*/
public Boolean addReadInfo(ArticleRead articleRead);
/**
* 查询读取情况
* @param articleSearch
* @return
*/
public List<ArticleReadVo> getReadInfo(ArticleSearch articleSearch);
/**
* 查询回复情况
* @param articleSearch
* @return
*/
public List<ArticleReplyVo> getReplyInfo(ArticleSearch articleSearch);
/**
* 获取回复分页列表
*/
public Page<ArticleReplyVo> getReplyPage(ArticleSearch articleSearch);
/**
* 添加回复情况
* @param articleReply
* @return
*/
public Boolean addReplyInfo(ArticleReply articleReply);
/**
* 更新点赞数
* @param articleId
* @return
*/
public Result praise(Integer articleId);
/**
* 更新分享数
* @param articleId
* @return
*/
public Result share(Integer articleId);
/**
* 发表文章
* @param articleVo
* @param memberId
* @return
*/
public Result publishArticle(ArticleVo articleVo, String memberId);
/**
* 获取文章详情
* @param articleId
* @param memberId
* @return
*/
public Result getArticle(Integer articleId, String memberId);
/**
* 回复文章
* @param articleReply
* @return
*/
public Result replyArticle(ArticleReply articleReply, String memberId);
}
| [
"hemin_it@163.com"
] | hemin_it@163.com |
f0081145bf75202bea9868e2c761a936b87ba81f | 64455b7ce0658de6992bb219d8b150dddb30881c | /quartz-bcp/src/main/java/br/com/bcp/repository/SchedulerRepository.java | 9ff0ba476c4a1789e237fb6ecb8d386abeb7ceb7 | [] | no_license | bproenca/java | f1fba9f21026a67ec3131fed39692999ef6faed0 | 0b9a9c9620e60b22a57cc61fa3bd467269e270db | refs/heads/master | 2023-01-09T15:34:48.597389 | 2019-12-21T21:46:42 | 2019-12-21T21:46:42 | 202,936,509 | 0 | 0 | null | 2023-01-02T21:58:51 | 2019-08-17T22:25:25 | HTML | UTF-8 | Java | false | false | 287 | java | package br.com.bcp.repository;
import br.com.bcp.entity.SchedulerJobInfo;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface SchedulerRepository extends JpaRepository<SchedulerJobInfo, Long> {
} | [
"bruno.proenca@synchro.com.br"
] | bruno.proenca@synchro.com.br |
7c883819dd4afbf196d1bfdf2a3ab3907b0ad575 | 1f91cf15d43d89ed4d5f109e4358857dc121b96b | /AOP/My-Spring5-AOP-examples/src/main/java/com/myaop/app03/ch01/proxies/DefaultSimpleBean.java | 35d741d41188ce4bb3b1d4bf3796b1dcae9a5f57 | [] | no_license | softwareengineerhub/spring | 384aa3f0f423db4ffbc0aef6684e1706f724e1ed | fdd961e839892eb78f831b5490f7a59442911b45 | refs/heads/master | 2023-06-23T15:30:45.090708 | 2023-06-08T08:27:37 | 2023-06-08T08:27:37 | 147,172,612 | 0 | 0 | null | 2023-01-27T20:08:46 | 2018-09-03T08:11:35 | Java | UTF-8 | Java | false | false | 536 | java | /*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package com.myaop.app03.ch01.proxies;
/**
*
* @author Denys.Prokopiuk
*/
public class DefaultSimpleBean implements SimpleBean {
private long dummy;
@Override
public void advised() {
dummy = System.currentTimeMillis();
}
@Override
public void unadvised() {
dummy = System.currentTimeMillis();
}
}
| [
"denis4321@ukr.net"
] | denis4321@ukr.net |
9443fdbf32bc5ed3f794a70c78ce930628e2f530 | bdaca4aa07672d6b73c8eb6491290bbcb5d53030 | /528-Random-Pick-with-Weight/solution.java | 82e31fac8d88cdaa54da06661fd0c8d266f4e60f | [] | no_license | zacw7/LeetCodeSolution | 9b4102ffa69ff0d0fc15bd546c7fa0c8ae9971a7 | 6293fa5893864dc52d161c2532bc985e12d07598 | refs/heads/master | 2022-03-29T13:14:06.664763 | 2020-01-19T21:27:40 | 2020-01-19T21:27:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,004 | java | class Solution {
private Random rand;
private int[] weights;
public Solution(int[] w) {
this.rand = new Random();
this.weights = new int[w.length];
weights[0] = w[0];
for (int i = 1; i < w.length; i++) {
weights[i] = weights[i - 1] + w[i];
}
}
public int pickIndex() {
int w = rand.nextInt(weights[weights.length - 1]);
int lo = 0, hi = weights.length - 1;
while (lo + 1 < hi) {
int mid = lo + (hi - lo) / 2;
if (weights[mid] <= w) {
lo = mid;
} else if (weights[mid - 1] > w) {
hi = mid;
} else {
return mid;
}
}
if (w < weights[hi] && w >= weights[lo]) {
return hi;
} else {
return lo;
}
}
}
/**
* Your Solution object will be instantiated and called as such:
* Solution obj = new Solution(w);
* int param_1 = obj.pickIndex();
*/ | [
"zac.wen7@gmail.com"
] | zac.wen7@gmail.com |
3afee6f35946e4dd2926e067ecc5950ca0a69b63 | d6dfdc83446a0c8f4539227d0f674cf9289bdb08 | /bundle/jsky.app.ot/src/main/java/jsky/app/ot/tpe/TpeSkyDialogEd.java | f81bff8ead6a2954dae9f04d3dcb3e900b85eba3 | [
"MIT"
] | permissive | gitter-badger/ocs | 6c3c795ce288f101eff6a800d320b4735ed95571 | 9329213adcb1ff60cea76e4feb426ed79985361f | refs/heads/develop | 2020-12-11T04:12:28.014282 | 2015-06-16T01:17:13 | 2015-06-16T01:17:13 | 37,540,475 | 0 | 0 | null | 2015-06-16T15:57:10 | 2015-06-16T15:57:09 | null | UTF-8 | Java | false | false | 2,507 | java | package jsky.app.ot.tpe;
import jsky.catalog.CatalogDirectory;
import jsky.catalog.Catalog;
import jsky.catalog.gui.CatalogNavigator;
import jsky.catalog.gui.StoreImageServerAction;
import jsky.util.gui.DialogUtil;
import javax.swing.*;
import java.awt.*;
/**
* Editor for the SkyDialogForm
*/
public class TpeSkyDialogEd {
private TpeSkyDialogForm _dialog;
private static TpeSkyDialogEd _instance;
private TpeSkyDialogEd() {
_dialog = new TpeSkyDialogForm();
_dialog.setPreferredSize(new Dimension(400, 100));
_initialize();
}
public static TpeSkyDialogEd getInstance() {
if (_instance == null) {
_instance = new TpeSkyDialogEd();
}
return _instance;
}
public void showDialog(Component parent) {
int res = JOptionPane.showOptionDialog(parent,
_dialog, "Select Image Server", JOptionPane.OK_CANCEL_OPTION,
JOptionPane.PLAIN_MESSAGE, null, null, null);
if (res != JOptionPane.OK_OPTION) {
return;
}
Catalog c = (Catalog)_dialog.catalogComboBox.getSelectedItem();
// Store the catalog in the property file using the action... :)
_dialog.catalogComboBox.setAction(StoreImageServerAction.getAction(c));
_dialog.catalogComboBox.setSelectedItem(c);
//perform the query
TelescopePosEditor tpe = TpeManager.open();
try {
tpe.getSkyImage();
} catch (Exception ex) {
DialogUtil.error(parent, ex);
}
}
private void _initialize() {
CatalogDirectory dir = _getCatalogDirectory();
if (dir == null) return;
int nCat = dir.getNumCatalogs();
for (int i = 0; i < nCat; i++) {
Catalog c = dir.getCatalog(i);
if (c != null && c.isImageServer()) {
_dialog.catalogComboBox.addItem(c);
}
}
//don't need to set a default one, since this dialog only
//shows up when there is no default!
}
// return the catalog directory used by the catalog window
private CatalogDirectory _getCatalogDirectory() {
CatalogDirectory dir;
try {
dir = CatalogNavigator.getCatalogDirectory();
} catch (Exception e) {
DialogUtil.error(e);
return null;
}
if (dir == null) {
DialogUtil.error("No catalog config file was found");
}
return dir;
}
}
| [
"swalker2m@gmail.com"
] | swalker2m@gmail.com |
e97a77fc681a8fb1f23acdadebf3e5799d24b78c | 4ec09872b11b2986afd71b7434ea6858455da533 | /java8/src/test/java/com/shekhargulati/ninetynine_problems/_02_arithmetic/P37Test.java | 3c457e2616eb605d86163380135ee69d213b725e | [
"MIT"
] | permissive | clever-qiu/99-problems | 16f52412bd2c4de79af8d8ba676a07138a3d3135 | 5bca0720322cec0a45dab3488ed2a88d06eb3d42 | refs/heads/master | 2021-06-08T19:45:10.882161 | 2021-04-22T07:07:51 | 2021-04-22T07:07:51 | 139,428,271 | 0 | 0 | MIT | 2018-07-02T10:29:34 | 2018-07-02T10:29:34 | null | UTF-8 | Java | false | false | 346 | java | package com.shekhargulati.ninetynine_problems._02_arithmetic;
import org.junit.Test;
import static org.hamcrest.CoreMatchers.equalTo;
import static org.junit.Assert.assertThat;
public class P37Test {
@Test
public void gcdOf36And63Is9() throws Exception {
int gcd = P37.gcd(36, 63);
assertThat(gcd, equalTo(9));
}
} | [
"shekhargulati84@gmail.com"
] | shekhargulati84@gmail.com |
cdf6e076f8e60109dc136050eefa3865005d38f7 | cc6ebd1214a2a33bbb5de97449bd30b986c38f61 | /test-module/src/main/java/org/picketlink/test/module/entity/AttributeReferenceTypeEntity.java | 4837bdedc9777f9c6786ac923baca2c56fa179ab | [] | no_license | picketlink/picketlink-tests | aacdf967b85798f0897122094bf878e28e748e79 | 153ae9ad2771f671b3986976f0afc7d45b353bf0 | refs/heads/master | 2020-05-28T13:29:16.505241 | 2015-12-17T04:13:05 | 2015-12-17T04:13:05 | 16,284,113 | 0 | 1 | null | 2014-07-24T07:00:12 | 2014-01-27T16:05:21 | Java | UTF-8 | Java | false | false | 2,794 | java | /*
* JBoss, Home of Professional Open Source
*
* Copyright 2013 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.picketlink.test.module.entity;
import org.picketlink.idm.jpa.annotations.AttributeClass;
import org.picketlink.idm.jpa.annotations.AttributeName;
import org.picketlink.idm.jpa.annotations.AttributeValue;
import org.picketlink.idm.jpa.annotations.OwnerReference;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import java.io.Serializable;
/**
* @author pedroigor
*/
@Entity
public class AttributeReferenceTypeEntity implements Serializable {
private static final long serialVersionUID = 5255050503622214581L;
@Id
@GeneratedValue
private Long id;
@OwnerReference
private String owner;
@AttributeClass
private String typeName;
@AttributeName
private String name;
@AttributeValue
@Column(length = 1024)
private String value;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
@Override
public boolean equals(Object obj) {
if (obj == null) {
return false;
}
if (!getClass().isInstance(obj)) {
return false;
}
AttributedTypeEntity other = (AttributedTypeEntity) obj;
return getId() != null && other.getId() != null && getId().equals(other.getId());
}
@Override
public int hashCode() {
int result = getId() != null ? getId().hashCode() : 0;
result = 31 * result + (getId() != null ? getId().hashCode() : 0);
return result;
}
}
| [
"pigor.craveiro@gmail.com"
] | pigor.craveiro@gmail.com |
65cb409b607e92c13cedfe506dcccfd0bc342b0c | 7a682dcc4e284bced37d02b31a3cd15af125f18f | /bitcamp-java-basic/src/main/java/ch22/a/Test10_3.java | eef1993d78fdeed11e0983fbc90b473d24abacbe | [] | no_license | eomjinyoung/bitcamp-java-20190527 | a415314b74954f14989042c475a4bf36b7311a8c | 09f1b677587225310250078c4371ed94fe428a35 | refs/heads/master | 2022-03-15T04:33:15.248451 | 2019-11-11T03:33:58 | 2019-11-11T03:33:58 | 194,775,330 | 4 | 3 | null | null | null | null | UTF-8 | Java | false | false | 548 | java | // java.io.File 클래스 : 필터 사용하기 III
package ch22.a;
import java.io.File;
import java.io.FilenameFilter;
public class Test10_3 {
public static void main(String[] args) throws Exception {
File file = new File(".");
// anonymous class
String[] names = file.list(new FilenameFilter() {
@Override
public boolean accept(File dir, String name) {
return name.endsWith(".txt");
}
});
for (String name : names) {
System.out.println(name);
}
}
}
| [
"jinyoung.eom@gmail.com"
] | jinyoung.eom@gmail.com |
6138a0b1bac1d64fc2f2c3cccbbacd6d15d9031d | 088cad7c00db1e05ad2ab219e393864f3bf7add6 | /classes/android/support/v4/text/ICUCompat$ICUCompatImplIcs.java | fcc835cadc7aac94695456c8148bfec92851e960 | [] | no_license | devidwfreitas/com-santander-app.7402 | 8e9f344f5132b1c602d80929f1ff892293f4495d | e9a92b20dc3af174f9b27ad140643b96fb78f04d | refs/heads/main | 2023-05-01T09:33:58.835056 | 2021-05-18T23:54:43 | 2021-05-18T23:54:43 | 368,692,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 482 | java | package android.support.v4.text;
import java.util.Locale;
class ICUCompat$ICUCompatImplIcs implements ICUCompat$ICUCompatImpl {
public String maximizeAndGetScript(Locale paramLocale) {
return ICUCompatIcs.maximizeAndGetScript(paramLocale);
}
}
/* Location: C:\Users\devid\Downloads\SAST\Santander\dex2jar-2.0\classes-dex2jar.jar!\android\support\v4\text\ICUCompat$ICUCompatImplIcs.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 1.1.3
*/ | [
"devid.wfreitas@gmail.com"
] | devid.wfreitas@gmail.com |
789174e09376c1ce83d8cf7ddb2785e00a9b3cf6 | de0ea3fb1104b2c9f4043bb5c9cee01a9a951235 | /core/src/main/java/io/sundr/builder/Fluent.java | 144967ca76b45037f8ecdd46ecf0fc7d6d9053cb | [
"Apache-2.0"
] | permissive | gastaldi/sundrio | 4600630afbcbaa83c2dd3420aa7667a60a1826c3 | 2ea48df4702beab8eada3b041549c58ce5ce3052 | refs/heads/master | 2022-11-30T22:41:00.566911 | 2020-06-02T07:49:29 | 2020-06-02T07:49:29 | 285,860,513 | 0 | 0 | Apache-2.0 | 2020-08-07T15:19:54 | 2020-08-07T15:19:54 | null | UTF-8 | Java | false | false | 956 | java | /*
* Copyright 2015 The original 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 io.sundr.builder;
/**
* The base interface for Fluent interfaces.
* Implementers of this interface are usually classes that need to provide chained method calls (e.g. Builders).
* @param <F> The type that is expected to be returned by the Fluent methods.
*/
public interface Fluent<F extends Fluent<F>> {
}
| [
"iocanel@gmail.com"
] | iocanel@gmail.com |
57b636b490ef07c46f7a32af927d1a9cca346a5e | 182b7e5ca415043908753d8153c541ee0e34711c | /SpringBasics/spring-core-annotation/src/test/java/com/vinaylogics/springbasics/springannotation/config/CollectionConfigTest.java | 9500e5dfcdd49055ee7d42aaf50612b057fd9e76 | [] | no_license | akamatagi/Java9AndAbove | 2b62886441241ef4cd62990243d7b29e895452f7 | ff002a2395edf506091b3571a470c15fa0742550 | refs/heads/master | 2023-02-09T17:38:21.467950 | 2020-12-30T14:47:59 | 2020-12-30T14:47:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 889 | java | package com.vinaylogics.springbasics.springannotation.config;
import com.vinaylogics.springbasics.springannotation.model.Address;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import static org.junit.jupiter.api.Assertions.*;
class CollectionConfigTest {
AnnotationConfigApplicationContext context;
@BeforeEach
void setUp() {
context = new AnnotationConfigApplicationContext();
context.register(CollectionConfig.class);
context.refresh();
}
@Test
void testAddress() {
Address address = context.getBean(Address.class);
address.getAddressList();
address.getAddressSet();
address.getAddressMap();
address.getAddressProp();
address.getName();
address.getNullName();
}
} | [
"vinayagam.d.ganesh@gmail.com"
] | vinayagam.d.ganesh@gmail.com |
55f354e98e5a5675903042b3317d80994c868bed | bacde5bb0effd64aa061a729d73e07642d876368 | /cnc/BuddyUp/src/com/cnc/buddyup/wheel/AgeWheelActivity.java | 0370b3eed9d81fc6caf0d8b6a4f028d44306fd0f | [] | no_license | fordream/store-vnp | fe10d74acd1a780fb88f90e4854d15ce44ecb68c | 6ca37dd4a69a63ea65d601aad695150e70f8d603 | refs/heads/master | 2020-12-02T15:05:14.994903 | 2015-10-23T13:52:51 | 2015-10-23T13:52:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,786 | java | package com.cnc.buddyup.wheel;
import java.util.List;
import kankan.wheel.widget.OnWheelScrollListener;
import kankan.wheel.widget.WheelView;
import kankan.wheel.widget.adapters.ArrayWheelAdapter;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import com.cnc.buddyup.R;
import com.cnc.buddyup.common.Common;
import com.cnc.buddyup.common.views.LoadingView;
import com.cnc.buddyup.request.RequestAge;
import com.cnc.buddyup.response.ResponseAge;
import com.cnc.buddyup.response.item.Age;
import com.cnc.buddyup.sign.paracelable.CountryParcacelable;
public class AgeWheelActivity extends Activity implements OnClickListener {
private WheelView city;
@SuppressWarnings("unused")
private CountryParcacelable countryParcacelable;
private String cities1[];
private LoadingView loadingView;
private String id = "";
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.wheel);
loadingView = (LoadingView)findViewById(R.id.loadingView1);
city = (WheelView) findViewById(R.id.signup_wheel_country_wheel);
countryParcacelable = getIntent().getExtras()
.getParcelable(Common.ARG0);
id = getIntent().getExtras().getString(Common.ARG1);
city.addScrollingListener(new OnWheelScrollListener() {
public void onScrollingStarted(WheelView wheel) {
}
public void onScrollingFinished(WheelView wheel) {
int index = city.getCurrentItem();
Intent intent = new Intent();
Bundle daBundle = new Bundle();
daBundle.putString(Common.ARG0, cities1[index]);
intent.putExtras(daBundle);
setResult(RESULT_OK, intent);
finish();
}
});
new AsynAge().execute("");
//updateCities1(countryParcacelable, id);
}
private void showLoadingView(final boolean isShow){
loadingView.post(new Runnable() {
public void run() {
loadingView.setVisibility(isShow? View.VISIBLE : View.GONE);
}
});
}
private class AsynAge extends AsyncTask<String, String, String>{
private ResponseAge responseAge;
protected String doInBackground(String... params) {
RequestAge requestAge = new RequestAge();
responseAge = ResponseAge.getData(requestAge);
return null;
}
protected void onPostExecute(String result) {
super.onPostExecute(result);
updateCities1(responseAge);
showLoadingView(false);
}
}
// private void updateCities1(CountryParcacelable countryParcacelable,
// String id) {
// List<Age> lAges = new DBAdapter(this).getLAge();
// cities1 = new String[lAges.size()];
//
// int index = -1;
// for (int i = 0; i < lAges.size(); i++) {
// cities1[i] = lAges.get(i).getValue();
// if (cities1[i].equals(id)) {
// index = i;
// }
// }
// ArrayWheelAdapter<String> adapter = new ArrayWheelAdapter<String>(this,
// cities1);
// adapter.setTextSize(18);
// city.setViewAdapter(adapter);
// city.setCurrentItem(index);
//
// }
public void updateCities1(ResponseAge responseAge) {
if("0".equals(responseAge.getStatus())){
List<Age> lAges = responseAge.getListAge();
cities1 = new String[lAges.size()];
int index = -1;
for (int i = 0; i < lAges.size(); i++) {
cities1[i] = lAges.get(i).getValue();
if (cities1[i].equals(id)) {
index = i;
}
}
ArrayWheelAdapter<String> adapter = new ArrayWheelAdapter<String>(this,
cities1);
adapter.setTextSize(18);
city.setViewAdapter(adapter);
city.setCurrentItem(index);
}else{
String title = getResources().getString(R.string.message1);
Common.builder(this, title, responseAge.getMessage());
}
}
public void onClick(View v) {
//String message = cities1[city.getCurrentItem()];
}
}
| [
"truongvv@atmarkcafe.org"
] | truongvv@atmarkcafe.org |
a360fdb2a0844a425cbb6a6dcfa01c658dc90d71 | 6f8feae2076fa253c5845fac95a7f6c4d2bda8b6 | /src/main/java/com/openlab/domain/AbstractAuditingEntity.java | 919ee85a5d8660d0a5ed210778a3d3b5cbe1456c | [] | no_license | Couldevlop/erp-gestion | 1703b0b3c25e3489c24d7d736737acd3f8328e26 | d0207221feb5b69a8e229f3985ce9f77e7747187 | refs/heads/main | 2023-07-17T16:48:04.872662 | 2021-08-25T15:06:56 | 2021-08-25T15:06:56 | 399,861,499 | 0 | 0 | null | 2021-08-25T16:28:35 | 2021-08-25T15:06:28 | Java | UTF-8 | Java | false | false | 2,164 | java | package com.openlab.domain;
import com.fasterxml.jackson.annotation.JsonIgnore;
import java.io.Serializable;
import java.time.Instant;
import javax.persistence.Column;
import javax.persistence.EntityListeners;
import javax.persistence.MappedSuperclass;
import org.springframework.data.annotation.CreatedBy;
import org.springframework.data.annotation.CreatedDate;
import org.springframework.data.annotation.LastModifiedBy;
import org.springframework.data.annotation.LastModifiedDate;
import org.springframework.data.jpa.domain.support.AuditingEntityListener;
/**
* Base abstract class for entities which will hold definitions for created, last modified, created by,
* last modified by attributes.
*/
@MappedSuperclass
@EntityListeners(AuditingEntityListener.class)
public abstract class AbstractAuditingEntity implements Serializable {
private static final long serialVersionUID = 1L;
@CreatedBy
@Column(name = "created_by", nullable = false, length = 50, updatable = false)
@JsonIgnore
private String createdBy;
@CreatedDate
@Column(name = "created_date", updatable = false)
@JsonIgnore
private Instant createdDate = Instant.now();
@LastModifiedBy
@Column(name = "last_modified_by", length = 50)
@JsonIgnore
private String lastModifiedBy;
@LastModifiedDate
@Column(name = "last_modified_date")
@JsonIgnore
private Instant lastModifiedDate = Instant.now();
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public Instant getCreatedDate() {
return createdDate;
}
public void setCreatedDate(Instant createdDate) {
this.createdDate = createdDate;
}
public String getLastModifiedBy() {
return lastModifiedBy;
}
public void setLastModifiedBy(String lastModifiedBy) {
this.lastModifiedBy = lastModifiedBy;
}
public Instant getLastModifiedDate() {
return lastModifiedDate;
}
public void setLastModifiedDate(Instant lastModifiedDate) {
this.lastModifiedDate = lastModifiedDate;
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
1c0c14e191a68edc78d68f9014886779da83c4cb | 7016cec54fb7140fd93ed805514b74201f721ccd | /src/java/com/echothree/control/user/search/common/form/GetVendorResultsForm.java | 7251d6ee93293b51fd382cc668adca37a0354afe | [
"MIT",
"Apache-1.1",
"Apache-2.0"
] | permissive | echothreellc/echothree | 62fa6e88ef6449406d3035de7642ed92ffb2831b | bfe6152b1a40075ec65af0880dda135350a50eaf | refs/heads/master | 2023-09-01T08:58:01.429249 | 2023-08-21T11:44:08 | 2023-08-21T11:44:08 | 154,900,256 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 961 | java | // --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// 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.echothree.control.user.search.common.form;
public interface GetVendorResultsForm
extends BaseGetResultsForm {
// Nothing additional beyond BaseGetResultsForm
}
| [
"rich@echothree.com"
] | rich@echothree.com |
855c541f25429a5bbab23a723e7778bed3245e60 | 6cff23733e6dd7a546b570bad530ee44a518f732 | /sample/src/main/java/fake/package_5/Foo147.java | c81b0b01e9554c6fde428b7c01dcf88c71458615 | [
"Apache-2.0"
] | permissive | hacktons/dexing | 940248a0501255cc2939eecef63b57735f811b06 | e774aaa3a562514bb59634c932aa85a1578a5182 | refs/heads/master | 2020-09-05T05:12:52.749052 | 2020-04-07T07:08:42 | 2020-04-07T07:08:42 | 219,990,044 | 5 | 0 | Apache-2.0 | 2020-04-07T07:08:43 | 2019-11-06T12:19:38 | Java | UTF-8 | Java | false | false | 1,640 | java | package fake.package_5;
public class Foo147 {
public void foo0(){
new Foo146().foo49();
}
public void foo1(){
foo0();
}
public void foo2(){
foo1();
}
public void foo3(){
foo2();
}
public void foo4(){
foo3();
}
public void foo5(){
foo4();
}
public void foo6(){
foo5();
}
public void foo7(){
foo6();
}
public void foo8(){
foo7();
}
public void foo9(){
foo8();
}
public void foo10(){
foo9();
}
public void foo11(){
foo10();
}
public void foo12(){
foo11();
}
public void foo13(){
foo12();
}
public void foo14(){
foo13();
}
public void foo15(){
foo14();
}
public void foo16(){
foo15();
}
public void foo17(){
foo16();
}
public void foo18(){
foo17();
}
public void foo19(){
foo18();
}
public void foo20(){
foo19();
}
public void foo21(){
foo20();
}
public void foo22(){
foo21();
}
public void foo23(){
foo22();
}
public void foo24(){
foo23();
}
public void foo25(){
foo24();
}
public void foo26(){
foo25();
}
public void foo27(){
foo26();
}
public void foo28(){
foo27();
}
public void foo29(){
foo28();
}
public void foo30(){
foo29();
}
public void foo31(){
foo30();
}
public void foo32(){
foo31();
}
public void foo33(){
foo32();
}
public void foo34(){
foo33();
}
public void foo35(){
foo34();
}
public void foo36(){
foo35();
}
public void foo37(){
foo36();
}
public void foo38(){
foo37();
}
public void foo39(){
foo38();
}
public void foo40(){
foo39();
}
public void foo41(){
foo40();
}
public void foo42(){
foo41();
}
public void foo43(){
foo42();
}
public void foo44(){
foo43();
}
public void foo45(){
foo44();
}
public void foo46(){
foo45();
}
public void foo47(){
foo46();
}
public void foo48(){
foo47();
}
public void foo49(){
foo48();
}
} | [
"chaobinwu89@gmail.com"
] | chaobinwu89@gmail.com |
6fe6f6549d9a06aae32166611768488da49d9e5d | 8ec379a02be629165c97f12d75551e09279e5f97 | /shop-auth/src/main/java/quick/pager/shop/configuration/OAuth2ResourceServerConfiguration.java | 85b2fa1472b737c71dfb4774fbb00e9cf5ed3c9f | [
"MIT"
] | permissive | donniezhanggit/spring-cloud-shop | 73c9e99c714310cb4ecbacb2f764a452b24dfefc | aeeaba1be804d7197692fa6bef8bdcaedb2302ac | refs/heads/master | 2020-06-19T14:15:02.682581 | 2019-10-14T06:25:38 | 2019-10-14T06:25:38 | 196,739,760 | 0 | 0 | MIT | 2019-10-14T06:25:40 | 2019-07-13T15:56:03 | Java | UTF-8 | Java | false | false | 1,003 | java | package quick.pager.shop.configuration;
import org.springframework.context.annotation.Configuration;
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.oauth2.config.annotation.web.configuration.EnableResourceServer;
import org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter;
import org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer;
@Configuration
@EnableResourceServer
public class OAuth2ResourceServerConfiguration extends ResourceServerConfigurerAdapter {
@Override
public void configure(HttpSecurity http) throws Exception {
http
.antMatcher("/oauth/principal")
.authorizeRequests().anyRequest().authenticated();
}
@Override
public void configure(ResourceServerSecurityConfigurer resources) throws Exception {
resources.resourceId("users-info");
}
}
| [
"siguiyang1992@outlook.com"
] | siguiyang1992@outlook.com |
28125f4279ab7d8f2180ca89919444a37e884861 | 2f80a2d0e8a8323c6f5c8ce3ed1b47dbf3079a98 | /Code6/src/com/bmpl/socialnetwork/users/dao/UserDAO.java | bc3bee4a9bd682f4d932dbb6418a49d9aebc71b2 | [] | no_license | amitsrivastava4all/JavaBatchFeb12to2D | 2012bcb13c5b6c14144d9ec19f98e8da37004b0c | 245052776721f3b8383549d104218ee63d0a1eca | refs/heads/master | 2021-01-25T05:56:39.899158 | 2017-03-17T06:59:32 | 2017-03-17T06:59:32 | 80,707,295 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 414 | java | package com.bmpl.socialnetwork.users.dao;
import com.bmpl.socialnetwork.users.dto.UserDTO;
/*
* DAO - Data Access Object
* this will contains only DB Related Stuff
*/
public class UserDAO {
// private void prepare(){
// 5 Users (Array)
//
// }
public boolean isAuth(UserDTO userDTO){
if(userDTO.getUserid().equals(userDTO.getPassword())){
return true;
}
else
{
return false;
}
}
}
| [
"amit4alljava@gmail.com"
] | amit4alljava@gmail.com |
845f132eef4c39cc301d717393c43abd48834bd8 | 7a23950b821eb3878baa13e6331d8eea7a4f31b7 | /src/main/java/com/mozu/sterling/model/category/ObjectFactory.java | 807a56868ba0a6047ee1ffb7cc8816bfdb17552a | [] | no_license | Mozu/IBMSterling | 992399993aa32f67fc81b7c49950c843f3db3f82 | 0783accef17ebd3d8889eab069269eb0fd0b5e8e | refs/heads/master | 2021-01-21T19:06:34.271645 | 2016-05-05T19:06:54 | 2016-05-05T19:06:54 | 56,249,972 | 0 | 1 | null | 2016-05-05T16:45:36 | 2016-04-14T15:43:56 | Java | UTF-8 | Java | false | false | 1,939 | 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: 2015.12.09 at 02:53:52 PM CST
//
package com.mozu.sterling.model.category;
import javax.xml.bind.annotation.XmlRegistry;
/**
* This object contains factory methods for each
* Java content interface and Java element interface
* generated in the com.mozu.sterling.model.category package.
* <p>An ObjectFactory allows you to programatically
* construct new instances of the Java representation
* for XML content. The Java representation of XML
* content can consist of schema derived interfaces
* and classes representing the binding of schema
* type definitions, element declarations and model
* groups. Factory methods for each of these are
* provided in this class.
*
*/
@XmlRegistry
public class ObjectFactory {
/**
* Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: com.mozu.sterling.model.category
*
*/
public ObjectFactory() {
}
/**
* Create an instance of {@link Category }
*
*/
public Category createCategory() {
return new Category();
}
/**
* Create an instance of {@link CategoryLocaleList }
*
*/
public CategoryLocaleList createCategoryLocaleList() {
return new CategoryLocaleList();
}
/**
* Create an instance of {@link CategoryList }
*
*/
public CategoryList createCategoryList() {
return new CategoryList();
}
/**
* Create an instance of {@link CategoryLocale }
*
*/
public CategoryLocale createCategoryLocale() {
return new CategoryLocale();
}
}
| [
"bob_hewett@L02968.corp.volusion.com"
] | bob_hewett@L02968.corp.volusion.com |
4d6ea3dec06ecd31c0f6cc93c675f041449cca0f | 7016cec54fb7140fd93ed805514b74201f721ccd | /ui/web/main/src/java/com/echothree/ui/web/main/action/accounting/companycontactmechanism/PartyContactMechanismRelationshipAddActionForm.java | f7cc00a71385a235bfb6f16037386931350107ff | [
"MIT",
"Apache-1.1",
"Apache-2.0"
] | permissive | echothreellc/echothree | 62fa6e88ef6449406d3035de7642ed92ffb2831b | bfe6152b1a40075ec65af0880dda135350a50eaf | refs/heads/master | 2023-09-01T08:58:01.429249 | 2023-08-21T11:44:08 | 2023-08-21T11:44:08 | 154,900,256 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,240 | java | // --------------------------------------------------------------------------------
// Copyright 2002-2023 Echo Three, LLC
//
// 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.echothree.ui.web.main.action.accounting.companycontactmechanism;
import com.echothree.control.user.contact.common.ContactUtil;
import com.echothree.control.user.contact.common.form.GetContactMechanismChoicesForm;
import com.echothree.control.user.contact.common.result.GetContactMechanismChoicesResult;
import com.echothree.model.control.contact.common.choice.ContactMechanismChoicesBean;
import com.echothree.util.common.command.CommandResult;
import com.echothree.util.common.command.ExecutionResult;
import com.echothree.view.client.web.struts.BaseActionForm;
import com.echothree.view.client.web.struts.sprout.annotation.SproutForm;
import java.util.List;
import javax.naming.NamingException;
import org.apache.struts.util.LabelValueBean;
@SproutForm(name="CompanyPartyContactMechanismRelationshipAdd")
public class PartyContactMechanismRelationshipAddActionForm
extends BaseActionForm {
private ContactMechanismChoicesBean toContactMechanismChoices;
private String partyName;
private String fromContactMechanismName;
private String toContactMechanismChoice;
public void setupToContactMechanismChoices() {
if(toContactMechanismChoices == null) {
try {
GetContactMechanismChoicesForm form = ContactUtil.getHome().getGetContactMechanismChoicesForm();
form.setPartyName(partyName);
form.setDefaultContactMechanismChoice(toContactMechanismChoice);
form.setAllowNullChoice(Boolean.FALSE.toString());
CommandResult commandResult = ContactUtil.getHome().getContactMechanismChoices(userVisitPK, form);
ExecutionResult executionResult = commandResult.getExecutionResult();
GetContactMechanismChoicesResult getToContactMechanismChoicesResult = (GetContactMechanismChoicesResult)executionResult.getResult();
toContactMechanismChoices = getToContactMechanismChoicesResult.getContactMechanismChoices();
if(toContactMechanismChoice == null) {
toContactMechanismChoice = toContactMechanismChoices.getDefaultValue();
}
} catch (NamingException ne) {
ne.printStackTrace();
// failed, toContactMechanismChoices remains null, no default
}
}
}
public String getPartyName() {
return partyName;
}
public void setPartyName(String partyName) {
this.partyName = partyName;
}
public String getFromContactMechanismName() {
return fromContactMechanismName;
}
public void setFromContactMechanismName(String fromContactMechanismName) {
this.fromContactMechanismName = fromContactMechanismName;
}
public String getToContactMechanismChoice() {
setupToContactMechanismChoices();
return toContactMechanismChoice;
}
public void setToContactMechanismChoice(String toContactMechanismChoice) {
this.toContactMechanismChoice = toContactMechanismChoice;
}
public List<LabelValueBean> getToContactMechanismChoices() {
List<LabelValueBean> choices = null;
setupToContactMechanismChoices();
if(toContactMechanismChoices != null) {
choices = convertChoices(toContactMechanismChoices);
}
return choices;
}
}
| [
"rich@echothree.com"
] | rich@echothree.com |
5218ce3b01f033d0917ebdb2feb7ca1085fa4e96 | a4dab59f78b1e4144190e471468524bcb16bd87e | /src/main/java/net/ravendb/client/documents/session/BeforeQueryEventArgs.java | 566d4e2ab940c05ac35102d2a59406573b5f290e | [
"MIT"
] | permissive | ravendb/ravendb-jvm-client | eeeacb6c30de43703181d05d8a05624016f7a55e | a515a192b28a9d682d7772c36b76d5a01a2f3115 | refs/heads/v5.4 | 2023-08-25T14:40:57.799715 | 2023-08-03T13:01:50 | 2023-08-03T13:01:50 | 8,926,444 | 13 | 11 | MIT | 2023-08-03T13:01:51 | 2013-03-21T10:31:56 | Java | UTF-8 | Java | false | false | 696 | java | package net.ravendb.client.documents.session;
import net.ravendb.client.primitives.EventArgs;
public class BeforeQueryEventArgs extends EventArgs {
private final InMemoryDocumentSessionOperations session;
private final IDocumentQueryCustomization queryCustomization;
public BeforeQueryEventArgs(InMemoryDocumentSessionOperations session, IDocumentQueryCustomization queryCustomization) {
this.session = session;
this.queryCustomization = queryCustomization;
}
public InMemoryDocumentSessionOperations getSession() {
return session;
}
public IDocumentQueryCustomization getQueryCustomization() {
return queryCustomization;
}
}
| [
"marcin@ravendb.net"
] | marcin@ravendb.net |
6ace56c4e9e6276017b9737118fd76d52928946d | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/19/19_7a025de9c6a1b7930ad54f7a956e38430a72cdd8/ScaleLCA_Test/19_7a025de9c6a1b7930ad54f7a956e38430a72cdd8_ScaleLCA_Test_s.java | c215d1a5f6a016e1604f5921b207e56def29ffba | [] | 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 | 6,985 | java | /*******************************************************************************
* Copyright (c) 2002, 2008 Innoopract Informationssysteme GmbH.
* 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:
* Innoopract Informationssysteme GmbH - initial API and implementation
******************************************************************************/
package org.eclipse.swt.internal.widgets.scalekit;
import junit.framework.TestCase;
import org.eclipse.rwt.Fixture;
import org.eclipse.rwt.graphics.Graphics;
import org.eclipse.rwt.internal.lifecycle.JSConst;
import org.eclipse.rwt.lifecycle.IWidgetAdapter;
import org.eclipse.rwt.lifecycle.WidgetUtil;
import org.eclipse.swt.RWTFixture;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.*;
import org.eclipse.swt.graphics.*;
import org.eclipse.swt.internal.widgets.Props;
import org.eclipse.swt.widgets.*;
public class ScaleLCA_Test extends TestCase {
public void testScalePreserveValues() {
Display display = new Display();
Composite shell = new Shell( display, SWT.NONE );
Scale scale = new Scale( shell, SWT.HORIZONTAL );
RWTFixture.markInitialized( display );
// Test preserved minimum, maximum,
// selection, increment and ageIncrement
RWTFixture.preserveWidgets();
IWidgetAdapter adapter = WidgetUtil.getAdapter( scale );
Integer minimum
= ( Integer )adapter.getPreserved( ScaleLCA.PROP_MINIMUM );
assertEquals( 0, minimum.intValue() );
Integer maximum
= ( Integer )adapter.getPreserved( ScaleLCA.PROP_MAXIMUM );
assertEquals( 100, maximum.intValue() );
Integer selection
= ( Integer )adapter.getPreserved( ScaleLCA.PROP_SELECTION );
assertEquals( 0, selection.intValue() );
Integer increment
= ( Integer )adapter.getPreserved( ScaleLCA.PROP_INCREMENT );
assertEquals( 1, increment.intValue() );
Integer pageIncrement
= ( Integer )adapter.getPreserved( ScaleLCA.PROP_PAGE_INCREMENT );
assertEquals( 10, pageIncrement.intValue() );
RWTFixture.clearPreserved();
// Test preserved control properties
testPreserveControlProperties( scale );
// Test preserved selection listeners
testPreserveSelectionListener( scale );
display.dispose();
}
public void testSelectionEvent() {
Display display = new Display();
Composite shell = new Shell( display, SWT.NONE );
Scale scale = new Scale( shell, SWT.HORIZONTAL );
testSelectionEvent( scale );
}
private void testPreserveControlProperties( final Scale scale ) {
// bound
Rectangle rectangle = new Rectangle( 10, 10, 10, 10 );
scale.setBounds( rectangle );
RWTFixture.preserveWidgets();
IWidgetAdapter adapter = WidgetUtil.getAdapter( scale );
assertEquals( rectangle, adapter.getPreserved( Props.BOUNDS ) );
RWTFixture.clearPreserved();
// enabled
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
assertEquals( Boolean.TRUE, adapter.getPreserved( Props.ENABLED ) );
RWTFixture.clearPreserved();
scale.setEnabled( false );
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
assertEquals( Boolean.FALSE, adapter.getPreserved( Props.ENABLED ) );
RWTFixture.clearPreserved();
// visible
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
assertEquals( Boolean.TRUE, adapter.getPreserved( Props.VISIBLE ) );
RWTFixture.clearPreserved();
scale.setVisible( false );
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
assertEquals( Boolean.FALSE, adapter.getPreserved( Props.VISIBLE ) );
RWTFixture.clearPreserved();
// menu
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
assertEquals( null, adapter.getPreserved( Props.MENU ) );
RWTFixture.clearPreserved();
Menu menu = new Menu( scale );
MenuItem item = new MenuItem( menu, SWT.NONE );
item.setText( "1 Item" );
scale.setMenu( menu );
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
assertEquals( menu, adapter.getPreserved( Props.MENU ) );
RWTFixture.clearPreserved();
//foreground background font
Color background = Graphics.getColor( 122, 33, 203 );
scale.setBackground( background );
Color foreground = Graphics.getColor( 211, 178, 211 );
scale.setForeground( foreground );
Font font = Graphics.getFont( "font", 12, SWT.BOLD );
scale.setFont( font );
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
assertEquals( background, adapter.getPreserved( Props.BACKGROUND ) );
assertEquals( foreground, adapter.getPreserved( Props.FOREGROUND ) );
assertEquals( font, adapter.getPreserved( Props.FONT ) );
RWTFixture.clearPreserved();
}
private void testPreserveSelectionListener( final Scale scale ) {
RWTFixture.preserveWidgets();
IWidgetAdapter adapter = WidgetUtil.getAdapter( scale );
Boolean hasListeners
= ( Boolean )adapter.getPreserved( Props.SELECTION_LISTENERS );
assertEquals( Boolean.FALSE, hasListeners );
RWTFixture.clearPreserved();
SelectionListener selectionListener = new SelectionAdapter() { };
scale.addSelectionListener( selectionListener );
RWTFixture.preserveWidgets();
adapter = WidgetUtil.getAdapter( scale );
hasListeners
= ( Boolean )adapter.getPreserved( Props.SELECTION_LISTENERS );
assertEquals( Boolean.TRUE, hasListeners );
RWTFixture.clearPreserved();
}
private void testSelectionEvent( final Scale scale ) {
final StringBuffer log = new StringBuffer();
SelectionListener selectionListener = new SelectionAdapter() {
public void widgetSelected( SelectionEvent event ) {
assertEquals( scale, event.getSource() );
assertEquals( null, event.item );
assertEquals( SWT.NONE, event.detail );
assertEquals( 0, event.x );
assertEquals( 0, event.y );
assertEquals( 0, event.width );
assertEquals( 0, event.height );
assertEquals( true, event.doit );
log.append( "widgetSelected" );
}
};
scale.addSelectionListener( selectionListener );
String dateTimeId = WidgetUtil.getId( scale );
Fixture.fakeRequestParam( JSConst.EVENT_WIDGET_SELECTED, dateTimeId );
RWTFixture.readDataAndProcessAction( scale );
assertEquals( "widgetSelected", log.toString() );
}
protected void setUp() throws Exception {
RWTFixture.setUp();
}
protected void tearDown() throws Exception {
RWTFixture.tearDown();
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
f222055b2526ef58afb508ccd68184f9d7aaa746 | 3fed05ac4556ea37a7ad88954f259e7752568013 | /user/src/main/java/sh/platform/example/user/MemberResource.java | f37896b73b9a9f878bdd01904a381bd240c907c4 | [] | no_license | danielsava/user-microservices | c517fd91516eae72454a06bc693e5183c2799ccb | c71c28cdab758f4010d83aaaa614b1eca25b238e | refs/heads/master | 2023-03-05T16:44:42.257371 | 2021-02-12T12:36:17 | 2021-02-12T12:36:17 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,318 | java | package sh.platform.example.user;
import io.quarkus.panache.common.Sort;
import org.jboss.resteasy.annotations.jaxrs.PathParam;
import javax.enterprise.context.ApplicationScoped;
import javax.transaction.Transactional;
import javax.ws.rs.Consumes;
import javax.ws.rs.DELETE;
import javax.ws.rs.GET;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.Response;
import java.util.List;
import java.util.Optional;
import java.util.logging.Logger;
@Path("members")
@ApplicationScoped
@Produces(MediaType.APPLICATION_JSON)
@Consumes(MediaType.APPLICATION_JSON)
public class MemberResource {
private static final Logger LOGGER = Logger.getLogger(MemberResource.class.getName());
@GET
public List<Member> get() {
return Member.listAll(Sort.ascending("name"));
}
@GET
@Path("{id}")
public Member getSingle(@PathParam Long id) {
Optional<Member> entity = Member.findByIdOptional(id);
return entity.orElseThrow(() -> new WebApplicationException("Member with id of " + id + " does not exist.",
Response.Status.NOT_FOUND));
}
@POST
@Transactional
public Response create(Member member) {
member.persist();
return Response.ok(member).status(201).build();
}
@PUT
@Path("{id}")
@Transactional
public Member update(@PathParam Long id, Member member) {
LOGGER.info("the parameters " + member);
LOGGER.info("the id " + id);
Member entity = Member.<Member>findByIdOptional(id)
.orElseThrow(() -> new WebApplicationException("Member with id of " + id + " does not exist.",
Response.Status.NOT_FOUND));
LOGGER.info("the entity found " + entity);
entity.update(member);
return entity;
}
@DELETE
@Path("{id}")
@Transactional
public Response delete(@PathParam Long id) {
boolean deleted = Member.deleteById(id);
if (deleted) {
return Response.status(Response.Status.NO_CONTENT).build();
}
throw new WebApplicationException("Member with id of " + id + " does not exist.", Response.Status.NOT_FOUND);
}
}
| [
"otaviopolianasantana@gmail.com"
] | otaviopolianasantana@gmail.com |
f95c7f1f5d93371336dc974539b6a53fb142235f | 3876a56fe3703701f29a86e8d95f5fef17036b8e | /src/main/java/com/ericsson/sn/mobilefaces/renderkit/wml/GridRenderer.java | ae2e582a1666245ec87acbc4e6b6d46fb5046b8d | [] | no_license | omarbenhamid/JSF-4-Mobile | d851afaae84a7cd196819e65324bae2ff2f44777 | 80801ef8a9df60fa6021004874a38d74c6ddd80f | refs/heads/master | 2016-09-05T19:55:09.478974 | 2011-09-15T14:00:18 | 2011-09-15T14:00:18 | 2,347,761 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,086 | java | /**
* MobileFaces is a core library based on the JavaServer(tm) Faces (JSF) architecture for extending web applications to mobile browsing devices.
* Ericsson AB - Daning Yang
*
*
* Project info: https://mobilejsf.dev.java.net/
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
package com.ericsson.sn.mobilefaces.renderkit.wml;
import java.util.Iterator;
import java.io.IOException;
import javax.faces.component.UIComponent;
import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import com.ericsson.sn.mobilefaces.renderkit.share.LangConstant;
import com.ericsson.sn.mobilefaces.renderkit.share.BasicTableRenderer;
/**
* <p>
* GridRenderer is a renderer to render the <code>UIPanel</code>
* as a Grid of components on WML page.
* </p>
*
* <p>
* This Checkbox arranges some components layout
* with <br> tag.
* </p>
*
* <p>Company: Ericsson AB</p>
*
* @jsf.render-kit component-family="javax.faces.Panel"
* renderer-type="javax.faces.Grid"
* description="GridRenderer is the renderer for a component grid on WML page"
*
* @author Daning Yang
* @version 1.0
*/
public class GridRenderer extends BasicTableRenderer {
/**
* <p>Generate instance and initialize with markup language type.</p>
*/
public GridRenderer() {
super(LangConstant.WML);
}
/**
* <p>Set to render the children</p>
*/
@Override
public boolean getRendersChildren() {
return true;
}
/**
* See also
* <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/render/Renderer.html#encodeBegin(javax.faces.context.FacesContext, javax.faces.component.UIComponent)">javax.faces.render.Renderer</a>
* @see javax.faces.render.Renderer#encodeBegin(FacesContext context, UIComponent component)
*/
@Override
public void encodeBegin(FacesContext context, UIComponent component)
throws IOException {
super.encodeBegin( context, component);
ResponseWriter writer = context.getResponseWriter();
writer.startElement(LangConstant.TAG_P, component);
writer.writeText("\n", null);
encodeSimpleTitle(context, writer, component, HEADER);
}
/**
* See also
* <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/render/Renderer.html#encodeChildren(FacesContext context, UIComponent component)">javax.faces.render.Renderer</a>
* @see javax.faces.render.Renderer#encodeChildren(FacesContext context, UIComponent component)
*/
@Override
public void encodeChildren(FacesContext context, UIComponent component)
throws IOException {
super.encodeChildren( context, component);
ResponseWriter writer = context.getResponseWriter();
int columns = getColumnMax(component);
boolean open = false;
UIComponent facet = null;
Iterator kids = null;
int i = 0;
// write the children components and use <br>
// to control the layout
if (null != (kids = getChildren(component))) {
while (kids.hasNext()) {
UIComponent child = (UIComponent) kids.next();
if ((i % columns) == 0) {
if (open) {
writer.startElement(LangConstant.TAG_BR, component);
writer.endElement(LangConstant.TAG_BR);
writer.writeText("\n", null);
open = false;
}
writer.writeText("\n", null);
open = true;
}
encodeRecursive(context, child);
writer.writeText("\n", null);
i++;
}
}
if (open) {
writer.startElement(LangConstant.TAG_BR, component);
writer.endElement(LangConstant.TAG_BR);
writer.writeText("\n", null);
}
}
/**
* See also
* <a href="http://java.sun.com/javaee/javaserverfaces/1.2/docs/api/javax/faces/render/Renderer.html#encodeEnd(javax.faces.context.FacesContext, javax.faces.component.UIComponent)">javax.faces.render.Renderer</a>
* @see javax.faces.render.Renderer#encodeEnd(FacesContext context, UIComponent component)
*/
@Override
public void encodeEnd(FacesContext context, UIComponent component)
throws IOException {
super.encodeEnd( context, component);
ResponseWriter writer = context.getResponseWriter();
// write the simple footer
encodeSimpleTitle(context, writer, component, FOOTER);
writer.endElement(LangConstant.TAG_P);
writer.writeText("\n", null);
}
/**
* <p>Get the number of columns of this grid</p>
*/
@Override
protected int getColumnMax(UIComponent component) {
int count;
Object value = component.getAttributes().get("columns");
if ((value != null) && (value instanceof Integer)) {
count = ((Integer) value).intValue();
} else {
count = 2;
}
if (count < 1) {
count = 1;
}
return (count);
}
}
| [
"none@none"
] | none@none |
ae3ce63eeb32dac6037f0fe25a1b215fb49bd3a0 | eb295bff5cf78317400eded03d3397a519f3d5ab | /src/main/java/com/adMaroc/Tecdoc/BackOffice/Repository/EngineNumberAllocationtoVehicleTypesRepository.java | 180e29e62853f631f33aad443d7835fcdb243d23 | [] | no_license | papsukis/Tecdoc-BE | 9aeaa917f5443d542491586495ef1dcb1fbad13c | ca01c97586c84084e39ed39365c649c89493ec59 | refs/heads/master | 2023-06-08T10:41:50.425469 | 2021-06-22T15:56:53 | 2021-06-22T15:56:53 | 331,469,230 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 550 | java | package com.adMaroc.Tecdoc.BackOffice.Repository;
import com.adMaroc.Tecdoc.BackOffice.Models.TecdocData.EngineNumberAllocationtoVehicleTypes;
import com.adMaroc.Tecdoc.BackOffice.Models.TecdocData.compositeKeys.EngineNumberAllocationtoVehicleTypesId;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository;
@Repository
public interface EngineNumberAllocationtoVehicleTypesRepository extends JpaRepository<EngineNumberAllocationtoVehicleTypes, EngineNumberAllocationtoVehicleTypesId> {
}
| [
"ali.belemlih@gmail.com"
] | ali.belemlih@gmail.com |
8c7a63ea4cae7ff1a795a1014acc4bd9495d2d69 | 629d3789c38b629eb93618382cdbe9245b9c38ab | /java-8/src/main/java/com/github/wesleyegberto/interfaces/DiamondProblem.java | a77df93ac277078a6eeb8b074120ded867e8bf0d | [
"Apache-2.0"
] | permissive | wesleyegberto/java-new-features | 6f8476f6a99962b52de4d07ea031225e52a4bc2b | dcf8eb0327ed164e6037e2afd132808038ea4cd8 | refs/heads/master | 2023-09-01T12:21:53.365050 | 2023-08-31T01:48:52 | 2023-08-31T01:48:52 | 71,030,230 | 232 | 58 | Apache-2.0 | 2023-06-07T19:27:58 | 2016-10-16T04:34:47 | Java | UTF-8 | Java | false | false | 573 | java | package com.github.wesleyegberto.interfaces;
public class DiamondProblem {
public static void main(String[] args) {
new TooMuch().walk();
}
}
/*
* When the interfaces that we are implementing has
* the same methods signatures then we must override them.
*/
class TooMuch implements Father, Mother {
public void walk() {
System.out.println("Walking like myself");
}
}
interface Father {
default void walk() {
System.out.println("Walking like the father");
}
}
interface Mother {
default void walk() {
System.out.println("Walking like the mother");
}
} | [
"wesleyegberto@gmail.com"
] | wesleyegberto@gmail.com |
2ed5780d0a8e29c49cfe6bd6c749d43f1932cd89 | 217d96db536ff284fc1b168bf640104f00ba1ad5 | /rifidi/trunk/org.rifidi.tags/src/org/rifidi/tags/id/TagType.java | 8bf511a38bbfd7db233a211df84a3e4eeac97b16 | [] | no_license | TranscendsLLC/emulator | d5b94965b8ebd894707c093334c51aabf30d0075 | a46c42cd2e86aafc213df7585dc923895a589446 | refs/heads/master | 2021-01-14T12:31:10.876450 | 2010-10-01T21:28:07 | 2010-10-01T21:28:07 | 43,608,652 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 990 | java | /**
*
*/
package org.rifidi.tags.id;
/**
* FIXME: Header.
*
* This is the enum for the different tag types
*
* @author Andreas Huebner - andreas@pramari.com
*
*/
public enum TagType{
// CustomEPC96, DoD96, GID96, SGTIN96, SSCC96;
CustomEPC96()
{
public byte[] getRandomTagData(String prefix)
{
return org.rifidi.tags.id.CustomEPC96.getRandomTagData(prefix);
}
},
DoD96()
{
public byte[] getRandomTagData(String prefix)
{
return org.rifidi.tags.id.DoD96.getRandomTagData(prefix);
}
},
GID96()
{
public byte[] getRandomTagData(String prefix)
{
return org.rifidi.tags.id.GID96.getRandomTagData(prefix);
}
},
SGTIN96()
{
public byte[] getRandomTagData(String prefix)
{
return org.rifidi.tags.id.SGTIN96.getRandomTagData(prefix);
}
},
SSCC96()
{
public byte[] getRandomTagData(String prefix)
{
return org.rifidi.tags.id.SSCC96.getRandomTagData(prefix);
}
};
public abstract byte[] getRandomTagData(String prefix);
}
| [
"jochen@70ba6d20-ffbb-44b8-b480-e27427137dba"
] | jochen@70ba6d20-ffbb-44b8-b480-e27427137dba |
f6bb0799942b312cf0a9e42d66ff147aedd3179d | 9bb4cf7e03f137506067062a25167357d577e5bb | /wirez-sets/wirez-bpmn/wirez-bpmn-backend/src/main/java/org/wirez/bpmn/backend/marshall/json/oryx/property/DoubleTypeSerializer.java | 4f6e62b8a7200c39e56b8045c3fb3429e95ff306 | [] | no_license | pefernan/wirez | 78840906c36e4629167b0254e11d88756b948302 | 537a95790b274e48e0a2d5da86956495f85376c8 | refs/heads/master | 2021-01-14T14:23:09.756622 | 2016-08-30T09:26:33 | 2016-08-30T09:26:33 | 56,070,487 | 0 | 0 | null | 2016-04-12T14:31:17 | 2016-04-12T14:31:15 | null | UTF-8 | Java | false | false | 714 | java | package org.wirez.bpmn.backend.marshall.json.oryx.property;
import org.wirez.core.definition.property.PropertyType;
import org.wirez.core.definition.property.type.DoubleType;
import javax.enterprise.context.ApplicationScoped;
@ApplicationScoped
public class DoubleTypeSerializer implements Bpmn2OryxPropertySerializer<Double> {
@Override
public boolean accepts( PropertyType type ) {
return DoubleType.name.equals( type.getName() );
}
@Override
public Double parse( Object property, String value ) {
return Double.parseDouble( value );
}
@Override
public String serialize( Object property, Double value ) {
return Double.toString( value );
}
}
| [
"roger600@gmail.com"
] | roger600@gmail.com |
ef44fe4aa141ef7c69bb87573b6148e2f22df6c8 | 9a289f120d61ac943a6db6ff6436f38ec3bfcdc8 | /src/com/bruce/gogo/utils/DateTime.java | 56225afdd6150282e9313b27df1cec57febbbc31 | [] | no_license | softgo/Model1 | 4a954e0e413b335dd06dc2cd6f6e47d661a629af | 3f53a6a1900fa6916d877a4d7b11738d3cc2b3fa | refs/heads/master | 2021-01-01T06:05:13.102255 | 2017-04-14T09:48:34 | 2017-04-14T09:48:34 | 25,861,131 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,213 | java | package com.bruce.gogo.utils;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
/**
* 一些日期处理的辅助类
* <p>
* Title:
* </p>
* <p>
* Description:
* </p>
* <p>
* Copyright: Copyright (c) compnone 2003
* </p>
* <p>
* Company: cmpnone
* </p>
*
* @author wuxk
* @version 1.0
*/
public class DateTime {
private DateTime() {
}
/**
* 从字符串中取得日期,比如字符串2004-9-9转化成日期型
* @param sDate
* @return
* @throws ParseException
*/
public static Date getDate(String sDate) throws ParseException {
sDate = sDate.replace('/', '-');
java.util.Date ltime = DateFormat.getDateInstance().parse(sDate);
return new Date(ltime.getTime());
}
public static long getFormatDate(String sDate){
Date date = null;
try {
date = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").parse(sDate);
} catch (ParseException e) {
e.printStackTrace();
}
return date.getTime()/1000;
}
/**
* 将日期转换成字符串表示,如2004-09-09 17:09:09
* @param d
* @return
*/
public static String getFormatDate(Date d){
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(d);
}
/**
* 将日期转换成字符串表示,如2004-09-09 17:09:09
* @param d
* @return
*/
public static String getFormatDay(Date d){
return new SimpleDateFormat("yyyy/MM/dd").format(d);
}
/**
* @return 返回字符串型式表示的当前时间如: 2002-12-10 12:10:18
*/
public static String now() {
GregorianCalendar calenda = new GregorianCalendar();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return sdf.format(calenda.getTime());
}
/**
* @return 带上时分秒的当前时间
*/
public static Date currentTime() {
GregorianCalendar calenda = new GregorianCalendar();
return calenda.getTime();
}
/**
* 获得当前日期的时间格式
*
* @return
*/
public static String currentDate() {
GregorianCalendar calenda = new GregorianCalendar();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
return sdf.format(calenda.getTime());
}
/**
* 获取昨天的日期
* @return
*/
public static String yesterDate(){
DateFormat dformat = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.add(Calendar.DAY_OF_YEAR, -1);
String etime = dformat.format(c.getTime());
return etime;
}
/**
* 获取昨天的日期
*
* @return
*/
public static String yesterDateNext(){
DateFormat dformat = new SimpleDateFormat("yyyyMMdd");
Calendar c = Calendar.getInstance();
c.add(Calendar.DAY_OF_YEAR, -1);
String etime = dformat.format(c.getTime());
return etime;
}
/**
* 获取今天的日期
*
* @return
*/
public static String currentDateNext() {
DateFormat dformat = new SimpleDateFormat("yyyyMMdd");
Calendar c = Calendar.getInstance();
c.add(Calendar.DAY_OF_YEAR, 0);
String etime = dformat.format(c.getTime());
return etime;
}
public static void main(String[] args){
System.out.println(new Date().getTime()/1000);
System.out.println(currentDate());
}
} | [
"supingemail@126.com"
] | supingemail@126.com |
b2b18b1f607413f8241f1513a79e3a713858aae0 | 5e3d50af20367ced38d44ca9b83095810a4f3409 | /src/main/java/be/yildiz/common/resource/Resource.java | e799423b751f2734329ba11bebbd2c06c936576d | [
"MIT"
] | permissive | ogryniuk/common-shared | f5073e82ec13e4487beb4772e42026de540b0954 | 59d24e7e96abc55f693a45d5dc005c5d4bfc5e1a | refs/heads/master | 2021-01-18T07:43:05.183034 | 2017-03-08T09:42:37 | 2017-03-08T09:42:37 | 84,293,662 | 0 | 0 | null | 2017-03-08T07:51:43 | 2017-03-08T07:51:42 | null | UTF-8 | Java | false | false | 2,157 | java | /*
* This file is part of the Yildiz-Engine project, licenced under the MIT License (MIT)
*
* Copyright (c) 2017 Grégory Van den Borre
*
* More infos available: https://www.yildiz-games.be
*
* 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 be.yildiz.common.resource;
import be.yildiz.common.util.BaseRegisterable;
/**
* Resource meant to be loaded, contains the loaded state and the resource name.
*
* @author Grégory Van Den Borre
*/
public abstract class Resource extends BaseRegisterable {
/**
* Loaded state.
*/
private boolean loaded;
/**
* Full constructor.
*
* @param name Unique font name.
*/
protected Resource(final String name) {
super(name);
}
/**
* Load the resource, can be only be done one time.
*/
public final void load() {
if (!this.loaded) {
this.loadImpl();
this.loaded = true;
}
}
/**
* Call the loading implementation.
*/
protected abstract void loadImpl();
@Override
public final String toString() {
return this.getName();
}
}
| [
"vandenborre.gregory@hotmail.fr"
] | vandenborre.gregory@hotmail.fr |
988418af1bb5033c05fcfbaa8eab9348fc637b10 | ee11a5b6f0e664de195565a57369598a7560fa01 | /.svn/pristine/98/988418af1bb5033c05fcfbaa8eab9348fc637b10.svn-base | aca80f12747f98cdb85186000f44f647e4770f53 | [] | no_license | ghguy/nbia | faf23858d1c6f7e7eb61fc69284447b26ca24342 | bc99953da960e16cf38f810316b1076e65dd3e54 | refs/heads/master | 2020-09-21T15:15:23.896941 | 2015-06-26T01:00:17 | 2015-06-26T01:00:17 | 38,082,647 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,770 | /**
* $Id: SendMail.java 12055 2010-02-04 17:49:39Z kascice $
*
* $Log: not supported by cvs2svn $
* Revision 1.2 2008/02/20 20:51:27 lethai
* Task 2267 - Change to use LDAP
*
* Revision 1.1 2007/08/07 12:05:12 bauerd
* *** empty log message ***
*
* Revision 1.1 2007/08/05 21:44:38 bauerd
* Initial Check in of reorganized components
*
* Revision 1.15 2006/09/27 20:46:27 panq
* Reformated with Sun Java Code Style and added a header for holding CVS history.
*
*/
package gov.nih.nci.ncia.mail;
import gov.nih.nci.ncia.util.NCIAConfig;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import javax.mail.Message;
import javax.mail.Session;
import javax.mail.Transport;
import javax.mail.internet.InternetAddress;
import javax.mail.internet.MimeMessage;
import org.apache.log4j.Logger;
public class SendMail {
private static Logger logger = Logger.getLogger(SendMail.class);
public static final String MAIL_PROPERTIES = "mail.properties";
public SendMail() {
}
/**
* Send a mail message where the FROM is set to what is is mail.properties.
*/
public void sendMail(String mailTo,
String mailBody,
String subject) {
try {
//get system properties
Properties props = System.getProperties();
// This will get the values from the properties files
Properties nciaProperties = new Properties();
InputStream in = Thread.currentThread().getContextClassLoader()
.getResourceAsStream(MAIL_PROPERTIES);
try {
nciaProperties.load(in);
} catch (IOException ioe) {
logger.error("Unable to load NCIA properties", ioe);
}
String host = NCIAConfig.getMailServerHostName();
String from = nciaProperties.getProperty("fromAddress");
String to = mailTo;
// Set up mail server
props.put("mail.smtp.host", host);
//Get session
Session session = Session.getDefaultInstance(props, null);
//Define Message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(from));
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
message.setSubject(subject);
message.setText(mailBody);
//Send Message
Transport.send(message);
} catch (Exception e) {
logger.error("Send Mail error", e);
} //catch
} //send mail
public void sendMail(String mailTo,
String mailFrom,
String mailBody,
String subject) {
try {
//get system properties
Properties props = System.getProperties();
String host = NCIAConfig.getMailServerHostName();
String to = mailTo;
// Set up mail server
props.put("mail.smtp.host", host);
//Get session
Session session = Session.getDefaultInstance(props, null);
//Define Message
MimeMessage message = new MimeMessage(session);
message.setFrom(new InternetAddress(mailFrom));
message.addRecipient(Message.RecipientType.TO,
new InternetAddress(to));
message.setSubject(subject);
message.setText(mailBody);
//Send Message
Transport.send(message);
} catch (Exception e) {
logger.error("Send Mail error", e);
} //catch
} //send mail
} //Sendmail
| [
"you@example.com"
] | you@example.com | |
3eeb6131a07a857750f1d8432adb43620f562e21 | 98d98a4c20e9221698435bf527646a51e08babdc | /schema-to-pojo-core/src/test/java/org/sagebionetworks/schema/generator/FileHelper.java | 0ea3bca9375003094ac65f2036d3c01495838199 | [] | no_license | Sage-Bionetworks/schema-to-pojo | 82c32f3b64a886b2ededfef71040b2763506e2f6 | ef3131114b9f8ba765565d88b650e478aa7f11a1 | refs/heads/develop | 2022-05-03T13:08:25.607436 | 2022-03-31T20:15:34 | 2022-03-31T20:15:34 | 4,326,749 | 2 | 5 | null | 2022-03-31T20:15:35 | 2012-05-14T17:26:08 | Java | UTF-8 | Java | false | false | 2,004 | java | package org.sagebionetworks.schema.generator;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.UnsupportedEncodingException;
public class FileHelper {
/**
* Load static content from a file on the classpath
* @param name
* @return
* @throws IOException
*/
public static String loadFileAsStringFromClasspath(ClassLoader loader, String name) throws IOException{
InputStream in = loader.getResourceAsStream(name);
if(in == null) throw new IllegalArgumentException("Cannot find: "+name+" on the classpath");
return readStreamAsString(in);
}
/**
* Read a string from the given stream.
* @param in
* @return
* @throws IOException
* @throws UnsupportedEncodingException
*/
public static String readStreamAsString(InputStream in) throws IOException, UnsupportedEncodingException {
try{
BufferedInputStream bufferd = new BufferedInputStream(in);
byte[] buffer = new byte[1024];
StringBuilder builder = new StringBuilder();
int index = -1;
while((index = bufferd.read(buffer, 0, buffer.length)) >0){
builder.append(new String(buffer, 0, index, "UTF-8"));
}
return builder.toString();
}finally{
in.close();
}
}
/**
* Recursively delete all files in a directory and then delete the directory.
* @param directory
* @return
*/
public static boolean recursiveDirectoryDelete(File directory) {
if (directory == null)
return false;
if (!directory.exists())
return true;
if (!directory.isDirectory())
return false;
String[] list = directory.list();
if (list != null) {
for (int i = 0; i < list.length; i++) {
File entry = new File(directory, list[i]);
if (entry.isDirectory()) {
if (!recursiveDirectoryDelete(entry))
return false;
} else {
if (!entry.delete())
return false;
}
}
}
return directory.delete();
}
}
| [
"john.hill@sagebase.org"
] | john.hill@sagebase.org |
2208244ea8a7cb3513620de057f4b21b01cd7567 | 710aff979c2a4151a28757f3c1de0b77dad5df77 | /dom/src/main/java/info/matchingservice/dom/Howdoido/Interfaces/CategoryRelationshipTuple.java | f77727556bc5f8c14d0ff25b390f4b609e2d63ff | [] | no_license | johandoornenbal/matching | b5500eef829e76096bd47a1fb513894a7d2c40df | d17d35d9d21dfafd335b1cfcbbb3f56ad1fceed1 | refs/heads/master | 2021-01-24T16:10:38.419500 | 2015-12-15T08:09:18 | 2015-12-15T08:09:18 | 21,899,439 | 0 | 5 | null | 2015-04-03T12:59:24 | 2014-07-16T12:19:12 | Java | UTF-8 | Java | false | false | 831 | java | /*
* Copyright 2015 Yodo Int. Projects and Consultancy
*
* 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 info.matchingservice.dom.Howdoido.Interfaces;
/**
* Created by jodo on 02/09/15.
*/
public interface CategoryRelationshipTuple {
Category getChildCategory();
Category getParentCategory();
}
| [
"johan@filternet.nl"
] | johan@filternet.nl |
1c55e25e957be45bf50395e8b13b639f7388186f | a915d83d3088d355d90ba03e5b4df4987bf20a2a | /src/BFT/clientShim/ClientGlueInterface.java | 41318ee705c9d13a3fd1b324f36a5745181edeee | [] | no_license | worldeditor/Aegean | 164c74d961185231d8b40dbbb6f8b88dcd978d79 | 33a2c651e826561e685fb84c1e3848c44d2ac79f | refs/heads/master | 2022-02-15T15:34:02.074428 | 2019-08-21T03:52:48 | 2019-08-21T15:37:59 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 714 | java | // $Id: ClientGlueInterface.java 49 2010-02-26 19:33:49Z yangwang $
package BFT.clientShim;
/**
* Interface between the application and the BFT plug and play client.
**/
public interface ClientGlueInterface {
/**
* Function called when the connection between the client and the
* server is determined to be broken.
**/
public void brokenConnection();
/**
* Returns a reply received from the server
**/
public void returnReply(byte[] reply);
/**
* Considers the set of possible replies options. Returns a
* canonical version of those replies if it exists, returns null
* otherwise
**/
public byte[] canonicalEntry(byte[][] options);
}
| [
"remzican_aksoy@apple.com"
] | remzican_aksoy@apple.com |
f9fd51369b0bc0211c00f529411fde36f2f12603 | f82113b498d6b80541378753044381cf918bd547 | / PhilosophyJava/Сhapter 1-2/Ch-7/src/Holder3.java | 9966d272489e83b476fd67af6c45386118857de2 | [] | no_license | TheForest13/Lessons | fd389702e24e18ca59ae59f4c128fc906ef8bd8f | 739f9e9ba61817378b5834fe56b360ba10192f46 | refs/heads/master | 2023-02-08T14:15:06.536674 | 2021-01-03T18:33:28 | 2021-01-03T18:33:28 | 326,474,463 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 502 | java | public class Holder3<T> {
private T a;
public Holder3(T a) { this.a = a; }
public void set(T a) { this.a = a; }
public T get() {
return a;
}
public static void main(String[] args) {
Holder3<Automobile> h3 = new Holder3<Automobile>(new Automobile());
Automobile a = h3.get(); // Преобразование не требуется
// h3.set("NOt an Automobile"); // Ошибка
// h3.set(1); // Ошибка
}
}
class Automobile {} | [
"guselnikow1999@gmail.com"
] | guselnikow1999@gmail.com |
23b1538be52fa3a13dd30d5dfc1b6b581e1a879e | 4f4fb8e089b11dd9dcaf2334f23a13c6b2a24ef9 | /src/main/java/com/clownfish7/concurrency/part2/singleton/SingletonObjectLazy.java | f5355c46c6ed51254404b7c9679df30fb7e22587 | [] | no_license | clownfish7/java-concurrency | 104cb99a6825677dd79e49ff8e53ae66feaac290 | 8ec9263b6d9cbcc3e4ee9ffe4d5fbf6864e53abc | refs/heads/master | 2022-06-08T15:29:20.388548 | 2020-05-05T13:00:19 | 2020-05-05T13:00:19 | 258,818,097 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 544 | java | package com.clownfish7.concurrency.part2.singleton;
/**
* @author You
* @create 2020-05-01 12:44
*/
public class SingletonObjectLazy {
public static volatile SingletonObjectLazy INSTENCE;
private SingletonObjectLazy() {
// empty
}
public SingletonObjectLazy getInstence() {
if (INSTENCE == null) {
synchronized (this) {
if (INSTENCE == null) {
INSTENCE = new SingletonObjectLazy();
}
}
}
return INSTENCE;
}
}
| [
"279505647@qq.com"
] | 279505647@qq.com |
65f079a185e3de09e21085de99b17efc4541f9c4 | 784017131b5eadffd3bec254f9304225e648d3a3 | /app/src/main/java/com/google/android/gms/common/zzc.java | 3038e1e0b2a6d60a2aa149e26f43ae6f5b63fa56 | [] | no_license | Nienter/kdshif | e6126b3316f4b6e15a7dc6a67253f5729515fb4c | 4d65454bb331e4439ed948891aa0173655d66934 | refs/heads/master | 2022-12-03T19:57:04.981078 | 2020-08-06T11:28:14 | 2020-08-06T11:28:14 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,483 | java | package com.google.android.gms.common;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.support.annotation.Nullable;
import android.text.TextUtils;
import com.google.android.gms.common.internal.zzp;
import com.google.android.gms.common.util.zzi;
import com.google.android.gms.internal.zzacx;
public class zzc {
public static final String GOOGLE_PLAY_SERVICES_PACKAGE = "com.google.android.gms";
public static final int GOOGLE_PLAY_SERVICES_VERSION_CODE = zze.GOOGLE_PLAY_SERVICES_VERSION_CODE;
private static final zzc zzaxc = new zzc();
zzc() {
}
static String zzt(@Nullable Context context, @Nullable String str) {
StringBuilder sb = new StringBuilder();
sb.append("gcore_");
sb.append(GOOGLE_PLAY_SERVICES_VERSION_CODE);
sb.append("-");
if (!TextUtils.isEmpty(str)) {
sb.append(str);
}
sb.append("-");
if (context != null) {
sb.append(context.getPackageName());
}
sb.append("-");
if (context != null) {
try {
sb.append(zzacx.zzaQ(context).getPackageInfo(context.getPackageName(), 0).versionCode);
} catch (PackageManager.NameNotFoundException e) {
}
}
return sb.toString();
}
public static zzc zzuz() {
return zzaxc;
}
@Nullable
public PendingIntent getErrorResolutionPendingIntent(Context context, int i, int i2) {
return zza(context, i, i2, null);
}
public String getErrorString(int i) {
return zze.getErrorString(i);
}
@Nullable
public String getOpenSourceSoftwareLicenseInfo(Context context) {
return zze.getOpenSourceSoftwareLicenseInfo(context);
}
public int isGooglePlayServicesAvailable(Context context) {
int isGooglePlayServicesAvailable = zze.isGooglePlayServicesAvailable(context);
if (zze.zzd(context, isGooglePlayServicesAvailable)) {
return 18;
}
return isGooglePlayServicesAvailable;
}
public boolean isUserResolvableError(int i) {
return zze.isUserRecoverableError(i);
}
@Nullable
public PendingIntent zza(Context context, int i, int i2, @Nullable String str) {
Intent zzb = zzb(context, i, str);
if (zzb == null) {
return null;
}
return PendingIntent.getActivity(context, i2, zzb, 268435456);
}
public int zzak(Context context) {
return zze.zzak(context);
}
public void zzam(Context context) {
zze.zzZ(context);
}
public void zzan(Context context) {
zze.zzan(context);
}
@Nullable
public Intent zzb(Context context, int i, @Nullable String str) {
switch (i) {
case 1:
case 2:
return (context == null || !zzi.zzaJ(context)) ? zzp.zzC("com.google.android.gms", zzt(context, str)) : zzp.zzxu();
case 3:
return zzp.zzdt("com.google.android.gms");
default:
return null;
}
}
@Nullable
@Deprecated
public Intent zzcr(int i) {
return zzb(null, i, null);
}
public boolean zzd(Context context, int i) {
return zze.zzd(context, i);
}
public boolean zzs(Context context, String str) {
return zze.zzs(context, str);
}
}
| [
"niu@eptonic.com"
] | niu@eptonic.com |
cd885173ab8bcdaed4920e34ca7e01e827f92d64 | 86ba5bc2010a0c044c84b68658cc15606152fc4d | /v-customview/src/main/java/com/vension/customview/indexable_layout/IndexBar.java | d2ac8194eafe0f01026504cfe3d047fc7f8fe709 | [
"Apache-2.0"
] | permissive | Vension/KV-Frame | 8e8433b85f62c5768549358db6d988033f5c2f3e | 878f17d8ab80f61437adc770015ec72b27279b3b | refs/heads/master | 2021-04-18T18:38:31.284240 | 2018-05-23T02:35:29 | 2018-05-23T02:35:29 | 126,779,607 | 8 | 1 | null | null | null | null | UTF-8 | Java | false | false | 6,404 | java | package com.vension.customview.indexable_layout;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.text.TextUtils;
import android.util.TypedValue;
import android.view.View;
import com.vension.customview.R;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
/**
* Created by YoKey on 16/10/6.
*/
class IndexBar extends View {
private int mTotalHeight;
private float mTextSpace;
private List<String> mIndexList = new ArrayList<>();
// 首字母 到 mIndexList 的映射
private HashMap<String, Integer> mMapping = new HashMap<>();
private ArrayList<EntityWrapper> mDatas;
private int mSelectionPosition;
private float mIndexHeight;
private Paint mPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
private Paint mFocusPaint = new Paint(Paint.ANTI_ALIAS_FLAG);
public IndexBar(Context context) {
super(context);
}
void init(Drawable barBg, int barTextColor, int barFocusTextColor, float barTextSize, float textSpace) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN) {
setBackground(barBg);
} else {
setBackgroundDrawable(barBg);
}
this.mTextSpace = textSpace;
mPaint.setColor(barTextColor);
mPaint.setTextAlign(Paint.Align.CENTER);
mPaint.setTextSize(barTextSize);
mFocusPaint.setTextAlign(Paint.Align.CENTER);
mFocusPaint.setTextSize(barTextSize + (int) TypedValue.applyDimension(TypedValue.COMPLEX_UNIT_DIP, 1, getResources().getDisplayMetrics()));
mFocusPaint.setColor(barFocusTextColor);
}
@Override
protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
int mode = MeasureSpec.getMode(widthMeasureSpec);
int height = MeasureSpec.getSize(heightMeasureSpec);
if (mIndexList.size() > 0) {
mTotalHeight = (int) (((mIndexList.size() - 1) * mPaint.getTextSize()
+ mFocusPaint.getTextSize())
+ (mIndexList.size() + 1) * mTextSpace);
}
if (mTotalHeight > height) {
mTotalHeight = height;
}
// // TODO: 16/10/8 Measure AT_MOST
// if (mode == MeasureSpec.AT_MOST) {
// int maxWidth = (int) getResources().getDimension(R.dimen.default_indexBar_layout_width);
// super.onMeasure(MeasureSpec.makeMeasureSpec(maxWidth, MeasureSpec.EXACTLY), MeasureSpec.makeMeasureSpec(mTotalHeight, MeasureSpec.EXACTLY));
// return;
// }
super.onMeasure(widthMeasureSpec, MeasureSpec.makeMeasureSpec(mTotalHeight, MeasureSpec.EXACTLY));
}
@Override
protected void onDraw(Canvas canvas) {
super.onDraw(canvas);
if (mIndexList.size() == 0) return;
mIndexHeight = ((float) getHeight()) / mIndexList.size();
for (int i = 0; i < mIndexList.size(); i++) {
if (mSelectionPosition == i) {
canvas.drawText(mIndexList.get(i), getWidth() / 2, mIndexHeight * 0.85f + mIndexHeight * i, mFocusPaint);
} else {
canvas.drawText(mIndexList.get(i), getWidth() / 2, mIndexHeight * 0.85f + mIndexHeight * i, mPaint);
}
}
}
int getPositionForPointY(float y) {
if (mIndexList.size() <= 0) return -1;
int position = (int) (y / mIndexHeight);
if (position < 0) {
position = 0;
} else if (position > mIndexList.size() - 1) {
position = mIndexList.size() - 1;
}
return position;
}
int getSelectionPosition() {
return mSelectionPosition;
}
void setSelectionPosition(int position) {
this.mSelectionPosition = position;
invalidate();
}
int getFirstRecyclerViewPositionBySelection() {
String index = mIndexList.get(mSelectionPosition);
if (mMapping.containsKey(index)) {
return mMapping.get(index);
}
return -1;
}
List<String> getIndexList() {
return mIndexList;
}
void setDatas(boolean showAllLetter, ArrayList<EntityWrapper> datas) {
this.mDatas = datas;
ArrayList<String> tempHeaderList = null;
if (showAllLetter) {
mIndexList = Arrays.asList(getResources().getStringArray(R.array.indexable_letter));
mIndexList = new ArrayList<>(mIndexList);
tempHeaderList = new ArrayList<>();
}
for (int i = 0; i < datas.size(); i++) {
EntityWrapper wrapper = datas.get(i);
if (wrapper.getItemType() == EntityWrapper.TYPE_TITLE || wrapper.getIndexTitle() == null) {
String index = wrapper.getIndex();
if (!TextUtils.isEmpty(index)) {
if (!showAllLetter) {
mIndexList.add(index);
} else {
if (IndexableLayout.INDEX_SIGN.equals(index)) {
mIndexList.add(IndexableLayout.INDEX_SIGN);
} else if (mIndexList.indexOf(index) < 0) {
if (wrapper.getHeaderFooterType() == EntityWrapper.TYPE_HEADER && tempHeaderList.indexOf(index) < 0) {
tempHeaderList.add(index);
} else if (wrapper.getHeaderFooterType() == EntityWrapper.TYPE_FOOTER) {
mIndexList.add(index);
}
}
}
if (!mMapping.containsKey(index)) {
mMapping.put(index, i);
}
}
}
}
if (showAllLetter) {
mIndexList.addAll(0, tempHeaderList);
}
requestLayout();
}
void setSelection(int firstVisibleItemPosition) {
if (mDatas == null || mDatas.size() <= firstVisibleItemPosition || firstVisibleItemPosition < 0)
return;
EntityWrapper wrapper = mDatas.get(firstVisibleItemPosition);
int position = mIndexList.indexOf(wrapper.getIndex());
if (mSelectionPosition != position && position >= 0) {
mSelectionPosition = position;
invalidate();
}
}
}
| [
"hqw@kewaimiao.com"
] | hqw@kewaimiao.com |
8f8d86ba822129a5ce7b944775172e8aa17640fc | a63d261c59ac4e66e20313a8837f22fac3cd0855 | /src/cn/edu/xmu/servlet/Sec_DeleteImportantStudy.java | 1eeb39b02a9208fd22c7742cab52ae5ea373a6b1 | [] | no_license | Guosmilesmile/iqa | 9a7d54a3192b0e4634b9a0f268c106b9cbf1f07d | db7935120911396818146eeadb1ac4da095e0ffb | refs/heads/master | 2021-01-20T17:46:31.076475 | 2016-08-21T08:46:25 | 2016-08-21T08:46:25 | 65,795,465 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,873 | java | package cn.edu.xmu.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.sql.SQLException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import cn.edu.xmu.dao.ImportantStudyDao;
import cn.edu.xmu.dao.SchoolExecutiveUnitDao;
import cn.edu.xmu.daoimpl.ImportantStudyDaoImpl;
import cn.edu.xmu.daoimpl.SchoolExecutiveUnitDaoImpl;
/**
* Servlet implementation class DeleteSchoolExecutiveUnit
*/
@WebServlet("/Sec_DeleteImportantStudy")
public class Sec_DeleteImportantStudy extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public Sec_DeleteImportantStudy() {
super();
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
request.setCharacterEncoding("UTF-8");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;Charset=UTF-8");
PrintWriter out = response.getWriter();
String seu_id = request.getParameter("ipids");
String seuid[] = seu_id.split(",");
ImportantStudyDao importantStudyDao = new ImportantStudyDaoImpl();
boolean result = false;
try {
result = importantStudyDao.batchDelete(seuid);
} catch (SQLException e) {
e.printStackTrace();
}
System.out.println("删除纪录的结果"+result);
out.print(result);
}
}
| [
"511955993@qq.com"
] | 511955993@qq.com |
8c1f1bd48f9446c1004f0ff4f9381888ea911acf | 56e87f1d1ea499318c5fcdb4594f0efd9cfceebb | /repository/src/main/java/oasis/names/tc/emergency/EDXL/TEP/_1/ExtensionType.java | ad4a09237a2aa4ad969a0d3e89dc7f30fd0f099a | [] | no_license | vergetid/impress | 7da9353b65bc324bb58c6694747925ab92bac104 | dd207cabeff4af8449245d96d276ceb7a71ba14d | refs/heads/master | 2020-05-21T12:34:54.412796 | 2017-06-20T13:28:14 | 2017-06-20T13:28:14 | 55,222,896 | 0 | 0 | null | 2017-03-31T13:00:22 | 2016-04-01T10:06:44 | Java | UTF-8 | Java | false | false | 3,735 | 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: 2016.04.01 at 06:03:54 PM EEST
//
package oasis.names.tc.emergency.EDXL.TEP._1;
import java.util.ArrayList;
import java.util.List;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlType;
/**
* Base type to allow communities to extend/augment an EDXL data standard
*
* <p>Java class for ExtensionType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ExtensionType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element name="community" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
* <element name="id" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
* <element name="parameter" type="{urn:oasis:names:tc:emergency:edxl:extension:1.0}ParameterType" maxOccurs="unbounded"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ExtensionType", namespace = "urn:oasis:names:tc:emergency:edxl:extension:1.0", propOrder = {
"community",
"id",
"parameter"
})
public class ExtensionType {
@XmlElement(required = true)
@XmlSchemaType(name = "anyURI")
protected String community;
@XmlElement(required = true)
@XmlSchemaType(name = "anyURI")
protected String id;
@XmlElement(required = true)
protected List<ParameterType> parameter;
/**
* Gets the value of the community property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getCommunity() {
return community;
}
/**
* Sets the value of the community property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setCommunity(String value) {
this.community = value;
}
/**
* Gets the value of the id property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getId() {
return id;
}
/**
* Sets the value of the id property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setId(String value) {
this.id = value;
}
/**
* Gets the value of the parameter 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 parameter property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getParameter().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link ParameterType }
*
*
*/
public List<ParameterType> getParameter() {
if (parameter == null) {
parameter = new ArrayList<ParameterType>();
}
return this.parameter;
}
}
| [
"vergetid@ubitech.eu"
] | vergetid@ubitech.eu |
23d2c7f346d7dd1c10400585e66226e5a2dead28 | 132ef19f6dbfd8dcb2c0680421b53a4182c96b7e | /工具/Picturepark.SDK.Playground-master/Picturepark.SDK.Playground-master/playground/java-client/src/main/java/io/swagger/client/model/TemplateBase.java | 1671968ef0fea1173f4314bf61fc2a34382990d8 | [] | no_license | weedkiller/CommonPlatform2 | 0f6ea0cf4055cb67fdfcab0a024acf9631bf483a | eb5114a6ea019b98b3a5e41f38ba3621c4da43d0 | refs/heads/master | 2023-02-24T14:56:35.260089 | 2019-05-31T08:16:31 | 2019-05-31T08:16:31 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,183 | java | /*
* Web API Swagger specification
* No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
*
* OpenAPI spec version: 1.0.0
*
*
* NOTE: This class is auto generated by the swagger code generator program.
* https://github.com/swagger-api/swagger-codegen.git
* Do not edit the class manually.
*/
package io.swagger.client.model;
import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.IOException;
/**
* TemplateBase
*/
@javax.annotation.Generated(value = "io.swagger.codegen.languages.JavaClientCodegen", date = "2017-10-04T14:36:42.044Z")
public class TemplateBase {
@SerializedName("width")
private Integer width = null;
@SerializedName("height")
private Integer height = null;
@SerializedName("kind")
private String kind = null;
public TemplateBase width(Integer width) {
this.width = width;
return this;
}
/**
* Get width
* @return width
**/
@ApiModelProperty(value = "")
public Integer getWidth() {
return width;
}
public void setWidth(Integer width) {
this.width = width;
}
public TemplateBase height(Integer height) {
this.height = height;
return this;
}
/**
* Get height
* @return height
**/
@ApiModelProperty(value = "")
public Integer getHeight() {
return height;
}
public void setHeight(Integer height) {
this.height = height;
}
public TemplateBase kind(String kind) {
this.kind = kind;
return this;
}
/**
* Get kind
* @return kind
**/
@ApiModelProperty(required = true, value = "")
public String getKind() {
return kind;
}
public void setKind(String kind) {
this.kind = kind;
}
@Override
public boolean equals(java.lang.Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
TemplateBase templateBase = (TemplateBase) o;
return Objects.equals(this.width, templateBase.width) &&
Objects.equals(this.height, templateBase.height) &&
Objects.equals(this.kind, templateBase.kind);
}
@Override
public int hashCode() {
return Objects.hash(width, height, kind);
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class TemplateBase {\n");
sb.append(" width: ").append(toIndentedString(width)).append("\n");
sb.append(" height: ").append(toIndentedString(height)).append("\n");
sb.append(" kind: ").append(toIndentedString(kind)).append("\n");
sb.append("}");
return sb.toString();
}
/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {
if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n ");
}
}
| [
"a6818162@163.com"
] | a6818162@163.com |
998d59eb4db26a4ffebbb01df6a2e738daa0655a | de58fee2d49827f14b1845ba631a1c73ae915d9f | /src/main/java/es/upm/disnet/pubmed/parser/DiseaseOntologyOBOParser.java | 9fd3efa153f29cea37822031d0c76e6fbe5f9f38 | [] | no_license | pantapps/pubmed_text_extraction_rest | a9f639d639e6b5fb02170c3ccc64b0dfab11c085 | 169498cf89c30642ab55a16324d6438771f00ac9 | refs/heads/master | 2021-09-10T03:10:32.878297 | 2018-03-20T16:29:11 | 2018-03-20T16:29:11 | 126,084,180 | 0 | 0 | null | 2018-03-20T21:22:47 | 2018-03-20T21:22:47 | null | UTF-8 | Java | false | false | 1,097 | java | /*
* Copyright (c) 2018. Eduardo P. Garcia del Valle.
*
* If other author is present on the file, the copyrights are shared or of the mentioned author.
*
* Unless required by applicable law or agreed to in writing, software is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*/
package es.upm.disnet.pubmed.parser;
import es.upm.disnet.pubmed.parser.GenericSemiStructuredTextParser.Record;
import java.io.IOException;
import java.nio.file.Path;
import java.util.List;
/**
* @author Eduardo P. Garcia del Valle
*/
public class DiseaseOntologyOBOParser {
public final static String RECORD_DELIMETER = "[Term]";
public final static String PROPERTY_DELIMETER = ": ";
public final static String ID_KEY = "id";
private final GenericSemiStructuredTextParser parser = new GenericSemiStructuredTextParser(
RECORD_DELIMETER, PROPERTY_DELIMETER, ID_KEY
);
public final List<Record> parse(Path filePath, String encoding) throws IOException {
return parser.parse(filePath, encoding);
}
} | [
"gerardolagar@ctb.upm.es"
] | gerardolagar@ctb.upm.es |
b3015491cb2f55de399187eb10f3e51d4c37404a | 6e0fe0c6b38e4647172259d6c65c2e2c829cdbc5 | /modules/base/lang-impl/src/main/java/com/intellij/psi/stubs/SerializedStubTreeDataExternalizer.java | 9eeb503a0b8fb3f165cf19736a83e325efab9b7f | [
"Apache-2.0",
"LicenseRef-scancode-jgraph"
] | permissive | TCROC/consulo | 3f9a6df84e0fbf2b6211457b8a5f5857303b3fa6 | cda24a03912102f916dc06ffce052892a83dd5a7 | refs/heads/master | 2023-01-30T13:19:04.216407 | 2020-12-06T16:57:00 | 2020-12-06T16:57:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,977 | java | // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.psi.stubs;
import com.intellij.util.ArrayUtil;
import com.intellij.util.CompressionUtil;
import com.intellij.util.io.DataExternalizer;
import com.intellij.util.io.DataInputOutputUtil;
import com.intellij.util.io.PersistentHashMapValueStorage;
import javax.annotation.Nonnull;
import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;
public class SerializedStubTreeDataExternalizer implements DataExternalizer<SerializedStubTree> {
private final boolean myIncludeInputs;
private final SerializationManagerEx mySerializationManager;
public SerializedStubTreeDataExternalizer() {
this(true, null);
}
public SerializedStubTreeDataExternalizer(boolean inputs, SerializationManagerEx manager) {
myIncludeInputs = inputs;
mySerializationManager = manager;
}
@Override
public final void save(@Nonnull final DataOutput out, @Nonnull final SerializedStubTree tree) throws IOException {
if (PersistentHashMapValueStorage.COMPRESSION_ENABLED) {
DataInputOutputUtil.writeINT(out, tree.myTreeByteLength);
out.write(tree.myTreeBytes, 0, tree.myTreeByteLength);
if (myIncludeInputs) {
DataInputOutputUtil.writeINT(out, tree.myIndexedStubByteLength);
out.write(tree.myIndexedStubBytes, 0, tree.myIndexedStubByteLength);
}
}
else {
CompressionUtil.writeCompressed(out, tree.myTreeBytes, 0, tree.myTreeByteLength);
if (myIncludeInputs) CompressionUtil.writeCompressed(out, tree.myIndexedStubBytes, 0, tree.myIndexedStubByteLength);
}
}
@Nonnull
@Override
public final SerializedStubTree read(@Nonnull final DataInput in) throws IOException {
if (PersistentHashMapValueStorage.COMPRESSION_ENABLED) {
int serializedStubsLength = DataInputOutputUtil.readINT(in);
byte[] bytes = new byte[serializedStubsLength];
in.readFully(bytes);
int indexedStubByteLength;
byte[] indexedStubBytes;
if (myIncludeInputs) {
indexedStubByteLength = DataInputOutputUtil.readINT(in);
indexedStubBytes = new byte[indexedStubByteLength];
in.readFully(indexedStubBytes);
}
else {
indexedStubByteLength = 0;
indexedStubBytes = ArrayUtil.EMPTY_BYTE_ARRAY;
}
SerializedStubTree tree = new SerializedStubTree(bytes, bytes.length, null, indexedStubBytes, indexedStubByteLength, null);
if (mySerializationManager != null) tree.setSerializationManager(mySerializationManager);
return tree;
}
else {
byte[] treeBytes = CompressionUtil.readCompressed(in);
byte[] indexedStubBytes = myIncludeInputs ? CompressionUtil.readCompressed(in) : ArrayUtil.EMPTY_BYTE_ARRAY;
return new SerializedStubTree(treeBytes, treeBytes.length, null, indexedStubBytes, indexedStubBytes.length, null);
}
}
}
| [
"vistall.valeriy@gmail.com"
] | vistall.valeriy@gmail.com |
c82a839b5f5d1b9214b761ad04de0eb22102064b | 80129960b2a7fd197f318a5de8a338b6fb043329 | /gamll_collector/src/main/java/com/amazon/bean/AppFavorites.java | c8444d50a04e4a293def78dfd14a46a898f021c8 | [] | no_license | Joe-round/gmall | 0f73204b688ba3b6acff60fcfaff07cda8ceab69 | 42406cdf07476a35ffb0188a25f584b11c976386 | refs/heads/master | 2022-06-28T21:11:05.316309 | 2019-11-30T01:27:05 | 2019-11-30T01:27:05 | 224,811,274 | 0 | 0 | null | 2022-06-17T02:44:09 | 2019-11-29T08:33:11 | Java | UTF-8 | Java | false | false | 802 | java | package com.amazon.bean;
/**
* @author zwq
* @date 2019/11/4 11:31
*/
public class AppFavorites {
private int id;//主键
private int course_id;//商品id
private int userid;//用户ID
private String add_time;//创建时间
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public int getCourse_id() {
return course_id;
}
public void setCourse_id(int course_id) {
this.course_id = course_id;
}
public int getUserid() {
return userid;
}
public void setUserid(int userid) {
this.userid = userid;
}
public String getAdd_time() {
return add_time;
}
public void setAdd_time(String add_time) {
this.add_time = add_time;
}
}
| [
"l"
] | l |
cd0c2c84d7980b5e153bb2e2b3de8ffb91e85e80 | da0437ec50f5b58759118e02ae8e66e1e820a7a2 | /src/org/darion/algorithms/list/LinkedListMain.java | 8ca73a121ba75bfb2e86c6d2d39ab8fb77c81434 | [] | no_license | darionyaphet/algorithms | e37f71d62f0d63001be885d3bed6d425f3a0b421 | 3171efc02b6a987acc2e82389ecb5b80793a52db | refs/heads/master | 2020-05-21T03:24:11.097619 | 2018-10-08T15:32:42 | 2018-10-08T15:32:42 | 25,767,225 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 339 | java | package org.darion.algorithms.list;
public class LinkedListMain {
public static void main(String[] args) {
LinkedList list = new LinkedList(5);
list.add("0");
list.add("1");
list.add("2");
list.add("3");
list.add("4");
list.add("5");
list.add("6");
list.add("7");
list.add("8");
list.add("9");
list.print();
}
}
| [
"darion.yaphet@gmail.com"
] | darion.yaphet@gmail.com |
d19b68579659e73de70521617c69c83e29a86f6f | dbf70b8d061d33cca63047c1a98cdb52430c58cb | /Source/movieMaker/SoundSample.java | 8ba325e025eb8a17e6d3c94f27b0178c2b518740 | [] | no_license | pwsunderland/Alice-Sunderland | 9ffad4d6bbdaa791dc12d83ce5c62f73848e1f83 | 987ee4c889fbd1f0f66e64406f521cf23dfc7311 | refs/heads/master | 2021-01-01T18:07:01.647398 | 2015-05-10T23:37:17 | 2015-05-10T23:37:17 | 35,165,423 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,923 | java | package movieMaker;
import edu.cmu.cs.stage3.lang.Messages;
/**
* Class that represents a sample of a sound. It knows what sound object
* it comes from and knows what frame number this sample is in the sound
* object.
*
* Copyright Georgia Institute of Technology 2004
* @author Barb Ericson ericson@cc.gatech.edu
*/
public class SoundSample
{
/** the sound that this element belongs to */
private SimpleSound sound = null;
/** the frame number of this sample in the buffer */
private int frameNumber = 0;
///////////////////// Constructors //////////////////////////////////
/**
* Constructor that takes a sound and valueArray
* @param sound the sound object this sample comes from
* @param frameNumber the frameNumber of this sample in the sound
*/
public SoundSample(SimpleSound sound, int frameNumber)
{
this.sound = sound;
this.frameNumber = frameNumber;
}
/////////////////// Methods /////////////////////////////////////////
/**
* Method to get the value of this sample as in int
* and handle the possible sound exception
* @return the value of this sample as an int
*/
public int getValue() {
int value = 0;
try {
value = sound.getSampleValue(frameNumber);
} catch (SoundException ex) {
}
return value;
}
/**
* Method to set the value of this sample and
* handle the sound exception
* @param value the value to use
*/
public void setValue(int value)
{
try {
sound.setSampleValue(frameNumber,value);
} catch (SoundException ex) {
}
}
/**
* Method to return a string with the information about
* this object
* @return a string with information about this object
*/
public String toString()
{
return Messages.getString("Sample_at_index_") + frameNumber + Messages.getString("_has_value_") + getValue();
}
} // end of SoundSample class
| [
"peter.sunderland@usma.edu"
] | peter.sunderland@usma.edu |
953961ac0950689166c60586e71d2d4ec436b419 | 27ead3f923583383203e495cf56622a5013444a3 | /basex-core/src/main/java/org/basex/query/func/fn/FnDocumentUri.java | d0497a8ed7772541546e79f3f29cd372f48c2e4f | [
"BSD-3-Clause"
] | permissive | StSchuler/basex | 76453d41fdb8e2a6440356a36a55520015a8069d | 7659e0a2eb9be35fa27fb1e33247b622a0a286a3 | refs/heads/master | 2020-12-25T04:07:39.499586 | 2014-11-04T01:33:37 | 2014-11-04T01:33:37 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,069 | java | package org.basex.query.func.fn;
import org.basex.core.*;
import org.basex.query.*;
import org.basex.query.func.*;
import org.basex.query.util.*;
import org.basex.query.value.item.*;
import org.basex.query.value.node.*;
import org.basex.query.value.type.*;
import org.basex.util.*;
/**
* Function implementation.
*
* @author BaseX Team 2005-14, BSD License
* @author Christian Gruen
*/
public final class FnDocumentUri extends StandardFunc {
@Override
public Item item(final QueryContext qc, final InputInfo ii) throws QueryException {
final ANode node = toEmptyNode(arg(0, qc), qc);
if(node == null || node.type != NodeType.DOC) return null;
final byte[] uri = node.baseURI();
return uri.length == 0 ? null : Uri.uri(uri, false);
}
@Override
public boolean has(final Flag flag) {
return (flag == Flag.X30 || flag == Flag.CTX) && exprs.length == 0 || super.has(flag);
}
@Override
public boolean accept(final ASTVisitor visitor) {
return (exprs.length != 0 || visitor.lock(DBLocking.CTX)) && super.accept(visitor);
}
}
| [
"christian.gruen@gmail.com"
] | christian.gruen@gmail.com |
61ef8a9ca8d318f63bdf1194ba11fc94079301ed | c13da44fd0627df92d8c17b8cc248bb05ce5e8af | /src/main/java/database/model/DBEvent.java | 4a38620e40e10b6fbf97ed1b0a0af63e040c4892 | [
"Apache-2.0"
] | permissive | AdamStuart/appFX | a411929b3f2249205b0a7a862bc594b24f63ecf4 | 3e87cea537cb777ccaad312a31a1be916482e24e | refs/heads/master2 | 2021-01-24T06:47:20.363628 | 2017-05-16T18:27:31 | 2017-05-16T18:27:31 | 43,520,600 | 2 | 2 | null | 2016-06-07T21:49:58 | 2015-10-01T20:55:19 | Java | UTF-8 | Java | false | false | 1,653 | java | package database.model;
import gui.Forms;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.collections.ObservableMap;
import javafx.scene.layout.HBox;
import javafx.scene.layout.Region;
import javafx.scene.layout.VBox;
import task.IDBTable;
import util.DBUtil;
public class DBEvent implements IDBTable
{
static String EVENT_FORM = "DBEvent";
Region form;
// ----------------------------------------------------
@Override public Region makeForm()
{
VBox pane = Forms.makeFormContainer();
HBox idBox = Forms.formbox( "ID", "id", 50);
HBox line1 = Forms.makeLabelFieldHBox( "", "Event", "event");
HBox line2 = Forms.makeTimeDateDurationBox("", "", true, true, true);
HBox line3 = Forms.makeURLBox("");
pane.getChildren().addAll(idBox, line1, line2, line3);
return pane;
}
@Override public Region getForm()
{
if (form == null)
form = makeForm();
return form;
}
@Override public String getTableName() { return EVENT_FORM; }
@Override public String getSchema()
{
return DBUtil.createSchema(EVENT_FORM,
"event _SHORT",
"date _SHORT",
"time _SHORT",
"duration _SHORT",
"url _SHORT");
}
@Override public ObservableList<String> getFieldList()
{
ObservableList<String> fields = FXCollections.observableArrayList();
fields.addAll("id", "event", "date", "time", "duration", "url");
return fields;
}
@Override public void install(ObservableMap<String, String> fields)
{
DBUtil.install(form, fields);
}
@Override public void extract(ObservableMap<String, String> fields)
{
DBUtil.extract(form, fields);
}
}
| [
"adamtreister@gmail.com"
] | adamtreister@gmail.com |
e3a4e8741034c5ac972a63aa0f2c27225ee609f8 | 80403ec5838e300c53fcb96aeb84d409bdce1c0c | /server/modules/announcements/src/org/labkey/announcements/config/MessageConfigServiceImpl.java | d2a1e6d77e89d2ce0bdb102c9df54d3aadfdcb65 | [] | no_license | scchess/LabKey | 7e073656ea494026b0020ad7f9d9179f03d87b41 | ce5f7a903c78c0d480002f738bccdbef97d6aeb9 | refs/heads/master | 2021-09-17T10:49:48.147439 | 2018-03-22T13:01:41 | 2018-03-22T13:01:41 | 126,447,224 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,167 | java | /*
* Copyright (c) 2011-2017 LabKey Corporation
*
* 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.labkey.announcements.config;
import org.labkey.announcements.model.MessageConfigManager;
import org.labkey.api.data.Container;
import org.labkey.api.message.settings.MessageConfigService;
import org.labkey.api.security.User;
import java.util.Map;
import java.util.concurrent.ConcurrentSkipListMap;
/**
* User: klum
* Date: Jan 19, 2011
* Time: 4:36:05 PM
*/
public class MessageConfigServiceImpl implements MessageConfigService
{
private final Map<String, MessageConfigService.ConfigTypeProvider> _providers = new ConcurrentSkipListMap<>();
@Override
public void savePreference(User currentUser, Container c, User projectUser, MessageConfigService.ConfigTypeProvider provider, int preference, String srcIdentifier)
{
MessageConfigManager.saveEmailPreference(currentUser, c, projectUser, provider.getType(), preference, srcIdentifier);
}
@Override
public MessageConfigService.UserPreference getPreference(Container c, User user, MessageConfigService.ConfigTypeProvider provider, String srcIdentifier)
{
return MessageConfigManager.getUserEmailPrefRecord(c, user, provider.getType(), srcIdentifier);
}
@Override
public MessageConfigService.UserPreference[] getPreferences(Container c, MessageConfigService.ConfigTypeProvider provider)
{
return MessageConfigManager.getUserEmailPrefs(c, provider.getType());
}
@Override
public MessageConfigService.NotificationOption getOption(int optionId)
{
return MessageConfigManager.getEmailOption(optionId);
}
@Override
public MessageConfigService.NotificationOption[] getOptions(MessageConfigService.ConfigTypeProvider provider)
{
return MessageConfigManager.getEmailOptions(provider.getType());
}
public void registerConfigType(MessageConfigService.ConfigTypeProvider provider)
{
String key = provider.getType();
ConfigTypeProvider previous = _providers.putIfAbsent(key, provider);
if (null != previous)
throw new IllegalArgumentException("ConfigService provider " + key + " has already been registered");
}
public MessageConfigService.ConfigTypeProvider[] getConfigTypes()
{
return _providers.values().toArray(new MessageConfigService.ConfigTypeProvider[_providers.size()]);
}
public MessageConfigService.ConfigTypeProvider getConfigType(String identifier)
{
return _providers.get(identifier);
}
}
| [
"klum@labkey.com"
] | klum@labkey.com |
c4821cbe9462a7b80a94b0a050de323839b612a1 | d297e221e8ca16ff154a405ba215e8dda1a734a7 | /Day07_Basic/src/test/main/MainClass09.java | db282b4b93aefdaab99d311de6fa44cff2241440 | [] | no_license | zahir7/JavaSE | faaede565d3c1bbc5121e8901228e6be558bd449 | ace92bc3751be9fef2a593291fae9f5657d3e681 | refs/heads/master | 2022-01-18T02:30:45.815616 | 2019-06-13T14:55:37 | 2019-06-13T14:55:37 | 79,884,974 | 0 | 0 | null | null | null | null | UHC | Java | false | false | 667 | java | package test.main;
public class MainClass09 {
public static void main(String[] args) {
//final 상수 정의 하기
final int FIST=0;
final int SWORD=1;
final int GUN=2;
//무기를 종류를 저장할 변수 선언하고 값 대입하기
int weapon=FIST; //처음 사용할 무기 지정하기
//저장된 무기의 종류에 따라서 다른 동작을 하게 하기 위해서
switch(weapon){
case FIST :
System.out.println("주먹으로 공격!");break;
case SWORD :
System.out.println("칼로 공격!");break;
case GUN :
System.out.println("총으로 공격!");break;
}//switch()
}//main
}//calss
| [
"zahir7@naver.com"
] | zahir7@naver.com |
64ad0ede198a2af227865f79e6f9d35067fe176a | 42ed12696748a102487c2f951832b77740a6b70d | /Mage.Sets/src/mage/sets/lorwyn/SqueakingPieSneak.java | f8b9f447e64dae7c3a8f40778efdbdfb95aafccd | [] | no_license | p3trichor/mage | fcb354a8fc791be4713e96e4722617af86bd3865 | 5373076a7e9c2bdabdabc19ffd69a8a567f2188a | refs/heads/master | 2021-01-16T20:21:52.382334 | 2013-05-09T21:13:25 | 2013-05-09T21:13:25 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,479 | java | /*
* Copyright 2010 BetaSteward_at_googlemail.com. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice, this list of
* conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright notice, this list
* of conditions and the following disclaimer in the documentation and/or other materials
* provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY BetaSteward_at_googlemail.com ``AS IS'' AND ANY EXPRESS OR IMPLIED
* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL BetaSteward_at_googlemail.com OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* The views and conclusions contained in the software and documentation are those of the
* authors and should not be interpreted as representing official policies, either expressed
* or implied, of BetaSteward_at_googlemail.com.
*/
package mage.sets.lorwyn;
import java.util.UUID;
import mage.Constants.CardType;
import mage.Constants.Rarity;
import mage.MageInt;
import mage.abilities.costs.OrCost;
import mage.abilities.costs.common.RevealTargetFromHandCost;
import mage.abilities.costs.mana.GenericManaCost;
import mage.abilities.keyword.FearAbility;
import mage.cards.CardImpl;
import mage.filter.FilterCard;
import mage.filter.predicate.mageobject.SubtypePredicate;
import mage.target.common.TargetCardInHand;
/**
*
* @author LevelX2
*/
public class SqueakingPieSneak extends CardImpl<SqueakingPieSneak> {
private static final FilterCard filter = new FilterCard("a Goblin card from your hand");
static {
filter.add(new SubtypePredicate("Goblin"));
}
public SqueakingPieSneak(UUID ownerId) {
super(ownerId, 142, "Squeaking Pie Sneak", Rarity.UNCOMMON, new CardType[]{CardType.CREATURE}, "{1}{B}");
this.expansionSetCode = "LRW";
this.subtype.add("Goblin");
this.subtype.add("Rogue");
this.color.setBlack(true);
this.power = new MageInt(2);
this.toughness = new MageInt(2);
// As an additional cost to cast Squeaking Pie Sneak, reveal a Goblin card from your hand or pay {3}.
this.getSpellAbility().addCost(new OrCost(
new RevealTargetFromHandCost(new TargetCardInHand(filter)),
new GenericManaCost(3),
"reveal a Goblin card from your hand or pay {3}"));
// Fear
this.addAbility(FearAbility.getInstance());
}
public SqueakingPieSneak(final SqueakingPieSneak card) {
super(card);
}
@Override
public SqueakingPieSneak copy() {
return new SqueakingPieSneak(this);
}
}
| [
"ludwig.hirth@online.de"
] | ludwig.hirth@online.de |
d99e59e64f8b1d086c71a5d72c7339211aacf7ee | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Honor5C-7.0/src/main/java/com/tencent/qqimagecompare/QQImageBitmapLoader.java | 9f8101e62e9f8022c177b7f9e29df22da6028be2 | [] | 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 | 689 | java | package com.tencent.qqimagecompare;
/* compiled from: Unknown */
public class QQImageBitmapLoader {
private static native long DecodeJpegFileSubImage1s6iC(String str, int i, int i2, int i3, int i4, int i5, int i6);
public static QQImageBitmap loadBitmapSubImage(String str, int i, int i2, int i3, int i4, QQImageLoaderHeadInfo qQImageLoaderHeadInfo) {
if (!qQImageLoaderHeadInfo.bJpeg) {
return null;
}
QQImageBitmap qQImageBitmap = new QQImageBitmap(true);
qQImageBitmap.mThisC = DecodeJpegFileSubImage1s6iC(str, i, i2, i3, i4, qQImageLoaderHeadInfo.mMCUWidth, qQImageLoaderHeadInfo.mMCUHeight);
return qQImageBitmap;
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
0f32315271d7cccde06cf13cf22ec79c6fed090f | 5ec087de3ff7ff2e25f9d3fd3565e7801a6246c1 | /src/main/java/net/iotgw/mail/imap/protocol/ID.java | 91afc95333b1dbdff68bf5c42647db1ab2c94d94 | [
"Apache-2.0"
] | permissive | xjavamail/javamail | e5c4356fd45c4490345f711f79ebbd774fabbee7 | 712aa78c8a260983017608fffb6c0c72cbba3836 | refs/heads/main | 2023-08-08T01:54:11.205935 | 2021-09-13T12:10:30 | 2021-09-13T12:10:30 | 312,495,376 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,992 | java | /*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 1997-2017 Oracle and/or its affiliates. All rights reserved.
*
* The contents of this file are subject to the terms of either the GNU
* General Public License Version 2 only ("GPL") or the Common Development
* and Distribution License("CDDL") (collectively, the "License"). You
* may not use this file except in compliance with the License. You can
* obtain a copy of the License at
* https://oss.oracle.com/licenses/CDDL+GPL-1.1
* or LICENSE.txt. See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each
* file and include the License file at LICENSE.txt.
*
* GPL Classpath Exception:
* Oracle designates this particular file as subject to the "Classpath"
* exception as provided by Oracle in the GPL Version 2 section of the License
* file that accompanied this code.
*
* Modifications:
* If applicable, add the following below the License Header, with the fields
* enclosed by brackets [] replaced by your own identifying information:
* "Portions Copyright [year] [name of copyright owner]"
*
* Contributor(s):
* If you wish your version of this file to be governed by only the CDDL or
* only the GPL Version 2, indicate your decision by adding "[Contributor]
* elects to include this software in this distribution under the [CDDL or GPL
* Version 2] license." If you don't indicate a single choice of license, a
* recipient has the option to distribute your version of this file under
* either the CDDL, the GPL Version 2 or to extend the choice of license to
* its licensees as provided above. However, if you add GPL Version 2 code
* and therefore, elected the GPL Version 2 license, then the option applies
* only if the new code is made subject to such option by the copyright
* holder.
*/
package net.iotgw.mail.imap.protocol;
import java.util.*;
import net.iotgw.mail.iap.*;
/**
* This class represents the response to the ID command. <p>
*
* See <A HREF="http://www.ietf.org/rfc/rfc2971.txt">RFC 2971</A>.
*
* @since JavaMail 1.5.1
* @author Bill Shannon
*/
public class ID {
private Map<String, String> serverParams = null;
/**
* Parse the server parameter list out of the response.
*
* @param r the response
* @exception ProtocolException for protocol failures
*/
public ID(Response r) throws ProtocolException {
// id_response ::= "ID" SPACE id_params_list
// id_params_list ::= "(" #(string SPACE nstring) ")" / nil
// ;; list of field value pairs
r.skipSpaces();
int c = r.peekByte();
if (c == 'N' || c == 'n') // assume NIL
return;
if (c != '(')
throw new ProtocolException("Missing '(' at start of ID");
serverParams = new HashMap<>();
String[] v = r.readStringList();
if (v != null) {
for (int i = 0; i < v.length; i += 2) {
String name = v[i];
if (name == null)
throw new ProtocolException("ID field name null");
if (i + 1 >= v.length)
throw new ProtocolException("ID field without value: " +
name);
String value = v[i + 1];
serverParams.put(name, value);
}
}
serverParams = Collections.unmodifiableMap(serverParams);
}
/**
* Return the parsed server params.
*/
Map<String, String> getServerParams() {
return serverParams;
}
/**
* Convert the client parameters into an argument list for the ID command.
*/
static Argument getArgumentList(Map<String,String> clientParams) {
Argument arg = new Argument();
if (clientParams == null) {
arg.writeAtom("NIL");
return arg;
}
Argument list = new Argument();
// add params to list
for (Map.Entry<String, String> e : clientParams.entrySet()) {
list.writeNString(e.getKey()); // assume these are ASCII only
list.writeNString(e.getValue());
}
arg.writeArgument(list);
return arg;
}
}
| [
"seven.stone.2012@gmail.com"
] | seven.stone.2012@gmail.com |
74b5a1308fdf5032b573c9ae74ebf9200094dc4d | 4131625553ff59b4c730ae7148dd5d603d8cb87d | /pluralSight/javaFundamentalsGenerics/com/monotonic/generics/_5_wildcards/unbounded/UnboundedUsage.java | 82ce01a28a7229ad3a7d6a8e41d12b03452d8a9b | [
"MIT",
"Apache-2.0"
] | permissive | odonnmi/learnNPractice | 29034304303aab3827e6b3334b1d7d9d65b93e54 | eb1c775e4d6e35cebb7b109b46b91f9aecb2d9ec | refs/heads/master | 2020-12-04T14:52:00.520219 | 2019-09-03T06:30:03 | 2019-09-03T06:30:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 570 | java | package com.monotonic.generics._5_wildcards.unbounded;
import java.util.ArrayList;
import java.util.List;
import com.monotonic.generics._5_wildcards.bounded.Person;
public class UnboundedUsage {
public static void main(String[] args) throws ClassNotFoundException{
List<Object> objects = new ArrayList<>();
objects.add(new Object());
objects.add(new Person("Don Draper",89));
System.out.println(objects);
// Its only safe to add null to a list<?>
List<?> wildcards = new ArrayList<>();
wildcards.add(null);
System.out.println(wildcards);
}
}
| [
"sagarnikam123@gmail.com"
] | sagarnikam123@gmail.com |
09a743ae9a248e3178a87d00c953afb4bb3c0cf1 | 2613bdf3410bdf59ae7d9f2d1e78c53114b57f06 | /09. Web Spring Framework/spring_web9/src/kr/co/test/web/control/LogInController.java | b34f4fa91fce830618d63f526e1aafa9fcf09de0 | [] | no_license | dely2p/2016 | 7647012db5d2dd208e6e74f276e0e896d3fb47a6 | bcbcebf8af26efcf5fa076234744e518e769894c | refs/heads/master | 2020-05-21T20:52:07.048971 | 2016-09-29T08:16:35 | 2016-09-29T08:16:35 | 63,388,473 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 619 | java | package kr.co.test.web.control;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import kr.co.test.web.dto.MemberDTO;
@Controller
public class LogInController {
/*@RequestMapping("/login.do")
public String login(){
return "loginForm";
}*/
@RequestMapping("/loginOk.do")
public ModelAndView loginOk(@ModelAttribute("dto")MemberDTO dto){
// db 연결
// 로그인 성공
return new ModelAndView("index","dto",dto);
}
}
| [
"lhyal2p@gmail.com"
] | lhyal2p@gmail.com |
8d02ce293b162e65b8df2e3cd2cc7bd92840d790 | 3d0bc884dcd82c8cf4ef99b7cf9ac35b2d634f72 | /app/src/main/java/com/muhaiminur/shohozmovie/viewmodel/MovielistPageViewModel.java | f27618b145c26898b230ed36a403d4b448ef40b0 | [] | no_license | Muhaiminur/SHOHOZ | 5f65cf7b42664f163cbb07cb52e27f933a6940db | e8adb1f14fee29c26a7704bd62618064263bd104 | refs/heads/main | 2023-06-25T03:30:02.924833 | 2021-07-27T23:32:21 | 2021-07-27T23:32:21 | 390,155,778 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,117 | java | package com.muhaiminur.shohozmovie.viewmodel;
import android.app.Application;
import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;
import com.muhaiminur.shohozmovie.data.Genres;
import com.muhaiminur.shohozmovie.data.Movie;
import com.muhaiminur.shohozmovie.repository.MovieRepo;
import org.jetbrains.annotations.NotNull;
import java.util.List;
public class MovielistPageViewModel extends AndroidViewModel {
private MovieRepo repo;
private LiveData<List<Movie>> moData;
private LiveData<List<Genres>> genData;
public MovielistPageViewModel(@NonNull @NotNull Application application) {
super(application);
repo = new MovieRepo(application);
}
public void init() {
moData = repo.getmovieData();
genData = repo.getgenData();
}
public void getmovielistonline() {
repo.get_movie_list();
}
public LiveData<List<Movie>> getmovieResponseLiveData() {
return moData;
}
public LiveData<List<Genres>> getgenResponseLiveData() {
return genData;
}
} | [
"muhaiminurabir@gmail.com"
] | muhaiminurabir@gmail.com |
a03e19da25379851868aae239db5963be37e0d4a | cea3fe1ae551bf2f81b431876d15563d6347119b | /case 算法/common/src/main/java/com/gang/algorithm/demo/search/Num_233_NumberofDigitOne.java | d4f94180da767d949c30e9cdd0437acbdfea4e28 | [] | no_license | black-ant/case | 2e33cbd74b559924d3a53092a8b070edea4d143d | 589598bb41398b330bc29b2ca61757296b55b579 | refs/heads/master | 2023-07-31T23:22:51.168312 | 2022-07-24T06:15:53 | 2022-07-24T06:15:53 | 137,761,384 | 86 | 26 | null | 2023-07-17T01:03:21 | 2018-06-18T14:22:01 | Java | UTF-8 | Java | false | false | 807 | java | package com.gang.algorithm.demo.search;
import com.gang.algorithm.demo.service.AbstractAlgorithmService;
/**
* @Classname Num_233_NumberofDigitOne
* @Description TODO
* @Date 2021/8/20
* @Created by zengzg
*/
public class Num_233_NumberofDigitOne extends AbstractAlgorithmService {
public static void main(String[] args) {
new Num_233_NumberofDigitOne().run();
}
@Override
public void run() {
logger.info("------> {} <-------", countDigitOne(99));
}
public int countDigitOne(int n) {
int count = 0;
for (long k = 1; k <= n; k *= 10) {
long r = n / k, m = n % k;
// sum up the count of ones on every place k
count += (r + 8) / 10 * k + (r % 10 == 1 ? m + 1 : 0);
}
return count;
}
}
| [
"1016930479@qq.com"
] | 1016930479@qq.com |
ad6e9b4dac5d2da8f48e1c7178210caabd5841c9 | b59a518d8bf03443668552f5b24a2950e96816a7 | /src/apps/gu-prj/src/metamodel/java/com/xukaiqiang/gu/orm/entity/CuResS_.java | 0940d4d3f4e9a06c0079e10c9d451836e55c3eb2 | [] | no_license | jjmnbv/guitar | 94ecbfca238580e6916ad6bd6c6d0ebc4407f6ae | 36a668c814356e8343c6f0a451bec645ec41c112 | refs/heads/master | 2021-06-23T10:33:43.654118 | 2017-07-21T09:09:48 | 2017-07-21T09:09:48 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,227 | java | package com.xukaiqiang.gu.orm.entity;
import com.xukaiqiang.gu.orm.dialect.AbstractCuResS_;
import javax.annotation.Generated;
import javax.persistence.metamodel.SingularAttribute;
import javax.persistence.metamodel.StaticMetamodel;
@Generated(value="Dali", date="2017-07-09T02:13:11.180+0800")
@StaticMetamodel(CuResS.class)
public class CuResS_ extends AbstractCuResS_ {
public static volatile SingularAttribute<CuResS, Integer> ve;
public static volatile SingularAttribute<CuResS, String> crDt;
public static volatile SingularAttribute<CuResS, String> crTm;
public static volatile SingularAttribute<CuResS, String> laUpDt;
public static volatile SingularAttribute<CuResS, Long> laUpUsId;
public static volatile SingularAttribute<CuResS, String> resNa;
public static volatile SingularAttribute<CuResS, String> resUrlCa;
public static volatile SingularAttribute<CuResS, Short> dispOr;
public static volatile SingularAttribute<CuResS, String> pageMarkYn;
public static volatile SingularAttribute<CuResS, String> co;
public static volatile SingularAttribute<CuResS, CuSyC> cusyc;
public static volatile SingularAttribute<CuResS, CuIconS> cuicos;
public static volatile SingularAttribute<CuResS, CuResS> parent;
}
| [
"994028591@qq.com"
] | 994028591@qq.com |
0b68a09b0b514ab3a9b7e4ce0e056faccda2f47c | 19e7d0b42d83793475558b24182160a569f272db | /modules/jooby-redoc/src/test/java/io/jooby/redoc/RedocResourceTest.java | ab6a89da97b9d41a4747b384ed123de8f5d20683 | [
"Apache-2.0"
] | permissive | husayt/jooby | 31a2ab5bbad1195beb7788962c6fd27516efbf41 | 526dadc3aad01c3b0385530a6b3d57d8bf41c341 | refs/heads/2.x | 2022-06-02T07:42:46.782877 | 2020-04-30T16:26:17 | 2020-04-30T16:26:17 | 260,260,848 | 0 | 0 | Apache-2.0 | 2020-04-30T16:26:18 | 2020-04-30T16:22:14 | null | UTF-8 | Java | false | false | 800 | java | package io.jooby.redoc;
import org.apache.commons.io.IOUtils;
import org.junit.jupiter.api.Test;
import java.io.IOException;
import static org.junit.jupiter.api.Assertions.assertNotNull;
import static org.junit.jupiter.api.Assertions.assertTrue;
public class RedocResourceTest {
@Test
public void shouldCheckIndexPage() throws IOException {
String index = asset("index.html");
assertTrue(index.contains("${redocPath}"), index);
assertTrue(index.contains("${openAPIPath}"), index);
}
@Test
public void shouldCheckBundle() throws IOException {
String index = asset("redoc.standalone.js");
assertNotNull(index);
}
private String asset(String resource) throws IOException {
return IOUtils.toString(getClass().getResource("/redoc/" + resource), "UTF-8");
}
}
| [
"espina.edgar@gmail.com"
] | espina.edgar@gmail.com |
cdfbca692ba4dc8a5408e909f98a030107b2b638 | c06c1159ccb3720fa059cbcdf1cd517baa4602cb | /jsf-login-servlet-filter/src/test/java/com/codenotfound/primefaces/view/WebDriverTest.java | 35d3e6b29d124bd8a84d8128ab94ea5b45aef6ed | [
"MIT"
] | permissive | Betlista/jsf-primefaces | cac7a546c71dad9d21fe5f5619953964bf2c554e | ef0db6f5a9715e502446fb97c27c535d5366d2c3 | refs/heads/master | 2020-12-01T13:43:53.911738 | 2019-12-28T18:54:11 | 2019-12-28T18:54:43 | 230,645,864 | 0 | 0 | MIT | 2019-12-28T18:13:35 | 2019-12-28T18:13:35 | null | UTF-8 | Java | false | false | 633 | java | package com.codenotfound.primefaces.view;
import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.htmlunit.HtmlUnitDriver;
public class WebDriverTest {
protected static WebDriver driver;
@BeforeClass
public static void setUp() {
driver = new HtmlUnitDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
}
@After
public void cleanUp() {
driver.manage().deleteAllCookies();
}
@AfterClass
public static void tearDown() {
driver.close();
}
}
| [
"codenotfound.com@gmail.com"
] | codenotfound.com@gmail.com |
33713ddf7accfb92167c328077f9850d4e0ffd76 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/2/2_f4122a78268b7b2dfb91eb91a81bdf383c4555bc/JamendoApp/2_f4122a78268b7b2dfb91eb91a81bdf383c4555bc_JamendoApp_s.java | 64d4cb441f246586ec950425072fc4e19f9d0fb9 | [] | 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 | 6,473 | java | /*-
* Copyright (C) 2009 Google Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.google.android.demos.jamendo.app;
import com.google.android.demos.jamendo.net.JamendoCache;
import com.google.android.demos.jamendo.provider.JamendoContract;
import com.google.android.imageloader.BitmapContentHandler;
import com.google.android.imageloader.ImageLoader;
import android.app.Application;
import android.content.Context;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.content.pm.ResolveInfo;
import android.net.Uri;
import android.os.Handler;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.text.method.MovementMethod;
import android.text.style.ClickableSpan;
import android.text.style.URLSpan;
import android.view.View;
import android.widget.TextView;
import java.net.ContentHandler;
import java.net.URLStreamHandlerFactory;
import java.util.List;
public class JamendoApp extends Application {
private static final int IMAGE_TASK_LIMIT = 3;
// 50% of available memory, up to a maximum of 32MB
private static final long IMAGE_CACHE_SIZE = Math.max(Runtime.getRuntime().maxMemory() / 2,
32 * 1024 * 1024);
public static final String DEFAULT_ARTIST_AVATAR = "http://imgjam.com/mandarine/layout/artiste_avatar.jpg";
public static final String DEFAULT_USER_AVATAR_50 = "http://imgjam.com/avatars/questionmark/avatar.50.gif";
public static final String DEFAULT_USER_AVATAR_100 = "http://imgjam.com/avatars/questionmark/avatar.100.gif";
/**
* Configures a {@link TextView} to host clickable links (as in
* {@link android.text.util.Linkify}).
*/
public static final void addLinkMovementMethod(TextView text) {
MovementMethod method = text.getMovementMethod();
if (!(method instanceof LinkMovementMethod)) {
if (text.getLinksClickable()) {
method = LinkMovementMethod.getInstance();
text.setMovementMethod(method);
}
}
}
/**
* Display a single link in a {@link TextView}.
*
* @param textView the target {@link TextView}
* @param linkText the text to linkify.
* @param linkUri the link {@link Uri}.
*/
public static final void setTextToLink(TextView textView, CharSequence linkText, Uri linkUri) {
String url = linkUri.toString();
SpannableString text = new SpannableString(linkText);
Object span = new URLSpan(url);
text.setSpan(span, 0, linkText.length(), 0);
textView.setText(text);
addLinkMovementMethod(textView);
}
public static final void setTextToLink(TextView textView, CharSequence linkText, Intent intent) {
SpannableString text = new SpannableString(linkText);
Object span = new IntentSpan(intent);
text.setSpan(span, 0, linkText.length(), 0);
textView.setText(text);
addLinkMovementMethod(textView);
}
public static boolean isPlaylistStreamingSupported(Context context) {
Intent intent = new Intent(Intent.ACTION_VIEW);
Uri data = JamendoContract.createRadioUri(JamendoContract.FORMAT_M3U, 0L);
String type = JamendoContract.CONTENT_TYPE_M3U;
intent.setDataAndType(data, type);
return isIntentSupported(context, intent);
}
public static boolean isIntentSupported(Context context, Intent intent) {
PackageManager pm = context.getPackageManager();
int flags = PackageManager.MATCH_DEFAULT_ONLY;
List<ResolveInfo> activities = pm.queryIntentActivities(intent, flags);
return !activities.isEmpty();
}
private static ImageLoader createImageLoader(Context context) {
// Install the file cache (if it is not already installed)
JamendoCache.install(context);
// Just use the default URLStreamHandlerFactory because
// it supports all of the required URI schemes (http).
URLStreamHandlerFactory streamFactory = null;
// Load images using a BitmapContentHandler
// and cache the image data in the file cache.
ContentHandler bitmapHandler = JamendoCache.capture(new BitmapContentHandler(), null);
// For pre-fetching, use a "sink" content handler so that the
// the binary image data is captured by the cache without actually
// parsing and loading the image data into memory. After pre-fetching,
// the image data can be loaded quickly on-demand from the local cache.
ContentHandler prefetchHandler = JamendoCache.capture(JamendoCache.sink(), null);
// Perform callbacks on the main thread
Handler handler = null;
return new ImageLoader(IMAGE_TASK_LIMIT, streamFactory, bitmapHandler, prefetchHandler,
IMAGE_CACHE_SIZE, handler);
}
private static class IntentSpan extends ClickableSpan {
private final Intent mIntent;
public IntentSpan(Intent intent) {
super();
mIntent = intent;
}
@Override
public void onClick(View widget) {
Context context = widget.getContext();
context.startActivity(mIntent);
}
}
private ImageLoader mImageLoader;
@Override
public void onCreate() {
super.onCreate();
mImageLoader = createImageLoader(this);
}
@Override
public void onTerminate() {
mImageLoader = null;
super.onTerminate();
}
@Override
public Object getSystemService(String name) {
if (ImageLoader.IMAGE_LOADER_SERVICE.equals(name)) {
return mImageLoader;
} else {
return super.getSystemService(name);
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
cd68bb0d6771fd5d9974dd89c64fbf051c721665 | 6be39fc2c882d0b9269f1530e0650fd3717df493 | /weixin反编译/sources/com/tencent/mm/protocal/c/bcm.java | 3849b7bde575f3f9d5d5cf72a4268c2b0b00bfdd | [] | no_license | sir-deng/res | f1819af90b366e8326bf23d1b2f1074dfe33848f | 3cf9b044e1f4744350e5e89648d27247c9dc9877 | refs/heads/master | 2022-06-11T21:54:36.725180 | 2020-05-07T06:03:23 | 2020-05-07T06:03:23 | 155,177,067 | 5 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,096 | java | package com.tencent.mm.protocal.c;
import com.tencent.mm.bp.a;
import e.a.a.b;
import java.util.LinkedList;
public final class bcm extends a {
public blt wPn;
public bet wPo;
protected final int a(int i, Object... objArr) {
int fW;
if (i == 0) {
e.a.a.c.a aVar = (e.a.a.c.a) objArr[0];
if (this.wPn == null) {
throw new b("Not all required fields were included: SnsRecommendObject");
}
if (this.wPn != null) {
aVar.fZ(1, this.wPn.bkL());
this.wPn.a(aVar);
}
if (this.wPo == null) {
return 0;
}
aVar.fZ(2, this.wPo.bkL());
this.wPo.a(aVar);
return 0;
} else if (i == 1) {
if (this.wPn != null) {
fW = e.a.a.a.fW(1, this.wPn.bkL()) + 0;
} else {
fW = 0;
}
if (this.wPo != null) {
fW += e.a.a.a.fW(2, this.wPo.bkL());
}
return fW;
} else if (i == 2) {
e.a.a.a.a aVar2 = new e.a.a.a.a((byte[]) objArr[0], unknownTagHandler);
for (fW = a.a(aVar2); fW > 0; fW = a.a(aVar2)) {
if (!super.a(aVar2, this, fW)) {
aVar2.cKx();
}
}
if (this.wPn != null) {
return 0;
}
throw new b("Not all required fields were included: SnsRecommendObject");
} else if (i != 3) {
return -1;
} else {
e.a.a.a.a aVar3 = (e.a.a.a.a) objArr[0];
bcm bcm = (bcm) objArr[1];
int intValue = ((Integer) objArr[2]).intValue();
LinkedList JD;
int size;
byte[] bArr;
a blt;
e.a.a.a.a aVar4;
boolean z;
switch (intValue) {
case 1:
JD = aVar3.JD(intValue);
size = JD.size();
for (intValue = 0; intValue < size; intValue++) {
bArr = (byte[]) JD.get(intValue);
blt = new blt();
aVar4 = new e.a.a.a.a(bArr, unknownTagHandler);
for (z = true; z; z = blt.a(aVar4, blt, a.a(aVar4))) {
}
bcm.wPn = blt;
}
return 0;
case 2:
JD = aVar3.JD(intValue);
size = JD.size();
for (intValue = 0; intValue < size; intValue++) {
bArr = (byte[]) JD.get(intValue);
blt = new bet();
aVar4 = new e.a.a.a.a(bArr, unknownTagHandler);
for (z = true; z; z = blt.a(aVar4, blt, a.a(aVar4))) {
}
bcm.wPo = blt;
}
return 0;
default:
return -1;
}
}
}
}
| [
"denghailong@vargo.com.cn"
] | denghailong@vargo.com.cn |
4e1e56af3981dbab3c79aa6ecc991989c117ef55 | 5ac8e0a285dc63f5fe4d1e44ad6f756a7fb016c8 | /servlet-app/src/com/techlab/controller/SetCookieController.java | 7bf0f60cd959b8a8d808f1a2cf641b17394fba16 | [] | no_license | deepak-misal/servlet | 0a70e6bd5c794672e3d74c76dc12b827c14036da | 8173cb196377327c4228446a86fd9b579c2c0466 | refs/heads/master | 2023-07-06T14:14:26.842326 | 2021-08-07T07:43:07 | 2021-08-07T07:43:07 | 393,615,209 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,123 | java | package com.techlab.controller;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/setcookie")
public class SetCookieController extends HttpServlet {
private static final long serialVersionUID = 1L;
public SetCookieController() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String value=request.getParameter("color");
Cookie colorCookie=new Cookie("color", request.getParameter("color"));
PrintWriter out=response.getWriter();
colorCookie.setMaxAge(60*60*24*7);
response.addCookie(colorCookie);
out.println("<h1>Cookie set!</h1>");
out.println("<h1> Value: "+value+"</h1>");
}
}
| [
"deepak.misal2350@gmail.com"
] | deepak.misal2350@gmail.com |
aa69badc51e9372433c5b97deaad10c664fbcc9a | 0e06e096a9f95ab094b8078ea2cd310759af008b | /classes17-dex2jar/com/google/android/gms/auth/api/signin/internal/zzk.java | c523bd3ffbe03c58a8e7cdd748565c2941f08049 | [] | 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 | 475 | java | //
// Decompiled by Procyon v0.5.34
//
package com.google.android.gms.auth.api.signin.internal;
import android.os.RemoteException;
import com.google.android.gms.common.api.Api$AnyClient;
import com.google.android.gms.common.api.Result;
import com.google.android.gms.common.api.GoogleApiClient;
import com.google.android.gms.common.api.Status;
final class zzk extends zzo<Status>
{
zzk(final GoogleApiClient googleApiClient) {
super(googleApiClient);
}
}
| [
"querky1231@gmail.com"
] | querky1231@gmail.com |
f7942688ba3f66626f897a9ee529e18ee98c8e6e | 590cebae4483121569983808da1f91563254efed | /Router/schemas-src/eps-fts-schemas/src/main/java/ru/acs/fts/schemas/album/certificatetitlevessel/ShipownerType.java | 65e3ac06a852bebc246dcf200b780ac9a675f7c4 | [] | no_license | ke-kontur/eps | 8b00f9c7a5f92edeaac2f04146bf0676a3a78e27 | 7f0580cd82022d36d99fb846c4025e5950b0c103 | refs/heads/master | 2020-05-16T23:53:03.163443 | 2014-11-26T07:00:34 | 2014-11-26T07:01:51 | null | 0 | 0 | null | null | null | null | WINDOWS-1251 | Java | false | false | 1,296 | java |
package ru.acs.fts.schemas.album.certificatetitlevessel;
import ru.acs.fts.schemas.album.commonaggregatetypescust.AddressType;
import ru.acs.fts.schemas.album.commonaggregatetypescust.OrganizationBaseType;
/**
* Сведения о судовладельце
*/
public class ShipownerType extends OrganizationBaseType
{
private AddressType postalAddress;
private AddressType locationPlace;
/**
* Get the 'PostalAddress' element value. Почтовый адрес
*
* @return value
*/
public AddressType getPostalAddress() {
return postalAddress;
}
/**
* Set the 'PostalAddress' element value. Почтовый адрес
*
* @param postalAddress
*/
public void setPostalAddress(AddressType postalAddress) {
this.postalAddress = postalAddress;
}
/**
* Get the 'LocationPlace' element value. Место нахождения
*
* @return value
*/
public AddressType getLocationPlace() {
return locationPlace;
}
/**
* Set the 'LocationPlace' element value. Место нахождения
*
* @param locationPlace
*/
public void setLocationPlace(AddressType locationPlace) {
this.locationPlace = locationPlace;
}
}
| [
"m@brel.me"
] | m@brel.me |
a457fe7c463ab96042d4c6da8a39035779329651 | c15b74e50f249df767047dcb2564faf6b8166c51 | /src/main/java/com/xwy/mashibing/juc/c_004/T.java | dc6a4716140eca012e9d5bd1f3f956b103c38329 | [] | no_license | never123450/thread | 09c469e97ea1e81d1fdec96bd0784808982540ca | d5727a1643de3a10130166b3b396bac0d294ca63 | refs/heads/master | 2022-07-22T20:06:05.124971 | 2022-07-21T02:33:41 | 2022-07-21T02:33:41 | 204,009,094 | 0 | 0 | null | 2022-07-11T21:09:34 | 2019-08-23T13:57:56 | Java | UTF-8 | Java | false | false | 532 | java | /**
* synchronized�ؼ���
* ��ij���������
* @author mashibing
*/
package com.xwy.mashibing.juc.c_004;
public class T {
private static int count = 10;
public synchronized static void m() { //�����ͬ��synchronized(FineCoarseLock.class)
count--;
System.out.println(Thread.currentThread().getName() + " count = " + count);
}
public static void mm() {
synchronized(T.class) { //����һ������дsynchronized(this)�Ƿ���ԣ�
count --;
}
}
}
| [
"845619585@qq.com"
] | 845619585@qq.com |
8b6b849689d2dc53b8677bd0d3099e6ff9496b4d | 09e03ba73062c62c1d3389cdecb94f68430cd82d | /storage/common/src/main/java/org/artifactory/storage/fs/repo/StoringRepo.java | 437937b65aa86a01a75ac50d44cab902039f2a7f | [
"Apache-2.0"
] | permissive | alancnet/artifactory | 1ee6183301b581e60f67691d7fa025b0fb44b118 | 7ac3ea76471a00543eaf60e82b554d8edd894c0f | refs/heads/master | 2021-01-10T14:58:53.769805 | 2015-10-07T16:46:14 | 2015-10-07T16:46:14 | 43,829,862 | 3 | 6 | null | 2016-03-09T18:30:58 | 2015-10-07T16:38:51 | Java | UTF-8 | Java | false | false | 1,840 | java | /*
* Artifactory is a binaries repository manager.
* Copyright (C) 2012 JFrog Ltd.
*
* Artifactory is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* Artifactory 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 Artifactory. If not, see <http://www.gnu.org/licenses/>.
*/
package org.artifactory.storage.fs.repo;
import org.artifactory.repo.RepoPath;
import org.artifactory.sapi.fs.MutableVfsFolder;
import org.artifactory.sapi.fs.MutableVfsItem;
import org.artifactory.sapi.fs.VfsFolder;
import org.artifactory.sapi.fs.VfsItem;
import java.util.List;
/**
* Interface for repositories that store real artifacts.
*
* @author Yossi Shaul
*/
public interface StoringRepo {
/**
* @return The repository key
*/
public String getKey();
/**
* @param mutableFolder The mutable folder
* @return A mutable (write locked) list of direct descendants of the current mutable folder
*/
List<MutableVfsItem> getMutableChildren(MutableVfsFolder mutableFolder);
/**
* @return True if an item with this relative path exists in this storing repository.
*/
boolean itemExists(String relativePath);
List<VfsItem> getImmutableChildren(VfsFolder folder);
boolean hasChildren(VfsFolder vfsFolder);
VfsFolder getImmutableFolder(RepoPath repoPath);
boolean isWriteLocked(RepoPath repoPath);
}
| [
"github@alanc.net"
] | github@alanc.net |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.