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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
a2eb38cb91515efbe111e76636e5eac6d41be527
|
21e36f755b78b5fd1af6454661baa9b73cf507c2
|
/org.molymer/src-gen/org/molymer/modelDsl/Model.java
|
ec1053ac712a038a3bf841c10d970e329f53a2f6
|
[] |
no_license
|
shumy/molymer
|
4ae2ab6548daf4bd7c67139278c4e26502349036
|
d550fb3b035dc7b020c78b4228f0f26a858ff6a7
|
refs/heads/master
| 2021-01-18T13:51:22.189338
| 2015-09-04T22:35:59
| 2015-09-04T22:35:59
| 41,822,227
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,896
|
java
|
/**
*/
package org.molymer.modelDsl;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EObject;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Model</b></em>'.
* <!-- end-user-doc -->
*
* <p>
* The following features are supported:
* <ul>
* <li>{@link org.molymer.modelDsl.Model#getImports <em>Imports</em>}</li>
* <li>{@link org.molymer.modelDsl.Model#getElements <em>Elements</em>}</li>
* </ul>
* </p>
*
* @see org.molymer.modelDsl.ModelDslPackage#getModel()
* @model
* @generated
*/
public interface Model extends EObject
{
/**
* Returns the value of the '<em><b>Imports</b></em>' containment reference list.
* The list contents are of type {@link org.molymer.modelDsl.Import}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Imports</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Imports</em>' containment reference list.
* @see org.molymer.modelDsl.ModelDslPackage#getModel_Imports()
* @model containment="true"
* @generated
*/
EList<Import> getImports();
/**
* Returns the value of the '<em><b>Elements</b></em>' containment reference list.
* The list contents are of type {@link org.molymer.modelDsl.Element}.
* <!-- begin-user-doc -->
* <p>
* If the meaning of the '<em>Elements</em>' containment reference list isn't clear,
* there really should be more of a description here...
* </p>
* <!-- end-user-doc -->
* @return the value of the '<em>Elements</em>' containment reference list.
* @see org.molymer.modelDsl.ModelDslPackage#getModel_Elements()
* @model containment="true"
* @generated
*/
EList<Element> getElements();
} // Model
|
[
"micaelpedrosa@gmail.com"
] |
micaelpedrosa@gmail.com
|
f9ce284ed6305fdeab413a546eecde4382d16a93
|
1cedb98670494d598273ca8933b9d989e7573291
|
/ezyfox-server-util/src/test/java/com/tvd12/ezyfoxserver/testing/io/EzyMathTest.java
|
8690307cdf263420367d49780462dfd6b2e9b2c4
|
[
"Apache-2.0"
] |
permissive
|
thanhdatbkhn/ezyfox-server
|
ee00e1e23a2b38597bac94de7103bdc3a0e0bedf
|
069e70c8a7d962df8341444658b198ffadc3ce61
|
refs/heads/master
| 2020-03-10T11:08:10.921451
| 2018-01-14T16:50:37
| 2018-01-14T16:50:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,210
|
java
|
package com.tvd12.ezyfoxserver.testing.io;
import org.testng.annotations.Test;
import com.tvd12.ezyfoxserver.io.EzyBytes;
import com.tvd12.ezyfoxserver.io.EzyMath;
import com.tvd12.test.base.BaseTest;
import static org.testng.Assert.*;
import java.nio.ByteBuffer;
public class EzyMathTest extends BaseTest {
@Test
public void test() {
assertEquals(EzyMath.bin2uint(
new byte[] {1, 2, 3, 4}),
ByteBuffer.wrap(new byte[] {1, 2, 3, 4}).getInt());
assertEquals(EzyMath.bin2int(8), 255);
assertEquals(EzyMath.bin2ulong(
new byte[] {1, 2, 3, 4, 5, 6, 7, 8}),
ByteBuffer.wrap(new byte[] {1, 2, 3, 4, 5, 6, 7, 8}).getLong());
assertEquals(EzyMath.bin2long(40), 1099511627775L);
assertEquals(EzyMath.bin2int(
getBytes(ByteBuffer.allocate(4).putInt(-100))),
-100);
assertEquals(EzyMath.bin2long(
getBytes(ByteBuffer.allocate(8).putLong(-100000))),
-100000L);
byte[] xor = new byte[] {(byte) 255, (byte) 255, (byte) 255};
EzyMath.xor(xor);
assertEquals(xor, new byte[] {0, 0, 0});
}
protected byte[] getBytes(ByteBuffer buffer) {
return EzyBytes.getBytes(buffer);
}
@Override
public Class<?> getTestClass() {
return EzyMath.class;
}
}
|
[
"itprono3@gmail.com"
] |
itprono3@gmail.com
|
3324374a7e328a60e3ba5a0118989c288b87566f
|
a7497fae8dd751b07abe1c61dbb09d52f47f3d76
|
/org.isistan.flabot.launcher.instrumentation/src/org/isistan/flabot/launcher/instrumentation/localjava/LocalJavaApplicationCollectionLauncher.java
|
6c7b7cf571d3519b41a9f75d1b8880e47b798274
|
[] |
no_license
|
niconistal/FLABot
|
639388ec36e514cb6f8c63caa01530bff2e1fcbd
|
a118b9fd20c3ee44b6d2b456b3f7b362ce92327a
|
refs/heads/master
| 2021-03-12T19:52:59.571266
| 2013-01-29T01:46:46
| 2013-01-29T01:46:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,006
|
java
|
package org.isistan.flabot.launcher.instrumentation.localjava;
import java.io.File;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.debug.core.ILaunch;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.isistan.flabot.launcher.collection.CollectionLauncherException;
import org.isistan.flabot.launcher.collection.TraceConfigurationSavingCollectionLauncher;
public class LocalJavaApplicationCollectionLauncher extends TraceConfigurationSavingCollectionLauncher {
@Override
public void launch(ILaunchConfiguration flabotConfiguration,
ILaunchConfiguration targetConfiguration,
String mode, ILaunch launch, IProgressMonitor monitor,
File traceConfiguration)
throws CoreException, CollectionLauncherException {
LocalJavaApplicationConfigurationDelegate delegate=
new LocalJavaApplicationConfigurationDelegate(traceConfiguration);
delegate.launch(targetConfiguration, mode, launch, monitor);
}
}
|
[
"nistal.nicolas@gmail.com"
] |
nistal.nicolas@gmail.com
|
6eb42ea6e5348e13c1c13ac0a5b7ab9a9d7debd9
|
13c2d3db2d49c40c74c2e6420a9cd89377f1c934
|
/program_data/JavaProgramData/85/2168.java
|
c9989d640de2509d1e9865382ab61cbe7d4a53be
|
[
"MIT"
] |
permissive
|
qiuchili/ggnn_graph_classification
|
c2090fefe11f8bf650e734442eb96996a54dc112
|
291ff02404555511b94a4f477c6974ebd62dcf44
|
refs/heads/master
| 2021-10-18T14:54:26.154367
| 2018-10-21T23:34:14
| 2018-10-21T23:34:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 987
|
java
|
package <missing>;
public class GlobalMembers
{
public static int Main()
{
char[][] zfc = new char[100][21];
int n;
int i;
int k;
String tempVar = ConsoleInput.scanfRead();
if (tempVar != null)
{
n = Integer.parseInt(tempVar);
}
for (i = 0;i < n;i++)
{
String tempVar2 = ConsoleInput.scanfRead();
if (tempVar2 != null)
{
zfc[i] = tempVar2.charAt(0);
}
}
for (i = 0;i < n;i++)
{
if ((zfc[i][0] >= 'A' && zfc[i][0] <= 'Z') || zfc[i][0] >= 'a' && zfc[i][0] <= 'z' || zfc[i][0] == '_')
{
int m = String.valueOf(zfc[i]).length();
int c = 0;
for (k = 1;k < m;k++)
{
if ((zfc[i][k] >= '0' && zfc[i][k] <= '9') || (zfc[i][k] >= 'A' && zfc[i][k] <= 'Z') || (zfc[i][k] >= 'a' && zfc[i][k] <= 'z') || zfc[i][k] == '_')
{
c++;
}
}
if (c == (m - 1))
{
System.out.print("yes\n");
}
else
{
System.out.print("no\n");
}
}
else
{
System.out.print("no\n");
}
}
return 0;
}
}
|
[
"y.yu@open.ac.uk"
] |
y.yu@open.ac.uk
|
7fa786f840f3ca1bdd15d3caa073c67aaa4dfc5e
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/13/13_dcc8afd0e6528258d8be3608b952e19a32acf8fc/EntityAIOwnerHurtByTarget/13_dcc8afd0e6528258d8be3608b952e19a32acf8fc_EntityAIOwnerHurtByTarget_s.java
|
8670d59c496d6412edef7e63f0afc0654a1d99a5
|
[] |
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
| 4,655
|
java
|
/*
* This file is part of MyPet
*
* Copyright (C) 2011-2013 Keyle
* MyPet is licensed under the GNU Lesser General Public License.
*
* MyPet 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.
*
* MyPet is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package de.Keyle.MyPet.entity.ai.target;
import de.Keyle.MyPet.entity.types.EntityMyPet;
import de.Keyle.MyPet.entity.types.MyPet;
import de.Keyle.MyPet.skill.skills.implementation.Behavior;
import de.Keyle.MyPet.skill.skills.implementation.Behavior.BehaviorState;
import de.Keyle.MyPet.util.MyPetPvP;
import net.minecraft.server.v1_5_R2.EntityLiving;
import net.minecraft.server.v1_5_R2.EntityPlayer;
import net.minecraft.server.v1_5_R2.EntityTameableAnimal;
import net.minecraft.server.v1_5_R2.PathfinderGoal;
import org.bukkit.entity.Player;
public class EntityAIOwnerHurtByTarget extends PathfinderGoal
{
private EntityMyPet petEntity;
private EntityLiving lastDamager;
private MyPet myPet;
public EntityAIOwnerHurtByTarget(EntityMyPet entityMyPet)
{
this.petEntity = entityMyPet;
myPet = entityMyPet.getMyPet();
}
public boolean a()
{
if (!petEntity.canMove())
{
return false;
}
EntityLiving localEntityLiving = this.petEntity.getOwner();
if (localEntityLiving == null)
{
return false;
}
this.lastDamager = localEntityLiving.aF();
if (this.lastDamager == null || !lastDamager.isAlive())
{
return false;
}
if (lastDamager instanceof EntityPlayer)
{
Player targetPlayer = (Player) lastDamager.getBukkitEntity();
if (!MyPetPvP.canHurt(myPet.getOwner().getPlayer(), targetPlayer))
{
return false;
}
}
else if (lastDamager instanceof EntityMyPet)
{
MyPet targetMyPet = ((EntityMyPet) lastDamager).getMyPet();
if (!MyPetPvP.canHurt(myPet.getOwner().getPlayer(), targetMyPet.getOwner().getPlayer()))
{
return false;
}
}
else if (lastDamager instanceof EntityTameableAnimal)
{
EntityTameableAnimal tameable = (EntityTameableAnimal) lastDamager;
if (tameable.isTamed() && tameable.getOwner() != null)
{
Player tameableOwner = (Player) tameable.getOwner().getBukkitEntity();
if (myPet.getOwner().equals(tameableOwner))
{
return false;
}
}
}
if (myPet.getSkills().isSkillActive("Behavior"))
{
Behavior behaviorSkill = (Behavior) myPet.getSkills().getSkill("Behavior");
if (behaviorSkill.getBehavior() == Behavior.BehaviorState.Friendly)
{
return false;
}
if (behaviorSkill.getBehavior() == BehaviorState.Raid)
{
if (lastDamager instanceof EntityTameableAnimal && ((EntityTameableAnimal) lastDamager).isTamed())
{
return false;
}
if (lastDamager instanceof EntityMyPet)
{
return false;
}
if (lastDamager instanceof EntityPlayer)
{
return false;
}
}
}
return true;
}
public boolean b()
{
EntityLiving entityliving = petEntity.getGoalTarget();
if (!petEntity.canMove())
{
return false;
}
else if (entityliving == null)
{
return false;
}
else if (!entityliving.isAlive())
{
return false;
}
return true;
}
public void c()
{
petEntity.setGoalTarget(this.lastDamager);
}
public void d()
{
petEntity.setGoalTarget(null);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
29bde5828401037e3fc7504b939c05e00c394f64
|
f009dc33f9624aac592cb66c71a461270f932ffa
|
/src/main/java/com/alipay/api/response/AlipayOpenPublicPartnerMenuQueryResponse.java
|
4ce8e3ffe6b0b000833d9515a686d0de2c2dfd48
|
[
"Apache-2.0"
] |
permissive
|
1093445609/alipay-sdk-java-all
|
d685f635af9ac587bb8288def54d94e399412542
|
6bb77665389ba27f47d71cb7fa747109fe713f04
|
refs/heads/master
| 2021-04-02T16:49:18.593902
| 2020-03-06T03:04:53
| 2020-03-06T03:04:53
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 670
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.public.partner.menu.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class AlipayOpenPublicPartnerMenuQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 6155576134571952677L;
/**
* 服务窗菜单
*/
@ApiField("public_menu")
private String publicMenu;
public void setPublicMenu(String publicMenu) {
this.publicMenu = publicMenu;
}
public String getPublicMenu( ) {
return this.publicMenu;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
72fa71472afd85a9e5268ec6a7f033dc7082e1ae
|
cc671d6cc5765514f8716e97859dfc11358d2ce5
|
/src/test/java/org/synyx/urlaubsverwaltung/core/period/PeriodTest.java
|
03edc8ab1a9c2dac0f0b78f79a7aa20757cbf46e
|
[
"Apache-2.0"
] |
permissive
|
Intera/urlaubsverwaltung
|
0feb969dc6b223fedc5cbf265e5039111b5f8b44
|
87faa5c950029f9698420835a5b8c22933074fd5
|
refs/heads/master
| 2021-08-18T01:14:53.481179
| 2019-03-15T12:19:48
| 2019-03-15T12:19:48
| 27,863,695
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,703
|
java
|
package org.synyx.urlaubsverwaltung.core.period;
import org.joda.time.DateMidnight;
import org.junit.Assert;
import org.junit.Test;
/**
* @author Aljona Murygina - murygina@synyx.de
*/
public class PeriodTest {
@Test(expected = IllegalArgumentException.class)
public void ensureThrowsOnNullStartDate() {
new Period(null, DateMidnight.now(), DayLength.FULL);
}
@Test(expected = IllegalArgumentException.class)
public void ensureThrowsOnNullEndDate() {
new Period(DateMidnight.now(), null, DayLength.FULL);
}
@Test(expected = IllegalArgumentException.class)
public void ensureThrowsOnNullDayLength() {
new Period(DateMidnight.now(), DateMidnight.now(), null);
}
@Test(expected = IllegalArgumentException.class)
public void ensureThrowsOnZeroDayLength() {
new Period(DateMidnight.now(), DateMidnight.now(), DayLength.ZERO);
}
@Test(expected = IllegalArgumentException.class)
public void ensureThrowsIfEndDateIsBeforeStartDate() {
DateMidnight startDate = DateMidnight.now();
DateMidnight endDateBeforeStartDate = startDate.minusDays(1);
new Period(startDate, endDateBeforeStartDate, DayLength.FULL);
}
@Test(expected = IllegalArgumentException.class)
public void ensureThrowsIfStartAndEndDateAreNotSameForMorningDayLength() {
DateMidnight startDate = DateMidnight.now();
new Period(startDate, startDate.plusDays(1), DayLength.MORNING);
}
@Test(expected = IllegalArgumentException.class)
public void ensureThrowsIfStartAndEndDateAreNotSameForNoonDayLength() {
DateMidnight startDate = DateMidnight.now();
new Period(startDate, startDate.plusDays(1), DayLength.NOON);
}
@Test
public void ensureCanBeInitializedWithFullDay() {
DateMidnight startDate = DateMidnight.now();
DateMidnight endDate = startDate.plusDays(1);
Period period = new Period(startDate, endDate, DayLength.FULL);
Assert.assertEquals("Wrong start date", startDate, period.getStartDate());
Assert.assertEquals("Wrong end date", endDate, period.getEndDate());
Assert.assertEquals("Wrong day length", DayLength.FULL, period.getDayLength());
}
@Test
public void ensureCanBeInitializedWithHalfDay() {
DateMidnight date = DateMidnight.now();
Period period = new Period(date, date, DayLength.MORNING);
Assert.assertEquals("Wrong start date", date, period.getStartDate());
Assert.assertEquals("Wrong end date", date, period.getEndDate());
Assert.assertEquals("Wrong day length", DayLength.MORNING, period.getDayLength());
}
}
|
[
"murygina@synyx.de"
] |
murygina@synyx.de
|
fd962b3624e4e3f5646e7ee38c0acc4f88f61daa
|
c90832d18be978bc8b52683ca478e622cec182d3
|
/app/src/main/java/com/github/teocci/android/pptopus/model/DeviceInfo.java
|
843057861bc304c8458ee1fd3b9df185f74f367d
|
[] |
no_license
|
teocci/Android-PPTOpus
|
0d19e98a6684230530a9b20edc78e8d9966cc83f
|
cbac0197ff4ccb957b7fc4c1789e6b2a57f5a734
|
refs/heads/master
| 2020-04-02T21:50:36.557265
| 2018-11-19T07:10:42
| 2018-11-19T07:10:42
| 154,813,034
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 751
|
java
|
package com.github.teocci.android.pptopus.model;
/**
* Created by teocci.
*
* @author teocci@yandex.com on 2017-Jul-17
*/
public class DeviceInfo
{
public final String name;
public final String address;
public int transmission;
public long ping;
public DeviceInfo(String name, String address, int transmission, long ping)
{
this.name = name;
this.address = address;
this.transmission = transmission;
this.ping = ping;
}
@Override
public String toString()
{
return "[DeviceInfo] { name: '" + name +
"', address: " + address +
"', transmission: '" + transmission +
"', ping: '" + ping +
"' }";
}
}
|
[
"teocci@yandex.com"
] |
teocci@yandex.com
|
af4f6a758799e57e340e18bae0ad7bce5ffa236a
|
12b14b30fcaf3da3f6e9dc3cb3e717346a35870a
|
/examples/commons-math3/mutations/mutants-Sigmoid/67/org/apache/commons/math3/analysis/function/Sigmoid.java
|
354bdb5fc2da34ac3295e0be66e8d48a655a621d
|
[
"BSD-3-Clause",
"Minpack",
"Apache-2.0"
] |
permissive
|
SmartTests/smartTest
|
b1de326998857e715dcd5075ee322482e4b34fb6
|
b30e8ec7d571e83e9f38cd003476a6842c06ef39
|
refs/heads/main
| 2023-01-03T01:27:05.262904
| 2020-10-27T20:24:48
| 2020-10-27T20:24:48
| 305,502,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,721
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.commons.math3.analysis.function;
import java.util.Arrays;
import org.apache.commons.math3.analysis.FunctionUtils;
import org.apache.commons.math3.analysis.UnivariateFunction;
import org.apache.commons.math3.analysis.DifferentiableUnivariateFunction;
import org.apache.commons.math3.analysis.ParametricUnivariateFunction;
import org.apache.commons.math3.analysis.differentiation.DerivativeStructure;
import org.apache.commons.math3.analysis.differentiation.UnivariateDifferentiableFunction;
import org.apache.commons.math3.exception.NullArgumentException;
import org.apache.commons.math3.exception.DimensionMismatchException;
import org.apache.commons.math3.util.FastMath;
/**
* <a href="http://en.wikipedia.org/wiki/Sigmoid_function">
* Sigmoid</a> function.
* It is the inverse of the {@link Logit logit} function.
* A more flexible version, the generalised logistic, is implemented
* by the {@link Logistic} class.
*
* @since 3.0
* @version $Id$
*/
public class Sigmoid implements UnivariateDifferentiableFunction, DifferentiableUnivariateFunction {
/** Lower asymptote. */
private final double lo;
/** Higher asymptote. */
private final double hi;
/**
* Usual sigmoid function, where the lower asymptote is 0 and the higher
* asymptote is 1.
*/
public Sigmoid() {
this(0, 1);
}
/**
* Sigmoid function.
*
* @param lo Lower asymptote.
* @param hi Higher asymptote.
*/
public Sigmoid(double lo,
double hi) {
this.lo = lo;
this.hi = hi;
}
/** {@inheritDoc}
* @deprecated as of 3.1, replaced by {@link #value(DerivativeStructure)}
*/
@Deprecated
public UnivariateFunction derivative() {
return FunctionUtils.toDifferentiableUnivariateFunction(this).derivative();
}
/** {@inheritDoc} */
public double value(double x) {
return value(x, lo, hi);
}
/**
* Parametric function where the input array contains the parameters of
* the {@link Sigmoid#Sigmoid(double,double) sigmoid function}, ordered
* as follows:
* <ul>
* <li>Lower asymptote</li>
* <li>Higher asymptote</li>
* </ul>
*/
public static class Parametric implements ParametricUnivariateFunction {
/**
* Computes the value of the sigmoid at {@code x}.
*
* @param x Value for which the function must be computed.
* @param param Values of lower asymptote and higher asymptote.
* @return the value of the function.
* @throws NullArgumentException if {@code param} is {@code null}.
* @throws DimensionMismatchException if the size of {@code param} is
* not 2.
*/
public double value(double x, double ... param)
throws NullArgumentException,
DimensionMismatchException {
validateParameters(param);
return Sigmoid.value(x, param[0], param[1]);
}
/**
* Computes the value of the gradient at {@code x}.
* The components of the gradient vector are the partial
* derivatives of the function with respect to each of the
* <em>parameters</em> (lower asymptote and higher asymptote).
*
* @param x Value at which the gradient must be computed.
* @param param Values for lower asymptote and higher asymptote.
* @return the gradient vector at {@code x}.
* @throws NullArgumentException if {@code param} is {@code null}.
* @throws DimensionMismatchException if the size of {@code param} is
* not 2.
*/
public double[] gradient(double x, double ... param)
throws NullArgumentException,
DimensionMismatchException {
validateParameters(param);
final double invExp1 = 1 / (1 + FastMath.exp(-x));
return new double[] { 1 - invExp1, invExp1 };
}
/**
* Validates parameters to ensure they are appropriate for the evaluation of
* the {@link #value(double,double[])} and {@link #gradient(double,double[])}
* methods.
*
* @param param Values for lower and higher asymptotes.
* @throws NullArgumentException if {@code param} is {@code null}.
* @throws DimensionMismatchException if the size of {@code param} is
* not 2.
*/
private void validateParameters(double[] param)
throws NullArgumentException,
DimensionMismatchException {
if (param == null) {
throw new NullArgumentException();
}
if (param.length != 2) {
throw new DimensionMismatchException(param.length, 2);
}
}
}
/**
* @param x Value at which to compute the sigmoid.
* @param lo Lower asymptote.
* @param hi Higher asymptote.
* @return the value of the sigmoid function at {@code x}.
*/
private static double value(double x,
double lo,
double hi) {
return lo + (hi - lo) / (1 + FastMath.exp(-x));
}
/** {@inheritDoc}
* @since 3.1
*/
public DerivativeStructure value(final DerivativeStructure t)
throws DimensionMismatchException {
double[] f = new double[t.getOrder() + 1];
final double exp = FastMath.exp(+t.getValue());
if (Double.isInfinite(exp)) {
// special handling near lower boundary, to avoid NaN
f[0] = lo;
Arrays.fill(f, 1, f.length, 0.0);
} else {
// the nth order derivative of sigmoid has the form:
// dn(sigmoid(x)/dxn = P_n(exp(-x)) / (1+exp(-x))^(n+1)
// where P_n(t) is a degree n polynomial with normalized higher term
// P_0(t) = 1, P_1(t) = t, P_2(t) = t^2 - t, P_3(t) = t^3 - 4 t^2 + t...
// the general recurrence relation for P_n is:
// P_n(x) = n t P_(n-1)(t) - t (1 + t) P_(n-1)'(t)
final double[] p = new double[f.length];
final double inv = 1 / (1 + exp);
double coeff = hi - lo;
for (int n = 0; n < f.length; ++n) {
// update and evaluate polynomial P_n(t)
double v = 0;
p[n] = 1;
for (int k = n; k >= 0; --k) {
v = v * exp + p[k];
if (k > 1) {
p[k - 1] = (n - k + 2) * p[k - 2] - (k - 1) * p[k - 1];
} else {
p[0] = 0;
}
}
coeff *= inv;
f[n] = coeff * v;
}
// fix function value
f[0] += lo;
}
return t.compose(f);
}
}
|
[
"kesina@Kesinas-MBP.lan"
] |
kesina@Kesinas-MBP.lan
|
cabe80000c67e5ff04587f3e8a18a32416698638
|
9621605f80e3ae6d22a0568e04275c1c7587580b
|
/app/src/main/java/com/zlcdgroup/taskManager/ApiSonTaskCallBack.java
|
12a1f933d62bdae72332ccde88c095430ca2f0b2
|
[] |
no_license
|
akingyin1987/ShareLibs
|
cb21b9ca939839dafe2cb735092f7f26eb7b94c9
|
0f95fe1a57bf92ca3dc84784d80e51b7e8e2749b
|
refs/heads/master
| 2020-12-24T19:12:59.653793
| 2018-08-01T10:08:59
| 2018-08-01T10:08:59
| 56,663,612
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,650
|
java
|
package com.zlcdgroup.taskManager;
import com.zlcdgroup.taskManager.enums.TaskStatusEnum;
/**
* * * # #
* # _oo0oo_ #
* # o8888888o #
* # 88" . "88 #
* # (| -_- |) #
* # 0\ = /0 #
* # ___/`---'\___ #
* # .' \\| |# '. #
* # / \\||| : |||# \ #
* # / _||||| -:- |||||- \ #
* # | | \\\ - #/ | | #
* # | \_| ''\---/'' |_/ | #
* # \ .-\__ '-' ___/-. / #
* # ___'. .' /--.--\ `. .'___ #
* # ."" '< `.___\_<|>_/___.' >' "". #
* # | | : `- \`.;`\ _ /`;.`/ - ` : | | #
* # \ \ `_. \_ __\ /__ _/ .-` / / #
* # =====`-.____`.___ \_____/___.-`___.-'===== #
* # `=---=' #
* # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
* # #
* # 佛祖保佑 永无BUG #
* #
*
* @ Description: #
* Company:重庆中陆承大科技有限公司
* @ Author king
* @ Date 2016/10/24 17:00
* @ Version V1.0
*/
public interface ApiSonTaskCallBack {
void call(TaskStatusEnum taskStatusEnum);
}
|
[
"akingyin@163.com"
] |
akingyin@163.com
|
00a6b68c9027606ae28e985ebc1166ccdf67c191
|
0be82b9a18db00f0e0b0ac28b9fe3caaa2e276a6
|
/open-metadata-implementation/access-services/asset-owner/asset-owner-client/src/main/java/org/odpi/openmetadata/accessservices/assetowner/AssetOwnerInterface.java
|
f2f16c205792ed14ebe4b6fc09dd640648f77ac4
|
[
"Apache-2.0"
] |
permissive
|
constantinnastase/egeria
|
6d2882e08745d07b432477be93d43b4ce2a524b7
|
80f0a3cc172e063b61401a23268f5d1e2ccd8095
|
refs/heads/master
| 2020-03-22T09:47:26.442127
| 2018-07-18T12:58:11
| 2018-07-18T12:58:11
| 139,860,496
| 0
| 0
|
Apache-2.0
| 2018-07-05T14:33:29
| 2018-07-05T14:23:22
|
Java
|
UTF-8
|
Java
| false
| false
| 268
|
java
|
/* SPDX-License-Identifier: Apache-2.0 */
package org.odpi.openmetadata.accessservices.assetowner;
/**
* AssetOwnerInterface provides the client-side interface for an asset owner to manage the metadata about their
* asset.
*/
public class AssetOwnerInterface
{
}
|
[
"mandy_chessell@uk.ibm.com"
] |
mandy_chessell@uk.ibm.com
|
db2a267a885efdedeed4a53481a564d19dc30beb
|
6635387159b685ab34f9c927b878734bd6040e7e
|
/src/com/snapchat/android/fragments/settings/twofa/RecoveryCodeFragment$2.java
|
e37db3529360d7d796899bd20dcf6604fca72d41
|
[] |
no_license
|
RepoForks/com.snapchat.android
|
987dd3d4a72c2f43bc52f5dea9d55bfb190966e2
|
6e28a32ad495cf14f87e512dd0be700f5186b4c6
|
refs/heads/master
| 2021-05-05T10:36:16.396377
| 2015-07-16T16:46:26
| 2015-07-16T16:46:26
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 584
|
java
|
package com.snapchat.android.fragments.settings.twofa;
import android.support.v4.app.FragmentActivity;
import android.view.View;
import android.view.View.OnClickListener;
final class RecoveryCodeFragment$2
implements View.OnClickListener
{
RecoveryCodeFragment$2(RecoveryCodeFragment paramRecoveryCodeFragment) {}
public final void onClick(View paramView)
{
a.getActivity().onBackPressed();
}
}
/* Location:
* Qualified Name: com.snapchat.android.fragments.settings.twofa.RecoveryCodeFragment.2
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
6792a240096ed0043d16b1908962429254815f20
|
5b9a04d3c911c16aba63258d48606d6ea364a6da
|
/distribution_purchase/modules/purchase/app/utils/purchase/RegExpValidatorUtils.java
|
898b9927d65c021300cec3da0edeb03675992d23
|
[
"Apache-2.0"
] |
permissive
|
yourant/repository1
|
40fa5ce602bbcad4e6f61ad6eb1330cfe966f780
|
9ab74a2dfecc3ce60a55225e39597e533975a465
|
refs/heads/master
| 2021-12-15T04:22:23.009473
| 2017-07-28T06:06:35
| 2017-07-28T06:06:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 940
|
java
|
package utils.purchase;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public final class RegExpValidatorUtils {
/**
* 验证输入两位小数
* @param 待验证的字符串
* @return 如果是符合格式的字符串,返回 <b>true </b>,否则为 <b>false </b>
*/
public static boolean isDecimal(String str) {
String regex = "^[0-9]+(.[0-9]{2})?$";
return match(regex, str);
}
public static boolean isMoney(String str){
String regex = "^(([1-9]{1}\\d*)|([0]{1}))(\\.(\\d){0,2})?$";
return match(regex, str);
}
/**
* @param regex
* 正则表达式字符串
* @param str
* 要匹配的字符串
* @return 如果str 符合 regex的正则表达式格式,返回true, 否则返回 false;
*/
private static boolean match(String regex, String str) {
Pattern pattern = Pattern.compile(regex);
Matcher matcher = pattern.matcher(str);
return matcher.matches();
}
}
|
[
"3002781863@qq.com"
] |
3002781863@qq.com
|
49cb1000d42a428aa87245bb4bce949149965f7a
|
1b0a2ae96386370cf435d6a4765274ce05483dc4
|
/src/main/java/com/accelad/math/doubledouble/CacheMap.java
|
94033dc9fe97f6d23390ed2a3895d031183f7c55
|
[
"BSD-2-Clause"
] |
permissive
|
accelad-com/nilgiri-math
|
f0d40d10a8c65167e9edbac6f7e44c9088fa33b9
|
271726f6e29553e02396a3911947fffd8501ebb6
|
refs/heads/master
| 2021-01-20T17:09:40.682158
| 2017-12-12T18:57:48
| 2017-12-12T18:57:48
| 62,397,171
| 0
| 0
| null | 2017-12-12T17:21:44
| 2016-07-01T14:05:27
|
Java
|
UTF-8
|
Java
| false
| false
| 523
|
java
|
package com.accelad.math.doubledouble;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
import java.util.function.Supplier;
class CacheMap<K, V> {
private final Map<K, V> map = new ConcurrentHashMap<>();
private final int sizeLimit;
CacheMap(int sizeLimit) {
this.sizeLimit = sizeLimit;
}
V get(K key, Supplier<V> supplier) {
if (map.size() > sizeLimit) {
map.clear();
}
return map.computeIfAbsent(key, k -> supplier.get());
}
}
|
[
"frederic.boisguerin@gmail.com"
] |
frederic.boisguerin@gmail.com
|
60dcd74872cfc7eb7c74d5dcc25782b466f354e5
|
2b8c47031dddd10fede8bcf16f8db2b52521cb4f
|
/subject SPLs and test cases/BerkeleyDB(5)/BerkeleyDB_P4/evosuite-tests2/com/sleepycat/je/tree/WithRootLatched_ESTest_scaffolding2.java
|
38ca744fef6a03a3965b0dbe777376bacb67ddb0
|
[] |
no_license
|
psjung/SRTST_experiments
|
6f1ff67121ef43c00c01c9f48ce34f31724676b6
|
40961cb4b4a1e968d1e0857262df36832efb4910
|
refs/heads/master
| 2021-06-20T04:45:54.440905
| 2019-09-06T04:05:38
| 2019-09-06T04:05:38
| 206,693,757
| 1
| 0
| null | 2020-10-13T15:50:41
| 2019-09-06T02:10:06
|
Java
|
UTF-8
|
Java
| false
| false
| 1,452
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 22 02:06:59 KST 2017
*/
package com.sleepycat.je.tree;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class WithRootLatched_ESTest_scaffolding2 {
@org.junit.Rule
public org.junit.rules.Timeout globalTimeout = new org.junit.rules.Timeout(4000);
private org.evosuite.runtime.thread.ThreadStopper threadStopper = new org.evosuite.runtime.thread.ThreadStopper (org.evosuite.runtime.thread.KillSwitchHandler.getInstance(), 3000);
@BeforeClass
public static void initEvoSuiteFramework() {
org.evosuite.runtime.RuntimeSettings.className = "com.sleepycat.je.tree.WithRootLatched";
org.evosuite.runtime.GuiSupport.initialize();
org.evosuite.runtime.RuntimeSettings.maxNumberOfIterationsPerLoop = 10000;
}
@Before
public void initTestCase(){
threadStopper.storeCurrentThreads();
threadStopper.startRecordingTime();
org.evosuite.runtime.GuiSupport.setHeadless();
org.evosuite.runtime.agent.InstrumentingAgent.activate();
}
@After
public void doneWithTestCase(){
threadStopper.killAndJoinClientThreads();
org.evosuite.runtime.agent.InstrumentingAgent.deactivate();
org.evosuite.runtime.GuiSupport.restoreHeadlessMode();
}
}
|
[
"psjung@kaist.ac.kr"
] |
psjung@kaist.ac.kr
|
d5fc6983b49bba54f45872e43ea21c6b5946e52d
|
3bc62f2a6d32df436e99507fa315938bc16652b1
|
/struts2/src/test/java/com/intellij/lang/ognl/psi/VariableAssignmentExpressionPsiTest.java
|
2f9c1101047ef6acf9b476ea9cca6f7098fffa80
|
[
"Apache-2.0"
] |
permissive
|
JetBrains/intellij-obsolete-plugins
|
7abf3f10603e7fe42b9982b49171de839870e535
|
3e388a1f9ae5195dc538df0d3008841c61f11aef
|
refs/heads/master
| 2023-09-04T05:22:46.470136
| 2023-06-11T16:42:37
| 2023-06-11T16:42:37
| 184,035,533
| 19
| 29
|
Apache-2.0
| 2023-07-30T14:23:05
| 2019-04-29T08:54:54
|
Java
|
UTF-8
|
Java
| false
| false
| 1,726
|
java
|
/*
* Copyright 2014 The 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 com.intellij.lang.ognl.psi;
import com.intellij.lang.ognl.OgnlLanguage;
import com.intellij.lang.ognl.OgnlTypes;
import com.intellij.psi.PsiTypes;
import org.intellij.lang.annotations.Language;
/**
* {@link OgnlVariableAssignmentExpression}.
*
* @author Yann Cébron
*/
public class VariableAssignmentExpressionPsiTest extends PsiTestCase {
public void testVariableAssignment() {
final OgnlVariableAssignmentExpression expression = parse("#varName = 1 + 2");
assertEquals("varName", expression.getVariableName());
assertEquals(PsiTypes.intType(), expression.getType());
final OgnlExpression assignment = expression.getAssignment();
assertElementType(OgnlTypes.BINARY_EXPRESSION, assignment);
}
private OgnlVariableAssignmentExpression parse(@Language(value = OgnlLanguage.ID,
prefix = OgnlLanguage.EXPRESSION_PREFIX,
suffix = OgnlLanguage.EXPRESSION_SUFFIX) final String expression) {
return (OgnlVariableAssignmentExpression)parseSingleExpression(expression);
}
}
|
[
"yuriy.artamonov@jetbrains.com"
] |
yuriy.artamonov@jetbrains.com
|
3e34e5eff315a97b579b8cbbb74e4a2c2cdcf32d
|
ca9371238f2f8fbec5f277b86c28472f0238b2fe
|
/src/mx/com/kubo/model/catalogos/DependantsNumberPK.java
|
7fc7bba20eee6a32bdd385a084813310bc4a6661
|
[] |
no_license
|
ocg1/kubo.portal
|
64cb245c8736a1f8ec4010613e14a458a0d94881
|
ab022457d55a72df73455124d65b625b002c8ac2
|
refs/heads/master
| 2021-05-15T17:23:48.952576
| 2017-05-08T17:18:09
| 2017-05-08T17:18:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 684
|
java
|
package mx.com.kubo.model.catalogos;
import java.io.Serializable;
import javax.persistence.Column;
import javax.persistence.Embeddable;
@Embeddable
public class DependantsNumberPK
implements Serializable
{
private static final long serialVersionUID = 1L;
@Column private int dependants_number_id;
@Column private int company_id;
public int getDependants_number_id()
{
return dependants_number_id;
}
public void setDependants_number_id(int dependants_number_id)
{
this.dependants_number_id = dependants_number_id;
}
public int getCompany_id()
{
return company_id;
}
public void setCompany_id(int company_id)
{
this.company_id = company_id;
}
}
|
[
"damian.tapia.nava@gmail.com"
] |
damian.tapia.nava@gmail.com
|
a3a30ecf98881a501e8b4a4a335918e0be810f6b
|
e0ba7ddeb226fe452e5114ce2b8b94ddb4b97b3e
|
/app/src/main/java/com/zhuye/ershoufang/bean/MybidderBean.java
|
a863f21a7a2e0d0ff0a2c41dc7e317b2b1df3e17
|
[] |
no_license
|
jingzhixb/trunk
|
5337a676f9eb91888171bd06f7a657e72cb05636
|
e9201b355323c86db5b3a22a8e869b1243b00763
|
refs/heads/master
| 2020-03-28T01:34:08.005377
| 2018-09-05T12:34:05
| 2018-09-05T12:34:05
| 147,514,146
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,429
|
java
|
package com.zhuye.ershoufang.bean;
/**
* Created by Administrator on 2018/5/2 0002.
*/
public class MybidderBean {
/**
* data : [{"id":"id","city_id":"市id","area_id":"区id","xiaoqu":"小区","addr":"详细地址","qp_money":"怕买价格","start_time":"开始时间","jp_time":"拍卖周期","photo":"图片","city":"市名称","area":"区名称","end_time":"结束时间","money":"成交价格"}]
* message :
* code : 200
*/
/**
* id : id
* city_id : 市id
* area_id : 区id
* xiaoqu : 小区
* addr : 详细地址
* qp_money : 怕买价格
* start_time : 开始时间
* jp_time : 拍卖周期
* photo : 图片
* city : 市名称
* area : 区名称
* end_time : 结束时间
* money : 成交价格
*/
private String id;
private String city_id;
private String area_id;
private String xiaoqu;
private String addr;
private String qp_money;
private String start_time;
private String jp_time;
private String photo;
private String city;
private String area;
private String end_time;
private String money;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getCity_id() {
return city_id;
}
public void setCity_id(String city_id) {
this.city_id = city_id;
}
public String getArea_id() {
return area_id;
}
public void setArea_id(String area_id) {
this.area_id = area_id;
}
public String getXiaoqu() {
return xiaoqu;
}
public void setXiaoqu(String xiaoqu) {
this.xiaoqu = xiaoqu;
}
public String getAddr() {
return addr;
}
public void setAddr(String addr) {
this.addr = addr;
}
public String getQp_money() {
return qp_money;
}
public void setQp_money(String qp_money) {
this.qp_money = qp_money;
}
public String getStart_time() {
return start_time;
}
public void setStart_time(String start_time) {
this.start_time = start_time;
}
public String getJp_time() {
return jp_time;
}
public void setJp_time(String jp_time) {
this.jp_time = jp_time;
}
public String getPhoto() {
return photo;
}
public void setPhoto(String photo) {
this.photo = photo;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getArea() {
return area;
}
public void setArea(String area) {
this.area = area;
}
public String getEnd_time() {
return end_time;
}
public void setEnd_time(String end_time) {
this.end_time = end_time;
}
public String getMoney() {
return money;
}
public void setMoney(String money) {
this.money = money;
}
}
|
[
"1390056147qq.com"
] |
1390056147qq.com
|
5ba7215b52ef42e4e821907dde52dd177c4c88cf
|
60fe9caa0b627813d4bdf3f7e627f0402b788077
|
/app/src/main/java/com/chocozhao/chocobilibili/mvp/ui/adapter/ArticleAdapter.java
|
114d49425aab86cfe1fc598b8db08699deeab56f
|
[
"Apache-2.0"
] |
permissive
|
chocozhao/chocobilibili
|
15f160202389844c7519f5d5742c4a85e1b0e1e2
|
768be8116d3ff0b60a03b55507b140af24f04cec
|
refs/heads/master
| 2020-08-16T03:59:45.448817
| 2020-04-13T06:10:09
| 2020-04-13T06:10:09
| 215,451,805
| 3
| 0
|
Apache-2.0
| 2020-02-25T09:59:11
| 2019-10-16T03:48:53
|
Java
|
UTF-8
|
Java
| false
| false
| 1,269
|
java
|
package com.chocozhao.chocobilibili.mvp.ui.adapter;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.chocozhao.chocobilibili.R;
import com.chocozhao.chocobilibili.mvp.model.entity.GetArticleData;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.List;
/**
* ClaseName:ArticleAdapter
* Description:
* Author:chocozhao
* QQ: 1027313530
* Createtime:2019/12/17 15:50
* Modified By:
* Fixtime:2019/12/17 15:50
* FixDescription:
**/
public class ArticleAdapter extends BaseQuickAdapter<GetArticleData.DatasBean, BaseViewHolder> {
/**
* 构造方法,此示例中,在实例化Adapter时就传入了一个List。
* 如果后期设置数据,不需要传入初始List,直接调用 super(layoutResId); 即可
*/
public ArticleAdapter(@Nullable List<GetArticleData.DatasBean> data) {
super(R.layout.article_list, data);
}
/**
* 在此方法中设置item数据
*/
@Override
protected void convert(@NotNull BaseViewHolder baseViewHolder, GetArticleData.@Nullable DatasBean datasBean) {
baseViewHolder.setText(R.id.article_tv, datasBean.getTitle());
}
}
|
[
"you@example.com"
] |
you@example.com
|
7a57bd7eb246fe82bd3e4a3cb76f0b525a7d398b
|
0341d57c29bb4bf64bbb258cce506e6ba5ef2e62
|
/src/main/java/org/kitteh/irc/client/library/feature/twitch/messagetag/MsgParamSubPlanName.java
|
f6f053b239f175af9acef5fe1225319571f33afa
|
[
"MIT",
"Apache-2.0"
] |
permissive
|
boostchicken/KittehIRCClientLib
|
4715620d0149151db8069b5b0ef0c9c9c943bce0
|
f5ad7cad286991798824cbee386d54f53e39d810
|
refs/heads/master
| 2020-06-16T16:48:01.820354
| 2019-07-08T23:45:20
| 2019-07-08T23:45:20
| 195,640,167
| 0
| 0
|
NOASSERTION
| 2019-07-07T10:53:10
| 2019-07-07T10:53:10
| null |
UTF-8
|
Java
| false
| false
| 2,058
|
java
|
/*
* * Copyright (C) 2013-2019 Matt Baxter https://kitteh.org
*
* 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 org.kitteh.irc.client.library.feature.twitch.messagetag;
import org.checkerframework.checker.nullness.qual.NonNull;
import org.kitteh.irc.client.library.Client;
import org.kitteh.irc.client.library.feature.MessageTagManager;
import org.kitteh.irc.client.library.util.TriFunction;
/**
* Message tag for subscription plan name.
*/
public class MsgParamSubPlanName extends MessageTagManager.DefaultMessageTag {
/**
* Name of this message tag.
*/
public static final String NAME = "msg-param-sub-plan-name";
/**
* Function to create this message tag.
*/
@SuppressWarnings("ConstantConditions")
public static final TriFunction<Client, String, String, MsgParamSubPlanName> FUNCTION = (client, name, value) -> new MsgParamSubPlanName(name, value);
private MsgParamSubPlanName(@NonNull String name, @NonNull String value) {
super(name, value);
}
}
|
[
"matt@phozop.net"
] |
matt@phozop.net
|
c128284b0b28c828a77c3898bc0ac7e6ec98d988
|
b11248eb8d38355e10861c6c19750c55b4530e38
|
/src/main/java/hu/akarnokd/rxjava2/functions/PlainFunction4.java
|
beb60d6a96f1f08b67ad651f4c551ba642ed6b95
|
[
"Apache-2.0"
] |
permissive
|
tomdotbradshaw/RxJava2Extensions
|
2d50d14aff39a1ddb4fe6a32352aebecc4e8d68d
|
254fead58021bb8304aa1c343cc776e7b5a3168d
|
refs/heads/master
| 2020-04-06T16:48:30.122024
| 2018-11-15T03:29:15
| 2018-11-15T03:30:42
| 157,635,134
| 0
| 0
|
Apache-2.0
| 2018-11-15T01:36:50
| 2018-11-15T01:36:50
| null |
UTF-8
|
Java
| false
| false
| 1,143
|
java
|
/*
* Copyright 2016-2018 David Karnok
*
* 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 hu.akarnokd.rxjava2.functions;
import io.reactivex.functions.*;
/**
* A {@link Function4} with suppressed exception on its
* {@link #apply(Object, Object, Object, Object)} method.
*
* @param <T1> the first argument type
* @param <T2> the second argument type
* @param <T3> the third argument type
* @param <T4> the fourth argument type
* @param <R> the output value type
*/
public interface PlainFunction4<T1, T2, T3, T4, R>
extends Function4<T1, T2, T3, T4, R> {
@Override
R apply(T1 t1, T2 t2, T3 t3, T4 t4);
}
|
[
"akarnokd@gmail.com"
] |
akarnokd@gmail.com
|
13bdd668ecf68fd39a5b542ae2b9c1b646155f9f
|
bf4122f5ae3a9f9b9c2cc94ef87cdb9dcadc9dc9
|
/Transfer/My Study/forestrymanagementsystemjpahiber/src/main/java/com/tyss/forestrymanagementsystemjpahiber/dao/ContractDaoImpl.java
|
fe3ad177138ce0a75620a4f81fcaef442a78a761
|
[] |
no_license
|
haren7474/TY_ELF_JFS_HarendraKumar
|
7ef8b9a0bb6d6bdddb94b88ab2db4e0aef0fbc1d
|
f99ef30b40d0877167c8159e8b7f322af7cc87b9
|
refs/heads/master
| 2023-01-11T01:01:10.458037
| 2020-01-23T18:20:20
| 2020-01-23T18:20:20
| 225,845,989
| 0
| 0
| null | 2023-01-07T22:01:21
| 2019-12-04T11:00:37
|
HTML
|
UTF-8
|
Java
| false
| false
| 4,192
|
java
|
package com.tyss.forestrymanagementsystemjpahiber.dao;
import java.sql.Connection;
import java.util.List;
import javax.persistence.EntityManager;
import javax.persistence.EntityManagerFactory;
import javax.persistence.EntityTransaction;
import javax.persistence.Persistence;
import javax.persistence.Query;
import com.tyss.forestrymanagementsystemjpahiber.controller.DBConnection;
import com.tyss.forestrymanagementsystemjpahiber.dto.BillingBean;
import com.tyss.forestrymanagementsystemjpahiber.dto.ContractBean;
import com.tyss.forestrymanagementsystemjpahiber.dto.ProductBean;
import com.tyss.forestrymanagementsystemjpahiber.factory.ForestryManagementSystemFactory;
import com.tyss.forestrymanagementsystemjpahiber.services.ProductServices;
public class ContractDaoImpl implements ContractDao {
private List<ContractBean> contractList = null;
static Connection connection = DBConnection.getConnection();
ContractBean contract = null;
EntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory("TestPersistence");
static ProductServices productServices = ForestryManagementSystemFactory.instanceOfProductServies();
@Override
public boolean deleteContract(int contractId) {
EntityManager entityManager = entityManagerFactory.createEntityManager();
EntityTransaction transaction = entityManager.getTransaction();
boolean isDeleted = false;
try {
transaction.begin();
contract = entityManager.find(ContractBean.class, contractId);
if (contract != null) {
entityManager.remove(contract);
transaction.commit();
isDeleted = true;
}
} catch (Exception e) {
e.printStackTrace();
transaction.rollback();
}
entityManager.close();
return isDeleted;
}
@Override
public boolean addContract(ContractBean contract) {
EntityManager entityManager = entityManagerFactory.createEntityManager();
EntityTransaction transaction = entityManager.getTransaction();
// TO update stock quantity i.e. ExistingStockQuantity - contractQuantity
int contractProductQuantity = contract.getQuantity();
int productId = contract.getProductBean().getProductId();
ProductBean product = productServices.searchProduct(productId);
int stockUpdatedQuantity = product.getProductQuantity() - contractProductQuantity;
boolean isAdded = false;
try {
transaction.begin();
entityManager.persist(contract);
productServices.updateQuantity(productId, stockUpdatedQuantity);
transaction.commit();
isAdded = true;
} catch (Exception e) {
e.printStackTrace();
transaction.rollback();
}
entityManager.close();
return isAdded;
}
@Override
public List<ContractBean> getAllContract() {
EntityManager entityManager = entityManagerFactory.createEntityManager();
String jpql = " from ContractBean";
Query query = entityManager.createQuery(jpql);
contractList = query.getResultList();
entityManager.close();
return contractList;
}
@Override
public boolean modifyContract(int contractId, int contractNewQuantity) {
EntityManager entityManager = entityManagerFactory.createEntityManager();
EntityTransaction transaction = entityManager.getTransaction();
boolean isModified = false;
try {
transaction.begin();
contract = entityManager.find(ContractBean.class, contractId);
if (contract != null) {
// TO update stock quantity i.e. ExistingStockQuantity - (contractNewQuantity - contractExistingQuantity)
int productId = contract.getProductBean().getProductId();
ProductBean product = productServices.searchProduct(productId);
int stockUpdatedQuantity = product.getProductQuantity() - (contractNewQuantity - contract.getQuantity());
productServices.updateQuantity(productId, stockUpdatedQuantity);
contract.setQuantity(contractNewQuantity);
transaction.commit();
isModified = true;
}
} catch (Exception e) {
e.printStackTrace();
transaction.rollback();
}
entityManager.close();
return isModified;
}
@Override
public ContractBean getContractById(int contractId) {
EntityManager entityManager = entityManagerFactory.createEntityManager();
contract = entityManager.find(ContractBean.class, contractId);
return contract;
}
}
|
[
"harendra10104698@gmail.com"
] |
harendra10104698@gmail.com
|
ea22bf1cb9b9bd9e0c9a46731902032f15b31342
|
3a59bd4f3c7841a60444bb5af6c859dd2fe7b355
|
/sources/kotlin/Suppress.java
|
a6a028bfdf7a81ea7d8a2677b533062ab350784f
|
[] |
no_license
|
sengeiou/KnowAndGo-android-thunkable
|
65ac6882af9b52aac4f5a4999e095eaae4da3c7f
|
39e809d0bbbe9a743253bed99b8209679ad449c9
|
refs/heads/master
| 2023-01-01T02:20:01.680570
| 2020-10-22T04:35:27
| 2020-10-22T04:35:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,643
|
java
|
package kotlin;
import java.lang.annotation.ElementType;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import kotlin.annotation.AnnotationRetention;
import kotlin.annotation.AnnotationTarget;
import kotlin.annotation.Retention;
@Target({ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER, ElementType.CONSTRUCTOR, ElementType.LOCAL_VARIABLE, ElementType.ANNOTATION_TYPE})
@kotlin.annotation.Target(allowedTargets = {AnnotationTarget.CLASS, AnnotationTarget.ANNOTATION_CLASS, AnnotationTarget.PROPERTY, AnnotationTarget.FIELD, AnnotationTarget.LOCAL_VARIABLE, AnnotationTarget.VALUE_PARAMETER, AnnotationTarget.CONSTRUCTOR, AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY_GETTER, AnnotationTarget.PROPERTY_SETTER, AnnotationTarget.TYPE, AnnotationTarget.EXPRESSION, AnnotationTarget.FILE, AnnotationTarget.TYPEALIAS})
@Metadata(mo39784bv = {1, 0, 3}, mo39785d1 = {"\u0000\u0016\n\u0002\u0018\u0002\n\u0002\u0010\u001b\n\u0000\n\u0002\u0010\u0011\n\u0002\u0010\u000e\n\u0002\b\u0002\b\u0002\u0018\u00002\u00020\u0001B\u0014\u0012\u0012\u0010\u0002\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00040\u0003\"\u00020\u0004R\u0017\u0010\u0002\u001a\n\u0012\u0006\b\u0001\u0012\u00020\u00040\u0003¢\u0006\u0006\u001a\u0004\b\u0002\u0010\u0005¨\u0006\u0006"}, mo39786d2 = {"Lkotlin/Suppress;", "", "names", "", "", "()[Ljava/lang/String;", "kotlin-stdlib"}, mo39787k = 1, mo39788mv = {1, 1, 15})
@Retention(AnnotationRetention.SOURCE)
@java.lang.annotation.Retention(RetentionPolicy.SOURCE)
/* compiled from: Annotations.kt */
public @interface Suppress {
String[] names();
}
|
[
"joshuahj.tsao@gmail.com"
] |
joshuahj.tsao@gmail.com
|
d527b16a84986d9571aefe96d2692160c3569b55
|
c19cb77e3958a194046d6f84ca97547cc3a223c3
|
/core/src/test/jdk1.3/org/bouncycastle/crypto/test/Argon2Test.java
|
5cc744c21a5bc525e8c6c475a8b1c355d279f8e7
|
[
"Apache-2.0",
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
bcgit/bc-java
|
1b6092bc5d2336ec26ebd6da6eeaea6600b4c70a
|
62b03c0f704ebd243fe5f2d701aef4edd77bba6e
|
refs/heads/main
| 2023-09-04T00:48:33.995258
| 2023-08-30T05:33:42
| 2023-08-30T05:33:42
| 10,416,648
| 1,984
| 1,021
|
MIT
| 2023-08-26T05:14:28
| 2013-06-01T02:38:42
|
Java
|
UTF-8
|
Java
| false
| false
| 8,129
|
java
|
package org.bouncycastle.crypto.test;
import org.bouncycastle.crypto.generators.Argon2BytesGenerator;
import org.bouncycastle.crypto.params.Argon2Parameters;
import org.bouncycastle.util.Strings;
import org.bouncycastle.util.encoders.Hex;
import org.bouncycastle.util.test.SimpleTest;
/**
* Tests from https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03
*
*/
public class Argon2Test
extends SimpleTest
{
private static final int DEFAULT_OUTPUTLEN = 32;
public String getName()
{
return "ArgonTest";
}
public void performTest()
throws Exception
{
if (getJvmVersion() < 7)
{
return;
}
testVectorsFromInternetDraft();
int version = Argon2Parameters.ARGON2_VERSION_10;
/* Multiple test cases for various input values */
hashTest(version, 2, 16, 1, "password", "somesalt",
"f6c4db4a54e2a370627aff3db6176b94a2a209a62c8e36152711802f7b30c694", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 20, 1, "password", "somesalt",
"9690ec55d28d3ed32562f2e73ea62b02b018757643a2ae6e79528459de8106e9",
DEFAULT_OUTPUTLEN);
hashTest(version, 2, 18, 1, "password", "somesalt",
"3e689aaa3d28a77cf2bc72a51ac53166761751182f1ee292e3f677a7da4c2467",
DEFAULT_OUTPUTLEN);
hashTest(version, 2, 8, 1, "password", "somesalt",
"fd4dd83d762c49bdeaf57c47bdcd0c2f1babf863fdeb490df63ede9975fccf06",
DEFAULT_OUTPUTLEN);
hashTest(version, 2, 8, 2, "password", "somesalt",
"b6c11560a6a9d61eac706b79a2f97d68b4463aa3ad87e00c07e2b01e90c564fb", DEFAULT_OUTPUTLEN);
hashTest(version, 1, 16, 1, "password", "somesalt",
"81630552b8f3b1f48cdb1992c4c678643d490b2b5eb4ff6c4b3438b5621724b2", DEFAULT_OUTPUTLEN);
hashTest(version, 4, 16, 1, "password", "somesalt",
"f212f01615e6eb5d74734dc3ef40ade2d51d052468d8c69440a3a1f2c1c2847b", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 16, 1, "differentpassword", "somesalt",
"e9c902074b6754531a3a0be519e5baf404b30ce69b3f01ac3bf21229960109a3", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 16, 1, "password", "diffsalt",
"79a103b90fe8aef8570cb31fc8b22259778916f8336b7bdac3892569d4f1c497", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 16, 1, "password", "diffsalt",
"1a097a5d1c80e579583f6e19c7e4763ccb7c522ca85b7d58143738e12ca39f8e6e42734c950ff2463675b97c37ba" +
"39feba4a9cd9cc5b4c798f2aaf70eb4bd044c8d148decb569870dbd923430b82a083f284beae777812cce18cdac68ee8ccef" +
"c6ec9789f30a6b5a034591f51af830f4",
112);
version = Argon2Parameters.ARGON2_VERSION_13;
/* Multiple test cases for various input values */
hashTest(version, 2, 16, 1, "password", "somesalt",
"c1628832147d9720c5bd1cfd61367078729f6dfb6f8fea9ff98158e0d7816ed0",
DEFAULT_OUTPUTLEN);
hashTest(version, 2, 20, 1, "password", "somesalt",
"d1587aca0922c3b5d6a83edab31bee3c4ebaef342ed6127a55d19b2351ad1f41", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 18, 1, "password", "somesalt",
"296dbae80b807cdceaad44ae741b506f14db0959267b183b118f9b24229bc7cb", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 8, 1, "password", "somesalt",
"89e9029f4637b295beb027056a7336c414fadd43f6b208645281cb214a56452f", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 8, 2, "password", "somesalt",
"4ff5ce2769a1d7f4c8a491df09d41a9fbe90e5eb02155a13e4c01e20cd4eab61", DEFAULT_OUTPUTLEN);
hashTest(version, 1, 16, 1, "password", "somesalt",
"d168075c4d985e13ebeae560cf8b94c3b5d8a16c51916b6f4ac2da3ac11bbecf", DEFAULT_OUTPUTLEN);
hashTest(version, 4, 16, 1, "password", "somesalt",
"aaa953d58af3706ce3df1aefd4a64a84e31d7f54175231f1285259f88174ce5b", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 16, 1, "differentpassword", "somesalt",
"14ae8da01afea8700c2358dcef7c5358d9021282bd88663a4562f59fb74d22ee", DEFAULT_OUTPUTLEN);
hashTest(version, 2, 16, 1, "password", "diffsalt",
"b0357cccfbef91f3860b0dba447b2348cbefecadaf990abfe9cc40726c521271", DEFAULT_OUTPUTLEN);
}
private void hashTest(int version, int iterations, int memory, int parallelism,
String password, String salt, String passwordRef, int outputLength)
{
Argon2Parameters.Builder builder = new Argon2Parameters.Builder(Argon2Parameters.ARGON2_i)
.withVersion(version)
.withIterations(iterations)
.withMemoryPowOfTwo(memory)
.withParallelism(parallelism)
.withSalt(Strings.toByteArray(salt));
//
// Set the password.
//
Argon2BytesGenerator gen = new Argon2BytesGenerator();
gen.init(builder.build());
byte[] result = new byte[outputLength];
gen.generateBytes(password.toCharArray(), result, 0, result.length);
isTrue(passwordRef + " Failed", areEqual(result, Hex.decode(passwordRef)));
}
/**
* Tests from https://tools.ietf.org/html/draft-irtf-cfrg-argon2-03
*
* @throws Exception
*/
private void testVectorsFromInternetDraft()
{
byte[] ad = Hex.decode("040404040404040404040404");
byte[] secret = Hex.decode("0303030303030303");
byte[] salt = Hex.decode("02020202020202020202020202020202");
byte[] password = Hex.decode("0101010101010101010101010101010101010101010101010101010101010101");
Argon2Parameters.Builder builder = new Argon2Parameters.Builder(Argon2Parameters.ARGON2_d)
.withVersion(Argon2Parameters.ARGON2_VERSION_13) // 19
.withIterations(3)
.withMemoryAsKB(32)
.withParallelism(4)
.withAdditional(ad)
.withSecret(secret)
.withSalt(salt);
Argon2BytesGenerator dig = new Argon2BytesGenerator();
dig.init(builder.build());
byte[] result = new byte[32];
dig.generateBytes(password, result);
isTrue("Argon 2d Failed", areEqual(result, Hex.decode("512b391b6f1162975371d30919734294f" +
"868e3be3984f3c1a13a4db9fabe4acb")));
builder = new Argon2Parameters.Builder(Argon2Parameters.ARGON2_i)
.withVersion(Argon2Parameters.ARGON2_VERSION_13) // 19
.withIterations(3)
.withMemoryAsKB(32)
.withParallelism(4)
.withAdditional(ad)
.withSecret(secret)
.withSalt(salt);
dig = new Argon2BytesGenerator();
dig.init(builder.build());
result = new byte[32];
dig.generateBytes(password, result);
isTrue("Argon 2i Failed", areEqual(result, Hex.decode("c814d9d1dc7f37aa13f0d77f2494bda1c8de6b016" +
"dd388d29952a4c4672b6ce8")));
builder = new Argon2Parameters.Builder(Argon2Parameters.ARGON2_id)
.withVersion(Argon2Parameters.ARGON2_VERSION_13) // 19
.withIterations(3)
.withMemoryAsKB(32)
.withParallelism(4)
.withAdditional(ad)
.withSecret(secret)
.withSalt(salt);
dig = new Argon2BytesGenerator();
dig.init(builder.build());
result = new byte[32];
dig.generateBytes(password, result);
isTrue("Argon 2id Failed", areEqual(result, Hex.decode("0d640df58d78766c08c037a34a8b53c9d01ef0452" +
"d75b65eb52520e96b01e659")));
}
private static int getJvmVersion()
{
String version = System.getProperty("java.version");
if (version.startsWith("1.7"))
{
return 7;
}
if (version.startsWith("1.8"))
{
return 8;
}
if (version.startsWith("1.9"))
{
return 9;
}
if (version.startsWith("1.1"))
{
return 10;
}
return -1;
}
public static void main(String[] args)
{
runTest(new Argon2Test());
}
}
|
[
"dgh@cryptoworkshop.com"
] |
dgh@cryptoworkshop.com
|
4658c324254d649414208a9a4eb41e2602f6e7e4
|
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
|
/Corpus/eclipse.pde.ui/4364.java
|
3face10742dc38a4e4f3f1400b617b9dab93d6e3
|
[
"MIT"
] |
permissive
|
SurfGitHub/BLIZZARD-Replication-Package-ESEC-FSE2018
|
d3fd21745dfddb2979e8ac262588cfdfe471899f
|
0f8f4affd0ce1ecaa8ff8f487426f8edd6ad02c0
|
refs/heads/master
| 2020-03-31T15:52:01.005505
| 2018-10-01T23:38:50
| 2018-10-01T23:38:50
| 152,354,327
| 1
| 0
|
MIT
| 2018-10-10T02:57:02
| 2018-10-10T02:57:02
| null |
UTF-8
|
Java
| false
| false
| 5,756
|
java
|
/*******************************************************************************
* Copyright (c) 2008, 2015 Code 9 Corporation and others.
* 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:
* Code 9 Corporation - initial API and implementation
* EclipseSource Corporation - ongoing enhancements
* Rafael Oliveira Nobrega <rafael.oliveira@gmail.com> - bug 242028
*******************************************************************************/
package org.eclipse.pde.internal.ds.ui.editor;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileStore;
import org.eclipse.core.resources.ICommand;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.pde.internal.ds.ui.Activator;
import org.eclipse.pde.internal.ds.ui.IConstants;
import org.eclipse.pde.internal.ui.editor.ISortableContentOutlinePage;
import org.eclipse.pde.internal.ui.editor.MultiSourceEditor;
import org.eclipse.pde.internal.ui.editor.PDEFormEditor;
import org.eclipse.pde.internal.ui.editor.PDESourcePage;
import org.eclipse.pde.internal.ui.editor.context.InputContext;
import org.eclipse.pde.internal.ui.editor.context.InputContextManager;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.IStorageEditorInput;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.ide.FileStoreEditorInput;
public class DSEditor extends MultiSourceEditor {
public DSEditor() {
super();
}
@Override
protected void addEditorPages() {
try {
addPage(new DSOverviewPage(this));
addPage(new DSServicesPage(this));
} catch (PartInitException e) {
Activator.logException(e);
}
// Add source page
addSourcePage(DSInputContext.CONTEXT_ID);
}
@Override
public void contributeToToolbar(IToolBarManager manager) {
// TODO add help icon here maybe?
}
@Override
protected ISortableContentOutlinePage createContentOutline() {
return new DSFormOutlinePage(this);
}
@Override
protected InputContextManager createInputContextManager() {
return new DSInputContextManager(this);
}
@Override
protected void createResourceContexts(InputContextManager contexts, IFileEditorInput input) {
contexts.putContext(input, new DSInputContext(this, input, true));
contexts.monitorFile(input.getFile());
}
@Override
protected void createStorageContexts(InputContextManager contexts, IStorageEditorInput input) {
contexts.putContext(input, new DSInputContext(this, input, true));
}
@Override
protected void createSystemFileContexts(InputContextManager contexts, FileStoreEditorInput input) {
try {
IFileStore store = EFS.getStore(input.getURI());
IEditorInput in = new FileStoreEditorInput(store);
contexts.putContext(in, new DSInputContext(this, in, true));
} catch (CoreException e) {
Activator.logException(e);
}
}
private void addDSBuilder(IFile file) {
try {
// Add builder
IProject project = file.getProject();
IProjectDescription description = project.getDescription();
ICommand[] commands = description.getBuildSpec();
for (ICommand command : commands) {
if (command.getBuilderName().equals(IConstants.ID_BUILDER)) {
return;
}
}
ICommand[] newCommands = new ICommand[commands.length + 1];
System.arraycopy(commands, 0, newCommands, 0, commands.length);
ICommand command = description.newCommand();
command.setBuilderName(IConstants.ID_BUILDER);
newCommands[newCommands.length - 1] = command;
description.setBuildSpec(newCommands);
project.setDescription(description, null);
} catch (CoreException e) {
Activator.logException(e, null, null);
}
}
@Override
public void editorContextAdded(InputContext context) {
addSourcePage(context.getId());
}
@Override
protected String getEditorID() {
return IConstants.ID_EDITOR;
}
@Override
protected InputContext getInputContext(Object object) {
return fInputContextManager.findContext(DSInputContext.CONTEXT_ID);
}
@Override
public void contextRemoved(InputContext context) {
close(false);
}
@Override
public void monitoredFileAdded(IFile monitoredFile) {
// no op
}
@Override
public boolean monitoredFileRemoved(IFile monitoredFile) {
return true;
}
@Override
public boolean isSaveAsAllowed() {
return true;
}
@Override
public void doSave(IProgressMonitor monitor) {
IEditorInput input = getEditorInput();
if (input instanceof IFileEditorInput) {
IFileEditorInput fileInput = (IFileEditorInput) input;
addDSBuilder(fileInput.getFile());
}
super.doSave(monitor);
}
@Override
protected PDESourcePage createSourcePage(PDEFormEditor editor, String title, String name, String contextId) {
return new DSSourcePage(editor, title, name);
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
e510f30daf1f83e7402841809c28e3cb868359ca
|
003596ddc5641a3a93675e9597a57c118c0bb690
|
/src/main/java/com/archos/mediacenter/video/browser/adapters/PresenterAdapterInterface.java
|
dfdda269f5950f91e1f0c80173c255b9f3d95acf
|
[
"Apache-2.0"
] |
permissive
|
nova-video-player/aos-Video
|
b23607dd71932182b48823b2a1272304f939ebf7
|
3a5693454fda2cf7c2d226aea604282f5c4e0977
|
refs/heads/v6.1
| 2023-09-01T08:13:46.295840
| 2023-08-31T19:16:28
| 2023-08-31T19:16:28
| 133,509,664
| 59
| 46
|
Apache-2.0
| 2023-09-12T16:53:30
| 2018-05-15T11:58:31
|
Java
|
UTF-8
|
Java
| false
| false
| 868
|
java
|
// Copyright 2017 Archos SA
//
// 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.archos.mediacenter.video.browser.adapters;
import com.archos.mediacenter.video.browser.presenter.Presenter;
/**
* Created by alexandre on 06/11/15.
*/
public interface PresenterAdapterInterface {
void setPresenter(Class<?> objectClass, Presenter presenter);
}
|
[
"noury@archos.com"
] |
noury@archos.com
|
426982e0cf530b5f1215e54202a0fb74604214c4
|
9d32980f5989cd4c55cea498af5d6a413e08b7a2
|
/A72n_10_0_0/src/main/java/com/android/internal/telephony/cat/SetEventListParams.java
|
6416ca997327896ea80c670b4e5e57faeaacd257
|
[] |
no_license
|
liuhaosource/OppoFramework
|
e7cc3bcd16958f809eec624b9921043cde30c831
|
ebe39acabf5eae49f5f991c5ce677d62b683f1b6
|
refs/heads/master
| 2023-06-03T23:06:17.572407
| 2020-11-30T08:40:07
| 2020-11-30T08:40:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 271
|
java
|
package com.android.internal.telephony.cat;
public class SetEventListParams extends CommandParams {
public int[] mEventInfo;
public SetEventListParams(CommandDetails cmdDet, int[] eventInfo) {
super(cmdDet);
this.mEventInfo = eventInfo;
}
}
|
[
"dstmath@163.com"
] |
dstmath@163.com
|
1f99a95eb4b89ded1c66c301ab2508bba14aa39d
|
46ef04782c58b3ed1d5565f8ac0007732cddacde
|
/platform.core/core.session/src/org/modelio/vcore/model/spi/mm/AbstractMofRepositoryMigrator.java
|
58bee8ea904e2944f4d13740c615698df1cba37c
|
[] |
no_license
|
daravi/modelio
|
844917412abc21e567ff1e9dd8b50250515d6f4b
|
1787c8a836f7e708a5734d8bb5b8a4f1a6008691
|
refs/heads/master
| 2020-05-26T17:14:03.996764
| 2019-05-23T21:30:10
| 2019-05-23T21:30:45
| 188,309,762
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,265
|
java
|
/*
* Copyright 2013-2018 Modeliosoft
*
* This file is part of Modelio.
*
* Modelio 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.
*
* Modelio 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 Modelio. If not, see <http://www.gnu.org/licenses/>.
*
*/
package org.modelio.vcore.model.spi.mm;
import com.modeliosoft.modelio.javadesigner.annotations.objid;
import org.modelio.vbasic.progress.IModelioProgress;
import org.modelio.vcore.smkernel.mapi.MetamodelVersionDescriptor;
import org.modelio.vcore.smkernel.meta.mof.MofMetamodel;
/**
* Default implementation of {@link IMofRepositoryMigrator} that does nothing.
* @author cma
*/
@objid ("34bad46f-90f1-460f-bbb6-1c71e877b2ff")
public abstract class AbstractMofRepositoryMigrator implements IMofRepositoryMigrator {
@objid ("93ecc77e-9b66-417d-9dd6-03b3dffae92f")
private MetamodelVersionDescriptor fromMetamodel;
@objid ("6f46d606-7f75-487f-9319-1149374e1e70")
private MetamodelVersionDescriptor targetMetamodel;
@objid ("39616f93-325a-4f3f-a61e-cf8b23e271e8")
private MetamodelChangeDescriptor metamodelChangeDescriptor;
/**
* @param fromMetamodel the source metamodel
* @param targetMetamodel the target metamodel
*/
@objid ("dab9b2d8-6853-4bbb-8621-61e32d111ac2")
public AbstractMofRepositoryMigrator(MetamodelVersionDescriptor fromMetamodel, MetamodelVersionDescriptor targetMetamodel) {
this.fromMetamodel = fromMetamodel;
this.targetMetamodel = targetMetamodel;
this.metamodelChangeDescriptor = new MetamodelChangeDescriptor();
}
/**
* @return a resume of metamodel changes between {@link #getSourceMetamodel()} and {@link #getTargetMetamodel()}.
*/
@objid ("99bb457b-cbea-4bbe-b2e9-e24a96246e20")
@Override
public MetamodelChangeDescriptor getMetamodelChanges() {
return this.metamodelChangeDescriptor;
}
/**
* @return the metamodel from which this migration can run.
*/
@objid ("b5cf5ec8-98c5-4e4d-b73f-399139ff777b")
@Override
public MetamodelVersionDescriptor getSourceMetamodel() {
return this.fromMetamodel;
}
/**
* @return the metamodel to which the implementation will migrate the model.
*/
@objid ("8be7763c-21ea-4fe6-8da0-f8d6e181336d")
@Override
public MetamodelVersionDescriptor getTargetMetamodel() {
return this.targetMetamodel;
}
/**
* Modify the metamodel so that it can read the {@link #getSourceMetamodel()} repository.
* @param metamodel the metamodel at the {@link #getTargetMetamodel() target} state.
* @throws org.modelio.vcore.model.spi.mm.MofMigrationException on fatal failure preventing migration
*/
@objid ("1ace3f1f-715c-4ba6-8d40-b818959c8e21")
@Override
public void prepareMetamodel(MofMetamodel metamodel) throws MofMigrationException {
// nothing
}
/**
* Migrates the given repository using the given session.
* @param monitor a progress monitor
* @param session the migration session
*/
@objid ("544f2651-6490-43c5-973a-e77c2daf7cb4")
@Override
public void run(IModelioProgress monitor, IMofSession session) {
// nothing
}
/**
* Set the metamodel changes descriptor.
* @param changes the metamodel changes descriptor.
* @return this instance
*/
@objid ("51fb6e5e-e0dc-4081-832c-bb26c442b750")
public IMofRepositoryMigrator setMetamodelChanges(MetamodelChangeDescriptor changes) {
this.metamodelChangeDescriptor = changes;
return this;
}
@objid ("a0f58c5b-e84e-46a0-a291-8b5972bf4438")
@Override
public String toString() {
return getClass().getSimpleName()+"[from "+getSourceMetamodel()+" to "+getTargetMetamodel()+"]";
}
}
|
[
"puya@motionmetrics.com"
] |
puya@motionmetrics.com
|
e42448229ea0f2aa19eb9c81231ac223d32bc082
|
e27942cce249f7d62b7dc8c9b86cd40391c1ddd4
|
/modules/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201708/cm/SharedSetPage.java
|
806caffa66984d28be9e83f0b72524c4ecc7453f
|
[
"Apache-2.0"
] |
permissive
|
mo4ss/googleads-java-lib
|
b4b6178747d25d16ae6aa0c80d80ee18a2dfe01a
|
efaa9c3bd8a46a3ed4b00963dc9760c6dd8bd641
|
refs/heads/master
| 2022-12-05T00:30:56.740813
| 2022-11-16T10:47:15
| 2022-11-16T10:47:15
| 108,132,394
| 0
| 0
|
Apache-2.0
| 2022-11-16T10:47:16
| 2017-10-24T13:41:43
|
Java
|
UTF-8
|
Java
| false
| false
| 2,626
|
java
|
// Copyright 2017 Google Inc. All Rights Reserved.
//
// 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.api.ads.adwords.jaxws.v201708.cm;
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.XmlType;
/**
*
* Contains a list of criterion lists resulting from the filtering and paging of
* {@link SharedSetService#get} call.
*
*
* <p>Java class for SharedSetPage complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="SharedSetPage">
* <complexContent>
* <extension base="{https://adwords.google.com/api/adwords/cm/v201708}NullStatsPage">
* <sequence>
* <element name="entries" type="{https://adwords.google.com/api/adwords/cm/v201708}SharedSet" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "SharedSetPage", propOrder = {
"entries"
})
public class SharedSetPage
extends NullStatsPage
{
protected List<SharedSet> entries;
/**
* Gets the value of the entries 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 entries property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getEntries().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link SharedSet }
*
*
*/
public List<SharedSet> getEntries() {
if (entries == null) {
entries = new ArrayList<SharedSet>();
}
return this.entries;
}
}
|
[
"jradcliff@users.noreply.github.com"
] |
jradcliff@users.noreply.github.com
|
701cd138f1c337067c16b578d6fd5641d4e6bc07
|
a2cf6093632c085a3f7b1fb7352479fd7ba99eef
|
/jgnash-fx/src/main/java/jgnash/uifx/control/SecurityComboBox.java
|
be60e512fb05d459bdf490abde5b453e20490371
|
[] |
no_license
|
3men2kbson/jgnash
|
041914535cbdf2707200fc01df46f75b175b1f1a
|
add7b82746706bf411616b319739d2f49bea81a3
|
refs/heads/master
| 2021-01-17T17:18:46.499650
| 2016-04-14T09:56:41
| 2016-04-14T09:56:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,991
|
java
|
/*
* jGnash, a personal finance application
* Copyright (C) 2001-2016 Craig Cavanaugh
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package jgnash.uifx.control;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.List;
import java.util.Objects;
import javafx.application.Platform;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.collections.ObservableList;
import javafx.collections.transformation.SortedList;
import javafx.fxml.FXMLLoader;
import javafx.scene.control.ComboBox;
import jgnash.engine.Account;
import jgnash.engine.Engine;
import jgnash.engine.EngineFactory;
import jgnash.engine.SecurityNode;
import jgnash.engine.message.Message;
import jgnash.engine.message.MessageBus;
import jgnash.engine.message.MessageChannel;
import jgnash.engine.message.MessageListener;
import jgnash.engine.message.MessageProperty;
/**
* ComboBox that allows selection of a SecurityNode and manages it's own model
* <p>
* The default operation is to load all known {@code SecurityNodes}. If the
* {@code accountProperty} is set, then only the account's {@code SecurityNodes}
* will be available for selection.
*
* @author Craig Cavanaugh
*/
public class SecurityComboBox extends ComboBox<SecurityNode> implements MessageListener {
/**
* Model for the ComboBox
*/
final private ObservableList<SecurityNode> items;
final private ObjectProperty<Account> accountProperty = new SimpleObjectProperty<>();
public SecurityComboBox() {
final FXMLLoader loader = new FXMLLoader(getClass().getResource("SecurityComboBox.fxml"));
loader.setRoot(this);
loader.setController(this);
// extract and reuse the default model
items = getItems();
// warp in a sorted list
setItems(new SortedList<>(items, null));
try {
loader.load();
} catch (final IOException exception) {
throw new RuntimeException(exception);
}
Platform.runLater(this::loadModel); // lazy load to let the ui build happen faster
accountProperty.addListener((observable, oldValue, newValue) -> {
loadModel();
});
MessageBus.getInstance().registerListener(this, MessageChannel.ACCOUNT, MessageChannel.COMMODITY, MessageChannel.SYSTEM);
}
public void setSecurityNode(final SecurityNode securityNode) {
// Selection is not always consistent unless pushed to the EDT
Platform.runLater(() -> setValue(securityNode));
}
private void loadModel() {
final Collection<SecurityNode> securityNodes;
if (accountProperty.get() != null) {
items.clear();
securityNodes = accountProperty.get().getSecurities();
} else {
final Engine engine = EngineFactory.getEngine(EngineFactory.DEFAULT);
Objects.requireNonNull(engine);
securityNodes = engine.getSecurities();
}
if (!securityNodes.isEmpty()) {
final List<SecurityNode> sortedNodeList = new ArrayList<>(securityNodes);
Collections.sort(sortedNodeList);
items.addAll(sortedNodeList);
getSelectionModel().select(0);
}
}
@Override
public void messagePosted(final Message event) {
if (event.getObject(MessageProperty.COMMODITY) instanceof SecurityNode) {
final SecurityNode node = event.getObject(MessageProperty.COMMODITY);
final Account account = event.getObject(MessageProperty.ACCOUNT);
Platform.runLater(() -> {
switch (event.getEvent()) {
case ACCOUNT_SECURITY_ADD:
if (account != null && account.equals(accountProperty.get())) {
final int index = Collections.binarySearch(items, node);
if (index < 0) {
items.add(-index -1, node);
}
}
break;
case ACCOUNT_SECURITY_REMOVE:
if (account != null && account.equals(accountProperty.get())) {
items.removeAll(node);
}
break;
case SECURITY_REMOVE:
items.removeAll(node);
break;
case SECURITY_ADD:
final int index = Collections.binarySearch(items, node);
if (index < 0) {
items.add(-index -1, node);
}
break;
case SECURITY_MODIFY:
items.removeAll(node);
final int i = Collections.binarySearch(items, node);
if (i < 0) {
items.add(-i - 1, node);
}
break;
case FILE_CLOSING:
items.clear();
default:
break;
}
});
}
}
public ObjectProperty<Account> accountProperty() {
return accountProperty;
}
}
|
[
"jgnash.devel@gmail.com"
] |
jgnash.devel@gmail.com
|
013d67246a1a679ebf29e20b473af65ea2c1af65
|
c82deda73cb8af591ae3232915fd3ae831b286ae
|
/hedera-node/src/test/java/com/hedera/services/files/interceptors/ConfigListUtilsTest.java
|
06b43c3cc3495d93cd1101d04da70308fa2aecc2
|
[
"Apache-2.0"
] |
permissive
|
BitBondtmUK/hedera-services
|
1ca57a7c0335f731b1136f03d838469670e1a154
|
a0f349b0b7ed88370ffc471148462ba4d1d9ba0e
|
refs/heads/master
| 2022-12-03T18:12:17.603960
| 2020-08-26T04:37:35
| 2020-08-26T04:37:35
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,291
|
java
|
package com.hedera.services.files.interceptors;
/*-
*
* Hedera Services Node
*
* Copyright (C) 2018 - 2020 Hedera Hashgraph, 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.
*
*/
import com.hedera.services.files.MetadataMapFactory;
import com.hederahashgraph.api.proto.java.ServicesConfigurationList;
import com.hederahashgraph.api.proto.java.Setting;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;
import org.junit.platform.runner.JUnitPlatform;
import org.junit.runner.RunWith;
import static com.hedera.services.files.interceptors.ConfigListUtils.*;
import static org.junit.jupiter.api.Assertions.assertFalse;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;
@RunWith(JUnitPlatform.class)
class ConfigListUtilsTest {
private ServicesConfigurationList example = ServicesConfigurationList.newBuilder()
.addNameValue(Setting.newBuilder()
.setName("key")
.setValue("value"))
.build();
@Test
public void recognizesParseable() {
// given:
var nonsense = "NONSENSE".getBytes();
var truth = example.toByteArray();
// when:
var nonsenseFlag = isConfigList(nonsense);
var truthFlag = isConfigList(truth);
// then:
assertFalse(nonsenseFlag);
assertTrue(truthFlag);
}
@Test
public void parsesToDefaultIfInvalid() {
// expect:
Assertions.assertEquals(
ServicesConfigurationList.getDefaultInstance(),
uncheckedParse("NONSENSE".getBytes()));
}
@Test
public void parses() {
// expect:
Assertions.assertEquals(example, uncheckedParse(example.toByteArray()));
}
@Test
public void cannotBeConstructed() {
// expect:
assertThrows(IllegalStateException.class, ConfigListUtils::new);
}
}
|
[
"michael.tinker@hedera.com"
] |
michael.tinker@hedera.com
|
a619c3028cbed251530b17addd346aea7a32e9c9
|
6be39fc2c882d0b9269f1530e0650fd3717df493
|
/weixin反编译/sources/com/tencent/mm/plugin/appbrand/game/l.java
|
e2963f5db93c9b4333b8a94260fc0d3dfb68740a
|
[] |
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
| 7,390
|
java
|
package com.tencent.mm.plugin.appbrand.game;
import android.content.SharedPreferences;
import android.webkit.JavascriptInterface;
import com.tencent.mm.plugin.appbrand.debugger.q;
import com.tencent.mm.plugin.appbrand.g.b;
import com.tencent.mm.plugin.appbrand.g.f;
import com.tencent.mm.plugin.appbrand.j;
import com.tencent.mm.plugin.appbrand.jsapi.d;
import com.tencent.mm.plugin.appbrand.r.h;
import com.tencent.mm.plugin.report.service.g;
import com.tencent.mm.sdk.platformtools.ad;
import com.tencent.mm.sdk.platformtools.bi;
import com.tencent.mm.sdk.platformtools.x;
import com.tencent.mm.storage.c;
public final class l {
boolean jaQ = false;
j jaR;
f jaS;
com.tencent.mm.plugin.appbrand.g.a jaT;
com.tencent.mm.plugin.appbrand.g.a jaU;
private Boolean jaV = null;
private class a {
private a() {
}
/* synthetic */ a(l lVar, byte b) {
this();
}
@JavascriptInterface
public final int create(String str) {
int i;
synchronized (l.this) {
if (!l.this.jaQ || l.this.jaS == null) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "create subContext failed. mStateReady = [%b] mSubContextAddon = [%s]", Boolean.valueOf(l.this.jaQ), l.this.jaS);
i = -1;
} else {
b aek = l.this.jaS.aek();
l lVar = l.this;
if (aek.adY()) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "bindSubContext subContext = [" + aek + "]");
} else if (lVar.jaU == null) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "initSubJSContext mBridgeHolder == null");
} else {
lVar.jaU.a(aek, "WeixinJSContext");
}
String str2 = "";
if (!lVar.aeq()) {
aek.addJavascriptInterface(new d(lVar.jaR, aek), "WeixinJSCore");
str2 = a.a(lVar.jaR.iuk, "wxa_library/android.js", true);
}
x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject WAGameSubContext to SubContext");
str2 = bi.oM(str2) + a.a(lVar.jaR.iuk, "WAGameSubContext.js", false);
g.pWK.a(778, 17, 1, false);
h.a(aek, str2, new com.tencent.mm.plugin.appbrand.r.h.a() {
public final void pH(String str) {
x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK WAGameSubContext Script suc: %s", str);
g.pWK.a(778, 19, 1, false);
}
public final void fs(String str) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK WAGameSubContext Script Failed: %s", str);
g.pWK.a(778, 18, 1, false);
com.tencent.mm.plugin.appbrand.report.a.C(l.this.jaR.iuk.mAppId, 24, 0);
com.tencent.mm.plugin.appbrand.report.a.a(l.this.jaR.mAppId, l.this.jaR.iuk.isS.iRU.iJb, l.this.jaR.iuk.isS.iRU.iJa, 778, 18);
}
});
l lVar2 = l.this;
if (!bi.oN(str)) {
String a = a.a(lVar2.jaR.iuk, str, false);
if (bi.oN(a)) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "bussiness code is null [%s]", a);
} else {
x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject SubContext subContext.js");
g.pWK.a(778, 21, 1, false);
h.a(aek, str, a, new com.tencent.mm.plugin.appbrand.r.h.a() {
public final void pH(String str) {
x.i("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK subContext Script suc: %s", str);
g.pWK.a(778, 23, 1, false);
}
public final void fs(String str) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "Inject SDK subContext Script Failed: %s", str);
g.pWK.a(778, 22, 1, false);
com.tencent.mm.plugin.appbrand.report.a.C(l.this.jaR.mAppId, 24, 0);
com.tencent.mm.plugin.appbrand.report.a.a(l.this.jaR.mAppId, l.this.jaR.iuk.isS.iRU.iJb, l.this.jaR.iuk.isS.iRU.iJa, 778, 22);
}
});
q.a(lVar2.jaR.iuk, aek, str);
}
}
x.i("MicroMsg.WAGameWeixinJSContextLogic", "create subContext success = [%d]", Integer.valueOf(aek.adZ()));
i = aek.adZ();
}
}
return i;
}
@JavascriptInterface
public final void destroy(int i) {
synchronized (l.this) {
if (!l.this.jaQ || l.this.jaS == null) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "destroy subContext failed. mStateReady = [%b] mSubContextAddon = [%s] contextId = [%d]", Boolean.valueOf(l.this.jaQ), l.this.jaS, Integer.valueOf(i));
return;
}
l.this.jaS.kh(i);
}
}
}
public l(j jVar, b bVar) {
if (jVar == null || bVar == null) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "Input failed. service is [%s] jsRuntime = [%s]", jVar, bVar);
return;
}
f fVar = (f) bVar.v(f.class);
if (fVar == null) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "Input failed. jsRuntime not support subContext");
} else if (fVar.aej() == null) {
x.e("MicroMsg.WAGameWeixinJSContextLogic", "Input failed. subContext has no main jscontext, you should to init it first.");
} else {
synchronized (this) {
this.jaR = jVar;
this.jaS = fVar;
this.jaT = fVar.aej();
this.jaQ = true;
}
}
}
public final boolean aeq() {
if (this.jaV == null) {
boolean z;
long Wz = bi.Wz();
SharedPreferences cgg = ad.cgg();
int i = cgg != null ? cgg.getInt("useisolatectxwxalibrary", 0) : 0;
if (i == 1) {
z = true;
} else {
if (i != -1) {
com.tencent.mm.ipcinvoker.wx_extension.a.a aVar = b.gOV;
c fp = com.tencent.mm.ipcinvoker.wx_extension.a.a.fp("100378");
if (fp == null || !fp.isValid()) {
z = false;
} else if (bi.getInt((String) fp.civ().get("useisolatectxwxalibrary"), 0) == 1) {
z = true;
}
}
z = false;
}
this.jaV = Boolean.valueOf(z);
x.i("MicroMsg.WAGameWeixinJSContextLogic", "read ShouldUseIsolateCtxWxaLibrary cost time = [%d]", Long.valueOf(bi.bB(Wz)));
}
return this.jaV.booleanValue();
}
}
|
[
"denghailong@vargo.com.cn"
] |
denghailong@vargo.com.cn
|
3be3006c4c30358cbd75e4c7a16c207995088a36
|
a4e2fcf2da52f479c2c25164599bbdb2628a1ffa
|
/soft/sextante_lib/sextante/src/es/unex/sextante/outputs/NullOutputChannel.java
|
125ed5256c54601945fade66e42d3650000de4eb
|
[] |
no_license
|
GRSEB9S/sextante
|
126ffc222a2bed9918bae3b59f87f30158b9bbfe
|
8ea12c6c40712df01e2e87b02d722d51adb912ea
|
refs/heads/master
| 2021-05-28T19:24:23.306514
| 2013-03-04T15:21:30
| 2013-03-04T15:21:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 218
|
java
|
package es.unex.sextante.outputs;
public class NullOutputChannel
implements
IOutputChannel {
@Override
public String getAsCommandLineParameter() {
return "!";
}
}
|
[
"volayaf@gmail.com"
] |
volayaf@gmail.com
|
04e713944fbe82a86ef27157300eb1f25a14dd6f
|
a24ccb271d78b56bc4e7ccf2f3c5626730e2a071
|
/music/src/main/java/com/jcs/music/DimentionUtils.java
|
e176a8d6cb1868753b66b48acae6e10c316feb39
|
[] |
no_license
|
Jichensheng/ToolsPractice
|
c74e136183cbb9115bca197dee38a5b2efc447c9
|
c4e5b6788bf30915bd7c88080e0dee1e61265fa4
|
refs/heads/master
| 2021-01-19T19:35:51.359950
| 2017-09-07T11:33:10
| 2017-09-07T11:33:10
| 88,426,455
| 0
| 0
| null | 2017-08-15T02:54:06
| 2017-04-16T16:07:21
|
Java
|
UTF-8
|
Java
| false
| false
| 1,517
|
java
|
package com.jcs.music;
import android.content.Context;
/**
* author:Jics
* 2017/6/26 13:55
*/
public class DimentionUtils {
/**
* 将px值转换为dip或dp值,保证尺寸大小不变
*
* @param pxValue
* (DisplayMetrics类中属性density)
* @return
*/
public static int px2dip(Context context, float pxValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (pxValue / scale + 0.5f);
}
/**
* 将dip或dp值转换为px值,保证尺寸大小不变
*
* @param dipValue
* (DisplayMetrics类中属性density)
* @return
*/
public static int dip2px(Context context, float dipValue) {
final float scale = context.getResources().getDisplayMetrics().density;
return (int) (dipValue * scale + 0.5f);
}
/**
* 将px值转换为sp值,保证文字大小不变
*
* @param pxValue
* (DisplayMetrics类中属性scaledDensity)
* @return
*/
public static int px2sp(Context context, float pxValue) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (pxValue / fontScale + 0.5f);
}
/**
* 将sp值转换为px值,保证文字大小不变
*
* @param spValue
* (DisplayMetrics类中属性scaledDensity)
* @return
*/
public static int sp2px(Context context, float spValue) {
final float fontScale = context.getResources().getDisplayMetrics().scaledDensity;
return (int) (spValue * fontScale + 0.5f);
}
}
|
[
"jichensheng@foxmail.com"
] |
jichensheng@foxmail.com
|
2090454ac5f3597b32743784b1fb98453d0a9ba9
|
a3e9de23131f569c1632c40e215c78e55a78289a
|
/alipay/alipay_sdk/src/main/java/com/alipay/api/domain/KoubeiMarketingDataCustomreportDetailQueryModel.java
|
b36e1d3f8c342963f63e0d72db904cca0197ee25
|
[] |
no_license
|
P79N6A/java_practice
|
80886700ffd7c33c2e9f4b202af7bb29931bf03d
|
4c7abb4cde75262a60e7b6d270206ee42bb57888
|
refs/heads/master
| 2020-04-14T19:55:52.365544
| 2019-01-04T07:39:40
| 2019-01-04T07:39:40
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 651
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 自定义数据报表规则详情查询接口
*
* @author auto create
* @since 1.0, 2018-07-26 14:04:13
*/
public class KoubeiMarketingDataCustomreportDetailQueryModel extends AlipayObject {
private static final long serialVersionUID = 6556497565787439776L;
/**
* 自定义报表的规则KEY
*/
@ApiField("condition_key")
private String conditionKey;
public String getConditionKey() {
return this.conditionKey;
}
public void setConditionKey(String conditionKey) {
this.conditionKey = conditionKey;
}
}
|
[
"jiaojianjun1991@gmail.com"
] |
jiaojianjun1991@gmail.com
|
139e6a3b1ff5f40415a3b1307e6d6905e95da6b9
|
3003f91470ab630def55d25c00f5723bd49a1c13
|
/kaltura-sample-code/src/main/java/us/zoom/cms/exception/BadServiceException.java
|
c02854912f2ab1f8ee49775d788478481c76815c
|
[
"MIT"
] |
permissive
|
WeilerWebServices/Zoom
|
ea79b71cfe69d5d08e917dd6fc022e3d438518c2
|
5d548805ba93ee55e0da79fae67c7ccab6320b9b
|
refs/heads/master
| 2022-11-10T18:03:31.323755
| 2020-07-07T07:28:13
| 2020-07-07T07:28:13
| 273,389,548
| 0
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 955
|
java
|
/* Copyright (c) 2018 Zoom Video Communications, Inc., All Rights Reserved */
package us.zoom.cms.exception;
import org.springframework.http.HttpStatus;
/**
* Created by kavithakannan on 3/9/18.
*/
@SuppressWarnings("ClassWithoutNoArgConstructor")
public class BadServiceException extends RuntimeException {
private HttpStatus httpStatus = HttpStatus.INTERNAL_SERVER_ERROR;
public HttpStatus getHttpStatus() {
return httpStatus;
}
/**
* Constructs a new runtime exception with the specified detail message.
* The cause is not initialized, and may subsequently be initialized by a
* call to {@link #initCause}.
* @param message the detail message. The detail message is saved for later retrieval by the {@link #getMessage()}
* method.
*/
public BadServiceException(HttpStatus httpStatus, String message) {
super(message);
this.httpStatus = httpStatus;
}
}
|
[
"nateweiler84@gmail.com"
] |
nateweiler84@gmail.com
|
41803d39ea2018a390c07fc794fb19b4b13f5e10
|
39727ab097675f93d6ef025dfdc66f5037ad791b
|
/hc-mdm-dao/src/main/java/com/hc/scm/mdm/dao/mapper/BasBillTypeMapper.java
|
d7db6677fb25cebdabd1310f41965cbfae0a3a5c
|
[] |
no_license
|
lijinxi/hc-mdm
|
be58e76b9b7310df0d67ba394fed4f1744c8b2da
|
5679e9257251417a8db268237648e6ea2c618087
|
refs/heads/master
| 2021-01-10T08:43:05.723534
| 2015-12-17T07:34:47
| 2015-12-17T07:34:47
| 47,642,075
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 381
|
java
|
package com.hc.scm.mdm.dao.mapper;
import com.hc.scm.common.base.mapper.BaseCrudMapper;
/**
* Description: 请写出类的用途
* All rights Reserved, Designed Byhc* Copyright: Copyright(C) 2014-2015
* Company: Wonhigh.
* @author: luojw
* @date: 2015-03-26 14:51:54
* @version 1.0.0
*/
public interface BasBillTypeMapper extends BaseCrudMapper {
}
|
[
"1767270730@qq.com"
] |
1767270730@qq.com
|
3429f41d3c9e7d15eb94541eb925fd88ad2dfe08
|
c1b4ec7a48645e2cd82e7b5d794bcf403b7d72dd
|
/mulanbay-pms/src/main/java/cn/mulanbay/pms/web/bean/response/chart/ScatterChartDetailData.java
|
21ddbd89b0405ae53e2e559eb589fe7dbc1af2c6
|
[
"Apache-2.0"
] |
permissive
|
zbeol/mulanbay-server
|
7245766cdcd6564c4d0dc0552fcbc4124b94cdb2
|
ffadd9e5b774875bb798145073482c0cabef0195
|
refs/heads/master
| 2023-03-27T04:11:51.619489
| 2021-03-27T00:42:15
| 2021-03-27T00:42:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,466
|
java
|
package cn.mulanbay.pms.web.bean.response.chart;
import java.util.ArrayList;
import java.util.List;
/**
* 散点图
*
* @author fenghong
* @create 2017-07-10 21:44
*/
public class ScatterChartDetailData {
private String name;
private Object xAxisAverage;
private List<Object[]> data = new ArrayList<>();
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Object getxAxisAverage() {
return xAxisAverage;
}
public void setxAxisAverage(Object xAxisAverage) {
this.xAxisAverage = xAxisAverage;
}
public List<Object[]> getData() {
return data;
}
public void setData(List<Object[]> data) {
this.data = data;
}
public void addData(Object[] os) {
if (os.length < 3) {
data.add(new Object[]{os[0], os[1], 1});
} else {
data.add(os);
}
}
public void appendData(Object x, Object y, double v) {
Object[] oo = this.getData(x, y);
if (oo == null) {
this.addData(new Object[]{x, y, v});
} else {
v += Double.valueOf(oo[2].toString());
oo[2] = v;
}
}
private Object[] getData(Object x, Object y) {
for (Object[] oo : data) {
if (oo[0].equals(x) && oo[1].equals(y)) {
return oo;
}
}
return null;
}
}
|
[
"fenghong007@hotmail.com"
] |
fenghong007@hotmail.com
|
05ad5d6fba7811c087ff89479db3940f8f59ccd4
|
8311139d16e04e0ada7a45b8c530ae2e5f600b1c
|
/jaxws/hugeWsdl.war/WEB-INF/classes/com/redhat/gss/ws9/BigObject8.java
|
0f8cbfa450c31fe31556317d887081c21c6e3431
|
[] |
no_license
|
kylape/support-examples
|
b9a494bf7dbc3671b21def7d89a32e35d4d0d00c
|
ade17506093fa3f50bc8d8a685572cf6329868e7
|
refs/heads/master
| 2020-05-17T10:43:54.707699
| 2014-11-28T16:22:14
| 2014-11-28T16:22:14
| 6,583,210
| 2
| 2
| null | 2014-06-19T22:38:39
| 2012-11-07T17:27:56
|
Java
|
UTF-8
|
Java
| false
| false
| 4,251
|
java
|
package com.redhat.gss.ws9;
public class BigObject8
{
private String arg0 = null;
private String arg1 = null;
private String arg2 = null;
private String arg3 = null;
private String arg4 = null;
private String arg5 = null;
private String arg6 = null;
private String arg7 = null;
private String arg8 = null;
private String arg9 = null;
private String arg10 = null;
private String arg11 = null;
private String arg12 = null;
private String arg13 = null;
private String arg14 = null;
private String arg15 = null;
private String arg16 = null;
private String arg17 = null;
private String arg18 = null;
private String arg19 = null;
private String arg20 = null;
private String arg21 = null;
private String arg22 = null;
private String arg23 = null;
private String arg24 = null;
private String arg25 = null;
public String getArg25()
{
return this.arg25;
}
public void setArg25(String arg25)
{
this.arg25 = arg25;
}
public String getArg24()
{
return this.arg24;
}
public void setArg24(String arg24)
{
this.arg24 = arg24;
}
public String getArg23()
{
return this.arg23;
}
public void setArg23(String arg23)
{
this.arg23 = arg23;
}
public String getArg22()
{
return this.arg22;
}
public void setArg22(String arg22)
{
this.arg22 = arg22;
}
public String getArg21()
{
return this.arg21;
}
public void setArg21(String arg21)
{
this.arg21 = arg21;
}
public String getArg20()
{
return this.arg20;
}
public void setArg20(String arg20)
{
this.arg20 = arg20;
}
public String getArg19()
{
return this.arg19;
}
public void setArg19(String arg19)
{
this.arg19 = arg19;
}
public String getArg18()
{
return this.arg18;
}
public void setArg18(String arg18)
{
this.arg18 = arg18;
}
public String getArg17()
{
return this.arg17;
}
public void setArg17(String arg17)
{
this.arg17 = arg17;
}
public String getArg16()
{
return this.arg16;
}
public void setArg16(String arg16)
{
this.arg16 = arg16;
}
public String getArg15()
{
return this.arg15;
}
public void setArg15(String arg15)
{
this.arg15 = arg15;
}
public String getArg14()
{
return this.arg14;
}
public void setArg14(String arg14)
{
this.arg14 = arg14;
}
public String getArg13()
{
return this.arg13;
}
public void setArg13(String arg13)
{
this.arg13 = arg13;
}
public String getArg12()
{
return this.arg12;
}
public void setArg12(String arg12)
{
this.arg12 = arg12;
}
public String getArg11()
{
return this.arg11;
}
public void setArg11(String arg11)
{
this.arg11 = arg11;
}
public String getArg10()
{
return this.arg10;
}
public void setArg10(String arg10)
{
this.arg10 = arg10;
}
public String getArg9()
{
return this.arg9;
}
public void setArg9(String arg9)
{
this.arg9 = arg9;
}
public String getArg8()
{
return this.arg8;
}
public void setArg8(String arg8)
{
this.arg8 = arg8;
}
public String getArg7()
{
return this.arg7;
}
public void setArg7(String arg7)
{
this.arg7 = arg7;
}
public String getArg6()
{
return this.arg6;
}
public void setArg6(String arg6)
{
this.arg6 = arg6;
}
public String getArg5()
{
return this.arg5;
}
public void setArg5(String arg5)
{
this.arg5 = arg5;
}
public String getArg4()
{
return this.arg4;
}
public void setArg4(String arg4)
{
this.arg4 = arg4;
}
public String getArg3()
{
return this.arg3;
}
public void setArg3(String arg3)
{
this.arg3 = arg3;
}
public String getArg2()
{
return this.arg2;
}
public void setArg2(String arg2)
{
this.arg2 = arg2;
}
public String getArg1()
{
return this.arg1;
}
public void setArg1(String arg1)
{
this.arg1 = arg1;
}
public String getArg0()
{
return this.arg0;
}
public void setArg0(String arg0)
{
this.arg0 = arg0;
}
}
|
[
"kyle.lape@redhat.com"
] |
kyle.lape@redhat.com
|
ceb178ee5f6a79c5025126bfa43e1362768ff501
|
9af8a544ef460830e3279caf7d4e883b6b684f8a
|
/lujpersist/src/main/java/luj/persist/internal/data/field/type/str/StrModificationApplier.java
|
1fc11f1d45d7681008f1a90cb520dd466077b4e5
|
[] |
no_license
|
lowZoom/lujpersist
|
093cf3e1736a249985ce003b352dd4bc42ba8e42
|
b2ee19246a5de52a16147d897999189babfdf0f2
|
refs/heads/master
| 2022-11-28T13:49:00.931923
| 2022-02-16T11:21:46
| 2022-02-16T11:21:46
| 149,903,136
| 0
| 0
| null | 2022-11-16T02:20:39
| 2018-09-22T18:02:31
|
Java
|
UTF-8
|
Java
| false
| false
| 281
|
java
|
package luj.persist.internal.data.field.type.str;
import org.springframework.stereotype.Service;
@Service
public class StrModificationApplier {
public void apply(DbStr state) {
String newValue = state.getMod();
state.setMod(null);
state.setValue(newValue);
}
}
|
[
"david_lu_st@163.com"
] |
david_lu_st@163.com
|
2ac2030ff08102513d032fa26320f7cba798aa54
|
90ece9f4ae98bc9207eb80dce23fefadd7ce116d
|
/trunk/gaoshin-core/src/main/java/com/gaoshin/amazon/jax/ItemSearchResponse.java
|
8da34f6e3ec5970c76f6ed4b8cb4196ac996c728
|
[] |
no_license
|
zhangyongjiang/unfuddle
|
3709018baafefd16003d3666aae6808c106ee038
|
e07a6268f46eee7bc2b4890c44b736462ab89642
|
refs/heads/master
| 2021-01-24T06:12:21.603134
| 2014-07-06T16:14:18
| 2014-07-06T16:14:18
| 21,543,421
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,775
|
java
|
package com.gaoshin.amazon.jax;
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.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 ref="{http://webservices.amazon.com/AWSECommerceService/2010-09-01}OperationRequest" minOccurs="0"/>
* <element ref="{http://webservices.amazon.com/AWSECommerceService/2010-09-01}Items" maxOccurs="unbounded" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"operationRequest",
"items"
})
@XmlRootElement(name = "ItemSearchResponse")
public class ItemSearchResponse {
@XmlElement(name = "OperationRequest")
protected OperationRequest operationRequest;
@XmlElement(name = "Items")
protected List<Items> items;
/**
* Gets the value of the operationRequest property.
*
* @return
* possible object is
* {@link OperationRequest }
*
*/
public OperationRequest getOperationRequest() {
return operationRequest;
}
/**
* Sets the value of the operationRequest property.
*
* @param value
* allowed object is
* {@link OperationRequest }
*
*/
public void setOperationRequest(OperationRequest value) {
this.operationRequest = value;
}
/**
* Gets the value of the items 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 items property.
*
* <p>
* For example, to add a new item, do as follows:
* <pre>
* getItems().add(newItem);
* </pre>
*
*
* <p>
* Objects of the following type(s) are allowed in the list
* {@link Items }
*
*
*/
public List<Items> getItems() {
if (items == null) {
items = new ArrayList<Items>();
}
return this.items;
}
}
|
[
"zhangyongjiang@yahoo.com"
] |
zhangyongjiang@yahoo.com
|
bd1bd4935ab9712f8eaacf4aa4724fdca4a894eb
|
1829bea13a6647817ffddc9c73e96ec69fc90712
|
/src/main/java/org/snpeff/snpEffect/VcfAnnotator.java
|
2c1b201a287225b03f4d01d2bb51e12a00ba17de
|
[] |
no_license
|
mbourgey/SnpEff
|
637938836d85d0a857c0d38d5293aa1b512806fb
|
ca44f61338d49f4780b42140ab538348e2b177d1
|
refs/heads/master
| 2021-01-18T06:45:20.386620
| 2016-02-29T17:02:39
| 2016-02-29T17:02:39
| 52,807,651
| 0
| 0
| null | 2016-02-29T16:55:01
| 2016-02-29T16:55:01
| null |
UTF-8
|
Java
| false
| false
| 1,282
|
java
|
package org.snpeff.snpEffect;
import org.snpeff.fileIterator.VcfFileIterator;
import org.snpeff.vcf.VcfEntry;
/**
* Annotate a VCF file: E.g. add information to INFO column
*
*/
public interface VcfAnnotator {
/**
* Add annotation headers to VCF file
*
* @return true if OK, false on error
*/
public boolean addHeaders(VcfFileIterator vcfFile);
/**
* Annotate a VCF file entry
*
* @return true if the entry was annotated
*/
public boolean annotate(VcfEntry vcfEntry);
/**
* This method is called after all annotations have been performed.
* The vcfFile might have already been closed by this time
* (i.e. the VcfFileIterator reached the end).
*
* @return true if OK, false on error
*/
public boolean annotateFinish();
/**
* Initialize annotator: This method is called after vcfFile
* is opened, but before the header is output.
* The first vcfEntry might have (and often has) already been
* read from the file.
*
* @return true if OK, false on error
*/
public boolean annotateInit(VcfFileIterator vcfFile);
/**
* Set configuration
*/
public void setConfig(Config config);
/**
* Set debug mode
*/
public void setDebug(boolean debug);
/**
* Set verbose mode
*/
public void setVerbose(boolean verbose);
}
|
[
"pablo.e.cingolani@gmail.com"
] |
pablo.e.cingolani@gmail.com
|
1ce48a7aed8292c9f90360148bb9fbdd540f8202
|
647ec12ce50f06e7380fdbfb5b71e9e2d1ac03b4
|
/com.tencent.mm/classes.jar/com/tencent/mm/ui/chatting/component/bq$i$a$$ExternalSyntheticLambda0.java
|
f72a94be126ed5312f0748047d92ee7f08c60a4a
|
[] |
no_license
|
tsuzcx/qq_apk
|
0d5e792c3c7351ab781957bac465c55c505caf61
|
afe46ef5640d0ba6850cdefd3c11badbd725a3f6
|
refs/heads/main
| 2022-07-02T10:32:11.651957
| 2022-02-01T12:41:38
| 2022-02-01T12:41:38
| 453,860,108
| 36
| 9
| null | 2022-01-31T09:46:26
| 2022-01-31T02:43:22
|
Java
|
UTF-8
|
Java
| false
| false
| 477
|
java
|
package com.tencent.mm.ui.chatting.component;
import android.view.View;
import android.view.View.OnClickListener;
public final class bq$i$a$$ExternalSyntheticLambda0
implements View.OnClickListener
{
public final void onClick(View arg1) {}
}
/* Location: L:\local\mybackup\temp\qq_apk\com.tencent.mm\classes4.jar
* Qualified Name: com.tencent.mm.ui.chatting.component.bq.i.a..ExternalSyntheticLambda0
* JD-Core Version: 0.7.0.1
*/
|
[
"98632993+tsuzcx@users.noreply.github.com"
] |
98632993+tsuzcx@users.noreply.github.com
|
2a25b528047cdec61bcac049439d299c25793051
|
cdd6d7eabbba1adfcb3d09459482bdafabea5ea9
|
/Java_Multithreading/src/main/java/Level_2/lvl_2_task_3/OurUncaughtExceptionHandler.java
|
f7e650b775fd229283759d889b7f0003b778295b
|
[] |
no_license
|
AvengerDima/JavaRush
|
dde5f2cffeff1449a38dc29c6c6c75b49cb698bd
|
7805a3adf61fff3ae2762b86807c67befb31c814
|
refs/heads/master
| 2021-12-02T02:52:49.800659
| 2021-11-19T17:40:38
| 2021-11-19T17:40:38
| 256,775,964
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,337
|
java
|
package Level_2.lvl_2_task_3;
public class OurUncaughtExceptionHandler implements Thread.UncaughtExceptionHandler {
@Override
public void uncaughtException(Thread t, Throwable e) {
final String string = "%s : %s : %s";
if (lvl_2_task_3.FIRST_THREAD_NAME.equals(t.getName())) {
System.out.println(getFormattedStringForFirstThread(t, e, string));
} else if (lvl_2_task_3.SECOND_THREAD_NAME.equals(t.getName())) {
System.out.println(getFormattedStringForSecondThread(t, e, string));
} else {
System.out.println(getFormattedStringForOtherThread(t, e, string));
}
}
protected String getFormattedStringForOtherThread(Thread t, Throwable e, String string) {
String result = String.format(string, e.getClass().getSimpleName(), e.getCause(), t.getName());
return result;
}
protected String getFormattedStringForSecondThread(Thread t, Throwable e, String string) {
String result = String.format(string, e.getCause(), e.getClass().getSimpleName(), t.getName());
return result;
}
protected String getFormattedStringForFirstThread(Thread t, Throwable e, String string) {
String result = String.format(string, t.getName(), e.getClass().getSimpleName(), e.getCause());
return result;
}
}
|
[
"Dima_c.2011@mail.ru"
] |
Dima_c.2011@mail.ru
|
59fd0deb0cc2f34e071d2dddda7cd496b109e306
|
1c9bdf7e53599fa79f4e808a6daf1bab08b35a00
|
/peach/app/src/main/java/com/xygame/second/sg/comm/bean/TimerDuringBean.java
|
3cb9669c3ed6837beabdc92d8b3253e268c51324
|
[] |
no_license
|
snoylee/GamePromote
|
cd1380613a16dc0fa8b5aa9656c1e5a1f081bd91
|
d017706b4d6a78b5c0a66143f6a7a48fcbd19287
|
refs/heads/master
| 2021-01-21T20:42:42.116142
| 2017-06-18T07:59:38
| 2017-06-18T07:59:38
| 94,673,520
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,595
|
java
|
package com.xygame.second.sg.comm.bean;
import com.xygame.second.sg.jinpai.UsedTimeBean;
import com.xygame.second.sg.jinpai.bean.ScheduleTimeBean;
import java.io.Serializable;
import java.util.List;
/**
* Created by tony on 2016/8/10.
*/
public class TimerDuringBean implements Serializable {
private List<FreeTimeBean> timers;
private FreeTimeBean timersOfDate;
private List<ServiceTimeDateBean> dateDatas;
private List<ScheduleTimeBean> scheduleTimeBeans;
private List<UsedTimeBean> usedTimeBeans;
public List<UsedTimeBean> getUsedTimeBeans() {
return usedTimeBeans;
}
public void setUsedTimeBeans(List<UsedTimeBean> usedTimeBeans) {
this.usedTimeBeans = usedTimeBeans;
}
public List<ServiceTimeDateBean> getDateDatas() {
return dateDatas;
}
public void setDateDatas(List<ServiceTimeDateBean> dateDatas) {
this.dateDatas = dateDatas;
}
public List<FreeTimeBean> getTimers() {
return timers;
}
public void setTimers(List<FreeTimeBean> timers) {
this.timers = timers;
}
public List<ScheduleTimeBean> getScheduleTimeBeans() {
return scheduleTimeBeans;
}
public void setScheduleTimeBeans(List<ScheduleTimeBean> scheduleTimeBeans) {
this.scheduleTimeBeans = scheduleTimeBeans;
}
public FreeTimeBean getTimersOfDate() {
return timersOfDate;
}
public void setTimersOfDate(FreeTimeBean timersOfDate) {
this.timersOfDate = timersOfDate;
}
}
|
[
"litieshan549860123@126.com"
] |
litieshan549860123@126.com
|
240aa8d4e12f18434417868daf3a7f71bc8d9253
|
490429ac31f3fdec4b9ba27d6e840928e756ce76
|
/src/main/java/com/bharath/ws/soap/dto/CreditCardInfo.java
|
3ac2aa043d9946460751e7840e448b30d45defe6
|
[] |
no_license
|
rzuniga64/javafirstws
|
3cc99858413cdaa38804477e2f14a52b0116f024
|
a39c6b1f86b35a12b49e1befb00187effb52559d
|
refs/heads/master
| 2020-04-26T06:12:09.888169
| 2019-03-02T07:23:13
| 2019-03-02T07:23:13
| 173,357,538
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,081
|
java
|
package com.bharath.ws.soap.dto;
import java.util.Date;
import javax.xml.bind.annotation.XmlType;
@XmlType(name = "CreditCardInfo")
public class CreditCardInfo {
String cardNumber;
private Date expirtyDate;
String firstName;
String lastName;
String secCode;
String Address;
public String getCardNumber() {
return cardNumber;
}
public void setCardNumber(String cardNumber) {
this.cardNumber = cardNumber;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getSecCode() {
return secCode;
}
public void setSecCode(String secCode) {
this.secCode = secCode;
}
public String getAddress() {
return Address;
}
public void setAddress(String address) {
Address = address;
}
public Date getExpirtyDate() {
return expirtyDate;
}
public void setExpirtyDate(Date expirtyDate) {
this.expirtyDate = expirtyDate;
}
}
|
[
"rzuniga64@gmail.com"
] |
rzuniga64@gmail.com
|
614b318909ac9dfb33b0f98063e76b5264359a0c
|
354ea2bd46fe9ed6f55d36845d4a002a4d09d8e8
|
/src/leverage/game/version/VersionMeta.java
|
fac8ad9f970984e55d9b1eee3a3ba1171af801be
|
[] |
no_license
|
MacKey-255/LEVERAGE-Launcher
|
84c22536fabc041b9ab888f63dee03ccb8814c83
|
ac3d929d08c7bc86873a1451fb37fb2799dc200d
|
refs/heads/master
| 2020-04-20T18:52:25.049189
| 2019-08-02T21:10:23
| 2019-08-02T21:10:23
| 169,033,845
| 3
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 845
|
java
|
package leverage.game.version;
public class VersionMeta {
private final String id;
private final String url;
private final VersionType type;
public VersionMeta(String id, String url, VersionType type) {
this.id = id;
this.url = url;
this.type = type;
}
public final String getID() {
return id;
}
public final String getURL() {
return url;
}
public final VersionType getType() {
return type;
}
@Override
public final boolean equals(Object o) {
return o instanceof VersionMeta && id.equalsIgnoreCase(((VersionMeta) o).id);
}
@Override
public final int hashCode() {
return id.hashCode();
}
@Override
public final String toString() {
return id;
}
}
|
[
"unknown@example.com"
] |
unknown@example.com
|
b1bd2aab873a343e0bc4abc4e252cae316be97ca
|
6ef4869c6bc2ce2e77b422242e347819f6a5f665
|
/devices/google/Pixel 2/29/QPP6.190730.005/src/framework/android/drm/DrmInfo.java
|
5b087944b28958be33f96b63757fe65067f44ef8
|
[] |
no_license
|
hacking-android/frameworks
|
40e40396bb2edacccabf8a920fa5722b021fb060
|
943f0b4d46f72532a419fb6171e40d1c93984c8e
|
refs/heads/master
| 2020-07-03T19:32:28.876703
| 2019-08-13T03:31:06
| 2019-08-13T03:31:06
| 202,017,534
| 2
| 0
| null | 2019-08-13T03:33:19
| 2019-08-12T22:19:30
|
Java
|
UTF-8
|
Java
| false
| false
| 2,792
|
java
|
/*
* Decompiled with CFR 0.145.
*/
package android.drm;
import android.drm.DrmInfoRequest;
import android.drm.DrmUtils;
import java.io.IOException;
import java.util.Arrays;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Set;
public class DrmInfo {
private final HashMap<String, Object> mAttributes = new HashMap();
private byte[] mData;
private final int mInfoType;
private final String mMimeType;
public DrmInfo(int n, String charSequence, String string2) {
this.mInfoType = n;
this.mMimeType = string2;
try {
this.mData = DrmUtils.readBytes((String)charSequence);
}
catch (IOException iOException) {
this.mData = null;
}
if (this.isValid()) {
return;
}
charSequence = new StringBuilder();
((StringBuilder)charSequence).append("infoType: ");
((StringBuilder)charSequence).append(n);
((StringBuilder)charSequence).append(",mimeType: ");
((StringBuilder)charSequence).append(string2);
((StringBuilder)charSequence).append(",data: ");
((StringBuilder)charSequence).append(Arrays.toString(this.mData));
((StringBuilder)charSequence).toString();
throw new IllegalArgumentException();
}
public DrmInfo(int n, byte[] arrby, String string2) {
this.mInfoType = n;
this.mMimeType = string2;
this.mData = arrby;
if (this.isValid()) {
return;
}
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append("infoType: ");
stringBuilder.append(n);
stringBuilder.append(",mimeType: ");
stringBuilder.append(string2);
stringBuilder.append(",data: ");
stringBuilder.append(Arrays.toString(arrby));
throw new IllegalArgumentException(stringBuilder.toString());
}
public Object get(String string2) {
return this.mAttributes.get(string2);
}
public byte[] getData() {
return this.mData;
}
public int getInfoType() {
return this.mInfoType;
}
public String getMimeType() {
return this.mMimeType;
}
boolean isValid() {
byte[] arrby = this.mMimeType;
boolean bl = arrby != null && !arrby.equals("") && (arrby = this.mData) != null && arrby.length > 0 && DrmInfoRequest.isValidType(this.mInfoType);
return bl;
}
public Iterator<Object> iterator() {
return this.mAttributes.values().iterator();
}
public Iterator<String> keyIterator() {
return this.mAttributes.keySet().iterator();
}
public void put(String string2, Object object) {
this.mAttributes.put(string2, object);
}
}
|
[
"me@paulo.costa.nom.br"
] |
me@paulo.costa.nom.br
|
39e92f362dd27394da462cd77fc34cfbc4f785a5
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2018/4/FileUserRepository.java
|
4eb0f85cd4d06223f88eaca2b5736147d2482817
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 3,640
|
java
|
/*
* Copyright (c) 2002-2018 "Neo Technology,"
* Network Engine for Objects in Lund AB [http://neotechnology.com]
*
* This file is part of Neo4j.
*
* Neo4j 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.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.neo4j.server.security.auth;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.List;
import org.neo4j.io.fs.FileSystemAbstraction;
import org.neo4j.kernel.impl.security.User;
import org.neo4j.logging.Log;
import org.neo4j.logging.LogProvider;
import org.neo4j.server.security.auth.exception.FormatException;
import static org.neo4j.server.security.auth.ListSnapshot.FROM_MEMORY;
import static org.neo4j.server.security.auth.ListSnapshot.FROM_PERSISTED;
/**
* Stores user auth data. In memory, but backed by persistent storage so changes to this repository will survive
* JVM restarts and crashes.
*/
public class FileUserRepository extends AbstractUserRepository
{
private final File authFile;
private final FileSystemAbstraction fileSystem;
// TODO: We could improve concurrency by using a ReadWriteLock
private final Log log;
private final UserSerialization serialization = new UserSerialization();
public FileUserRepository( FileSystemAbstraction fileSystem, File file, LogProvider logProvider )
{
this.fileSystem = fileSystem;
this.authFile = file;
this.log = logProvider.getLog( getClass() );
}
@Override
public void start() throws Throwable
{
clear();
ListSnapshot<User> onDiskUsers = readPersistedUsers();
if ( onDiskUsers != null )
{
setUsers( onDiskUsers );
}
}
@Override
protected ListSnapshot<User> readPersistedUsers() throws IOException
{
if ( fileSystem.fileExists( authFile ) )
{
long readTime;
List<User> readUsers;
try
{
readTime = fileSystem.lastModifiedTime( authFile );
readUsers = serialization.loadRecordsFromFile( fileSystem, authFile );
}
catch ( FormatException e )
{
log.error( "Failed to read authentication file \"%s\" (%s)",
authFile.getAbsolutePath(), e.getMessage() );
throw new IllegalStateException( "Failed to read authentication file: " + authFile );
}
return new ListSnapshot<>( readTime, readUsers, FROM_PERSISTED );
}
return null;
}
@Override
protected void persistUsers() throws IOException
{
serialization.saveRecordsToFile( fileSystem, authFile, users );
}
@Override
public ListSnapshot<User> getPersistedSnapshot() throws IOException
{
if ( lastLoaded.get() < fileSystem.lastModifiedTime( authFile ) )
{
return readPersistedUsers();
}
synchronized ( this )
{
return new ListSnapshot<>( lastLoaded.get(), new ArrayList<>( users ), FROM_MEMORY );
}
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
b424e958de3f25d1527563a8915883ced12c4df2
|
0329da1b165fbc224ce1b8571396048d843b1b7a
|
/代码/androidintentfilter/gen/com/example/androidintentfilter/R.java
|
0abc942e953059d9ada8099fd22976917d26bf91
|
[] |
no_license
|
wangwangla/AndroidSensor
|
9710ed2e8afd7fcdcd6f33e8cd53745bc72a5a12
|
f2d90c5d32278513f363e7045fdf9e3a2e7c0df5
|
refs/heads/master
| 2021-12-15T01:21:29.559622
| 2021-12-04T01:55:22
| 2021-12-04T01:55:22
| 184,209,229
| 15
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,835
|
java
|
/* AUTO-GENERATED FILE. DO NOT MODIFY.
*
* This class was automatically generated by the
* aapt tool from the resource data it found. It
* should not be modified by hand.
*/
package com.example.androidintentfilter;
public final class R {
public static final class attr {
}
public static final class dimen {
/** Default screen margins, per the Android Design guidelines.
Example customization of dimensions originally defined in res/values/dimens.xml
(such as screen margins) for screens with more than 820dp of available width. This
would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively).
*/
public static final int activity_horizontal_margin=0x7f040000;
public static final int activity_vertical_margin=0x7f040001;
}
public static final class drawable {
public static final int ic_launcher=0x7f020000;
}
public static final class id {
public static final int action_settings=0x7f080001;
public static final int btn=0x7f080000;
}
public static final class layout {
public static final int activity_main=0x7f030000;
public static final int activity_show=0x7f030001;
}
public static final class menu {
public static final int main=0x7f070000;
public static final int show=0x7f070001;
}
public static final class string {
public static final int action_settings=0x7f050002;
public static final int app_name=0x7f050000;
public static final int hello_world=0x7f050001;
public static final int title_activity_show=0x7f050003;
}
public static final class style {
/**
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
API 11 theme customizations can go here.
Base application theme for API 14+. This theme completely replaces
AppBaseTheme from BOTH res/values/styles.xml and
res/values-v11/styles.xml on API 14+ devices.
API 14 theme customizations can go here.
*/
public static final int AppBaseTheme=0x7f060000;
/** Application theme.
All customizations that are NOT specific to a particular API-level can go here.
*/
public static final int AppTheme=0x7f060001;
}
}
|
[
"2818815189@qq.com"
] |
2818815189@qq.com
|
49c5f8b10dc8e1be12e4c9dae40da319d6615dab
|
35016cb55dcbebef7393c8751ec3d2c9b260d5f6
|
/TRSoa-master/TRSoa-master/TRSoa/target/generated-sources/archetype/src/main/resources/archetype-resources/src/main/java/dao/ProjectDAO.java
|
1887aa55d5d72c3c68151b12117a832c70e11627
|
[] |
no_license
|
chaosssliu/practice
|
6a5f13448d113260b9b08c42e132a4a3808c043d
|
da091688dfeb125fed06e031195ab76d9707e54e
|
refs/heads/master
| 2022-06-24T14:20:38.213285
| 2022-06-10T21:40:50
| 2022-06-10T21:40:50
| 96,723,079
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 391
|
java
|
#set( $symbol_pound = '#' )
#set( $symbol_dollar = '$' )
#set( $symbol_escape = '\' )
package ${package}.dao;
import ${package}.entity.Project;
import ${package}.vo.ProjectVO;
import java.util.List;
/**
* Created by Dawei on 9/1/16.
*/
public interface ProjectDAO {
Project saveProject(Project project);
List<Project> getProject();
List<ProjectVO> getProjectNameList();
}
|
[
"liushashiwr@gmail.com"
] |
liushashiwr@gmail.com
|
51c741ee95f50e135249f84f202e25f6b32f2ae3
|
f66e2ad3fc0f8c88278c0997b156f5c6c8f77f28
|
/Android/GooglePlay/app/src/main/java/com/mwqi/http/HttpRetry.java
|
188e4c032994277340cca2445526fac695989bc7
|
[
"Apache-2.0"
] |
permissive
|
flyfire/Programming-Notes-Code
|
3b51b45f8760309013c3c0cc748311d33951a044
|
4b1bdd74c1ba0c007c504834e4508ec39f01cd94
|
refs/heads/master
| 2020-05-07T18:00:49.757509
| 2019-04-10T11:15:13
| 2019-04-10T11:15:13
| 180,750,568
| 1
| 0
|
Apache-2.0
| 2019-04-11T08:40:38
| 2019-04-11T08:40:38
| null |
UTF-8
|
Java
| false
| false
| 2,821
|
java
|
package com.mwqi.http;
import java.io.IOException;
import java.io.InterruptedIOException;
import java.net.SocketException;
import java.net.UnknownHostException;
import java.util.HashSet;
import javax.net.ssl.SSLHandshakeException;
import org.apache.http.NoHttpResponseException;
import org.apache.http.client.methods.HttpUriRequest;
import org.apache.http.client.HttpRequestRetryHandler;
import org.apache.http.protocol.ExecutionContext;
import org.apache.http.protocol.HttpContext;
import android.os.SystemClock;
public class HttpRetry implements HttpRequestRetryHandler {
// 重试休息的时间
private static final int RETRY_SLEEP_TIME_MILLIS = 1000;
// 网络异常,继续
private static HashSet<Class<?>> exceptionWhitelist = new HashSet<Class<?>>();
// 用户异常,不继续(如,用户中断线程)
private static HashSet<Class<?>> exceptionBlacklist = new HashSet<Class<?>>();
static {
// 以下异常不需要重试,这样异常都是用于造成或者是一些重试也无效的异常
exceptionWhitelist.add(NoHttpResponseException.class);// 连上了服务器但是没有Response
exceptionWhitelist.add(UnknownHostException.class);// host出了问题,一般是由于网络故障
exceptionWhitelist.add(SocketException.class);// Socket问题,一般是由于网络故障
// 以下异常可以重试
exceptionBlacklist.add(InterruptedIOException.class);// 连接中断,一般是由于连接超时引起
exceptionBlacklist.add(SSLHandshakeException.class);// SSL握手失败
}
private final int maxRetries;
public HttpRetry(int maxRetries) {
this.maxRetries = maxRetries;
}
@Override
public boolean retryRequest(IOException exception, int executionCount, HttpContext context) {
boolean retry = true;
// 请求是否到达
Boolean b = (Boolean) context.getAttribute(ExecutionContext.HTTP_REQ_SENT);
boolean sent = (b != null && b.booleanValue());
if (executionCount > maxRetries) {
// 尝试次数超过用户定义的测试
retry = false;
} else if (exceptionBlacklist.contains(exception.getClass())) {
// 线程被用户中断,则不继续尝试
retry = false;
} else if (exceptionWhitelist.contains(exception.getClass())) {
// 出现的异常需要被重试
retry = true;
} else if (!sent) {
// 请求没有到达
retry = true;
}
// 如果需要重试
if (retry) {
// 获取request
HttpUriRequest currentReq = (HttpUriRequest) context.getAttribute(ExecutionContext.HTTP_REQUEST);
// POST请求难道就不需要重试?
//retry = currentReq != null && !"POST".equals(currentReq.getMethod());
retry = currentReq != null;
}
if (retry) {
// 休眠1秒钟后再继续尝试
SystemClock.sleep(RETRY_SLEEP_TIME_MILLIS);
} else {
exception.printStackTrace();
}
return retry;
}
}
|
[
"ztiany3@gmail.com"
] |
ztiany3@gmail.com
|
d502378a5515faa7f15d241e410881f82224c430
|
d48cfe7bb65c3169dea931f605d62b4340222d75
|
/chinahrd-hrbi/base/src/main/java/net/chinahrd/module/SysMenuDefine.java
|
b53da3b4035cb9eae40808ca0ac433b0c0407efa
|
[] |
no_license
|
a559927z/doc
|
7b65aeff1d4606bab1d7f71307d6163b010a226d
|
04e812838a5614ed78f8bbfa16a377e7398843fc
|
refs/heads/master
| 2022-12-23T12:09:32.360591
| 2019-07-15T17:52:54
| 2019-07-15T17:52:54
| 195,972,411
| 0
| 0
| null | 2022-12-16T07:47:50
| 2019-07-09T09:02:38
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 459
|
java
|
/**
*net.chinahrd.cache
*/
package net.chinahrd.module;
import net.chinahrd.core.menu.MenuRegisterAbstract;
/**
* @author htpeng
*2016年10月11日下午11:52:52
*/
public class SysMenuDefine extends MenuRegisterAbstract{
/* (non-Javadoc)
* @see net.chinahrd.core.menu.MenuRegisterAbstract#getFileInputSteam()
*/
@Override
protected String getXmlPath() {
// TODO Auto-generated method stub
return "menu.xml";
}
}
|
[
"a559927z@163.com"
] |
a559927z@163.com
|
e54759c2bc50338606310b4ecb1261e2eeef25ec
|
77fa526a7b4cf490a2ceab66d5eb6831a3750776
|
/java/org/apache/tomcat/jni/Time.java
|
ad19dd1089ac7d6699e40c39b551e0836e81a84f
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown"
] |
permissive
|
srividyac09/tomcat-native
|
5390308a74ebe31be357e18e145100048cce5d0a
|
4f52ed907f44b2a400f79f137e3021e7e7f8cad5
|
refs/heads/main
| 2023-06-27T16:29:53.038445
| 2021-07-23T04:49:38
| 2021-07-23T04:49:38
| 388,088,489
| 0
| 0
|
Apache-2.0
| 2021-07-21T11:03:04
| 2021-07-21T11:03:03
| null |
UTF-8
|
Java
| false
| false
| 2,640
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.tomcat.jni;
/** Time
*
* @author Mladen Turk
*
* @deprecated The scope of the APR/Native Library will be reduced in Tomcat
* 10.1.x / Tomcat Native 2.x onwards to only include those
* components required to provide OpenSSL integration with the NIO
* and NIO2 connectors.
*/
@Deprecated
public class Time {
/** number of microseconds per second */
public static final long APR_USEC_PER_SEC = 1000000L;
/** number of milliseconds per microsecond */
public static final long APR_MSEC_PER_USEC = 1000L;
/**
* @param t The time
* @return apr_time_t as a second
*/
public static long sec(long t)
{
return t / APR_USEC_PER_SEC;
}
/**
* @param t The time
* @return apr_time_t as a msec
*/
public static long msec(long t)
{
return t / APR_MSEC_PER_USEC;
}
/**
* number of microseconds since 00:00:00 January 1, 1970 UTC
* @return the current time
*/
public static native long now();
/**
* Formats dates in the RFC822
* format in an efficient manner.
* @param t the time to convert
* @return the formatted date
*/
public static native String rfc822(long t);
/**
* Formats dates in the ctime() format
* in an efficient manner.
* Unlike ANSI/ISO C ctime(), apr_ctime() does not include
* a \n at the end of the string.
* @param t the time to convert
* @return the formatted date
*/
public static native String ctime(long t);
/**
* Sleep for the specified number of micro-seconds.
* <br><b>Warning :</b> May sleep for longer than the specified time.
* @param t desired amount of time to sleep.
*/
public static native void sleep(long t);
}
|
[
"markt@apache.org"
] |
markt@apache.org
|
7e5baad1af43808686b85516ab5bf3207070e071
|
d77964aa24cfdca837fc13bf424c1d0dce9c70b9
|
/spring-boot/src/main/java/org/springframework/boot/context/logging/ClasspathLoggingApplicationListener.java
|
d3319aca3b55182d614872bf492326aa7a5f3f6e
|
[] |
no_license
|
Suryakanta97/Springboot-Project
|
005b230c7ebcd2278125c7b731a01edf4354da07
|
50f29dcd6cea0c2bc6501a5d9b2c56edc6932d62
|
refs/heads/master
| 2023-01-09T16:38:01.679446
| 2018-02-04T01:22:03
| 2018-02-04T01:22:03
| 119,914,501
| 0
| 1
| null | 2022-12-27T14:52:20
| 2018-02-02T01:21:45
|
Java
|
UTF-8
|
Java
| false
| false
| 3,158
|
java
|
/*
* Copyright 2012-2018 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.boot.context.logging;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.boot.context.event.ApplicationEnvironmentPreparedEvent;
import org.springframework.boot.context.event.ApplicationFailedEvent;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.event.GenericApplicationListener;
import org.springframework.context.event.SmartApplicationListener;
import org.springframework.core.ResolvableType;
import java.net.URLClassLoader;
import java.util.Arrays;
/**
* A {@link SmartApplicationListener} that reacts to
* {@link ApplicationEnvironmentPreparedEvent environment prepared events} and to
* {@link ApplicationFailedEvent failed events} by logging the classpath of the thread
* context class loader (TCCL) at {@code DEBUG} level.
*
* @author Andy Wilkinson
* @since 2.0.0
*/
public final class ClasspathLoggingApplicationListener
implements GenericApplicationListener {
private static final int ORDER = LoggingApplicationListener.DEFAULT_ORDER + 1;
private static final Log logger = LogFactory
.getLog(ClasspathLoggingApplicationListener.class);
@Override
public void onApplicationEvent(ApplicationEvent event) {
if (logger.isDebugEnabled()) {
if (event instanceof ApplicationEnvironmentPreparedEvent) {
logger.debug("Application started with classpath: " + getClasspath());
} else if (event instanceof ApplicationFailedEvent) {
logger.debug(
"Application failed to start with classpath: " + getClasspath());
}
}
}
@Override
public int getOrder() {
return ORDER;
}
@Override
public boolean supportsEventType(ResolvableType resolvableType) {
Class<?> type = resolvableType.getRawClass();
if (type == null) {
return false;
}
return ApplicationEnvironmentPreparedEvent.class.isAssignableFrom(type)
|| ApplicationFailedEvent.class.isAssignableFrom(type);
}
@Override
public boolean supportsSourceType(Class<?> sourceType) {
return true;
}
private String getClasspath() {
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
if (classLoader instanceof URLClassLoader) {
return Arrays.toString(((URLClassLoader) classLoader).getURLs());
}
return "unknown";
}
}
|
[
"suryakanta97@github.com"
] |
suryakanta97@github.com
|
d8612397394769cf6cc598025b113317b80b4d8b
|
7faee5eb3e19209460d06b1aae3ff0f3b98f24df
|
/src/test/java/org/fastquery/bean/PManager.java
|
3db457262816ef134d44b11783151fe9cb133caf
|
[
"Apache-2.0"
] |
permissive
|
adian98/fastquery
|
e70b918d50bf67923f24b5351ce8a87547405fa3
|
a934426bb81f2900ddc4aa574bdd2e2a9d26bf63
|
refs/heads/master
| 2020-05-04T15:14:15.450303
| 2019-04-03T02:47:28
| 2019-04-03T02:47:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,988
|
java
|
/*
* Copyright (c) 2016-2088, fastquery.org and/or its affiliates. All rights reserved.
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
* For more information, please see http://www.fastquery.org/.
*
*/
package org.fastquery.bean;
import java.util.ArrayList;
import java.util.List;
import org.fastquery.core.Id;
/**
*
* @author xixifeng (fastquery@126.com)
*/
public class PManager {
@Id
private Long pmuid; // 物管员帐号ID
private Long punitId; // 物业单位ID
private String mobile; // 唯一约束,登录帐号
private String password;// 密码
private Byte isActive = 0;// 是否激活 0未激活,1激活
private Byte isdm = 0; // 是否是设备管理员(0否,1是)可管理门禁,蓝牙设备
private Byte isReg = 0; // 是否可进行人员登记(0:否,1:是,默认:0) 可操作people
private Byte pmRole = 0; // 物管员角色
// (0:其他,1:物业主任,2:保安经理,3:保安队长,4:保安,88:维修人员/技工)
private String realName; // 真实姓名
private Byte gender = 0; // 性别(0:保密,1:男,2:女)
private String head; // 头像
private Byte isOnline = 0; // 是否在线 (0:否,1:是,默认:0)
private String hxuser; // 环信帐号(用于门禁呼叫)
private String hxpass; // 环信密码(用于门禁呼叫)
private String hxRoomId; // 环信聊天房间Id(用于对讲广播)
private Long createUid = 0L;// 默认:0 创建人UID
private Long lastUpdateUid;// 默认:0 最后修改人UID --云平台
private int[] ins = new int[] {};
private List<String> lists = new ArrayList<>();
public PManager() {
}
public PManager(Long punitId, String mobile, String password, Byte isdm, Byte isReg, Byte pmRole, String realName, Byte gender) {
this.punitId = punitId;
this.mobile = mobile;
this.password = password;
this.isdm = isdm;
this.isReg = isReg;
this.pmRole = pmRole;
this.realName = realName;
this.gender = gender;
}
public Long getPmuid() {
return pmuid;
}
public Long getPunitId() {
return punitId;
}
public String getMobile() {
return mobile;
}
public String getPassword() {
return password;
}
public Byte getIsActive() {
return isActive;
}
public Byte getIsdm() {
return isdm;
}
public Byte getIsReg() {
return isReg;
}
public Byte getPmRole() {
return pmRole;
}
public String getRealName() {
return realName;
}
public Byte getGender() {
return gender;
}
public String getHead() {
return head;
}
public Byte getIsOnline() {
return isOnline;
}
public String getHxuser() {
return hxuser;
}
public String getHxpass() {
return hxpass;
}
public String getHxRoomId() {
return hxRoomId;
}
public Long getCreateUid() {
return createUid;
}
public Long getLastUpdateUid() {
return lastUpdateUid;
}
public void setPmuid(Long pmuid) {
this.pmuid = pmuid;
}
public void setPunitId(Long punitId) {
this.punitId = punitId;
}
public void setMobile(String mobile) {
this.mobile = mobile;
}
public void setPassword(String password) {
this.password = password;
}
public void setIsActive(Byte isActive) {
this.isActive = isActive;
}
public void setIsdm(Byte isdm) {
this.isdm = isdm;
}
public void setIsReg(Byte isReg) {
this.isReg = isReg;
}
public void setPmRole(Byte pmRole) {
this.pmRole = pmRole;
}
public void setRealName(String realName) {
this.realName = realName;
}
public void setGender(Byte gender) {
this.gender = gender;
}
public void setHead(String head) {
this.head = head;
}
public void setIsOnline(Byte isOnline) {
this.isOnline = isOnline;
}
public void setHxuser(String hxuser) {
this.hxuser = hxuser;
}
public void setHxpass(String hxpass) {
this.hxpass = hxpass;
}
public void setHxRoomId(String hxRoomId) {
this.hxRoomId = hxRoomId;
}
public void setCreateUid(Long createUid) {
this.createUid = createUid;
}
public void setLastUpdateUid(Long lastUpdateUid) {
this.lastUpdateUid = lastUpdateUid;
}
public int[] getIns() {
return ins;
}
public void setIns(int[] ins) {
this.ins = ins;
}
public List<String> getLists() {
return lists;
}
public void setLists(List<String> lists) {
this.lists = lists;
}
}
|
[
"fastquery@126.com"
] |
fastquery@126.com
|
e110eb23214189a0b34e4795928220b5fa3b2fbb
|
13cbb329807224bd736ff0ac38fd731eb6739389
|
/com/sun/xml/internal/bind/v2/model/core/TypeInfoSet.java
|
4c5e104794ef015bd975de0334b06407dc77cf49
|
[] |
no_license
|
ZhipingLi/rt-source
|
5e2537ed5f25d9ba9a0f8009ff8eeca33930564c
|
1a70a036a07b2c6b8a2aac6f71964192c89aae3c
|
refs/heads/master
| 2023-07-14T15:00:33.100256
| 2021-09-01T04:49:04
| 2021-09-01T04:49:04
| 401,933,858
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,450
|
java
|
package com.sun.xml.internal.bind.v2.model.core;
import com.sun.xml.internal.bind.v2.model.nav.Navigator;
import java.util.Map;
import javax.xml.bind.JAXBException;
import javax.xml.bind.annotation.XmlNsForm;
import javax.xml.namespace.QName;
import javax.xml.transform.Result;
public interface TypeInfoSet<T, C, F, M> {
Navigator<T, C, F, M> getNavigator();
NonElement<T, C> getTypeInfo(T paramT);
NonElement<T, C> getAnyTypeInfo();
NonElement<T, C> getClassInfo(C paramC);
Map<? extends T, ? extends ArrayInfo<T, C>> arrays();
Map<C, ? extends ClassInfo<T, C>> beans();
Map<T, ? extends BuiltinLeafInfo<T, C>> builtins();
Map<C, ? extends EnumLeafInfo<T, C>> enums();
ElementInfo<T, C> getElementInfo(C paramC, QName paramQName);
NonElement<T, C> getTypeInfo(Ref<T, C> paramRef);
Map<QName, ? extends ElementInfo<T, C>> getElementMappings(C paramC);
Iterable<? extends ElementInfo<T, C>> getAllElements();
Map<String, String> getXmlNs(String paramString);
Map<String, String> getSchemaLocations();
XmlNsForm getElementFormDefault(String paramString);
XmlNsForm getAttributeFormDefault(String paramString);
void dump(Result paramResult) throws JAXBException;
}
/* Location: D:\software\jd-gui\jd-gui-windows-1.6.3\rt.jar!\com\sun\xml\internal\bind\v2\model\core\TypeInfoSet.class
* Java compiler version: 8 (52.0)
* JD-Core Version: 1.0.7
*/
|
[
"michael__lee@yeah.net"
] |
michael__lee@yeah.net
|
2a358dd27287a0c11ddc7d60ce403163a63fbb12
|
36c0a0e21f3758284242b8d2e40b60c36bd23468
|
/src/main/java/com/datasphere/engine/manager/resource/consumer/log/LogSqlBuilder.java
|
dc7a8c7d57cb5cd1b073be914e7c605aa85fe0aa
|
[
"LicenseRef-scancode-mulanpsl-1.0-en"
] |
permissive
|
neeeekoooo/datasphere-service
|
0185bca5a154164b4bc323deac23a5012e2e6475
|
cb800033ba101098b203dbe0a7e8b7f284319a7b
|
refs/heads/master
| 2022-11-15T01:10:05.530442
| 2020-02-01T13:54:36
| 2020-02-01T13:54:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,099
|
java
|
/*
* Copyright 2019, Huahuidata, Inc.
* DataSphere is licensed under the Mulan PSL v1.
* You can use this software according to the terms and conditions of the Mulan PSL v1.
* You may obtain a copy of Mulan PSL v1 at:
* http://license.coscl.org.cn/MulanPSL
* THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR
* PURPOSE.
* See the Mulan PSL v1 for more details.
*/
package com.datasphere.engine.manager.resource.consumer.log;
import java.io.Serializable;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
import com.datasphere.engine.manager.resource.common.NoSuchConsumerException;
import com.datasphere.engine.manager.resource.model.Consumer;
import com.datasphere.engine.manager.resource.model.ConsumerBuilder;
import com.datasphere.engine.manager.resource.model.Registration;
@Component
public class LogSqlBuilder implements ConsumerBuilder {
@Value("${consumers.log.enable}")
private boolean enabled;
private static LogSqlConsumer _instance;
@Override
public String getType() {
return LogSqlConsumer.TYPE;
}
@Override
public String getId() {
return LogSqlConsumer.ID;
}
@Override
public Set<String> listProperties() {
return new HashSet<String>();
}
@Override
public boolean isAvailable() {
return enabled;
}
@Override
public Consumer build() throws NoSuchConsumerException {
if (!enabled) {
throw new NoSuchConsumerException();
}
// use singleton
if (_instance == null) {
_instance = new LogSqlConsumer();
// explicitly call init() since @postconstruct won't work here
_instance.init();
}
return _instance;
}
@Override
public Consumer build(Map<String, Serializable> properties) throws NoSuchConsumerException {
return build();
}
@Override
public Consumer build(Registration reg) throws NoSuchConsumerException {
return build();
}
}
|
[
"jack_r_ge@126.com"
] |
jack_r_ge@126.com
|
8c966f71274bfa2b17656d8b14f79251fae1ddc8
|
82de1e98e30a0836b892f00e07bfcc0954dbc517
|
/hotcomm-data/hotcomm-data-service/src/main/java/com/hotcomm/data/web/controller/comm/BaseController.java
|
97e1df152f1a310efb90756519a4a0b63137e863
|
[] |
no_license
|
jiajiales/hangkang-qingdao
|
ab319048b61f6463f8cf1ac86ac5c74bd3df35d7
|
60a0a4b1d1fb9814d8aa21188aebbf72a1d6b25d
|
refs/heads/master
| 2020-04-22T17:07:34.569613
| 2019-02-13T15:14:07
| 2019-02-13T15:14:07
| 170,530,164
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,284
|
java
|
package com.hotcomm.data.web.controller.comm;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.stereotype.Component;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.hotcomm.data.bean.vo.sys.MemberResource;
import com.hotcomm.data.bean.vo.sys.MemberVO;
import com.hotcomm.framework.utils.PropertiesHelper;
import com.hotcomm.framework.utils.RedisHelper;
import com.hotcomm.framework.web.exception.HKException;
@Component
public class BaseController {
@Resource
HttpServletRequest request;
@Resource
private RedisHelper redisHelper;
protected MemberVO getLoginMember() {
MemberVO result = null;
try {
String token = request.getParameter("token");
if (PropertiesHelper.devModel.equals("test")&&token==null) {
result = new MemberVO();
result.setMemberName("admin");
return result;
}
String userJson = redisHelper.get(token);
ObjectMapper mapper = new ObjectMapper();
MemberResource memberResource = mapper.readValue(userJson, MemberResource.class);
result = memberResource.getMember();
} catch (Exception e) {
throw new HKException("USER_TOKEN_001", "获取当前登入用户信息失败");
}
return result;
}
}
|
[
"562910919@qq.com"
] |
562910919@qq.com
|
ec67e4ae078679703e4287f945185d1e2fb84e8f
|
6aa8173702d8d196a3d1884a8e03ecbdaee56f6d
|
/src/main/java/io/naztech/jobharvestar/scraper/JanusHendersonEmea.java
|
9ff2d80762d05ed293b4a04277ce99026b8cacb8
|
[] |
no_license
|
armfahim/Job-Harvester
|
df762053cf285da87498faa705ec7a099fce1ea9
|
51dbc836a60b03c27c52cb38db7c19db5d91ddc9
|
refs/heads/master
| 2023-08-11T18:30:56.842891
| 2020-02-27T09:16:56
| 2020-02-27T09:16:56
| 243,461,410
| 3
| 0
| null | 2023-07-23T06:59:54
| 2020-02-27T07:48:57
|
Java
|
UTF-8
|
Java
| false
| false
| 901
|
java
|
package io.naztech.jobharvestar.scraper;
import org.springframework.stereotype.Service;
import io.naztech.jobharvestar.crawler.ShortName;
import io.naztech.talent.model.SiteMetaData;
/**
* JANUS HENDERSON INVESTORS EMEA/APAC<br>
* URL: https://career8.successfactors.com/career?company=Janus&career_ns=job_listing_summary&navBarLevel=JOB_SEARCH
*
* @author tanbirul.hashan
* @since 2019-02-20
*/
@Service
public class JanusHendersonEmea extends AbstractSuccessfactors {
private static final String SITE = ShortName.JANUS_HENDERSON_INVESTORS_EMEA;
private String baseUrl;
@Override
public void setBaseUrl(SiteMetaData site) {
this.baseUrl = site.getUrl().substring(0, 34);
}
@Override
public String getSiteName() {
return SITE;
}
@Override
protected String getBaseUrl() {
return this.baseUrl;
}
@Override
protected String getNextAnchorId() {
return "45:_next";
}
}
|
[
"armfahim4010@gmail.com"
] |
armfahim4010@gmail.com
|
fb8c49a7fd0bc0e6f716b3057d3142dd9ad3f9db
|
ee3e30a6d5990432657214fedd81b2083c26ab28
|
/hapi-fhir-structures-dstu3/src/main/java/org/hl7/fhir/dstu3/model/codesystems/CqifRecommendationStrengthEnumFactory.java
|
d3019d5cb270227be442375ece5c540e9fa33c7b
|
[
"LicenseRef-scancode-warranty-disclaimer",
"Apache-2.0"
] |
permissive
|
herimakil/hapi-fhir
|
588938b328e3c83809617b674ff25903c1541bab
|
15cc76600069af8f3d7419575d4cfb9e4b613db0
|
refs/heads/master
| 2021-01-19T20:43:57.911661
| 2017-04-14T15:27:37
| 2017-04-14T15:27:37
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,643
|
java
|
package org.hl7.fhir.dstu3.model.codesystems;
/*
Copyright (c) 2011+, HL7, Inc.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
* Neither the name of HL7 nor the names of its contributors may be used to
endorse or promote products derived from this software without specific
prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
IN NO EVENT SHALL THE COPYRIGHT HOLDER 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.
*/
// Generated on Sat, Mar 4, 2017 06:58-0500 for FHIR v1.9.0
import org.hl7.fhir.dstu3.model.EnumFactory;
public class CqifRecommendationStrengthEnumFactory implements EnumFactory<CqifRecommendationStrength> {
public CqifRecommendationStrength fromCode(String codeString) throws IllegalArgumentException {
if (codeString == null || "".equals(codeString))
return null;
if ("strong".equals(codeString))
return CqifRecommendationStrength.STRONG;
if ("weak".equals(codeString))
return CqifRecommendationStrength.WEAK;
throw new IllegalArgumentException("Unknown CqifRecommendationStrength code '"+codeString+"'");
}
public String toCode(CqifRecommendationStrength code) {
if (code == CqifRecommendationStrength.STRONG)
return "strong";
if (code == CqifRecommendationStrength.WEAK)
return "weak";
return "?";
}
public String toSystem(CqifRecommendationStrength code) {
return code.getSystem();
}
}
|
[
"jamesagnew@gmail.com"
] |
jamesagnew@gmail.com
|
21d2b46c12d6c329448879e5a1a9a3cf8c745d6e
|
7351dfffc2fcf3dbe708168ef51c55c756f4b68f
|
/src/main/java/ru/demi/interview/preparation/arrays/NewYearChaos.java
|
05529cbb2e71c6a38e8f9f2139f921ff1a0f4074
|
[] |
no_license
|
dmitry-izmerov/hackerrank
|
87e63090b50fa6a80a8d5705f24041cb8af0f5d5
|
d38ef6713bba068e49c2724bf2abd656b42f8a29
|
refs/heads/master
| 2021-04-03T06:18:08.376959
| 2019-09-13T18:51:39
| 2019-09-13T18:51:39
| 124,564,879
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,291
|
java
|
package ru.demi.interview.preparation.arrays;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Scanner;
import java.util.stream.Collectors;
/**
* Complete the function which must print an integer representing the minimum number of bribes necessary,
* or Too chaotic if the line configuration is not possible.
*/
public class NewYearChaos {
private static final String BAD_CASE_MESSAGE = "Too chaotic";
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int t = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
for (int tItr = 0; tItr < t; tItr++) {
int n = scanner.nextInt();
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
int[] q = new int[n];
String[] qItems = scanner.nextLine().split(" ");
scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");
for (int i = 0; i < n; i++) {
int qItem = Integer.parseInt(qItems[i]);
q[i] = qItem;
}
minimumBribes(q);
}
scanner.close();
}
private static void minimumBribes(int[] ar) {
List<Integer> nums = Arrays.stream(ar).boxed().collect(Collectors.toList());
Map<Integer, Integer> swapCounter = new HashMap<>();
int numSwaps = 0;
int numSwapsPerIteration;
do {
numSwapsPerIteration = 0;
for (int i = 0; i < ar.length - 1; i++) {
Integer left = nums.get(i);
Integer right = nums.get(i + 1);
if (left > right) {
if (swapCounter.getOrDefault(left, 0) == 2) {
System.out.println(BAD_CASE_MESSAGE);
return;
}
swapCounter.computeIfPresent(left, (k, v) -> v + 1);
swapCounter.putIfAbsent(left, 1);
nums.set(i + 1, left);
nums.set(i, right);
++numSwapsPerIteration;
}
}
numSwaps += numSwapsPerIteration;
} while (numSwapsPerIteration != 0);
System.out.println(numSwaps);
}
}
|
[
"idd90i@gmail.com"
] |
idd90i@gmail.com
|
273eb69f386f92b9a02fa1b60d9f19328fd28cf1
|
1e109337f4a2de0d7f9a33f11f029552617e7d2e
|
/jcatapult-mvc/tags/1.0.17/src/java/main/org/jcatapult/mvc/validation/EmailValidator.java
|
baefb88e322dabaf7a01d219325db80f53b674c8
|
[] |
no_license
|
Letractively/jcatapult
|
54fb8acb193bc251e5984c80eba997793844059f
|
f903b78ce32cc5468e48cd7fde220185b2deecb6
|
refs/heads/master
| 2021-01-10T16:54:58.441959
| 2011-12-29T00:43:26
| 2011-12-29T00:43:26
| 45,956,606
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,746
|
java
|
/*
* Copyright (c) 2001-2007, JCatapult.org, All Rights Reserved
*
* 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.jcatapult.mvc.validation;
import java.util.regex.Pattern;
import org.jcatapult.mvc.validation.annotation.Email;
/**
* <p>
* This class verifies that the value is an email address using a relaxed regex
* (because the all two letter TLDs are allowed).
* </p>
*
* @author Brian Pontarelli
*/
public class EmailValidator implements Validator<Email> {
public static final Pattern emailPattern = Pattern.compile("[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+(?:[a-z]{2}|aero|asia|biz|cat|com|coop|edu|gov|info|int|jobs|mil|mobi|museum|name|net|org|pro|tel|travel)");
/**
* @param annotation Not used.
* @param container Not used.
* @param value The value to check.
* @return True if the value matches the pattern, false otherwise.
*/
public boolean validate(Email annotation, Object container, Object value) {
if (value == null) {
return true;
}
String email = value.toString();
return emailPattern.matcher(email.toLowerCase()).matches();
}
}
|
[
"bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7"
] |
bpontarelli@b10e9645-db3f-0410-a6c5-e135923ffca7
|
4a0d5d65f989411c0d8a86c33e8bac11d08eed49
|
c30beecbe25d811e252a62e89c38b929e8601282
|
/src/main/java/com/raymor/kpi/db/web/rest/ClientForwardController.java
|
45256574d28a356618819b848f6e5e4607f44d7c
|
[] |
no_license
|
alfonsomarquez1/kpi-db-raymor
|
e7ef431a29386bfdabd2ed8eb3d304ac88c3e42f
|
d6c5ec6911924fb6c6359a189b9effbe36a07c65
|
refs/heads/master
| 2022-11-30T20:17:10.095544
| 2020-08-16T17:53:45
| 2020-08-16T17:53:45
| 287,995,847
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 484
|
java
|
package com.raymor.kpi.db.web.rest;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
@Controller
public class ClientForwardController {
/**
* Forwards any unmapped paths (except those containing a period) to the client {@code index.html}.
* @return forward to client {@code index.html}.
*/
@GetMapping(value = "/**/{path:[^\\.]*}")
public String forward() {
return "forward:/";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
5b53eda2f954cb6554cb2312b7c87ba0bf53bd7e
|
9d8376bc433b807eb6839adbe6c946436bad16c0
|
/src/java_chobo2/ch10/DateToCalendarEx.java
|
81cb65eed58dc0383d45c348ddd0c92ca5c1e213
|
[] |
no_license
|
mywns123/java_chobo2
|
96238611714c9b6672636cd9b5ae6e44924177ee
|
ae5f6b94bc4b88bd700e0b8e168fc4c4245bc59a
|
refs/heads/master
| 2023-03-21T23:03:26.493958
| 2021-03-09T07:47:35
| 2021-03-09T07:47:35
| 341,818,610
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,033
|
java
|
package java_chobo2.ch10;
import java.util.Calendar;
import java.util.Date;
public class DateToCalendarEx {
@SuppressWarnings("deprecation")
public static void main(String[] args) {
Calendar cal = Calendar.getInstance();
cal.clear();
cal.set(2020, 0, 1);
System.out.println(cal.get(Calendar.YEAR) + "-" + (cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.DATE));
Date d = new Date();
d.setYear(19);
d.setMonth(0);
d.setDate(1);
System.out.printf("%tF %n", d);
convCalToDate(cal);
convDateToCal(d);
}
private static void convCalToDate(Calendar cal) {
System.out.println("convert Calendar To Date()");
Date d = new Date(cal.getTimeInMillis());
System.out.printf("%tF %n", d);
}
private static void convDateToCal(Date d) {
System.out.println("convDateToCal()");
Calendar cal = Calendar.getInstance();
cal.setTime(d);
System.out.println(cal.get(Calendar.YEAR) + "-" + (cal.get(Calendar.MONTH) + 1) + "-" + cal.get(Calendar.DATE));
}
}
|
[
"wnsduq2000@naver.com"
] |
wnsduq2000@naver.com
|
8017fc0c7677c02dfbaff89f13415469519cd815
|
6baf1fe00541560788e78de5244ae17a7a2b375a
|
/hollywood/com.oculus.socialplatform-base/sources/com/oculus/messengervr/oc/$$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42.java
|
9c23e3cc7b3d114fa0a759317b60d9c700935f00
|
[] |
no_license
|
phwd/quest-tracker
|
286e605644fc05f00f4904e51f73d77444a78003
|
3d46fbb467ba11bee5827f7cae7dfeabeb1fd2ba
|
refs/heads/main
| 2023-03-29T20:33:10.959529
| 2021-04-10T22:14:11
| 2021-04-10T22:14:11
| 357,185,040
| 4
| 2
| null | 2021-04-12T12:28:09
| 2021-04-12T12:28:08
| null |
UTF-8
|
Java
| false
| false
| 606
|
java
|
package com.oculus.messengervr.oc;
import X.AbstractC12851yS;
/* renamed from: com.oculus.messengervr.oc.-$$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42 reason: invalid class name */
public final /* synthetic */ class $$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42 implements AbstractC12851yS {
public static final /* synthetic */ $$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42 INSTANCE = new $$Lambda$MessageListObservableUtil$BWKbb5snBT5SDnix3KtNwycssU42();
@Override // X.AbstractC12851yS
public final void accept(Object obj) {
}
}
|
[
"cyuubiapps@gmail.com"
] |
cyuubiapps@gmail.com
|
aea9bc768b715b4cf42d4fbadb9ec8618c8d70f2
|
4968c5642c5e5261b635d3f31e1890fba7277868
|
/fav/frontend/src/main/java/org/express/common/bean/FieldMeta.java
|
75bdfe2df17e0c5af8613b5215cdfb7abdaf6633
|
[] |
no_license
|
cllcsh/collectionplus
|
01116dc8594e0be6e5a10623e3db2ec9d103d2c2
|
4a62418d73745a9136d4163527d532e2d3e8b483
|
refs/heads/master
| 2016-08-11T16:16:24.556377
| 2016-04-21T07:51:03
| 2016-04-21T07:51:03
| 54,613,229
| 0
| 0
| null | 2016-03-24T14:39:53
| 2016-03-24T03:55:39
| null |
UTF-8
|
Java
| false
| false
| 1,008
|
java
|
package org.express.common.bean;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* bean注解类
* @author Rei Ayanami
*
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.FIELD,ElementType.METHOD})
public @interface FieldMeta {
/**
* 是否为主键
* @return
*/
boolean isPrimary() default false;
/**
* 字段名称
* @return
*/
String name() default "";
/**
* 是否可编辑
* @return
*/
boolean editable() default true;
/**
* 是否显示
* @return
*/
boolean display() default true;
/**
* 字段描述
* @return
*/
String description() default "";
/**
* 排序字段
* @return
*/
int order() default 0;
/**
* 是否原生属性
* @return
*/
boolean isNative() default true;
}
|
[
"cllc@cllc.me"
] |
cllc@cllc.me
|
79e4e844756abf842453ebf02b5031944e861147
|
4438e0d6d65b9fd8c782d5e13363f3990747fb60
|
/mobile-dto/src/main/java/com/cencosud/mobile/dto/users/EstadoCumpleResumenDTO.java
|
882d44723c0caee27631eda85ed036ad668a5cb8
|
[] |
no_license
|
cencosudweb/mobile
|
82452af7da189ed6f81637f8ebabea0dbd241b4a
|
37a3a514b48d09b9dc93e90987715d979e5414b6
|
refs/heads/master
| 2021-09-01T21:41:24.713624
| 2017-12-28T19:34:28
| 2017-12-28T19:34:28
| 115,652,291
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 793
|
java
|
package com.cencosud.mobile.dto.users;
import java.io.Serializable;
import org.apache.commons.lang.builder.ToStringBuilder;
/**
*
* @author jose
*
*/
public class EstadoCumpleResumenDTO implements Serializable {
private static final long serialVersionUID = 3657265432071279059L;
private Long id;
private String description;
public EstadoCumpleResumenDTO() {
}
public EstadoCumpleResumenDTO(Long id) {
this.id = id;
}
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this);
}
public Long getId() {
return id;
}
public String getDescription() {
return description;
}
public void setId(Long id) {
this.id = id;
}
public void setDescription(String description) {
this.description = description;
}
}
|
[
"cencosudweb.panel@gmail.com"
] |
cencosudweb.panel@gmail.com
|
8223b16c935df2e66e4863a0596cdd6893d056a8
|
26ce2e5d791da69b0c88821320631a4daaa5228c
|
/src/main/java/br/com/swconsultoria/efd/contribuicoes/registros/blocoA/RegistroA111.java
|
13716f389a645f28e00811430b39b3c93ce5258e
|
[
"MIT"
] |
permissive
|
Samuel-Oliveira/Java-Efd-Contribuicoes
|
b3ac3b76f82a29e22ee37c3fb0334d801306c1d4
|
da29df5694e27024df3aeda579936c792fac0815
|
refs/heads/master
| 2023-08-04T06:39:32.644218
| 2023-07-28T00:39:59
| 2023-07-28T00:39:59
| 94,896,966
| 8
| 6
|
MIT
| 2022-04-06T15:30:13
| 2017-06-20T13:55:12
|
Java
|
UTF-8
|
Java
| false
| false
| 765
|
java
|
/**
*
*/
package br.com.swconsultoria.efd.contribuicoes.registros.blocoA;
/**
* @author Yuri Lemes
*
*/
public class RegistroA111 {
private final String reg = "A111";
private String num_proc;
private String ind_proc;
/**
* @return the num_proc
*/
public String getNum_proc() {
return num_proc;
}
/**
* @param num_proc
* the num_proc to set
*/
public void setNum_proc(String num_proc) {
this.num_proc = num_proc;
}
/**
* @return the ind_proc
*/
public String getInd_proc() {
return ind_proc;
}
/**
* @param ind_proc
* the ind_proc to set
*/
public void setInd_proc(String ind_proc) {
this.ind_proc = ind_proc;
}
/**
* @return the reg
*/
public String getReg() {
return reg;
}
}
|
[
"samuk.exe@hotmail.com"
] |
samuk.exe@hotmail.com
|
3ab551aef570f1ea8b20c6162b1fceff2c15b718
|
7ebfc9e651fefad56676c37f7a62fb7b22b525be
|
/baseproject-framework-monitor/src/main/java/com/baseproject/framework/monitor/BaseProjectFrameworkMonitorApplication.java
|
3fdd27e73cd77aed7ebb37fc4a4a648f7192671c
|
[] |
no_license
|
yelanting/ManagePlatformBaseProjectFramework
|
a92ca5089d4a9729da245432ed1e0eb902022668
|
0069349422ec065b687f7d817a8675917f98094f
|
refs/heads/master
| 2023-01-03T11:47:23.572249
| 2019-11-19T08:55:22
| 2019-11-19T08:55:22
| 222,648,949
| 0
| 0
| null | 2022-12-10T07:13:39
| 2019-11-19T08:42:32
|
Java
|
UTF-8
|
Java
| false
| false
| 616
|
java
|
package com.baseproject.framework.monitor;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import de.codecentric.boot.admin.server.config.EnableAdminServer;
/**
* 启动器
* @author Administrator
* @date Jan 15, 2019
*/
@EnableAdminServer
@EnableDiscoveryClient
@SpringBootApplication
public class BaseProjectFrameworkMonitorApplication {
public static void main(String[] args) {
SpringApplication.run(BaseProjectFrameworkMonitorApplication.class, args);
}
}
|
[
"sunlpmail@126.com"
] |
sunlpmail@126.com
|
07211f3ed156c104ebe5695f60b07592c54df5fa
|
5621138cff27c31e979c78063ac82ff44c83aec0
|
/src/minecraft/mattparks/mods/starcraft/mercury/wgen/village/GCMercuryComponentVillageStartPiece.java
|
3056efe48d3d8dd806c031c1f33d068aa06633d2
|
[] |
no_license
|
nikolaStarcraft/Starcraft-2
|
efbde65f26ee4889a6fc384a7fe7add09396f59a
|
6405557ab9bcf1c24514722b3599ab77c8f48231
|
refs/heads/master
| 2021-01-15T10:52:27.109300
| 2014-03-01T10:42:07
| 2014-03-01T10:42:07
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,674
|
java
|
package mattparks.mods.starcraft.mercury.wgen.village;
import java.util.ArrayList;
import java.util.Random;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.world.biome.WorldChunkManager;
public class GCMercuryComponentVillageStartPiece extends GCMercuryComponentVillageWell
{
public WorldChunkManager worldChunkMngr;
public int terrainType;
public GCMercuryStructureVillagePieceWeight structVillagePieceWeight;
public ArrayList<GCMercuryStructureVillagePieceWeight> structureVillageWeightedPieceList;
public ArrayList<Object> field_74932_i = new ArrayList<Object>();
public ArrayList<Object> field_74930_j = new ArrayList<Object>();
public GCMercuryComponentVillageStartPiece()
{
}
public GCMercuryComponentVillageStartPiece(WorldChunkManager par1WorldChunkManager, int par2, Random par3Random, int par4, int par5, ArrayList<GCMercuryStructureVillagePieceWeight> par6ArrayList, int par7)
{
super((GCMercuryComponentVillageStartPiece) null, 0, par3Random, par4, par5);
this.worldChunkMngr = par1WorldChunkManager;
this.structureVillageWeightedPieceList = par6ArrayList;
this.terrainType = par7;
this.startPiece = this;
}
@Override
protected void func_143012_a(NBTTagCompound nbt)
{
super.func_143012_a(nbt);
nbt.setInteger("TerrainType", this.terrainType);
}
@Override
protected void func_143011_b(NBTTagCompound nbt)
{
super.func_143011_b(nbt);
this.terrainType = nbt.getInteger("TerrainType");
}
public WorldChunkManager getWorldChunkManager()
{
return this.worldChunkMngr;
}
}
|
[
"mattparks5855@gmail.com"
] |
mattparks5855@gmail.com
|
055ac210977d3f995ec9af6f52ba1f4cdb16fbae
|
d9ea3ae7b2c4e9a586e61aed23e6e997eaa38687
|
/11.GOF23开发模式/★★★开发模式/代理模式/静态代理/exp1/WeddingCompany.java
|
8bce0bc7b0c846be6f6535849e27daf40ac5a426
|
[] |
no_license
|
yuanhaocn/Fu-Zusheng-Java
|
6e5dcf9ef3d501102af7205bb81674f880352158
|
ab872bcfe36d985a651a5e12ecb6132ad4d2cb8e
|
refs/heads/master
| 2020-05-15T00:20:47.872967
| 2019-04-16T11:06:18
| 2019-04-16T11:06:18
| null | 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 544
|
java
|
package 静态代理.exp1;
//2,代理角色--->代理class忙前忙后需要持有真实角色的引用
public class WeddingCompany implements Marry{
private You you;
public WeddingCompany() {
}
public WeddingCompany(You you) {
super();
this.you = you;
}
private void befor() {
System.out.println("布置婚房。。。");
}
private void after() {
System.out.println("闹洞房。。。");
}
@Override
public void marry() {
befor();//<<---代理给你忙前
you.marry();
after();//《---代理给你忙后
}
}
|
[
"fuzusheng@gmail.com"
] |
fuzusheng@gmail.com
|
86ea0359ce677210bff35e375f9f31545a86ffe7
|
5d4cc5c19edcd3d92c14074be439897b14c3d563
|
/model/src/main/java/tarce/model/FindProductByConditionResponse.java
|
71e98385009745053e26d535ac9f18fbdc46df7f
|
[] |
no_license
|
zouwansheng/MyOdoo
|
752325a6f60a936c9ed42fdadfe5fa6c92cafe0a
|
df18ec69164020fac6604b68022b9122aa5c206f
|
refs/heads/master
| 2021-01-22T07:42:36.469579
| 2017-05-27T05:21:52
| 2017-05-27T05:21:52
| 92,573,104
| 1
| 0
| null | 2017-05-27T05:25:02
| 2017-05-27T05:25:02
| null |
UTF-8
|
Java
| false
| false
| 5,957
|
java
|
package tarce.model;
import java.io.Serializable;
import java.text.DecimalFormat;
/**
* Created by Daniel.Xu on 2017/2/8.
*/
public class FindProductByConditionResponse {
/**
* jsonrpc : 2.0
* id : null
* result : {"res_data":{"product":{"area":{"id":false,"name":false},"image_medium":"http://192.168.2.111:8069/linkloving_app_api/get_product_image?product_id=48204","id":46537,"product_name":" HS310-成品(星夜·追梦人)-RT-CN"},"theoretical_qty":-387,"product_qty":0},"res_msg":"","res_code":1}
*/
private String jsonrpc;
private Object id;
private ResultBean result;
public String getJsonrpc() {
return jsonrpc;
}
public void setJsonrpc(String jsonrpc) {
this.jsonrpc = jsonrpc;
}
public Object getId() {
return id;
}
public void setId(Object id) {
this.id = id;
}
public ResultBean getResult() {
return result;
}
public void setResult(ResultBean result) {
this.result = result;
}
public static class ResultBean {
/**
* res_data : {"product":{"area":{"id":false,"name":false},"image_medium":"http://192.168.2.111:8069/linkloving_app_api/get_product_image?product_id=48204","id":46537,"product_name":" HS310-成品(星夜·追梦人)-RT-CN"},"theoretical_qty":-387,"product_qty":0}
* res_msg :
* res_code : 1
*/
private ResDataBean res_data;
private String res_msg;
private int res_code;
public ResDataBean getRes_data() {
return res_data;
}
public void setRes_data(ResDataBean res_data) {
this.res_data = res_data;
}
public String getRes_msg() {
return res_msg;
}
public void setRes_msg(String res_msg) {
this.res_msg = res_msg;
}
public int getRes_code() {
return res_code;
}
public void setRes_code(int res_code) {
this.res_code = res_code;
}
public static class ResDataBean implements Serializable{
public String getError() {
return error;
}
public void setError(String error) {
this.error = error;
}
/**
* product : {"area":{"id":false,"name":false},"image_medium":"http://192.168.2.111:8069/linkloving_app_api/get_product_image?product_id=48204","id":46537,"product_name":" HS310-成品(星夜·追梦人)-RT-CN"}
* theoretical_qty : -387
* product_qty : 0
*/
private String error ;
private ProductBean product;
private int theoretical_qty;
private int product_qty;
public ProductBean getProduct() {
return product;
}
public void setProduct(ProductBean product) {
this.product = product;
}
public int getTheoretical_qty() {
return theoretical_qty;
}
public void setTheoretical_qty(int theoretical_qty) {
this.theoretical_qty = theoretical_qty;
}
public int getProduct_qty() {
return product_qty;
}
public void setProduct_qty(int product_qty) {
this.product_qty = product_qty;
}
public static class ProductBean {
/**
* area : {"id":false,"name":false}
* image_medium : http://192.168.2.111:8069/linkloving_app_api/get_product_image?product_id=48204
* id : 46537
* product_name : HS310-成品(星夜·追梦人)-RT-CN
*/
private AreaBean area;
private String image_medium;
private int id;
private String product_name;
public AreaBean getArea() {
return area;
}
public void setArea(AreaBean area) {
this.area = area;
}
public String getImage_medium() {
return image_medium;
}
public void setImage_medium(String image_medium) {
this.image_medium = image_medium;
}
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getProduct_name() {
return product_name;
}
public void setProduct_name(String product_name) {
this.product_name = product_name;
}
public static class AreaBean {
/**
* id : false
* name : false
*/
private Object id;
private Object name;
public Object getId() {
if (id instanceof Boolean){
id = 0 ;
}if (id instanceof Double){
id = Integer.parseInt(new DecimalFormat("0").format(id));
}
return id;
}
public void setId(int id) {
this.id = id;
}
public Object getName() {
if (name instanceof Boolean){
name = "";
}
return name;
}
public void setName(String name) {
this.name = name;
}
}
}
}
}
}
|
[
"997399759@qq.com"
] |
997399759@qq.com
|
3c582fb06cd6b1f22894af4bc807a2badd1d3231
|
cbc61ffb33570a1bc55bb1e754510192b0366de2
|
/ole-common/ole-utility/src/main/java/org/kuali/ole/docstore/model/xmlpojo/work/license/onixpl/TimePointIDTypeCode.java
|
f2965540817a4a88bdc0eac59925ddea2db05aea
|
[
"ECL-2.0"
] |
permissive
|
VU-libtech/OLE-INST
|
42b3656d145a50deeb22f496f6f430f1d55283cb
|
9f5efae4dfaf810fa671c6ac6670a6051303b43d
|
refs/heads/master
| 2021-07-08T11:01:19.692655
| 2015-05-15T14:40:50
| 2015-05-15T14:40:50
| 24,459,494
| 1
| 0
|
ECL-2.0
| 2021-04-26T17:01:11
| 2014-09-25T13:40:33
|
Java
|
UTF-8
|
Java
| false
| false
| 1,528
|
java
|
package org.kuali.ole.docstore.model.xmlpojo.work.license.onixpl;
import javax.xml.bind.annotation.XmlEnum;
import javax.xml.bind.annotation.XmlEnumValue;
import javax.xml.bind.annotation.XmlType;
/**
* Created by IntelliJ IDEA.
* User: Pranitha
* Date: 5/30/12
* Time: 1:18 PM
* To change this template use File | Settings | File Templates.
* <p/>
* <p>Java class for TimePointIDTypeCode.
* <p/>
* <p>The following schema fragment specifies the expected content contained within this class.
* <p/>
* <pre>
* <simpleType name="TimePointIDTypeCode">
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
* <enumeration value="onixPL:YYYYMMDD"/>
* </restriction>
* </simpleType>
* </pre>
*/
@XmlType(name = "TimePointIDTypeCode", namespace = "http://www.editeur.org/onix-pl")
@XmlEnum
public enum TimePointIDTypeCode {
/**
* A date according to the Gregorian Calendar expressed as year month day.
*/
@XmlEnumValue("onixPL:YYYYMMDD")
ONIX_PL_YYYYMMDD("onixPL:YYYYMMDD");
private final String value;
TimePointIDTypeCode(String v) {
value = v;
}
public String value() {
return value;
}
public static TimePointIDTypeCode fromValue(String v) {
for (TimePointIDTypeCode c : TimePointIDTypeCode.values()) {
if (c.value.equals(v)) {
return c;
}
}
throw new IllegalArgumentException(v);
}
}
|
[
"david.lacy@villanova.edu"
] |
david.lacy@villanova.edu
|
27dd5d3006747247e80c676d504dd404a96d43ba
|
40665051fadf3fb75e5a8f655362126c1a2a3af6
|
/ibinti-bugvm/389dda9293e5de1e85cc1b1250b3ce1dc7486a67/4954/AsymmetricCipherKeyPairGenerator.java
|
919f92b3f113a1a70735ecd785201ad486ddf363
|
[] |
no_license
|
fermadeiral/StyleErrors
|
6f44379207e8490ba618365c54bdfef554fc4fde
|
d1a6149d9526eb757cf053bc971dbd92b2bfcdf1
|
refs/heads/master
| 2020-07-15T12:55:10.564494
| 2019-10-24T02:30:45
| 2019-10-24T02:30:45
| 205,546,543
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 591
|
java
|
package com.bugvm.bouncycastle.crypto;
/**
* interface that a public/private key pair generator should conform to.
*/
public interface AsymmetricCipherKeyPairGenerator
{
/**
* intialise the key pair generator.
*
* @param param the parameters the key pair is to be initialised with.
*/
public void init(KeyGenerationParameters param);
/**
* return an AsymmetricCipherKeyPair containing the generated keys.
*
* @return an AsymmetricCipherKeyPair containing the generated keys.
*/
public AsymmetricCipherKeyPair generateKeyPair();
}
|
[
"fer.madeiral@gmail.com"
] |
fer.madeiral@gmail.com
|
5c6cfed86340ada4a2c8d3043318b0f2db64d8a1
|
f5049214ff99cdd7c37da74619b60ac4a26fc6ba
|
/runtime/security/eu.agno3.runtime.security/src/main/java/eu/agno3/runtime/security/password/internal/DateMatcher.java
|
564ae4b5271fa019056ea4011ec9e5497e55cf15
|
[
"BSD-3-Clause",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
AgNO3/code
|
d17313709ee5db1eac38e5811244cecfdfc23f93
|
b40a4559a10b3e84840994c3fd15d5f53b89168f
|
refs/heads/main
| 2023-07-28T17:27:53.045940
| 2021-09-17T14:25:01
| 2021-09-17T14:31:41
| 407,567,058
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,306
|
java
|
/**
* © 2015 AgNO3 Gmbh & Co. KG
* All right reserved.
*
* Created: 21.03.2015 by mbechler
*/
package eu.agno3.runtime.security.password.internal;
import java.util.Collection;
import java.util.LinkedList;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* @author mbechler
*
*/
public class DateMatcher implements PasswordMatcher {
private static final Pattern YEAR_PATTERN = Pattern.compile("19\\d\\d|200\\d|201\\d/"); //$NON-NLS-1$
private static final Pattern DATE_WITHOUT_SEP_PATTERN = Pattern.compile("\\d{4,8}"); //$NON-NLS-1$
private static final Pattern DATE_SEP_PREFIX_PATTERN = Pattern
.compile("(\\d{1,2})(\\s|-|/|\\\\|_|\\.)(\\d{1,2})\\2(19\\d{2}|200\\d|201\\d|\\d{2})"); //$NON-NLS-1$
private static final Pattern DATE_SEP_SUFFIX_PATTERN = Pattern
.compile("(19\\d{2}|200\\d|201\\d|\\d{2})(\\s|-|/|\\\\|_|\\.)(\\d{1,2})\\2(\\d{1,2})"); //$NON-NLS-1$
/**
* {@inheritDoc}
*
* @see eu.agno3.runtime.security.password.internal.PasswordMatcher#match(java.lang.String)
*/
@Override
public Collection<MatchEntry> match ( String password ) {
Collection<MatchEntry> matches = new LinkedList<>();
addYearMatches(matches, password);
addDateWithSepMatches(matches, password);
addDateWithoutSepMatches(matches, password);
return matches;
}
/**
* @param matches
* @param password
*/
private static void addDateWithoutSepMatches ( Collection<MatchEntry> matches, String password ) {
Matcher matcher = DATE_WITHOUT_SEP_PATTERN.matcher(password);
int pos = 0;
while ( matcher.find(pos) ) {
int newPos = -1;
if ( matcher.group().length() <= 6 ) {
// try 2 digit year suffix
newPos = Math.max(
newPos,
tryMatchWithoutSep(
matches,
password,
matcher,
pos,
matcher.group().substring(0, matcher.group().length() - 2),
Integer.parseInt(matcher.group().substring(matcher.group().length() - 2)),
true));
// try 2 digit year prefix
newPos = Math.max(
newPos,
tryMatchWithoutSep(
matches,
password,
matcher,
pos,
matcher.group().substring(2),
Integer.parseInt(matcher.group().substring(0, 2)),
true));
}
else {
// try 4 digit year suffix
newPos = Math.max(
newPos,
tryMatchWithoutSep(
matches,
password,
matcher,
pos,
matcher.group().substring(0, matcher.group().length() - 4),
Integer.parseInt(matcher.group().substring(matcher.group().length() - 4)),
false));
// try 4 digit year prefix
newPos = Math.max(
newPos,
tryMatchWithoutSep(
matches,
password,
matcher,
pos,
matcher.group().substring(4),
Integer.parseInt(matcher.group().substring(0, 4)),
false));
}
if ( newPos < 0 ) {
pos += 1;
}
else {
pos = newPos;
}
}
}
/**
* @param matches
* @param password
* @param matcher
* @param pos
* @param dayOrMonth1
* @param dayOrMonth2
* @param year
* @return
*/
private static int tryMatchWithoutSep ( Collection<MatchEntry> matches, String password, Matcher matcher, int pos, String dayAndMonth, int year,
boolean shortYear ) {
int dayOrMonth1;
int dayOrMonth2;
if ( dayAndMonth.length() == 2 ) {
dayOrMonth1 = Integer.parseInt(dayAndMonth.substring(0, 1));
dayOrMonth2 = Integer.parseInt(dayAndMonth.substring(1));
}
else if ( dayAndMonth.length() >= 3 ) {
dayOrMonth1 = Integer.parseInt(dayAndMonth.substring(0, 2));
dayOrMonth2 = Integer.parseInt(dayAndMonth.substring(2));
}
else {
return -1;
}
if ( validDate(dayOrMonth1, dayOrMonth2, year, shortYear) ) {
matches.add(new DateMatchEntry(password.substring(matcher.start(), matcher.end()), matcher.start(), year, false));
return matcher.end();
}
return -1;
}
/**
* @param matches
* @param password
*/
private static void addDateWithSepMatches ( Collection<MatchEntry> matches, String password ) {
Matcher matcher = DATE_SEP_PREFIX_PATTERN.matcher(password);
int pos = 0;
while ( matcher.find(pos) ) {
int dayOrMonth1 = Integer.parseInt(matcher.group(1));
int dayOrMonth2 = Integer.parseInt(matcher.group(3));
int year = Integer.parseInt(matcher.group(4));
if ( validDate(dayOrMonth1, dayOrMonth2, year, year <= 100) ) {
matches.add(new DateMatchEntry(password.substring(matcher.start(), matcher.end()), matcher.start(), year, true));
}
pos = matcher.end();
}
pos = 0;
matcher = DATE_SEP_SUFFIX_PATTERN.matcher(password);
while ( matcher.find(pos) ) {
int dayOrMonth1 = Integer.parseInt(matcher.group(1));
int dayOrMonth2 = Integer.parseInt(matcher.group(3));
int year = Integer.parseInt(matcher.group(4));
if ( validDate(dayOrMonth1, dayOrMonth2, year, year <= 100) ) {
matches.add(new DateMatchEntry(password.substring(matcher.start(), matcher.end()), matcher.start(), year, true));
}
pos = matcher.end();
}
}
/**
* @param dayOrMonth1
* @param dayOrMonth2
* @param year
* @return
*/
private static boolean validDate ( int dayOrMonth1, int dayOrMonth2, int year, boolean shortYear ) {
if ( dayOrMonth1 > 31 || dayOrMonth2 > 31 ) {
return false;
}
if ( dayOrMonth1 > 12 && dayOrMonth2 > 12 ) {
return false;
}
// zxcvbn checks for year range in 1900 - 2019
if ( !shortYear && ( year < 1900 || year > 2019 ) ) {
return false;
}
return true;
}
/**
* @param matches
* @param password
*/
private static void addYearMatches ( Collection<MatchEntry> matches, String password ) {
Matcher matcher = YEAR_PATTERN.matcher(password);
int pos = 0;
while ( matcher.find(pos) ) {
matches.add(new MatchEntry(password.substring(matcher.start(), matcher.end()), matcher.start(), MatchType.YEAR));
pos = matcher.end();
}
}
}
|
[
"bechler@agno3.eu"
] |
bechler@agno3.eu
|
099015fb9a6dbbbbf4310ac462d807b0e512504f
|
61cf3109eaf4561e071d93f9daf0d3cf9155ca9f
|
/src/com/rbt/index/testSearch.java
|
c1e793fa00597a223abdc0ad6337f7f5e83e4846
|
[] |
no_license
|
haoouwen/epf
|
b620fe05c93db178a122cfef778d31c036a2a822
|
abe0f1ed564f33dcf766591c5f9b04ce2b5e8094
|
refs/heads/master
| 2021-01-19T13:46:10.278247
| 2017-08-20T10:40:12
| 2017-08-20T10:40:12
| 100,859,509
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,034
|
java
|
package com.rbt.index;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import org.apache.lucene.queryParser.ParseException;
import org.apache.lucene.search.highlight.InvalidTokenOffsetsException;
import com.browseengine.bobo.api.BrowseException;
public class testSearch {
public static void main(String args[]) throws IOException, ParseException, InvalidTokenOffsetsException, BrowseException {
List paraList = new ArrayList();
ParaModel pm = new ParaModel();
/*
String[] fields = {"title","attr_desc"};
pm.setSearch_type(Constants.MULTI);
pm.setFields(fields);
pm.setSearch_value("2346564772");
*/
// String[] fields = {"cat_id"};
// pm.setFields(fields);
// pm.setSearch_type(Constants.MULTI);
// pm.setSearch_value("1121137758");
pm.setSearch_key("cat_name");
pm.setSearch_type(Constants.NORMAL);
pm.setSearch_value("女双肩包");
paraList.add(pm);
// lucene排序
// Sort sort=new Sort();
// SortField sf=new SortField("supply_id", SortField.STRING,true);//升序
// sort.setSort(new SortField[]{sf});
List list = new SearchIndex("goods").search(paraList, null, 1, 20);
System.out.println(list.size()+"===========");
// 循环输出
// List list = new SearchIndex("categoryattr").search(paraList, null, 0, 0);
System.out.println("我的查询结果列表是:");
// System.out.println(list.toString());
for (int i = 0; i < list.size(); i++) {
HashMap listMap=(HashMap)list.get(i);
String attr_desc="",cat_attr="",supply_id="",title="",area_attr="";
if(listMap.get("goods_name")!=null){
area_attr=listMap.get("goods_name").toString();
}
if(listMap.get("cat_attr")!=null){
cat_attr=listMap.get("cat_attr").toString();
}
System.out.println(title+"========="+cat_attr+"======");
}
List lista = new SearchIndex("goods").catInfoNum(paraList);
System.out.println(lista);
//new SearchIndex("supply").areaInfoNum(paraList,"1111111111");
}
}
|
[
"Administrator@USER-20170608NM"
] |
Administrator@USER-20170608NM
|
14bff07818921c4d1bbb5823558551b5ceaaa3f5
|
092c76fcc6c411ee77deef508e725c1b8277a2fe
|
/hybris/bin/ext-accelerator/b2bpunchout/src/de/hybris/platform/b2b/punchout/PunchOutUtils.java
|
be52162801f70ab7a3fdda9cfdeaff9adac3dc60
|
[
"MIT"
] |
permissive
|
BaggaShivanshu2/hybris-bookstore-tutorial
|
4de5d667bae82851fe4743025d9cf0a4f03c5e65
|
699ab7fd8514ac56792cb911ee9c1578d58fc0e3
|
refs/heads/master
| 2022-11-28T12:15:32.049256
| 2020-08-05T11:29:14
| 2020-08-05T11:29:14
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,080
|
java
|
/*
* [y] hybris Platform
*
* Copyright (c) 2000-2016 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*
*/
package de.hybris.platform.b2b.punchout;
import java.io.FileNotFoundException;
import java.io.InputStream;
import java.io.StringWriter;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Marshaller;
import javax.xml.bind.PropertyException;
import javax.xml.bind.Unmarshaller;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.sax.SAXSource;
import org.apache.commons.codec.binary.Base64;
import org.cxml.CXML;
import org.xml.sax.InputSource;
import org.xml.sax.XMLReader;
import com.sun.org.apache.xerces.internal.impl.Constants;
public class PunchOutUtils
{
private static final String XML_WITHOUT_STANDALONE = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
private static final String DOCTYPE = "<!DOCTYPE cXML SYSTEM \"http://xml.cXML.org/schemas/cXML/1.2.024/cXML.dtd\">";
protected static final String LOAD_EXTERNAL_DTD = Constants.XERCES_FEATURE_PREFIX + Constants.LOAD_EXTERNAL_DTD_FEATURE;
protected static final String EXTERNAL_GENERAL_ENTITIES = Constants.SAX_FEATURE_PREFIX
+ Constants.EXTERNAL_GENERAL_ENTITIES_FEATURE;
protected static final String EXTERNAL_PARAMETER_ENTITIES = Constants.SAX_FEATURE_PREFIX
+ Constants.EXTERNAL_PARAMETER_ENTITIES_FEATURE;
public static CXML unmarshallCXMLFromFile(final String relativeFilePath) throws FileNotFoundException
{
final InputStream fileInputStream = PunchOutUtils.class.getClassLoader().getResourceAsStream(relativeFilePath);
if (fileInputStream == null)
{
throw new FileNotFoundException("Could not find file [" + relativeFilePath + "]");
}
try
{
final JAXBContext jaxbContext = JAXBContext.newInstance(CXML.class);
final Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
final SAXParserFactory spf = SAXParserFactory.newInstance();
spf.setValidating(false);
spf.setFeature(LOAD_EXTERNAL_DTD, false);
spf.setFeature(EXTERNAL_GENERAL_ENTITIES, false);
spf.setFeature(EXTERNAL_PARAMETER_ENTITIES, false);
spf.setXIncludeAware(false);
final SAXParser parser = spf.newSAXParser();
final XMLReader xmlReader = parser.getXMLReader();
final SAXSource source = new SAXSource(xmlReader, new InputSource(fileInputStream));
return (CXML) unmarshaller.unmarshal(source);
}
catch (final Exception e)
{
throw new PunchOutException(PunchOutResponseCode.INTERNAL_SERVER_ERROR, e.getMessage(), e);
}
}
public static String marshallFromBeanTree(final CXML cxml)
{
final StringWriter writer = new StringWriter();
try
{
final JAXBContext context = JAXBContext.newInstance(CXML.class);
final Marshaller m = context.createMarshaller();
removeStandalone(m);
setHeader(m);
m.marshal(cxml, writer);
}
catch (final JAXBException e)
{
throw new PunchOutException(e.getErrorCode(), e.getMessage(), e);
}
// FIXME - just testing - do it properly
String xml = writer.toString();
xml = XML_WITHOUT_STANDALONE + DOCTYPE + xml;
return xml;
}
public static void removeStandalone(final Marshaller marshaller) throws PropertyException
{
marshaller.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE);
}
public static void setHeader(final Marshaller m) throws PropertyException
{
m.setProperty("com.sun.xml.internal.bind.xmlHeaders", XML_WITHOUT_STANDALONE + DOCTYPE);
}
/**
* Transforms a CXML into a Base64 String.
*
* @param cxml
* the cxml object.
* @return Base64 String
*/
public static String transformCXMLToBase64(final CXML cxml)
{
final String cXML = marshallFromBeanTree(cxml);
final String cXMLEncoded = Base64.encodeBase64String(cXML.getBytes());
return cXMLEncoded;
}
}
|
[
"xelilim@hotmail.com"
] |
xelilim@hotmail.com
|
781bc66deb7b66870e046dec08bc4380c80b053c
|
4223c2c2353743f82c5089227b0efed5d92df51c
|
/core/core-service/src/main/java/com/dreameddeath/core/service/model/common/ServiceInfoVersionInstanceDescription.java
|
8e903cf857adc446b0223c649e9b4224c6df92d1
|
[] |
no_license
|
dreameddeath/couchbase-testing
|
8623f168c327c01eda140e1329fe5b396791b636
|
127c8a8ba0bfc82f521d607f7640d567bb08f195
|
refs/heads/master
| 2021-01-23T15:54:17.274829
| 2018-09-03T00:16:17
| 2018-09-03T00:16:17
| 17,785,813
| 7
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,556
|
java
|
/*
*
* * Copyright Christophe Jeunesse
* *
* * 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.dreameddeath.core.service.model.common;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.Collection;
import java.util.Collections;
import java.util.Set;
import java.util.TreeSet;
/**
* Created by Christophe Jeunesse on 02/10/2015.
*/
public class ServiceInfoVersionInstanceDescription {
@JsonProperty("uid")
private String uid;
@JsonProperty("address")
private String address;
@JsonProperty("port")
private Integer port;
@JsonProperty("uriSpec")
private String uriSpec;
@JsonProperty("daemonUid")
private String daemonUid;
@JsonProperty("webServerUid")
private String webServerUid;
@JsonProperty("protocols")
private Set<String> protocols=new TreeSet<>();
public String getUid() {
return uid;
}
public void setUid(String uid) {
this.uid = uid;
}
public String getAddress() {
return address;
}
public void setAddress(String address) {
this.address = address;
}
public Integer getPort() {
return port;
}
public void setPort(Integer port) {
this.port = port;
}
public String getUriSpec() {
return uriSpec;
}
public void setUriSpec(String uriSpec) {
this.uriSpec = uriSpec;
}
public String getDaemonUid() {
return daemonUid;
}
public void setDaemonUid(String daemonUid) {
this.daemonUid = daemonUid;
}
public String getWebServerUid() {
return webServerUid;
}
public void setWebServerUid(String webServerUid) {
this.webServerUid = webServerUid;
}
public Set<String> getProtocols() {
return Collections.unmodifiableSet(protocols);
}
public void setProtocols(Collection<String> protocols) {
this.protocols.clear();
this.protocols.addAll(protocols);
}
}
|
[
"christophejeunesse@hotmail.com"
] |
christophejeunesse@hotmail.com
|
7d99cbfbfc3c73dcc5fa7d624d52a5c0f3184629
|
d7c5121237c705b5847e374974b39f47fae13e10
|
/airspan.netspan/src/main/java/Netspan/NBI_15_5/Server/CtsGetResponse.java
|
849c93e727ee0c980170836701141fbeb0e6803d
|
[] |
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,568
|
java
|
package Netspan.NBI_15_5.Server;
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="CtsGetResult" type="{http://Airspan.Netspan.WebServices}CtsGetResult" minOccurs="0"/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "", propOrder = {
"ctsGetResult"
})
@XmlRootElement(name = "CtsGetResponse")
public class CtsGetResponse {
@XmlElement(name = "CtsGetResult")
protected CtsGetResult ctsGetResult;
/**
* Gets the value of the ctsGetResult property.
*
* @return
* possible object is
* {@link CtsGetResult }
*
*/
public CtsGetResult getCtsGetResult() {
return ctsGetResult;
}
/**
* Sets the value of the ctsGetResult property.
*
* @param value
* allowed object is
* {@link CtsGetResult }
*
*/
public void setCtsGetResult(CtsGetResult value) {
this.ctsGetResult = value;
}
}
|
[
"build.Airspan.com"
] |
build.Airspan.com
|
8f3bab8be88c6e30aa5615371e150dd84602c026
|
7559bead0c8a6ad16f016094ea821a62df31348a
|
/src/com/vmware/vim25/VmAutoRenameEvent.java
|
82f3a929305a7f33b714e6c112665422380b4e9d
|
[] |
no_license
|
ZhaoxuepengS/VsphereTest
|
09ba2af6f0a02d673feb9579daf14e82b7317c36
|
59ddb972ce666534bf58d84322d8547ad3493b6e
|
refs/heads/master
| 2021-07-21T13:03:32.346381
| 2017-11-01T12:30:18
| 2017-11-01T12:30:18
| 109,128,993
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,038
|
java
|
package com.vmware.vim25;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
/**
* <p>Java class for VmAutoRenameEvent complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="VmAutoRenameEvent">
* <complexContent>
* <extension base="{urn:vim25}VmEvent">
* <sequence>
* <element name="oldName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* <element name="newName" type="{http://www.w3.org/2001/XMLSchema}string"/>
* </sequence>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "VmAutoRenameEvent", propOrder = {
"oldName",
"newName"
})
public class VmAutoRenameEvent
extends VmEvent
{
@XmlElement(required = true)
protected String oldName;
@XmlElement(required = true)
protected String newName;
/**
* Gets the value of the oldName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getOldName() {
return oldName;
}
/**
* Sets the value of the oldName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setOldName(String value) {
this.oldName = value;
}
/**
* Gets the value of the newName property.
*
* @return
* possible object is
* {@link String }
*
*/
public String getNewName() {
return newName;
}
/**
* Sets the value of the newName property.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setNewName(String value) {
this.newName = value;
}
}
|
[
"495149700@qq.com"
] |
495149700@qq.com
|
5572967597cc81a3371f500bad8bad9d2d9f43c9
|
8526b8ef292657e24d72571905a5f56ec1a2ff2f
|
/core/src/main/java/org/apache/calcite/adapter/enumerable/EnumerableFilterToCalcRule.java
|
db260a011f9b7c6e89c75268e2e9552df5433235
|
[
"Apache-2.0",
"MIT"
] |
permissive
|
jh3507/calcite
|
cac7e8f08ddefe7e80f12d97d842a6bc1f0d8938
|
532f903fe495d741053619c13a51537e57dcd619
|
refs/heads/master
| 2021-06-27T17:43:24.208096
| 2020-10-03T23:33:29
| 2020-10-07T17:49:59
| 162,769,449
| 2
| 1
|
Apache-2.0
| 2018-12-22T00:32:51
| 2018-12-22T00:32:51
| null |
UTF-8
|
Java
| false
| false
| 2,911
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to you under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.calcite.adapter.enumerable;
import org.apache.calcite.plan.RelOptRuleCall;
import org.apache.calcite.plan.RelRule;
import org.apache.calcite.rel.RelNode;
import org.apache.calcite.rel.type.RelDataType;
import org.apache.calcite.rex.RexBuilder;
import org.apache.calcite.rex.RexProgram;
import org.apache.calcite.rex.RexProgramBuilder;
import org.apache.calcite.tools.RelBuilderFactory;
/** Variant of {@link org.apache.calcite.rel.rules.FilterToCalcRule} for
* {@link org.apache.calcite.adapter.enumerable.EnumerableConvention enumerable calling convention}.
*
* @see EnumerableRules#ENUMERABLE_FILTER_TO_CALC_RULE */
public class EnumerableFilterToCalcRule
extends RelRule<EnumerableFilterToCalcRule.Config> {
/** Creates an EnumerableFilterToCalcRule. */
protected EnumerableFilterToCalcRule(Config config) {
super(config);
}
@Deprecated // to be removed before 2.0
public EnumerableFilterToCalcRule(RelBuilderFactory relBuilderFactory) {
this(Config.DEFAULT.withRelBuilderFactory(relBuilderFactory)
.as(Config.class));
}
@Override public void onMatch(RelOptRuleCall call) {
final EnumerableFilter filter = call.rel(0);
final RelNode input = filter.getInput();
// Create a program containing a filter.
final RexBuilder rexBuilder = filter.getCluster().getRexBuilder();
final RelDataType inputRowType = input.getRowType();
final RexProgramBuilder programBuilder =
new RexProgramBuilder(inputRowType, rexBuilder);
programBuilder.addIdentity();
programBuilder.addCondition(filter.getCondition());
final RexProgram program = programBuilder.getProgram();
final EnumerableCalc calc = EnumerableCalc.create(input, program);
call.transformTo(calc);
}
/** Rule configuration. */
public interface Config extends RelRule.Config {
Config DEFAULT = EMPTY
.withOperandSupplier(b ->
b.operand(EnumerableFilter.class).anyInputs())
.as(Config.class);
@Override default EnumerableFilterToCalcRule toRule() {
return new EnumerableFilterToCalcRule(this);
}
}
}
|
[
"jhyde@apache.org"
] |
jhyde@apache.org
|
95d96a46ac3313d02efd60594c0ca88594c24b78
|
df4eb7b3e3d53c85108d2d0d412aa85d6ffb2c76
|
/main/java/dtx/src/main/java/com/oodrive/nuage/dtx/SyncEventHandler.java
|
a2451da2dc7e2e53d13be155eb6401c02ccaa3f8
|
[] |
no_license
|
cyrinux/eguan
|
8526c418480f30a3a3ccd5eca2237a68fd2bbc8f
|
9e20281655838c8c300f1aa97ad03448e16328c8
|
refs/heads/master
| 2021-01-17T20:21:35.000299
| 2015-02-19T15:22:46
| 2015-02-19T15:22:46
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,899
|
java
|
package com.oodrive.nuage.dtx;
/*
* #%L
* Project eguan
* %%
* Copyright (C) 2012 - 2015 Oodrive
* %%
* 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.
* #L%
*/
import static com.oodrive.nuage.dtx.DtxResourceManagerState.LATE;
import static com.oodrive.nuage.dtx.DtxResourceManagerState.SYNCHRONIZING;
import static com.oodrive.nuage.dtx.DtxResourceManagerState.UNDETERMINED;
import java.util.Collections;
import java.util.Iterator;
import java.util.Map;
import java.util.UUID;
import javax.annotation.Nonnull;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.common.eventbus.AllowConcurrentEvents;
import com.google.common.eventbus.Subscribe;
import com.oodrive.nuage.dtx.events.DtxResourceManagerEvent;
/**
* Event handler for triggering synchronization actions.
*
* @author oodrive
* @author pwehrle
*
*/
public final class SyncEventHandler {
private static final Logger LOGGER = LoggerFactory.getLogger(SyncEventHandler.class);
/**
* Intercepts {@link DtxResourceManagerEvent}s for {@link DtxResourceManagerState#LATE} resource managers and
* triggers synchronization.
*
* @param event
* the posted {@link DtxResourceManagerEvent}
*/
@Subscribe
@AllowConcurrentEvents
public final void handleDtxResourceManagerEvent(@Nonnull final DtxResourceManagerEvent event) {
final DtxResourceManagerState newState = event.getNewState();
if (LATE != newState) {
// not late, i.e. do not trigger synchronization
return;
}
final UUID resId = event.getResourceManagerId();
final DtxManager dtxManager = event.getSource();
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Triggering synchronization; node=" + dtxManager.getNodeId() + ", resourceId=" + resId);
}
final TransactionManager txManager = dtxManager.getTxManager();
if (txManager == null) {
LOGGER.warn("Transaction manager is null, abandoning synchronization");
return;
}
txManager.setResManagerSyncState(resId, SYNCHRONIZING);
try {
long lastLocalTxId = txManager.getLastCompleteTxIdForResMgr(resId);
final Map<DtxNode, Long> updateMap = dtxManager.getClusterMapInfo(resId, Long.valueOf(lastLocalTxId));
if (updateMap.isEmpty()) {
return;
}
final long maxTxId = Collections.max(updateMap.values()).longValue();
// TODO: choose update source more wisely
final Iterator<DtxNode> nodeIter = updateMap.keySet().iterator();
while (nodeIter.hasNext() && (lastLocalTxId < maxTxId)) {
final DtxNode targetNode = nodeIter.next();
final long targetNodeLastTxId = updateMap.get(targetNode).longValue();
if (targetNodeLastTxId > lastLocalTxId) {
lastLocalTxId = dtxManager
.synchronizeWithNode(resId, targetNode, lastLocalTxId, targetNodeLastTxId);
}
}
}
finally {
if (LOGGER.isDebugEnabled()) {
LOGGER.debug("Synchronization finished; node=" + dtxManager.getNodeId() + ", resourceId=" + resId);
}
txManager.setResManagerSyncState(resId, UNDETERMINED);
}
}
}
|
[
"p.wehrle@oodrive.com"
] |
p.wehrle@oodrive.com
|
e0b1bbd913d1cc2e7cae287d3790e809a0533019
|
192fc75e245f8834861c2a8dbe9714daa2ec6c2e
|
/CWE80_XSS/CWE80_XSS__Servlet_PropertiesFile_17.java
|
bf5caf01efa887a8eda94af5b57df00fecba3ed5
|
[] |
no_license
|
Carlosboie/Playtech
|
6f8bb72efc6769612a0cb967a9130f6db78d19fc
|
684ae94b9b0ff069c8561157227b5b43a7ca1320
|
refs/heads/master
| 2021-05-27T11:05:24.157218
| 2012-09-12T08:08:30
| 2012-09-12T08:08:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,876
|
java
|
/* TEMPLATE GENERATED TESTCASE FILE
Filename: CWE80_XSS__Servlet_PropertiesFile_17.java
Label Definition File: CWE80_XSS__Servlet.label.xml
Template File: sources-sink-17.tmpl.java
*/
/*
* @description
* CWE: 80 Cross Site Scripting (XSS)
* BadSource: PropertiesFile Read a value from a .properties file (in property named data)
* GoodSource: A hardcoded string
* BadSink: Servlet querystring parameter not sanitized
* Flow Variant: 17 Control flow: for loops
*
* */
package testcases.CWE80_XSS;
import testcasesupport.*;
import javax.servlet.http.*;
import java.util.Properties;
import java.io.FileInputStream;
import java.io.IOException;
import java.util.logging.Logger;
public class CWE80_XSS__Servlet_PropertiesFile_17 extends AbstractTestCaseServlet
{
/* uses badsource and badsink */
public void bad(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
/* We need to have one source outside of a for loop in order
to prevent the Java compiler from generating an error because
data is uninitialized */
Logger log_bad = Logger.getLogger("local-logger");
data = ""; /* init data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try {
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
data = props.getProperty("data");
}
catch( IOException ioe )
{
log_bad.warning("Error with stream reading");
}
finally {
/* clean up stream reading objects */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
log_bad.warning("Error closing buffread");
}
}
for(int for_index_i = 0; for_index_i < 0; for_index_i++)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger");
/* FIX: Use a hardcoded string */
data = "foo";
}
if (data != null)
{
/* POTENTIAL FLAW: data not validated */
response.getWriter().println("<br>bad() - Parameter name has value " + data);
}
}
/* goodG2B() - use goodsource and badsink by reversing the block outside the
for statement with the one in the for statement */
private void goodG2B(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
String data;
java.util.logging.Logger log_good = java.util.logging.Logger.getLogger("local-logger");
/* FIX: Use a hardcoded string */
data = "foo";
for(int for_index_i = 0; for_index_i < 0; for_index_i++)
{
/* INCIDENTAL: CWE 561 Dead Code, the code below will never run */
Logger log_bad = Logger.getLogger("local-logger");
data = ""; /* init data */
/* retrieve the property */
Properties props = new Properties();
FileInputStream finstr = null;
try
{
finstr = new FileInputStream("../common/config.properties");
props.load(finstr);
data = props.getProperty("data");
}
catch( IOException ioe )
{
log_bad.warning("Error with stream reading");
}
finally
{
/* clean up stream reading objects */
try {
if( finstr != null )
{
finstr.close();
}
}
catch( IOException ioe )
{
log_bad.warning("Error closing buffread");
}
}
}
if (data != null)
{
/* POTENTIAL FLAW: data not validated */
response.getWriter().println("<br>bad() - Parameter name has value " + data);
}
}
public void good(HttpServletRequest request, HttpServletResponse response) throws Throwable
{
goodG2B(request, response);
}
/* Below is the main(). It is only used when building this testcase on
its own for testing or for building a binary to use in testing binary
analysis tools. It is not used when compiling all the testcases as one
application, which is how source code analysis tools are tested. */
public static void main(String[] args) throws ClassNotFoundException,
InstantiationException, IllegalAccessException
{
mainFromParent(args);
}
}
|
[
"amitf@checkmarx.com"
] |
amitf@checkmarx.com
|
b4cf1086a9cc585e64b9f1a5ade0ff4081210071
|
8dfd77caab244debdf56f66b6465e06732364cd8
|
/projects/jasn1-compiler/src/test/java-gen/org/openmuc/jasn1/compiler/rspdefinitions/DpProprietaryData.java
|
535d195e7c5c3706a2541c19d3a71b393f48e245
|
[] |
no_license
|
onderson/jasn1
|
d195c568b2bf62e9ef558d1caea6e228239ad848
|
6df87b86391360758fa559d55b9aa6fb98c7f507
|
refs/heads/master
| 2021-08-18T16:30:05.353553
| 2017-07-19T18:39:08
| 2017-07-19T18:39:08
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,513
|
java
|
/**
* This class file was automatically generated by jASN1 v1.8.2-SNAPSHOT (http://www.openmuc.org)
*/
package org.openmuc.jasn1.compiler.rspdefinitions;
import java.io.IOException;
import java.io.EOFException;
import java.io.InputStream;
import java.util.List;
import java.util.ArrayList;
import java.util.Iterator;
import java.io.UnsupportedEncodingException;
import java.math.BigInteger;
import java.io.Serializable;
import org.openmuc.jasn1.ber.*;
import org.openmuc.jasn1.ber.types.*;
import org.openmuc.jasn1.ber.types.string.*;
import org.openmuc.jasn1.compiler.pkix1explicit88.Certificate;
import org.openmuc.jasn1.compiler.pkix1explicit88.CertificateList;
import org.openmuc.jasn1.compiler.pkix1explicit88.Time;
import org.openmuc.jasn1.compiler.pkix1implicit88.SubjectKeyIdentifier;
public class DpProprietaryData implements Serializable {
private static final long serialVersionUID = 1L;
public static final BerTag tag = new BerTag(BerTag.UNIVERSAL_CLASS, BerTag.CONSTRUCTED, 16);
public byte[] code = null;
public BerObjectIdentifier dpOid = null;
public DpProprietaryData() {
}
public DpProprietaryData(byte[] code) {
this.code = code;
}
public DpProprietaryData(BerObjectIdentifier dpOid) {
this.dpOid = dpOid;
}
public int encode(BerByteArrayOutputStream os) throws IOException {
return encode(os, true);
}
public int encode(BerByteArrayOutputStream os, boolean withTag) throws IOException {
if (code != null) {
for (int i = code.length - 1; i >= 0; i--) {
os.write(code[i]);
}
if (withTag) {
return tag.encode(os) + code.length;
}
return code.length;
}
int codeLength = 0;
codeLength += dpOid.encode(os, false);
// write tag: CONTEXT_CLASS, PRIMITIVE, 0
os.write(0x80);
codeLength += 1;
codeLength += BerLength.encodeLength(os, codeLength);
if (withTag) {
codeLength += tag.encode(os);
}
return codeLength;
}
public int decode(InputStream is) throws IOException {
return decode(is, true);
}
public int decode(InputStream is, boolean withTag) throws IOException {
int codeLength = 0;
int subCodeLength = 0;
BerTag berTag = new BerTag();
if (withTag) {
codeLength += tag.decodeAndCheck(is);
}
BerLength length = new BerLength();
codeLength += length.decode(is);
int totalLength = length.val;
if (totalLength == -1) {
subCodeLength += berTag.decode(is);
if (berTag.tagNumber == 0 && berTag.tagClass == 0 && berTag.primitive == 0) {
int nextByte = is.read();
if (nextByte != 0) {
if (nextByte == -1) {
throw new EOFException("Unexpected end of input stream.");
}
throw new IOException("Decoded sequence has wrong end of contents octets");
}
codeLength += subCodeLength + 1;
return codeLength;
}
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
dpOid = new BerObjectIdentifier();
subCodeLength += dpOid.decode(is, false);
subCodeLength += berTag.decode(is);
}
int nextByte = is.read();
if (berTag.tagNumber != 0 || berTag.tagClass != 0 || berTag.primitive != 0
|| nextByte != 0) {
if (nextByte == -1) {
throw new EOFException("Unexpected end of input stream.");
}
throw new IOException("Decoded sequence has wrong end of contents octets");
}
codeLength += subCodeLength + 1;
return codeLength;
}
codeLength += totalLength;
subCodeLength += berTag.decode(is);
if (berTag.equals(BerTag.CONTEXT_CLASS, BerTag.PRIMITIVE, 0)) {
dpOid = new BerObjectIdentifier();
subCodeLength += dpOid.decode(is, false);
if (subCodeLength == totalLength) {
return codeLength;
}
}
throw new IOException("Unexpected end of sequence, length tag: " + totalLength + ", actual sequence length: " + subCodeLength);
}
public void encodeAndSave(int encodingSizeGuess) throws IOException {
BerByteArrayOutputStream os = new BerByteArrayOutputStream(encodingSizeGuess);
encode(os, false);
code = os.getArray();
}
public String toString() {
StringBuilder sb = new StringBuilder();
appendAsString(sb, 0);
return sb.toString();
}
public void appendAsString(StringBuilder sb, int indentLevel) {
sb.append("{");
sb.append("\n");
for (int i = 0; i < indentLevel + 1; i++) {
sb.append("\t");
}
if (dpOid != null) {
sb.append("dpOid: ").append(dpOid);
}
else {
sb.append("dpOid: <empty-required-field>");
}
sb.append("\n");
for (int i = 0; i < indentLevel; i++) {
sb.append("\t");
}
sb.append("}");
}
}
|
[
"stefan.feuerhahn@ise.fraunhofer.de"
] |
stefan.feuerhahn@ise.fraunhofer.de
|
840d9b3021e1064c2b912ba51b0bbc6b4e2fef16
|
571fc48d53e6377d2fe266f84c35181aacc80202
|
/Fgcm/app/src/main/java/com/fanwang/fgcm/bean/SearchUserIdBean.java
|
98a211b21252964917e0231e9325cf6ed81218cf
|
[] |
no_license
|
edcedc/Fg
|
618a381d4399664d3fac9e04dd7a11b62b752f7e
|
19fd32837347fd17f9b43e816e3cc9fd0c207eb4
|
refs/heads/master
| 2020-04-04T10:08:23.469555
| 2019-06-29T06:09:21
| 2019-06-29T06:09:21
| 155,843,816
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 739
|
java
|
package com.fanwang.fgcm.bean;
import org.litepal.crud.DataSupport;
import java.util.ArrayList;
import java.util.List;
/**
* Created by edison on 2018/4/25.
*/
public class SearchUserIdBean extends DataSupport{
private int id;
private String userId;
public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getUserId() {
return userId;
}
public void setUserId(String userId) {
this.userId = userId;
}
private List<SearchListBean> list = new ArrayList<>();
public List<SearchListBean> getList() {
return list;
}
public void setList(List<SearchListBean> list) {
this.list = list;
}
}
|
[
"501807647@qq.com"
] |
501807647@qq.com
|
9b9d567cf3fe243bb61a07e87c766def6cc520bb
|
043703eaf27a0d5e6f02bf7a9ac03c0ce4b38d04
|
/subject_systems/Struts2/src/struts-2.3.30/src/xwork-core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderResultsTest.java
|
cd3cde02c7d45a89c4470bc061e2dd0d544a1b6d
|
[] |
no_license
|
MarceloLaser/arcade_console_test_resources
|
e4fb5ac4a7b2d873aa9d843403569d9260d380e0
|
31447aabd735514650e6b2d1a3fbaf86e78242fc
|
refs/heads/master
| 2020-09-22T08:00:42.216653
| 2019-12-01T21:51:05
| 2019-12-01T21:51:05
| 225,093,382
| 1
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 129
|
java
|
version https://git-lfs.github.com/spec/v1
oid sha256:f850d76232efde234c57b1561bb45543b218cfb1e5008460a45ab7e277ab6e72
size 5375
|
[
"marcelo.laser@gmail.com"
] |
marcelo.laser@gmail.com
|
ddea65bc0fd2fe08a04349614fc5f56e3a1c5178
|
6d51a2f5b54c005c022bcf5897d3490dd6c3a576
|
/src/main/java/gwt/material/design/demo/client/application/roadmap/RoadMapView.java
|
0cc3ade60b75392685b7d0fd2ef8385f9293bbce
|
[
"Apache-2.0"
] |
permissive
|
GwtMaterialDesign/gwt-material-demo
|
9f95a90cb939f0897d7bcebed8dd27e581c0ddcf
|
ef9ede80abac6e5fed4cbe0ede772eb44f674c71
|
refs/heads/master
| 2021-01-24T10:40:22.310022
| 2019-02-03T00:15:26
| 2019-02-03T00:15:26
| 33,317,132
| 38
| 75
|
Apache-2.0
| 2020-05-26T19:13:43
| 2015-04-02T15:41:09
|
Java
|
UTF-8
|
Java
| false
| false
| 1,139
|
java
|
package gwt.material.design.demo.client.application.roadmap;
/*
* #%L
* GwtMaterial
* %%
* Copyright (C) 2015 - 2016 GwtMaterialDesign
* %%
* 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.
* #L%
*/
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.user.client.ui.Widget;
import com.gwtplatform.mvp.client.ViewImpl;
import javax.inject.Inject;
public class RoadMapView extends ViewImpl implements RoadMapPresenter.MyView {
interface Binder extends UiBinder<Widget, RoadMapView> {
}
@Inject
RoadMapView(Binder uiBinder) {
initWidget(uiBinder.createAndBindUi(this));
}
}
|
[
"kevzlou7979@gmail.com"
] |
kevzlou7979@gmail.com
|
6112cf918c3f07637e49adfe9a8f6e13a81d7e0a
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/dbeaver/2015/4/IGridLabelProvider.java
|
e0a04ae1907467b76409c21bb79cf43edd30cdad
|
[] |
no_license
|
rosoareslv/SED99
|
d8b2ff5811e7f0ffc59be066a5a0349a92cbb845
|
a062c118f12b93172e31e8ca115ce3f871b64461
|
refs/heads/main
| 2023-02-22T21:59:02.703005
| 2021-01-28T19:40:51
| 2021-01-28T19:40:51
| 306,497,459
| 1
| 1
| null | 2020-11-24T20:56:18
| 2020-10-23T01:18:07
| null |
UTF-8
|
Java
| false
| false
| 1,434
|
java
|
/*
* Copyright (C) 2010-2015 Serge Rieder
* serge@jkiss.org
*
* 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 org.jkiss.dbeaver.ui.controls.lightgrid;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.jkiss.code.NotNull;
import org.jkiss.code.Nullable;
import org.jkiss.dbeaver.ext.ui.ITooltipProvider;
public interface IGridLabelProvider extends IColorProvider, IFontProvider, ITooltipProvider {
@NotNull
public String getText(Object element);
@Nullable
public Image getImage(Object element);
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
c5071510bc99faf8970673d649419bb517a19066
|
2c0edfcd9e6ddf16a88762a018589cbebe6fa8e8
|
/CleanSheets/src/main/java/csheets/ext/macro_beanshell/ui/MacroBeanShellAction.java
|
d73049bbe02a88511f1fd3d3c3b41aa74f2a008c
|
[] |
no_license
|
ABCurado/University-Projects
|
7fb32b588f2c7fbe384ca947d25928b8d702d667
|
6c9475f5ef5604955bc21bb4f8b1d113a344d7ab
|
refs/heads/master
| 2021-01-12T05:25:21.614584
| 2017-01-03T15:29:00
| 2017-01-03T15:29:00
| 77,926,226
| 1
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 971
|
java
|
package csheets.ext.macro_beanshell.ui;
import csheets.CleanSheets;
import csheets.ui.ctrl.BaseAction;
import csheets.ui.ctrl.UIController;
import java.awt.event.ActionEvent;
import static javax.swing.Action.SMALL_ICON;
import javax.swing.ImageIcon;
/**
*
* @author Rui Bento
*/
public class MacroBeanShellAction extends BaseAction {
/**
* The user interface controller
*/
private UIController uiController;
/**
* Creates a new action.
*
* @param uiController the user interface controller
*/
public MacroBeanShellAction(UIController uiController) {
this.uiController = uiController;
}
@Override
protected String getName() {
return "Create Macro/BeanShell";
}
protected void defineProperties() {
putValue(SMALL_ICON, new ImageIcon(CleanSheets.class.
getResource("ext/macro_beanshell/script_small.png")));
}
@Override
public void actionPerformed(ActionEvent e) {
new MacroBeanShellPanel(uiController).setVisible(true);
}
}
|
[
"1140280@isep.ipp.pt"
] |
1140280@isep.ipp.pt
|
fbe9ec9a5faf155bbab77560b5ed8c8a9786a86a
|
db3043ea4728125fd1d7a6a127daf0cc2caad626
|
/OCPay_admin/src/main/java/com/stormfives/ocpay/member/dao/OcpayAddressBalanceDualDAO.java
|
9af1b8bd32673b140fd9b47b454996fa9e5623d8
|
[] |
no_license
|
OdysseyOCN/OCPay
|
74f0b2ee9b2c847599118861ffa43b8c869b2e71
|
5f6c03c8eea53ea107ac6917f3d97a3c7fc86209
|
refs/heads/master
| 2022-07-25T07:49:12.120351
| 2019-03-29T03:14:46
| 2019-03-29T03:14:46
| 135,281,926
| 9
| 5
| null | 2022-07-15T21:06:38
| 2018-05-29T10:48:50
|
Java
|
UTF-8
|
Java
| false
| false
| 753
|
java
|
package com.stormfives.ocpay.member.dao;
import com.stormfives.ocpay.member.dao.entity.OcpayAddressBalanceDual;
import com.stormfives.ocpay.member.dao.entity.OcpayAddressBalanceDualExample;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import java.math.BigDecimal;
import java.util.List;
@Mapper
public interface OcpayAddressBalanceDualDAO {
@Select("select sum(addresses_balance) from ocpay_address_balance_dual")
BigDecimal getTotalAmount();
@Select("select count(1) from ocpay_address_balance_dual")
int getCount();
@Delete("delete from ocpay_address_balance_dual")
void deleteDual();
}
|
[
"cyp206@qq.com"
] |
cyp206@qq.com
|
9f9bf0d48e4200ec57c1c20ef8d81687fd4d41ad
|
fccf4e1b9c15b2271e82e924e53bad2f6771dc82
|
/src/thinginjava/concurrency/DaemonThreadFactory.java
|
ee25a1405de17c35209b0d400a2953fb1838636b
|
[] |
no_license
|
luyna/learning-java
|
d7f424728dc5713d8b630a5cdee1e07c3dd55a79
|
6eb5e1eb66794a4ac524784833ef66448319212d
|
refs/heads/master
| 2020-12-31T05:25:33.602149
| 2015-04-29T08:49:31
| 2015-04-29T08:49:31
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 256
|
java
|
package thinginjava.concurrency;
import java.util.concurrent.ThreadFactory;
public class DaemonThreadFactory implements ThreadFactory {
@Override
public Thread newThread(Runnable r) {
Thread t = new Thread(r);
t.setDaemon(true);
return t;
}
}
|
[
"vonzhou@163.com"
] |
vonzhou@163.com
|
8709a0c57315a5f3b940a34a859fb6ba6e27ba21
|
31f043184e2839ad5c3acbaf46eb1a26408d4296
|
/src/main/java/com/github/highcharts4gwt/model/highcharts/option/api/plotoptions/spline/point/ClickEvent.java
|
22ff0c3e88165dd939cf56d5947410df94781473
|
[] |
no_license
|
highcharts4gwt/highchart-wrapper
|
52ffa84f2f441aa85de52adb3503266aec66e0ac
|
0a4278ddfa829998deb750de0a5bd635050b4430
|
refs/heads/master
| 2021-01-17T20:25:22.231745
| 2015-06-30T15:05:01
| 2015-06-30T15:05:01
| 24,794,406
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 213
|
java
|
package com.github.highcharts4gwt.model.highcharts.option.api.plotoptions.spline.point;
import com.github.highcharts4gwt.model.highcharts.object.api.Point;
public interface ClickEvent {
Point point();
}
|
[
"ronan.quillevere@gmail.com"
] |
ronan.quillevere@gmail.com
|
f602b8064e806a626e98686e5b8db3d15b47879a
|
d84f50bab4d4efd8f4d99f2d605f9b7551bbd918
|
/src/main/java/com/roma/elettorale/modelli3D/helpers/enumerators/tipologiastream.java
|
62b38f0bb391d448ad17afd69e31b7fbd0e75a49
|
[] |
no_license
|
angew74/modelli3D
|
eac77f4359a0e7db0f200b3f7c0ae8941a703d9c
|
024b39c3afb25cf8acdeb448fc3582ed43f6571d
|
refs/heads/master
| 2022-07-15T03:13:12.132615
| 2019-11-30T12:21:41
| 2019-11-30T12:21:41
| 216,188,220
| 0
| 0
| null | 2022-03-08T21:23:24
| 2019-10-19T10:26:16
|
Java
|
UTF-8
|
Java
| false
| false
| 129
|
java
|
package com.roma.elettorale.modelli3D.helpers.enumerators;
public enum tipologiastream {
NIENTE,
MAIL,
PROTOCOLLO
}
|
[
"agnew74@gmail.com"
] |
agnew74@gmail.com
|
ca857146f4c562e8c9d4d51ff8ea3e26ff7e713d
|
ed5159d056e98d6715357d0d14a9b3f20b764f89
|
/test/irvine/oeis/a039/A039148Test.java
|
5a00f3370e7b5cd6bc3aa920d91fb9e2b81fec1e
|
[] |
no_license
|
flywind2/joeis
|
c5753169cf562939b04dd246f8a2958e97f74558
|
e5efd6971a0062ac99f4fae21a7c78c9f9e74fea
|
refs/heads/master
| 2020-09-13T18:34:35.080552
| 2019-11-19T05:40:55
| 2019-11-19T05:40:55
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 195
|
java
|
package irvine.oeis.a039;
import irvine.oeis.AbstractSequenceTest;
/**
* Tests the corresponding class.
* @author Sean A. Irvine
*/
public class A039148Test extends AbstractSequenceTest {
}
|
[
"sean.irvine@realtimegenomics.com"
] |
sean.irvine@realtimegenomics.com
|
d198aecede8d22603690649bd9e1095bbdc5abc4
|
9f5f40df25ff4e80b5a9f2ef91529c3aba69021a
|
/kerberos-codec/src/main/java/org/apache/directory/shared/kerberos/codec/adIfRelevant/AdIfRelevantContainer.java
|
858f2d165c1d962b3147e476e56ffe733eb5e568
|
[
"LicenseRef-scancode-unknown",
"OLDAP-2.8",
"ANTLR-PD",
"MIT",
"LicenseRef-scancode-warranty-disclaimer",
"LicenseRef-scancode-unknown-license-reference",
"LicenseRef-scancode-jdbm-1.00",
"Apache-2.0",
"LicenseRef-scancode-ietf"
] |
permissive
|
isabella232/directory-server
|
d5a627c2e16157f9662d388884de07e7ac7823e0
|
2ec1117fec41919a68d04ba3a51724562e3b46f8
|
refs/heads/master
| 2023-03-08T19:14:47.065238
| 2020-11-06T15:25:43
| 2020-11-06T15:25:43
| 311,733,075
| 0
| 0
|
Apache-2.0
| 2021-02-23T13:28:34
| 2020-11-10T17:20:04
| null |
UTF-8
|
Java
| false
| false
| 1,675
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*/
package org.apache.directory.shared.kerberos.codec.adIfRelevant;
import org.apache.directory.shared.kerberos.codec.authorizationData.AuthorizationDataContainer;
import org.apache.directory.shared.kerberos.components.AdIfRelevant;
/**
* The AD-IF-RELEVANT container stores the AD-IF-RELEVANT decoded by the Asn1Decoder.
*
* @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
*/
public class AdIfRelevantContainer extends AuthorizationDataContainer
{
/**
* Creates a new AdIfRelevantContainer object.
*/
public AdIfRelevantContainer()
{
super();
setAuthorizationData( new AdIfRelevant() );
}
/**
* @return Returns the AD-IF-RELEVANT.
*/
public AdIfRelevant getAdIfRelevant()
{
return ( AdIfRelevant ) getAuthorizationData();
}
}
|
[
"elecharny@apache.org"
] |
elecharny@apache.org
|
5e3da19e15437afe273327ca141e1ec0dea8ba1c
|
f3c0028d4138c69c4ce24b2fd01e4ca595a6af4d
|
/app/src/main/java/com/siweisoft/nurse/ui/day/adapter/LeftDayAdapter.java
|
a74be07ebf03f45304550ceb9d2f98afdf29e6cb
|
[] |
no_license
|
canvaser/desktop
|
83138fa37b36a02d4663d5e9cb136313f501a43e
|
7652ece27d050d627c95fe0934734bf05db2cb0e
|
refs/heads/master
| 2021-01-13T03:09:42.346997
| 2017-02-07T01:43:59
| 2017-02-07T01:43:59
| 77,433,645
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,251
|
java
|
package com.siweisoft.nurse.ui.day.adapter;
import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import com.siweisoft.app.R;
import com.siweisoft.base.ui.adapter.AppRecycleAdapter;
import com.siweisoft.base.ui.interf.view.OnAppItemLongClickListener;
import com.siweisoft.nurse.ui.day.bean.dbbean.DayDBBean;
import com.siweisoft.nurse.ui.day.bean.uibean.LeftDayUIBean;
import com.siweisoft.util.data.FormatUtil;
import java.util.ArrayList;
/**
* Created by ${viwmox} on 2017-01-03.
*/
public class LeftDayAdapter extends AppRecycleAdapter implements View.OnLongClickListener{
ArrayList<DayDBBean> data;
OnAppItemLongClickListener longClickListener;
public LeftDayAdapter(Context context,ArrayList<DayDBBean> data) {
super(context);
this.data = data;
}
@Override
public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
View v = layoutInflater.inflate(R.layout.list_left_day,parent,false);
LeftDayUIBean uiBean = new LeftDayUIBean(context,v);
return uiBean;
}
@Override
public void onBindViewHolder(RecyclerView.ViewHolder holder, int position) {
LeftDayUIBean uiBean = (LeftDayUIBean) holder;
uiBean.getTimeTV().setText(FormatUtil.getInstance().toNowHHMMTime(data.get(position).getStartTime())+"--"+FormatUtil.getInstance().toNowHHMMTime(data.get(position).getEndTime()));
uiBean.getContentTV().setText(data.get(position).getContentTxt()+"");
uiBean.getRootV().setOnLongClickListener(this);
uiBean.getRootV().setTag(R.id.position,position);
uiBean.getRootV().setTag(R.id.data,data.get(position));
}
@Override
public int getItemCount() {
return data.size();
}
@Override
public void onClick(View v) {
}
@Override
public boolean onLongClick(View v) {
if(longClickListener!=null){
longClickListener.onAppItemLongClick(v, (Integer) v.getTag(R.id.position));
}
return true;
}
public void setLongClickListener(OnAppItemLongClickListener longClickListener) {
this.longClickListener = longClickListener;
}
}
|
[
"18721607438@163.com"
] |
18721607438@163.com
|
932ffae02992860b657223bd2779aafefa8a56a1
|
72a43944b2d92b3c3d3a9d87d4c01bcdb4673b7b
|
/Weitu/src/main/java/com/quanjing/weitu/app/ui/category/MWTStaggeredCategoryFlowFragment.java
|
49bf3c7dc2260be13a895004121f74fa53a26a33
|
[] |
no_license
|
JokeLook/QuanjingAPP
|
ef5d5c21284bc29d0594b45ec36ac456c24186b8
|
40b2c1c286ffcca46c88942374fdd67a14611260
|
refs/heads/master
| 2020-07-15T01:02:27.443815
| 2015-04-27T06:08:19
| 2015-04-27T06:08:19
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,767
|
java
|
package com.quanjing.weitu.app.ui.category;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import com.etsy.android.grid.StaggeredGridView;
import com.quanjing.weitu.app.common.MWTCallback;
import com.quanjing.weitu.app.model.MWTCategory;
import com.quanjing.weitu.app.model.MWTCategoryManager;
import com.quanjing.weitu.app.model.MWTFeed;
import com.quanjing.weitu.app.model.MWTFeedManager;
import com.quanjing.weitu.app.ui.common.MWTDataRetriever;
import com.quanjing.weitu.app.ui.common.MWTItemClickHandler;
import com.quanjing.weitu.app.ui.common.MWTWaterFlowFragment;
import com.quanjing.weitu.app.ui.feed.MWTFeedFlowActivity;
public class MWTStaggeredCategoryFlowFragment extends MWTWaterFlowFragment implements MWTItemClickHandler
{
private static final String ARG_CATEGORY_ID = "ARG_CATEGORY_ID";
private String _categoryID;
private MWTCategory _category;
private MWTCategoriesAdapter _categoriesAdapter;
private StaggeredGridView _gridView;
private MWTItemClickHandler _extraItemClickHandler;
public static MWTStaggeredCategoryFlowFragment newInstance()
{
MWTStaggeredCategoryFlowFragment fragment = new MWTStaggeredCategoryFlowFragment();
return fragment;
}
public static MWTStaggeredCategoryFlowFragment newInstance(String categoryID)
{
MWTStaggeredCategoryFlowFragment fragment = new MWTStaggeredCategoryFlowFragment();
Bundle args = new Bundle();
args.putString(ARG_CATEGORY_ID, categoryID);
fragment.setArguments(args);
return fragment;
}
public MWTStaggeredCategoryFlowFragment()
{
super();
setPullToRefreshEnabled(true, false);
setDataRetriver(new MWTDataRetriever()
{
@Override
public void refresh(MWTCallback callback)
{
if (_categoriesAdapter != null)
{
_categoriesAdapter.refresh(callback);
}
else
{
if (callback != null)
{
callback.success();
}
}
}
@Override
public void loadMore(MWTCallback callback)
{
if (callback != null)
{
callback.success();
}
}
});
setItemClickHandler(this);
}
@Override
public void onAttach(Activity activity)
{
super.onAttach(activity);
}
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setRetainInstance(true);
if (getArguments() != null)
{
_categoryID = getArguments().getString(ARG_CATEGORY_ID);
}
if (_categoryID != null)
{
MWTCategoryManager cm = MWTCategoryManager.getInstance();
_category = cm.getCategoryByID(_categoryID);
}
else
{
_category = null;
}
_categoriesAdapter = new MWTDynamicCategoriesAdapter(getActivity(), _category);
setGridViewAdapter(_categoriesAdapter);
}
@Override
public void onResume()
{
super.onResume();
_categoriesAdapter.refreshIfNeeded();
}
public void setExtraItemClickHandler(MWTItemClickHandler extraItemClickHandler)
{
_extraItemClickHandler = extraItemClickHandler;
}
@Override
public boolean handleItemClick(Object item)
{
if (_extraItemClickHandler != null)
{
boolean handled = _extraItemClickHandler.handleItemClick(item);
if (handled)
{
return true;
}
}
if (item instanceof MWTCategory)
{
MWTCategory category = (MWTCategory) item;
if (category.isMultiLevel())
{
Intent intent = new Intent(getActivity(), MWTCategoryFlowActivity.class);
intent.putExtra(MWTCategoryFlowActivity.ARG_CATEGORY_ID, category.getFeedID());
intent.putExtra(MWTCategoryFlowActivity.ARG_IS_SINGLE_COLUMN, isSingleColumn());
startActivity(intent);
return true;
}
else
{
MWTFeed feed = MWTFeedManager.getInstance().getFeedForCategory(category);
Intent intent = new Intent(getActivity(), MWTFeedFlowActivity.class);
intent.putExtra(MWTFeedFlowActivity.ARG_FEED_ID, feed.getFeedID());
startActivity(intent);
return true;
}
}
return false;
}
}
|
[
"forevertxp@gmail.com"
] |
forevertxp@gmail.com
|
1befc6d0709c8f6aabf955d054bdefb4540412d6
|
6249a2b3928e2509b8a5d909ef9d8e18221d9637
|
/revolsys-swing/src/main/java/com/revolsys/swing/undo/CannotUndoException.java
|
291050cd6ccd3f82b47ec6c444a1ed851849ec2c
|
[
"Apache-2.0"
] |
permissive
|
revolsys/com.revolsys.open
|
dbcdc3bdcee3276dc3680311948e91ec64e1264e
|
7f4385c632094eb5ed67c0646ee3e2e258fba4e4
|
refs/heads/main
| 2023-08-22T17:18:48.499931
| 2023-05-31T01:59:22
| 2023-05-31T01:59:22
| 2,709,026
| 5
| 11
|
NOASSERTION
| 2023-05-31T01:59:23
| 2011-11-04T12:33:49
|
Java
|
UTF-8
|
Java
| false
| false
| 449
|
java
|
package com.revolsys.swing.undo;
public class CannotUndoException extends javax.swing.undo.CannotUndoException {
/**
*
*/
private static final long serialVersionUID = 1L;
private final String message;
public CannotUndoException(final String message) {
this.message = message;
}
@Override
public String getMessage() {
return this.message;
}
@Override
public String toString() {
return this.message;
}
}
|
[
"paul.austin@revolsys.com"
] |
paul.austin@revolsys.com
|
18395575e82128460788aef73fc95af0ee13bc5d
|
952789d549bf98b84ffc02cb895f38c95b85e12c
|
/V_3.x/Server/tags/SpagoBI-3.3(20111222)/SpagoBIQbeEngine/src/it/eng/spagobi/engines/worksheet/services/designer/GetWorksheetFieldsAction.java
|
8a8c0415c2a1502f1e68136e5f35e24f04b4eb04
|
[] |
no_license
|
emtee40/testingazuan
|
de6342378258fcd4e7cbb3133bb7eed0ebfebeee
|
f3bd91014e1b43f2538194a5eb4e92081d2ac3ae
|
refs/heads/master
| 2020-03-26T08:42:50.873491
| 2015-01-09T16:17:08
| 2015-01-09T16:17:08
| null | 0
| 0
| null | null | null | null |
WINDOWS-1252
|
Java
| false
| false
| 7,679
|
java
|
/*
* SpagoBI, the Open Source Business Intelligence suite
* © 2005-2015 Engineering Group
*
* This file is part of SpagoBI. SpagoBI is free software: you can redistribute it and/or modify it under the terms of the GNU
* Lesser General Public License as published by the Free Software Foundation, either version 2.1 of the License, or any later version.
* SpagoBI 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 SpagoBI. If not, see: http://www.gnu.org/licenses/.
* The complete text of SpagoBI license is included in the COPYING.LESSER file.
*/
package it.eng.spagobi.engines.worksheet.services.designer;
import it.eng.spago.base.SourceBean;
import it.eng.spagobi.engines.worksheet.WorksheetEngineInstance;
import it.eng.spagobi.engines.worksheet.services.AbstractWorksheetEngineAction;
import it.eng.spagobi.tools.dataset.bo.IDataSet;
import it.eng.spagobi.tools.dataset.common.metadata.IFieldMetaData;
import it.eng.spagobi.tools.dataset.common.metadata.IFieldMetaData.FieldType;
import it.eng.spagobi.tools.dataset.common.metadata.IMetaData;
import it.eng.spagobi.tools.dataset.common.query.AggregationFunctions;
import it.eng.spagobi.utilities.assertion.Assert;
import it.eng.spagobi.utilities.engines.SpagoBIEngineServiceException;
import it.eng.spagobi.utilities.engines.SpagoBIEngineServiceExceptionHandler;
import it.eng.spagobi.utilities.service.JSONSuccess;
import java.io.IOException;
import org.apache.log4j.Logger;
import org.json.JSONArray;
import org.json.JSONObject;
/**
* @author Davide Zerbetto (davide.zerbetto@eng.it)
*/
public class GetWorksheetFieldsAction extends AbstractWorksheetEngineAction {
private static final long serialVersionUID = -5874137232683097175L;
/** Logger component. */
private static transient Logger logger = Logger.getLogger(GetWorksheetFieldsAction.class);
// PROPERTIES TO LOOK FOR INTO THE FIELDS
public static final String PROPERTY_VISIBLE = "visible";
public static final String PROPERTY_IS_SEGMENT_ATTRIBUTE = "isSegmentAttribute";
public static final String PROPERTY_IS_MANDATORY_MEASURE = "isMandatoryMeasure";
public static final String PROPERTY_AGGREGATION_FUNCTION = "aggregationFunction";
public void service(SourceBean request, SourceBean response) {
JSONObject resultsJSON;
logger.debug("IN");
try {
super.service(request, response);
WorksheetEngineInstance engineInstance = this.getEngineInstance();
Assert.assertNotNull(engineInstance, "It's not possible to execute " + this.getActionName() + " service before having properly created an instance of EngineInstance class");
IDataSet dataset = engineInstance.getDataSet();
Assert.assertNotNull(dataset, "The engine instance is missing the dataset!!");
IMetaData metadata = dataset.getMetadata();
Assert.assertNotNull(metadata, "No metadata retrieved by the dataset");
JSONArray fieldsJSON = writeFields(metadata);
logger.debug("Metadata read:");
logger.debug(fieldsJSON);
resultsJSON = new JSONObject();
resultsJSON.put("results", fieldsJSON);
try {
writeBackToClient( new JSONSuccess( resultsJSON ) );
} catch (IOException e) {
throw new SpagoBIEngineServiceException(getActionName(), "Impossible to write back the responce to the client [" + resultsJSON.toString(2)+ "]", e);
}
} catch(Throwable t) {
throw SpagoBIEngineServiceExceptionHandler.getInstance().getWrappedException(getActionName(), getEngineInstance(), t);
} finally {
logger.debug("OUT");
}
}
public JSONArray writeFields(IMetaData metadata) throws Exception {
// field's meta
JSONArray fieldsMetaDataJSON = new JSONArray();
int fieldCount = metadata.getFieldCount();
logger.debug("Number of fields = " + fieldCount);
Assert.assertTrue(fieldCount > 0, "Dataset has no fields!!!");
for (int i = 0; i < fieldCount; i++) {
IFieldMetaData fieldMetaData = metadata.getFieldMeta(i);
Assert.assertNotNull(fieldMetaData, "Field metadata for position " + i + " not found.");
logger.debug("Evaluating field with name [" + fieldMetaData.getName() + "], alias [" + fieldMetaData.getAlias() + "] ...");
Object propertyRawValue = fieldMetaData.getProperty(PROPERTY_VISIBLE);
logger.debug("Read property " + PROPERTY_VISIBLE + ": its value is [" + propertyRawValue + "]");
if (propertyRawValue != null
&& (propertyRawValue instanceof Boolean)
&& ((Boolean) propertyRawValue).booleanValue() == false) {
logger.debug("The field is not visible");
continue;
} else {
logger.debug("The field is visible");
}
String fieldName = getFieldName(fieldMetaData);
String fieldHeader = getFieldAlias(fieldMetaData);
JSONObject fieldMetaDataJSON = new JSONObject();
fieldMetaDataJSON.put("id", fieldName);
fieldMetaDataJSON.put("alias", fieldHeader);
FieldType type = fieldMetaData.getFieldType();
logger.debug("The field type is " + type.name());
switch (type) {
case ATTRIBUTE:
Object isSegmentAttributeObj = fieldMetaData.getProperty(PROPERTY_IS_SEGMENT_ATTRIBUTE);
logger.debug("Read property " + PROPERTY_IS_SEGMENT_ATTRIBUTE + ": its value is [" + propertyRawValue + "]");
String attributeNature = (isSegmentAttributeObj != null
&& (isSegmentAttributeObj instanceof Boolean)
&& ((Boolean) isSegmentAttributeObj).booleanValue()) ? "segment_attribute" : "attribute";
logger.debug("The nature of the attribute is recognized as " + attributeNature);
fieldMetaDataJSON.put("nature", attributeNature);
fieldMetaDataJSON.put("funct", AggregationFunctions.NONE);
fieldMetaDataJSON.put("iconCls", attributeNature);
break;
case MEASURE:
Object isMandatoryMeasureObj = fieldMetaData.getProperty(PROPERTY_IS_MANDATORY_MEASURE);
logger.debug("Read property " + PROPERTY_IS_MANDATORY_MEASURE + ": its value is [" + isMandatoryMeasureObj + "]");
String measureNature = (isMandatoryMeasureObj != null
&& (isMandatoryMeasureObj instanceof Boolean)
&& ((Boolean) isMandatoryMeasureObj).booleanValue()) ? "mandatory_measure" : "measure";
logger.debug("The nature of the measure is recognized as " + measureNature);
fieldMetaDataJSON.put("nature", measureNature);
String aggregationFunction = (String) fieldMetaData.getProperty(PROPERTY_AGGREGATION_FUNCTION);
logger.debug("Read property " + PROPERTY_AGGREGATION_FUNCTION + ": its value is [" + aggregationFunction + "]");
fieldMetaDataJSON.put("funct", AggregationFunctions.get(aggregationFunction).getName());
fieldMetaDataJSON.put("iconCls", measureNature);
String decimalPrecision= (String) fieldMetaData.getProperty(IFieldMetaData.DECIMALPRECISION);
if(decimalPrecision!=null){
fieldMetaDataJSON.put("precision", decimalPrecision);
}else{
fieldMetaDataJSON.put("precision", "2");
}
break;
}
fieldsMetaDataJSON.put(fieldMetaDataJSON);
}
return fieldsMetaDataJSON;
}
protected String getFieldAlias(IFieldMetaData fieldMetaData) {
String fieldAlias = fieldMetaData.getAlias() != null ? fieldMetaData.getAlias() : fieldMetaData.getName();
return fieldAlias;
}
protected String getFieldName(IFieldMetaData fieldMetaData) {
String fieldName = fieldMetaData.getName();
return fieldName;
}
}
|
[
"franceschini@99afaf0d-6903-0410-885a-c66a8bbb5f81"
] |
franceschini@99afaf0d-6903-0410-885a-c66a8bbb5f81
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.