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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0337b40f7050fd7ec573c64123adc8b4b2051f8a
|
1c0df66bdc53d84aea6f7aa1f0183cf6f8392ab1
|
/temp/src/minecraft/net/minecraft/entity/ai/EntityAIBeg.java
|
236b72b632818aaef41b3aa6afbe28df949a4b7f
|
[] |
no_license
|
yuwenyong/Minecraft-1.9-MCP
|
9b7be179db0d7edeb74865b1a78d5203a5f75d08
|
bc89baf1fd0b5d422478619e7aba01c0b23bd405
|
refs/heads/master
| 2022-05-23T00:52:00.345068
| 2016-03-11T21:47:32
| 2016-03-11T21:47:32
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,377
|
java
|
package net.minecraft.entity.ai;
import net.minecraft.entity.ai.EntityAIBase;
import net.minecraft.entity.passive.EntityWolf;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.item.ItemStack;
import net.minecraft.util.EnumHand;
import net.minecraft.world.World;
public class EntityAIBeg extends EntityAIBase {
private EntityWolf field_75387_a;
private EntityPlayer field_75385_b;
private World field_75386_c;
private float field_75383_d;
private int field_75384_e;
public EntityAIBeg(EntityWolf p_i1617_1_, float p_i1617_2_) {
this.field_75387_a = p_i1617_1_;
this.field_75386_c = p_i1617_1_.field_70170_p;
this.field_75383_d = p_i1617_2_;
this.func_75248_a(2);
}
public boolean func_75250_a() {
this.field_75385_b = this.field_75386_c.func_72890_a(this.field_75387_a, (double)this.field_75383_d);
return this.field_75385_b == null?false:this.func_75382_a(this.field_75385_b);
}
public boolean func_75253_b() {
return !this.field_75385_b.func_70089_S()?false:(this.field_75387_a.func_70068_e(this.field_75385_b) > (double)(this.field_75383_d * this.field_75383_d)?false:this.field_75384_e > 0 && this.func_75382_a(this.field_75385_b));
}
public void func_75249_e() {
this.field_75387_a.func_70918_i(true);
this.field_75384_e = 40 + this.field_75387_a.func_70681_au().nextInt(40);
}
public void func_75251_c() {
this.field_75387_a.func_70918_i(false);
this.field_75385_b = null;
}
public void func_75246_d() {
this.field_75387_a.func_70671_ap().func_75650_a(this.field_75385_b.field_70165_t, this.field_75385_b.field_70163_u + (double)this.field_75385_b.func_70047_e(), this.field_75385_b.field_70161_v, 10.0F, (float)this.field_75387_a.func_70646_bf());
--this.field_75384_e;
}
private boolean func_75382_a(EntityPlayer p_75382_1_) {
for(EnumHand enumhand : EnumHand.values()) {
ItemStack itemstack = p_75382_1_.func_184586_b(enumhand);
if(itemstack != null) {
if(this.field_75387_a.func_70909_n() && itemstack.func_77973_b() == Items.field_151103_aS) {
return true;
}
if(this.field_75387_a.func_70877_b(itemstack)) {
return true;
}
}
}
return false;
}
}
|
[
"jholley373@yahoo.com"
] |
jholley373@yahoo.com
|
798edbf4107609ae40eccbac22938ef2150ce2e9
|
efc9e3c400100c1bdbca92033e488937fb750fda
|
/1.JavaSyntax/src/com/javarush/task/task08/task0803/Solution.java
|
bce641060277ffd23c57f14af71f1aa1e4207265
|
[] |
no_license
|
Nikbstar/JavaRushTasks
|
289ffea7798df2c1f22a0335f1e8760f66dac973
|
9b86b284a7f4390807a16e1474e2d58a2be79de0
|
refs/heads/master
| 2018-10-21T03:02:45.724753
| 2018-08-31T06:48:34
| 2018-08-31T06:48:34
| 118,357,131
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,169
|
java
|
package com.javarush.task.task08.task0803;
import java.util.HashMap;
import java.util.Map;
/*
Коллекция HashMap из котов
*/
public class Solution {
public static void main(String[] args) throws Exception {
String[] cats = new String[]{"васька", "мурка", "дымка", "рыжик", "серый", "снежок", "босс", "борис", "визя", "гарфи"};
HashMap<String, Cat> map = addCatsToMap(cats);
for (Map.Entry<String, Cat> pair : map.entrySet()) {
System.out.println(pair.getKey() + " - " + pair.getValue());
}
}
public static HashMap<String, Cat> addCatsToMap(String[] cats) {
//напишите тут ваш код
HashMap<String, Cat> catsMap = new HashMap<>();
for (String cat : cats) {
catsMap.put(cat, new Cat(cat));
}
return catsMap;
}
public static class Cat {
String name;
public Cat(String name) {
this.name = name;
}
@Override
public String toString() {
return name != null ? name.toUpperCase() : null;
}
}
}
|
[
"nikbstar@gmail.com"
] |
nikbstar@gmail.com
|
cde273d390a0b31785caa2f1144a5c353c28c143
|
bf504150a4e0442fe3112dc8b89588b35f27d484
|
/src/main/java/com/feisystems/bham/service/reference/LanguageCodeServiceImpl.java
|
4fa1a11d20ba34aee5d6225ed09fae922d0aa0ec
|
[] |
no_license
|
utishrajk/cds-2016
|
5bebac15e24e8c4525c97eafe9868a5f4d9b4789
|
d02d00be4d9243036cb50fd3fe5eccb33c24048f
|
refs/heads/master
| 2021-01-10T02:04:22.279835
| 2015-12-31T20:31:36
| 2015-12-31T20:31:36
| 48,861,548
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,453
|
java
|
package com.feisystems.bham.service.reference;
import com.feisystems.bham.domain.reference.LanguageCode;
import com.feisystems.bham.domain.reference.LanguageCodeRepository;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@Service
@Transactional
public class LanguageCodeServiceImpl implements LanguageCodeService {
@Autowired
LanguageCodeRepository languageCodeRepository;
public long countAllLanguageCodes() {
return languageCodeRepository.count();
}
public void deleteLanguageCode(LanguageCode languageCode) {
languageCodeRepository.delete(languageCode);
}
public LanguageCode findLanguageCode(Long id) {
return languageCodeRepository.findOne(id);
}
public List<LanguageCode> findAllLanguageCodes() {
return languageCodeRepository.findAll();
}
public List<LanguageCode> findLanguageCodeEntries(int firstResult, int maxResults) {
return languageCodeRepository.findAll(new org.springframework.data.domain.PageRequest(firstResult / maxResults, maxResults)).getContent();
}
public void saveLanguageCode(LanguageCode languageCode) {
languageCodeRepository.save(languageCode);
}
public LanguageCode updateLanguageCode(LanguageCode languageCode) {
return languageCodeRepository.save(languageCode);
}
}
|
[
"utish.raj@gmail.com"
] |
utish.raj@gmail.com
|
54107fc078b46844a8db403c93bf0d8ba2299f3d
|
b7ac80392339ad44466578f40b1ea1b03d81acae
|
/outstagram-login/src/test/java/com/project/outstagram/domain/member/application/UserServiceTest.java
|
4f092f483c60c1c596149e0e09572859c7adf7c8
|
[] |
no_license
|
DaeAkin/outstagram
|
660d00bb88d843aa510d93b47acaa3174ba94275
|
4422283e11c4dd3250505227ff72453d1a0391b2
|
refs/heads/master
| 2020-09-25T12:04:14.234990
| 2020-07-07T13:02:14
| 2020-07-07T13:02:14
| 226,001,513
| 2
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,971
|
java
|
package com.project.outstagram.domain.member.application;
import com.project.outstagram.domain.member.dao.UserRepository;
import com.project.outstagram.domain.member.domain.User;
import com.project.outstagram.domain.member.dto.EmailValidationResponse;
import com.project.outstagram.domain.member.dto.UserJoinRequest;
import com.project.outstagram.test.MockTest;
import org.junit.Test;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.springframework.security.crypto.password.PasswordEncoder;
import reactor.test.StepVerifier;
import static org.mockito.BDDMockito.given;
public class UserServiceTest extends MockTest {
@InjectMocks
UserService userService;
@Mock
UserRepository userRepository;
@Mock
PasswordEncoder userPasswordEncoder;
private static final String email = "donghyeon@gmail.com";
@Test
public void 로그인시_아이디가있음() {
//given
given(userRepository.findByEmail(email))
.willReturn(new User(email));
//then
StepVerifier.create(userService.emailValidation(email))
.expectNext(new EmailValidationResponse(true))
.expectComplete()
.verify();
}
@Test
public void 로그인시_아디디가없음() {
given(userRepository.findByEmail(email))
.willReturn(null);
//then
StepVerifier.create(userService.emailValidation(email))
.expectNext(new EmailValidationResponse(false))
.expectComplete()
.verify();
}
@Test
public void 회원가입_테스트() {
//given
UserJoinRequest userJoinRequest = UserJoinRequest.builder()
.email(email)
.password("51231")
.build();
//then
StepVerifier.create(userService.joinUser(userJoinRequest))
.expectComplete()
.verify();
}
}
|
[
"mindonghyeon890@gmail.com"
] |
mindonghyeon890@gmail.com
|
2787c2ab9bc24823fa94c087fdec0b765e7b2a79
|
6bc618d64d5c08f1d3e56afb97ea89a5ebe47306
|
/Casestudy/src/PlayerGetSet/Team.java
|
e4792525490c345e68a20585c5c42ebf0c980a1c
|
[] |
no_license
|
priyariya04/ClassAndObject
|
8e5c354bdb0a10534a8d9a3ed63600cbe2d53a49
|
0222a8e5e7943d21db02db870eed73627e120566
|
refs/heads/master
| 2020-12-02T03:40:36.031719
| 2020-01-17T11:07:27
| 2020-01-17T11:07:27
| 230,875,975
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 592
|
java
|
package PlayerGetSet;
public class Team {
private String teamName;
private String cityRepresented;
public Team(String teamName, String cityRepresented) {
super();
this.teamName = teamName;
this.cityRepresented = cityRepresented;
}
public String getTeamName() {
return teamName;
}
public void setTeamName(String teamName) {
this.teamName = teamName;
}
public String getCityRepresented() {
return cityRepresented;
}
public void setCityRepresented(String cityRepresented) {
this.cityRepresented = cityRepresented;
}
}
|
[
"User@User-PC"
] |
User@User-PC
|
5130c2688315247896a644ccd883b32bea9ee5a5
|
228e1962e5a784b676601d6feeb1ab1b9f7dd89a
|
/src/main/java/org/csveed/row/CellPositionInRow.java
|
cd5a47c01e1dcfd74785f7131c31736ed3c6572a
|
[
"Apache-2.0"
] |
permissive
|
bsungur/CSVeed
|
64257a3d9d6ebe67140fad859cd736a1a38b7f45
|
62ced819524e32bebb66d6824416d2b967b6c8ce
|
refs/heads/master
| 2020-06-29T12:44:50.105030
| 2019-04-03T00:33:34
| 2019-04-03T00:33:34
| 200,540,715
| 0
| 0
|
Apache-2.0
| 2019-08-04T20:55:14
| 2019-08-04T20:55:13
| null |
UTF-8
|
Java
| false
| false
| 354
|
java
|
package org.csveed.row;
public class CellPositionInRow {
private int start;
private int end;
public int getStart() {
return start;
}
public void setStart(int start) {
this.start = start;
}
public int getEnd() {
return end;
}
public void setEnd(int end) {
this.end = end;
}
}
|
[
"bor.robert@gmail.com"
] |
bor.robert@gmail.com
|
86d5ffa65a390e31c0ecd828935f95a3b15ff62a
|
2bc5230c520399499ce969962a54da3470afe41b
|
/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/dba/PkGenerator.java
|
9fc1089d1781e520a1fd43954addb8a8e4d5b44d
|
[] |
no_license
|
nirvdrum/cayenne
|
9019fcdbefe73736526b3bc62d88882870b519c1
|
01aef6f56820e869083f0833f2e0d0e9bd86f736
|
refs/heads/CAY-1215_new_cayenne-tools_module
| 2022-12-26T13:07:37.641397
| 2009-04-29T00:30:18
| 2009-04-29T00:41:16
| 188,067
| 3
| 1
| null | 2022-12-15T23:24:30
| 2009-04-29T01:16:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,348
|
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.cayenne.dba;
import java.util.List;
import org.apache.cayenne.access.DataNode;
import org.apache.cayenne.map.DbAttribute;
import org.apache.cayenne.map.DbEntity;
/**
* Defines methods to support automatic primary key generation.
*
*/
public interface PkGenerator {
/**
* Generates necessary database objects to provide automatic primary key support.
*
* @param node node that provides access to a DataSource.
* @param dbEntities a list of entities that require primary key auto-generation
* support
*/
void createAutoPk(DataNode node, List<DbEntity> dbEntities) throws Exception;
/**
* Returns a list of SQL strings needed to generates database objects to provide
* automatic primary support for the list of entities. No actual database operations
* are performed.
*/
List<String> createAutoPkStatements(List<DbEntity> dbEntities);
/**
* Drops any common database objects associated with automatic primary key generation
* process. This may be lookup tables, special stored procedures or sequences.
*
* @param node node that provides access to a DataSource.
* @param dbEntities a list of entities whose primary key auto-generation support
* should be dropped.
*/
void dropAutoPk(DataNode node, List<DbEntity> dbEntities) throws Exception;
/**
* Returns SQL string needed to drop database objects associated with automatic
* primary key generation. No actual database operations are performed.
*/
List<String> dropAutoPkStatements(List<DbEntity> dbEntities);
/**
* Generates new (unique and non-repeating) primary key for specified DbEntity.
*
* @param ent DbEntity for which automatic PK is generated.
* @deprecated since 3.0 use {@link #generatePk(DataNode, DbAttribute)}.
*/
Object generatePkForDbEntity(DataNode dataNode, DbEntity ent) throws Exception;
/**
* Generates a unique and non-repeating primary key for specified PK attribute.
*
* @since 3.0
*/
Object generatePk(DataNode dataNode, DbAttribute pk) throws Exception;
/**
* Resets any cached primary keys forcing generator to go to the database next time id
* generation is requested. May not be applicable for all generator implementations.
*/
void reset();
}
|
[
"aadamchik@apache.org"
] |
aadamchik@apache.org
|
949e00eee1131f34d712d8591775f5997cb9ae61
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/neo4j/2016/4/IntegralArrayProperty.java
|
e1508edce58a418df362047a55b49459f7becf93
|
[] |
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,649
|
java
|
/*
* Copyright (c) 2002-2016 "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.kernel.api.properties;
abstract class IntegralArrayProperty extends DefinedProperty implements ArrayValue.IntegralArray
{
IntegralArrayProperty( int propertyKeyId )
{
super( propertyKeyId );
}
public abstract int length();
public abstract long longValue( int index );
@Override
final int valueHash()
{
return hash( this );
}
static int hash( IntegralArray value )
{
int result = 1;
for ( int i = 0, len = value.length(); i < len; i++ )
{
long element = value.longValue( i );
int elementHash = (int) (element ^ (element >>> 32));
result = 31 * result + elementHash;
}
return result;
}
@Override
public final boolean valueEquals( Object other )
{
return valueEquals( this, other );
}
static boolean valueEquals( IntegralArray value, Object other )
{
if ( other instanceof long[] )
{
return numbersEqual( value, new LongArray( (long[]) other ) );
}
else if ( other instanceof int[] )
{
return numbersEqual( value, new IntArray( (int[]) other ) );
}
else if ( other instanceof short[] )
{
return numbersEqual( value, new ShortArray( (short[]) other ) );
}
else if ( other instanceof byte[] )
{
return numbersEqual( value, new ByteArray( (byte[]) other ) );
}
else if ( other instanceof Number[] )
{
Number[] that = (Number[]) other;
if ( that.length == value.length() )
{
if ( other instanceof Double[] || other instanceof Float[] )
{
return numbersEqual( NumberArray.asFloatingPoint( that ), value );
}
else
{
return numbersEqual( value, NumberArray.asIntegral( that ) );
}
}
}
else if ( other instanceof double[] )
{
return numbersEqual( new DoubleArray( (double[]) other ), value );
}
else if ( other instanceof float[] )
{
return numbersEqual( new FloatArray( (float[]) other ), value );
}
return false;
}
@Override
final boolean hasEqualValue( DefinedProperty other )
{
if ( other instanceof IntegralArrayProperty )
{
IntegralArrayProperty that = (IntegralArrayProperty) other;
return numbersEqual( this, that );
}
else if ( other instanceof FloatingPointArrayProperty )
{
FloatingPointArrayProperty that = (FloatingPointArrayProperty) other;
return numbersEqual( that, this );
}
return false;
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
69653df530db9f6213f39606d3f8cb4e56e1845a
|
5e3235edf3de262f4d10b9e9e1fcc3bd13d6b8b1
|
/Code Snippet Repository/Jetty/Jetty6845.java
|
1734e8deb747c2fb4a4d580a987e17a69721f752
|
[] |
no_license
|
saber13812002/DeepCRM
|
3336a244d4852a364800af3181e03e868cf6f9f5
|
be3e5e50e34a042d5ba7259ff5ff75c08ab32bb9
|
refs/heads/master
| 2023-03-16T00:08:06.473699
| 2018-04-18T05:29:50
| 2018-04-18T05:29:50
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 328
|
java
|
@Test
public void testEndsWithTailBytes()
{
assertEndsWithTail("11223344",false);
assertEndsWithTail("00",false);
assertEndsWithTail("0000",false);
assertEndsWithTail("FFFF0000",false);
assertEndsWithTail("880000FFFF",true);
assertEndsWithTail("0000FFFF",true);
}
|
[
"Qing.Mi@my.cityu.edu.hk"
] |
Qing.Mi@my.cityu.edu.hk
|
90879e5c974e4aea3e8fc280477a5d8033785717
|
01b7af545cff6bc9c69e3b813148b7484449f104
|
/MODEL/PROGRAM/JPO/emxRNDEnqueueBase_mxJPO.java
|
3316dd26bfca003fa20df25b1b78e0f887f4cdf6
|
[] |
no_license
|
rgarbhe-processia/Tiger-DEV
|
c674b417935076ef41e8cb99a60ba423f51a89a1
|
75d8ad323df5cbb309e52ae4017cc2d00f6d1f0e
|
refs/heads/master
| 2020-04-14T10:57:45.934483
| 2020-01-10T09:55:41
| 2020-01-10T09:55:41
| 163,800,729
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,511
|
java
|
//
// $Id: ${CLASSNAME}.java.rca 1.10 Wed Oct 22 15:53:02 2008 przemek Experimental przemek $
//
/*
* Copyright (c) 1992-2015 Dassault Systemes. All Rights Reserved. This program contains proprietary and trade secret information of MatrixOne, Inc. Copyright notice is precautionary only and does not
* evidence any actual or intended publication of such program
*
* FileName : "$RCSfile: ${CLASSNAME}.java.rca $" Author : "$Author: przemek $" Version : "$Revision: 1.10 $" Date : "$Date: Wed Oct 22 15:53:02 2008 $"
*
*/
import java.util.LinkedList;
import java.util.Map;
import java.util.StringTokenizer;
import com.matrixone.apps.domain.util.MqlUtil;
import matrix.db.Context;
import matrix.db.JPO;
/**
* Main PDF Rendering JPO. This is the implementation class
* @author Devon Jones
* @created February 3, 2003
* @exclude
*/
public class emxRNDEnqueueBase_mxJPO extends emxAbsPDFEnqueue_mxJPO {
/**
* Constructor for the emxRNDEnqueueBase object
* @param context
* the eMatrix <code>Context</code> object
* @param args
* holds the following input arguments: "objectId" - String, Object Id "fileList" - LinkedList, the list of files to print
* @exception Exception
* IllegalArgumentException, if wrong args are passed in
* @since AEF 9.5.4.0
*/
public emxRNDEnqueueBase_mxJPO(Context context, String[] args) {
/*
* Author : DJ Date : 02/04/2003 Notes : History :
*/
super(context, args);
}
/**
* Unpacks the passed in arguments, and uses them to set class properties
* @param args
* holds the following input arguments: "objectId" - String, Object Id "fileList" - LinkedList, the list of files to print
* @exception Exception
* IllegalArgumentException, if wrong args are passed in
* @since AEF 9.5.4.0
*/
protected void unpackArgs(String[] args) throws Exception {
/*
* Author : DJ Date : 02/04/2003 Notes : History :
*/
Map map = (Map) JPO.unpackArgs(args);
if (map.size() < 2) {
throw (new IllegalArgumentException());
}
this._objectId = (String) map.get("objectId");
this._fileList = (LinkedList) map.get("fileList");
}
/**
* mxMain method, intended to be called as a trigger.
* @param context
* the eMatrix <code>Context</code> object
* @param args
* holds the following input arguments: Object Id
* @return int, success
* @exception Exception
* throws exceptions on any mql errors
* @since AEF 9.5.4.0
*/
public int mxMain(Context context, String[] args) throws Exception {
/*
* Author : DJ Date : 02/04/2003 Notes : History :
*/
try {
String objectId = args[0];
doFiles(context, objectId);
} catch (Exception e) {
return 1;
}
return 0;
}
/**
* Goes through all the formats on an object, and adds all their files to the list of waht is to be rendered, then executes the rendering method.
* @param context
* the eMatrix <code>Context</code> object
* @param objectID
* Object Id
* @exception Exception
* Throws an exception on any mql errors
* @since AEF 9.5.4.0
*/
public void doFiles(Context context, String objectId) throws Exception {
/*
* Author : DJ Date : 02/04/2003 Notes : History :
*/
String command = "print businessobject $1 select format dump $2";
;
String result = MqlUtil.mqlCommand(context, command, objectId, "|");
// Tokenize the return, using testTokenizer to determine if there was a retun
StringTokenizer testTokenizer = new StringTokenizer(result, "\n");
StringTokenizer formatTokenizer = new StringTokenizer(result.substring(0, result.length() - 1), "|");
if (testTokenizer.hasMoreTokens() && !result.trim().equals("\n")) {
LinkedList fileList = new LinkedList();
// iterate through the list of formats, and add them to the list
while (formatTokenizer.hasMoreTokens()) {
String format = formatTokenizer.nextToken();
if (!format.equals("PDF")) {
// Get files for the format
command = "print businessobject $1 select $2 dump $3";
String fileResult = MqlUtil.mqlCommand(context, command, objectId, "format[" + format + "].file", "|");
// iterate through the files, adding them to the file list.
StringTokenizer testTokenizer2 = new StringTokenizer(fileResult, "\n");
StringTokenizer fileTokenizer = new StringTokenizer(fileResult.substring(0, fileResult.length() - 1), "|");
if (testTokenizer2.hasMoreTokens() && !result.trim().equals("\n")) {
while (fileTokenizer.hasMoreTokens()) {
// Attaching the format to the front of the file string,
// so that they can stay associated.
fileList.add(format + "|" + fileTokenizer.nextToken());
}
}
}
}
// Invoke the rendering function
execute(context, objectId, fileList);
}
}
/**
* runs the Adlib PDF Rendering integration (on a seperate Thread) the integration will check out the files, and then poll the output and error directories until it's time runs out
* @param context
* the eMatrix <code>Context</code> object
* @param queue
* The PDF Queue with
* @since AEF 9.5.4.0
*/
protected void runIntegration(Context context, emxPDFQueue_mxJPO queue) {
/*
* Author : DJ Date : 02/04/2003 Notes : History :
*/
String integrationName = _util.getString(context, "eServiceBatchPrintPDF.PDF.Integration");
if (integrationName.equals("emxAdlibRNDIntegration")) {
new emxAdlibRNDIntegration_mxJPO(context, queue).start();
// Insert new else if's here for new integrations
} else { // when in doubt, call the emxAdlibRNDIntegration
new emxAdlibRNDIntegration_mxJPO(context, queue).start();
}
}
}
|
[
"rgarbhe@processia.com"
] |
rgarbhe@processia.com
|
f402f1fcde804c607b209ddec3aaec6f7b1b357a
|
87e7f3f7d47c7a403cd22eef9d3c636a2ae8af52
|
/edu.columbia.rdf.matcalc/src/main/java/edu/columbia/rdf/matcalc/colormap/ColorMapPopupMenu.java
|
fa91615101ba6a6904b8e1a737e8792900b4b17d
|
[
"MIT"
] |
permissive
|
antonybholmes/matcalc
|
e24b2fef26b58047f14ff142769d73494f3fbeab
|
332f8f70e99b78278e7b7973456c70f9e21bcf00
|
refs/heads/master
| 2023-06-28T17:20:59.413963
| 2021-07-24T21:59:29
| 2021-07-24T21:59:29
| 100,638,320
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,577
|
java
|
/**
* Copyright 2016 Antony Holmes
*
* 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 edu.columbia.rdf.matcalc.colormap;
import org.jebtk.modern.AssetService;
import org.jebtk.modern.dialog.ModernDialogStatus;
import org.jebtk.modern.event.ModernClickEvent;
import org.jebtk.modern.graphics.color.ColorPopupMenu;
import org.jebtk.modern.graphics.colormap.ColorMap;
import org.jebtk.modern.graphics.colormap.ColorMapBlockPicker;
import org.jebtk.modern.graphics.colormap.ColorMapService;
import org.jebtk.modern.menu.ModernIconMenuItem;
import org.jebtk.modern.menu.ModernScrollPopupMenu;
import org.jebtk.modern.text.ModernLabel;
import org.jebtk.modern.window.ModernWindow;
/**
* The class ColorPopupMenu.
*/
public class ColorMapPopupMenu extends ModernScrollPopupMenu {
/**
* The constant serialVersionUID.
*/
private static final long serialVersionUID = 1L;
/** The m color map. */
private ColorMap mColorMap = null;
/** The m color map picker. */
private ColorMapBlockPicker mColorMapPicker;
/** The m parent. */
private ModernWindow mParent;
/**
* Instantiates a new color popup menu.
*
* @param parent the parent
*/
public ColorMapPopupMenu(ModernWindow parent) {
mParent = parent;
setBackground(ColorPopupMenu.COLOR_PICKER_BACKGROUND);
// setBorder(BorderFactory.createCompoundBorder(ModernWidget.LINE_BORDER,
// BorderService.getInstance().createBorder(4)));
add(new ModernLabel("Color Maps"));
mColorMapPicker = new ColorMapBlockPicker(5); // new ColorMapPicker(4);
add(mColorMapPicker);
// addScrollMenuItem(new
// ColorMapMenuItem(ColorMap.createWhiteToColorMap("red",
// Color.RED), "Red"));
// addScrollMenuItem(new
// ColorMapMenuItem(ColorMap.createWhiteToColorMap("green", Color.GREEN),
// "Green"));
// addScrollMenuItem(new
// ColorMapMenuItem(ColorMap.createWhiteToColorMap("blue",
// Color.BLUE), "Blue"));
// addScrollMenuItem(new
// ColorMapMenuItem(ColorMap.createWhiteToColorMap("orange", Color.ORANGE),
// "Orange"));
// addScrollMenuItem(new
// ColorMapMenuItem(ColorMap.createWhiteToColorMap("pink",
// Color.PINK), "Pink"));
// add(new ModernMenuDivider());
add(new ModernIconMenuItem("More Color Maps...", AssetService.getInstance().loadIcon("color_wheel", 16))
.setAnimations("color-menu-fade"));
update();
}
/*
* (non-Javadoc)
*
* @see
* org.abh.lib.ui.modern.menu.ModernPopup#clicked(org.abh.lib.ui.modern.event.
* ModernClickEvent)
*/
@Override
public void clicked(ModernClickEvent e) {
if (e.getSource().equals(mColorMapPicker)) {
mColorMap = mColorMapPicker.getSelectedColorMap();
super.clicked(e);
} else if (e.getMessage().equals("More Color Maps...")) {
setVisible(false);
ColorMapsDialog dialog = new ColorMapsDialog(mParent, mColorMap);
dialog.setVisible(true);
if (dialog.getStatus() == ModernDialogStatus.OK) {
mColorMap = dialog.getColorMap();
ColorMapService.getInstance().add(mColorMap);
update();
}
super.clicked(e);
}
}
/**
* Update.
*/
private void update() {
/*
* List<ColorMap> colorMaps = new ArrayList<ColorMap>();
*
* colorMaps.add(ColorMapService.getInstance().get("Jet"));
* colorMaps.add(ColorMapService.getInstance().get("Hot"));
* colorMaps.add(ColorMapService.getInstance().get("Cool"));
* colorMaps.add(ColorMapService.getInstance().get("Spring"));
* colorMaps.add(ColorMapService.getInstance().get("Summer"));
* colorMaps.add(ColorMapService.getInstance().get("Autumn"));
* colorMaps.add(ColorMapService.getInstance().get("Winter"));
* colorMaps.add(ColorMapService.getInstance().get("Gray"));
* colorMaps.add(ColorMapService.getInstance().get("Blue White Red"));
* colorMaps.add(ColorMapService.getInstance().get("Green White Red"));
* colorMaps.add(ColorMapService.getInstance().get("Green Black Red"));
* colorMaps.add(ColorMapService.getInstance().get("Blue Yellow"));
* colorMaps.add(ColorMapService.getInstance().get("White Red"));
* colorMaps.add(ColorMapService.getInstance().get("White Green"));
* colorMaps.add(ColorMapService.getInstance().get("White Blue"));
* colorMaps.add(ColorMap.createWhiteToColorMap("White Purple",
* ColorMap.PURPLE));
* colorMaps.add(ColorMap.createWhiteToColorMap("White Orange",
* ColorMap.ORANGE));
* colorMaps.add(ColorMap.createWhiteToColorMap("White Yellow",
* ColorMap.YELLOW)); colorMaps.add(ColorMap.createWhiteToColorMap("White Pink",
* ColorMap.PINK));
*
* // Add anything the user created
* colorMaps.addAll(ColorMapService.getInstance().getUserMaps().toList());
*/
mColorMapPicker.update(ColorMapService.getInstance().toList()); // colorMaps);
}
/**
* Gets the selected color.
*
* @return the selected color
*/
public ColorMap getSelectedColorMap() {
return mColorMap;
}
}
|
[
"antony.b.holmes@gmail.com"
] |
antony.b.holmes@gmail.com
|
ad3bf2015466aee070822ca9bfc46bc8ac646e4f
|
b6e0056e358aa4068b5d485030e2116400099ca5
|
/practice_chap10(오버라이딩,super)/src/sec01_exam_OverridingTest/HddTest.java
|
56a245dc4853d9978761784275d790687345bf68
|
[] |
no_license
|
harrycjy1/java-bootcamp
|
f0c90dfaefa8639e26110caf514c8997ce0122c8
|
32c580e14c9184045a73c5b34199a53e76571c03
|
refs/heads/master
| 2020-04-02T21:04:39.948115
| 2018-10-26T06:31:02
| 2018-10-26T06:31:02
| null | 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 488
|
java
|
package sec01_exam_OverridingTest;
public class HddTest {
public static void main(String[] args) {
Hddisk hd = new Hddisk(500,720);
UsbMemory um =new UsbMemory(32, 520);//인스턴스를 선언 각각의 클래스의 인스턴스 생성
String strhd = hd.Status();
System.out.println(hd.Status());//super클래스의 메서드 호출
System.out.println(um.Status());//sub클래스의 오버라이딩한 메서드 호출
}
}
|
[
"harrycjy123@gmail.com"
] |
harrycjy123@gmail.com
|
4605d1ccb3a824f4f24a17348f172d482a66ed99
|
5b94759b20aab4a8111e8550631056ecdeb0239a
|
/src/main/java/ak/isaac/theminingofisaac/enemies/projectiles/Projectile.java
|
89ab806a91f193348cfbc7997ae5be18a9c02aa9
|
[] |
no_license
|
AnselmKoch/MiningOfIsaac
|
52587554017e7900a11225ee4318cc108ee3a24c
|
31eb528c4768b1fbef582649dbf2ee39fc7cd18b
|
refs/heads/master
| 2023-01-19T06:52:40.021461
| 2020-12-01T17:19:02
| 2020-12-01T17:19:02
| 316,975,675
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 441
|
java
|
package ak.isaac.theminingofisaac.enemies.projectiles;
import ak.isaac.theminingofisaac.TheMiningOfIsaac;
import ak.isaac.theminingofisaac.helper.MathHelper;
import org.bukkit.Color;
import org.bukkit.Particle;
import org.bukkit.entity.Entity;
public class Projectile {
public void shootProjectile(Particle particle, Entity entity, Entity target) {
entity.getWorld().spawnParticle(particle, entity.getLocation(), 19);
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
8951fe1429cf48b6740839bf1c13615cfa245636
|
52019a46c8f25534afa491a5f68bf5598e68510b
|
/core/metamodel/src/main/java/org/nakedobjects/metamodel/commons/component/Injectable.java
|
119e5ce17793d2ceca1492fc4c312b344fa4ae97
|
[
"Apache-2.0"
] |
permissive
|
JavaQualitasCorpus/nakedobjects-4.0.0
|
e765b4980994be681e5562584ebcf41e8086c69a
|
37ee250d4c8da969eac76749420064ca4c918e8e
|
refs/heads/master
| 2023-08-29T13:48:01.268876
| 2020-06-02T18:07:23
| 2020-06-02T18:07:23
| 167,005,009
| 0
| 1
|
Apache-2.0
| 2022-06-10T22:44:43
| 2019-01-22T14:08:50
|
Java
|
UTF-8
|
Java
| false
| false
| 322
|
java
|
package org.nakedobjects.metamodel.commons.component;
public interface Injectable {
/**
* Will inject itself into the candidate if the candidate implements the corresponding <tt>*Aware</tt>
* type.
*/
void injectInto(Object candidate);
}
// Copyright (c) Naked Objects Group Ltd.
|
[
"taibi@sonar-scheduler.rd.tut.fi"
] |
taibi@sonar-scheduler.rd.tut.fi
|
2b0a3e2d6607cfada36e6b2cb2119e80f8e58c59
|
3d82b386cf05b181211492e8f468f930fde1ae47
|
/interface-example/src/main/java/net/rootls/model/UserData.java
|
28241d679ce67651e3cc0b50a08cd3cb706db17e
|
[] |
no_license
|
x303597316/simple-projects
|
114647a7be6eebc61e95363091c9ad787622cf12
|
0f99fa0ada028854969f2572f89ca0296198f986
|
refs/heads/master
| 2020-12-14T19:04:32.729027
| 2013-03-23T07:54:39
| 2013-03-23T07:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,738
|
java
|
package net.rootls.model;
import org.codehaus.jackson.annotate.JsonProperty;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* Created with IntelliJ IDEA.
* User: luowei
* Date: 13-3-11
* Time: 下午5:09
* To change this template use File | Settings | File Templates.
*/
public class UserData implements Serializable {
Long id;
Long uid;
String productCode;
String productName;
Date startDate;
Date endDate;
public UserData() {
}
public UserData(Long id, Long uid, String productCode, String productName) {
this.id = id;
this.uid = uid;
this.productCode = productCode;
this.productName = productName;
}
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public Long getUid() {
return uid;
}
public void setUid(Long uid) {
this.uid = uid;
}
public String getProductCode() {
return productCode;
}
public void setProductCode(String productCode) {
this.productCode = productCode;
}
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public Date getStartDate() {
return startDate;
}
@DateTimeFormat(iso= DateTimeFormat.ISO.DATE)
public void setStartDate(Date startDate) {
this.startDate = startDate;
}
public Date getEndDate() {
return endDate;
}
@DateTimeFormat(iso= DateTimeFormat.ISO.DATE)
public void setEndDate(Date endDate) {
this.endDate = endDate;
}
}
|
[
"luowei505050@126.com"
] |
luowei505050@126.com
|
c3d86c2fbfce1487ce06abe6dfa827dc45537144
|
65918efbbeeeb43b67afec45b84b767b79054f86
|
/src/main/java/com/wktech/bancosangue/web/rest/vm/ManagedUserVM.java
|
aa821b288de2be8b638584dbabfc26826aa772bb
|
[] |
no_license
|
jeffjras/api-banco-sangue
|
a2bbe03d421619d916868bea90043a6208d30a04
|
cf364e357d595cf821eb2660df1a7ed7f21731f4
|
refs/heads/main
| 2023-02-16T15:06:56.322604
| 2021-01-18T12:47:55
| 2021-01-18T12:47:55
| 328,817,859
| 0
| 0
| null | 2021-01-12T01:47:15
| 2021-01-11T23:29:40
|
Java
|
UTF-8
|
Java
| false
| false
| 860
|
java
|
package com.wktech.bancosangue.web.rest.vm;
import com.wktech.bancosangue.service.dto.UserDTO;
import javax.validation.constraints.Size;
/**
* View Model extending the UserDTO, which is meant to be used in the user management UI.
*/
public class ManagedUserVM extends UserDTO {
public static final int PASSWORD_MIN_LENGTH = 4;
public static final int PASSWORD_MAX_LENGTH = 100;
@Size(min = PASSWORD_MIN_LENGTH, max = PASSWORD_MAX_LENGTH)
private String password;
public ManagedUserVM() {
// Empty constructor needed for Jackson.
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
// prettier-ignore
@Override
public String toString() {
return "ManagedUserVM{" + super.toString() + "} ";
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
bdf00fa783dac4f9d3f08291b3a72b938a7126da
|
0dc4c2b5abc6f833b369fc98d52cb2aab7e5610f
|
/statefun-examples/statefun-ridesharing-example/statefun-ridesharing-example-functions/src/main/java/org/apache/flink/statefun/examples/ridesharing/FnGeoCell.java
|
cf2d39b261774f115a05e497ecb18ff24f08e3f2
|
[
"Apache-2.0",
"LicenseRef-scancode-free-unknown",
"MIT",
"OFL-1.1"
] |
permissive
|
sjwiesman/flink-statefun
|
7d90da0cac008694505c45b4d71d6fd012ba2999
|
647fa9c436befec5bcd4a28514c72951b286f687
|
refs/heads/master
| 2021-12-24T03:57:22.640918
| 2020-11-23T16:37:56
| 2020-11-23T16:37:56
| 237,283,312
| 1
| 0
|
Apache-2.0
| 2021-02-22T19:06:35
| 2020-01-30T18:57:03
|
Java
|
UTF-8
|
Java
| false
| false
| 3,142
|
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.flink.statefun.examples.ridesharing;
import org.apache.flink.statefun.examples.ridesharing.generated.*;
import org.apache.flink.statefun.sdk.Address;
import org.apache.flink.statefun.sdk.Context;
import org.apache.flink.statefun.sdk.FunctionType;
import org.apache.flink.statefun.sdk.StatefulFunction;
import org.apache.flink.statefun.sdk.annotations.Persisted;
import org.apache.flink.statefun.sdk.state.PersistedValue;
public class FnGeoCell implements StatefulFunction {
static final FunctionType TYPE = new FunctionType(Identifiers.NAMESPACE, "geo-cell");
@Persisted
private final PersistedValue<GeoCellState> drivers =
PersistedValue.of("drivers", GeoCellState.class);
@Override
public void invoke(Context context, Object input) {
Address caller = context.caller();
if (input instanceof JoinCell) {
addDriver(caller);
} else if (input instanceof LeaveCell) {
removeDriver(caller);
} else if (input instanceof GetDriver) {
getDriver(context);
} else {
throw new IllegalStateException("Unknown message type " + input);
}
}
private void getDriver(Context context) {
final GeoCellState state = drivers.get();
if (hasDriver(state)) {
String nextDriverId = state.getDriverIdList().get(0);
context.reply(DriverInCell.newBuilder().setDriverId(nextDriverId).build());
} else {
context.reply(DriverInCell.newBuilder().build());
}
}
private void addDriver(Address driver) {
GeoCellState state = drivers.get();
if (state == null) {
state = GeoCellState.newBuilder().addDriverId(driver.id()).build();
} else {
state = state.toBuilder().addDriverId(driver.id()).build();
}
drivers.set(state);
}
private void removeDriver(Address driver) {
GeoCellState state = drivers.get();
if (state == null) {
return;
}
GeoCellState.Builder nextState = state.toBuilder();
nextState.clearDriverId();
for (String otherDriverID : state.getDriverIdList()) {
if (!otherDriverID.equals(driver.id())) {
nextState.addDriverId(otherDriverID);
}
}
drivers.set(nextState.build());
}
private boolean hasDriver(GeoCellState registeredDrivers) {
return registeredDrivers != null && !registeredDrivers.getDriverIdList().isEmpty();
}
}
|
[
"sewen@apache.org"
] |
sewen@apache.org
|
bf8484808c7932472509e25f1043586050580ac2
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_066a792fd7488abf4508d0c750ae36568d8558a8/GenericHibernateDao/2_066a792fd7488abf4508d0c750ae36568d8558a8_GenericHibernateDao_t.java
|
90fc9f07700fbe03e05d363bedb625f3a678c84a
|
[] |
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
| 3,945
|
java
|
/*
Copyright 2011 Monits
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.
*/
/**
* Generic Hibernate Dao.
*
* @copyright 2010 Monits
* @license Apache 2.0 License
* @version Release: 1.0.0
* @link http://www.monits.com/
* @since 1.0.0
*/
package com.monits.commons.dao;
import java.lang.reflect.ParameterizedType;
import java.util.List;
import org.hibernate.Criteria;
import org.hibernate.SessionFactory;
import org.hibernate.criterion.Projections;
import com.google.common.base.Preconditions;
import com.monits.commons.PaginatedResult;
import com.monits.commons.model.Builder;
/**
* Generic Hibernate Dao.
*
* Beware, the generics must be bound in the class definition.
* <pre> {@code
* private class MyGenericDao<T extends MyModel> extends GenericHibernateDao<T> {}
* MyGenericDao<MyChildModel> dao = new MyGenericDao<MyChildModel>(session); // This will throw an exception!
* } </pre>
*
* @author lbritez <lbritez@monits.com>
* @copyright 2010 Monits
* @license Apache 2.0 License
* @version Release: 1.0.0
* @link http://www.monits.com/
* @since 1.0.0
*/
public abstract class GenericHibernateDao<E> implements GenericDao<E> {
protected SessionFactory sessionFactory;
protected Class<? extends E> eClass;
/**
* Creates a new instance of a GenericHibernateDao
* @param sessionFactory The session factory to be used.
*/
@SuppressWarnings("unchecked")
public GenericHibernateDao(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
// Get the generic class
ParameterizedType type = (ParameterizedType) getClass().getGenericSuperclass();
this.eClass = (Class<? extends E>) type.getActualTypeArguments()[0];
}
@SuppressWarnings("unchecked")
@Override
public E get(Long id) {
Preconditions.checkNotNull(id);
// Warning are suppressed as we are getting an E element
return (E) sessionFactory.getCurrentSession().get(eClass, id);
}
@Override
public List<? extends E> getAll() {
// Warning are suppressed as we are getting an E list
@SuppressWarnings("unchecked")
List<? extends E> results = createCriteria().list();
return results;
}
/**
* Creates a session of criteria.
*
* @return The session.
*/
protected Criteria createCriteria() {
return sessionFactory.getCurrentSession().createCriteria(eClass);
}
@SuppressWarnings("unchecked")
@Override
public PaginatedResult<E> getAll(int page, int amount) {
Preconditions.checkArgument(page >= 0, "Invalid page " + page);
Preconditions.checkArgument(amount > 0, "Invalid amount " + amount);
int totalElements =
((Integer) createCriteria().setProjection(Projections.rowCount())
.uniqueResult());
Criteria criteria = createCriteria();
criteria.setFirstResult(page * amount);
criteria.setMaxResults(amount);
return new PaginatedResult<E>(page + 1, criteria.list(), totalElements, amount);
}
@Override
public void delete(E entity) {
Preconditions.checkNotNull(entity);
sessionFactory.getCurrentSession().delete(entity);
}
@Override
public E create(Builder<E> builder) {
E entity = builder.build();
sessionFactory.getCurrentSession().save(entity);
return entity;
}
@Override
public void update(E entity) {
sessionFactory.getCurrentSession().update(entity);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
84ca89114533556cb2b935b3df09a840070b2fe1
|
66131ad555254844b2d704c837353b86383c40cf
|
/org.spotter.ext.detection.collection/src/org/spotter/ext/detection/appHiccups/AppHiccupsExtension.java
|
47013663e74b4caea585c64b63ff9759cc7753f7
|
[
"Apache-2.0"
] |
permissive
|
sopeco/DynamicSpotter-Extensions
|
d0e03a73179a2d2b7073c54c1c71bd153e266882
|
849ebe8a4eb8097a960363eb50ca911234f2767b
|
refs/heads/master
| 2018-12-28T07:16:03.845545
| 2015-03-26T15:55:11
| 2015-03-26T15:55:11
| 22,246,867
| 0
| 1
| null | 2015-03-26T15:55:11
| 2014-07-25T06:07:14
|
Java
|
UTF-8
|
Java
| false
| false
| 2,854
|
java
|
package org.spotter.ext.detection.appHiccups;
import java.util.HashSet;
import java.util.Set;
import org.lpe.common.config.ConfigParameterDescription;
import org.lpe.common.util.LpeSupportedTypes;
import org.spotter.core.detection.AbstractDetectionExtension;
import org.spotter.core.detection.IDetectionController;
import org.spotter.ext.detection.appHiccups.utils.HiccupDetectionConfig;
/**
* Extension for Application Hiccups Detection.
*
* @author Alexander Wert
*
*/
public class AppHiccupsExtension extends AbstractDetectionExtension {
private static final String EXTENSION_DESCRIPTION = "Application Hiccups "
+ "represents the problem of periodically violated performancerequirements.";
protected static final String APP_HICCUPS_STRATEGY_KEY = "strategy";
protected static final String MVA_STRATEGY = "moving percentile analysis";
protected static final String DBSCAN_STRATEGY = "DBSCAN analysis";
protected static final String BUCKET_STRATEGY = "bucket analysis";
protected static final String MAX_HICCUPS_TIME_PROPORTION_KEY = "maxHiccupsTimeProportion";
protected static final double MAX_HICCUPS_TIME_PROPORTION_DEFAULT = 0.3;
@Override
public IDetectionController createExtensionArtifact() {
return new AppHiccupsController(this);
}
@Override
public String getName() {
return "Application Hiccups";
}
private ConfigParameterDescription createStrategyParameter() {
ConfigParameterDescription scopeParameter = new ConfigParameterDescription(APP_HICCUPS_STRATEGY_KEY,
LpeSupportedTypes.String);
Set<String> scopeOptions = new HashSet<>();
scopeOptions.add(MVA_STRATEGY);
scopeOptions.add(BUCKET_STRATEGY);
scopeOptions.add(DBSCAN_STRATEGY);
scopeParameter.setOptions(scopeOptions);
scopeParameter.setDefaultValue(MVA_STRATEGY);
scopeParameter.setDescription("This parameter determines the strategy, "
+ "used to analyse application hiccups.");
return scopeParameter;
}
private ConfigParameterDescription maxHiccupTimeProportionParameter() {
ConfigParameterDescription parameter = new ConfigParameterDescription(MAX_HICCUPS_TIME_PROPORTION_KEY,
LpeSupportedTypes.Double);
parameter.setMandatory(false);
parameter.setDefaultValue(String.valueOf(MAX_HICCUPS_TIME_PROPORTION_DEFAULT));
parameter.setDescription("This parameter determines the maximum allowed proportion "
+ "in time the hiccups may cover of the overall experiment time.");
return parameter;
}
@Override
protected void initializeConfigurationParameters() {
addConfigParameter(ConfigParameterDescription.createExtensionDescription(EXTENSION_DESCRIPTION));
addConfigParameter(createStrategyParameter());
addConfigParameter(maxHiccupTimeProportionParameter());
for (ConfigParameterDescription cpd : HiccupDetectionConfig.getConfigurationParameters()) {
addConfigParameter(cpd);
}
}
}
|
[
"alexander.wert@sap.com"
] |
alexander.wert@sap.com
|
62fd0979a54a6ad1ee673e5766ec3e96efb5f6a0
|
3f7faa87000832c92213eb065fffe5ffb922dffb
|
/src/main/java/org/apache/ibatis/executor/keygen/NoKeyGenerator.java
|
31787dc7c914808261d85a203cd5067e9cd47194
|
[
"BSD-3-Clause",
"Apache-2.0"
] |
permissive
|
allanim/mybatis-3
|
23bdd3d26ed6be3c7255baa5a119c4139784ca74
|
1982c68a5937172e518a3a3689c1eb35f0d0055f
|
refs/heads/master
| 2022-07-22T18:32:13.689568
| 2013-04-25T14:39:43
| 2013-04-25T14:39:43
| 9,728,776
| 0
| 0
|
Apache-2.0
| 2022-06-29T19:34:52
| 2013-04-28T10:38:30
|
Java
|
UTF-8
|
Java
| false
| false
| 1,073
|
java
|
/*
* Copyright 2009-2011 The MyBatis Team
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.ibatis.executor.keygen;
import java.sql.Statement;
import org.apache.ibatis.executor.Executor;
import org.apache.ibatis.mapping.MappedStatement;
public class NoKeyGenerator implements KeyGenerator {
public void processBefore(Executor executor, MappedStatement ms, Statement stmt, Object parameter) {
}
public void processAfter(Executor executor, MappedStatement ms, Statement stmt, Object parameter) {
}
}
|
[
"eduardo.macarron@gmail.com"
] |
eduardo.macarron@gmail.com
|
24243905f277fc7c77868ab8b1a7ed7c7e396ad1
|
3db66fd312ba97b3a33acb9d639d8d6fbdd8df4d
|
/eo-runtime/src/main/java/org/eolang/AtPhiSensitive.java
|
14124b082fc23cf05b1fa6b085c8d58cddb8441a
|
[
"MIT"
] |
permissive
|
alex-semenyuk/eo
|
6c0ba7eb8c5f5514b4a635ed82b4fe9666afa096
|
0e58e2932cb9a7061a9d366346471e67e2da8428
|
refs/heads/master
| 2022-08-26T12:49:00.920369
| 2022-08-11T16:33:37
| 2022-08-11T16:33:37
| 75,278,677
| 2
| 0
| null | 2016-12-01T09:52:16
| 2016-12-01T09:52:16
| null |
UTF-8
|
Java
| false
| false
| 2,301
|
java
|
/*
* The MIT License (MIT)
*
* Copyright (c) 2016-2022 Yegor Bugayenko
*
* 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 NON-INFRINGEMENT. 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.eolang;
/**
* This attribute encapsulates \phi and resets its owner
* when it's being put().
*
* This class is thread-safe.
*
* @since 0.22
*/
final class AtPhiSensitive implements Attr {
/**
* The \phi attribute.
*/
private final Attr origin;
/**
* The cache.
*/
private final CachedPhi cached;
/**
* Ctor.
* @param aphi The \origin object
* @param cache The owner of \origin
*/
AtPhiSensitive(final Attr aphi, final CachedPhi cache) {
this.origin = aphi;
this.cached = cache;
}
@Override
public String toString() {
return this.origin.toString();
}
@Override
public String φTerm() {
return this.origin.φTerm();
}
@Override
public Attr copy(final Phi obj) {
return new AtPhiSensitive(this.origin.copy(obj), this.cached);
}
@Override
public Phi get() {
return this.origin.get();
}
@Override
public void put(final Phi obj) {
synchronized (this.origin) {
this.origin.put(obj);
this.cached.reset();
}
}
}
|
[
"yegor256@gmail.com"
] |
yegor256@gmail.com
|
92a06c0b228e52e7eccd18fac9094b5051590b2d
|
861565bf66c0a32386c4c3e8e82c9a068b740517
|
/fixture/src/main/java/org/isisaddons/module/security/fixture/scripts/SecurityModuleAppFixturesService.java
|
307169c68585608a3355d69efc45607cc85b5429
|
[
"Apache-2.0"
] |
permissive
|
lazycathome/isis-module-security
|
68d07208f9e50c25faca8a9bf940078122ba6847
|
a9deb1b003ba01e44c859085bd078be8df0c1863
|
refs/heads/master
| 2021-01-02T08:49:45.315521
| 2017-02-19T19:06:36
| 2017-02-19T19:06:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,894
|
java
|
/*
* Copyright 2014 Dan Haywood
*
* 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.isisaddons.module.security.fixture.scripts;
import java.util.List;
import org.apache.isis.applib.annotation.Action;
import org.apache.isis.applib.annotation.DomainService;
import org.apache.isis.applib.annotation.DomainServiceLayout;
import org.apache.isis.applib.annotation.MemberOrder;
import org.apache.isis.applib.annotation.NatureOfService;
import org.apache.isis.applib.annotation.Optionality;
import org.apache.isis.applib.annotation.Parameter;
import org.apache.isis.applib.annotation.ParameterLayout;
import org.apache.isis.applib.annotation.RestrictTo;
import org.apache.isis.applib.annotation.SemanticsOf;
import org.apache.isis.applib.fixturescripts.FixtureResult;
import org.apache.isis.applib.fixturescripts.FixtureScript;
import org.apache.isis.applib.fixturescripts.FixtureScripts;
import org.isisaddons.module.security.dom.role.ApplicationRole;
/**
* Enables fixtures to be installed from the application.
*/
@DomainService(
nature = NatureOfService.VIEW_MENU_ONLY,
objectType = "isissecurityDemo.FixturesService"
)
@DomainServiceLayout(
named="Prototyping",
menuOrder = "99",
menuBar = DomainServiceLayout.MenuBar.SECONDARY
)
// TODO: convert to FixtureScriptsSpecificationProvider
public class SecurityModuleAppFixturesService extends FixtureScripts {
//region > constructor
public SecurityModuleAppFixturesService() {
super(SecurityModuleAppFixturesService.class.getPackage().getName());
}
//endregion
//region > runFixtureScript
@Override
public List<FixtureResult> runFixtureScript(
final FixtureScript fixtureScript,
@Parameter(optionality = Optionality.OPTIONAL)
@ParameterLayout(
named = "Parameters",
describedAs = "Script-specific parameters (if any). The format depends on the script implementation (eg key=value, CSV, JSON, XML etc)",
multiLine = 10
)
final String parameters) {
return super.runFixtureScript(fixtureScript, parameters);
}
@Override
public FixtureScript default0RunFixtureScript() {
return findFixtureScriptFor(SecurityModuleAppSetUp.class);
}
/**
* Raising visibility to <tt>public</tt> so that choices are available for first param
* of {@link #runFixtureScript(FixtureScript, String)}.
*/
@Override
public List<FixtureScript> choices0RunFixtureScript() {
return super.choices0RunFixtureScript();
}
//endregion
//region > installFixturesAndReturnFirstRole
@Action(
semantics = SemanticsOf.NON_IDEMPOTENT,
restrictTo = RestrictTo.PROTOTYPING
)
@MemberOrder(sequence="20")
public Object installFixturesAndReturnFirstRole() {
final List<FixtureResult> fixtureResultList = findFixtureScriptFor(SecurityModuleAppSetUp.class).run(null);
for (FixtureResult fixtureResult : fixtureResultList) {
final Object object = fixtureResult.getObject();
if(object instanceof ApplicationRole) {
return object;
}
}
getContainer().warnUser("No rules found in fixture; returning all results");
return fixtureResultList;
}
//endregion
}
|
[
"dan@haywood-associates.co.uk"
] |
dan@haywood-associates.co.uk
|
bb5d41e7fa65c3a8d55fba444fc2566e9e4eaf30
|
b2a37f46a4c64621e7a9cf74d9f12b4b6e36ff93
|
/src/main/java/com/herton/module/pos/orderform/domain/PosOrderSku.java
|
258a876b912606fb5db3d864239bc80019d198b1
|
[] |
no_license
|
herton7362/invoicing
|
7974e7195529c8c751983eba15886bf9c13a535a
|
b0b2d9c21c8b001c4f746c0bee4d8dcd27311a44
|
refs/heads/master
| 2018-10-16T05:02:48.906604
| 2018-08-14T08:30:33
| 2018-08-14T08:30:33
| 124,479,445
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 586
|
java
|
package com.herton.module.pos.orderform.domain;
import com.herton.entity.BaseEntity;
import lombok.Getter;
import lombok.Setter;
import javax.persistence.Column;
import javax.persistence.Entity;
@Getter
@Setter
@Entity
public class PosOrderSku extends BaseEntity {
@Column(length = 36)
private String posOrderId;
@Column(length = 36)
private String goodsId;
@Column(length = 36)
private String skuId;
@Column(length = 11, scale = 2, precision = 13)
private Double count;
@Column(length = 11, scale = 2, precision = 13)
private Double price;
}
|
[
"he.tang@everydayratings.com"
] |
he.tang@everydayratings.com
|
f10f6c7e83d82bc74129ff3da032502d0435dfa4
|
32d70784dedff6e1738d3a498c315a1b6fefde82
|
/concurrentdemo/src/main/java/com/art2cat/dev/concurrency/concurrency_in_practice/atomic_variables_and_nonblocking_synchronization/SimulatedCAS.java
|
5678428366e21cb1095806071efdfa038ddf1c39
|
[] |
no_license
|
UncleTian/JavaDemo
|
125fb9ad6709ddfe55c00de97a4bdcf8a77402c7
|
1cfb26e6b5c5df8ddb90a24f628b49d6987ffdfa
|
refs/heads/master
| 2020-03-24T17:19:56.713230
| 2018-07-18T09:54:47
| 2018-07-18T09:54:47
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 762
|
java
|
package com.art2cat.dev.concurrency.concurrency_in_practice.atomic_variables_and_nonblocking_synchronization;
/**
* SimulatedCAS
* <p/>
* Simulated CAS operation
*
* @author Brian Goetz and Tim Peierls
*/
public class SimulatedCAS {
private int value;
public synchronized int get() {
return value;
}
public synchronized int compareAndSwap(int expectedValue,
int newValue) {
int oldValue = value;
if (oldValue == expectedValue) {
value = newValue;
}
return oldValue;
}
public synchronized boolean compareAndSet(int expectedValue,
int newValue) {
return (expectedValue
== compareAndSwap(expectedValue, newValue));
}
}
|
[
"yiming.whz@gmail.com"
] |
yiming.whz@gmail.com
|
8604b8a686c4c85fbbd659696ed0371ab1d47c09
|
005553bcc8991ccf055f15dcbee3c80926613b7f
|
/generated/pcftest/UserDetailInputSet.java
|
b359fe0a831ff8f9aa1bc67e6b01ba1e88758bff
|
[] |
no_license
|
azanaera/toggle-isbtf
|
5f14209cd87b98c123fad9af060efbbee1640043
|
faf991ec3db2fd1d126bc9b6be1422b819f6cdc8
|
refs/heads/master
| 2023-01-06T22:20:03.493096
| 2020-11-16T07:04:56
| 2020-11-16T07:04:56
| 313,212,938
| 0
| 0
| null | 2020-11-16T08:48:41
| 2020-11-16T06:42:23
| null |
UTF-8
|
Java
| false
| false
| 6,458
|
java
|
package pcftest;
import gw.lang.SimplePropertyProcessing;
import gw.smoketest.platform.web.BooleanValueElement;
import gw.smoketest.platform.web.ClickableActionElement;
import gw.smoketest.platform.web.OptionElement;
import gw.smoketest.platform.web.PCFElement;
import gw.smoketest.platform.web.PCFElementId;
import gw.smoketest.platform.web.SelectElement;
import gw.smoketest.platform.web.ValueElement;
import gw.testharness.ISmokeTest;
import javax.annotation.processing.Generated;
import pcftest.UserDetailInputSet.BackupUser;
import pcftest.UserDetailInputSet.BackupUser.BackupUserUserSearchMenuItem;
import pcftest.UserDetailInputSet.BackupUser.BackupUserUserSelectMenuItem;
import pcftest.UserDetailInputSet.Name;
import pcftest.UserDetailInputSet.VacationStatus;
import typekey.VacationStatusType;
@SimplePropertyProcessing
@Generated(comments = "config/web/pcf/shared/preferences/UserDetailInputSet.pcf", date = "", value = "com.guidewire.pcfgen.PCFClassGenerator")
public class UserDetailInputSet extends PCFElement {
public final static String CHECKSUM = "44b8284991d8c63015363b553cebcbfd";
public UserDetailInputSet(ISmokeTest helper, PCFElementId componentId) {
super(helper, componentId);
}
public BooleanValueElement getAccountLocked() {
return getOrCreateProperty("AccountLocked", "AccountLocked", null, gw.smoketest.platform.web.BooleanValueElement.class);
}
public BooleanValueElement getActive() {
return getOrCreateProperty("Active", "Active", null, gw.smoketest.platform.web.BooleanValueElement.class);
}
public BackupUser getBackupUser() {
return getOrCreateProperty("BackupUser", "BackupUser", null, pcftest.UserDetailInputSet.BackupUser.class);
}
public ValueElement getConfirmInputWidget() {
return getOrCreateProperty("ConfirmInputWidget", "ConfirmInputWidget", null, gw.smoketest.platform.web.ValueElement.class);
}
public Name getName() {
return getOrCreateProperty("Name", "Name", null, pcftest.UserDetailInputSet.Name.class);
}
public ValueElement getOldPasswordInputWidget() {
return getOrCreateProperty("OldPasswordInputWidget", "OldPasswordInputWidget", null, gw.smoketest.platform.web.ValueElement.class);
}
public ValueElement getPasswordInputWidget() {
return getOrCreateProperty("PasswordInputWidget", "PasswordInputWidget", null, gw.smoketest.platform.web.ValueElement.class);
}
public ValueElement getSessionTimeout() {
return getOrCreateProperty("SessionTimeout", "SessionTimeout", null, gw.smoketest.platform.web.ValueElement.class);
}
public ValueElement getUsername() {
return getOrCreateProperty("Username", "Username", null, gw.smoketest.platform.web.ValueElement.class);
}
public VacationStatus getVacationStatus() {
return getOrCreateProperty("VacationStatus", "VacationStatus", null, pcftest.UserDetailInputSet.VacationStatus.class);
}
@SimplePropertyProcessing
@Generated(comments = "config/web/widgets/UserWidget.xml", date = "", value = "com.guidewire.pcfgen.PCFClassGenerator")
public static class BackupUser extends SelectElement {
public BackupUser(ISmokeTest helper, PCFElementId componentId) {
super(helper, componentId);
}
public BackupUserUserSearchMenuItem getBackupUserUserSearchMenuItem() {
return getOrCreateProperty("BackupUserUserSearchMenuItem", "BackupUserUserSearchMenuItem", null, pcftest.UserDetailInputSet.BackupUser.BackupUserUserSearchMenuItem.class);
}
public BackupUserUserSelectMenuItem getBackupUserUserSelectMenuItem() {
return getOrCreateProperty("BackupUserUserSelectMenuItem", "BackupUserUserSelectMenuItem", null, pcftest.UserDetailInputSet.BackupUser.BackupUserUserSelectMenuItem.class);
}
@SimplePropertyProcessing
@Generated(comments = "config/web/widgets/UserWidget.xml", date = "", value = "com.guidewire.pcfgen.PCFClassGenerator")
public static class BackupUserUserSearchMenuItem extends ClickableActionElement {
public BackupUserUserSearchMenuItem(ISmokeTest helper, PCFElementId componentId) {
super(helper, componentId);
}
public UserSearchPopup click() {
return clickThis(pcftest.UserSearchPopup.class);
}
}
@SimplePropertyProcessing
@Generated(comments = "config/web/widgets/UserWidget.xml", date = "", value = "com.guidewire.pcfgen.PCFClassGenerator")
public static class BackupUserUserSelectMenuItem extends ClickableActionElement {
public BackupUserUserSelectMenuItem(ISmokeTest helper, PCFElementId componentId) {
super(helper, componentId);
}
public UserSelectPopup click() {
return clickThis(pcftest.UserSelectPopup.class);
}
}
}
@SimplePropertyProcessing
@Generated(comments = "config/web/pcf/shared/preferences/UserDetailInputSet.pcf", date = "", value = "com.guidewire.pcfgen.PCFClassGenerator")
public static class Name extends PCFElement {
public Name(ISmokeTest helper, PCFElementId componentId) {
super(helper, componentId);
}
public GlobalPersonNameInputSet_Japan getGlobalPersonNameInputSet_Japan() {
return getOrCreateProperty("GlobalPersonNameInputSet_Japan", "GlobalPersonNameInputSet", null, pcftest.GlobalPersonNameInputSet_Japan.class);
}
public GlobalPersonNameInputSet_default getGlobalPersonNameInputSet_default() {
return getOrCreateProperty("GlobalPersonNameInputSet_default", "GlobalPersonNameInputSet", null, pcftest.GlobalPersonNameInputSet_default.class);
}
}
@SimplePropertyProcessing
@Generated(comments = "config/web/pcf/shared/preferences/UserDetailInputSet.pcf", date = "", value = "com.guidewire.pcfgen.PCFClassGenerator")
public static class VacationStatus extends SelectElement {
public VacationStatus(ISmokeTest helper, PCFElementId componentId) {
super(helper, componentId);
}
public OptionElement getOptionByTypeKey(VacationStatusType arg) {
return getOptionByValue(arg == null ? null : arg.getCode());
}
public VacationStatusType getTypeKeyValue() {
String myValue = getValue();return myValue == null || myValue.isEmpty() ? null : typekey.VacationStatusType.getTypeKey(myValue);
}
public void setTypeKeyValue(VacationStatusType arg) {
setValue(arg == null ? null : arg.getCode());
}
}
}
|
[
"azanaera691@gmail.com"
] |
azanaera691@gmail.com
|
6f44abaeea8b17cee33b89041137651e920e1cb2
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-13544-8-1-NSGA_II-WeightedSum:TestLen:CallDiversity/org/xwiki/display/internal/DefaultDocumentDisplayer_ESTest.java
|
c800a5771eb829aa422d8642fef0a7cfa6613172
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 581
|
java
|
/*
* This file was automatically generated by EvoSuite
* Sat Jan 18 22:56:40 UTC 2020
*/
package org.xwiki.display.internal;
import org.junit.Test;
import static org.junit.Assert.*;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(useVFS = true, useJEE = true)
public class DefaultDocumentDisplayer_ESTest extends DefaultDocumentDisplayer_ESTest_scaffolding {
@Test
public void notGeneratedAnyTest() {
// EvoSuite did not generate any tests
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
cd7b2966af926e551399268326248f6d6a0c6c6a
|
ff05688835bbedd74e2f6655804a4637d3b32515
|
/function/src/main/java/com/mastfrog/function/FloatPetaConsumer.java
|
b555565d5c324791f2315c85e8d9f327ffa3d9fb
|
[] |
no_license
|
timboudreau/util
|
cf2d60588368dada45731ca31ad8a98cff880289
|
0816dad90fb627e7acb7a792ba73966cc4c0a977
|
refs/heads/master
| 2023-08-07T13:53:35.680182
| 2023-03-26T06:17:41
| 2023-03-26T06:17:41
| 9,271,429
| 6
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,560
|
java
|
/*
* The MIT License
*
* Copyright 2020 Mastfrog Technologies.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
package com.mastfrog.function;
/**
*
* @author Tim Boudreau
*/
@FunctionalInterface
public interface FloatPetaConsumer {
void accept(float a, float b, float c, float d, float e);
default FloatPetaConsumer andThen(FloatPetaConsumer other) {
assert other != this;
return (a, b, c, d, e) -> {
accept(a, b, c, d, e);
other.accept(a, b, c, d, e);
};
}
}
|
[
"tim@timboudreau.com"
] |
tim@timboudreau.com
|
5ebeb92ef26ba4ad95df0427a10a6824fec9eaed
|
5dba7b0c994a524018e9e0bb9ce2507b191cbfbe
|
/app-service-updater/src/main/java/ru/ezhov/updater/SwingWorkerApp.java
|
a486a2858f29e171bb90220c6afcb9c0cfa12608
|
[] |
no_license
|
ezhov-da/ujacs
|
a8ca98ef77808566588d957c3e21fca6ecefe870
|
6a67c5169db5d430cb5b3691a9e8807e9f6e7b71
|
refs/heads/master
| 2022-10-02T07:45:15.349286
| 2019-11-02T15:42:53
| 2019-11-02T15:42:53
| 50,615,782
| 0
| 0
| null | 2022-09-01T22:34:01
| 2016-01-28T21:40:26
|
Java
|
UTF-8
|
Java
| false
| false
| 1,149
|
java
|
package ru.ezhov.updater;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.SwingWorker;
import ru.ezhov.updater.frame.WindowNotify;
import ru.ezhov.ujatools.JOptionPaneError;
/**
*
* @author ezhov_da
*/
public class SwingWorkerApp extends SwingWorker<Object, Object>
{
private static final Logger LOG = Logger.getLogger(SwingWorkerApp.class.getName());
private WindowNotify windowNotify;
public SwingWorkerApp()
{
windowNotify = WindowNotify.getInstance();
windowNotify.setVisible(true);
}
@Override
protected Object doInBackground() throws Exception
{
try
{
LoaderAndRunner loaderAndRunner = new LoaderAndRunner();
loaderAndRunner.loadAndRun();
LOG.log(Level.INFO, "Приложение запустилось");
} catch (Exception ex)
{
JOptionPaneError.showErrorMsg("Ошибка запуска \"Сервиса приложений\".", ex);
}
return "";
}
@Override
protected void done()
{
windowNotify.setVisible(false);
}
}
|
[
"ezhdenis@yandex.ru"
] |
ezhdenis@yandex.ru
|
d7e7c120791e600ae4be0bce057bb96e801631e5
|
7e651dc44a5fd2b636003958d7e5a283e1828318
|
/minecraft/net/minecraft/block/properties/PropertyDirection.java
|
2e3e7be4b49b18c289958b10234c223b1f96f114
|
[] |
no_license
|
Niklas61/CandyClient
|
b05a1edc0d360dacc84fed7944bce5dc0a873be4
|
97e317aaacdcf029b8e87960adab4251861371eb
|
refs/heads/master
| 2023-04-24T15:48:59.747252
| 2021-05-12T16:54:32
| 2021-05-12T16:54:32
| 352,600,734
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,220
|
java
|
package net.minecraft.block.properties;
import com.google.common.base.Predicate;
import com.google.common.base.Predicates;
import com.google.common.collect.Collections2;
import com.google.common.collect.Lists;
import net.minecraft.util.EnumFacing;
import java.util.Collection;
public class PropertyDirection extends PropertyEnum<EnumFacing>
{
protected PropertyDirection(String name, Collection<EnumFacing> values)
{
super(name, EnumFacing.class, values);
}
/**
* Create a new PropertyDirection with the given name
*/
public static PropertyDirection create(String name)
{
return create(name, Predicates.alwaysTrue());
}
/**
* Create a new PropertyDirection with all directions that match the given Predicate
*/
public static PropertyDirection create(String name, Predicate<EnumFacing> filter)
{
return create(name, Collections2.filter(Lists.newArrayList(EnumFacing.values()), filter));
}
/**
* Create a new PropertyDirection for the given direction values
*/
public static PropertyDirection create(String name, Collection<EnumFacing> values)
{
return new PropertyDirection(name, values);
}
}
|
[
"unconfigured@null.spigotmc.org"
] |
unconfigured@null.spigotmc.org
|
c8d0d0458abb31627476eb39cd40f918fa55c97e
|
c6cd1b0c8c465e12aaba21e610788af98d860e86
|
/src/main/java/fr/adrienbrault/idea/symfony2plugin/extension/PluginConfigurationExtensionParameter.java
|
23bcc66401b94a2698aa19d66e881d173a603401
|
[
"MIT"
] |
permissive
|
Haehnchen/idea-php-symfony2-plugin
|
41c8a38761333d9a9283e47490e0d24c42cd8b32
|
a50a2fad93b02bebe03ffb23d67095f632b7b7d7
|
refs/heads/master
| 2023-09-03T18:15:34.639587
| 2023-09-03T08:01:11
| 2023-09-03T08:01:11
| 9,279,386
| 679
| 144
|
MIT
| 2023-09-03T08:01:12
| 2013-04-07T16:25:16
|
Java
|
UTF-8
|
Java
| false
| false
| 853
|
java
|
package fr.adrienbrault.idea.symfony2plugin.extension;
import com.intellij.openapi.project.Project;
import org.jetbrains.annotations.NotNull;
import java.util.HashSet;
import java.util.Set;
/**
* @author Daniel Espendiller <daniel@espendiller.net>
*/
public class PluginConfigurationExtensionParameter {
@NotNull
private final Project project;
private final Set<String> templateUsageMethod = new HashSet<>();
public PluginConfigurationExtensionParameter(@NotNull Project project) {
this.project = project;
}
@NotNull
public Project getProject() {
return project;
}
@Deprecated
public void addTemplateUsageMethod(@NotNull String methodName) {
templateUsageMethod.add(methodName);
}
public Set<String> getTemplateUsageMethod() {
return templateUsageMethod;
}
}
|
[
"daniel@espendiller.net"
] |
daniel@espendiller.net
|
07ef8cfbb1ddfa2bf7d17dfcbf2268c93bdc3218
|
9e632588def0ba64442d92485b6d155ccb89a283
|
/mx-webadmin/webadmin-service/src/main/java/com/balicamp/service/user/ApprovalManager.java
|
e7fa2046715b18e304a22d466fe1a646a657fab9
|
[] |
no_license
|
prihako/sims2019
|
6986bccbbd35ec4d1e5741aa77393f01287d752a
|
f5e82e3d46c405d4c3c34d529c8d67e8627adb71
|
refs/heads/master
| 2022-12-21T07:38:06.400588
| 2021-04-29T07:30:37
| 2021-04-29T07:30:37
| 212,565,332
| 0
| 0
| null | 2022-12-16T00:41:00
| 2019-10-03T11:41:00
|
Java
|
UTF-8
|
Java
| false
| false
| 2,493
|
java
|
package com.balicamp.service.user;
import java.util.List;
import java.util.Set;
import com.balicamp.model.mx.PriorityRouting;
import com.balicamp.model.mx.TransactionFee;
import com.balicamp.model.user.Approval;
import com.balicamp.model.user.User;
import com.balicamp.service.GenericManager;
public interface ApprovalManager extends GenericManager<Approval, Long> {
List<Approval> findPriorityApproval();
List<Approval> findPriorityApproval(String criteria, String keys, int first, int max);
List<Approval> findPricingApproval();
List<Approval> findPricingApproval(String keys, int first, int max);
int findCountPriorityApproval();
int findCountPricingApproval();
int findCountPriorityApproval(String criteria, String keys);
int findCountPricingApproval(String keys);
List<Approval> findPriorityApproval(int first, int max);
List<Approval> findPricingApproval(int first, int max);
boolean saveOrUpdatePriority(PriorityRouting priority, User user, int processFlag);
boolean deleteAllPriorities(Set<PriorityRouting> priority, User user, int processFlag);
boolean saveOrUpdatePricing(List<TransactionFee> trxFee, User user, int processFlag);
PriorityRouting getDataPriority(String data);
PriorityRouting getDataPriority(Long refId);
Approval getDataByRefId(Long refId);
List<Approval> getDataAppPriority(Set<PriorityRouting> selectedData);
boolean updateApprs(List<Approval> apprs, User userLoginFromSession, int appStatus);
boolean updateApprs(Approval appr, User userLoginFromSession, int appStatus);
boolean commitEntity();
boolean rollbackEntity();
TransactionFee getDataPricingByData(String data);
List<TransactionFee> getListPricingByKeys(String keys);
List<Approval> getPricingDataByRefId(String keys);
/* cs only*/
List<Approval> findPriorityUserApproval(Long userId);
List<Approval> findPriorityUserApproval(Long userId, String criteria, String keys, int first, int max);
List<Approval> findPriorityUserApproval(Long userId, int first, int max);
List<Approval> findPricingUserApproval(Long userId);
List<Approval> findPricingUserApproval(Long userId, String keys, int first, int max);
List<Approval> findPricingUserApproval(Long userId, int first, int max);
int findCountPriorityUserApproval(Long userId);
int findCountPricingUserApproval(Long userId);
int findCountPriorityUserApproval(Long userId, String criteria, String keys);
int findCountPricingUserApproval(Long userId, String keys);
/* cs only */
}
|
[
"nurukat@gmail.com"
] |
nurukat@gmail.com
|
5cf08e8947379155718cb004847a99fa975c3ddb
|
38ae33ee28f3836f6d77b46917825c9f9a07729e
|
/Design_Patterns/src/design/pattern/ocp/PersonalLoanValidator.java
|
cccc43f261ae3f0a1b130d5bed6313a3c7d7fa67
|
[] |
no_license
|
chinmaysept/java_general
|
c4f771cd30cffdcd24870f93ea699ac4703e838c
|
cb391b0dd1a3908814f6f3d1c26251576afa9c74
|
refs/heads/master
| 2022-12-22T20:25:16.680389
| 2019-11-14T08:44:53
| 2019-11-14T08:44:53
| 221,638,495
| 0
| 0
| null | 2022-12-16T03:32:16
| 2019-11-14T07:36:18
|
Java
|
UTF-8
|
Java
| false
| false
| 332
|
java
|
package design.pattern.ocp;
/**
* Personal loan validator
*/
public class PersonalLoanValidator
extends Validator
{
public boolean isValid()
{
//Validation logic.
return true;
}
}
/*
* Similarly any new type of validation can
* be accommodated by creating a new subclass
* of Validator
*/
|
[
"chinmaya.sept@rediffmail.com"
] |
chinmaya.sept@rediffmail.com
|
303ccc0096e17a496825485f8b2475fd555b6f0b
|
26f522cf638887c35dd0de87bddf443d63640402
|
/src/main/java/com/cczu/model/service/IXwaqBaqxwglService.java
|
93f3f95245d6bdbed97ebfc21934f29d5109e849
|
[] |
no_license
|
wuyufei2019/JSLYG
|
4861ae1b78c1a5d311f45e3ee708e52a0b955838
|
93c4f8da81cecb7b71c2d47951a829dbf37c9bcc
|
refs/heads/master
| 2022-12-25T06:01:07.872153
| 2019-11-20T03:10:18
| 2019-11-20T03:10:18
| 222,839,794
| 0
| 0
| null | 2022-12-16T05:03:09
| 2019-11-20T03:08:29
|
JavaScript
|
UTF-8
|
Java
| false
| false
| 859
|
java
|
package com.cczu.model.service;
import java.util.Map;
import javax.servlet.http.HttpServletResponse;
import com.cczu.model.entity.XWAQ_UnsafebehaviorEntity;
public interface IXwaqBaqxwglService {
/**
* 添加不安全行为管理
* @param xwaq
*/
public void addInfo(XWAQ_UnsafebehaviorEntity xwaq);
/**
* 修改
* @param xwaq
*/
public void updateInfo(XWAQ_UnsafebehaviorEntity xwaq);
/**
* 删除
* @param xwaq
*/
public void deleteInfo(long id);
/**
* 查询列表
* @param map
* @return
*/
public Map<String, Object> dataGrid(Map<String, Object> map);
/**
* 通过id查不安全行为管理
* @param id
* @return
*/
public XWAQ_UnsafebehaviorEntity findById(Long id);
/**
* 导出Excel
* @return
*/
public void exportExcel(HttpServletResponse response, Map<String, Object> mapData);
}
|
[
"wuyufei2019@sina.com"
] |
wuyufei2019@sina.com
|
d812d71b1169bf0be067ddb536e20ed1982b9c7d
|
400211f8ba8ee352ce4a63a8c0a768ecf46aca65
|
/test/mng/tests/cn/com/atnc/ioms/mng/clientmng/TestClientService.java
|
f92c5e0a7156c2e7abf52822f6ffa92984601f10
|
[] |
no_license
|
jyf666/IOMS
|
76003040489dc8f594c88ff35c07bd77d1447da4
|
6d3c8428c06298bee8d1f056aab7b21d81fd4ce2
|
refs/heads/master
| 2021-05-10T18:38:37.276724
| 2018-01-19T14:50:34
| 2018-01-19T14:50:34
| 118,130,382
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 741
|
java
|
package mng.tests.cn.com.atnc.ioms.mng.clientmng;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import cn.com.atnc.common.util.AssertUtil;
import cn.com.atnc.ioms.mng.clientmng.IClientManager;
import cn.com.atnc.ioms.model.clientmng.query.ClientQueryModel;
import dao.tests.cn.com.atnc.ioms.dao.MyBaseTransationalTest;
/**
*类说明
*@author 潘涛
*@date 2014-5-30 上午10:13:29
*@version:1.0
*/
public class TestClientService extends MyBaseTransationalTest {
@Autowired
private IClientManager clientManager;
@Test
public void testQueryList(){
ClientQueryModel qm=new ClientQueryModel();
qm.setLoginName("admin");
AssertUtil.notEmpty(this.clientManager.queryList(qm));
}
}
|
[
"1206146862@qq.com"
] |
1206146862@qq.com
|
95a39a0bc2a9246883d9d22eefa11a3bcea5a706
|
d18af2a6333b1a868e8388f68733b3fccb0b4450
|
/java/src/com/flurry/android/monolithic/sdk/impl/dg.java
|
d8a791237d73a01bea37fd1be4ae69d3f208db14
|
[] |
no_license
|
showmaxAlt/showmaxAndroid
|
60576436172495709121f08bd9f157d36a077aad
|
d732f46d89acdeafea545a863c10566834ba1dec
|
refs/heads/master
| 2021-03-12T20:01:11.543987
| 2015-08-19T20:31:46
| 2015-08-19T20:31:46
| 41,050,587
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,117
|
java
|
// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.flurry.android.monolithic.sdk.impl;
import android.app.Activity;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.text.TextUtils;
import android.util.DisplayMetrics;
import com.flurry.android.AdCreative;
import com.flurry.android.AdNetworkView;
import com.flurry.android.impl.ads.FlurryAdModule;
import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.google.ads.AdView;
// Referenced classes of package com.flurry.android.monolithic.sdk.impl:
// ja, di, m
public final class dg extends AdNetworkView
{
private static final String a = com/flurry/android/monolithic/sdk/impl/dg.getSimpleName();
private final String f;
private final String g;
private final boolean h;
public dg(Context context, FlurryAdModule flurryadmodule, m m, AdCreative adcreative, Bundle bundle)
{
super(context, flurryadmodule, m, adcreative);
f = bundle.getString("com.flurry.admob.MY_AD_UNIT_ID");
g = bundle.getString("com.flurry.admob.MYTEST_AD_DEVICE_ID");
h = bundle.getBoolean("com.flurry.admob.test");
setFocusable(true);
}
private AdSize a(int i, int j)
{
if (i >= 728 && j >= 90)
{
return AdSize.IAB_LEADERBOARD;
}
if (i >= 468 && j >= 60)
{
return AdSize.IAB_BANNER;
}
if (i >= 320 && j >= 50)
{
return AdSize.BANNER;
}
if (i >= 300 && j >= 250)
{
return AdSize.IAB_MRECT;
} else
{
ja.a(3, a, "Could not find AdMob AdSize that matches size");
return null;
}
}
private AdSize a(Context context, int i, int j)
{
int k;
int l;
label0:
{
context = context.getResources().getDisplayMetrics();
l = (int)((float)((DisplayMetrics) (context)).heightPixels / ((DisplayMetrics) (context)).density);
int i1 = (int)((float)((DisplayMetrics) (context)).widthPixels / ((DisplayMetrics) (context)).density);
if (i > 0)
{
k = i;
if (i <= i1)
{
break label0;
}
}
k = i1;
}
label1:
{
if (j > 0)
{
i = j;
if (j <= l)
{
break label1;
}
}
i = l;
}
return a(k, i);
}
static String a()
{
return a;
}
public void initLayout()
{
Object obj = getContext();
int i = getAdCreative().getWidth();
int j = getAdCreative().getHeight();
AdSize adsize = a(((Context) (obj)), i, j);
if (adsize == null)
{
ja.a(6, a, (new StringBuilder()).append("Could not find Admob AdSize that matches {width = ").append(i).append(", height ").append(j).append("}").toString());
return;
}
ja.a(3, a, (new StringBuilder()).append("Determined Admob AdSize as ").append(adsize).append(" that best matches {width = ").append(i).append(", height = ").append(j).append("}").toString());
AdView adview = new AdView((Activity)obj, adsize, f);
adview.setAdListener(new di(this, null));
setGravity(17);
addView(adview, new android.widget.RelativeLayout.LayoutParams(adsize.getWidthInPixels(((Context) (obj))), adsize.getHeightInPixels(((Context) (obj)))));
obj = new AdRequest();
if (h)
{
ja.a(3, a, "Admob AdView set to Test Mode.");
((AdRequest) (obj)).addTestDevice(AdRequest.TEST_EMULATOR);
if (!TextUtils.isEmpty(g))
{
((AdRequest) (obj)).addTestDevice(g);
}
}
adview.loadAd(((AdRequest) (obj)));
}
}
|
[
"invisible@example.com"
] |
invisible@example.com
|
af54df2e2b388b1801e30fc31cc2dcb674871c27
|
0ccbf91b11e5212b5179e9a1979362106f30fccd
|
/misc/metric-example/code-example/Test.java
|
0880547573a101999ebc93d4855100512a69e61c
|
[] |
no_license
|
fmselab/codecover2
|
e3161be22a1601a4aa00f2933fb7923074aea2ce
|
9ad4be4b7e54c49716b71b3e81937404ab5af9c6
|
refs/heads/master
| 2023-02-21T05:22:00.372690
| 2021-03-08T22:04:17
| 2021-03-08T22:04:17
| 133,975,747
| 5
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,584
|
java
|
/******************************************************************************
* Copyright (c) 2007 Stefan Franke, Robert Hanussek, Benjamin Keil, *
* Steffen Kieß, Johannes Langauf, *
* Christoph Marian Müller, Igor Podolskiy, *
* Tilmann Scheller, Michael Starzmann, Markus Wittlinger *
* 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 *
******************************************************************************/
public class Test {
public static void main(String[] args) {
System.out.println("Hello, world!");
partlyExecutedMethod();
}
static void partlyExecutedMethod() {
System.out.println("Test");
System.out.println("Test");
if (0 == 0)
return;
System.out.println("Test");
System.out.println("Test");
System.out.println("Test");
}
static void notExecutedMethod() {
System.out.println("Test");
System.out.println("Test");
System.out.println("Test");
if (0 == 0)
return;
System.out.println("Test");
System.out.println("Test");
System.out.println("Test");
}
}
|
[
"angelo.gargantini@unibg.it"
] |
angelo.gargantini@unibg.it
|
4dc8b4c541928a15928c6bc6666a8b097dcb7e2e
|
709b07c2034940533c691a4b63356325acec4d3f
|
/commons/src/test/java/org/milyn/javabean/decoders/FloatDecoderTest.java
|
6512ca249316acab248caa555747300b945bf0f7
|
[] |
no_license
|
avisi/smooks
|
5d1fdec70b291105adc33c1cd8991470cc39419a
|
8a91d59bbf92dfd6778deac56a58ae0a4eb29d25
|
refs/heads/master
| 2020-04-01T23:50:38.219940
| 2014-02-07T13:40:57
| 2014-02-07T13:40:57
| 13,860,956
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,976
|
java
|
/*
* Milyn - Copyright (C) 2006 - 2010
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License (version 2.1) as published by the Free Software
* Foundation.
*
* 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:
* http://www.gnu.org/licenses/lgpl.txt
*/
package org.milyn.javabean.decoders;
import junit.framework.TestCase;
import org.milyn.javabean.DataDecodeException;
import java.util.Locale;
import java.util.Properties;
/**
* @author <a href="mailto:tom.fennelly@gmail.com">tom.fennelly@gmail.com</a>
*/
public class FloatDecoderTest extends TestCase {
private Locale defaultLocale;
public void setUp() {
defaultLocale = Locale.getDefault();
Locale.setDefault( new Locale("en", "IE") );
}
protected void tearDown() throws Exception {
Locale.setDefault(defaultLocale);
}
public void test_empty_ok_value() {
FloatDecoder decoder = new FloatDecoder();
assertEquals(new Float(1.0d), decoder.decode("1.0"));
}
public void test_empty_data_string() {
FloatDecoder decoder = new FloatDecoder();
try {
decoder.decode("");
fail("Expected DataDecodeException");
} catch (DataDecodeException e) {
assertEquals("Failed to decode float value ''.", e.getMessage());
}
}
public void test_decode_locale_config() {
FloatDecoder decoder = new FloatDecoder();
Properties config = new Properties();
config.setProperty(FloatDecoder.LOCALE, "de-DE");
decoder.setConfiguration(config);
Float floatVal = (Float) decoder.decode("1234,45"); // comma for decimal point
assertEquals(1234.45f, floatVal);
}
public void test_decode_format_config() {
FloatDecoder decoder = new FloatDecoder();
Properties config = new Properties();
config.setProperty(FloatDecoder.FORMAT, "#,###.##");
decoder.setConfiguration(config);
Float floatVal = (Float) decoder.decode("1,234.45");
assertEquals(1234.45f, floatVal);
}
public void test_encode_format_config() {
FloatDecoder decoder = new FloatDecoder();
Properties config = new Properties();
config.setProperty(FloatDecoder.FORMAT, "#,###.##");
decoder.setConfiguration(config);
assertEquals("1,234.45", decoder.encode(1234.45f));
}
public void test_encode_locale_config() {
FloatDecoder decoder = new FloatDecoder();
Properties config = new Properties();
config.setProperty(FloatDecoder.LOCALE, "de-DE");
decoder.setConfiguration(config);
assertEquals("1234,45", decoder.encode(1234.45f));
}
}
|
[
"tom.fennelly@gmail.com"
] |
tom.fennelly@gmail.com
|
dd2eb51697ca197860db6bc1e86d38ebe5387de4
|
507a96543784eedb7aa1802d5900807660b7ddbb
|
/xingguang-loan-job/src/main/java/com/xingguang/utils/cell/service/IJxlContactListService.java
|
a47c7e6b31a8db9ab7af8704c43dc7c90d9870ff
|
[] |
no_license
|
dalianghe/xingguang-loan
|
a60562d112c7369c82a58b89d0b9fc6a0e86f931
|
1bbdef3d405b93c38117c113e310f763bd7a44b7
|
refs/heads/master
| 2021-05-16T12:55:46.139561
| 2017-12-14T15:30:19
| 2017-12-14T15:30:19
| 105,276,134
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 577
|
java
|
package com.xingguang.utils.cell.service;
import com.xingguang.utils.cell.entity.JxlContactListEntity;
import java.util.List;
/**
* @Description 用一句话描述该文件做什么
* @Author hedaliang
* @Date 2017/11/10 13:42
* @Version v1.0.0
*/
public interface IJxlContactListService {
public void deleteContactListByRptId(Long rptId) throws Exception;
public void insertContactList(List<JxlContactListEntity> list) throws Exception;
public List<JxlContactListEntity> addContactList(Long oldRptId , Long newRptId, String json) throws Exception;
}
|
[
"276420284@qq.com"
] |
276420284@qq.com
|
d40225053fd411be0fab29b555669bf18afacbc1
|
98bcf75bc0374f1dd943a70ec03e7662380a97f6
|
/src/main/java/com/aviva/agriculture/grele/service/dto/PasswordChangeDTO.java
|
1c3fcdcaef2bd0e4c3ef17d4189ea65f3e62baa0
|
[] |
no_license
|
samohamedakli/greleApp
|
6c005f6ab4ec1e6714c36e019549d179520e5c94
|
a6a84b9bf9487b6dbc8ef98817bbd12bc53c6e02
|
refs/heads/master
| 2021-08-27T21:48:19.055296
| 2021-08-04T13:14:51
| 2021-08-04T13:14:51
| 177,791,648
| 0
| 0
| null | 2019-03-26T13:26:39
| 2019-03-26T13:14:25
|
Java
|
UTF-8
|
Java
| false
| false
| 871
|
java
|
package com.aviva.agriculture.grele.service.dto;
/**
* A DTO representing a password change required data - current and new password.
*/
public class PasswordChangeDTO {
private String currentPassword;
private String newPassword;
public PasswordChangeDTO() {
// Empty constructor needed for Jackson.
}
public PasswordChangeDTO(String currentPassword, String newPassword) {
this.currentPassword = currentPassword;
this.newPassword = newPassword;
}
public String getCurrentPassword() {
return currentPassword;
}
public void setCurrentPassword(String currentPassword) {
this.currentPassword = currentPassword;
}
public String getNewPassword() {
return newPassword;
}
public void setNewPassword(String newPassword) {
this.newPassword = newPassword;
}
}
|
[
"jhipster-bot@jhipster.tech"
] |
jhipster-bot@jhipster.tech
|
9b4d16206664f0b71ce902245ebda896b1d7d1e8
|
c26912f3375141bb2fb3c07357289f20d88bcf2d
|
/JavaAlgorithm/src/main/java/algo/tzashinorpu/FourthRound/Chapter04/largestRectangleArea_84.java
|
ee86a99821bc57fb336c47651822f019f003afe2
|
[
"MIT"
] |
permissive
|
TzashiNorpu/Algorithm
|
2013b5781d0ac517f2857633c39aee7d2e64d240
|
bc9155c4daf08041041f84c2daa9cc89f82c2240
|
refs/heads/main
| 2023-07-08T06:30:50.080352
| 2023-06-28T10:01:58
| 2023-06-28T10:01:58
| 219,323,961
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 840
|
java
|
package algo.tzashinorpu.FourthRound.Chapter04;
import java.util.Stack;
public class largestRectangleArea_84 {
public int largestRectangleArea(int[] heights) {
// 单调递增队列
Stack<Integer> stack = new Stack<>();
int res = 0;
int len = heights.length + 1;
int[] newH = new int[len];
System.arraycopy(heights, 0, newH, 0, len - 1);
newH[len - 1] = -1;
stack.push(-1);
for (int i = 0; i < len; i++) {
while (stack.size() > 1 && newH[i] < newH[stack.peek()]) {
Integer popIndex = stack.pop();
Integer leftIndex = stack.peek();
int area = (i - leftIndex - 1) * newH[popIndex];
res = Math.max(res, area);
}
stack.push(i);
}
return res;
}
}
|
[
"tzashinorpu@gmail.com"
] |
tzashinorpu@gmail.com
|
ddeb7e79320ca49f397015c88df51c44c5f8a4c3
|
293b148b54fb61c9fa8ec9660a74585e97740018
|
/src/be/openclinic/util/SystemUpdateServlet.java
|
37015a4ff931e099c7a3031b537e19d850841d93
|
[] |
no_license
|
carlvalve/openclinic
|
1f8888400c6eafba4b0ed862c8f88bd71029da0d
|
3b306699e7ffd8830e280e16d6de9a7c97c11da0
|
refs/heads/master
| 2020-05-27T13:57:17.264196
| 2019-05-26T06:14:44
| 2019-05-26T06:14:44
| 188,643,222
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,298
|
java
|
package be.openclinic.util;
import java.io.IOException;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import be.mxs.common.util.system.UpdateSystem;
public class SystemUpdateServlet extends HttpServlet {
//--- DO GET ----------------------------------------------------------------------------------
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
HttpSession session = (HttpSession)request.getSession();
UpdateSystem systemUpdate = new UpdateSystem();
String sAPPFULLDIR = getServletContext().getRealPath("");
systemUpdate.setBasedir(sAPPFULLDIR);
String sProcessID = "systemUpdate_"+System.currentTimeMillis();
session.setAttribute(sProcessID,systemUpdate);
systemUpdate.start();
//session.removeAttribute(sProcessID);
// forward to status-bar
RequestDispatcher dispatcher = request.getRequestDispatcher("/util/updateSystem.jsp?processId="+sProcessID);
dispatcher.forward(request,response);
}
}
|
[
"frankverbeke@fff6d2c3-ad4f-46bf-9e3e-7ed8f9d13556"
] |
frankverbeke@fff6d2c3-ad4f-46bf-9e3e-7ed8f9d13556
|
a0b8efb94ecf5aa7a54a220774de87cf04cc0a77
|
db59a5b1e8ca9788edfcf127da5e468acfbed2ff
|
/flash-pay-uaa/flash-pay-uaa-service/src/main/java/com/flash/uaa/integration/UnifiedUserAuthenticationConverter.java
|
a71c928f75a4ef549f84dc32994f9af793dc9f32
|
[
"Apache-2.0"
] |
permissive
|
smadol/flash-pay
|
337f429651fb56aac74c50a3683d92d1e3218085
|
038d5f76a50b421ed7627258b284d4b78cfb4ae1
|
refs/heads/master
| 2023-09-02T14:10:49.035275
| 2021-10-21T06:46:45
| 2021-10-21T06:46:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,256
|
java
|
package com.flash.uaa.integration;
import com.flash.uaa.domain.UnifiedUserDetails;
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
import org.springframework.security.core.Authentication;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.authority.AuthorityUtils;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.oauth2.provider.token.UserAuthenticationConverter;
import org.springframework.util.StringUtils;
import java.util.Collection;
import java.util.LinkedHashMap;
import java.util.Map;
public class UnifiedUserAuthenticationConverter implements UserAuthenticationConverter {
private Collection<? extends GrantedAuthority> defaultAuthorities;
private UserDetailsService userDetailsService;
/**
* Optional {@link UserDetailsService} to use when extracting an {@link Authentication} from the incoming map.
*
* @param userDetailsService the userDetailsService to set
*/
public void setUserDetailsService(UserDetailsService userDetailsService) {
this.userDetailsService = userDetailsService;
}
/**
* Default value for authorities if an Authentication is being created and the input has no data for authorities.
* Note that unless this property is set, the default Authentication created by {@link #extractAuthentication(Map)}
* will be unauthenticated.
*
* @param defaultAuthorities the defaultAuthorities to set. Default null.
*/
public void setDefaultAuthorities(String[] defaultAuthorities) {
this.defaultAuthorities = AuthorityUtils.commaSeparatedStringToAuthorityList(StringUtils.arrayToCommaDelimitedString(defaultAuthorities));
}
@Override
public Map<String, ?> convertUserAuthentication(Authentication authentication) {
Map<String, Object> response = new LinkedHashMap<String, Object>();
response.put(USERNAME, authentication.getName());
if (authentication.getAuthorities() != null && !authentication.getAuthorities().isEmpty()) {
response.put(AUTHORITIES, AuthorityUtils.authorityListToSet(authentication.getAuthorities()));
}
if (authentication.getPrincipal() instanceof UnifiedUserDetails) {
UnifiedUserDetails unifiedUserDetails = (UnifiedUserDetails) authentication.getPrincipal();
response.put("mobile", unifiedUserDetails.getMobile());
response.put("payload", unifiedUserDetails.getPayload());
}
return response;
}
@Override
public Authentication extractAuthentication(Map<String, ?> map) {
if (map.containsKey(USERNAME)) {
Object principal = map.get(USERNAME);
Collection<? extends GrantedAuthority> authorities = getAuthorities(map);
if (userDetailsService != null) {
UserDetails user = userDetailsService.loadUserByUsername((String) map.get(USERNAME));
authorities = user.getAuthorities();
principal = user;
}
UnifiedUserDetails unifiedUserDetails = new UnifiedUserDetails((String) map.get(USERNAME), "N/A", (Map<Long, Object>) map.get("payload"));
unifiedUserDetails.setMobile((String) map.get("mobile"));
return new UsernamePasswordAuthenticationToken(unifiedUserDetails, "N/A", authorities);
}
return null;
}
private Collection<? extends GrantedAuthority> getAuthorities(Map<String, ?> map) {
if (!map.containsKey(AUTHORITIES)) {
return defaultAuthorities;
}
Object authorities = map.get(AUTHORITIES);
if (authorities instanceof String) {
return AuthorityUtils.commaSeparatedStringToAuthorityList((String) authorities);
}
if (authorities instanceof Collection) {
return AuthorityUtils.commaSeparatedStringToAuthorityList(StringUtils
.collectionToCommaDelimitedString((Collection<?>) authorities));
}
throw new IllegalArgumentException("Authorities must be either a String or a Collection");
}
}
|
[
"yueliminvc@outlook.com"
] |
yueliminvc@outlook.com
|
ceaa9f8867216058dd89603e41ffd262787fea99
|
b3c4251fbe12d3870409cce5349b8c2451d7195b
|
/modules/core/src/com/haulmont/workflow/core/listeners/AttachmentEntityListener.java
|
27cf77b6886079c8760db0f8d76f6d9346b1fbb6
|
[] |
no_license
|
cuba-platform/workflow-thesis
|
8d7c8c72d3b9761ef2c7ff39d7b73a769d36838f
|
977ea2ab769566620a10ec1c999d5c28b97659ca
|
refs/heads/master
| 2021-01-08T17:41:19.326929
| 2020-02-05T15:51:35
| 2020-02-05T15:51:35
| 242,090,811
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 989
|
java
|
/*
* Copyright (c) 2008-2016 Haulmont. All rights reserved.
* Use is subject to license terms, see http://www.cuba-platform.com/commercial-software-license for details.
*/
package com.haulmont.workflow.core.listeners;
import com.haulmont.cuba.core.EntityManager;
import com.haulmont.cuba.core.global.UserSessionSource;
import com.haulmont.cuba.core.listener.BeforeInsertEntityListener;
import com.haulmont.workflow.core.entity.Attachment;
import org.springframework.stereotype.Component;
import javax.inject.Inject;
@Component("workflow_AttachmentEntityListener")
public class AttachmentEntityListener implements BeforeInsertEntityListener<Attachment> {
@Inject
protected UserSessionSource userSessionSource;
@Override
public void onBeforeInsert(Attachment entity, EntityManager entityManager) {
if (entity.getSubstitutedCreator() == null)
entity.setSubstitutedCreator(userSessionSource.getUserSession().getCurrentOrSubstitutedUser());
}
}
|
[
"artamonov@haulmont.com"
] |
artamonov@haulmont.com
|
0ae19aa1dfb0e5c6a8d0f4960a6e9a3f751d78e3
|
c19fdcd29a82050c69da6d5a5d456e72116d9a8a
|
/JavaBasic/src/main/java/WorkFlow/ForDemo4.java
|
c48b30d70f17a4188d48907df263094dc1481722
|
[] |
no_license
|
HbnKing/Basic
|
01414ab8c1e07cf71d8587193d8f895c835da23f
|
ad22a462e2aecc3e6499e3f6d82707d504ed9298
|
refs/heads/master
| 2022-12-29T14:32:58.640334
| 2020-01-11T08:07:40
| 2020-01-11T08:07:40
| 171,640,967
| 3
| 1
| null | 2022-12-16T10:32:12
| 2019-02-20T09:22:22
|
Java
|
UTF-8
|
Java
| false
| false
| 587
|
java
|
package WorkFlow;
/**
* for循环嵌套
* @author 徐葳
*
*/
public class ForDemo4 {
public static void main(String[] args) {
//for循环的嵌套形式
// 外循环每执行一次,内循环执行一遍
for(int x=0;x<3;x++) {//外循环 可以控制打印的行数
System.out.println("x="+x);
for(int y=0;y<4;y++) {//内循环 可以控制打印的列数
System.out.print(" y="+y);
}
System.out.println();//换行
}
//System.out.print("hello");//只打印 不换行
//System.out.println("hello");//打印并且换行
}
}
|
[
"hbn.king@gmail.com"
] |
hbn.king@gmail.com
|
ea5fd8c0525758d94249af85880ecbaed64a2553
|
b2fa66ec49f50b4bb92fee6494479238c8b46876
|
/src/main/java/fi/riista/feature/gamediary/srva/SrvaEventApproverDTO.java
|
5a4342752140a442ded119843614fee5087018df
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
suomenriistakeskus/oma-riista-web
|
f007a9dc663317956ae672ece96581f1704f0e85
|
f3550bce98706dfe636232fb2765a44fa33f78ca
|
refs/heads/master
| 2023-04-27T12:07:50.433720
| 2023-04-25T11:31:05
| 2023-04-25T11:31:05
| 77,215,968
| 16
| 4
|
MIT
| 2023-04-25T11:31:06
| 2016-12-23T09:49:44
|
Java
|
UTF-8
|
Java
| false
| false
| 1,267
|
java
|
package fi.riista.feature.gamediary.srva;
import fi.riista.feature.account.user.SystemUser;
import fi.riista.feature.organization.person.Person;
import org.hibernate.validator.constraints.SafeHtml;
public class SrvaEventApproverDTO {
public static SrvaEventApproverDTO create(final SystemUser user) {
final SrvaEventApproverDTO dto = new SrvaEventApproverDTO();
dto.setFirstName(user.getFirstName());
dto.setLastName(user.getLastName());
return dto;
}
public static SrvaEventApproverDTO create(final Person person) {
final SrvaEventApproverDTO dto = new SrvaEventApproverDTO();
dto.setFirstName(person.getFirstName());
dto.setLastName(person.getLastName());
return dto;
}
@SafeHtml(whitelistType = SafeHtml.WhiteListType.NONE)
private String firstName;
@SafeHtml(whitelistType = SafeHtml.WhiteListType.NONE)
private String lastName;
public String getFirstName() {
return firstName;
}
public void setFirstName(final String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(final String lastName) {
this.lastName = lastName;
}
}
|
[
"kyosti.herrala@vincit.fi"
] |
kyosti.herrala@vincit.fi
|
517e82eeef025dea2f86a8f7af1a18599af1208e
|
44864cce2ab44c92efabf52230e5a54f3845c749
|
/BookingService/src/main/java/com/booking/serverconfig/JwtConfiguration.java
|
e2a89ce8d6c7fa92026a8fe0256426624469bd4e
|
[] |
no_license
|
brightonyoung/RestManApp
|
2646976c7108eea9b8031437599f4ec7ac86269b
|
da423308e4a92bb306fbfd76c17acbda7d18e808
|
refs/heads/master
| 2023-02-18T18:42:59.776181
| 2021-01-12T19:30:32
| 2021-01-12T19:30:32
| 329,087,629
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,508
|
java
|
package com.booking.serverconfig;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;
import org.springframework.security.oauth2.provider.token.TokenStore;
import org.springframework.security.oauth2.provider.token.store.JwtAccessTokenConverter;
import org.springframework.security.oauth2.provider.token.store.JwtTokenStore;
import org.springframework.util.FileCopyUtils;
import java.io.IOException;
/**
* Created by Martha on 2/25/2017.
*/
@Configuration
public class JwtConfiguration {
@Autowired
JwtAccessTokenConverter jwtAccessTokenConverter;
@Bean
@Qualifier("tokenStore")
public TokenStore tokenStore() {
return new JwtTokenStore(jwtAccessTokenConverter);
}
@Bean
protected JwtAccessTokenConverter jwtTokenEnhancer() {
JwtAccessTokenConverter converter = new JwtAccessTokenConverter();
Resource resource = new ClassPathResource("public.cert");
String publicKey = null;
try {
publicKey = new String(FileCopyUtils.copyToByteArray(resource.getInputStream()));
} catch (IOException e) {
throw new RuntimeException(e);
}
converter.setVerifierKey(publicKey);
return converter;
}
}
|
[
"marta.ginosian@gmail.com"
] |
marta.ginosian@gmail.com
|
2e73a450a2472d2725f92ee24f59829b5d4cf681
|
d5f09c7b0e954cd20dd613af600afd91b039c48a
|
/sources/com/coolapk/market/databinding/AppViewBinding.java
|
3a81dcb306ce58bf8f9ba20b0f658b5eb2403c9a
|
[] |
no_license
|
t0HiiBwn/CoolapkRelease
|
af5e00c701bf82c4e90b1033f5c5f9dc8526f4b3
|
a6a2b03e32cde0e5163016e0078391271a8d33ab
|
refs/heads/main
| 2022-07-29T23:28:35.867734
| 2021-03-26T11:41:18
| 2021-03-26T11:41:18
| 345,290,891
| 5
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,045
|
java
|
package com.coolapk.market.databinding;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;
import android.widget.FrameLayout;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.TextView;
import androidx.appcompat.widget.Toolbar;
import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.databinding.Bindable;
import androidx.databinding.DataBindingUtil;
import androidx.databinding.ViewDataBinding;
import com.coolapk.market.view.app.AppViewViewModel;
import com.coolapk.market.widget.AppExtensionBar;
import com.coolapk.market.widget.view.CollapsingToolbarFixLayout;
import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.floatingactionbutton.FloatingActionButton;
public abstract class AppViewBinding extends ViewDataBinding {
public final TextView actionFabText;
public final FloatingActionButton actionView;
public final FrameLayout actionViewContainer;
public final AppBarLayout appBar;
public final AppExtensionBar appExtensionBar;
public final ImageView appIcon;
public final ItemAppViewDownloadBinding appViewDownload;
public final FrameLayout appViewRecycler;
public final ImageView arrowView;
public final FrameLayout bottomLayout;
public final CollapsingToolbarFixLayout collapsingToolbar;
public final LinearLayout commentBox;
public final LinearLayout commentView;
public final ImageView coverView;
public final View coverViewMask;
public final TextView emptyTextView;
public final Button followView;
public final LinearLayout headerView;
public final LinearLayout infoView;
@Bindable
protected AppViewViewModel mViewModel;
public final CoordinatorLayout mainContent;
public final ImageView moreView;
public final ProgressBar progressBar;
public final TextView titleView;
public final Toolbar toolbar;
public abstract void setViewModel(AppViewViewModel appViewViewModel);
protected AppViewBinding(Object obj, View view, int i, TextView textView, FloatingActionButton floatingActionButton, FrameLayout frameLayout, AppBarLayout appBarLayout, AppExtensionBar appExtensionBar2, ImageView imageView, ItemAppViewDownloadBinding itemAppViewDownloadBinding, FrameLayout frameLayout2, ImageView imageView2, FrameLayout frameLayout3, CollapsingToolbarFixLayout collapsingToolbarFixLayout, LinearLayout linearLayout, LinearLayout linearLayout2, ImageView imageView3, View view2, TextView textView2, Button button, LinearLayout linearLayout3, LinearLayout linearLayout4, CoordinatorLayout coordinatorLayout, ImageView imageView4, ProgressBar progressBar2, TextView textView3, Toolbar toolbar2) {
super(obj, view, i);
this.actionFabText = textView;
this.actionView = floatingActionButton;
this.actionViewContainer = frameLayout;
this.appBar = appBarLayout;
this.appExtensionBar = appExtensionBar2;
this.appIcon = imageView;
this.appViewDownload = itemAppViewDownloadBinding;
this.appViewRecycler = frameLayout2;
this.arrowView = imageView2;
this.bottomLayout = frameLayout3;
this.collapsingToolbar = collapsingToolbarFixLayout;
this.commentBox = linearLayout;
this.commentView = linearLayout2;
this.coverView = imageView3;
this.coverViewMask = view2;
this.emptyTextView = textView2;
this.followView = button;
this.headerView = linearLayout3;
this.infoView = linearLayout4;
this.mainContent = coordinatorLayout;
this.moreView = imageView4;
this.progressBar = progressBar2;
this.titleView = textView3;
this.toolbar = toolbar2;
}
public AppViewViewModel getViewModel() {
return this.mViewModel;
}
public static AppViewBinding inflate(LayoutInflater layoutInflater, ViewGroup viewGroup, boolean z) {
return inflate(layoutInflater, viewGroup, z, DataBindingUtil.getDefaultComponent());
}
@Deprecated
public static AppViewBinding inflate(LayoutInflater layoutInflater, ViewGroup viewGroup, boolean z, Object obj) {
return (AppViewBinding) ViewDataBinding.inflateInternal(layoutInflater, 2131558467, viewGroup, z, obj);
}
public static AppViewBinding inflate(LayoutInflater layoutInflater) {
return inflate(layoutInflater, DataBindingUtil.getDefaultComponent());
}
@Deprecated
public static AppViewBinding inflate(LayoutInflater layoutInflater, Object obj) {
return (AppViewBinding) ViewDataBinding.inflateInternal(layoutInflater, 2131558467, null, false, obj);
}
public static AppViewBinding bind(View view) {
return bind(view, DataBindingUtil.getDefaultComponent());
}
@Deprecated
public static AppViewBinding bind(View view, Object obj) {
return (AppViewBinding) bind(obj, view, 2131558467);
}
}
|
[
"test@gmail.com"
] |
test@gmail.com
|
f8c8b008bc26591e3ead992a0fcaf99efca5841f
|
ca957060b411c88be41dfbf5dffa1fea2744f4a5
|
/src/org/sosy_lab/cpachecker/cpa/arg/counterexamples/CallTreeCounterexampleFilter.java
|
3016d52d1dc87e9ed9ef080374cd30470c04b335
|
[
"Apache-2.0"
] |
permissive
|
45258E9F/IntPTI
|
62f705f539038f9457c818d515c81bf4621d7c85
|
e5dda55aafa2da3d977a9a62ad0857746dae3fe1
|
refs/heads/master
| 2020-12-30T14:34:30.174963
| 2018-06-01T07:32:07
| 2018-06-01T07:32:07
| 91,068,091
| 4
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,276
|
java
|
/*
* IntPTI: integer error fixing by proper-type inference
* Copyright (c) 2017.
*
* Open-source component:
*
* CPAchecker
* Copyright (C) 2007-2014 Dirk Beyer
*
* Guava: Google Core Libraries for Java
* Copyright (C) 2010-2006 Google
*
*
*/
package org.sosy_lab.cpachecker.cpa.arg.counterexamples;
import static com.google.common.base.Predicates.instanceOf;
import static com.google.common.base.Predicates.or;
import static com.google.common.collect.FluentIterable.from;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableList;
import org.sosy_lab.common.configuration.Configuration;
import org.sosy_lab.common.log.LogManager;
import org.sosy_lab.cpachecker.cfa.model.CFANode;
import org.sosy_lab.cpachecker.cfa.model.FunctionEntryNode;
import org.sosy_lab.cpachecker.cfa.model.FunctionExitNode;
import org.sosy_lab.cpachecker.core.counterexample.CounterexampleInfo;
import org.sosy_lab.cpachecker.core.interfaces.ConfigurableProgramAnalysis;
import org.sosy_lab.cpachecker.util.AbstractStates;
/**
* A {@link CounterexampleFilter} that ignores the concrete edges of paths
* and looks only at the function call trees.
* If those are equal, the paths are considered similar.
*
* Note that in the following program, paths through both branches are similar
* (call locations are ignored, only function names matter):
* <code>
* void f() { }
* void main() {
* if (...) { f(); } else { f(); }
* }
* </code>
*
* This filter is cheap and subsumes {@link PathEqualityCounterexampleFilter}.
*/
public class CallTreeCounterexampleFilter
extends AbstractSetBasedCounterexampleFilter<ImmutableList<CFANode>> {
public CallTreeCounterexampleFilter(
Configuration pConfig,
LogManager pLogger,
ConfigurableProgramAnalysis pCpa) {
super(pConfig, pLogger, pCpa);
}
@Override
protected Optional<ImmutableList<CFANode>> getCounterexampleRepresentation(CounterexampleInfo counterexample) {
return Optional.of(
from(counterexample.getTargetPath().asStatesList())
.transform(AbstractStates.EXTRACT_LOCATION)
.filter(or(
instanceOf(FunctionEntryNode.class),
instanceOf(FunctionExitNode.class)))
.toList()
);
}
}
|
[
"chengxi09@gmail.com"
] |
chengxi09@gmail.com
|
4c44117873e1c3d76eb0def8adb5b91dac4b2fa7
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/results/Mockito-19/org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter/BBC-F0-opt-40/tests/16/org/mockito/internal/configuration/injection/filter/TypeBasedCandidateFilter_ESTest.java
|
067b15676a9501e6481236fd8b99a93a790b852b
|
[
"CC-BY-4.0",
"MIT"
] |
permissive
|
pderakhshanfar/EMSE-BBC-experiment
|
f60ac5f7664dd9a85f755a00a57ec12c7551e8c6
|
fea1a92c2e7ba7080b8529e2052259c9b697bbda
|
refs/heads/main
| 2022-11-25T00:39:58.983828
| 2022-04-12T16:04:26
| 2022-04-12T16:04:26
| 309,335,889
| 0
| 1
| null | 2021-11-05T11:18:43
| 2020-11-02T10:30:38
| null |
UTF-8
|
Java
| false
| false
| 3,311
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Oct 21 16:19:12 GMT 2021
*/
package org.mockito.internal.configuration.injection.filter;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import java.lang.reflect.Field;
import java.util.ConcurrentModificationException;
import java.util.LinkedList;
import java.util.List;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
import org.mockito.internal.configuration.injection.filter.FinalMockCandidateFilter;
import org.mockito.internal.configuration.injection.filter.OngoingInjecter;
import org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class TypeBasedCandidateFilter_ESTest extends TypeBasedCandidateFilter_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter();
LinkedList<Object> linkedList0 = new LinkedList<Object>();
linkedList0.add((Object) finalMockCandidateFilter0);
TypeBasedCandidateFilter typeBasedCandidateFilter0 = new TypeBasedCandidateFilter(finalMockCandidateFilter0);
List<Object> list0 = linkedList0.subList(1, 1);
linkedList0.add((Object) typeBasedCandidateFilter0);
// Undeclared exception!
try {
typeBasedCandidateFilter0.filterCandidate(list0, (Field) null, (Object) null);
fail("Expecting exception: ConcurrentModificationException");
} catch(ConcurrentModificationException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("java.util.SubList", e);
}
}
@Test(timeout = 4000)
public void test1() throws Throwable {
FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter();
LinkedList<Object> linkedList0 = new LinkedList<Object>();
TypeBasedCandidateFilter typeBasedCandidateFilter0 = new TypeBasedCandidateFilter(finalMockCandidateFilter0);
OngoingInjecter ongoingInjecter0 = typeBasedCandidateFilter0.filterCandidate(linkedList0, (Field) null, "*X!D/_OTf]o{");
assertNotNull(ongoingInjecter0);
}
@Test(timeout = 4000)
public void test2() throws Throwable {
FinalMockCandidateFilter finalMockCandidateFilter0 = new FinalMockCandidateFilter();
TypeBasedCandidateFilter typeBasedCandidateFilter0 = new TypeBasedCandidateFilter(finalMockCandidateFilter0);
LinkedList<Object> linkedList0 = new LinkedList<Object>();
linkedList0.add((Object) finalMockCandidateFilter0);
// Undeclared exception!
try {
typeBasedCandidateFilter0.filterCandidate(linkedList0, (Field) null, linkedList0);
fail("Expecting exception: NullPointerException");
} catch(NullPointerException e) {
//
// no message in exception (getMessage() returned null)
//
verifyException("org.mockito.internal.configuration.injection.filter.TypeBasedCandidateFilter", e);
}
}
}
|
[
"pderakhshanfar@serg2.ewi.tudelft.nl"
] |
pderakhshanfar@serg2.ewi.tudelft.nl
|
7aab7418629a82570d661d42cb5ed4eefcd7313a
|
d5bcef447e51e55d9999884f942628ba78185427
|
/sxcfu/app/src/main/java/com/hz/zdjfu/application/data/bean/SplashRecordBeans.java
|
b491cd17433f68e9ca3b05bf3642319014fb8505
|
[] |
no_license
|
heguogui/zdjfu
|
4b43095c85c982d7b795cecd4988fb2c5f739c9c
|
a3e9bd76ae3a09f495d580fd5864fcc8126bdf2b
|
refs/heads/master
| 2020-03-21T22:31:58.836439
| 2018-07-11T09:22:49
| 2018-07-11T09:22:49
| 139,132,538
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,319
|
java
|
package com.hz.zdjfu.application.data.bean;
/**
* [类功能说明]
*
* @author HeGuoGui
* @version 2.1.0
* @time 2017/8/25 0025
*/
public class SplashRecordBeans {
private String imageUrl;
private String hrefUrl;
private String title;
private String id;
private String alt;
public String getImageUrl() {
return imageUrl;
}
public void setImageUrl(String imageUrl) {
this.imageUrl = imageUrl;
}
public String getHrefUrl() {
return hrefUrl;
}
public void setHrefUrl(String hrefUrl) {
this.hrefUrl = hrefUrl;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getId() {
return id;
}
public void setId(String id) {
this.id = id;
}
public String getAlt() {
return alt;
}
public void setAlt(String alt) {
this.alt = alt;
}
@Override
public String toString() {
return "SplashRecordBeans{" +
"imageUrl='" + imageUrl + '\'' +
", hrefUrl='" + hrefUrl + '\'' +
", title='" + title + '\'' +
", id='" + id + '\'' +
", alt='" + alt + '\'' +
'}';
}
}
|
[
"86100992@qq.com"
] |
86100992@qq.com
|
eb14be38c6cc93be460f618f3e0eb5df8e3875c9
|
2c7bbc8139c4695180852ed29b229bb5a0f038d7
|
/com/facebook/drawee/interfaces/DraweeHierarchy.java
|
7b0f832408aefef8254872b6524545c66ee9b7d5
|
[] |
no_license
|
suliyu/evolucionNetflix
|
6126cae17d1f7ea0bc769ee4669e64f3792cdd2f
|
ac767b81e72ca5ad636ec0d471595bca7331384a
|
refs/heads/master
| 2020-04-27T05:55:47.314928
| 2017-05-08T17:08:22
| 2017-05-08T17:08:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 200
|
java
|
//
// Decompiled by Procyon v0.5.30
//
package com.facebook.drawee.interfaces;
import android.graphics.drawable.Drawable;
public interface DraweeHierarchy
{
Drawable getTopLevelDrawable();
}
|
[
"sy.velasquez10@uniandes.edu.co"
] |
sy.velasquez10@uniandes.edu.co
|
2fc7e69502471e12a593e069d4fd94fdde6a76c4
|
c612fe9597af8f89a8852c1b1866d4a6460de84e
|
/javaee-intro/west-compass-dealer-shop/src/main/java/app/domain/models/binding/CarCreateBindingModel.java
|
0c6846e6d378294f48ee6ef5a5328d2685c1af09
|
[
"MIT"
] |
permissive
|
VasAtanasov/SoftUni-Java-Web-Basics-September-2019
|
cf8f79190ba2b2b8d727b9b8c1e05dfc06726ae8
|
c5456fd987d559159a3ba3dc16da0875138defd1
|
refs/heads/master
| 2022-07-10T13:10:21.647063
| 2019-10-30T08:56:55
| 2019-10-30T08:56:55
| 211,797,820
| 0
| 0
|
MIT
| 2022-06-21T02:08:25
| 2019-09-30T07:09:39
|
Java
|
UTF-8
|
Java
| false
| false
| 304
|
java
|
package app.domain.models.binding;
import app.domain.enums.Engine;
import lombok.*;
@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
@ToString
@Builder
public class CarCreateBindingModel {
private String brand;
private String model;
private Integer year;
private Engine engine;
}
|
[
"vas.atanasov@gmail.com"
] |
vas.atanasov@gmail.com
|
24273ae874f16cae38ad2e92f208160075bdeb35
|
f385e9805a3d7d251e9c16e6b12f1fcc2e752758
|
/angel-ps/core/src/main/java/com/tencent/angel/model/PSMatrixLoadContext.java
|
9e0baf858a201db9f23a6e95bafec52cf52c88dd
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference",
"MIT",
"BSD-3-Clause"
] |
permissive
|
TimDengx86/angel
|
227908cc9fdfcb9564a52fe64ff7426c7dc7f05b
|
833fdb503be86e1bac813e3803554f21462a57b2
|
refs/heads/master
| 2020-04-07T19:04:28.354684
| 2019-12-26T02:38:46
| 2019-12-26T02:38:46
| 158,635,157
| 1
| 0
|
NOASSERTION
| 2019-12-26T02:38:48
| 2018-11-22T03:03:02
|
Java
|
UTF-8
|
Java
| false
| false
| 3,064
|
java
|
/*
* Tencent is pleased to support the open source community by making Angel available.
*
* Copyright (C) 2017-2018 THL A29 Limited, a Tencent company. 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
*
* https://opensource.org/licenses/Apache-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.tencent.angel.model;
import com.tencent.angel.model.io.IOExecutors;
import java.util.List;
/**
* PS matrix load context
*/
public class PSMatrixLoadContext {
/**
* Matrix id
*/
private final int matrixId;
/**
* Matrix save directory
*/
private final String loadPath;
/**
* Need load matrix partitions
*/
private final List<Integer> partIds;
/**
* Matrix output format class name
*/
private volatile String formatClassName;
/**
* Save workers
*/
private volatile IOExecutors workers;
/**
* Create a new PSMatrixLoadContext
*
* @param matrixId matrix id
* @param loadPath matrix save directory
* @param partIds need load directory
*/
public PSMatrixLoadContext(int matrixId, String loadPath, List<Integer> partIds,
String formatClassName) {
this.matrixId = matrixId;
this.loadPath = loadPath;
this.partIds = partIds;
this.formatClassName = formatClassName;
}
/**
* Create a new PSMatrixLoadContext
*
* @param matrixId matrix id
* @param loadPath matrix save directory
* @param partIds need load directory
*/
public PSMatrixLoadContext(int matrixId, String loadPath, List<Integer> partIds) {
this(matrixId, loadPath, partIds, null);
}
/**
* Get matrix id
*
* @return matrix id
*/
public int getMatrixId() {
return matrixId;
}
/**
* Get matrix save directory
*
* @return matrix save directory
*/
public String getLoadPath() {
return loadPath;
}
/**
* Get need load partitons
*
* @return need load partitions
*/
public List<Integer> getPartIds() {
return partIds;
}
/**
* Get output format class name
*
* @return output format class name
*/
public String getFormatClassName() {
return formatClassName;
}
/**
* Set output format class name
*
* @param formatClassName output format class name
*/
public void setFormatClassName(String formatClassName) {
this.formatClassName = formatClassName;
}
/**
* Get load workers
*
* @return load workers
*/
public IOExecutors getWorkers() {
return workers;
}
/**
* Set load workers
*
* @param workers load workers
*/
public void setWorkers(IOExecutors workers) {
this.workers = workers;
}
}
|
[
"cswjsxs2005@gmail.com"
] |
cswjsxs2005@gmail.com
|
c1b5bcd4b719066e5dd53e3aab43e2956809d2cc
|
58df55b0daff8c1892c00369f02bf4bf41804576
|
/src/gow.java
|
0351db591287c66df9658f19c0ccf2cc24e0d97b
|
[] |
no_license
|
gafesinremedio/com.google.android.gm
|
0b0689f869a2a1161535b19c77b4b520af295174
|
278118754ea2a262fd3b5960ef9780c658b1ce7b
|
refs/heads/master
| 2020-05-04T15:52:52.660697
| 2016-07-21T03:39:17
| 2016-07-21T03:39:17
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,743
|
java
|
import java.io.PrintWriter;
import java.io.StringWriter;
import java.util.Iterator;
import java.util.List;
public final class gow
{
private final List<gpc> a;
public gow(List<gpc> paramList)
{
a = paramList;
}
public static gpa a(gos paramgos, String paramString)
{
return new gpa(paramgos, paramString);
}
public static gpd a(gos paramgos, List<gpe> paramList, String paramString1, String paramString2)
{
return new gpd(paramgos, paramList, false, paramString1, paramString2, (byte)0);
}
public static gpe a(gor paramgor, String paramString1, String paramString2)
{
if (paramgor != null) {}
for (boolean bool = true;; bool = false)
{
hby.a(bool);
return new gpe(paramgor, paramString1, paramString2);
}
}
public static gpf a(String paramString1, String paramString2)
{
return new gpg(paramString1, paramString2);
}
public static gpd b(gos paramgos, List<gpe> paramList, String paramString1, String paramString2)
{
return new gpd(paramgos, paramList, true, paramString1, paramString2, (byte)0);
}
public static gpf b(String paramString1, String paramString2)
{
return new gpb(paramString1, paramString2);
}
public final void a(gph paramgph)
{
paramgph.a();
Iterator localIterator = a.iterator();
while (localIterator.hasNext()) {
((gpc)localIterator.next()).a(paramgph);
}
paramgph.b();
}
public final String toString()
{
StringWriter localStringWriter = new StringWriter();
a(new goz(new PrintWriter(localStringWriter)));
return localStringWriter.toString();
}
}
/* Location:
* Qualified Name: gow
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
c7ee2fb8273b2cb26461cc40bf75d0807fa55a55
|
087bd6f6b5becb349748627476313f64f72e0978
|
/integration/jcodec/src/boofcv/io/jcodec/JCodecMediaManager.java
|
55a813cd30e7ded061f5c9975af9478d94c70cfd
|
[
"Apache-2.0"
] |
permissive
|
pacozaa/BoofCV
|
debc20e0875f63ce06ded33b5fad00a1e63dc0b5
|
f6f6eeebe194eeaca3d746057c0b709677fb95d2
|
refs/heads/master
| 2021-01-17T01:10:22.302364
| 2016-02-19T03:38:50
| 2016-02-19T03:38:50
| 42,052,198
| 0
| 0
| null | 2015-09-07T12:38:22
| 2015-09-07T12:38:21
| null |
UTF-8
|
Java
| false
| false
| 3,197
|
java
|
/*
* Copyright (c) 2011-2015, Peter Abeles. All Rights Reserved.
*
* This file is part of BoofCV (http://boofcv.org).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package boofcv.io.jcodec;
import boofcv.io.MediaManager;
import boofcv.io.VideoCallBack;
import boofcv.io.image.SimpleImageSequence;
import boofcv.io.image.UtilImageIO;
import boofcv.io.video.VideoMjpegCodec;
import boofcv.io.wrapper.images.ImageStreamSequence;
import boofcv.io.wrapper.images.JpegByteImageSequence;
import boofcv.struct.image.ImageBase;
import boofcv.struct.image.ImageType;
import java.awt.*;
import java.awt.image.BufferedImage;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.Reader;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author Peter Abeles
*/
public class JCodecMediaManager implements MediaManager {
public static final JCodecMediaManager INSTANCE = new JCodecMediaManager();
Map<String,BufferedImage> cachedImage = new HashMap<String, BufferedImage>();
@Override
public Reader openFile(String fileName) {
try {
return new FileReader(fileName);
} catch (FileNotFoundException e) {
return null;
}
}
@Override
public BufferedImage openImage(String fileName) {
BufferedImage b = cachedImage.get(fileName);
if( b == null ) {
b = UtilImageIO.loadImage(fileName);
if( b == null )
throw new RuntimeException("Image cannot be found! "+fileName);
cachedImage.put(fileName,b);
}
// return a copy of the image so that if it is modified strangeness won't happen
BufferedImage c = new BufferedImage(b.getWidth(),b.getHeight(),b.getType());
Graphics2D g2 = c.createGraphics();
g2.drawImage(b,0,0,null);
return c;
}
@Override
public <T extends ImageBase> SimpleImageSequence<T>
openVideo(String fileName, ImageType<T> type) {
if( fileName.endsWith("mjpeg") || fileName.endsWith("MJPEG") ) {
try {
VideoMjpegCodec codec = new VideoMjpegCodec();
List<byte[]> data = codec.read(new FileInputStream(fileName));
return new JpegByteImageSequence<T>(type,data,false);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
} else if( fileName.endsWith("mpng") || fileName.endsWith("MPNG")) {
try {
return new ImageStreamSequence<T>(fileName,true,type);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
}
} else {
return new JCodecSimplified<T>(fileName,type);
}
}
@Override
public <T extends ImageBase> boolean openCamera(String device, int width, int height, VideoCallBack<T> callback) {
throw new RuntimeException("Not supported");
}
}
|
[
"peter.abeles@gmail.com"
] |
peter.abeles@gmail.com
|
83b00d430c7c0857a6cf7f02ae8d636f053ae0b9
|
f18a72534480d2ba5ef34c136aab73e4aaa9363a
|
/ALIA4J-NOIRIn-all/src/org/alia4j/addb/util/DataUtil.java
|
d1708be53f77853ede32604a5ebf66de45cb1640
|
[] |
no_license
|
zygote1984/AspectualAdapters
|
78570fce537788ada7616535c2f10220123587a8
|
b877ed8fe3982bca1d9f0482aed82b51575d4d65
|
refs/heads/master
| 2020-05-07T08:17:25.352929
| 2012-07-17T14:42:59
| 2012-07-17T14:42:59
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,307
|
java
|
package org.alia4j.addb.util;
import java.nio.ByteBuffer;
import java.nio.charset.Charset;
import java.util.LinkedList;
import java.util.List;
public class DataUtil {
public static byte[] intToBytes(int i) {
byte[] bytes = new byte[4];
bytes[0] = (byte) (i >>> 24);
bytes[1] = (byte) (i >>> 16);
bytes[2] = (byte) (i >>> 8);
bytes[3] = (byte) (i >>> 0);
return bytes;
}
public static byte[] intsToBytes(int[] ints) {
byte[] allbytes = new byte[ints.length*4];
for(int i=0; i<ints.length; i++) {
byte[] bytes = intToBytes(ints[i]);
System.arraycopy(bytes, 0, allbytes, i*4, 4);
}
return allbytes;
}
public static int bytesToInt(byte[] bytes, int index) {
int a = (bytes[index] & 0xff) << 24;
int b = (bytes[index+1] & 0xff) << 16;
int c = (bytes[index+2] & 0xff) << 8;
int d = (bytes[index+3] & 0xff) << 0;
return a+b+c+d;
}
final public static Charset CharsetCode = Charset.forName("US-ASCII");
public static byte[] stringToBytes(String s) {
return s.getBytes(CharsetCode);
}
public static String bytesToString(byte[] bytes) {
ByteBuffer bb = ByteBuffer.allocate(bytes.length);
bb.put(bytes);
bb.flip();
return CharsetCode.decode(bb).toString();
}
public static byte booleanToByte(boolean bool) {
if(bool)
return (byte)1;
else
return (byte)0;
}
public static String removeStringQuote(String str){
int start = 0;
int end = str.length();
if(str.charAt(0)=='\"') {
start += 1;
}
if(str.charAt(end-1)=='\"') {
end -= 1;
}
return str.substring(start, end);
}
public static byte[] concatBytes(byte[]... bytes) {
int length = 0;
for(byte [] array : bytes) {
length += array.length;
}
byte [] newArray = new byte[length];
int index = 0;
for(byte [] array : bytes) {
System.arraycopy(array, 0, newArray, index, array.length);
index += array.length;
}
return newArray;
}
public static List<String> extendStringList(List<String> list, String newStr) {
List<String> listCopy = new LinkedList<String>();
listCopy.addAll(list);
listCopy.add(newStr);
return listCopy;
}
}
|
[
"kardelenhatun@gmail.com"
] |
kardelenhatun@gmail.com
|
99542e0009170da0dae8613248940afe75bfed23
|
09ca502b44715c987b65fc3e06d41e60d4d08bc0
|
/bonita-server/src/test/java/org/ow2/bonita/connector/examples/test/AttachmentSetterTest.java
|
ad044d72f12f19a2798af40f3fd24acedf374e0e
|
[] |
no_license
|
fivegg/bbonita-runtime-5-10-1
|
29b51fe1fd18c7307809c50c28f3a33aab63786d
|
585aa4ca3cf14771f03d087cfb82237aff99897d
|
refs/heads/master
| 2016-09-05T09:47:31.631120
| 2013-12-20T03:03:11
| 2013-12-20T03:03:11
| 14,005,787
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,335
|
java
|
/**
* Copyright (C) 2010 BonitaSoft S.A.
* BonitaSoft, 31 rue Gustave Eiffel - 38000 Grenoble
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2.0 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.ow2.bonita.connector.examples.test;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileOutputStream;
import java.io.FileReader;
import java.io.OutputStream;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import junit.framework.TestCase;
import org.ow2.bonita.connector.core.ConnectorAPI;
import org.ow2.bonita.connector.core.ConnectorDescription;
import org.ow2.bonita.connector.core.ConnectorDescriptorAPI;
import org.ow2.bonita.connector.core.desc.ConnectorDescriptor;
import org.ow2.bonita.connector.core.desc.Getter;
import org.ow2.bonita.connector.core.desc.Page;
import org.ow2.bonita.connector.core.desc.Setter;
import org.ow2.bonita.connector.examples.AttachmentConnector;
import org.ow2.bonita.facade.runtime.AttachmentInstance;
import org.ow2.bonita.facade.runtime.impl.AttachmentInstanceImpl;
import org.ow2.bonita.facade.uuid.DocumentUUID;
import org.ow2.bonita.facade.uuid.ProcessInstanceUUID;
/**
* @author Mickael Istria
*
*/
public class AttachmentSetterTest extends TestCase {
public void testAttachmentSetter() throws Exception {
AttachmentInstance attachment = new AttachmentInstanceImpl(new DocumentUUID("test"), "kikoo", new ProcessInstanceUUID("dummy"), "billy", new Date());
final Setter setter = new Setter("setO", null, null, new Object[] { attachment });
final ConnectorDescriptor connectorDescriptor = new ConnectorDescriptor("connectorId", getList(ConnectorAPI.other), null,
getList(setter), new ArrayList<Getter>(), new ArrayList<Page>());
//create folder and file
//final File myFolder = new File(System.getProperty(BonitaConstants.BONITA_HOME) + File.separator + "myFolder");
final File curentFolder = new File(getClass().getClassLoader().getResource(AttachmentConnector.class.getName().replace('.', '/') + ".class").getFile());
final File myFolder = new File(curentFolder.getParent());
assertTrue(myFolder.exists());
assertTrue(myFolder.isDirectory());
final File file = new File(myFolder, AttachmentConnector.class.getSimpleName() + ".xml");
file.createNewFile();
final OutputStream output = new FileOutputStream(file);
//save the connector descriptor file
ConnectorDescriptorAPI.save(connectorDescriptor, output);
// Check contents of file
BufferedReader reader = new BufferedReader(new FileReader(file));
String line = null;
boolean found = false;
while (!found && (line = reader.readLine()) != null) {
if (line.contains("<attachment/>")) {
found = true;
} else if (line.contains("DocumentImpl")) {
fail("A default serialization was used");
}
}
reader.close();
assertTrue("no atttachment element found", found);
//load the connector
final ConnectorAPI connectorAPI = new ConnectorAPI(getClass().getClassLoader(), getList(AttachmentConnector.class.getName()));
final ConnectorDescription connectorDescription = connectorAPI.getConnector("connectorId");
assertNotNull(connectorDescription);
final List<Setter> inputs = connectorDescription.getInputs();
assertEquals(1, inputs.size());
Setter daSetter = inputs.get(0);
assertTrue(daSetter.getParameters()[0] instanceof AttachmentInstance);
AttachmentConnector connector = (AttachmentConnector)connectorDescription.getConnectorClass().newInstance();
connector.setO(attachment);
output.close();
file.delete();
}
private static <T> List<T> getList(T o) {
final List<T> result = new ArrayList<T>();
result.add(o);
return result;
}
}
|
[
"fivegg@163.com"
] |
fivegg@163.com
|
abd1b36632703ed43affc23fd36812339becf896
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/spoon/learning/853/ProgressLogger.java
|
188b01d3d0f978554f4a567a0fba502bc363b4f0
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,022
|
java
|
/**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* 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 CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.support.compiler;
import spoon.support.StandardEnvironment;
import java.util.GregorianCalendar;
public class ProgressLogger implements SpoonProgress {
private long stepTimer;
private long timer;
private StandardEnvironment environment;
public ProgressLogger(StandardEnvironment environment) {
this.environment = environment;
}
@Override
public void start(Process process) {
environment.debugMessage("Start " + process);
timer = getCurrentTimeInMillis();
stepTimer = timer;
}
@Override
public void step(Process process, String task, int taskId, int nbTask) {
environment.debugMessage("Step " + process + " " + taskId + "/" + nbTask + " " + task + " in " + (getCurrentTimeInMillis() - timer) + " ms");
timer = getCurrentTimeInMillis();
}
@Override
public void step(Process process, String task) {
environment.debugMessage("Step " + process + " " + task + " in " + (getCurrentTimeInMillis() - timer) + " ms");
timer = getCurrentTimeInMillis();
}
@Override
public void end(Process process) {
environment.debugMessage("End " +process + " in " + (getCurrentTimeInMillis() - stepTimer) + " ms");
}
private long getCurrentTimeInMillis() {
return new GregorianCalendar().getTimeInMillis();
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
fe95f0f9ac9e1692fce543cef6b69677ec9fe1d1
|
d59ecc8ff1193c4e5f77f8b57eb85ff97daaba14
|
/src/main/java/com/hzth/myapp/tools/fivechess/ChooserDialog.java
|
b18ac33e2bd9be7fb805a7349caafc1813d4e1ec
|
[] |
no_license
|
tianyl1984/myWebApp
|
0d7a6dfc6ca73a339b16262e4988fbada1e93965
|
21edbf1f8d2a653824ddbae1540c6ed9c398dfe5
|
refs/heads/master
| 2020-04-06T09:36:06.798747
| 2016-09-06T07:29:44
| 2016-09-06T07:29:44
| 49,413,254
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,040
|
java
|
package com.hzth.myapp.tools.fivechess;
import java.awt.FlowLayout;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JLabel;
import javax.swing.JTextField;
public class ChooserDialog {
private JDialog dialog;
private JLabel ipLabel, portLabel;
private JTextField ip, port;
private JButton ok, cancel;
public ChooserDialog() {
}
public ChooserDialog(boolean flag) {
dialog = new JDialog();
ipLabel = new JLabel("地址:");
portLabel = new JLabel("端口:");
ip = new JTextField(10);
port = new JTextField(10);
ipLabel.setVisible(flag);
ip.setVisible(flag);
ok = new JButton("确定");
cancel = new JButton("取消");
init();
}
private void init() {
dialog.setTitle("请填写");
dialog.setLayout(new FlowLayout());
dialog.add(ipLabel);
dialog.add(ip);
dialog.add(portLabel);
dialog.add(port);
dialog.add(ok);
dialog.add(cancel);
dialog.setBounds(300, 400, 180, 120);
dialog.setVisible(true);
dialog.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
}
}
|
[
"tianyl1984@qq.com"
] |
tianyl1984@qq.com
|
c4f3a2fcd4b305849626aca626ee1938837426ce
|
275770ff05bf6b2b967032439aad50ced91ea542
|
/state-machine-generator/src/test/java/com/github/davidmoten/bean/immutable/Example.java
|
1910d6c90426cb2b7291b5bb60d34aae29c1bcc6
|
[
"Apache-2.0"
] |
permissive
|
davidmoten/state-machine
|
e5fe28ac6accad20609920165ed7c6b339abf1d2
|
48efce8c7648e1bfb1686057b625f3f2be689d20
|
refs/heads/master
| 2023-08-27T21:52:38.329172
| 2023-07-28T13:43:54
| 2023-07-28T13:46:14
| 56,027,154
| 123
| 19
|
Apache-2.0
| 2023-09-01T13:05:12
| 2016-04-12T03:17:09
|
Java
|
UTF-8
|
Java
| false
| false
| 3,220
|
java
|
package com.github.davidmoten.bean.immutable;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.github.davidmoten.bean.annotation.NonNull;
import java.io.Serializable;
import java.util.Date;
import java.util.Objects;
/////////////////////////////////////////////////////
// WARNING - Generated data class!
/////////////////////////////////////////////////////
@SuppressWarnings("serial")
public class Example implements Serializable {
@NonNull
private final String id;
private final int number;
private final Date[] values;
@JsonCreator
Example(
@JsonProperty("id") String id,
@JsonProperty("number") int number,
@JsonProperty("values") Date[] values) {
this.id = id;
this.number = number;
this.values = values;
}
public String id() {
return id;
}
public int number() {
return number;
}
public Date[] values() {
return values;
}
public Example withId(String id) {
return new Example(id, number, values);
}
public Example withNumber(int number) {
return new Example(id, number, values);
}
public Example withValues(Date[] values) {
return new Example(id, number, values);
}
// Constructor synchronized builder pattern.
// Changing the parameter list in the source
// and regenerating will provoke compiler errors
// wherever the builder is used.
public static Builder2 id(String id) {
Builder b = new Builder();
b.id = id;
return new Builder2(b);
}
private static final class Builder {
String id;
int number;
Date[] values;
}
public static final class Builder2 {
private final Builder b;
Builder2(Builder b) {
this.b = b;
}
public Builder3 number(int number) {
b.number = number;
return new Builder3(b);
}
}
public static final class Builder3 {
private final Builder b;
Builder3(Builder b) {
this.b = b;
}
public Example values(Date[] values) {
b.values = values;
return new Example(b.id, b.number, b.values);
}
}
@Override
public int hashCode() {
return Objects.hash(id, number, values);
}
@Override
public boolean equals(Object o) {
if (o == null) {
return false;
} else if (!(o instanceof Example)) {
return false;
} else {
Example other = (Example) o;
return
Objects.deepEquals(this.id, other.id)
&& Objects.deepEquals(this.number, other.number)
&& Objects.deepEquals(this.values, other.values);
}
}
@Override
public String toString() {
StringBuilder b = new StringBuilder();
b.append("Example[");
b.append("id=" + this.id);
b.append(",");
b.append("number=" + this.number);
b.append(",");
b.append("values=" + this.values);
b.append("]");
return b.toString();
}
}
|
[
"davidmoten@gmail.com"
] |
davidmoten@gmail.com
|
e3db1191387befd0c7aee305c6d105c58ce05bd0
|
9d9c0d9aba0c3102787a0215621b24dbe7f64b59
|
/jeecms-backup/src/test/java/com/jeecms/backup/databasebackup/LocalMysqlBackupTest.java
|
45f8264c7b5c3dcac12d898d12b63c93c6dbab01
|
[] |
no_license
|
hd19901110/jeecms1.4.1test
|
b354019c57a06384524d53aa667614c1f4e5a743
|
4e3e0cb31513e53004aa20c108f79741203becb0
|
refs/heads/master
| 2022-12-08T06:10:06.868825
| 2020-08-31T09:59:19
| 2020-08-31T09:59:19
| 285,445,431
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,238
|
java
|
package com.jeecms.backup.databasebackup;
import com.jeecms.backup.entity.BackupDto;
import org.junit.Before;
import org.junit.Test;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
public class LocalMysqlBackupTest {
private BackupConfig backupConfig;
private Backup backuper;
@Before
public void init() {
BackupDto dataSourceProperties = new BackupDto();
dataSourceProperties.setUsername("root");
dataSourceProperties.setPassword("123456");
dataSourceProperties.setJdbcUrl("jdbc:mysql://127.0.0.1:3306/test");
backupConfig = BackupConfig
.of(dataSourceProperties);
backuper = DatabaseBackuperFactory.createBackuper(backupConfig);
}
private void doBackup() {
String backup = backuper.backup();
assertEquals(backup, backupConfig.getDataSavePath());
}
private void doRecovery() {
boolean success = backuper.recovery();
assertTrue(success);
}
@Test
public void test() {
doBackup();
System.out.println("备份成功");
doRecovery();
System.out.println("还原成功");
}
}
|
[
"2638177992@qq.com"
] |
2638177992@qq.com
|
6b2e6e73414047d09fa032730e3cd489a8bf5c14
|
cd4802766531a9ccf0fb54ca4b8ea4ddc15e31b5
|
/dist/game/data/scripts/instances/SSQMonasteryOfSilence/SSQMonasteryOfSilence.java
|
4c367e059599e8186274c5b36807cc60479cad56
|
[] |
no_license
|
singto53/underground
|
8933179b0d72418f4b9dc483a8f8998ef5268e3e
|
94264f5168165f0b17cc040955d4afd0ba436557
|
refs/heads/master
| 2021-01-13T10:30:20.094599
| 2016-12-11T20:32:47
| 2016-12-11T20:32:47
| 76,455,182
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,490
|
java
|
/*
* This file is part of the L2J Mobius project.
*
* 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 instances.SSQMonasteryOfSilence;
import com.l2jmobius.gameserver.enums.ChatType;
import com.l2jmobius.gameserver.enums.Movie;
import com.l2jmobius.gameserver.model.Location;
import com.l2jmobius.gameserver.model.actor.L2Npc;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.holders.SkillHolder;
import com.l2jmobius.gameserver.model.instancezone.Instance;
import com.l2jmobius.gameserver.network.NpcStringId;
import instances.AbstractInstance;
/**
* Monastery of Silence instance zone.
* @author Adry_85
*/
public final class SSQMonasteryOfSilence extends AbstractInstance
{
// NPCs
private static final int ELCADIA_INSTANCE = 32787;
private static final int ERIS_EVIL_THOUGHTS = 32792;
private static final int RELIC_GUARDIAN = 32803;
private static final int RELIC_WATCHER1 = 32804;
private static final int RELIC_WATCHER2 = 32805;
private static final int RELIC_WATCHER3 = 32806;
private static final int RELIC_WATCHER4 = 32807;
private static final int ODD_GLOBE = 32815;
private static final int TELEPORT_CONTROL_DEVICE1 = 32817;
private static final int TELEPORT_CONTROL_DEVICE2 = 32818;
private static final int TELEPORT_CONTROL_DEVICE3 = 32819;
private static final int TELEPORT_CONTROL_DEVICE4 = 32820;
// Skills
private static final SkillHolder[] BUFFS =
{
new SkillHolder(6725, 1), // Bless the Blood of Elcadia
new SkillHolder(6728, 1), // Recharge of Elcadia
new SkillHolder(6730, 1), // Greater Battle Heal of Elcadia
};
// Locations
private static final Location CENTRAL_ROOM_LOC = new Location(85794, -249788, -8320);
private static final Location SOUTH_WATCHERS_ROOM_LOC = new Location(85798, -246566, -8320);
private static final Location WEST_WATCHERS_ROOM_LOC = new Location(82531, -249405, -8320);
private static final Location EAST_WATCHERS_ROOM_LOC = new Location(88665, -249784, -8320);
private static final Location NORTH_WATCHERS_ROOM_LOC = new Location(85792, -252336, -8320);
private static final Location BACK_LOC = new Location(120710, -86971, -3392);
// NpcString
private static final NpcStringId[] ELCADIA_DIALOGS =
{
NpcStringId.IT_SEEMS_THAT_YOU_CANNOT_REMEMBER_TO_THE_ROOM_OF_THE_WATCHER_WHO_FOUND_THE_BOOK,
NpcStringId.WE_MUST_SEARCH_HIGH_AND_LOW_IN_EVERY_ROOM_FOR_THE_READING_DESK_THAT_CONTAINS_THE_BOOK_WE_SEEK,
NpcStringId.REMEMBER_THE_CONTENT_OF_THE_BOOKS_THAT_YOU_FOUND_YOU_CAN_T_TAKE_THEM_OUT_WITH_YOU
};
// Misc
private static final int TEMPLATE_ID = 151;
public SSQMonasteryOfSilence()
{
super(TEMPLATE_ID);
addFirstTalkId(TELEPORT_CONTROL_DEVICE1, TELEPORT_CONTROL_DEVICE2, TELEPORT_CONTROL_DEVICE3, TELEPORT_CONTROL_DEVICE4, ERIS_EVIL_THOUGHTS);
addStartNpc(ODD_GLOBE, TELEPORT_CONTROL_DEVICE1, TELEPORT_CONTROL_DEVICE2, TELEPORT_CONTROL_DEVICE3, TELEPORT_CONTROL_DEVICE4, ERIS_EVIL_THOUGHTS);
addTalkId(ODD_GLOBE, ERIS_EVIL_THOUGHTS, RELIC_GUARDIAN, RELIC_WATCHER1, RELIC_WATCHER2, RELIC_WATCHER3, RELIC_WATCHER4, TELEPORT_CONTROL_DEVICE1, TELEPORT_CONTROL_DEVICE2, TELEPORT_CONTROL_DEVICE3, TELEPORT_CONTROL_DEVICE4, ERIS_EVIL_THOUGHTS);
}
@Override
protected void onEnter(L2PcInstance player, Instance instance, boolean firstEnter)
{
super.onEnter(player, instance, firstEnter);
final L2Npc elcadia = addSpawn(ELCADIA_INSTANCE, player, false, 0, false, player.getId());
startQuestTimer("FOLLOW", 3000, elcadia, player);
}
@Override
public String onAdvEvent(String event, L2Npc npc, L2PcInstance player)
{
final Instance world = player.getInstanceWorld();
if (world != null)
{
final L2Npc elcadia = world.getNpc(ELCADIA_INSTANCE);
switch (event)
{
case "TELE2":
{
player.teleToLocation(CENTRAL_ROOM_LOC);
elcadia.teleToLocation(CENTRAL_ROOM_LOC);
startQuestTimer("START_MOVIE", 2000, npc, player);
break;
}
case "EXIT":
{
cancelQuestTimer("FOLLOW", npc, player);
world.finishInstance(0);
break;
}
case "START_MOVIE":
{
playMovie(player, Movie.SSQ2_HOLY_BURIAL_GROUND_OPENING);
break;
}
case "BACK":
{
player.teleToLocation(BACK_LOC);
elcadia.teleToLocation(BACK_LOC);
break;
}
case "EAST":
{
player.teleToLocation(EAST_WATCHERS_ROOM_LOC);
elcadia.teleToLocation(EAST_WATCHERS_ROOM_LOC);
break;
}
case "WEST":
{
player.teleToLocation(WEST_WATCHERS_ROOM_LOC);
elcadia.teleToLocation(WEST_WATCHERS_ROOM_LOC);
break;
}
case "NORTH":
{
player.teleToLocation(NORTH_WATCHERS_ROOM_LOC);
elcadia.teleToLocation(NORTH_WATCHERS_ROOM_LOC);
break;
}
case "SOUTH":
{
player.teleToLocation(SOUTH_WATCHERS_ROOM_LOC);
elcadia.teleToLocation(SOUTH_WATCHERS_ROOM_LOC);
break;
}
case "CENTER":
{
player.teleToLocation(CENTRAL_ROOM_LOC);
elcadia.teleToLocation(CENTRAL_ROOM_LOC);
break;
}
case "FOLLOW":
{
npc.setIsRunning(true);
npc.getAI().startFollow(player);
if (player.isInCombat())
{
npc.broadcastSay(ChatType.NPC_GENERAL, NpcStringId.YOUR_WORK_HERE_IS_DONE_SO_RETURN_TO_THE_CENTRAL_GUARDIAN);
npc.setTarget(player);
npc.doCast(BUFFS[getRandom(BUFFS.length)].getSkill());
}
else
{
npc.broadcastSay(ChatType.NPC_GENERAL, ELCADIA_DIALOGS[getRandom(ELCADIA_DIALOGS.length)]);
}
startQuestTimer("FOLLOW", 10000, npc, player);
break;
}
}
}
return super.onAdvEvent(event, npc, player);
}
@Override
public String onTalk(L2Npc npc, L2PcInstance talker)
{
if (npc.getId() == ODD_GLOBE)
{
enterInstance(talker, npc, TEMPLATE_ID);
}
return super.onTalk(npc, talker);
}
public static void main(String[] args)
{
new SSQMonasteryOfSilence();
}
}
|
[
"MobiusDev@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDev@7325c9f8-25fd-504a-9f63-8876acdc129b
|
fa6dbee0a8580afa7edbecf79e83a0cf9feeff3c
|
cfafa45fa57797febe9e0cfaf374d670b7c78304
|
/apayment/src/main/java/cn/itsite/apayment/payment/PayFragment.java
|
4be4942137f1c259adea83c4c28f7c73cab2ec42
|
[] |
no_license
|
ackj/TonghuangSecurity
|
5bc608903a654ddb649bacdf7cf49f39c5782561
|
699a60321d49d188c3de748cd0fb871a36281aca
|
refs/heads/master
| 2021-05-13T14:45:31.192280
| 2018-02-07T07:03:11
| 2018-02-07T07:03:11
| 116,747,596
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,848
|
java
|
package cn.itsite.apayment.payment;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.webkit.WebSettings;
import android.webkit.WebView;
import android.webkit.WebViewClient;
import org.json.JSONObject;
import java.util.HashMap;
import java.util.Map;
import cn.itsite.abase.log.ALog;
import cn.itsite.apayment.payment.network.INetworkClient;
import cn.itsite.apayment.payment.network.PayService;
/**
* @author leguang
* @version v0.0.0
* @E-mail langmanleguang@qq.com
* @time 2017/5/20 0020 10:56
* 支付返回结果Bean。
*/
public class PayFragment extends Fragment {
public static final String TAG = PayFragment.class.getSimpleName();
private PayParams payParams;
private WebView webView;
private Payment payment;
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setRetainInstance(true);
ALog.e("fragment onCreate ——----------------------");
}
@Nullable
@Override
public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {
ALog.e("fragment onCreateView ——----------------------");
webView = new WebView(getContext());
webView.setLayoutParams(new ViewGroup.LayoutParams(1, 1));
webView.setVisibility(View.INVISIBLE);
WebSettings settings = webView.getSettings();
settings.setJavaScriptEnabled(true);
settings.setDefaultTextEncodingName("UTF-8");
webView.getSettings().setJavaScriptCanOpenWindowsAutomatically(true);
WebViewClient webViewClient = new WebViewClient() {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
ALog.e("url-->" + url);
// 如下方案可在非微信内部WebView的H5页面中调出微信支付
if (url.startsWith("weixin://wap/pay?")) {
Intent intent = new Intent();
intent.setAction(Intent.ACTION_VIEW);
intent.setData(Uri.parse(url));
startActivity(intent);
}
return false;
}
};
webView.setWebViewClient(webViewClient);
return webView;
}
@Override
public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
super.onViewCreated(view, savedInstanceState);
ALog.e("fragment onViewCreated ——----------------------");
}
public void setPayment(Payment payment) {
ALog.e("payment-->" + payment);
this.payment = payment;
}
public void setParams(PayParams payParams) {
this.payParams = payParams;
}
@Override
public void onStart() {
super.onStart();
ALog.e("fragment onStart—----------------------");
}
@Override
public void onResume() {
super.onResume();
ALog.e("fragment onResume—----------------------");
ALog.e("payment-->" + payment);
if (payParams != null && payment != null) {
PaymentListener.OnVerifyListener onVerifyListener = payment.getOnVerifyListener();
PaymentListener.OnPayListener onPayListener = payment.getOnPayListener();
if (onVerifyListener != null) {
onVerifyListener.onStart();
requestVerify(onVerifyListener, onPayListener);
}
}
}
@Override
public void onPause() {
super.onPause();
ALog.e("fragment onPause—----------------------");
}
@Override
public void onDestroyView() {
super.onDestroyView();
ALog.e("fragment onDestroyView—----------------------");
}
@Override
public void onDestroy() {
super.onDestroy();
ALog.e("fragment onDestroy—----------------------");
}
public void pay(PayParams params) {
this.payParams = params;
ALog.e("params.getWebUrl()-->" + params.getWebUrl());
Map<String, String> extraHeaders = new HashMap<>();
extraHeaders.put("Referer", "http://www.aglhz.com");
webView.loadUrl(params.getWebUrl(), extraHeaders);
}
private void requestVerify(final PaymentListener.OnVerifyListener onVerifyListener, final PaymentListener.OnPayListener onPayListener) {
HashMap<String, String> params = new HashMap<>();
params.put("outTradeNo", payParams.getOutTradeNo());
payment.getClient().post(PayService.requestPayResult, params, new INetworkClient.CallBack<String>() {
@Override
public void onSuccess(String result) {
ALog.e("result-->" + result);
JSONObject jsonObject;
boolean isPayed = false;
try {
jsonObject = new JSONObject(result);
isPayed = jsonObject.optJSONObject("data").optBoolean("tradeState");
} catch (Exception e) {
e.printStackTrace();
onVerifyListener.onFailure(Payment.VERIFY_ERROR);
}
onVerifyListener.onSuccess();
if (isPayed) {
onPayListener.onSuccess(payment.getPay().getPayType());
} else {
onPayListener.onFailure(payment.getPay().getPayType(), Payment.VERIFY_ERROR);
}
}
@Override
public void onFailure() {
ALog.e("确认失败-->");
onVerifyListener.onFailure(Payment.VERIFY_ERROR);
}
});
}
}
|
[
"langmanleguang@qq.com"
] |
langmanleguang@qq.com
|
30aeef562d6271df06a6080dee04937dfd2cac16
|
80c64d3aadff0448746f776b2f8f18cbaa3b859a
|
/NoobCraft/src/net/minecraft/block/BlockPotato.java
|
eb646c35b547c32661e64a19d99330b374978c44
|
[] |
no_license
|
lee0xp/noobcraft
|
0df52908026a7a20d482b64669c6ac5401a30458
|
1b5074a8811e4b6236b8b1a4df2498e15c8f12a0
|
refs/heads/master
| 2021-01-23T12:20:47.369896
| 2015-05-04T13:23:34
| 2015-05-04T13:23:34
| 35,021,763
| 2
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,241
|
java
|
package net.minecraft.block;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Items;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.BlockPos;
import net.minecraft.world.World;
public class BlockPotato extends BlockCrops
{
private static final String __OBFID = "CL_00000286";
protected Item getSeed()
{
return Items.potato;
}
protected Item getCrop()
{
return Items.potato;
}
/**
* Spawns this Block's drops into the World as EntityItems.
*
* @param chance The chance that each Item is actually spawned (1.0 = always, 0.0 = never)
* @param fortune The player's fortune level
*/
public void dropBlockAsItemWithChance(World worldIn, BlockPos pos, IBlockState state, float chance, int fortune)
{
super.dropBlockAsItemWithChance(worldIn, pos, state, chance, fortune);
if (!worldIn.isRemote)
{
if (((Integer)state.getValue(AGE)).intValue() >= 7 && worldIn.rand.nextInt(50) == 0)
{
spawnAsEntity(worldIn, pos, new ItemStack(Items.poisonous_potato));
}
}
}
}
|
[
"lee@lee0xp.de"
] |
lee@lee0xp.de
|
50b5d6c3a0ae260a69efca54deff1570f7c733c3
|
c1935c2c52716bf388d2377609d1b71130176311
|
/MSocketEverything/msocketSource/msocket1/src/edu/umass/cs/gnsserver/gnsApp/clientCommandProcessor/commands/account/LookupRandomGuids.java
|
1e4fa46e5bd25984dc624746fc3e07b0aa7a0471
|
[
"Apache-2.0"
] |
permissive
|
cyjing/mengThesis
|
a40b95edd8c12cef62a06df5c53934215a11b2d2
|
7afe312c0866da6cfe99183e22bfda647002c380
|
refs/heads/master
| 2021-01-17T18:23:48.194128
| 2016-06-02T09:16:43
| 2016-06-02T09:16:43
| 60,248,170
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,170
|
java
|
/*
*
* Copyright (c) 2015 University of Massachusetts
*
* 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.
*
* Initial developer(s): Abhigyan Sharma, Westy
*
*/
package edu.umass.cs.gnsserver.gnsApp.clientCommandProcessor.commands.account;
import edu.umass.cs.gnsserver.gnsApp.clientCommandProcessor.commandSupport.AccountAccess;
import edu.umass.cs.gnsserver.gnsApp.clientCommandProcessor.commandSupport.AccountInfo;
import edu.umass.cs.gnsserver.gnsApp.clientCommandProcessor.commandSupport.CommandResponse;
import static edu.umass.cs.gnscommon.GnsProtocol.*;
import edu.umass.cs.gnsserver.gnsApp.clientCommandProcessor.commands.CommandModule;
import edu.umass.cs.gnsserver.gnsApp.clientCommandProcessor.commands.GnsCommand;
import edu.umass.cs.gnsserver.gnsApp.clientCommandProcessor.demultSupport.ClientRequestHandlerInterface;
import java.util.ArrayList;
import java.util.List;
import java.util.Random;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
/**
*
* @author westy
*/
public class LookupRandomGuids extends GnsCommand {
/**
* Creates a LookupAccountRecord instance.
*
* @param module
*/
public LookupRandomGuids(CommandModule module) {
super(module);
}
@Override
public String[] getCommandParameters() {
return new String[]{GUID, GUIDCNT};
}
@Override
public String getCommandName() {
return LOOKUP_ACCOUNT_RECORD;
}
@Override
public CommandResponse<String> execute(JSONObject json, ClientRequestHandlerInterface handler) throws JSONException {
String guid = json.getString(GUID);
int count = json.getInt(GUIDCNT);
AccountInfo acccountInfo;
if ((acccountInfo = AccountAccess.lookupAccountInfoFromGuid(guid, handler)) == null) {
return new CommandResponse<String>(BAD_RESPONSE + " " + BAD_ACCOUNT + " " + guid);
}
if (acccountInfo != null) {
List<String> guids = acccountInfo.getGuids();
if (count >= guids.size()) {
return new CommandResponse<>(new JSONArray(guids).toString());
} else {
Random rand = new Random();
List<String> result = new ArrayList<>();
for (int i = 0; i < count; i++) {
result.add(guids.get(rand.nextInt(guids.size())));
}
return new CommandResponse<>(new JSONArray(result).toString());
}
} else {
return new CommandResponse<>(BAD_RESPONSE + " " + BAD_GUID + " " + guid);
}
// }
}
@Override
public String getCommandDescription() {
return "Returns the account info associated with the given GUID. "
+ "Returns " + BAD_GUID + " if the GUID has not been registered.";
}
}
|
[
"cyjing@secant.csail.mit.edu"
] |
cyjing@secant.csail.mit.edu
|
f8b60394a6a53057503233390a5d82303c5e2508
|
a4cb772ef69e0bf2e634aa8a3bb4bcfc1bba53da
|
/projects/asw-840-jms/b-simple-synch-consumer/simple-synch-consumer/src/main/java/asw/jms/simplesynchconsumer/Main.java
|
a1329acf7aff7e7309e06c841e655d1b464030e6
|
[] |
no_license
|
Techdruid/asw
|
dda016aa9bc4e211fa83b041272076696808c0f5
|
320f26d796246e768da345646b4730c258ae29fe
|
refs/heads/master
| 2020-12-25T13:13:15.082809
| 2016-06-06T07:14:23
| 2016-06-06T07:14:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,401
|
java
|
package asw.jms.simplesynchconsumer;
import javax.jms.*;
import javax.annotation.Resource;
import java.util.logging.Logger;
import asw.util.logging.AswLogger;
import asw.util.sleep.Sleeper;
/**
* Main.java
*
* Classe principale per l'application client SimpleSynchProducer.
*
* Esecuzione: dal prompt dei comandi, dalla cartella del progetto, tramite appclient:
* appclient -client build\SimpleSynchConsumer <destinazione (queue o topic)> <nomeConsumer> <ritardo tra messaggi> <#messaggi>
*
* Variante di un esempio nel tutorial per Java EE.
*
* @author Luca Cabibbo
*/
public class Main {
/* L'iniezione delle dipendenze puo' avvenire solo nella main class. */
@Resource(lookup = "jms/asw/Queue")
private static Queue queue;
@Resource(lookup = "jms/asw/Topic")
private static Topic topic;
@Resource(lookup = "jms/asw/ConnectionFactory")
private static ConnectionFactory connectionFactory;
// private static final String BASE_CONSUMER_NAME = "SimpleSynchConsumer";
private static final String BASE_CONSUMER_NAME = "SSC";
/* logger */
private static Logger logger = AswLogger.getInstance().getLogger("asw.jms.simplesynchconsumer");
/**
* Utilizzo nel caso in cui l'application client viene eseguito nell'host dell'AS:
* appclient -client SimpleSynchConsumer.jar [<queue|topic> [<client-name> [<delay> [<number_of_messages>] ] ] ]
*
* @param args the command line arguments:
* @param args[0] il tipo di destinazione: "queue" o "topic" [opt] default = queue
* @param args[1] il nome del consumer [opt] default = nome casuale
* @param args[2] ritardo massimo per il consumo dei messaggi, in ms [opt] default = 400
* @param args[3] numero di messaggi ricevuti - 0 per infinito [opt] default = 0
*/
public static void main(String[] args) {
String consumerName = null;
String destinationName = null;
Destination destination = null;
int maxDelay;
int numMsgs;
/* accesso ed analisi dei parametri */
/* valori di default */
destinationName = "queue";
consumerName = BASE_CONSUMER_NAME + "[" + (int)(Math.random()*1000) + "]";
maxDelay = 400;
numMsgs = 0; /* 0 vuol dire: ricevi messaggi all'infinito */
/* prova a vedere i parametri specificati dall'utente */
try {
destinationName = new String(args[0]);
consumerName = new String(args[1]);
maxDelay = (new Integer(args[2])).intValue();
numMsgs = (new Integer(args[3])).intValue();
} catch(Exception e) {
/* indice fuori dai limiti o altro errore (e.g., conversione) */
/* ok, ci sono i valori di default */
}
/* identifica il tipo di destinazione */
if (destinationName.equals("queue")) {
destination = queue;
} else if (destinationName.equals("topic")) {
destination = topic;
} else {
System.out.println("Invalid destination type");
System.exit(1);
}
/*
* attivita' principali del programma:
* riceve una sequenza di messaggi tramite un SimpleSynchConsumer
*/
logger.info("simpleconsumer.Main: " + consumerName + " ready to receive " + numMsgs + " messages from the " + destinationName);
/* crea un consumer */
SimpleSynchConsumer simpleConsumer = new SimpleSynchConsumer(consumerName, destination, connectionFactory);
logger.info("simpleconsumer.Main: Creato consumer: " + simpleConsumer.toString());
/* connessione */
simpleConsumer.connect();
simpleConsumer.start();
/* ricezione messaggi */
for (int i=0; i<numMsgs || numMsgs==0; i++) {
String message = simpleConsumer.receiveMessage();
Sleeper.randomSleep(maxDelay/2,maxDelay);
/* se e' arrivato un messaggio vuoto, allora interrompe la ricezione di messaggi */
if (message==null || message.length()==0) {
break;
}
}
/* disconnessione */
simpleConsumer.stop();
simpleConsumer.disconnect();
logger.info("simpleconsumer.Main: Consumer: " + consumerName + ": Done");
System.exit(0);
}
}
|
[
"cabibbo@dia.uniroma3.it"
] |
cabibbo@dia.uniroma3.it
|
d577c378e9883d0de8d1d17ce9421f671e0e15f7
|
4c1fcbba5db72d3353cc4def5d1b8d11f97afc0e
|
/encryption/src/androidTest/java/com/ngyb/encryption/ExampleInstrumentedTest.java
|
0d25c3b14542a44b40ed307a2c815433e4a92080
|
[] |
no_license
|
nangongyibin/Android_Study
|
6dfc9207324cec347ef5257f715e4baa375a0834
|
de28147ec78a430e96880e434ec913f55682e53a
|
refs/heads/master
| 2021-07-19T01:54:29.128926
| 2020-08-09T12:04:16
| 2020-08-09T12:04:16
| 203,688,384
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 722
|
java
|
package com.ngyb.encryption;
import android.content.Context;
import android.support.test.InstrumentationRegistry;
import android.support.test.runner.AndroidJUnit4;
import org.junit.Test;
import org.junit.runner.RunWith;
import static org.junit.Assert.*;
/**
* Instrumented test, which will execute on an Android device.
*
* @see <a href="http://d.android.com/tools/testing">Testing documentation</a>
*/
@RunWith(AndroidJUnit4.class)
public class ExampleInstrumentedTest {
@Test
public void useAppContext() {
// Context of the app under test.
Context appContext = InstrumentationRegistry.getTargetContext();
assertEquals("com.ngyb.encryption", appContext.getPackageName());
}
}
|
[
"nangongyibin@gmail.com"
] |
nangongyibin@gmail.com
|
148f7bbdf08798cc24a970956f81c1eddeb0d009
|
6754d670c5dc06bc0046ff6c0eaec693d5077cb7
|
/src/main/java/com/intellij/designer/designSurface/EditableArea.java
|
3fa3909f9dfc2880993191ebf4f377328b33acad
|
[
"Apache-2.0"
] |
permissive
|
consulo/consulo-ui-designer-core
|
b5e85e183733493b8fdc717f3be1dd74d9e4cae4
|
2a8616ab87de514728f773026d48549db6cbb50d
|
refs/heads/master
| 2021-01-17T04:47:47.616572
| 2020-09-02T08:56:00
| 2020-09-02T08:56:00
| 13,800,860
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,799
|
java
|
/*
* Copyright 2000-2012 JetBrains s.r.o.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.designer.designSurface;
import com.intellij.designer.designSurface.tools.InputTool;
import com.intellij.designer.model.RadComponent;
import com.intellij.openapi.actionSystem.ActionGroup;
import consulo.util.dataholder.Key;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.swing.*;
import java.awt.*;
import java.util.Collection;
import java.util.List;
/**
* @author Alexander Lobas
*/
public interface EditableArea {
Key<EditableArea> DATA_KEY = Key.create("EditableArea");
//////////////////////////////////////////////////////////////////////////////////////////
//
// Selection
//
//////////////////////////////////////////////////////////////////////////////////////////
void addSelectionListener(ComponentSelectionListener listener);
void removeSelectionListener(ComponentSelectionListener listener);
@Nonnull
List<RadComponent> getSelection();
boolean isSelected(@Nonnull RadComponent component);
void select(@Nonnull RadComponent component);
void deselect(@Nonnull RadComponent component);
void appendSelection(@Nonnull RadComponent component);
void setSelection(@Nonnull List<RadComponent> components);
void deselect(@Nonnull Collection<RadComponent> components);
void deselectAll();
void scrollToSelection();
//////////////////////////////////////////////////////////////////////////////////////////
//
// Visual
//
//////////////////////////////////////////////////////////////////////////////////////////
void setCursor(@Nullable Cursor cursor);
void setDescription(@Nullable String text);
@Nonnull
JComponent getNativeComponent();
@Nullable
RadComponent findTarget(int x, int y, @Nullable ComponentTargetFilter filter);
@Nullable
InputTool findTargetTool(int x, int y);
void showSelection(boolean value);
ComponentDecorator getRootSelectionDecorator();
@Nullable
EditOperation processRootOperation(OperationContext context);
FeedbackLayer getFeedbackLayer();
RadComponent getRootComponent();
boolean isTree();
@Nullable
FeedbackTreeLayer getFeedbackTreeLayer();
ActionGroup getPopupActions();
String getPopupPlace();
}
|
[
"vistall.valeriy@gmail.com"
] |
vistall.valeriy@gmail.com
|
0a5a8dbc4dd719f97242e33fd8f9f3a2ff43ad53
|
352f885c54205fbf668f92bcb2b2f41cf1fc608d
|
/app/src/main/java/com/legacycombo/apps/MyPreference.java
|
980ea805d7440bd1a4eba7c89001015d675428c0
|
[] |
no_license
|
wubi517/LegacyCombo
|
df6a61e5d6ec684b891773b1254a455642f0ff83
|
bfb9b1c7e79ac0e47c305015844c55a9c23b504b
|
refs/heads/master
| 2022-04-09T11:50:47.931519
| 2020-03-10T14:41:23
| 2020-03-10T14:41:23
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,891
|
java
|
package com.legacycombo.apps;
import android.content.Context;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.util.HashMap;
import java.util.Map;
public class MyPreference {
private Map<String,Object> values=new HashMap<String, Object>();
private String name;
private String path;
private ObjectOutputStream oos;
private ObjectInputStream ois;
public MyPreference(Context context, String name){
this.name=name;
this.path=context.getApplicationInfo().dataDir+"/mytv";
File f=new File(this.path);
if(!f.exists())f.mkdir();
f=new File(path+"/"+name+".z");
if(f.exists())load();
else save();
}
public void load(){
try {
ois=new ObjectInputStream(new FileInputStream(new File(path+"/"+name+".z")));
values=(Map<String, Object>) ois.readObject();
ois.close();
} catch (IOException e) {
values=new HashMap<String, Object>();
}catch (ClassNotFoundException e) {
values=new HashMap<String, Object>();
}
}
public boolean put(String key, Object value){
if(values==null)values=new HashMap();
if(values.containsKey(key))values.remove(key);
values.put(key, value);
return save();
}
public boolean save(){
try {
oos=new ObjectOutputStream(new FileOutputStream(new File(path+"/"+name+".z")));
oos.writeObject(values);
oos.close();
return true;
} catch (IOException e) {
e.printStackTrace();
}
return false;
}
public boolean containsKey(String key){
if(values==null)return false;
return values.containsKey(key);
}
public Object get(String key){
if(values==null)return null;
return values.get(key);
}
public void remove(String key){
if(values!=null){
values.remove(key);save();
}
}
public void removeAll(){
this.values.clear();save();
}
}
|
[
"yejong2013@gmail.com"
] |
yejong2013@gmail.com
|
89ca8398a2f203c449624d1a2fa6acf0f16bb7ed
|
6dbae30c806f661bcdcbc5f5f6a366ad702b1eea
|
/Corpus/eclipse.pde.ui/1927.java
|
ad9260ab9d79c498f042bd78e0fe3973f342e71d
|
[
"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
| 3,907
|
java
|
/*******************************************************************************
* Copyright (c) 2005, 2015 IBM 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:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.pde.internal.core.text.bundle;
import java.io.PrintWriter;
import org.eclipse.osgi.service.resolver.ExportPackageDescription;
import org.eclipse.osgi.util.ManifestElement;
import org.eclipse.pde.internal.core.ICoreConstants;
import org.eclipse.pde.internal.core.bundle.BundlePluginBase;
import org.eclipse.pde.internal.core.ibundle.IBundleModel;
import org.osgi.framework.Constants;
import org.osgi.framework.Version;
public class ImportPackageObject extends PackageObject {
private static final long serialVersionUID = 1L;
private static String getVersion(ExportPackageDescription desc) {
String version = desc.getVersion().toString();
if (!version.equals(Version.emptyVersion.toString()))
return desc.getVersion().toString();
return null;
}
public ImportPackageObject(ManifestHeader header, ManifestElement element, String versionAttribute) {
super(header, element, versionAttribute);
}
public ImportPackageObject(ManifestHeader header, ExportPackageDescription desc, String versionAttribute) {
super(header, desc.getName(), getVersion(desc), versionAttribute);
}
public ImportPackageObject(ManifestHeader header, String id, String version, String versionAttribute) {
super(header, id, version, versionAttribute);
}
public boolean isOptional() {
int manifestVersion = BundlePluginBase.getBundleManifestVersion(getHeader().getBundle());
if (manifestVersion > 1)
return Constants.RESOLUTION_OPTIONAL.equals(getDirective(Constants.RESOLUTION_DIRECTIVE));
//$NON-NLS-1$
return "true".equals(getAttribute(ICoreConstants.OPTIONAL_ATTRIBUTE));
}
public void setOptional(boolean optional) {
boolean old = isOptional();
int manifestVersion = BundlePluginBase.getBundleManifestVersion(getHeader().getBundle());
if (optional) {
if (manifestVersion > 1)
setDirective(Constants.RESOLUTION_DIRECTIVE, Constants.RESOLUTION_OPTIONAL);
else
setAttribute(//$NON-NLS-1$
ICoreConstants.OPTIONAL_ATTRIBUTE, //$NON-NLS-1$
"true");
} else {
setDirective(Constants.RESOLUTION_DIRECTIVE, null);
setAttribute(ICoreConstants.OPTIONAL_ATTRIBUTE, null);
}
fHeader.update();
firePropertyChanged(this, Constants.RESOLUTION_DIRECTIVE, Boolean.toString(old), Boolean.toString(optional));
}
/**
* @param model
* @param header
* @param versionAttribute
*/
public void reconnect(IBundleModel model, ImportPackageHeader header, String versionAttribute) {
super.reconnect(model, header, versionAttribute);
// No transient fields
}
@Override
public void write(String indent, PrintWriter writer) {
// Used for text transfers for copy, cut, paste operations
writer.write(write());
}
public void restoreProperty(String propertyName, Object oldValue, Object newValue) {
if (Constants.RESOLUTION_DIRECTIVE.equalsIgnoreCase(propertyName)) {
setOptional(Boolean.parseBoolean(newValue.toString()));
} else if (fVersionAttribute != null && fVersionAttribute.equalsIgnoreCase(propertyName)) {
setVersion(newValue.toString());
}
}
}
|
[
"masudcseku@gmail.com"
] |
masudcseku@gmail.com
|
0ab94045e8869bc027645e48e173c5e51dd261f0
|
1d928c3f90d4a0a9a3919a804597aa0a4aab19a3
|
/java/lucene-solr/2019/4/SubtractEvaluatorTest.java
|
4d56b8d562bb38d33a85f438aaaa31b46c894b94
|
[] |
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
| 5,800
|
java
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for subitional 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.solr.client.solrj.io.stream.eval;
import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import org.apache.solr.SolrTestCase;
import org.apache.solr.client.solrj.io.Tuple;
import org.apache.solr.client.solrj.io.eval.StreamEvaluator;
import org.apache.solr.client.solrj.io.eval.SubtractEvaluator;
import org.apache.solr.client.solrj.io.stream.expr.StreamFactory;
import org.junit.Test;
import junit.framework.Assert;
public class SubtractEvaluatorTest extends SolrTestCase {
StreamFactory factory;
Map<String, Object> values;
public SubtractEvaluatorTest() {
super();
factory = new StreamFactory()
.withFunctionName("sub", SubtractEvaluator.class);
values = new HashMap<String,Object>();
}
@Test
public void subTwoFieldsWithValues() throws Exception{
StreamEvaluator evaluator = factory.constructEvaluator("sub(a,b)");
Object result;
values.clear();
values.put("a", 1);
values.put("b", 2);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Long);
Assert.assertEquals(-1L, result);
values.clear();
values.put("a", 1.1);
values.put("b", 2);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Double);
Assert.assertEquals(-.9D, result);
values.clear();
values.put("a", 1.1);
values.put("b", 2.1);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Long);
Assert.assertEquals(-1L, result);
}
@Test(expected = IOException.class)
public void subOneField() throws Exception{
factory.constructEvaluator("sub(a)");
}
@Test(expected = IOException.class)
public void subTwoFieldWithNulls() throws Exception{
StreamEvaluator evaluator = factory.constructEvaluator("sub(a,b)");
Object result;
values.clear();
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
}
@Test(expected = IOException.class)
public void subTwoFieldsWithNull() throws Exception{
StreamEvaluator evaluator = factory.constructEvaluator("sub(a,b)");
Object result;
values.clear();
values.put("a", 1);
values.put("b", null);
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
values.clear();
values.put("a", 1.1);
values.put("b", null);
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
values.clear();
values.put("a", 1.1);
values.put("b", null);
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
}
@Test(expected = IOException.class)
public void subTwoFieldsWithMissingField() throws Exception{
StreamEvaluator evaluator = factory.constructEvaluator("sub(a,b)");
Object result;
values.clear();
values.put("a", 1);
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
values.clear();
values.put("a", 1.1);
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
values.clear();
values.put("a", 1.1);
result = evaluator.evaluate(new Tuple(values));
Assert.assertNull(result);
}
@Test
public void subManyFieldsWithValues() throws Exception{
StreamEvaluator evaluator = factory.constructEvaluator("sub(a,b,c,d)");
Object result;
values.clear();
values.put("a", 1);
values.put("b", 2);
values.put("c", 3);
values.put("d", 4);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Long);
Assert.assertEquals(-8L, result);
values.clear();
values.put("a", 1.1);
values.put("b", 2);
values.put("c", 3);
values.put("d", 4);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Double);
Assert.assertEquals(-7.9D, result);
values.clear();
values.put("a", 10.1);
values.put("b", 2.1);
values.put("c", 3.1);
values.put("d", 4.1);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Double);
Assert.assertEquals(.8D, result);
}
@Test
public void subManyFieldsWithSubsubs() throws Exception{
StreamEvaluator evaluator = factory.constructEvaluator("sub(a,b,sub(c,d))");
Object result;
values.clear();
values.put("a", 1);
values.put("b", 2);
values.put("c", 3);
values.put("d", 4);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Long);
Assert.assertEquals(0L, result);
values.clear();
values.put("a", 123456789123456789L);
values.put("b", 123456789123456789L);
values.put("c", 123456789123456789L);
values.put("d", 123456789123456789L);
result = evaluator.evaluate(new Tuple(values));
Assert.assertTrue(result instanceof Long);
Assert.assertEquals(0L, result);
}
}
|
[
"rodrigosoaresilva@gmail.com"
] |
rodrigosoaresilva@gmail.com
|
f768bdebb83236f85342840d158e6b12958c8640
|
3dd9ceaa250f649f2a44bb5581ec9b2c8bbeeedd
|
/SSMCyj/src/com/cyj/service/impl/ComponentServiceImpl.java
|
25a343287393fb2d6964dd2fd4fb5067527e1a60
|
[] |
no_license
|
chenxiban/CustomerCrmManagementSystem
|
aed9b2f3c8723c22ff3717668ef21cedcfb30278
|
04ca2a42fa1a2807945519d98c63eceffbfc5028
|
refs/heads/master
| 2020-06-21T06:55:30.200439
| 2019-07-17T11:23:08
| 2019-07-17T11:23:08
| 197,374,864
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 546
|
java
|
package com.cyj.service.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.cyj.dao.ComponentDao;
import com.cyj.entity.Component;
import com.cyj.service.ComponentService;
@Service
public class ComponentServiceImpl implements ComponentService {
@Autowired
private ComponentDao cDao;
public Component selComponent() {
return cDao.selComponent();
}
public boolean updCom(Component c) {
return cDao.updCom(c) > 0 ? true :false;
}
}
|
[
"chen867647213@163.com"
] |
chen867647213@163.com
|
4df7327902267a0fd9dd6425a98e22161f5188df
|
e038c9b9761e978e3935e268e7ddfa1b15533341
|
/GUI/day24_GUI/src/frame/ButtonDemo.java
|
feb6fcf223221ba45b2c2cc7fbfa8d21780084eb
|
[] |
no_license
|
Scyzin/11.6restart
|
600df7635ae599bfebe459bd110f7dc5ee72ec76
|
fcbaaf6b5bd460569e837410557d025ce1f30123
|
refs/heads/master
| 2021-08-29T01:26:35.555266
| 2017-12-13T08:52:19
| 2017-12-13T08:52:19
| 109,783,364
| 0
| 0
| null | null | null | null |
GB18030
|
Java
| false
| false
| 788
|
java
|
package frame;
import java.awt.Button;
import java.awt.FlowLayout;
import java.awt.Frame;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;
public class ButtonDemo {
public static void main(String[] args) {
Frame f = new Frame();
f.setBounds(400, 200, 400, 300);
f.setLayout(new FlowLayout());
Button bu = new Button("我是按钮");
f.add(bu);
f.addWindowListener(new WindowAdapter() {
@Override
public void windowClosing(WindowEvent e) {
System.exit(0);
}
});
bu.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
System.out.println("再点一下");
}
});
f.setVisible(true);
}
}
|
[
"32444500+Scyzin@users.noreply.github.com"
] |
32444500+Scyzin@users.noreply.github.com
|
c73f4a72b84a5de6f20f7c9ff7a0067d4e7a45c5
|
b0bb191aa72f9caac658abc6b91cf5e1e5179507
|
/app/src/main/java/itg8/com/nowzonedesigndemo/utility/model/breath/Breathingmaster.java
|
78a9df7969e5ec9444057ff53a22b3afbcb1ab6f
|
[] |
no_license
|
AndroidItg8/NowZoneDesignDemoForDataStudy
|
63a360f7abd3051dc962e2602517937fb39ada6d
|
bbf045d82b43824a02226aa515651c3335ad5a08
|
refs/heads/master
| 2020-05-05T03:21:30.788084
| 2019-06-15T13:35:04
| 2019-06-15T13:35:04
| 179,669,105
| 0
| 0
| null | 2019-06-15T13:35:05
| 2019-04-05T11:25:59
|
Java
|
UTF-8
|
Java
| false
| false
| 2,738
|
java
|
package itg8.com.nowzonedesigndemo.utility.model.breath;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.Parcelable.Creator;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Breathingmaster implements Parcelable
{
@SerializedName("time_of")
@Expose
private String timeOf;
@SerializedName("created")
@Expose
private String created;
@SerializedName("count")
@Expose
private int count;
@SerializedName("stateofmindmaster_id")
@Expose
private int stateofmindmasterId;
public final static Parcelable.Creator<Breathingmaster> CREATOR = new Creator<Breathingmaster>() {
@SuppressWarnings({
"unchecked"
})
public Breathingmaster createFromParcel(Parcel in) {
Breathingmaster instance = new Breathingmaster();
instance.timeOf = ((String) in.readValue((String.class.getClassLoader())));
instance.created = ((String) in.readValue((String.class.getClassLoader())));
instance.count = ((int) in.readValue((int.class.getClassLoader())));
instance.stateofmindmasterId = ((int) in.readValue((int.class.getClassLoader())));
return instance;
}
public Breathingmaster[] newArray(int size) {
return (new Breathingmaster[size]);
}
}
;
/**
*
* @return
* The timeOf
*/
public String getTimeOf() {
return timeOf;
}
/**
*
* @param timeOf
* The time_of
*/
public void setTimeOf(String timeOf) {
this.timeOf = timeOf;
}
/**
*
* @return
* The count
*/
public int getCount() {
return count;
}
/**
*
* @param count
* The count
*/
public void setCount(int count) {
this.count = count;
}
/**
*
* @return
* The stateofmindmasterId
*/
public int getStateofmindmasterId() {
return stateofmindmasterId;
}
/**
*
* @param stateofmindmasterId
* The stateofmindmaster_id
*/
public void setStateofmindmasterId(int stateofmindmasterId) {
this.stateofmindmasterId = stateofmindmasterId;
}
public String getCreated() {
return created;
}
public void setCreated(String created) {
this.created = created;
}
public void writeToParcel(Parcel dest, int flags) {
dest.writeValue(timeOf);
dest.writeValue(created);
dest.writeValue(count);
dest.writeValue(stateofmindmasterId);
}
public int describeContents() {
return 0;
}
}
|
[
"itechgalaxy.app@gmail.com"
] |
itechgalaxy.app@gmail.com
|
b2b1004a94894c5de35bfe1f14fe2473b7c7ab25
|
cee07e9b756aad102d8689b7f0db92d611ed5ab5
|
/src_6/org/benf/cfr/tests/ArrayTest3c.java
|
3cfa8459da10debb896ef2af25c804559142cd00
|
[
"MIT"
] |
permissive
|
leibnitz27/cfr_tests
|
b85ab71940ae13fbea6948a8cc168b71f811abfd
|
b3aa4312e3dc0716708673b90cc0a8399e5f83e2
|
refs/heads/master
| 2022-09-04T02:45:26.282511
| 2022-08-11T06:14:39
| 2022-08-11T06:14:39
| 184,790,061
| 11
| 5
|
MIT
| 2022-02-24T07:07:46
| 2019-05-03T16:49:01
|
Java
|
UTF-8
|
Java
| false
| false
| 644
|
java
|
package org.benf.cfr.tests;
/**
* Created by IntelliJ IDEA.
* User: lee
* Date: 05/05/2011
* Time: 06:28
* To change this template use File | Settings | File Templates.
*/
public class ArrayTest3c {
int x;
int y;
int z;
void test1(int a, int b) {
String[] tmp;
String[] arr$ = (tmp = new String[]{"a", "b", "c"});
int len$ = arr$.length;
int i$ = 0;
do {
if (i$ >= len$) return;
String s = arr$[i$];
System.out.println(s);
if (s == null) break;
++i$;
} while (true);
System.out.println("fred");
}
}
|
[
"lee@benf.org"
] |
lee@benf.org
|
0c029a36c15b0b90ea9b94ebdd1e85f3ecd503b5
|
52c36ce3a9d25073bdbe002757f08a267abb91c6
|
/src/main/java/com/alipay/api/response/AlipayBossBaseProcessInstanceCreateResponse.java
|
bd5f623580007c2ea5db928298785e6c5a3abf22
|
[
"Apache-2.0"
] |
permissive
|
itc7/alipay-sdk-java-all
|
d2f2f2403f3c9c7122baa9e438ebd2932935afec
|
c220e02cbcdda5180b76d9da129147e5b38dcf17
|
refs/heads/master
| 2022-08-28T08:03:08.497774
| 2020-05-27T10:16:10
| 2020-05-27T10:16:10
| 267,271,062
| 0
| 0
|
Apache-2.0
| 2020-05-27T09:02:04
| 2020-05-27T09:02:04
| null |
UTF-8
|
Java
| false
| false
| 741
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.domain.BPOpenApiInstance;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.boss.base.process.instance.create response.
*
* @author auto create
* @since 1.0, 2019-09-18 12:01:06
*/
public class AlipayBossBaseProcessInstanceCreateResponse extends AlipayResponse {
private static final long serialVersionUID = 5692871849764611775L;
/**
* 创建的实例
*/
@ApiField("instance")
private BPOpenApiInstance instance;
public void setInstance(BPOpenApiInstance instance) {
this.instance = instance;
}
public BPOpenApiInstance getInstance( ) {
return this.instance;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
b484964a3cf3a4160ba4c3d10a26a894ac952761
|
67a1b5e8dc998ce3594c1c3bb2ec89c30850dee7
|
/GooglePlay6.0.5/app/src/main/java/com/google/android/finsky/activities/FamilyLibrarySettingsFragment.java
|
218fa317c613569a7efbb4977a7e55e293c3c619
|
[
"Apache-2.0"
] |
permissive
|
matrixxun/FMTech
|
4a47bd0bdd8294cc59151f1bffc6210567487bac
|
31898556baad01d66e8d87701f2e49b0de930f30
|
refs/heads/master
| 2020-12-29T01:31:53.155377
| 2016-01-07T04:39:43
| 2016-01-07T04:39:43
| 49,217,400
| 2
| 0
| null | 2016-01-07T16:51:44
| 2016-01-07T16:51:44
| null |
UTF-8
|
Java
| false
| false
| 6,779
|
java
|
package com.google.android.finsky.activities;
import android.content.Context;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.CheckBox;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
import android.widget.Toast;
import com.android.volley.Response.ErrorListener;
import com.android.volley.Response.Listener;
import com.android.volley.VolleyError;
import com.google.android.finsky.FinskyApp;
import com.google.android.finsky.analytics.FinskyEventLog;
import com.google.android.finsky.analytics.PlayStore.PlayStoreUiElement;
import com.google.android.finsky.api.DfeApi;
import com.google.android.finsky.fragments.PageFragment;
import com.google.android.finsky.fragments.PageFragmentHost;
import com.google.android.finsky.layout.LayoutSwitcher;
import com.google.android.finsky.layout.actionbar.ActionBarController;
import com.google.android.finsky.protos.SharingSetting.FamilySharingSetting;
import com.google.android.finsky.protos.SharingSetting.GetFamilySharingSettingsResponse;
import com.google.android.finsky.protos.SharingSetting.UpdateFamilySharingSettingsResponse;
import com.google.android.finsky.utils.CorpusResourceUtils;
import com.google.android.finsky.utils.ErrorStrings;
public final class FamilyLibrarySettingsFragment
extends PageFragment
implements Response.Listener<SharingSetting.GetFamilySharingSettingsResponse>
{
private LinearLayout mSettingsHolder;
private SharingSetting.FamilySharingSetting[] mSharingSettings;
protected final int getLayoutRes()
{
return 2130968738;
}
public final PlayStore.PlayStoreUiElement getPlayStoreUiElement()
{
return FinskyEventLog.obtainPlayStoreUiElement(5220);
}
public final void onActivityCreated(Bundle paramBundle)
{
super.onActivityCreated(paramBundle);
rebindActionBar();
if (this.mSharingSettings != null) {}
for (int i = 1; i == 0; i = 0)
{
this.mLayoutSwitcher.switchToLoadingMode();
requestData();
return;
}
rebindViews();
}
public final void onCreate(Bundle paramBundle)
{
super.onCreate(paramBundle);
setRetainInstance$1385ff();
if (paramBundle == null) {
FinskyApp.get().getEventLogger().logPathImpression(0L, this);
}
}
public final View onCreateView(LayoutInflater paramLayoutInflater, ViewGroup paramViewGroup, Bundle paramBundle)
{
View localView = super.onCreateView(paramLayoutInflater, paramViewGroup, paramBundle);
this.mSettingsHolder = ((LinearLayout)localView.findViewById(2131755502));
return localView;
}
public final void onDestroyView()
{
super.onDestroyView();
this.mSettingsHolder = null;
}
public final void onPause()
{
int i = 0;
int j = 0;
while (i < this.mSettingsHolder.getChildCount())
{
FamilyLibrarySettingsRowView localFamilyLibrarySettingsRowView = (FamilyLibrarySettingsRowView)this.mSettingsHolder.getChildAt(i);
SharingSetting.FamilySharingSetting localFamilySharingSetting = this.mSharingSettings[i];
boolean bool = localFamilySharingSetting.sharingEnabled;
localFamilySharingSetting.sharingEnabled = localFamilyLibrarySettingsRowView.mCheckBox.isChecked();
if (localFamilySharingSetting.sharingEnabled != bool) {
j = 1;
}
i++;
}
if (j != 0) {
this.mDfeApi.updateFamilySharingSettings(this.mSharingSettings, new Response.Listener()new Response.ErrorListener {}, new Response.ErrorListener()
{
public final void onErrorResponse(VolleyError paramAnonymousVolleyError)
{
Context localContext = FamilyLibrarySettingsFragment.this.mContext;
Object[] arrayOfObject = new Object[1];
arrayOfObject[0] = ErrorStrings.get(FamilyLibrarySettingsFragment.this.mContext, paramAnonymousVolleyError);
String str = localContext.getString(2131362995, arrayOfObject);
Toast.makeText(FamilyLibrarySettingsFragment.this.mContext, str, 1).show();
}
});
}
super.onPause();
}
public final void rebindActionBar()
{
this.mPageFragmentHost.updateActionBarTitle(getString(2131362997));
this.mPageFragmentHost.updateCurrentBackendId(0, false);
this.mPageFragmentHost.switchToRegularActionBar();
this.mPageFragmentHost.getActionBarController().disableActionBarOverlay();
}
protected final void rebindViews()
{
this.mSettingsHolder.removeAllViews();
LayoutInflater localLayoutInflater = getActivity().getLayoutInflater();
SharingSetting.FamilySharingSetting[] arrayOfFamilySharingSetting = this.mSharingSettings;
int i = arrayOfFamilySharingSetting.length;
int j = 0;
if (j < i)
{
SharingSetting.FamilySharingSetting localFamilySharingSetting = arrayOfFamilySharingSetting[j];
FamilyLibrarySettingsRowView localFamilyLibrarySettingsRowView = (FamilyLibrarySettingsRowView)localLayoutInflater.inflate(2130968739, this.mSettingsHolder, false);
this.mSettingsHolder.addView(localFamilyLibrarySettingsRowView);
TextView localTextView = localFamilyLibrarySettingsRowView.mName;
Resources localResources = localFamilyLibrarySettingsRowView.getResources();
int k = localFamilySharingSetting.backendId;
String str;
switch (k)
{
case 5:
default:
throw new IllegalArgumentException("Unsupported backendId (" + k + ")");
case 3:
str = localResources.getString(2131362063);
}
for (;;)
{
localTextView.setText(str);
localFamilyLibrarySettingsRowView.mImage.setImageResource(CorpusResourceUtils.getDrawerShopDrawable(localFamilySharingSetting.backendId));
localFamilyLibrarySettingsRowView.mCheckBox.setChecked(localFamilySharingSetting.sharingEnabled);
j++;
break;
str = localResources.getString(2131362065);
continue;
str = localResources.getString(2131362064);
continue;
str = localResources.getString(2131362067);
continue;
str = localResources.getString(2131362066);
}
}
}
protected final void requestData()
{
this.mDfeApi.getFamilySharingSettings(this, this);
}
}
/* Location: F:\apktool\apktool\Google_Play_Store6.0.5\classes-dex2jar.jar
* Qualified Name: com.google.android.finsky.activities.FamilyLibrarySettingsFragment
* JD-Core Version: 0.7.0.1
*/
|
[
"jiangchuna@126.com"
] |
jiangchuna@126.com
|
5d03473a128036e8f4bcdce0dc2c5115e63ec8a2
|
53fc78b80df4939d26b406901fcf159b8adb14ba
|
/src/main/java/com/spring/starter/model/BillPaymentReferance.java
|
47fecd1b2e1c37bcd38e59d727942fc66ca328bf
|
[] |
no_license
|
lakith/type4
|
ab47128d138fea10e60a8887cbda25dee65b5dcf
|
8fa57825b861cb0ef1102de966cb48a0a8d51d43
|
refs/heads/master
| 2020-04-04T18:59:22.498890
| 2018-11-09T09:15:01
| 2018-11-09T09:15:01
| 156,187,821
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,746
|
java
|
package com.spring.starter.model;
import javax.persistence.*;
@Entity
@Table(name = "bill_payment_referance")
public class BillPaymentReferance {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private int billPaymentReferanceId;
private String referanceType;
private String collectionAccountNo;
private String billerNickname;
private String billerSubCatogory;
private String location;
private String billerType;
private String collectionAccountType;
private String collectionAccountBankAndBranch;
private double minumumAmmountCanPay;
private double maximumAmmountCanPay;
private String billerContactEmail;
private String billerContactPhoneNumber;
private String inputField_1;
private String validationRule_1;
private String inputField_2;
private String validationRule_2;
private String inputField_3;
private String validationRule_3;
private String inputField_4;
private String validationRule_4;
private String inputField_5;
private String validationRule_5;
private String comment;
public BillPaymentReferance() {
}
public BillPaymentReferance(String referanceType, String collectionAccountNo, String billerNickname, String billerSubCatogory, String location, String billerType, String collectionAccountType, String collectionAccountBankAndBranch, double minumumAmmountCanPay, double maximumAmmountCanPay, String billerContactEmail, String billerContactPhoneNumber, String inputField_1, String validationRule_1, String inputField_2, String validationRule_2, String inputField_3, String validationRule_3, String inputField_4, String validationRule_4, String inputField_5, String validationRule_5, String comment) {
this.referanceType = referanceType;
this.collectionAccountNo = collectionAccountNo;
this.billerNickname = billerNickname;
this.billerSubCatogory = billerSubCatogory;
this.location = location;
this.billerType = billerType;
this.collectionAccountType = collectionAccountType;
this.collectionAccountBankAndBranch = collectionAccountBankAndBranch;
this.minumumAmmountCanPay = minumumAmmountCanPay;
this.maximumAmmountCanPay = maximumAmmountCanPay;
this.billerContactEmail = billerContactEmail;
this.billerContactPhoneNumber = billerContactPhoneNumber;
this.inputField_1 = inputField_1;
this.validationRule_1 = validationRule_1;
this.inputField_2 = inputField_2;
this.validationRule_2 = validationRule_2;
this.inputField_3 = inputField_3;
this.validationRule_3 = validationRule_3;
this.inputField_4 = inputField_4;
this.validationRule_4 = validationRule_4;
this.inputField_5 = inputField_5;
this.validationRule_5 = validationRule_5;
this.comment = comment;
}
public int getBillPaymentReferanceId() {
return billPaymentReferanceId;
}
public void setBillPaymentReferanceId(int billPaymentReferanceId) {
this.billPaymentReferanceId = billPaymentReferanceId;
}
public String getReferanceType() {
return referanceType;
}
public void setReferanceType(String referanceType) {
this.referanceType = referanceType;
}
public String getCollectionAccountNo() {
return collectionAccountNo;
}
public void setCollectionAccountNo(String collectionAccountNo) {
this.collectionAccountNo = collectionAccountNo;
}
public String getBillerNickname() {
return billerNickname;
}
public void setBillerNickname(String billerNickname) {
this.billerNickname = billerNickname;
}
public String getBillerSubCatogory() {
return billerSubCatogory;
}
public void setBillerSubCatogory(String billerSubCatogory) {
this.billerSubCatogory = billerSubCatogory;
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location;
}
public String getBillerType() {
return billerType;
}
public void setBillerType(String billerType) {
this.billerType = billerType;
}
public String getCollectionAccountType() {
return collectionAccountType;
}
public void setCollectionAccountType(String collectionAccountType) {
this.collectionAccountType = collectionAccountType;
}
public String getCollectionAccountBankAndBranch() {
return collectionAccountBankAndBranch;
}
public void setCollectionAccountBankAndBranch(String collectionAccountBankAndBranch) {
this.collectionAccountBankAndBranch = collectionAccountBankAndBranch;
}
public double getMinumumAmmountCanPay() {
return minumumAmmountCanPay;
}
public void setMinumumAmmountCanPay(double minumumAmmountCanPay) {
this.minumumAmmountCanPay = minumumAmmountCanPay;
}
public double getMaximumAmmountCanPay() {
return maximumAmmountCanPay;
}
public void setMaximumAmmountCanPay(double maximumAmmountCanPay) {
this.maximumAmmountCanPay = maximumAmmountCanPay;
}
public String getBillerContactEmail() {
return billerContactEmail;
}
public void setBillerContactEmail(String billerContactEmail) {
this.billerContactEmail = billerContactEmail;
}
public String getBillerContactPhoneNumber() {
return billerContactPhoneNumber;
}
public void setBillerContactPhoneNumber(String billerContactPhoneNumber) {
this.billerContactPhoneNumber = billerContactPhoneNumber;
}
public String getInputField_1() {
return inputField_1;
}
public void setInputField_1(String inputField_1) {
this.inputField_1 = inputField_1;
}
public String getValidationRule_1() {
return validationRule_1;
}
public void setValidationRule_1(String validationRule_1) {
this.validationRule_1 = validationRule_1;
}
public String getInputField_2() {
return inputField_2;
}
public void setInputField_2(String inputField_2) {
this.inputField_2 = inputField_2;
}
public String getValidationRule_2() {
return validationRule_2;
}
public void setValidationRule_2(String validationRule_2) {
this.validationRule_2 = validationRule_2;
}
public String getInputField_3() {
return inputField_3;
}
public void setInputField_3(String inputField_3) {
this.inputField_3 = inputField_3;
}
public String getValidationRule_3() {
return validationRule_3;
}
public void setValidationRule_3(String validationRule_3) {
this.validationRule_3 = validationRule_3;
}
public String getInputField_4() {
return inputField_4;
}
public void setInputField_4(String inputField_4) {
this.inputField_4 = inputField_4;
}
public String getValidationRule_4() {
return validationRule_4;
}
public void setValidationRule_4(String validationRule_4) {
this.validationRule_4 = validationRule_4;
}
public String getInputField_5() {
return inputField_5;
}
public void setInputField_5(String inputField_5) {
this.inputField_5 = inputField_5;
}
public String getValidationRule_5() {
return validationRule_5;
}
public void setValidationRule_5(String validationRule_5) {
this.validationRule_5 = validationRule_5;
}
public String getComment() {
return comment;
}
public void setComment(String comment) {
this.comment = comment;
}
}
|
[
"lakith1995@gmail.com"
] |
lakith1995@gmail.com
|
d69f8a49455a0d3dff957b8974279339080adfdd
|
447520f40e82a060368a0802a391697bc00be96f
|
/apks/playstore_apps/com_spotify_music/source/atf.java
|
208a4e7d9add80cc9e094fbd6db5aa460ada413c
|
[
"Apache-2.0"
] |
permissive
|
iantal/AndroidPermissions
|
7f3343a9c29d82dbcd4ecd98b3a50ddf8d179465
|
d623b732734243590b5f004d167e542e2e2ae249
|
refs/heads/master
| 2023-07-19T01:29:26.689186
| 2019-09-30T19:01:42
| 2019-09-30T19:01:42
| 107,239,248
| 0
| 0
|
Apache-2.0
| 2023-07-16T07:41:38
| 2017-10-17T08:22:57
| null |
UTF-8
|
Java
| false
| false
| 429
|
java
|
import java.util.HashMap;
public final class atf
{
private static HashMap<String, ate> a = new HashMap();
public static ate a(String paramString)
{
try
{
ate localAte2 = (ate)a.get(paramString);
ate localAte1 = localAte2;
if (localAte2 == null)
{
localAte1 = new ate(paramString);
a.put(paramString, localAte1);
}
return localAte1;
}
finally {}
}
}
|
[
"antal.micky@yahoo.com"
] |
antal.micky@yahoo.com
|
f702fb39aee367915b39949719cc68fcb8eceb68
|
5ca3901b424539c2cf0d3dda52d8d7ba2ed91773
|
/src_fernflower/y/f/f/a/j.java
|
a08e79bb3aa27e1d6b46227d708367421b414087
|
[] |
no_license
|
fjh658/bindiff
|
c98c9c24b0d904be852182ecbf4f81926ce67fb4
|
2a31859b4638404cdc915d7ed6be19937d762743
|
refs/heads/master
| 2021-01-20T06:43:12.134977
| 2016-06-29T17:09:03
| 2016-06-29T17:09:16
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,568
|
java
|
package y.f.f.a;
import y.c.q;
import y.c.x;
import y.c.y;
import y.d.r;
import y.f.f.a.f;
import y.f.f.a.g;
class j implements y.f.f.a.a.h {
private final f a;
private j(f var1) {
this.a = var1;
}
public void a(y.f.f.a.a.e var1) {
boolean var20 = f.a;
if(!var1.e()) {
if(!var1.d()) {
y.f.f.a.a.b var2 = (y.f.f.a.a.b)var1;
q var3 = var2.b_();
y.c.f var4 = f.a(this.a).b(var3);
if(var4.size() != 0) {
new y.c.f();
y var10 = new y();
y.c.e var11 = var4.a();
var11.j();
y.c.f var13;
while(var11.f()) {
y.c.d var5;
y.c.d var6;
y.c.d var7;
y.c.d var8;
label51: {
var6 = var11.a();
var5 = f.a(this.a).c(var6);
var7 = f.a(this.a).i(var6);
if(var7.d() == var3) {
var8 = var7;
var7 = f.a(this.a).c(var7);
if(!var20) {
break label51;
}
}
var8 = f.a(this.a).c(var7);
}
q var12 = f.b(this.a).d();
f.a(this.a).e(var12);
f.b(this.a).a(var6, var12, var6.d());
f.b(this.a).a(var7, var12, var7.d());
f.b(this.a).a(var5, var5.c(), var12);
f.b(this.a).a(var8, var8.c(), var12);
var13 = f.a(this.a).a(var12);
var13.b(var6);
var13.b(var7);
var10.b(var12);
var11.h();
if(var20) {
break;
}
}
r var21 = null;
if(f.c(this.a) != null) {
var21 = r.a(f.c(this.a).b(var3));
}
var13 = new y.c.f();
q var14 = var10.c();
x var15 = var10.a();
f var10000;
while(true) {
if(var15.f()) {
q var16 = var15.e();
y.c.d var17 = f.b(this.a).a(var14, var16);
var10000 = this.a;
if(var20) {
break;
}
if(f.c(var10000) != null) {
f.d(this.a).a(var17, var21);
}
f.a(this.a).u(var17);
f.e(this.a).a(var17, var3);
y.c.d var18 = f.a(this.a).k(var17);
f.a(this.a).u(var18);
f.e(this.a).a(var18, var3);
f.a(this.a).c().m(var18);
var13.b(var17);
y.c.f var19 = f.a(this.a).a(var14);
f.a(this.a).a(var14, var19.c(), var17);
var19 = f.a(this.a).a(var16);
f.a(this.a).a(var16, var19.b(), var18);
var14 = var16;
var15.g();
if(!var20) {
continue;
}
}
f.a(this.a).c(var3, var13);
var10000 = this.a;
break;
}
f.b(var10000).c(var3);
}
}
}
}
j(f var1, g var2) {
this(var1);
}
}
|
[
"manouchehri@riseup.net"
] |
manouchehri@riseup.net
|
63d62fb3b0eb05c3e2dd2f50e46dc5376f3cd5d7
|
be73270af6be0a811bca4f1710dc6a038e4a8fd2
|
/crash-reproduction-moho/results/XWIKI-14263-38-8-PESA_II-WeightedSum:TestLen:CallDiversity/com/xpn/xwiki/internal/template/DefaultTemplateManager_ESTest_scaffolding.java
|
d9187039c3c70e907a526fb2c1bb5bb3fed7fb08
|
[] |
no_license
|
STAMP-project/Botsing-multi-objectivization-using-helper-objectives-application
|
cf118b23ecb87a8bf59643e42f7556b521d1f754
|
3bb39683f9c343b8ec94890a00b8f260d158dfe3
|
refs/heads/master
| 2022-07-29T14:44:00.774547
| 2020-08-10T15:14:49
| 2020-08-10T15:14:49
| 285,804,495
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 458
|
java
|
/**
* Scaffolding file used to store all the setups needed to run
* tests automatically generated by EvoSuite
* Sat Apr 04 02:34:37 UTC 2020
*/
package com.xpn.xwiki.internal.template;
import org.evosuite.runtime.annotation.EvoSuiteClassExclude;
import org.junit.BeforeClass;
import org.junit.Before;
import org.junit.After;
@EvoSuiteClassExclude
public class DefaultTemplateManager_ESTest_scaffolding {
// Empty scaffolding for empty test suite
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
407f221c97ab099662bd7ff59e8250c873d92268
|
0721305fd9b1c643a7687b6382dccc56a82a2dad
|
/src/app.zenly.locator_4.8.0_base_source_from_JADX/sources/app/zenly/locator/core/manager/C2697i.java
|
d0f19544729a9db6218556992fbcc1ffaed1548d
|
[] |
no_license
|
a2en/Zenly_re
|
09c635ad886c8285f70a8292ae4f74167a4ad620
|
f87af0c2dd0bc14fd772c69d5bc70cd8aa727516
|
refs/heads/master
| 2020-12-13T17:07:11.442473
| 2020-01-17T04:32:44
| 2020-01-17T04:32:44
| 234,470,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 476
|
java
|
package app.zenly.locator.core.manager;
import p389io.reactivex.functions.Predicate;
/* renamed from: app.zenly.locator.core.manager.i */
/* compiled from: lambda */
public final /* synthetic */ class C2697i implements Predicate {
/* renamed from: e */
public static final /* synthetic */ C2697i f7871e = new C2697i();
private /* synthetic */ C2697i() {
}
public final boolean test(Object obj) {
return ((Boolean) obj).booleanValue();
}
}
|
[
"developer@appzoc.com"
] |
developer@appzoc.com
|
7a1661f2930a28979b7aa87173e45b0d79d78d5a
|
022d4f81f6a8cf58d6d7cb14c876bc8bfe961cd8
|
/test/level28/lesson15/big01/model/Strategy.java
|
019e9c865f488b9f149d50f66c66c407cf6db024
|
[] |
no_license
|
SergiiShukaiev/JavaRush
|
85a69eab172653bd98a0c92149543c10eb60b7f8
|
28d0b787631e8f570a3f2023803044019f5149d8
|
refs/heads/master
| 2021-04-29T06:06:39.535115
| 2017-01-04T11:12:00
| 2017-01-04T11:12:00
| 77,604,670
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 308
|
java
|
package com.javarush.test.level28.lesson15.big01.model;
import com.javarush.test.level28.lesson15.big01.vo.Vacancy;
import java.util.ArrayList;
import java.util.List;
/**
* Created by Алина on 06.12.2016.
*/
public interface Strategy
{
public List<Vacancy> getVacancies(String searchString);
}
|
[
"Sergii"
] |
Sergii
|
07a2548f9a04c28b8bbf88bf54bc796075f804c2
|
36db8ea6d43f04fd15b3168bcbdf1c86147f0dc6
|
/JMXSample/src/main/java/descriptors/Version.java
|
f3220597ae02b1e6e26ba831aabc17464d66a232
|
[] |
no_license
|
sunning9001/AllInOneSample
|
79685de54a8af2f85b1bf6d5dea93d8e8d4602f7
|
e5809b840d125e801989d60aab770c43d0648cc8
|
refs/heads/master
| 2022-12-22T21:13:30.880178
| 2020-11-10T08:10:13
| 2020-11-10T08:10:13
| 96,510,636
| 0
| 0
| null | 2022-12-16T03:08:00
| 2017-07-07T07:14:52
|
Java
|
UTF-8
|
Java
| false
| false
| 675
|
java
|
/*
* Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*/
/**
* Version.java - This annotation allows to supply
* the current version of the MBean interface.
*/
package descriptors;
import java.lang.annotation.Documented;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
import javax.management.DescriptorKey;
@Documented
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface Version {
@DescriptorKey("version")
String value();
}
|
[
"sunning@auto-fis.com"
] |
sunning@auto-fis.com
|
0695ecab1e918be919c873f8ad09e1a4eb3548d1
|
ca0e9689023cc9998c7f24b9e0532261fd976e0e
|
/src/com/tencent/mm/d/a/lz$a.java
|
1fef435ce19a0765446f58333f6bb681a685cfdc
|
[] |
no_license
|
honeyflyfish/com.tencent.mm
|
c7e992f51070f6ac5e9c05e9a2babd7b712cf713
|
ce6e605ff98164359a7073ab9a62a3f3101b8c34
|
refs/heads/master
| 2020-03-28T15:42:52.284117
| 2016-07-19T16:33:30
| 2016-07-19T16:33:30
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 225
|
java
|
package com.tencent.mm.d.a;
public final class lz$a
{
public String id;
public int type = 0;
}
/* Location:
* Qualified Name: com.tencent.mm.d.a.lz.a
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
90e9056df7f935ebc7d4afb028d87916163382af
|
6b2e1f5fdd3668b32c471ff872f03f043b18d5f7
|
/mutants/dataset/lcs_length/721/LCS_LENGTH.java
|
f8032fff77fe59d24da33f8b505e6eee8607147f
|
[] |
no_license
|
mou23/Impact-of-Similarity-on-Repairing-Small-Programs
|
87e58676348f1b55666171128ecced3571979d44
|
6704d78b2bc9c103d97bcf55ecd5c12810ba2851
|
refs/heads/master
| 2023-03-25T10:42:17.464870
| 2021-03-20T04:55:17
| 2021-03-20T04:55:17
| 233,513,246
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,963
|
java
|
package buggy_java_programs;
import java.util.*;
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/**
*
* @author derricklin
*/
public class LCS_LENGTH {
public static Integer lcs_length(String s, String t) {
// make a Counter
// pair? no! just hashtable to a hashtable.. woo.. currying
Map<Integer, Map<Integer,Integer>> dp = new HashMap<Integer,Map<Collections,Integer>>();
// just set all the internal maps to 0
for (int i=0; i < s.length(); i++) {
Map<Integer,Integer> initialize = new HashMap<Integer,Integer>();
dp.put(i, initialize);
for (int j=0; j < t.length(); j++) {
Map<Integer,Integer> internal_map = dp.get(i);
internal_map.put(j,0);
dp.put(i, internal_map);
}
}
// now the actual code
for (int i=0; i < s.length(); i++) {
for (int j=0; j < t.length(); j++) {
if (s.charAt(i) == t.charAt(j)) {
if (dp.containsKey(i-1)) {
Map<Integer, Integer> internal_map = dp.get(i);
int insert_value = dp.get(i-1).get(j) + 1;
internal_map.put(j, insert_value);
dp.put(i,internal_map);
} else {
Map<Integer, Integer> internal_map = dp.get(i);
internal_map.put(j,1);
dp.put(i,internal_map);
}
}
}
}
if (!dp.isEmpty()) {
List<Integer> ret_list = new ArrayList<Integer>();
for (int i=0; i<s.length(); i++) {
ret_list.add(!dp.get(i).isEmpty() ? Collections.max(dp.get(i).values()) : 0);
}
return Collections.max(ret_list);
} else {
return 0;
}
}
}
|
[
"bsse0731@iit.du.ac.bd"
] |
bsse0731@iit.du.ac.bd
|
ded610ce9dc37e77cf6556e2c515ac879940c24b
|
1912d74f92f4973c705ff24e6510d902b586ee89
|
/springWS/MySpringWeb/src/com/cts/fsw/controller/DefaultController.java
|
25481eb2560aa054262240aaf0d302bdeb70a59f
|
[] |
no_license
|
avamsykiran/Java8AndSpring_Feb24Mar04_16301830
|
c46df4adbc3a9e019072610e2c063596b5de3997
|
a1dc5f1b3613718694f866f527f53a699344661b
|
refs/heads/master
| 2023-03-12T10:55:36.524222
| 2021-03-04T12:16:17
| 2021-03-04T12:16:17
| 341,864,699
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 720
|
java
|
package com.cts.fsw.controller;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
@Controller
public class DefaultController {
@RequestMapping({"","/","/home"})
public ModelAndView showHome() {
ModelAndView mv = new ModelAndView();
mv.setViewName("home"); // /pages/home.jsp
mv.addObject("pageTitle","Home Page - Welcoem All");
mv.addObject("developers",new String[] {"Vamsy","Venkat","Srini"});
return mv;
}
@RequestMapping("/header")
public String showHeader() {
return "header";
}
@RequestMapping("/footer")
public String showFooter() {
return "footer";
}
}
|
[
"a.vamc.it@gmail.com"
] |
a.vamc.it@gmail.com
|
652d27e1a488a93185c5649ea3c511d60e2fdb74
|
a8647e8761906c0e5518bbd781b2dcb2a93eb892
|
/app/src/main/java/com/sq/bxstore/net/request/WalletHistoryReq.java
|
dc6a847c21508d3514e0c22d35056c79bde2eadb
|
[] |
no_license
|
shoxgov/BXShop
|
31945dfeca95b92ca04bfa749bd123fa988e7815
|
992281c20372f86a0fce56d4a823f799f5239a0c
|
refs/heads/master
| 2021-01-22T10:32:08.357976
| 2017-03-07T08:53:13
| 2017-03-07T08:53:13
| 82,008,893
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,584
|
java
|
package com.sq.bxstore.net.request;
import org.json.JSONObject;
import com.sq.bxstore.bean.NetWorkConfig;
import com.sq.bxstore.net.BaseCommReq;
import com.sq.bxstore.net.BaseResponse;
import com.sq.bxstore.net.response.WalletHistoryResponse;
import com.sq.bxstore.utils.encryption.DataSecret;
/**
* JSONObject rsJson = new JSONObject(); rsJson.put("username", "yanlifeng");
* rsJson.put("password", "123456"); rsJson.put("services", "user_purse");
*/
public class WalletHistoryReq extends BaseCommReq {
private WalletHistoryResponse response;
private String username;
private String password;
private String services = "user_purse";
private JSONObject params = new JSONObject();
@Override
public String generUrl() {
setTag("WalletHistoryReq");
return NetWorkConfig.HTTPS;
}
@Override
public Class getResClass() {
return WalletHistoryResponse.class;
}
@Override
protected void handPostParam() {
try {
params.put("password", getPassword());
params.put("services", services);
params.put("username", getUsername());
} catch (Exception e) {
e.printStackTrace();
}
postParams.put("params", DataSecret.encryptDES(params.toString()));
}
@Override
public BaseResponse getResBean() {
if (response == null) {
response = new WalletHistoryResponse();
}
return response;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
}
|
[
"shoxgov@126.com"
] |
shoxgov@126.com
|
a47fcd9226d7e7277df26a4b0c47896cfef49d9f
|
b71fb87c969193aae02d5f631c7c9a9546ea5f98
|
/nifty-renderer-slick/src/main/java/de/lessvoid/nifty/slick2d/sound/sound/loader/SlickSoundLoader.java
|
2fef25d8d43832e9ccc50a4ccba780fc59af22b3
|
[] |
no_license
|
sgothel/nifty-gui
|
a7cc02d8bcb0a44265fabb1228b0d9e5c2cf74ed
|
763b7c76a07e3e564338c2bc164887a3f6fc6570
|
refs/heads/master
| 2021-01-15T21:50:08.234562
| 2012-01-14T22:42:29
| 2012-01-14T22:42:29
| 3,457,083
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 893
|
java
|
package de.lessvoid.nifty.slick2d.sound.sound.loader;
import de.lessvoid.nifty.slick2d.loaders.SlickLoader;
import de.lessvoid.nifty.slick2d.sound.sound.SlickLoadSoundException;
import de.lessvoid.nifty.slick2d.sound.sound.SlickSoundHandle;
import de.lessvoid.nifty.sound.SoundSystem;
/**
* The interface for all loaders that take care for loading sounds.
*
* @author Martin Karing <nitram@illarion.org>
*/
public interface SlickSoundLoader extends SlickLoader {
/**
* Load a new sound.
*
* @param soundSystem
* the sound system that manages the sound
* @param filename
* the name of the file storing the sound data
* @return the loaded sound
* @throws SlickLoadSoundException
* in case loading the sound fails
*/
SlickSoundHandle loadSound(SoundSystem soundSystem, String filename) throws SlickLoadSoundException;
}
|
[
"nitram@illarion.org"
] |
nitram@illarion.org
|
88bb2784e3be949f63759477fe57596987b3aa16
|
0d4f05c9909695a166e97b8958680945ea5c1266
|
/src/minecraft/com/mojang/realmsclient/dto/BackupList.java
|
1daa2dd0197091b44ce9a5d932d1aa0388d779dc
|
[] |
no_license
|
MertDundar1/ETB-0.6
|
31f3f42f51064ffd7facaa95cf9b50d0c2d71995
|
145d008fed353545157cd0e73daae8bc8d7f50b9
|
refs/heads/master
| 2022-01-15T08:42:12.762634
| 2019-05-15T23:37:33
| 2019-05-15T23:37:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,061
|
java
|
package com.mojang.realmsclient.dto;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParser;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;
public class BackupList
{
private static final Logger LOGGER = ;
public List<Backup> backups;
public BackupList() {}
public static BackupList parse(String json) { JsonParser jsonParser = new JsonParser();
BackupList backupList = new BackupList();
backups = new ArrayList();
try {
JsonElement node = jsonParser.parse(json).getAsJsonObject().get("backups");
if (node.isJsonArray()) {
Iterator<JsonElement> iterator = node.getAsJsonArray().iterator();
while (iterator.hasNext()) {
backups.add(Backup.parse((JsonElement)iterator.next()));
}
}
} catch (Exception e) {
LOGGER.error("Could not parse BackupList: " + e.getMessage());
}
return backupList;
}
}
|
[
"realhcfus@gmail.com"
] |
realhcfus@gmail.com
|
927db951f71a61a09c1961a3b053c6c0f772c4ac
|
f7dbd1eea9da852721389f1cd51d88985d3660ed
|
/WithProject_0.0.3/src/main/java/com/with/project/vo/RoomVO.java
|
00cc73d01223bc297f11a228d83fcc91edb11502
|
[] |
no_license
|
dahoonss/Project
|
b0994da4c4a887997a64b262e3057b5336f705d2
|
c498d8bef57c969e9a0fa5e482d5238908736690
|
refs/heads/master
| 2020-03-28T03:19:10.297131
| 2018-10-22T07:15:41
| 2018-10-22T07:15:41
| 147,637,203
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,281
|
java
|
package com.with.project.vo;
public class RoomVO {
private int roomId;
private String rStart;
private String rEnd;
private String preTime;
private String preDistance;
private String preMoney;
private String opGender;
private String rId1;
private String rId2;
private String rId3;
private String rId4;
private String dayDay;
private String times;
private String maximum;
private String driverId;
public String getDriverId() {
return driverId;
}
public void setDriverId(String driverId) {
this.driverId = driverId;
}
public int getRoomId() {
return roomId;
}
public void setRoomId(int roomId) {
this.roomId = roomId;
}
public String getrStart() {
return rStart;
}
public void setrStart(String rStart) {
this.rStart = rStart;
}
public String getrEnd() {
return rEnd;
}
public void setrEnd(String rEnd) {
this.rEnd = rEnd;
}
public String getPreTime() {
return preTime;
}
public void setPreTime(String preTime) {
this.preTime = preTime;
}
public String getPreDistance() {
return preDistance;
}
public void setPreDistance(String preDistance) {
this.preDistance = preDistance;
}
public String getPreMoney() {
return preMoney;
}
public void setPreMoney(String preMoney) {
this.preMoney = preMoney;
}
public String getOpGender() {
return opGender;
}
public void setOpGender(String opGender) {
this.opGender = opGender;
}
public String getrId1() {
return rId1;
}
public void setrId1(String rId1) {
this.rId1 = rId1;
}
public String getrId2() {
return rId2;
}
public void setrId2(String rId2) {
this.rId2 = rId2;
}
public String getrId3() {
return rId3;
}
public void setrId3(String rId3) {
this.rId3 = rId3;
}
public String getrId4() {
return rId4;
}
public void setrId4(String rId4) {
this.rId4 = rId4;
}
public String getDayDay() {
return dayDay;
}
public void setDayDay(String dayDay) {
this.dayDay = dayDay;
}
public String getTimes() {
return times;
}
public void setTimes(String times) {
this.times = times;
}
public String getMaximum() {
return maximum;
}
public void setMaximum(String maximum) {
this.maximum = maximum;
}
}
|
[
"user@user-PC"
] |
user@user-PC
|
6a625343217a7b66146a04b3237b130c0b21d27c
|
7344866370bd60505061fcc7e8c487339a508bb9
|
/OpenConcerto/src/org/openconcerto/erp/generationDoc/compta/ReportingAnalytiqueKDXmlSheet.java
|
3221146601b8280979ad1cfc1c1e27762e211a5d
|
[] |
no_license
|
sanogotech/openconcerto_ERP_JAVA
|
ed3276858f945528e96a5ccfdf01a55b58f92c8d
|
4d224695be0a7a4527851a06d8b8feddfbdd3d0e
|
refs/heads/master
| 2023-04-11T09:51:29.952287
| 2021-04-21T14:39:18
| 2021-04-21T14:39:18
| 360,197,474
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,195
|
java
|
/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright 2011 OpenConcerto, by ILM Informatique. All rights reserved.
*
* The contents of this file are subject to the terms of the GNU General Public License Version 3
* only ("GPL"). You may not use this file except in compliance with the License. You can obtain a
* copy of the License at http://www.gnu.org/licenses/gpl-3.0.html See the License for the specific
* language governing permissions and limitations under the License.
*
* When distributing the software, include this License Header Notice in each file.
*/
package org.openconcerto.erp.generationDoc.compta;
import org.openconcerto.erp.generationDoc.AbstractListeSheetXml;
import org.openconcerto.erp.preferences.PrinterNXProps;
import org.openconcerto.sql.Configuration;
import org.openconcerto.sql.model.SQLRowAccessor;
import org.openconcerto.sql.model.SQLRowValues;
import org.openconcerto.sql.model.SQLRowValuesListFetcher;
import org.openconcerto.sql.model.SQLSelect;
import org.openconcerto.sql.model.SQLTable;
import org.openconcerto.sql.model.Where;
import org.openconcerto.utils.cc.ITransformer;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
public class ReportingAnalytiqueKDXmlSheet extends AbstractListeSheetXml {
public static final String TEMPLATE_ID = "KDAnalytique";
public static final String TEMPLATE_PROPERTY_NAME = DEFAULT_PROPERTY_NAME;
private Calendar c = Calendar.getInstance();
private Date date = new Date();
private final long MILLIS_IN_HOUR = 3600000;
public ReportingAnalytiqueKDXmlSheet(int mois, int year) {
super();
this.printer = PrinterNXProps.getInstance().getStringProperty("BonPrinter");
this.mapAllSheetValues = new HashMap<Integer, Map<String, Object>>();
this.c.set(Calendar.DAY_OF_MONTH, 1);
this.c.set(Calendar.YEAR, year);
this.c.set(Calendar.MONTH, mois);
this.c.set(Calendar.HOUR_OF_DAY, 0);
this.c.set(Calendar.MINUTE, 0);
this.c.set(Calendar.SECOND, 0);
this.c.set(Calendar.MILLISECOND, 1);
}
@Override
protected String getStoragePathP() {
return "Analytique";
}
@Override
public String getName() {
if (this.date == null) {
this.date = new Date();
}
return "KDAnalytique" + this.date;
}
@Override
public String getDefaultTemplateId() {
return TEMPLATE_ID;
}
protected void createListeValues() {
this.listAllSheetValues = new HashMap<Integer, List<Map<String, Object>>>();
this.styleAllSheetValues = new HashMap<Integer, Map<Integer, String>>();
SQLTable tableAssoc = Configuration.getInstance().getDirectory().getElement("ASSOCIATION_ANALYTIQUE").getTable();
SQLRowValues rowVals = new SQLRowValues(tableAssoc);
rowVals.putNulls("MONTANT", "POURCENT");
rowVals.putRowValues("ID_ECRITURE").putNulls("DEBIT", "CREDIT", "DATE", "COMPTE_NUMERO");
rowVals.putRowValues("ID_POSTE_ANALYTIQUE").putNulls("NOM").putRowValues("ID_AXE_ANALYTIQUE").putNulls("NOM");
SQLRowValuesListFetcher fetcher = SQLRowValuesListFetcher.create(rowVals);
fetcher.setSelTransf(new ITransformer<SQLSelect, SQLSelect>() {
@Override
public SQLSelect transformChecked(SQLSelect input) {
Calendar c = Calendar.getInstance();
c.set(Calendar.DAY_OF_MONTH, 1);
c.set(Calendar.MONTH, Calendar.JANUARY);
c.set(Calendar.HOUR, 0);
c.set(Calendar.MINUTE, 0);
input.setWhere(new Where(input.getTable("ECRITURE").getField("DATE"), ">=", c.getTime()));
return input;
}
});
List<SQLRowValues> result = fetcher.fetch();
List<Map<String, Object>> listValues = new ArrayList<Map<String, Object>>();
// Map<Integer, String> styleValues = new HashMap<Integer, String>();
for (SQLRowValues sqlRowValues : result) {
Map<String, Object> mapSheetValue = new HashMap<String, Object>();
final SQLRowAccessor foreignEcr = sqlRowValues.getForeign("ID_ECRITURE");
mapSheetValue.put("DATE", foreignEcr.getDate("DATE").getTime());
mapSheetValue.put("DEBIT", foreignEcr.getLong("DEBIT"));
mapSheetValue.put("CREDIT", foreignEcr.getLong("CREDIT"));
mapSheetValue.put("COMPTE", foreignEcr.getString("COMPTE_NUMERO"));
mapSheetValue.put("POURCENT", sqlRowValues.getObject("POURCENT"));
mapSheetValue.put("MONTANT", sqlRowValues.getObject("MONTANT"));
final SQLRowAccessor foreignPoste = sqlRowValues.getForeign("ID_POSTE_ANALYTIQUE");
mapSheetValue.put("POSTE", foreignPoste.getString("NOM"));
mapSheetValue.put("AXE", foreignPoste.getForeign("ID_AXE_ANALYTIQUE").getString("NOM"));
listValues.add(mapSheetValue);
}
// this.sheetNames.add(userName);
this.listAllSheetValues.put(0, listValues);
}
}
|
[
"davask.42@gmail.com"
] |
davask.42@gmail.com
|
43ae8de03067cec2784481bfde54f36e0ad65491
|
72a89c88fffad8e758451f1245e9688906274404
|
/proj/corejava/src/main/java/interview/FibonacciTest.java
|
19283f9d9598289e62675ccb4e830fbc627c5594
|
[] |
no_license
|
RavikrianGoru/dev-repo
|
15c8f46d9154d3b7be413643751ce122586e50cf
|
897a379235a93875e512eacd37139f62454de5ff
|
refs/heads/master
| 2021-06-07T19:24:09.772506
| 2021-04-02T18:12:20
| 2021-04-02T18:12:20
| 102,496,972
| 0
| 3
| null | 2021-01-20T23:53:38
| 2017-09-05T15:14:29
|
Java
|
UTF-8
|
Java
| false
| false
| 1,146
|
java
|
package interview;
import java.util.Scanner;
public class FibonacciTest {
static int n1=0, n2=1,n3=0;
public static void getFibonacciWithRecursion(int count)
{
n3=n1+n2;
n2=n3;
n1=n2;
System.out.print(" "+n3);
if(count>1)
getFibonacciWithRecursion(count-1);
}
public static void getFibonacciWithOutRecursion(int count)
{
int n1=0, n2=1,n3;
System.out.print(n1+" "+n2);
count-=2;
while(count>0)
{
n3=n1+n2;
System.out.print(" "+n3);
n2=n3;
n1=n2;
count--;
}
}
public static void main(String[] args)
{
Scanner sc=new Scanner(System.in);
int count=0;
try
{
System.out.println("Enter number(number of fibonacci elements):");
count=sc.nextInt();
if(count<2)
throw new Exception("Invalid input");
}
catch(Exception e)
{
System.err.print("Invalid Input");
System.exit(0);
}
// System.out.println("\nFibonaaci with out recursion:");
// FibonacciTest.getFibonacciWithOutRecursion(count);
System.out.println("\nFibonaaci with recursion:");
System.out.print(n1+" "+n2);
FibonacciTest.getFibonacciWithRecursion(count-2);
}
}
|
[
"ravikirangoru@gmail.com"
] |
ravikirangoru@gmail.com
|
fee02a3c637838ffe18a4d9a5928683b62dbd781
|
c04e06c47f73326a6bcb15d9203a36b389cf05ee
|
/src/main/java/cn/com/zhihetech/online/controller/RedEnvelopController.java
|
97065d1ff92c93513817d724d46453a32b3f417d
|
[] |
no_license
|
qq524007127/online
|
6994886381c88a29d8d8c78155c11935061bc20d
|
a3b979295e5524b0c4c6536e238b4b32d9cfea88
|
refs/heads/master
| 2021-01-10T04:48:05.451826
| 2016-01-14T02:04:44
| 2016-01-14T02:04:57
| 49,615,412
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,093
|
java
|
package cn.com.zhihetech.online.controller;
import cn.com.zhihetech.online.bean.Merchant;
import cn.com.zhihetech.online.bean.RedEnvelop;
import cn.com.zhihetech.online.commons.ResponseMessage;
import cn.com.zhihetech.online.exception.SystemException;
import cn.com.zhihetech.online.service.IAdminService;
import cn.com.zhihetech.online.service.IRedEnvelopService;
import cn.com.zhihetech.util.common.StringUtils;
import cn.com.zhihetech.util.hibernate.GeneralQueryParams;
import cn.com.zhihetech.util.hibernate.commons.PageData;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
/**
* Created by ShenYunjie on 2015/12/11.
*/
@Controller
public class RedEnvelopController extends SupportController {
@Resource(name = "redEnvelopService")
private IRedEnvelopService redEnvelopService;
@Resource(name = "adminService")
private IAdminService adminService;
@RequestMapping("admin/activity/{activitId}/redEnvelop")
public ModelAndView indexPage(HttpServletRequest request, @PathVariable String activitId) {
ModelAndView mv = new ModelAndView("admin/merchActivityRedEnvelop");
Merchant merchant = this.adminService.getMerchant(getCurrentAdmin(request));
mv.addObject("merchant", merchant);
mv.addObject("activityId", activitId);
return mv;
}
@ResponseBody
@RequestMapping(value = "admin/api/redEnvelop/add", method = RequestMethod.POST)
public ResponseMessage addRedEnvelop(RedEnvelop redEnvelop) {
this.redEnvelopService.add(redEnvelop);
return executeResult();
}
@ResponseBody
@RequestMapping(value = "admin/api/activity/{activityId}/redEnvelop/list")
public PageData<RedEnvelop> getActivityRedEnvelopByAdmin(HttpServletRequest request, @PathVariable String activityId) {
if (StringUtils.isEmpty(activityId)) {
throw new SystemException("查询参数不足");
}
GeneralQueryParams queryParams = (GeneralQueryParams) new GeneralQueryParams()
.andEqual("activity.activitId", activityId);
return this.redEnvelopService.getPageDataByAdmin(createPager(request), queryParams, getCurrentAdmin(request));
}
@ResponseBody
@RequestMapping(value = "admin/api/redEnvelop/delete", method = RequestMethod.POST)
public ResponseMessage deleteRedEnvelop(RedEnvelop redEnvelop) {
this.redEnvelopService.delete(redEnvelop);
return executeResult();
}
@ResponseBody
@RequestMapping(value = "admin/api/redEnvelop/updateInfo", method = RequestMethod.POST)
public ResponseMessage updateBaseInfo(RedEnvelop redEnvelop) {
this.redEnvelopService.update(redEnvelop);
return executeResult();
}
}
|
[
"524007127"
] |
524007127
|
ab872c2b1638885d6873b5436a34454263a3240f
|
a73dfb319f28cc1ff8aac4bb8721157638253878
|
/work/09_ecai/lotteryServer/src/main/java/lottery/domains/content/biz/impl/UserBetsSameIpLogServiceImpl.java
|
19ac08488243d0e8a5e84c53598628dbc0147cbd
|
[] |
no_license
|
xxsheng/JavaTest
|
63da06d3db5384644ff290d10eed2d1027b613f5
|
cd3364302734501234c450e4a498eabce0b89efb
|
refs/heads/master
| 2021-10-19T06:21:02.472764
| 2019-02-18T15:17:19
| 2019-02-18T15:17:19
| 160,063,042
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,126
|
java
|
package lottery.domains.content.biz.impl;
import lottery.domains.content.biz.UserBetsSameIpLogService;
import lottery.domains.content.dao.UserBetsSameIpLogDao;
import lottery.domains.content.entity.UserBetsSameIpLog;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* Created by Nick on 2017-10-16.
*/
@Service
public class UserBetsSameIpLogServiceImpl implements UserBetsSameIpLogService{
@Autowired
private UserBetsSameIpLogDao uBetsSameIpLogDao;
@Override
@Transactional(readOnly = true)
public UserBetsSameIpLog getById(int id) {
return uBetsSameIpLogDao.getById(id);
}
@Override
@Transactional(readOnly = true)
public UserBetsSameIpLog getByIP(String ip) {
return uBetsSameIpLogDao.getByIP(ip);
}
@Override
public boolean add(UserBetsSameIpLog log) {
return uBetsSameIpLogDao.add(log);
}
@Override
public boolean update(UserBetsSameIpLog log) {
return uBetsSameIpLogDao.update(log);
}
}
|
[
"1558281773@qq.com"
] |
1558281773@qq.com
|
a33f2870552471e57b7598ba8e5d24ab7381f983
|
f2638cfa5bf899ae7bf537acece9d16d74712cc7
|
/ocp/chapter14/concurrentcollections/BoundedQueuesTest.java
|
f1c761b684403a60b821b6446b4de87c783c0992
|
[] |
no_license
|
kaminski-tomasz/ocjp
|
3789af42601bdd5bc4418eb1ff03f137325fa6fd
|
13361031602342421140d22ac4c3e38960e9e186
|
refs/heads/master
| 2021-09-09T09:11:58.992151
| 2018-03-14T16:34:35
| 2018-03-14T16:34:35
| 29,933,486
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,675
|
java
|
import java.util.*;
import java.util.concurrent.*;
public class BoundedQueuesTest {
BlockingQueue<Integer> bq = new ArrayBlockingQueue<>(3);
// BlockingQueue<Integer> bq = new SynchronousQueue<>();
public static void sleep(float s) throws InterruptedException {
Thread.sleep((long) (s * 1000.0));
}
public static void print(String s) {
System.out.println(s);
}
class Producer implements Runnable {
@Override
public void run() {
try {
print("Starting producer...");
sleep(1);
while (true) {
Integer nextInt = produce();
bq.put(nextInt);
print("Producer: " + nextInt + " put in queue");
}
} catch (InterruptedException ex) {
System.out.println("Producer interrupted");
}
}
private Integer produce() {
Integer nextInt = ThreadLocalRandom.current().nextInt(10, 100);
print("Producer: next integer = " + nextInt);
return nextInt;
}
}
class Consumer implements Runnable {
@Override
public void run() {
try {
print("Starting consumer...");
sleep(2);
while (true) {
for (int i = 0; i < 3; i++) {
Integer nextInt = bq.take();
consume(nextInt);
}
print("Consumer: processing data");
//sleep(1);
}
} catch (InterruptedException ex) {
System.out.println("Consumer interrupted");
}
}
private void consume(Integer nextInt) {
print("Consumer: consuming integer " + nextInt);
}
}
public void run() {
Thread producer = new Thread(new Producer());
Thread consumer = new Thread(new Consumer());
producer.start();
consumer.start();
}
public static void main(String[] args) {
new BoundedQueuesTest().run();
}
}
|
[
"kaminski.tomasz.a@gmail.com"
] |
kaminski.tomasz.a@gmail.com
|
4c66b053876256117b7a5eb63a691b7e32128954
|
ba8dbe2fc0ac1c7e1658020d306b55b056724cf6
|
/com.centurylink.mdw.designer.ui/src/com/centurylink/mdw/plugin/actions/ProjectAction.java
|
4ae3bb1827fa9d20f2f4e2fd25181aae9e7e4bd0
|
[
"Apache-2.0"
] |
permissive
|
magrawa/MDW
|
f04d90be6858a1503d33be6397cbd4dc3f30de75
|
1628973c9d19b00e2c4e5ef147278bb94caa812c
|
refs/heads/master
| 2021-01-23T04:19:25.642047
| 2017-03-24T18:05:10
| 2017-03-24T18:05:10
| 86,170,562
| 1
| 0
| null | 2017-03-25T16:13:48
| 2017-03-25T16:13:48
| null |
UTF-8
|
Java
| false
| false
| 4,190
|
java
|
/*
* Copyright (C) 2017 CenturyLink, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.centurylink.mdw.plugin.actions;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.PlatformUI;
import com.centurylink.mdw.plugin.MdwPlugin;
import com.centurylink.mdw.plugin.project.LocalCloudProjectWizard;
import com.centurylink.mdw.plugin.project.RemoteWorkflowProjectWizard;
import com.centurylink.mdw.plugin.workspace.WorkspaceConfig;
import com.centurylink.mdw.plugin.workspace.WorkspaceConfigWizard;
public class ProjectAction extends BasePulldownAction {
public static final String MENU_SEL_NEW_LOCAL_PROJECT = "New Local Project";
public static final String MENU_SEL_NEW_REMOTE_PROJECT = "New Remote Project";
public static final String MENU_SEL_NEW_CLOUD_PROJECT = "New Cloud Project";
public static final String MENU_SEL_CONFIGURE_WORKSPACE = "Configure Workspace";
/**
* populates the plugin action menu (the mdw icon) with its items
*/
public void populateMenu(Menu menu) {
// new local project
MenuItem item = new MenuItem(menu, SWT.NONE);
item.setText(MENU_SEL_NEW_CLOUD_PROJECT + "...");
item.setImage(MdwPlugin.getImageDescriptor("icons/cloud_project.gif").createImage());
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
newCloudProject();
}
});
// new remote project
item = new MenuItem(menu, SWT.NONE);
item.setText(MENU_SEL_NEW_REMOTE_PROJECT + "...");
item.setImage(MdwPlugin.getImageDescriptor("icons/remote_project.gif").createImage());
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
accessRemoteWorkflowProject();
}
});
// separator
item = new MenuItem(menu, SWT.SEPARATOR);
// configure workspace
item = new MenuItem(menu, SWT.NONE);
item.setText(MENU_SEL_CONFIGURE_WORKSPACE + "...");
item.setImage(MdwPlugin.getImageDescriptor("icons/config.gif").createImage());
item.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
configureWorkspace();
}
});
}
public void newCloudProject() {
LocalCloudProjectWizard cloudProjectWizard = new LocalCloudProjectWizard();
cloudProjectWizard.init(PlatformUI.getWorkbench(), null);
new WizardDialog(getActiveWindow().getShell(), cloudProjectWizard).open();
}
public void accessRemoteWorkflowProject() {
RemoteWorkflowProjectWizard remoteWorkflowProjectWizard = new RemoteWorkflowProjectWizard();
new WizardDialog(getActiveWindow().getShell(), remoteWorkflowProjectWizard).open();
}
public void configureWorkspace() {
Shell shell = getActiveWindow().getShell();
WorkspaceConfig model = new WorkspaceConfig(MdwPlugin.getSettings());
WorkspaceConfigWizard workspaceConfigWizard = new WorkspaceConfigWizard(model);
workspaceConfigWizard.setNeedsProgressMonitor(true);
WizardDialog dialog = new WizardDialog(shell, workspaceConfigWizard);
dialog.create();
dialog.open();
}
}
|
[
"donald.oakes@centurylink.com"
] |
donald.oakes@centurylink.com
|
6e99c395f4f9584830e0ff53fa946a112a35e73d
|
e8e48a96f2aba9040f4f55ab61efaab1a9eb6a23
|
/Topcoder/SRM-704-DIV-2/ConnectedComponentConstruction.java
|
3befc3715ba2e616067d8e1874f7ae553a5df194
|
[] |
no_license
|
arnabs542/algorithmic-problems
|
67342172c2035d9ffb2ee2bf0f1901e651dcce12
|
5d19d2e9cddc20e8a6949ac38fe6fb73dfc81bf4
|
refs/heads/master
| 2021-12-14T05:41:50.177195
| 2017-04-15T07:42:41
| 2017-04-15T07:42:41
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,812
|
java
|
/*
Problem Statement
Any undirected graph can be decomposed into connected components. Two vertices
u and v belong to the same connected component if we can travel from u to v by
following a sequence of zero or more consecutive edges. The size of a connected
component is the number of vertices it contains. You are given a int[] s.
Construct a simple undirected graph with the following properties:
The number of vertices is n, where n is the number of elements in s.
The vertices are numbered 0 through n-1.
For each i, the size of the connected component that contains vertex i is exactly s[i].
If there is no such graph, return an empty String[]. Otherwise, return a String[]
ret with n elements, each containing n characters. For each i and j, ret[i][j]
should be 'Y' if there is an edge between i and j in your graph. Otherwise,
ret[i][j] should be 'N'. If there are multiple solutions, you may return any of them.
Definition
Class:
ConnectedComponentConstruction
Method:
construct
Parameters:
int[]
Returns:
String[]
Method signature:
String[] construct(int[] s)
(be sure your method is public)
Limits
Time limit (s):
2.000
Memory limit (MB):
256
Stack limit (MB):
256
Constraints
-
s will contain between 1 and 50 elements, inclusive.
-
Each element in s will be between 1 and |s|, inclusive.
Examples
0)
{2,1,1,2,1}
Returns: {"NNNYN", "NNNNN", "NNNNN", "YNNNN", "NNNNN" }
The answer is a graph that contains only one edge. This edge connects the
vertices 0 and 3. This graph has four connected components: {0, 3}, {1}, {2}, and {4}.
1)
{1,1,1,1}
Returns: {"NNNN", "NNNN", "NNNN", "NNNN" }
Here the only correct answer is a graph with four vertices and no edges.
2)
{3,3,3}
Returns: {"NYY", "YNY", "YYN" }
This time one correct answer could be the complete graph on three vertices.
3)
{4,4,4,4,4}
Returns: { }
There is no solution.
4)
{1}
Returns: {"N" }
This problem statement is the exclusive and proprietary property of TopCoder, Inc.
Any unauthorized use or reproduction of this information without the prior
written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc.
All rights reserved.
*/
import java.util.*;
public class ConnectedComponentConstruction
{
public String[] construct(int[] s)
{
int n = s.length;
// number of components, List of indices
Map<Integer, List<Integer>> comp = new HashMap<>();
for(int i=0; i<n; ++i){
if(s[i] == 1)
continue;
int v = s[i];
if(!comp.containsKey(v))
comp.put(v, new ArrayList<>());
comp.get(v).add(i);
}
boolean isPossible = true;
for(Map.Entry<Integer, List<Integer>> entry : comp.entrySet()){
int k = entry.getKey();
int v = entry.getValue().size();
if(v % k != 0){
isPossible = false;
break;
}
}
if(!isPossible){
// empty String
return new String[0];
}
// feasible
// 0 - no edge
// 1 - edge
int[][] matrix = new int[n][n];
for(Map.Entry<Integer, List<Integer>> entry : comp.entrySet()){
int ncomp = entry.getKey();
List<Integer> t = entry.getValue();
int i = 0;
while(i < t.size()){
for(int j = i; j<i+ncomp-1; ++j){
int a = t.get(j);
int b = t.get(j+1);
matrix[a][b] = 1;
matrix[b][a] = 1;
}
i += ncomp;
}
}
String[] r = new String[n];
// for all rows
for(int i=0; i<n; ++i){
StringBuilder t = new StringBuilder();
for(int j=0; j<n; ++j){
t.append(matrix[i][j] == 0 ? 'N' : 'Y');
}
r[i] = t.toString();
}
return r;
}
<%:testing-code%>
}
//Powered by KawigiEdit 2.1.4 (beta) modified by pivanof!
|
[
"masruba@gmail.com"
] |
masruba@gmail.com
|
7f623c112f1aa0278b703b31ebc2f64d4a95308c
|
83d72c4f9932b4fe192a186d3dfef64ebc5435e2
|
/src/net/kang/reverse/Example03.java
|
773ff6456a15e68c6c75939c1b8630760431d919
|
[] |
no_license
|
tails5555/KOI_Algorithm
|
f6a3a8ab1a211c3deebdfb4d12f51b4410827232
|
adf995d3776ca25b59fdd74f1020afda5a8219f2
|
refs/heads/master
| 2020-03-11T23:33:00.491422
| 2018-04-28T06:22:15
| 2018-04-28T06:22:15
| 130,324,769
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 1,304
|
java
|
package net.kang.reverse;
// 알고리즘 수업 시간에 배웠던 조건을 전제하에 재귀 호출을 복습해본다면...
/*
* 1. 끝나는 조건을 세워두도록 한다.
* 2. 계산 작업을 들어가되 이전 작업을 처리한다.
* 3. 재귀호출에 대해서 작업을 해준다. 그니깐 현재의 변수에 대한 계산을 진행하자는 이야기.
*/
public class Example03 {
public static int solution(int n){
if(n<10) return n; // 1번 참고
int decimal=(int)Math.pow(10.0, (int)Math.log10(n));
return (n%10)*decimal+solution((n%decimal)/10)*10+n/decimal;
// (n%10)*decimal+n/decimal이 3번에 대한 이야기. solution((n%decimal)/10)*10 부분이 2번의 이야기.
}
// 이 재귀 문장을 이용해보면 맨 앞자리, 맨 뒷자리끼리 서로 바꿔가면서 int 형으로 반환을 하는 모습을 볼 수 있다. 시간 복잡도는 어자피 O(log n)인데 탐색 공간을 줄이면서 효율적인 알고리즘을 완성할 수 있다.
public static void main(String[] args){
System.out.println(solution(1234));
System.out.println(solution(54321));
System.out.println(solution(123456));
System.out.println(solution(1230));
System.out.println(solution(45600));
System.out.println(solution(40203000));
}
}
|
[
"tails5555@naver.com"
] |
tails5555@naver.com
|
37061de1ab48493388e86d44e3161cfabdb7beb8
|
54b9e132bbb6f8baf850846925fd7126c5022772
|
/5.implementation/NXP/redsun-service/src/main/java/com/redsun/service/entities/Risk.java
|
3ef533fe5b449ec4bfd781efcdce03ec6209c2a7
|
[] |
no_license
|
treviets/BIM
|
40a10afdf6ff57939ac1c2105e23c0330b0a8fdc
|
ab6c85dd90ec4d8b6b89f79b07325aa54bafa09f
|
refs/heads/master
| 2020-03-18T18:51:45.697405
| 2018-05-28T06:36:25
| 2018-05-28T06:36:25
| 135,119,151
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,916
|
java
|
package com.redsun.service.entities;
import java.math.BigDecimal;
import java.util.Date;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
@Component
@Scope("prototype")
public class Risk extends AbstractEntity {
/**
*
*/
private static final long serialVersionUID = 1L;
private int projectId;
private String projectName;
private String name;
private String description;
private int riskTypeId;
private String typeName;
private String cause;
private String impact;
private int severityId;
private String severityName;
private int likelihoodId;
private String likelihoodName;
private int criticalityId;
private String criticalityName;
private Date creationDate;
private String stringCreationDate;
private int statusId;
private String statusName;
private Date planningEndDate;
private String stringPlanningEndDate;
private Date actualEndDate;
private String stringActualEndDate;
private String result;
private Date doneDate;
private String stringDoneDate;
private Date handledDate;
private String stringHandledDate;
private int priorityId;
private String priorityName;
private BigDecimal impactCost;
private int totalCount;
private int clientId;
private Date updateDate;
private String stringUpdateDate;
private String updateBy;
public int getProjectId() {
return projectId;
}
public void setProjectId(int projectId) {
this.projectId = projectId;
}
public String getProjectName() {
return projectName;
}
public void setProjectName(String projectName) {
this.projectName = projectName;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public int getRiskTypeId() {
return riskTypeId;
}
public void setRiskTypeId(int riskTypeId) {
this.riskTypeId = riskTypeId;
}
public String getTypeName() {
return typeName;
}
public void setTypeName(String typeName) {
this.typeName = typeName;
}
public String getCause() {
return cause;
}
public void setCause(String cause) {
this.cause = cause;
}
public String getImpact() {
return impact;
}
public void setImpact(String impact) {
this.impact = impact;
}
public int getSeverityId() {
return severityId;
}
public void setSeverityId(int severityId) {
this.severityId = severityId;
}
public String getSeverityName() {
return severityName;
}
public void setSeverityName(String severityName) {
this.severityName = severityName;
}
public int getLikelihoodId() {
return likelihoodId;
}
public void setLikelihoodId(int likelihoodId) {
this.likelihoodId = likelihoodId;
}
public String getLikelihoodName() {
return likelihoodName;
}
public void setLikelihoodName(String likelihoodName) {
this.likelihoodName = likelihoodName;
}
public int getCriticalityId() {
return criticalityId;
}
public void setCriticalityId(int criticalityId) {
this.criticalityId = criticalityId;
}
public String getCriticalityName() {
return criticalityName;
}
public void setCriticalityName(String criticalityName) {
this.criticalityName = criticalityName;
}
public Date getCreationDate() {
return creationDate;
}
public void setCreationDate(Date creationDate) {
this.creationDate = creationDate;
}
public String getStringCreationDate() {
return stringCreationDate;
}
public void setStringCreationDate(String stringCreationDate) {
this.stringCreationDate = stringCreationDate;
}
public int getStatusId() {
return statusId;
}
public void setStatusId(int statusId) {
this.statusId = statusId;
}
public String getStatusName() {
return statusName;
}
public void setStatusName(String statusName) {
this.statusName = statusName;
}
public Date getPlanningEndDate() {
return planningEndDate;
}
public void setPlanningEndDate(Date planningEndDate) {
this.planningEndDate = planningEndDate;
}
public String getStringPlanningEndDate() {
return stringPlanningEndDate;
}
public void setStringPlanningEndDate(String stringPlanningEndDate) {
this.stringPlanningEndDate = stringPlanningEndDate;
}
public Date getActualEndDate() {
return actualEndDate;
}
public void setActualEndDate(Date actualEndDate) {
this.actualEndDate = actualEndDate;
}
public String getStringActualEndDate() {
return stringActualEndDate;
}
public void setStringActualEndDate(String stringActualEndDate) {
this.stringActualEndDate = stringActualEndDate;
}
public String getResult() {
return result;
}
public void setResult(String result) {
this.result = result;
}
public Date getDoneDate() {
return doneDate;
}
public void setDoneDate(Date doneDate) {
this.doneDate = doneDate;
}
public String getStringDoneDate() {
return stringDoneDate;
}
public void setStringDoneDate(String stringDoneDate) {
this.stringDoneDate = stringDoneDate;
}
public Date getHandledDate() {
return handledDate;
}
public void setHandledDate(Date handledDate) {
this.handledDate = handledDate;
}
public String getStringHandledDate() {
return stringHandledDate;
}
public void setStringHandledDate(String stringHandledDate) {
this.stringHandledDate = stringHandledDate;
}
public int getPriorityId() {
return priorityId;
}
public void setPriorityId(int priorityId) {
this.priorityId = priorityId;
}
public String getPriorityName() {
return priorityName;
}
public void setPriorityName(String priorityName) {
this.priorityName = priorityName;
}
public BigDecimal getImpactCost() {
return impactCost;
}
public void setImpactCost(BigDecimal impactCost) {
this.impactCost = impactCost;
}
public int getTotalCount() {
return totalCount;
}
public void setTotalCount(int totalCount) {
this.totalCount = totalCount;
}
public int getClientId() {
return clientId;
}
public void setClientId(int clientId) {
this.clientId = clientId;
}
public Date getUpdateDate() {
return updateDate;
}
public void setUpdateDate(Date updateDate) {
this.updateDate = updateDate;
}
public String getStringUpdateDate() {
return stringUpdateDate;
}
public void setStringUpdateDate(String stringUpdateDate) {
this.stringUpdateDate = stringUpdateDate;
}
public String getUpdateBy() {
return updateBy;
}
public void setUpdateBy(String updateBy) {
this.updateBy = updateBy;
}
public static long getSerialversionuid() {
return serialVersionUID;
}
}
|
[
"caohongvu@gmail.com"
] |
caohongvu@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.