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
4c621a63fe93ff41e46c52d5527a4ecebac47bcf
7d91c34d3f1e30a77afd3221d0ab595389fbe23e
/org/omg/PortableServer/RequestProcessingPolicyValue.java
3fd3170f85ef25702f87242b4f04b4ff30b37dc2
[]
no_license
JobTracker/java-source
a9a6b5c1030f8ee09831922fed8c8e808b75f2f5
15ffe2fc855c459f0397e7f633392177e91b4859
refs/heads/master
2016-09-05T08:59:02.510617
2014-08-25T05:51:05
2014-08-25T05:51:05
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,580
java
package org.omg.PortableServer; /** * org/omg/PortableServer/RequestProcessingPolicyValue.java . * Generated by the IDL-to-Java compiler (portable), version "3.2" * from ../../../../src/share/classes/org/omg/PortableServer/poa.idl * Thursday, May 14, 2009 3:38:54 AM PDT */ /** * The RequestProcessingPolicyValue can have the following * values. USE_ACTIVE_OBJECT_MAP_ONLY - If the Object Id * is not found in the Active Object Map, * an OBJECT_NOT_EXIST exception is returned to the * client. The RETAIN policy is also required. * USE_DEFAULT_SERVANT - If the Object Id is not found in * the Active Object Map or the NON_RETAIN policy is * present, and a default servant has been registered * with the POA using the set_servant operation, * the request is dispatched to the default servant. * USE_SERVANT_MANAGER - If the Object Id is not found * in the Active Object Map or the NON_RETAIN policy * is present, and a servant manager has been registered * with the POA using the set_servant_manager operation, * the servant manager is given the opportunity to * locate a servant or raise an exception. */ public class RequestProcessingPolicyValue implements org.omg.CORBA.portable.IDLEntity { private int __value; private static int __size = 3; private static org.omg.PortableServer.RequestProcessingPolicyValue[] __array = new org.omg.PortableServer.RequestProcessingPolicyValue [__size]; public static final int _USE_ACTIVE_OBJECT_MAP_ONLY = 0; public static final org.omg.PortableServer.RequestProcessingPolicyValue USE_ACTIVE_OBJECT_MAP_ONLY = new org.omg.PortableServer.RequestProcessingPolicyValue(_USE_ACTIVE_OBJECT_MAP_ONLY); public static final int _USE_DEFAULT_SERVANT = 1; public static final org.omg.PortableServer.RequestProcessingPolicyValue USE_DEFAULT_SERVANT = new org.omg.PortableServer.RequestProcessingPolicyValue(_USE_DEFAULT_SERVANT); public static final int _USE_SERVANT_MANAGER = 2; public static final org.omg.PortableServer.RequestProcessingPolicyValue USE_SERVANT_MANAGER = new org.omg.PortableServer.RequestProcessingPolicyValue(_USE_SERVANT_MANAGER); public int value () { return __value; } public static org.omg.PortableServer.RequestProcessingPolicyValue from_int (int value) { if (value >= 0 && value < __size) return __array[value]; else throw new org.omg.CORBA.BAD_PARAM (); } protected RequestProcessingPolicyValue (int value) { __value = value; __array[__value] = this; } } // class RequestProcessingPolicyValue
[ "1092862062@qq.com" ]
1092862062@qq.com
aff9631186828e6f82b7b16be3cbc00f2681cb13
b4e306eaa86db3aa11132433ee6ad7fa6464db7b
/project-test/src/main/java/bitcamp/java106/pms/controller/teammember/TeamMemberAddController.java
5b6e5bc9b393e2d8298a5e0df1d2e66beefbbbb9
[]
no_license
donhee/test
b00279dde77ff5e7482e7a018efe91ff54d4f677
897f301a557325932afc0e4cd19e33f103d74dae
refs/heads/master
2021-07-01T00:13:06.085468
2020-09-10T13:26:18
2020-09-10T13:26:18
154,077,010
0
0
null
null
null
null
UTF-8
Java
false
false
2,585
java
// Controller ๊ทœ์น™์— ๋”ฐ๋ผ ๋ฉ”์„œ๋“œ ์ž‘์„ฑ package bitcamp.java106.pms.controller.teammember; import java.io.PrintWriter; import bitcamp.java106.pms.annotation.Component; import bitcamp.java106.pms.controller.Controller; import bitcamp.java106.pms.dao.MemberDao; import bitcamp.java106.pms.dao.TeamDao; import bitcamp.java106.pms.dao.TeamMemberDao; import bitcamp.java106.pms.domain.Member; import bitcamp.java106.pms.domain.Team; import bitcamp.java106.pms.server.ServerRequest; import bitcamp.java106.pms.server.ServerResponse; @Component("/team/member/add") public class TeamMemberAddController implements Controller { TeamDao teamDao; MemberDao memberDao; TeamMemberDao teamMemberDao; public TeamMemberAddController(TeamDao teamDao, MemberDao memberDao, TeamMemberDao teamMemberDao) { this.teamDao = teamDao; this.memberDao = memberDao; this.teamMemberDao = teamMemberDao; } @Override public void service(ServerRequest request, ServerResponse response) { PrintWriter out = response.getWriter(); String teamName = request.getParameter("teamName"); Team team = teamDao.get(teamName); if (team == null) { out.printf("%s ํŒ€์€ ์กด์žฌํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค.\n", teamName); return; } String memberId = request.getParameter("memberId"); Member member = memberDao.get(memberId); if (member == null) { out.printf("%s ํšŒ์›์€ ์—†์Šต๋‹ˆ๋‹ค.\n", memberId); return; } if (teamMemberDao.isExist(teamName, memberId)) { out.println("์ด๋ฏธ ๋“ฑ๋ก๋œ ํšŒ์›์ž…๋‹ˆ๋‹ค."); return; } teamMemberDao.addMember(teamName, memberId); out.println("ํŒ€์— ํšŒ์›์„ ์ถ”๊ฐ€ํ•˜์˜€์Šต๋‹ˆ๋‹ค."); } } //ver 28 - ๋„คํŠธ์›Œํฌ ๋ฒ„์ „์œผ๋กœ ๋ณ€๊ฒฝ //ver 26 - TeamMemberController์—์„œ add() ๋ฉ”์„œ๋“œ๋ฅผ ์ถ”์ถœํ•˜์—ฌ ํด๋ž˜์Šค๋กœ ์ •์˜. //ver 23 - @Component ์• ๋…ธํ…Œ์ด์…˜์„ ๋ถ™์ธ๋‹ค. //ver 18 - ArrayList๊ฐ€ ์ ์šฉ๋œ TeamMemberDao๋ฅผ ์‚ฌ์šฉํ•œ๋‹ค. //ver 17 - TeamMemberDao ํด๋ž˜์Šค๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒ€ ๋ฉค๋ฒ„์˜ ์•„์ด๋””๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค. //ver 16 - ์ธ์Šคํ„ด์Šค ๋ณ€์ˆ˜๋ฅผ ์ง์ ‘ ์‚ฌ์šฉํ•˜๋Š” ๋Œ€์‹  ๊ฒŸํ„ฐ, ์…‹ํ„ฐ ์‚ฌ์šฉ. // ver 15 - ํŒ€ ๋ฉค๋ฒ„๋ฅผ ๋“ฑ๋ก, ์กฐํšŒ, ์‚ญ์ œํ•  ์ˆ˜ ์žˆ๋Š” ๊ธฐ๋Šฅ ์ถ”๊ฐ€. // ver 14 - TeamDao๋ฅผ ์‚ฌ์šฉํ•˜์—ฌ ํŒ€ ๋ฐ์ดํ„ฐ๋ฅผ ๊ด€๋ฆฌํ•œ๋‹ค. // ver 13 - ์‹œ์ž‘์ผ, ์ข…๋ฃŒ์ผ์„ ๋ฌธ์ž์—ด๋กœ ์ž…๋ ฅ ๋ฐ›์•„ Date ๊ฐ์ฒด๋กœ ๋ณ€ํ™˜ํ•˜์—ฌ ์ €์žฅ.
[ "231313do@gmail.com" ]
231313do@gmail.com
59a8a25c534e40b0cdf8f3e9c1b72330f2c31bc6
8e5104a35c0fcfb0e546fa6eebf092bc0d439858
/form/bmi/src/main/java/vn/techmaster/bmi/controller/BMIController3.java
5cbb5fc09a37d8cef5e6ecc167b5d19ac87c406e
[]
no_license
hoanghailethe/SpringBootBasic
9b20c73e9f7f0be6d688a3a130702419c0b7ba12
2922319c106ffb47ce31784ae222df9de5cf6e27
refs/heads/main
2023-05-02T01:48:08.725123
2021-05-20T06:08:26
2021-05-20T06:08:26
371,683,611
1
0
null
2021-05-28T11:49:08
2021-05-28T11:49:08
null
UTF-8
Java
false
false
1,411
java
package vn.techmaster.bmi.controller; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.validation.BindingResult; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestMapping; import vn.techmaster.bmi.request.BMIRequest; import vn.techmaster.bmi.response.BMIResult; import vn.techmaster.bmi.service.HealthService; @Controller @RequestMapping("/bmi3") public class BMIController3 { @Autowired private HealthService healthService; @GetMapping public String getBMIForm(Model model) { model.addAttribute("bmiRequest", new BMIRequest()); return "bmi2"; } @PostMapping() public String handleBMIForm(@ModelAttribute BMIRequest request, BindingResult bindingResult, Model model) { if (! bindingResult.hasErrors()) { /* Chuyแปƒn cแบฃ logic tรญnh BMI sang bean HealthService. Vแป›i cรกch nร y, chรบng ta cรณ thแปƒ phแปฅc vแปฅ cแบฃ Web Form vร  cแบฃ REST API */ BMIResult bmiResult = healthService.calculateBMI(request); model.addAttribute("bmiRequest", request); model.addAttribute("bmiResult", bmiResult); } return "bmi2"; } }
[ "cuong@techmaster.vn" ]
cuong@techmaster.vn
6c55df41258dee80fa3a04df81da526554724b79
66d9f0c75966ada87ede8d21cb1f1bad47b55c19
/src/main/java/org/datanucleus/ide/idea/integration/datanuculeus/EnhancerSupportDatanucleus.java
7029a32d63412bc2ecddeabc8a8270602b44fc92
[ "Apache-2.0" ]
permissive
rm3l/datanucleus-idea-plugin
c01e6930ba4a3cd07b45c18c5e149b91287c0277
58753e379b19371d894b328a0b30ea5927013b18
refs/heads/master
2021-01-17T22:11:13.278731
2016-04-11T18:17:59
2016-04-11T18:17:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,429
java
/******************************************************************************* * Copyright (c) 2010 Gerold Klinger and sourceheads Information Technology GmbH. * All rights reserved. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * * Contributors: * ... ******************************************************************************/ package org.datanucleus.ide.idea.integration.datanuculeus; import org.datanucleus.ide.idea.PersistenceApi; import org.datanucleus.ide.idea.integration.AbstractEnhancerSupport; import org.datanucleus.ide.idea.integration.EnhancerSupportVersion; import org.jetbrains.annotations.NotNull; /** */ public class EnhancerSupportDatanucleus extends AbstractEnhancerSupport { private static final String ID = "DATANUCLEUS"; private static final String NAME = "DataNucleus"; @Override @NotNull public EnhancerSupportVersion getVersion() { return EnhancerSupportVersion.V1_1_X; } /** * The name to display in the configuration dialog enhancer support drop-down. * * @return Enhancer support name */ @NotNull public String getId() { return ID; } /** * The name to display in the configuration dialog enhancer support drop-down. * * @return Enhancer support name */ @NotNull public String getName() { return NAME; } @NotNull public String[] getEnhancerClassNames() { return new String[] {EnhancerProxyDataNucleus.NUCLEUS_ENHANCER_CLASS, EnhancerProxyDataNucleus.NUCLEUS_GENERIC_ENHANCER_CLASS}; } @NotNull public PersistenceApi[] getPersistenceApis() { return new PersistenceApi[] {PersistenceApi.JPA, PersistenceApi.JDO}; } @NotNull public Class<?> getEnhancerProxyClass() { return EnhancerProxyDataNucleus.class; } }
[ "andy@datanucleus.org" ]
andy@datanucleus.org
d06b8622d04ace0e5291733a5a4c431fe31815e3
c4d977f0a3f921c2a099f77161524cd60d76ff93
/src/test/java/endtoend/functions/jquery/traversing/FindFunctionTest.java
522fe59060b56cb60274af98c4f8b2227effa89e
[ "Apache-2.0" ]
permissive
jbravo/seleniumQuery
d2b49de6349309c52afe63274189d8886d346726
fc13646f50e4081bf70fb9706185264f27c15c69
refs/heads/master
2020-12-14T08:53:19.522660
2016-03-16T18:49:45
2016-03-16T18:49:45
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,742
java
/* Copyright (c) 2015 seleniumQuery authors Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ package endtoend.functions.jquery.traversing; import org.junit.Rule; import org.junit.Test; import testinfrastructure.junitrule.SetUpAndTearDownDriver; import static io.github.seleniumquery.SeleniumQuery.$; import static org.hamcrest.Matchers.is; import static org.junit.Assert.assertThat; public class FindFunctionTest { private static final int COMBO_OPTIONS_COUNT = 4; private static final int OTHER_OPTIONS_COUNT = 2; @Rule public SetUpAndTearDownDriver setUpAndTearDownDriverRule = new SetUpAndTearDownDriver(getClass()); @Test public void find_function() { assertThat($("option").size(), is(COMBO_OPTIONS_COUNT + OTHER_OPTIONS_COUNT)); assertThat($("#combo").find("option").size(), is(COMBO_OPTIONS_COUNT)); } @Test public void find_function__with_pseudoClasses() { assertThat($("#combo").find("option:contains(Howdy)").size(), is(1)); assertThat($("#combo").find("option:contains(Howdy)").get(0).getAttribute("id"), is("howdy-option")); } @Test public void find_function__with_empty_result() { assertThat($("#combo").find(".non-existant-class").size(), is(0)); } }
[ "acdcjunior@gmail.com" ]
acdcjunior@gmail.com
f1b04015f17225e35a8deb578bef9e675880153d
2d7a296960e2276c140ec487e704ca1806e156f6
/src/main/java/com/repository/mongo/TreeModelServicioRepository.java
4fed419ac9281e395ce8e00456ae89bda94368a5
[]
no_license
saymonset/surveybackend
4285d1a659352c728467c5f0e2dfdc6c15c67908
b9ec075ace815ed129cd79052726373c50d7f917
refs/heads/master
2020-05-22T17:03:10.868761
2019-06-13T18:40:53
2019-06-13T18:40:53
186,444,451
0
0
null
null
null
null
UTF-8
Java
false
false
556
java
package com.repository.mongo; import com.model.mongo.Company; import com.model.mongo.TreeModelServicio; import org.springframework.data.repository.CrudRepository; import java.util.List; /** * Created by simon on 5/22/2019. */ public interface TreeModelServicioRepository extends CrudRepository<TreeModelServicio, String> { List<TreeModelServicio> findByCompany(Company company); List<TreeModelServicio> findByParentNodeAndCompany(String parentNode, Company company); TreeModelServicio findByNodeAndCompany(String node, Company company); }
[ "saymon_set@hotmail.com" ]
saymon_set@hotmail.com
7fd10f5095486e626990ff29921a0401d1390f73
c2fd3dea95b0713f56e7f92d12ea091ccbdcc42d
/springdoc-openapi-webflux-ui/src/test/java/test/org/springdoc/ui/AbstractSpringDocTest.java
e8e1d83d3a2241386487be490e55062b28ffe685
[ "Apache-2.0" ]
permissive
up1/springdoc-openapi
ab4734c869f1e599125bd701142b3b0bd2943e34
401840f34fb30efa94d4dbc38c4f8cc2d13003bb
refs/heads/master
2022-12-01T21:12:51.237619
2020-08-09T00:59:33
2020-08-09T00:59:33
286,665,694
1
0
Apache-2.0
2020-08-11T06:36:53
2020-08-11T06:36:52
null
UTF-8
Java
false
false
2,314
java
/* * * * Copyright 2019-2020 the original author or authors. * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * https://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * */ package test.org.springdoc.ui; import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import nonapi.io.github.classgraph.utils.FileUtils; import org.springdoc.core.SpringDocConfigProperties; import org.springdoc.core.SpringDocConfiguration; import org.springdoc.core.SwaggerUiConfigProperties; import org.springdoc.core.SwaggerUiOAuthProperties; import org.springdoc.webflux.core.SpringDocWebFluxConfiguration; import org.springdoc.webflux.ui.SwaggerConfig; import org.springdoc.webflux.ui.SwaggerWelcome; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.boot.test.autoconfigure.web.reactive.WebFluxTest; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.web.reactive.server.WebTestClient; @ActiveProfiles("test") @WebFluxTest @ContextConfiguration(classes = { SpringDocConfiguration.class, SpringDocConfigProperties.class, SpringDocWebFluxConfiguration.class, SwaggerUiConfigProperties.class, SwaggerConfig.class, SwaggerWelcome.class, SwaggerUiOAuthProperties.class }) public abstract class AbstractSpringDocTest { @Autowired protected WebTestClient webTestClient; protected String getContent(String fileName) { try { Path path = Paths.get(FileUtils.class.getClassLoader().getResource(fileName).toURI()); byte[] fileBytes = Files.readAllBytes(path); return new String(fileBytes, StandardCharsets.UTF_8); } catch (Exception e) { throw new RuntimeException("Failed to read file: " + fileName, e); } } }
[ "badr.nasslashen@gmail.com" ]
badr.nasslashen@gmail.com
453916fff09cd622c2bc9ed23492cdd1052bda8e
f163ea0084da06625504129929303fabdc950d25
/achilles-core/src/main/java/info/archinnov/achilles/internals/metamodel/Tuple7Property.java
4bf80cc0fc16c680bc6995bac525766005930793
[ "Apache-2.0", "LicenseRef-scancode-warranty-disclaimer" ]
permissive
sureshpendap/Achilles
492f1c6520a8d3f13e7dc4d7cff09310880b69e9
90a164abd82d8244cd026cf67081af6443ea3f88
refs/heads/master
2021-05-02T17:06:15.988699
2016-10-30T16:12:27
2016-10-30T16:12:27
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,396
java
/* * Copyright (C) 2012-2016 DuyHai DOAN * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package info.archinnov.achilles.internals.metamodel; import static info.archinnov.achilles.internals.cql.TupleExtractor.extractType; import static java.lang.String.format; import java.util.Arrays; import java.util.List; import java.util.Optional; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import com.datastax.driver.core.DataType; import com.datastax.driver.core.GettableData; import com.datastax.driver.core.TupleType; import com.datastax.driver.core.TupleValue; import com.google.common.reflect.TypeToken; import info.archinnov.achilles.internals.metamodel.columns.FieldInfo; import info.archinnov.achilles.internals.options.Options; import info.archinnov.achilles.type.tuples.Tuple7; import info.archinnov.achilles.validation.Validator; public class Tuple7Property<ENTITY, A, B, C, D, E, F, G> extends AbstractTupleProperty<ENTITY, Tuple7<A, B, C, D, E, F, G>> { private static final Logger LOGGER = LoggerFactory.getLogger(Tuple7.class); private final AbstractProperty<ENTITY, A, ?> aProperty; private final AbstractProperty<ENTITY, B, ?> bProperty; private final AbstractProperty<ENTITY, C, ?> cProperty; private final AbstractProperty<ENTITY, D, ?> dProperty; private final AbstractProperty<ENTITY, E, ?> eProperty; private final AbstractProperty<ENTITY, F, ?> fProperty; private final AbstractProperty<ENTITY, G, ?> gProperty; public Tuple7Property(FieldInfo<ENTITY, Tuple7<A, B, C, D, E, F, G>> fieldInfo, AbstractProperty<ENTITY, A, ?> aProperty, AbstractProperty<ENTITY, B, ?> bProperty, AbstractProperty<ENTITY, C, ?> cProperty, AbstractProperty<ENTITY, D, ?> dProperty, AbstractProperty<ENTITY, E, ?> eProperty, AbstractProperty<ENTITY, F, ?> fProperty, AbstractProperty<ENTITY, G, ?> gProperty) { super(new TypeToken<Tuple7<A, B, C, D, E, F, G>>() { }, fieldInfo); this.aProperty = aProperty; this.bProperty = bProperty; this.cProperty = cProperty; this.dProperty = dProperty; this.eProperty = eProperty; this.fProperty = fProperty; this.gProperty = gProperty; } @Override TupleValue encodeFromJavaInternal(Tuple7<A, B, C, D, E, F, G> tuple7, Optional<Options> cassandraOptions) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(format("Encode from Java '%s' tuple7 %s to CQL type", fieldName, tuple7)); } return tupleType.newValue( aProperty.encodeFromRaw(tuple7._1(), cassandraOptions), bProperty.encodeFromRaw(tuple7._2(), cassandraOptions), cProperty.encodeFromRaw(tuple7._3(), cassandraOptions), dProperty.encodeFromRaw(tuple7._4(), cassandraOptions), eProperty.encodeFromRaw(tuple7._5(), cassandraOptions), fProperty.encodeFromRaw(tuple7._6(), cassandraOptions), gProperty.encodeFromRaw(tuple7._7(), cassandraOptions)); } @Override TupleValue encodeFromRawInternal(Object o, Optional<Options> cassandraOptions) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(format("Encode raw '%s' tuple7 object %s", fieldName, o)); } Validator.validateTrue(Tuple7.class.isAssignableFrom(o.getClass()), "The class of object %s to encode should be Tuple7", o); return encodeFromJava((Tuple7<A, B, C, D, E, F, G>) o, cassandraOptions); } @Override Tuple7<A, B, C, D, E, F, G> decodeFromGettableInternal(GettableData gettableData) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(format("Decode '%s' tuple7 from gettable object %s", fieldName, gettableData)); } return decodeFromRaw(gettableData.getTupleValue(fieldInfo.quotedCqlColumn)); } @Override Tuple7<A, B, C, D, E, F, G> decodeFromRawInternal(Object o) { if (LOGGER.isTraceEnabled()) { LOGGER.trace(format("Decode '%s' tuple7 raw object %s", fieldName, o)); } Validator.validateTrue(TupleValue.class.isAssignableFrom(o.getClass()), "The class of object %s to decode should be %s", o, TupleValue.class.getCanonicalName()); final List<DataType> types = tupleType.getComponentTypes(); return new Tuple7<>( aProperty.decodeFromRaw(extractType((TupleValue) o, types.get(0), aProperty, 0)), bProperty.decodeFromRaw(extractType((TupleValue) o, types.get(1), bProperty, 1)), cProperty.decodeFromRaw(extractType((TupleValue) o, types.get(2), cProperty, 2)), dProperty.decodeFromRaw(extractType((TupleValue) o, types.get(3), dProperty, 3)), eProperty.decodeFromRaw(extractType((TupleValue) o, types.get(4), eProperty, 4)), fProperty.decodeFromRaw(extractType((TupleValue) o, types.get(5), fProperty, 5)), gProperty.decodeFromRaw(extractType((TupleValue) o, types.get(6), gProperty, 6))); } @Override public TupleType buildType(Optional<Options> cassandraOptions) { if (LOGGER.isDebugEnabled()) { LOGGER.debug(format("Build current '%s' tuple7 data type", fieldName)); } return tupleTypeFactory.typeFor( aProperty.buildType(cassandraOptions), bProperty.buildType(cassandraOptions), cProperty.buildType(cassandraOptions), dProperty.buildType(cassandraOptions), eProperty.buildType(cassandraOptions), fProperty.buildType(cassandraOptions), gProperty.buildType(cassandraOptions)); } @Override protected List<AbstractProperty<ENTITY, ?, ?>> componentsProperty() { return Arrays.asList(aProperty, bProperty, cProperty, dProperty, eProperty, fProperty, gProperty); } }
[ "doanduyhai@gmail.com" ]
doanduyhai@gmail.com
9910318eae5a0cf13c6e98ba9f454d9f23ce3215
fbb146bf1b0a9fa8f9765d8d3c1583f826711009
/app/src/main/java/com/tekinarslan/material/sample/ui/adapter/CetPagerAdapter.java
e9ec9425b721731572e7f64ca355d1ff8738509b
[]
no_license
Morcal/English
2394ba2fe280f52f6aa3b88f6ef708a6d6b744da
1e4159de3188cd3bd1e10c7ac156905176699266
refs/heads/master
2020-04-14T01:10:34.599383
2016-06-12T12:59:22
2016-06-12T12:59:22
52,508,229
3
0
null
null
null
null
UTF-8
Java
false
false
1,523
java
package com.tekinarslan.material.sample.ui.adapter; import android.content.Context; import android.support.v4.app.Fragment; import android.support.v4.app.FragmentManager; import android.support.v4.app.FragmentPagerAdapter; import com.tekinarslan.material.sample.ui.module.study.CommentFragment; import com.tekinarslan.material.sample.ui.module.study.CourseListFragment; import com.tekinarslan.material.sample.ui.module.study.IntroduceFragment; import com.tekinarslan.material.sample.ui.module.study.TabFragment; /** * Created by lyqdhgo on 2016/4/30. */ public class CetPagerAdapter extends FragmentPagerAdapter { final int PAGE_COUNT = 3; private String tabTitles[] = new String[]{"็ซ ่Š‚", "่ฏ„่ฎบ", "่ฏฆๆƒ…"}; private Context context; public CetPagerAdapter(FragmentManager fm, Context context) { super(fm); this.context = context; } @Override public Fragment getItem(int position) { switch (position) { case 0: // ็ซ ่Š‚ return CourseListFragment.newInstance(position + 1); case 1: // ่ฏ„่ฎบ return CommentFragment.newInstance(); case 2: // ่ฏฆๆƒ… return IntroduceFragment.newInstance(); default: return TabFragment.newInstance(position + 1); } } @Override public int getCount() { return PAGE_COUNT; } @Override public CharSequence getPageTitle(int position) { return tabTitles[position]; } }
[ "lyqdhgo@163.com" ]
lyqdhgo@163.com
394246c54551c7961becc59552a01851ff7528a1
b6eb0ecadbb70ed005d687268a0d40e89d4df73e
/feilong-formatter/src/main/java/com/feilong/formatter/entity/BeanFormatterConfig.java
108d8dc2d1b1897038468ec42d98a08a8212eec3
[ "Apache-2.0" ]
permissive
ifeilong/feilong
b175d02849585c7b12ed0e9864f307ed1a26e89f
a0d4efeabc29503b97caf0c300afe956a5caeb9f
refs/heads/master
2023-08-18T13:08:46.724616
2023-08-14T04:30:34
2023-08-14T04:30:34
252,767,655
97
28
Apache-2.0
2023-04-17T17:47:44
2020-04-03T15:14:35
Java
UTF-8
Java
false
false
4,077
java
/* * Copyright (C) 2008 feilong * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.feilong.formatter.entity; import java.util.Map; import org.apache.commons.collections4.Transformer; /** * ๆไพ›ๆ ผๅผๅŒ–็š„ๆ—ถๅ€™,็›ธๅ…ณๅ‚ๆ•ฐๆŽงๅˆถ. * * @author <a href="https://github.com/ifeilong/feilong">feilong</a> * @since 1.8.5 */ public class BeanFormatterConfig{ //*************************้€šๅธธไบŒ่€…้€‰ๅ…ถไธ€่ฎพ็ฝฎ********************** /** ๆŽ’้™ค็š„ๅฑžๆ€งๅๅญ—, ไผšๆๅ–ๆ‰€ๆœ‰็š„ๅฑžๆ€ง, ็„ถๅŽๅ‰”้™ค exclude้ƒจๅˆ†. */ private String[] excludePropertyNames; /** ๅŒ…ๅซ็š„ๅฑžๆ€งๅๅญ—,ไผšๆๅ–ๆ‰€ๆœ‰็š„ๅฑžๆ€ง,็„ถๅŽไป…ๅ– include้ƒจๅˆ†. */ private String[] includePropertyNames; //--------------------------------------------------------------- /** ๆ˜พ็คบๅฑžๆ€ง(ๅˆ— )็š„้กบๅบ. */ private String[] sorts; //--------------------------------------------------------------- /** * ๆŒ‡ๅฎšๅฑžๆ€ง็ฑปๅž‹่ฝฌๆข. * * @since 1.10.7 */ private Map<String, Transformer<Object, String>> propertyNameAndTransformerMap; //--------------------------------------------------------------- /** * ่Žทๅพ— ๆŽ’้™ค็š„ๅฑžๆ€งๅๅญ—, ไผšๆๅ–ๆ‰€ๆœ‰็š„ๅฑžๆ€ง, ็„ถๅŽๅ‰”้™ค exclude้ƒจๅˆ†. * * @return the excludePropertyNames */ public String[] getExcludePropertyNames(){ return excludePropertyNames; } /** * ่ฎพ็ฝฎ ๆŽ’้™ค็š„ๅฑžๆ€งๅๅญ—, ไผšๆๅ–ๆ‰€ๆœ‰็š„ๅฑžๆ€ง, ็„ถๅŽๅ‰”้™ค exclude้ƒจๅˆ†. * * @param excludePropertyNames * the excludePropertyNames to set */ public void setExcludePropertyNames(String...excludePropertyNames){ this.excludePropertyNames = excludePropertyNames; } /** * ่Žทๅพ— ๅŒ…ๅซ็š„ๅฑžๆ€งๅๅญ—,ไผšๆๅ–ๆ‰€ๆœ‰็š„ๅฑžๆ€ง,็„ถๅŽไป…ๅ– include้ƒจๅˆ†. * * @return the includePropertyNames */ public String[] getIncludePropertyNames(){ return includePropertyNames; } /** * ่ฎพ็ฝฎ ๅŒ…ๅซ็š„ๅฑžๆ€งๅๅญ—,ไผšๆๅ–ๆ‰€ๆœ‰็š„ๅฑžๆ€ง,็„ถๅŽไป…ๅ– include้ƒจๅˆ†. * * @param includePropertyNames * the includePropertyNames to set */ public void setIncludePropertyNames(String...includePropertyNames){ this.includePropertyNames = includePropertyNames; } /** * ่Žทๅพ— ๆ˜พ็คบๅฑžๆ€ง(ๅˆ— )็š„้กบๅบ. * * @return the sorts */ public String[] getSorts(){ return sorts; } /** * ่ฎพ็ฝฎ ๆ˜พ็คบๅฑžๆ€ง(ๅˆ— )็š„้กบๅบ. * * @param sorts * the sorts to set */ public void setSorts(String...sorts){ this.sorts = sorts; } /** * ่Žทๅพ— ๆŒ‡ๅฎšๅฑžๆ€ง็ฑปๅž‹่ฝฌๆข. * * @return the propertyNameAndTransformerMap * @since 1.10.7 */ public Map<String, Transformer<Object, String>> getPropertyNameAndTransformerMap(){ return propertyNameAndTransformerMap; } /** * ่ฎพ็ฝฎ ๆŒ‡ๅฎšๅฑžๆ€ง็ฑปๅž‹่ฝฌๆข. * * @param propertyNameAndTransformerMap * the propertyNameAndTransformerMap to set * @since 1.10.7 */ public void setPropertyNameAndTransformerMap(Map<String, Transformer<Object, String>> propertyNameAndTransformerMap){ this.propertyNameAndTransformerMap = propertyNameAndTransformerMap; } }
[ "venusdrogon@163.com" ]
venusdrogon@163.com
1c6712d954b580af49307dd3472db48d507dee23
ecbc629de652175006766173b66aa2d7b300d041
/src/main/java/org/red5/server/api/plugin/IRed5PluginHandler.java
aabee6202fc66906fb30a25b5ae7f6ecb32cd791
[ "Apache-2.0" ]
permissive
nelshukri/TheummahLive
4565012aa02c6ca7f6c1ea7f0ae89e8abc298528
372322a48de4c3c8d900349979c052a79646161b
refs/heads/master
2022-10-05T23:21:10.325252
2020-03-30T20:33:20
2020-03-30T20:33:20
251,526,160
0
0
Apache-2.0
2022-10-04T23:56:48
2020-03-31T07:06:19
Java
UTF-8
Java
false
false
1,450
java
/* * RED5 Open Source Media Server - https://github.com/Red5/ * * Copyright 2006-2016 by respective authors (see below). All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.red5.server.api.plugin; import java.util.Map; import org.red5.server.adapter.MultiThreadedApplicationAdapter; /** * Base interface for handlers originating from plug-ins. * * @author Paul Gregoire */ public interface IRed5PluginHandler { /** * Initialize the plug-in handler. */ void init(); /** * Set the application making use of this plug-in handler. * * @param application * application adapter */ void setApplication(MultiThreadedApplicationAdapter application); /** * Set properties to be used by this handler. * * @param props * plugin properties map */ void setProperties(Map<String, Object> props); }
[ "mondain@gmail.com" ]
mondain@gmail.com
e648c20d828776192c7a9e84ce520324e4166a41
c257d8afd0785bddaff12819ca3fea58efef375c
/juju-user/src/main/java/com/juju/sport/user/mapper/DeviceUsersMapper.java
b1a30364f54adb840a4a7aaa33ce14ae4b30bba2
[]
no_license
wwbg1988/juju_sport
37c2177a185a6485cd75ef0d72d084476dc51b8b
39a2d91ef815c85de60649adc50372f7ee3e3343
refs/heads/master
2020-06-21T03:47:28.924899
2016-11-26T06:08:46
2016-11-26T06:08:46
74,807,863
0
1
null
null
null
null
UTF-8
Java
false
false
3,108
java
package com.juju.sport.user.mapper; import com.juju.sport.user.pojo.DeviceUsers; import com.juju.sport.user.pojo.DeviceUsersExample; import java.util.List; import org.apache.ibatis.annotations.Param; public interface DeviceUsersMapper { /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int countByExample(DeviceUsersExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int deleteByExample(DeviceUsersExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int deleteByPrimaryKey(String id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int insert(DeviceUsers record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int insertSelective(DeviceUsers record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ List<DeviceUsers> selectByExample(DeviceUsersExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ DeviceUsers selectByPrimaryKey(String id); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int updateByExampleSelective(@Param("record") DeviceUsers record, @Param("example") DeviceUsersExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int updateByExample(@Param("record") DeviceUsers record, @Param("example") DeviceUsersExample example); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int updateByPrimaryKeySelective(DeviceUsers record); /** * This method was generated by MyBatis Generator. * This method corresponds to the database table juju_device_users * * @mbggenerated Tue May 26 10:15:32 CST 2015 */ int updateByPrimaryKey(DeviceUsers record); }
[ "wuweitree@163.com" ]
wuweitree@163.com
b2ab06dff02077bb6d002e23bf7820547110d05e
995f73d30450a6dce6bc7145d89344b4ad6e0622
/P40_HarmonyOS_2.0.0_Developer_Beta1/src/main/java/com/huawei/internal/telephony/vsim/annotation/MtkSupport.java
637fb644535bce6cb787499a76f81b857747a13c
[]
no_license
morningblu/HWFramework
0ceb02cbe42585d0169d9b6c4964a41b436039f5
672bb34094b8780806a10ba9b1d21036fd808b8e
refs/heads/master
2023-07-29T05:26:14.603817
2021-09-03T05:23:34
2021-09-03T05:23:34
null
0
0
null
null
null
null
UTF-8
Java
false
false
502
java
package com.huawei.internal.telephony.vsim.annotation; 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; @Target({ElementType.CONSTRUCTOR, ElementType.FIELD, ElementType.LOCAL_VARIABLE, ElementType.METHOD, ElementType.PACKAGE, ElementType.PARAMETER, ElementType.TYPE}) @Documented @Retention(RetentionPolicy.SOURCE) public @interface MtkSupport { }
[ "dstmath@163.com" ]
dstmath@163.com
6a5d2d96efe1f9fead146c3d63a6d1419cc22efb
5fddb9a3f85f50cdefe3bf29ca06b33ad44bcd62
/src/main/java/com/syncleus/aethermud/game/Commands/AutoAssist.java
582f24578bb332c743ed4b367a64b432f07ec027
[ "Apache-2.0" ]
permissive
freemo/AetherMUD-coffee
da315ae8046d06069a058fb38723750a02f72853
dbc091b3e1108aa6aff3640da4707ace4c6771e5
refs/heads/master
2021-01-19T22:34:29.830622
2017-08-26T14:01:24
2017-08-26T14:06:07
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,023
java
/** * Copyright 2017 Syncleus, Inc. * with portions copyright 2004-2017 Bo Zimmerman * * 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.syncleus.aethermud.game.Commands; import com.syncleus.aethermud.game.MOBS.interfaces.MOB; import com.syncleus.aethermud.game.core.CMParms; import java.util.List; public class AutoAssist extends StdCommand { private final String[] access = I(new String[]{"AUTOASSIST"}); public AutoAssist() { } @Override public String[] getAccessWords() { return access; } @Override public boolean execute(MOB mob, List<String> commands, int metaFlags) throws java.io.IOException { String parm = (commands.size() > 1) ? CMParms.combine(commands, 1) : ""; if ((mob.isAttributeSet(MOB.Attrib.AUTOASSIST) && (parm.length() == 0)) || (parm.equalsIgnoreCase("ON"))) { mob.setAttribute(MOB.Attrib.AUTOASSIST, false); mob.tell(L("Autoassist has been turned on.")); } else if ((!mob.isAttributeSet(MOB.Attrib.AUTOASSIST) && (parm.length() == 0)) || (parm.equalsIgnoreCase("OFF"))) { mob.setAttribute(MOB.Attrib.AUTOASSIST, true); mob.tell(L("Autoassist has been turned off.")); } else if (parm.length() > 0) { mob.tell(L("Illegal @x1 argument: '@x2'. Try ON or OFF, or nothing to toggle.", getAccessWords()[0], parm)); } return false; } @Override public boolean canBeOrdered() { return true; } }
[ "jeffrey.freeman@syncleus.com" ]
jeffrey.freeman@syncleus.com
d84d37843b24823785bdf836274ab70034d56858
272ecbf30d2f7561c7924fff4f852d004f96270e
/chzy-uaa/src/main/java/com/central/oauth/openid/OpenIdAuthenticationProvider.java
8632822f5322f511b96539e1844c97554fec5f26
[ "Apache-2.0" ]
permissive
liguangyue/chzy
10be54bde6a2ca7c6d7ace185a4e850625b36e28
4a8523ea989da49eb3a46f97d248c5662186c4ed
refs/heads/master
2022-06-26T13:36:55.576677
2019-11-06T08:47:24
2019-11-06T08:47:24
219,940,889
3
1
null
null
null
null
UTF-8
Java
false
false
1,709
java
package com.central.oauth.openid; import org.springframework.security.authentication.AuthenticationProvider; import org.springframework.security.authentication.InternalAuthenticationServiceException; import org.springframework.security.core.Authentication; import org.springframework.security.core.AuthenticationException; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.social.security.SocialUserDetailsService; /** * @author ligy7 */ public class OpenIdAuthenticationProvider implements AuthenticationProvider { private SocialUserDetailsService userDetailsService; @Override public Authentication authenticate(Authentication authentication) { OpenIdAuthenticationToken authenticationToken = (OpenIdAuthenticationToken) authentication; String openId = (String) authenticationToken.getPrincipal(); UserDetails user = userDetailsService.loadUserByUserId(openId); if (user == null) { throw new InternalAuthenticationServiceException("openId้”™่ฏฏ"); } OpenIdAuthenticationToken authenticationResult = new OpenIdAuthenticationToken(user, user.getAuthorities()); authenticationResult.setDetails(authenticationToken.getDetails()); return authenticationResult; } @Override public boolean supports(Class<?> authentication) { return OpenIdAuthenticationToken.class.isAssignableFrom(authentication); } public SocialUserDetailsService getUserDetailsService() { return userDetailsService; } public void setUserDetailsService(SocialUserDetailsService userDetailsService) { this.userDetailsService = userDetailsService; } }
[ "liy7@asiainfo.com" ]
liy7@asiainfo.com
26fb7ba4a0aea40bbdefa3532923f899441f609c
aabeefe120bcb9680d0c074224c6c9771e61033c
/src/test/java/com/gos/dao/CartDAOTest.java
e8bb9a5b3b36048924f058923f64aedf972d98d1
[]
no_license
geekymv/ssmm
edcdcd214daf2c814dfdaba0c437a855aab60648
60791ceef5b14ffe9ff06fc0972e74a20937ac93
refs/heads/master
2021-01-23T03:04:12.052065
2014-12-15T06:57:11
2014-12-15T06:57:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
814
java
package com.gos.dao; import java.util.List; import javax.annotation.Resource; import org.junit.Test; import org.junit.runner.RunWith; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; import com.gos.model.Cart; @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("/beans.xml") public class CartDAOTest { private CartDAO cartDAO; @Resource public void setCartDAO(CartDAO cartDAO) { this.cartDAO = cartDAO; } @Test public void test() { Cart cart = cartDAO.query(1, 1); System.out.println(cart); } @Test public void testQueryMyCart() { List<Cart> carts = cartDAO.queryMyCart(1); for (Cart cart : carts) { System.out.println(cart); } } }
[ "ym2011678@foxmail.com" ]
ym2011678@foxmail.com
a33cf49614c0de014c1afd7dca56c1f3ad438972
62efa3f5038377c804d60445d154eb1a9ac1f315
/java/src/main/java/com/hansheng/Thread/TextThreadMethod.java
7f57e13664a3c2968213653f61cdb6435fe229c5
[ "Apache-2.0" ]
permissive
MrWu94/AndroidNoteX
5a3122704e3968c6e47c9ac7f3c68da3a3dd32ff
b8d837582d23356a81aaa53e95adfcb4b2a6f715
refs/heads/master
2021-07-16T01:53:56.612465
2017-10-23T13:12:18
2017-10-23T13:12:18
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,378
java
package com.hansheng.Thread; /** * Created by hansheng on 2016/10/3. * ่ฐƒ็”จyield()๏ผŒไธๅŒไผ˜ๅ…ˆ็บง็š„็บฟ็จ‹ๆฐธ่ฟœไธไผšๅพ—ๅˆฐๆ‰ง่กŒๆœบไผšใ€‚ * sleep()ไฝฟๅฝ“ๅ‰็บฟ็จ‹่ฟ›ๅ…ฅๅœๆปž็Šถๆ€๏ผŒๆ‰€ไปฅๆ‰ง่กŒsleep()็š„็บฟ็จ‹ๅœจๆŒ‡ๅฎš็š„ๆ—ถ้—ดๅ†…่‚ฏๅฎšไธไผšๆ‰ง่กŒ๏ผ› * yield()ๅชๆ˜ฏไฝฟๅฝ“ๅ‰็บฟ็จ‹้‡ๆ–ฐๅ›žๅˆฐๅฏๆ‰ง่กŒ็Šถๆ€๏ผŒๆ‰€ไปฅๆ‰ง่กŒyield()็š„็บฟ็จ‹ๆœ‰ๅฏ่ƒฝๅœจ่ฟ›ๅ…ฅๅˆฐๅฏๆ‰ง่กŒ็Šถๆ€ๅŽ้ฉฌไธŠๅˆ่ขซๆ‰ง่กŒใ€‚ * yield()๏ผšๆš‚ๅœๅฝ“ๅ‰ๆญฃๅœจๆ‰ง่กŒ็š„็บฟ็จ‹ๅฏน่ฑก๏ผŒๅนถๆ‰ง่กŒๅ…ถไป–็บฟ็จ‹ใ€‚ */ class TestThreadMethod extends Thread{ public static int shareVar = 0; public TestThreadMethod(String name){ super(name); } public void run(){ for(int i=0; i<4; i++){ System.out.print(Thread.currentThread().getName()); System.out.println(" : " + i); Thread.yield(); // /* ๏ผˆ2๏ผ‰ */ // try{ // Thread.sleep(3000); // } // catch(InterruptedException e){ // System.out.println("Interrupted"); // }} }} } class TestThread{ public static void main(String[] args){ TestThreadMethod t1 = new TestThreadMethod("t1"); TestThreadMethod t2 = new TestThreadMethod("t2"); t1.setPriority(Thread.MAX_PRIORITY); t2.setPriority(Thread.MIN_PRIORITY); t1.start(); t2.start(); } }
[ "shenghanming@gmai.com" ]
shenghanming@gmai.com
1c2207de8f0f5ca841142e1c6eff4927f4c550a4
ad21934baa88cb1abb0886aca154d0342537abdc
/awifi-np-biz-pub/src/main/java/com/awifi/np/biz/pub/system/location/controller/LocationController.java
2b6d12e535991c5573002caef9a68e4a0ec3572a
[]
no_license
un-knower/awifi-np-biz
5b74f89a1810d6d4accbfb3c52797f9adf9e00bb
ade4d0fa580100707325db0d8cfacee3f525ce21
refs/heads/master
2020-03-17T21:20:43.755520
2017-08-23T02:36:12
2017-08-23T02:36:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
5,023
java
package com.awifi.np.biz.pub.system.location.controller; import java.util.List; import java.util.Map; import java.util.Set; import javax.annotation.Resource; import javax.servlet.http.HttpServletRequest; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; import com.awifi.np.biz.api.client.dbcenter.location.util.LocationClient; import com.awifi.np.biz.common.base.constants.RedisConstants; import com.awifi.np.biz.common.base.controller.BaseController; import com.awifi.np.biz.common.redis.util.RedisUtil; import com.awifi.np.biz.common.security.user.model.SessionUser; import com.awifi.np.biz.common.security.user.util.SessionUtil; import com.awifi.np.biz.pub.system.location.service.LocationService; /** * ็‰ˆๆƒๆ‰€ๆœ‰๏ผš ็ˆฑWiFiๆ— ็บฟ่ฟ่ฅไธญๅฟƒ * ๅˆ›ๅปบๆ—ฅๆœŸ:2017ๅนด1ๆœˆ22ๆ—ฅ ไธŠๅˆ8:46:38 * ๅˆ›ๅปบไฝœ่€…๏ผšๅ‘จ้ข– * ๆ–‡ไปถๅ็งฐ๏ผšLocationController.java * ็‰ˆๆœฌ๏ผš v1.0 * ๅŠŸ่ƒฝ๏ผšๅœฐๅŒบๆŽงๅˆถๅฑ‚ * ไฟฎๆ”น่ฎฐๅฝ•๏ผš */ @Controller @SuppressWarnings("rawtypes") public class LocationController extends BaseController { /**ๅœฐๅŒบๆœๅŠกๅฑ‚*/ @Resource(name = "locationService") private LocationService locationService; /** * ๅœฐๅŒบ็ผ“ๅญ˜ * @param accessToken access_token * @return ็ป“ๆžœ * @author ๅ‘จ้ข– * @throws Exception * @date 2017ๅนด1ๆœˆ22ๆ—ฅ ไธŠๅˆ9:26:15 */ @RequestMapping(method = RequestMethod.GET,value = "/pubsrv/location/cache") @ResponseBody public Map cache(@RequestParam(value="access_token",required=true)String accessToken) throws Exception{ LocationClient.cache();//็ผ“ๅญ˜ๅœฐๅŒบๆ•ฐๆฎ return this.successMsg();//่ฟ”ๅ›ž } /** * ๆธ…้™คๅœฐๅŒบ็ผ“ๅญ˜ * @param accessToken access_token * @return ็ป“ๆžœ * @author ๅ‘จ้ข– * @date 2017ๅนด1ๆœˆ22ๆ—ฅ ไธŠๅˆ11:09:01 */ @RequestMapping(method = RequestMethod.GET,value = "/pubsrv/location/cache/clear") @ResponseBody public Map cacheClear(@RequestParam(value="access_token",required=true)String accessToken){ String key = RedisConstants.LOCATION + "*";//็”Ÿๆˆkey Set<String> keySet = RedisUtil.keys(key);//ๆ‰น้‡่Žทๅ–key Long count = RedisUtil.delBatch(keySet);//ๆ‰น้‡ๅˆ ้™ค logger.debug("ๆ็คบ๏ผšredisๅ…ฑๅˆ ้™ค "+ count +" ๆกๆ•ฐๆฎ"); return this.successMsg();//่ฟ”ๅ›ž } /** * ่Žทๅ–ๆ‰€ๆœ‰็œ * @param accessToken access_token * @param request ่ฏทๆฑ‚ * @return ็œ * @author ๅ‘จ้ข– * @throws Exception * @date 2017ๅนด1ๆœˆ22ๆ—ฅ ไธ‹ๅˆ1:48:35 */ @RequestMapping(method = RequestMethod.GET,value = "/pubsrv/provinces") @ResponseBody public Map getProvinces(@RequestParam(value="access_token",required=true)String accessToken, HttpServletRequest request) throws Exception{ SessionUser sessionUser = SessionUtil.getCurSessionUser(request); List<Map<String,Object>> provinceMap = locationService.getProvinces(sessionUser);//่Žทๅ–ๆ‰€ๆœ‰็œ return this.successMsg(provinceMap); } /** * ่Žทๅ–ๆ‰€ๆœ‰ๅธ‚ * @param accessToken access_token * @param request ่ฏทๆฑ‚ * @param parentId ็œid * @return ๅธ‚ * @throws Exception * @author ๅ‘จ้ข– * @date 2017ๅนด1ๆœˆ22ๆ—ฅ ไธ‹ๅˆ3:03:30 */ @RequestMapping(method = RequestMethod.GET,value = "/pubsrv/cities") @ResponseBody public Map getCities(@RequestParam(value="access_token",required=true)String accessToken, HttpServletRequest request, @RequestParam(value="parentid",required=true) String parentId) throws Exception{ SessionUser sessionUser = SessionUtil.getCurSessionUser(request); List<Map<String,Object>> cityMap = locationService.getCities(sessionUser,parentId);//่Žทๅ–ๆ‰€ๆœ‰ๅธ‚ return this.successMsg(cityMap); } /** * ่Žทๅ–ๆ‰€ๆœ‰ๅŒบๅŽฟ * @param accessToken access_token * @param request ่ฏทๆฑ‚ * @param parentId ๅธ‚id * @return ๅŒบๅŽฟ * @throws Exception * @author ๅ‘จ้ข– * @date 2017ๅนด1ๆœˆ23ๆ—ฅ ไธŠๅˆ9:07:37 */ @RequestMapping(method = RequestMethod.GET,value = "/pubsrv/areas") @ResponseBody public Map getAreas(@RequestParam(value="access_token",required=true)String accessToken, HttpServletRequest request, @RequestParam(value="parentid",required=true) String parentId) throws Exception{ SessionUser sessionUser = SessionUtil.getCurSessionUser(request); List<Map<String,Object>> areaMap = locationService.getAreas(sessionUser,parentId);//่Žทๅ–ๆ‰€ๆœ‰ๅŒบๅŽฟ return this.successMsg(areaMap); } }
[ "fangzhiwei229@gmail.com" ]
fangzhiwei229@gmail.com
66dc5731736a461f009259db0edf680265c376d6
258de8e8d556901959831bbdc3878af2d8933997
/utopia-service/utopia-feedback/utopia-feedback-impl/src/main/java/com/voxlearning/utopia/service/feedback/impl/dao/UserFeedbackPersistence.java
fd300b05545ae4c4bd3a2ce2c8c1887994ba5023
[]
no_license
Explorer1092/vox
d40168b44ccd523748647742ec376fdc2b22160f
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
refs/heads/master
2020-05-14T20:13:02.531549
2019-04-17T06:54:06
2019-04-17T06:54:06
181,923,482
0
4
null
2019-04-17T15:53:25
2019-04-17T15:53:25
null
UTF-8
Java
false
false
2,077
java
/* * SHANGHAI SUNNY EDUCATION, INC. CONFIDENTIAL * * Copyright 2011-2017 Shanghai Sunny Education, Inc. All Rights Reserved. * * NOTICE: All information contained herein is, and remains the property of * Shanghai Sunny Education, Inc. and its suppliers, if any. The intellectual * and technical concepts contained herein are proprietary to Shanghai Sunny * Education, Inc. and its suppliers and may be covered by patents, patents * in process, and are protected by trade secret or copyright law. Dissemination * of this information or reproduction of this material is strictly forbidden * unless prior written permission is obtained from Shanghai Sunny Education, Inc. */ package com.voxlearning.utopia.service.feedback.impl.dao; import com.voxlearning.alps.annotation.cache.CacheBean; import com.voxlearning.alps.annotation.cache.CacheMethod; import com.voxlearning.alps.annotation.cache.CacheParameter; import com.voxlearning.alps.dao.core.hql.Criteria; import com.voxlearning.alps.dao.core.hql.Query; import com.voxlearning.alps.dao.jdbc.dao.AlpsStaticJdbcDao; import com.voxlearning.utopia.service.feedback.api.entities.UserFeedback; import javax.inject.Named; import java.util.Collection; import java.util.List; /** * {@link UserFeedback} persistence implementation. * * @author RuiBao * @version 0.1 * @since 13-8-21 */ @Named("com.voxlearning.utopia.service.feedback.impl.dao.UserFeedbackPersistence") @CacheBean(type = UserFeedback.class) public class UserFeedbackPersistence extends AlpsStaticJdbcDao<UserFeedback, Long> { @Override protected void calculateCacheDimensions(UserFeedback document, Collection<String> dimensions) { dimensions.add(UserFeedback.ck_id(document.getId())); dimensions.add(UserFeedback.ck_userId(document.getUserId())); } @CacheMethod public List<UserFeedback> findByUserId(@CacheParameter("userId") Long userId) { Criteria criteria = Criteria.where("USER_ID").is(userId); return query(Query.query(criteria)); } }
[ "wangahai@300.cn" ]
wangahai@300.cn
a8185892ea68bba92d68163c8f0c56755d910a9d
63489b9d7f48b5f95dd7823f1ee0e81beb88aba4
/artrade/src/main/java/com/unionpay/mobile/android/net/b.java
9ce50a839b0b8aec987e791e5244a47fa8db870d
[]
no_license
h4x0r139/MyApplication
7f7b7b65c160cad5af5baa5727163fae5d26a2bb
b71648d2963761efdfdf66de72075e590781c835
refs/heads/master
2020-05-21T14:55:31.488110
2019-05-28T11:29:45
2019-05-28T11:29:45
63,512,880
5
0
null
null
null
null
UTF-8
Java
false
false
2,531
java
package com.unionpay.mobile.android.net; import java.security.KeyStoreException; import java.security.NoSuchAlgorithmException; import java.security.cert.CertificateException; import java.security.cert.X509Certificate; import javax.net.ssl.TrustManager; import javax.net.ssl.TrustManagerFactory; import javax.net.ssl.X509TrustManager; import javax.security.auth.x500.X500Principal; public final class b implements X509TrustManager { private X509TrustManager a = null; public b() throws NoSuchAlgorithmException, KeyStoreException { TrustManagerFactory localTrustManagerFactory = TrustManagerFactory.getInstance(TrustManagerFactory.getDefaultAlgorithm()); localTrustManagerFactory.init(null); TrustManager[] arrayOfTrustManager = localTrustManagerFactory.getTrustManagers(); if (arrayOfTrustManager.length == 0) throw new NoSuchAlgorithmException("no trust manager found"); this.a = ((X509TrustManager)arrayOfTrustManager[0]); } public final void checkClientTrusted(X509Certificate[] paramArrayOfX509Certificate, String paramString) throws CertificateException { this.a.checkClientTrusted(paramArrayOfX509Certificate, paramString); } public final void checkServerTrusted(X509Certificate[] paramArrayOfX509Certificate, String paramString) throws CertificateException { this.a.checkServerTrusted(paramArrayOfX509Certificate, paramString); try { X500Principal localX500Principal1 = paramArrayOfX509Certificate[0].getIssuerX500Principal(); if ((!localX500Principal1.getName().equals(HttpNative.a().getIssuer(0))) && (!localX500Principal1.getName().equals(HttpNative.a().getIssuer(1))) && (!localX500Principal1.getName().equals(HttpNative.a().getIssuer(2)))) throw new CertificateException(); } catch (Exception localException) { throw new CertificateException(); } X500Principal localX500Principal2 = paramArrayOfX509Certificate[0].getSubjectX500Principal(); if ((!localX500Principal2.getName().equals(HttpNative.a().getSubject(0))) && (!localX500Principal2.getName().equals(HttpNative.a().getSubject(1))) && (!localX500Principal2.getName().equals(HttpNative.a().getSubject(2)))) throw new CertificateException(); } public final X509Certificate[] getAcceptedIssuers() { return this.a.getAcceptedIssuers(); } } /* Location: D:\yinxm\Android\work\ๆ‹ๅ–\apktool\artrade\classes_dex2jar.jar * Qualified Name: com.unionpay.mobile.android.net.b * JD-Core Version: 0.6.2 */
[ "h4x0r_001@163.com" ]
h4x0r_001@163.com
9a1bba247bfeeb88c45299973cc9ef8fb0672bae
80552d844f54667b4d6f00845a667026d656e1ba
/zip/spring-framework-3.2.x/spring-jms/src/main/java/org/springframework/jms/support/converter/SimpleMessageConverter102.java
f1933f27f3f6e86b02be0fee8bde3b2db445857e
[ "Apache-2.0" ]
permissive
13266764646/spring-framewrok3.2.x
e662e4d633adec91fcfca6d66e15a7555044429d
84c238239ebd8cebdddee540c0fefa8e4755eac8
refs/heads/master
2020-05-03T15:38:25.422211
2019-08-26T02:44:12
2019-08-26T02:44:12
178,707,063
1
0
null
null
null
null
UTF-8
Java
false
false
2,403
java
/* * Copyright 2002-2012 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package org.springframework.jms.support.converter; import java.io.ByteArrayOutputStream; import javax.jms.BytesMessage; import javax.jms.JMSException; /** * A subclass of {@link SimpleMessageConverter} for the JMS 1.0.2 specification, * not relying on JMS 1.1 methods like SimpleMessageConverter itself. * This class can be used for JMS 1.0.2 providers, offering the same functionality * as SimpleMessageConverter does for JMS 1.1 providers. * * <p>The only difference to the default SimpleMessageConverter is that BytesMessage * is handled differently: namely, without using the {@code getBodyLength()} * method which has been introduced in JMS 1.1 and is therefore not available on a * JMS 1.0.2 provider. * * @author Juergen Hoeller * @since 1.1.1 * @see javax.jms.BytesMessage#getBodyLength() * @deprecated as of Spring 3.0, in favor of the JMS 1.1 based {@link SimpleMessageConverter} */ @Deprecated public class SimpleMessageConverter102 extends SimpleMessageConverter { public static final int BUFFER_SIZE = 4096; /** * Overrides superclass method to copy bytes from the message into a * ByteArrayOutputStream, using a buffer, to avoid using the * {@code getBodyLength()} method which has been introduced in * JMS 1.1 and is therefore not available on a JMS 1.0.2 provider. * @see javax.jms.BytesMessage#getBodyLength() */ protected byte[] extractByteArrayFromMessage(BytesMessage message) throws JMSException { ByteArrayOutputStream baos = new ByteArrayOutputStream(BUFFER_SIZE); byte[] buffer = new byte[BUFFER_SIZE]; int bufferCount = -1; while ((bufferCount = message.readBytes(buffer)) >= 0) { baos.write(buffer, 0, bufferCount); if (bufferCount < BUFFER_SIZE) { break; } } return baos.toByteArray(); } }
[ "972181522@qq.com" ]
972181522@qq.com
1f385c111ebf42b087fccc7e676796b3b7c48420
13ea5da0b7b8d4ba87d622a5f733dcf6b4c5f1e3
/crash-reproduction-ws/results/XWIKI-13372-13-26-Single_Objective_GGA-WeightedSum/org/xwiki/extension/handler/internal/DefaultExtensionHandlerManager_ESTest_scaffolding.java
8423483cafce9ab14978faf8bc9e03b03b98aba5
[ "MIT", "CC-BY-4.0" ]
permissive
STAMP-project/Botsing-basic-block-coverage-application
6c1095c6be945adc0be2b63bbec44f0014972793
80ea9e7a740bf4b1f9d2d06fe3dcc72323b848da
refs/heads/master
2022-07-28T23:05:55.253779
2022-04-20T13:54:11
2022-04-20T13:54:11
285,771,370
0
0
null
null
null
null
UTF-8
Java
false
false
471
java
/** * Scaffolding file used to store all the setups needed to run * tests automatically generated by EvoSuite * Tue Mar 31 08:47:52 UTC 2020 */ package org.xwiki.extension.handler.internal; import org.evosuite.runtime.annotation.EvoSuiteClassExclude; import org.junit.BeforeClass; import org.junit.Before; import org.junit.After; @EvoSuiteClassExclude public class DefaultExtensionHandlerManager_ESTest_scaffolding { // Empty scaffolding for empty test suite }
[ "pouria.derakhshanfar@gmail.com" ]
pouria.derakhshanfar@gmail.com
6188aa15350aa05d36b82b8a62c9010a7339d1d8
966e6efcd8c420598f4c451abaca5fd9f0370584
/JavaRushHomeWork/JavaRushTasks/4.JavaCollections/src/com/javarush/task/task33/task3307/Solution.java
daf1d73ba98620fd53526a886eec7066901d4fa9
[]
no_license
ivshebanov/JavaRush
7c04329a12db0970cf72b97327c0108fe9412b15
778463f3339a565934b04df7b0f327c4178bf0bf
refs/heads/master
2021-06-03T14:13:29.442321
2021-04-20T17:31:16
2021-04-20T17:31:16
83,684,136
3
3
null
null
null
null
UTF-8
Java
false
false
1,413
java
package com.javarush.task.task33.task3307; import javax.xml.bind.JAXBContext; import javax.xml.bind.JAXBException; import javax.xml.bind.Unmarshaller; import javax.xml.bind.annotation.XmlRootElement; import javax.xml.bind.annotation.XmlType; import java.io.IOException; import java.io.StringReader; /* ะ”ะตัะตั€ะธะฐะปะธะทะฐั†ะธั XML ะพะฑัŠะตะบั‚ะฐ */ public class Solution { public static void main(String[] args) throws IOException, JAXBException { String xmlData = "<cat><name>Murka</name><age>5</age><weight>4</weight></cat>"; Cat cat = convertFromXmlToNormal(xmlData, Cat.class); System.out.println(cat); } public static <T> T convertFromXmlToNormal(String xmlData, Class<T> clazz) throws IOException, JAXBException { StringReader reader = new StringReader(xmlData); JAXBContext context = JAXBContext.newInstance(clazz); Unmarshaller unmarshaller = context.createUnmarshaller(); return (T) unmarshaller.unmarshal(reader); } @XmlType(name = "cat") @XmlRootElement public static class Cat { public String name; public int age; public int weight; @Override public String toString() { return "Cat{" + "name='" + name + '\'' + ", age=" + age + ", weight=" + weight + '}'; } } }
[ "ivshebanov@gmail.com" ]
ivshebanov@gmail.com
677c762b29a8b8a09e307c1e5321a701c6024b24
e4c81bdbae663e1d168392768f299c9a550341ba
/eoms-web/src/main/java/com/lj/eoms/order/OrderRetireController.java
df4c186064d7ac1aa36008e7de28b8070900fdda
[]
no_license
wo510751575/kun
995e75f03424d98d11c33fd2fe6681666108ec54
4907f79d1232ecea8ae5fe138809066a0fbc1212
refs/heads/master
2022-12-21T08:20:44.972860
2019-11-15T11:03:14
2019-11-15T11:03:14
219,097,605
0
1
null
2022-12-16T11:35:53
2019-11-02T03:22:39
Java
UTF-8
Java
false
false
5,040
java
/** * Copyright &copy; 2017-2020 All rights reserved. * * Licensed under the ๆทฑๅœณๅธ‚ๅฐๅค License, Version 1.0 (the "License"); * */ package com.lj.eoms.order; import java.util.List; import org.apache.log4j.Logger; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import com.ape.common.web.BaseController; import com.google.common.collect.Lists; import com.lj.base.core.pagination.Page; import com.lj.base.core.pagination.PageSortType; import com.lj.eoms.utils.UserUtils; import com.lj.eshop.dto.FindOrderRetirePage; import com.lj.eshop.dto.OrderDto; import com.lj.eshop.dto.OrderRetireDto; import com.lj.eshop.emus.AccWaterPayType; import com.lj.eshop.emus.AuditStatus; import com.lj.eshop.emus.OrderInvoice; import com.lj.eshop.emus.OrderRetireType; import com.lj.eshop.emus.OrderStatus; import com.lj.eshop.emus.RetireStatus; import com.lj.eshop.service.IOrderRetireService; import com.lj.eshop.service.IOrderService; /** * * * ็ฑป่ฏดๆ˜Ž๏ผš่ฎขๅ•้€€่ดง@Controller * * * <p> * ่ฏฆ็ป†ๆ่ฟฐ๏ผš * * @Company: * @author * * CreateDate: 2017ๅนด8ๆœˆ29ๆ—ฅ */ @Controller @RequestMapping("${adminPath}/order/retire") public class OrderRetireController extends BaseController { public static final String LIST = "modules/order/retire/list"; public static final String FORM = "modules/order/retire/form"; public static final String EDIT = "modules/order/retire/edit"; public static final String VIEW = "modules/order/retire/view"; private Logger log = Logger.getLogger(getClass()); @Autowired private IOrderRetireService orderRetireService; @Autowired private IOrderService orderService; /** ๅˆ—่กจ */ @RequiresPermissions("order:retire:view") @RequestMapping(value = {"list",""}, method = {RequestMethod.GET,RequestMethod.POST}) public String list(FindOrderRetirePage findOrderRetirePage,Integer pageNo,Integer pageSize, Model model) { try { OrderRetireDto orderRetire=findOrderRetirePage.getParam(); if(orderRetire==null){ orderRetire=new OrderRetireDto(); } findOrderRetirePage.setSortBy("create_time"); findOrderRetirePage.setSortDir(PageSortType.desc); findOrderRetirePage.setParam(orderRetire); if(pageNo!=null){ findOrderRetirePage.setStart((pageNo-1)*pageSize); } if(pageSize!=null){ findOrderRetirePage.setLimit(pageSize); } Page<OrderRetireDto> pageDto = orderRetireService.findOrderRetirePage(findOrderRetirePage); List<OrderRetireDto> list = Lists.newArrayList(); list.addAll(pageDto.getRows()); com.ape.common.persistence.Page<OrderRetireDto> page=new com.ape.common.persistence.Page<OrderRetireDto>(pageNo==null?1:pageNo, pageDto.getLimit(), pageDto.getTotal(), list); page.initialize(); model.addAttribute("page",page); model.addAttribute("auditStatus", AuditStatus.values()); model.addAttribute("orderRetireTypes", OrderRetireType.values()); model.addAttribute("retireStatus", RetireStatus.values()); model.addAttribute("orderRetireParam", orderRetire); } catch (Exception e) { e.printStackTrace(); } return LIST; } /** ่ง†ๅ›พ */ @RequiresPermissions("order:order:view") @RequestMapping(value = {"form", "view"}, method = {RequestMethod.GET,RequestMethod.POST}) public String form(String code, Model model) { try { OrderRetireDto param = new OrderRetireDto(); param.setCode(code); OrderRetireDto dto = orderRetireService.findOrderRetire(param); model.addAttribute("data", dto); model.addAttribute("auditStatus", AuditStatus.values()); } catch (Exception e) { e.printStackTrace(); } return VIEW; } /** ๅฎกๆ ธ*/ @RequiresPermissions("order:retire:edit") @RequestMapping(value = "/status") public String status(String code,String failReason,String auditStatus, RedirectAttributes redirectAttributes) { try { OrderRetireDto parm = new OrderRetireDto(); parm.setCode(code); OrderRetireDto retireDto= orderRetireService.findOrderRetire(parm); /*ๆž„ๅปบ้€€่ดงๅฏน่ฑก*/ OrderRetireDto orderRetireDto = new OrderRetireDto(); orderRetireDto.setCode(code); orderRetireDto.setFailReason(failReason); orderRetireDto.setAuditor(UserUtils.getUser().getName()); orderRetireDto.setAuditStatus(auditStatus); orderRetireDto.setOrderNo(retireDto.getOrderNo()); orderRetireDto.setRetireNo(retireDto.getRetireNo()); orderService.returns(orderRetireDto, orderRetireDto.getFailReason()); addMessage(redirectAttributes, "ๆ“ไฝœ้€€ๅ•ๅท:'"+orderRetireDto.getRetireNo()+"'ๆˆๅŠŸ"); } catch (Exception e) { // log.error(e); e.printStackTrace(); addMessage(redirectAttributes, e.toString()); } return "redirect:" + adminPath + "/order/retire/list"; } }
[ "37724558+wo510751575@users.noreply.github.com" ]
37724558+wo510751575@users.noreply.github.com
8b68212ed42451023f9f137b0a29b9ddc4d1a303
69a4f2d51ebeea36c4d8192e25cfb5f3f77bef5e
/methods/Method_1000771.java
73ee241dfc9697a42c6663bd46d5b40c98255a3b
[]
no_license
P79N6A/icse_20_user_study
5b9c42c6384502fdc9588430899f257761f1f506
8a3676bc96059ea2c4f6d209016f5088a5628f3c
refs/heads/master
2020-06-24T08:25:22.606717
2019-07-25T15:31:16
2019-07-25T15:31:16
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,457
java
@Override public Map<String,Map<String,Object>> load(String refer){ Map<String,Map<String,Object>> re=new HashMap<String,Map<String,Object>>(); re.put(Mvcs.DEFAULT_MSGS,new NutMap()); List<NutResource> allnrs=Scans.me().scan(refer,"^.+[.]properties$"); if (log.isDebugEnabled()) log.debugf("Load Messages in %s resource : [%s]",allnrs.size(),allnrs); for ( NutResource nr : allnrs) { try { String name=nr.getName(); if (name.contains("/")) { name=name.substring(name.lastIndexOf('/') + 1); } if (name.contains("\\")) { name=name.substring(name.lastIndexOf('\\') + 1); } name=name.substring(0,name.length() - ".properties".length()); String langType=Mvcs.DEFAULT_MSGS; if (name.contains("_")) { langType=name.substring(name.indexOf('_') + 1); } Properties properties=new Properties(); properties.load(nr.getInputStream()); NutMap msgs=(NutMap)re.get(langType); if (msgs == null) { if (log.isDebugEnabled()) { log.debug("add Message Locale : " + langType); } msgs=new NutMap(); re.put(langType,msgs); } for ( Map.Entry<Object,Object> en : properties.entrySet()) { msgs.put(String.valueOf(en.getKey()),String.valueOf(en.getValue())); } } catch ( Exception e) { throw new RuntimeException("error when reading " + nr.getName(),e); } } return re; }
[ "sonnguyen@utdallas.edu" ]
sonnguyen@utdallas.edu
613b2311c873bd74ab2934b16df484fd9aa3c875
1824a3ea8151f56e6d6cbffc7d5c56c1ee04bd2b
/src/main/java/me/Hazz/HazzBot/Commands/ComplexCommands/ReportCommands/ChangeReportCommand.java
051cf3ccd920014f0ac7721e562569b4f8403026
[]
no_license
Hazzaaa43/HazzBot
1652b148d51e55cce87c35ba5df28661ee9cf58b
f23fd9e59f396c59bba85598a7b5c669d4b69fa4
refs/heads/master
2020-12-07T08:01:30.022926
2020-01-08T22:52:02
2020-01-08T23:03:07
232,679,192
0
0
null
null
null
null
UTF-8
Java
false
false
4,392
java
package me.Hazz.HazzBot.Commands.ComplexCommands.ReportCommands; import me.Hazz.HazzBot.Database.Controllers.CReport; import me.Hazz.HazzBot.Database.Objects.OReport; import me.Hazz.HazzBot.Interfaces.ICommand; import me.Hazz.HazzBot.Variables.Info; import net.dv8tion.jda.api.EmbedBuilder; import net.dv8tion.jda.api.entities.Role; import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent; import java.awt.*; import java.util.ArrayList; import java.util.List; import java.util.concurrent.TimeUnit; import static me.Hazz.HazzBot.Commands.ComplexCommands.ReportCommands.ReportCommand.getContent; import static me.Hazz.HazzBot.Commands.ComplexCommands.ReportCommands.ReportCommand.getNumber; public class ChangeReportCommand implements ICommand { @Override public String getName() { return "changereport"; } @Override public String[] getAliases() { return new String[]{"changenote"}; } @Override public boolean execute(String[] newArgs, GuildMessageReceivedEvent event) { if (!event.getChannel().getId().equals("374060379619459083") // Pixelmon Staff && !event.getChannel().getId().equals("631323140475060251") // Vanilla Staff && !event.getChannel().getId().equals("632380912968925196")){ // Test Bot return true; } int RankTester = 0; List<Role> roles = event.getMember().getRoles(); for (Role r : roles) { if (r.getName().equals(":::Manager:::") || r.getName().equals(":::Pixel RankHeads:::") || r.getName().equals("::Pixel Sr-Admin::") || r.getName().equals("::Pixel Admin::") || r.getName().equals("::Pixel Sr-Mod::") || r.getName().equals(":::Vanilla RankHeads:::") || r.getName().equals("::Vanilla Sr-Admin::") || r.getName().equals("::Vanilla Admin::") || r.getName().equals("::Vanilla Sr-Mod::")) { RankTester = 1; } } if (RankTester == 1) { try { String oldIGN = newArgs[0].substring(0, 1).toUpperCase() + newArgs[0].substring(1).toLowerCase(); String newIGN = newArgs[1].substring(0, 1).toUpperCase() + newArgs[1].substring(1).toLowerCase(); ArrayList<OReport> reports = CReport.findByIGN(oldIGN, event.getGuild()); for (OReport rep : reports){ rep.IGN = newIGN; CReport.update(rep, event.getGuild()); } ArrayList<OReport> report = CReport.findByIGN(newIGN, event.getGuild()); EmbedBuilder embed = new EmbedBuilder(); embed.setColor(new Color(0x3498db)); embed.addField("Players to Watch - " + newIGN.replace("_", "\\_"), getContent(report, event) + "\nNumber of Reports: `" + getNumber(report) + "`", false); event.getChannel().sendMessage(embed.build()).queue(message -> { long MessageID = report.get(0).MessageID; event.getChannel().deleteMessageById(MessageID).queue(m -> { }, throwable -> { }); for (OReport rep : report) { rep.MessageID = message.getIdLong(); CReport.update(rep, event.getGuild()); } }); } catch (Throwable e) { EmbedBuilder error = new EmbedBuilder(); error.setColor(new Color(0xff0000)); error.addField("Missing Arguments", "Correct Usage: `" + Info.PREFIX + "changereport [OldIGN] [NewIGN]`", false); error.setFooter("Command ran by " + event.getMember().getUser().getAsTag(), event.getMember().getUser().getAvatarUrl()); event.getChannel().sendMessage(error.build()).queue(msg -> msg.delete().queueAfter(5, TimeUnit.SECONDS)); } } else { EmbedBuilder error = new EmbedBuilder(); error.setColor(new Color(0xff0000)); error.addField("No Permission", "You do not have permission to run this command.", false); error.setFooter("Command ran by " + event.getMember().getUser().getAsTag(), event.getMember().getUser().getAvatarUrl()); event.getChannel().sendMessage(error.build()).queue(msg -> msg.delete().queueAfter(5, TimeUnit.SECONDS)); } return true; } }
[ "unconfigured@null.spigotmc.org" ]
unconfigured@null.spigotmc.org
7de0ed68f5c08213c2c7f9321faf1b403b051c09
852164c49a8b1a8eded7db8624bf4fccb24ef35f
/mbse.project.tests/src/mbse/project/YAWLnets/tests/JoinTypeTest.java
97308aee12ae44e5a0b65574c050b5fc0f77b0ee
[]
no_license
jeffyjahfar/mbse_yawlSimulator
e5ce5e2084312403dd1cbe6b8ca5d86c19f4d242
b8ff2d6cbb100a7273d1d9bb574b6599193c3e86
refs/heads/master
2022-04-22T20:13:31.416641
2020-04-27T03:31:28
2020-04-27T03:31:28
259,193,030
0
0
null
null
null
null
UTF-8
Java
false
false
1,761
java
/** */ package mbse.project.YAWLnets.tests; import junit.framework.TestCase; import junit.textui.TestRunner; import mbse.project.YAWLnets.JoinType; import mbse.project.YAWLnets.YAWLnetsFactory; /** * <!-- begin-user-doc --> * A test case for the model object '<em><b>Join Type</b></em>'. * <!-- end-user-doc --> * @generated */ public class JoinTypeTest extends TestCase { /** * The fixture for this Join Type test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected JoinType fixture = null; /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public static void main(String[] args) { TestRunner.run(JoinTypeTest.class); } /** * Constructs a new Join Type test case with the given name. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ public JoinTypeTest(String name) { super(name); } /** * Sets the fixture for this Join Type test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected void setFixture(JoinType fixture) { this.fixture = fixture; } /** * Returns the fixture for this Join Type test case. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ protected JoinType getFixture() { return fixture; } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#setUp() * @generated */ @Override protected void setUp() throws Exception { setFixture(YAWLnetsFactory.eINSTANCE.createJoinType()); } /** * <!-- begin-user-doc --> * <!-- end-user-doc --> * @see junit.framework.TestCase#tearDown() * @generated */ @Override protected void tearDown() throws Exception { setFixture(null); } } //JoinTypeTest
[ "jeffyjahfar@gmail.com" ]
jeffyjahfar@gmail.com
d8cabd39fa2e78dfb2afa27159d0c144adec9c94
471cd06a249f543a14ef415445b176eb76714650
/mcp/temp/src/minecraft/net/minecraft/entity/ai/EntityAITarget.java
1e234008b1c3bdf959dd0eeb67b560272a93cae0
[ "BSD-3-Clause" ]
permissive
Fredster777/ExploreCraft
ec3102d0dd86b1e9683c30ee7b181e8d0d04e063
db163ca7b40b1fd834d180c17cb8476c551a5540
refs/heads/master
2020-06-06T12:22:18.903600
2014-03-29T14:48:38
2014-03-29T14:48:38
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,917
java
package net.minecraft.entity.ai; import net.minecraft.entity.EntityCreature; import net.minecraft.entity.EntityLivingBase; import net.minecraft.entity.EntityOwnable; import net.minecraft.entity.SharedMonsterAttributes; import net.minecraft.entity.ai.EntityAIBase; import net.minecraft.entity.ai.attributes.AttributeInstance; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.pathfinding.PathEntity; import net.minecraft.pathfinding.PathPoint; import net.minecraft.util.MathHelper; import org.apache.commons.lang3.StringUtils; public abstract class EntityAITarget extends EntityAIBase { protected EntityCreature field_75299_d; protected boolean field_75297_f; private boolean field_75303_a; private int field_75301_b; private int field_75302_c; private int field_75298_g; public EntityAITarget(EntityCreature p_i1669_1_, boolean p_i1669_2_) { this(p_i1669_1_, p_i1669_2_, false); } public EntityAITarget(EntityCreature p_i1670_1_, boolean p_i1670_2_, boolean p_i1670_3_) { this.field_75299_d = p_i1670_1_; this.field_75297_f = p_i1670_2_; this.field_75303_a = p_i1670_3_; } public boolean func_75253_b() { EntityLivingBase var1 = this.field_75299_d.func_70638_az(); if(var1 == null) { return false; } else if(!var1.func_70089_S()) { return false; } else { double var2 = this.func_111175_f(); if(this.field_75299_d.func_70068_e(var1) > var2 * var2) { return false; } else { if(this.field_75297_f) { if(this.field_75299_d.func_70635_at().func_75522_a(var1)) { this.field_75298_g = 0; } else if(++this.field_75298_g > 60) { return false; } } return true; } } } protected double func_111175_f() { AttributeInstance var1 = this.field_75299_d.func_110148_a(SharedMonsterAttributes.field_111265_b); return var1 == null?16.0D:var1.func_111126_e(); } public void func_75249_e() { this.field_75301_b = 0; this.field_75302_c = 0; this.field_75298_g = 0; } public void func_75251_c() { this.field_75299_d.func_70624_b((EntityLivingBase)null); } protected boolean func_75296_a(EntityLivingBase p_75296_1_, boolean p_75296_2_) { if(p_75296_1_ == null) { return false; } else if(p_75296_1_ == this.field_75299_d) { return false; } else if(!p_75296_1_.func_70089_S()) { return false; } else if(!this.field_75299_d.func_70686_a(p_75296_1_.getClass())) { return false; } else { if(this.field_75299_d instanceof EntityOwnable && StringUtils.isNotEmpty(((EntityOwnable)this.field_75299_d).func_70905_p())) { if(p_75296_1_ instanceof EntityOwnable && ((EntityOwnable)this.field_75299_d).func_70905_p().equals(((EntityOwnable)p_75296_1_).func_70905_p())) { return false; } if(p_75296_1_ == ((EntityOwnable)this.field_75299_d).func_70902_q()) { return false; } } else if(p_75296_1_ instanceof EntityPlayer && !p_75296_2_ && ((EntityPlayer)p_75296_1_).field_71075_bZ.field_75102_a) { return false; } if(!this.field_75299_d.func_110176_b(MathHelper.func_76128_c(p_75296_1_.field_70165_t), MathHelper.func_76128_c(p_75296_1_.field_70163_u), MathHelper.func_76128_c(p_75296_1_.field_70161_v))) { return false; } else if(this.field_75297_f && !this.field_75299_d.func_70635_at().func_75522_a(p_75296_1_)) { return false; } else { if(this.field_75303_a) { if(--this.field_75302_c <= 0) { this.field_75301_b = 0; } if(this.field_75301_b == 0) { this.field_75301_b = this.func_75295_a(p_75296_1_)?1:2; } if(this.field_75301_b == 2) { return false; } } return true; } } } private boolean func_75295_a(EntityLivingBase p_75295_1_) { this.field_75302_c = 10 + this.field_75299_d.func_70681_au().nextInt(5); PathEntity var2 = this.field_75299_d.func_70661_as().func_75494_a(p_75295_1_); if(var2 == null) { return false; } else { PathPoint var3 = var2.func_75870_c(); if(var3 == null) { return false; } else { int var4 = var3.field_75839_a - MathHelper.func_76128_c(p_75295_1_.field_70165_t); int var5 = var3.field_75838_c - MathHelper.func_76128_c(p_75295_1_.field_70161_v); return (double)(var4 * var4 + var5 * var5) <= 2.25D; } } } }
[ "freddie.guthrie@googlemail.com" ]
freddie.guthrie@googlemail.com
0305a6a2415837d9db4fbffee944dd2d2d54cc2a
691cf1badbf2b4d63522cf414466e36e5a4d867c
/src/main/java/mortar/api/tome/TomeHeader.java
3f7a9937ab7292ac373acba8aec83373e653cb0c
[]
no_license
VolmitSoftware/Mortar
90bdd9313a912af48e76048148e99cbf2994167b
87dd2abbdaf4449994b7098cd5fb21fec2f1552c
refs/heads/master
2023-06-26T10:09:13.664319
2022-11-23T11:00:18
2022-11-23T11:00:18
172,641,325
3
7
null
2023-06-13T23:56:14
2019-02-26T05:02:53
Java
UTF-8
Java
false
false
271
java
package mortar.api.tome; import org.dom4j.Element; public class TomeHeader extends TomeParagraph { @Override public void construct(Element parent) { Element p = parent.addElement("header"); for(TomeComponent i : getComponents()) { i.construct(p); } } }
[ "danielmillst@gmail.com" ]
danielmillst@gmail.com
0815dafe59731da21b4b896e10bfc0c083cc52b7
5f11cd3f0d7c85d2676d8ca4bf97940abd6d9849
/src/sino/com/quanta/sino/yygl/dao/api/ISczsDAO.java
34207dd0612da02eb667c2c6b38c0bf317ad123d
[]
no_license
112067416/Sino
e479c945914875243f8b7de10c8826a3f2cff7bf
167b85c81911ea6954b5d2698832f6ad1f412d8d
refs/heads/master
2020-04-22T02:21:40.768749
2015-05-06T06:41:45
2015-05-06T06:41:45
35,143,663
1
0
null
null
null
null
UTF-8
Java
false
false
1,510
java
/** * */ package com.quanta.sino.yygl.dao.api; import java.io.Serializable; import java.util.List; import com.coco.core.persistence.query.QEntity; import com.quanta.sino.orm.SczsTp; /** * <p> * ็”ŸไบงๆŒ‡็คบๅ•ๆ•ฐๆฎ่ฎฟ้—ฎๆŽฅๅฃ * </p> * <p> * create: 2011-2-2 ไธŠๅˆ10:49:49 * </p> * * @author ๅผ ่‰ฏ[jimsonhappy@126.com] * @version 1.0 */ public interface ISczsDAO { /** * <p> * ๆ–ฐๅขž็”ŸไบงๆŒ‡็คบ * </p> * * @param entity */ public void save(SczsTp entity); /** * <p> * </p> * * @param entities */ public void saveAll(List<SczsTp> entities); /** * <p> * ๆ›ดๆ–ฐ็”ŸไบงๆŒ‡็คบ * </p> * * @param entity */ public void update(SczsTp entity); /** * <p> * ๆ นๆฎไธญๆ–‡ไปถ็ผ–ๅทๅˆ ้™คๅฏนๅบ”็š„ไฟกๆฏ * </p> * * @param id */ public void delete(Serializable id); /** * ๆ‰น้‡ๅˆ ้™ค * * @param ids */ public void delete(List<String> ids); /** * <p> * ๆŸฅ่ฏข็”ŸไบงๆŒ‡็คบ * </p> * * @param qentity */ public void query(QEntity<SczsTp> qentity); /** * <p> * ่Žทๅ–็”ŸไบงๆŒ‡็คบ * </p> * * @param id * @return SczsTp */ public SczsTp get(Serializable id); /** * <p> * </p> * * @param ids * @return */ public List<SczsTp> find(List<String> ids); /** * <p> * ไฟฎๆ”น็Šถๆ€ * </p> * * @param stat * @param ids */ public void updateStat(String stat, String[] ids); }
[ "112067416@qq.com" ]
112067416@qq.com
7638e806887a506432e0ca121850bccf37e7e181
5cdadec6e9fd06a02b4a263fb93d9163ed2ea5ee
/todolist-core/src/main/java/io/github/todolist/core/domain/User.java
ced16abccd3904c1c7e0407c3e41bdb22c481c58
[ "MIT" ]
permissive
kssraju/todolist-mvc
183618c6ccef7924fac37518bd57f42dfcb6931b
32a2cc2a268b47c746792533b3014e0951beb8de
refs/heads/master
2021-01-16T19:02:21.141137
2013-12-23T13:07:11
2013-12-23T13:07:11
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,047
java
/* * The MIT License * * Copyright (c) 2013, benas (md.benhassine@gmail.com) * * 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 io.github.todolist.core.domain; import javax.persistence.*; import java.io.Serializable; /** * User entity. * @author benas (md.benhassine@gmail.com) */ @Entity @NamedQueries({ @NamedQuery(name = "findUserByEmail", query = "SELECT u FROM User u where u.email = :p_email"), @NamedQuery(name = "findUserByEmailAndPassword", query = "SELECT u FROM User u where u.email = :p_email and u.password = :p_password") }) public class User implements Serializable { @Id @GeneratedValue private Long id; private String firstname; private String lastname; private String email; private String password; public User() { } public User(String firstname, String lastname, String email, String password) { this.firstname = firstname; this.lastname = lastname; this.email = email; this.password = password; } public Long getId() { return id; } public String getFirstname() { return firstname; } public void setFirstname(String firstname) { this.firstname = firstname; } public String getLastname() { return lastname; } public void setLastname(String lastname) { this.lastname = lastname; } public String getEmail() { return email; } public void setEmail(String email) { this.email = email; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } @Override public String toString() { return "User[" + "id=" + id + ", firstname='" + firstname + '\'' + ", lastname='" + lastname + '\'' + ", email='" + email + '\'' + ", password='" + password + '\'' + ']'; } }
[ "md.benhassine@gmail.com" ]
md.benhassine@gmail.com
50cfcf73dd5671d3ad6b834a92497dafb059d561
772a025799e211aedef313002e906dd21951de0a
/febs-quartz/src/main/java/cc/mrbird/quartz/domain/Job.java
f36eff452e2ba1b484121f7ef7385c1b55bb084c
[ "Apache-2.0" ]
permissive
everhopingandwaiting/FEBS-Security
6f3cb4dea3390f7b7d6509084b694118859ba85b
2cc75c1eb265c7241b2832e58653fcfe67baeb93
refs/heads/master
2023-06-23T10:35:03.204069
2018-09-20T07:16:20
2018-09-20T07:16:20
149,702,562
2
0
null
2023-06-14T22:20:54
2018-09-21T03:06:26
Java
UTF-8
Java
false
false
4,411
java
package cc.mrbird.quartz.domain; import cc.mrbird.common.annotation.ExportConfig; import com.google.common.base.MoreObjects; import javax.persistence.Column; import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import java.io.Serializable; import java.util.Date; @Table(name = "t_job") public class Job implements Serializable { private static final long serialVersionUID = 400066840871805700L; /** * ไปปๅŠก่ฐƒๅบฆๅ‚ๆ•ฐkey */ public static final String JOB_PARAM_KEY = "JOB_PARAM_KEY"; public enum ScheduleStatus { /** * ๆญฃๅธธ */ NORMAL("0"), /** * ๆš‚ๅœ */ PAUSE("1"); private String value; private ScheduleStatus(String value) { this.value = value; } public String getValue() { return value; } } @Id @GeneratedValue(generator = "JDBC") @Column(name = "JOB_ID") @ExportConfig(value = "ไปปๅŠกID") private Long jobId; @Column(name = "BEAN_NAME") @ExportConfig(value = "Beanๅ็งฐ") private String beanName; @Column(name = "METHOD_NAME") @ExportConfig(value = "ๆ–นๆณ•ๅ็งฐ") private String methodName; @Column(name = "PARAMS") @ExportConfig(value = "ๅ‚ๆ•ฐ") private String params; @Column(name = "CRON_EXPRESSION") @ExportConfig(value = "cron่กจ่พพๅผ") private String cronExpression; @Column(name = "STATUS") @ExportConfig(value = "็Šถๆ€", convert = "s:0=ๆญฃๅธธ,1=ๆš‚ๅœ") private String status; @Column(name = "REMARK") @ExportConfig(value = "ๅค‡ๆณจ") private String remark; @Column(name = "CREATE_TIME") @ExportConfig(value = "ๅˆ›ๅปบๆ—ถ้—ด", convert = "c:cc.mrbird.common.util.poi.convert.TimeConvert") private Date createTime; /** * @return JOB_ID */ public Long getJobId() { return jobId; } /** * @param jobId */ public void setJobId(Long jobId) { this.jobId = jobId; } /** * @return BEAN_NAME */ public String getBeanName() { return beanName; } /** * @param beanName */ public void setBeanName(String beanName) { this.beanName = beanName == null ? null : beanName.trim(); } /** * @return METHOD_NAME */ public String getMethodName() { return methodName; } /** * @param methodName */ public void setMethodName(String methodName) { this.methodName = methodName == null ? null : methodName.trim(); } /** * @return PARAMS */ public String getParams() { return params; } /** * @param params */ public void setParams(String params) { this.params = params == null ? null : params.trim(); } /** * @return CRON_EXPRESSION */ public String getCronExpression() { return cronExpression; } /** * @param cronExpression */ public void setCronExpression(String cronExpression) { this.cronExpression = cronExpression == null ? null : cronExpression.trim(); } /** * @return STATUS */ public String getStatus() { return status; } /** * @param status */ public void setStatus(String status) { this.status = status == null ? null : status.trim(); } /** * @return REMARK */ public String getRemark() { return remark; } /** * @param remark */ public void setRemark(String remark) { this.remark = remark == null ? null : remark.trim(); } /** * @return CREATE_TIME */ public Date getCreateTime() { return createTime; } /** * @param createTime */ public void setCreateTime(Date createTime) { this.createTime = createTime; } @Override public String toString() { return MoreObjects.toStringHelper(this) .add("jobId", jobId) .add("beanName", beanName) .add("methodName", methodName) .add("params", params) .add("cronExpression", cronExpression) .add("status", status) .add("remark", remark) .add("createTime", createTime) .toString(); } }
[ "852252810@qq.com" ]
852252810@qq.com
35db1c48ae59b7f88e9f1cadd82d6bbb568477be
58b1fb9090c4938a7eb6b8cbd1aed88794a78a50
/org.afplib.afptext/src-gen/org/afplib/afpText/ESG.java
d336633bfa9f8bc5bf657e2e62933039b5b70c93
[ "Apache-2.0" ]
permissive
yan74/afptext
7750310189759d7ede7393e0bbdd726e3b81914a
2d0a89be3d3dd1de981e522c2c6791d789894475
refs/heads/master
2020-07-28T09:04:05.789849
2019-09-22T09:36:22
2019-09-22T09:36:22
209,372,642
0
0
null
null
null
null
UTF-8
Java
false
false
1,273
java
/** * generated by Xtext 2.19.0 */ package org.afplib.afpText; /** * <!-- begin-user-doc --> * A representation of the model object '<em><b>ESG</b></em>'. * <!-- end-user-doc --> * * <p> * The following features are supported: * </p> * <ul> * <li>{@link org.afplib.afpText.ESG#getREGName <em>REG Name</em>}</li> * </ul> * * @see org.afplib.afpText.AfpTextPackage#getESG() * @model * @generated */ public interface ESG extends structuredField { /** * Returns the value of the '<em><b>REG Name</b></em>' attribute. * <!-- begin-user-doc --> * <p> * If the meaning of the '<em>REG Name</em>' attribute isn't clear, * there really should be more of a description here... * </p> * <!-- end-user-doc --> * @return the value of the '<em>REG Name</em>' attribute. * @see #setREGName(String) * @see org.afplib.afpText.AfpTextPackage#getESG_REGName() * @model * @generated */ String getREGName(); /** * Sets the value of the '{@link org.afplib.afpText.ESG#getREGName <em>REG Name</em>}' attribute. * <!-- begin-user-doc --> * <!-- end-user-doc --> * @param value the new value of the '<em>REG Name</em>' attribute. * @see #getREGName() * @generated */ void setREGName(String value); } // ESG
[ "yan@hcsystems.de" ]
yan@hcsystems.de
fd98b754900615a8e09bce5ff31a8b3c814b7d02
f145e05f3f8c2f59d1e81da9f9a7189157f5bc56
/src/main/java/net/k40s/DatabaseHandler.java
8c5121ce21ae6f3871aa2a995ad4f6b841622c7e
[]
no_license
lfuelling/music
d2625216bee2295cf96ada713f75c04ae981132f
119777b788c5c5d010df29202eaa4b84a4732760
refs/heads/master
2020-04-05T22:53:29.273379
2015-02-06T07:03:21
2015-02-06T07:03:21
28,870,144
0
1
null
2015-02-06T07:03:21
2015-01-06T15:46:45
Java
UTF-8
Java
false
false
1,341
java
package net.k40s; import java.sql.Connection; import java.sql.DriverManager; import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class DatabaseHandler { private Connection connect = null; private String dbUsername = Storage.getDbUsername(); private String dbPassword = Storage.getDbPassword(); private String dbName = Storage.getDbName(); private String connectionURI = "jdbc:mysql://localhost/" + dbName + "?" + "user=" + dbUsername + "&password=" + dbPassword; public ResultSet executeQuery(String query) throws Exception { Class.forName("com.mysql.jdbc.Driver"); connect = DriverManager .getConnection(connectionURI); Statement statement = connect.createStatement(); ResultSet resultSet = statement.executeQuery(query); return resultSet; } public void executeStatement(String statement) throws SQLException, ClassNotFoundException { // This will load the MySQL driver, each DB has its own driver Class.forName("com.mysql.jdbc.Driver"); connect = DriverManager.getConnection(connectionURI); PreparedStatement preparedStmt = connect.prepareStatement(statement); preparedStmt.execute(); connect.close(); } }
[ "lukas@k40s.net" ]
lukas@k40s.net
541f25306be27f3bcce9f3a9c8af3bd1d98024c2
097df92ce1bfc8a354680725c7d10f0d109b5b7d
/com/amazon/ws/emr/hadoop/fs/shaded/com/amazonaws/services/kms/model/transform/AliasListEntryJsonUnmarshaller.java
cc93124b519e9cb42910a19ffc501f076169128f
[]
no_license
cozos/emrfs-hadoop
7a1a1221ffc3aa8c25b1067cf07d3b46e39ab47f
ba5dfa631029cb5baac2f2972d2fdaca18dac422
refs/heads/master
2022-10-14T15:03:51.500050
2022-10-06T05:38:49
2022-10-06T05:38:49
233,979,996
2
2
null
2022-10-06T05:41:46
2020-01-15T02:24:16
Java
UTF-8
Java
false
false
2,691
java
package com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.kms.model.transform; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.kms.model.AliasListEntry; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.transform.JsonUnmarshallerContext; import com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.transform.Unmarshaller; import com.amazon.ws.emr.hadoop.fs.shaded.com.fasterxml.jackson.core.JsonToken; public class AliasListEntryJsonUnmarshaller implements Unmarshaller<AliasListEntry, JsonUnmarshallerContext> { private static AliasListEntryJsonUnmarshaller instance; public AliasListEntry unmarshall(JsonUnmarshallerContext context) throws Exception { AliasListEntry aliasListEntry = new AliasListEntry(); int originalDepth = context.getCurrentDepth(); String currentParentElement = context.getCurrentParentElement(); int targetDepth = originalDepth + 1; JsonToken token = context.getCurrentToken(); if (token == null) { token = context.nextToken(); } if (token == JsonToken.VALUE_NULL) { return null; } while (token != null) { if ((token == JsonToken.FIELD_NAME) || (token == JsonToken.START_OBJECT)) { if (context.testExpression("AliasName", targetDepth)) { context.nextToken(); aliasListEntry.setAliasName((String)context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("AliasArn", targetDepth)) { context.nextToken(); aliasListEntry.setAliasArn((String)context.getUnmarshaller(String.class).unmarshall(context)); } if (context.testExpression("TargetKeyId", targetDepth)) { context.nextToken(); aliasListEntry.setTargetKeyId((String)context.getUnmarshaller(String.class).unmarshall(context)); } } else { if (((token == JsonToken.END_ARRAY) || (token == JsonToken.END_OBJECT)) && ((context.getLastParsedParentElement() == null) || (context.getLastParsedParentElement().equals(currentParentElement))) && (context.getCurrentDepth() <= originalDepth)) { break; } } token = context.nextToken(); } return aliasListEntry; } public static AliasListEntryJsonUnmarshaller getInstance() { if (instance == null) { instance = new AliasListEntryJsonUnmarshaller(); } return instance; } } /* Location: * Qualified Name: com.amazon.ws.emr.hadoop.fs.shaded.com.amazonaws.services.kms.model.transform.AliasListEntryJsonUnmarshaller * Java Class Version: 6 (50.0) * JD-Core Version: 0.7.1 */
[ "Arwin.tio@adroll.com" ]
Arwin.tio@adroll.com
855b92f2af7d318790bdcc96192ca9167a822463
53d677a55e4ece8883526738f1c9d00fa6560ff7
/com/tencent/mm/plugin/wallet_index/c/g.java
8f33bc400d91caabbd214a8d208b249a80860dc1
[]
no_license
0jinxing/wechat-apk-source
544c2d79bfc10261eb36389c1edfdf553d8f312a
f75eefd87e9b9ecf2f76fc6d48dbba8e24afcf3d
refs/heads/master
2020-06-07T20:06:03.580028
2019-06-21T09:17:26
2019-06-21T09:17:26
193,069,132
9
4
null
null
null
null
UTF-8
Java
false
false
2,823
java
package com.tencent.mm.plugin.wallet_index.c; import com.tencent.matrix.trace.core.AppMethodBeat; import com.tencent.mm.ai.b; import com.tencent.mm.ai.b.a; import com.tencent.mm.ai.b.b; import com.tencent.mm.ai.f; import com.tencent.mm.network.q; import com.tencent.mm.opensdk.modelpay.PayReq; import com.tencent.mm.plugin.wallet_core.model.k; import com.tencent.mm.protocal.protobuf.bin; import com.tencent.mm.protocal.protobuf.bio; import com.tencent.mm.sdk.platformtools.ab; import com.tencent.mm.wallet_core.c.i; import com.tencent.mm.wallet_core.c.u; public class g extends u implements i { public b ehh; private f ehi; public g(PayReq paramPayReq, String paramString1, String paramString2, String paramString3, String paramString4) { AppMethodBeat.i(48187); Object localObject = new b.a(); ((b.a)localObject).fsJ = new bin(); ((b.a)localObject).fsK = new bio(); ((b.a)localObject).uri = getUri(); ((b.a)localObject).fsI = getType(); ((b.a)localObject).fsL = 188; ((b.a)localObject).fsM = 1000000188; ((b.a)localObject).fsO = com.tencent.mm.wallet_core.ui.e.atB(paramPayReq.prepayId); this.ehh = ((b.a)localObject).acD(); localObject = (bin)this.ehh.fsG.fsP; ((bin)localObject).fKh = paramPayReq.appId; ((bin)localObject).wLU = paramPayReq.partnerId; ((bin)localObject).wlb = paramPayReq.prepayId; ((bin)localObject).vYO = paramPayReq.nonceStr; ((bin)localObject).wLV = paramPayReq.timeStamp; ((bin)localObject).vYP = paramPayReq.packageValue; ((bin)localObject).vYQ = paramPayReq.sign; ((bin)localObject).vYR = paramPayReq.signType; ((bin)localObject).wLW = paramString1; ((bin)localObject).mZu = paramString2; ((bin)localObject).ncH = paramString3; ((bin)localObject).vRP = k.cPy(); ((bin)localObject).wLY = paramString4; AppMethodBeat.o(48187); } public final int a(com.tencent.mm.network.e parame, f paramf) { AppMethodBeat.i(48188); this.ehi = paramf; int i = a(parame, this.ehh, this); AppMethodBeat.o(48188); return i; } public final void e(int paramInt1, int paramInt2, String paramString, q paramq) { AppMethodBeat.i(48189); ab.d("MicroMsg.NetScenePayAuthApp", "errType:" + paramInt1 + ",errCode:" + paramInt2 + ",errMsg" + paramString); this.ehi.onSceneEnd(paramInt1, paramInt2, paramString, this); AppMethodBeat.o(48189); } public int getType() { return 397; } public String getUri() { return "/cgi-bin/mmpay-bin/payauthapp"; } } /* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes8-dex2jar.jar * Qualified Name: com.tencent.mm.plugin.wallet_index.c.g * JD-Core Version: 0.6.2 */
[ "172601673@qq.com" ]
172601673@qq.com
d379526aac6c11e8c2a5c29f264ab4b5f6baeac7
421f0a75a6b62c5af62f89595be61f406328113b
/generated_tests/no_seeding/8_gfarcegestionfa-fr.unice.gfarce.interGraph.ChoixDB4O-1.0-10/fr/unice/gfarce/interGraph/ChoixDB4O_ESTest.java
a06729ede5100662312370e9dc00b85661f4fd7a
[]
no_license
tigerqiu712/evosuite-model-seeding-empirical-evaluation
c78c4b775e5c074aaa5e6ca56bc394ec03c2c7c6
11a920b8213d9855082d3946233731c843baf7bc
refs/heads/master
2020-12-23T21:04:12.152289
2019-10-30T08:02:29
2019-10-30T08:02:29
null
0
0
null
null
null
null
UTF-8
Java
false
false
650
java
/* * This file was automatically generated by EvoSuite * Mon Oct 28 23:41:42 GMT 2019 */ package fr.unice.gfarce.interGraph; 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(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true, useJEE = true) public class ChoixDB4O_ESTest extends ChoixDB4O_ESTest_scaffolding { @Test public void notGeneratedAnyTest() { // EvoSuite did not generate any tests } }
[ "pderakhshanfar@bsr01.win.tue.nl" ]
pderakhshanfar@bsr01.win.tue.nl
6f6a451d548b7a63ba0d8f201f4157039056c059
5b8337c39cea735e3817ee6f6e6e4a0115c7487c
/sources/com/google/android/exoplayer2/upstream/cache/CacheDataSinkFactory.java
f9751ed3e925dc965bbf082bbd539cd7aacdac30
[]
no_license
karthik990/G_Farm_Application
0a096d334b33800e7d8b4b4c850c45b8b005ccb1
53d1cc82199f23517af599f5329aa4289067f4aa
refs/heads/master
2022-12-05T06:48:10.513509
2020-08-10T14:46:48
2020-08-10T14:46:48
286,496,946
1
0
null
null
null
null
UTF-8
Java
false
false
751
java
package com.google.android.exoplayer2.upstream.cache; import com.google.android.exoplayer2.upstream.DataSink; import com.google.android.exoplayer2.upstream.DataSink.Factory; public final class CacheDataSinkFactory implements Factory { private final int bufferSize; private final Cache cache; private final long fragmentSize; public CacheDataSinkFactory(Cache cache2, long j) { this(cache2, j, CacheDataSink.DEFAULT_BUFFER_SIZE); } public CacheDataSinkFactory(Cache cache2, long j, int i) { this.cache = cache2; this.fragmentSize = j; this.bufferSize = i; } public DataSink createDataSink() { return new CacheDataSink(this.cache, this.fragmentSize, this.bufferSize); } }
[ "knag88@gmail.com" ]
knag88@gmail.com
50c8f0177b29a13440d135ba605bbc469b96ef80
6cd22ce8aadd4d58af83db29c15946baf1ffebf8
/src/main/java/com/shubham/dataStructures/ddArray/NQueens.java
6f9609e7335a19f529b20c6e42d85193eb400b9e
[]
no_license
shubhm-agrwl/dataStructures-algorithms
b095ab3a297f565c27fdb12af5d8c468384ef09d
726631159746d79a54e72a19c8cccd49e64fc821
refs/heads/master
2021-06-23T09:28:51.828025
2021-06-15T23:04:53
2021-06-15T23:04:53
225,211,919
1
0
null
2020-10-13T17:53:17
2019-12-01T18:53:23
Java
UTF-8
Java
false
false
2,117
java
package com.shubham.dataStructures.ddArray; import java.util.ArrayList; import java.util.List; public class NQueens { int rows[]; // "hill" diagonals int hills[]; // "dale" diagonals int dales[]; int n; // output List<List<String>> output = new ArrayList(); // queens positions int queens[]; public boolean isNotUnderAttack(int row, int col) { int res = rows[col] + hills[row - col + 2 * n] + dales[row + col]; return (res == 0) ? true : false; } public void placeQueen(int row, int col) { queens[row] = col; rows[col] = 1; hills[row - col + 2 * n] = 1; // "hill" diagonals dales[row + col] = 1; //"dale" diagonals } public void removeQueen(int row, int col) { queens[row] = 0; rows[col] = 0; hills[row - col + 2 * n] = 0; dales[row + col] = 0; } public void addSolution() { List<String> solution = new ArrayList<String>(); for (int i = 0; i < n; ++i) { int col = queens[i]; StringBuilder sb = new StringBuilder(); for (int j = 0; j < col; ++j) { sb.append("."); } sb.append("Q"); for (int j = 0; j < n - col - 1; ++j) { sb.append("."); } solution.add(sb.toString()); } output.add(solution); } public void backtrack(int row) { for (int col = 0; col < n; col++) { if (isNotUnderAttack(row, col)) { placeQueen(row, col); // if n queens are already placed if (row + 1 == n) { addSolution(); } // if not proceed to place the rest else { backtrack(row + 1); } // backtrack removeQueen(row, col); } } } public List<List<String>> solveNQueens(int n) { this.n = n; rows = new int[n]; hills = new int[4 * n - 1]; dales = new int[2 * n - 1]; queens = new int[n]; backtrack(0); return output; } public int totalNQueens(int n) { this.n = n; rows = new int[n]; hills = new int[4 * n - 1]; dales = new int[2 * n - 1]; queens = new int[n]; backtrack(0); return output.size(); } }
[ "agrawalshubham1103@gmail.com" ]
agrawalshubham1103@gmail.com
fe37b3b7d692ea563aa2b0daacbef83f13943635
687aa03dcd89ad493e69a610e52fbb37c002e440
/app/src/main/java/com/xzy/forestSystem/gogisapi/IOData/DXF/pojo/Writer.java
e05ab9c9c1848965f1616c2d2a5d8b3d62825943
[]
no_license
liner0211/STFby-Android
b1fc4412b01394f6cd2e6f8905fc8acd6507435c
f7b0f448263a4d5bac5c2dcd4dc9b9a0b1628cfc
refs/heads/master
2023-05-06T02:41:19.719147
2021-05-31T07:12:06
2021-05-31T07:12:06
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,235
java
package com.xzy.forestSystem.gogisapi.IOData.DXF.pojo; import java.io.IOException; import java.io.OutputStream; import java.io.OutputStreamWriter; public class Writer { public static void Write(Document d, OutputStream s) throws IOException { OutputStreamWriter sr = new OutputStreamWriter(s); WriteHeader(d.header, sr); WriteTables(d.tables, sr); WriteBlocks(d.blocks, sr); WriteEntities(d.entities, sr); WriteData(new Data(0, "EOF"), sr); sr.close(); } private static void WriteHeader(Header h, OutputStreamWriter sr) throws IOException { if (h != null) { WriteElement(h, sr); } } private static void WriteEntities(Entities e, OutputStreamWriter sr) throws IOException { if (e != null) { WriteElement(e, sr); } } private static void WriteBlocks(Blocks b, OutputStreamWriter sr) throws IOException { if (b != null) { WriteElement(b, sr); } } private static void WriteTables(Tables t, OutputStreamWriter sr) throws IOException { if (t != null) { WriteElement(t, sr); } } private static void WriteElement(Element e, OutputStreamWriter sr) throws IOException { if (e != null) { if (e.f500s != null) { sr.write(e.f500s); return; } WriteData(e.startTag, sr); for (int i = 0; i < e.DataCount(); i++) { WriteData(e.GetData(i), sr); } for (int i2 = 0; i2 < e.ElementCount(); i2++) { WriteElement(e.GetElement(i2), sr); } WriteData(e.endTag, sr); } } private static void WriteData(Data d, OutputStreamWriter sr) throws IOException { if (d.code != -10) { sr.write(new StringBuilder(String.valueOf(d.code)).toString()); sr.write("\n"); if (d.data instanceof String) { sr.write(((String) d.data).toString()); } else { sr.write(new StringBuilder(String.valueOf(d.data.toString())).toString()); } sr.write("\n"); } } }
[ "czhgithub.com" ]
czhgithub.com
9fb3f6fb4e53ce0516a5858204b2058e7ed901b7
4c151980ad335b90398454988f2cdee9d46ab30f
/src/com/bracketbird/client/pages/matches/FinalGroupStageRanker.java
0cf4543e335303b316af058167a7534c6fe170c2
[]
no_license
MartinKierkegaard/Bracketbird
42d1a4a48656a30c4b98712778f52217f3ac397d
81c9c9748c09c767c8b888dc51942b59836f0759
refs/heads/master
2021-01-15T08:05:28.405809
2015-01-04T20:15:01
2015-01-04T20:15:01
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,583
java
package com.bracketbird.client.pages.matches; import com.bracketbird.client.model.Team; import com.bracketbird.client.model.tournament.*; import java.util.ArrayList; import java.util.List; public class FinalGroupStageRanker { //TODO - THIS IS CRAPPY - rewrite private List<Position> positions; public FinalGroupStageRanker(GroupStage stage) { this.positions = getFinalPositions(stage); } public boolean allTeamsHasUniquePositions(){ for (Position position : positions) { if(position.hasMoreTeams()){ return true; } } return false; } private List<Position> getFinalPositions(GroupStage stage) { List<Match> matches = stage.getMatches(); List<Position> positions = new ArrayList<Position>(); //homogenic = all groups have same number of teams. //those teams that make it inhomogenic List<Team> restTeams = new ArrayList<Team>(); int minTeams = Integer.MAX_VALUE; int maxTeams = 0; for (Group aGroup : stage.getGroups()) { int teamsCount = aGroup.getTeams().size(); if (teamsCount < minTeams) { minTeams = teamsCount; } if (teamsCount > maxTeams) { maxTeams = teamsCount; } } boolean isHomogen = (minTeams == maxTeams); //if not homogen - then collect the restteams if (!isHomogen) { for (Group g : stage.getGroups()) { if (g.getEndingTeams().size() == maxTeams) { restTeams.add(g.getEndingTeams().get(maxTeams - 1));//gets the last one } } } int count = 0; while (count < minTeams) { List<Team> verticalList = new ArrayList<Team>(); //each number one and each number two etc. is collected in verticalList. for (Group g: stage.getGroups()) { verticalList.add(g.getEndingTeams().get(count)); } RankingSheet rs = new RankingSheet(matches, verticalList, restTeams, stage.getSettings()); positions.addAll(rs.getPositions()); count++; } //adding the rest teams if (!isHomogen) { RankingSheet rs = new RankingSheet(matches, restTeams, new ArrayList<Team>(), stage.getSettings()); positions.addAll(rs.getPositions()); } return positions; } public List<Position> getPositions() { return positions; } }
[ "jonasgreen12345@gmail.com" ]
jonasgreen12345@gmail.com
c714ad4a42877f15fad302ededbfc9973b4be3c1
c7a927951df15e74c01470ed0b35f549042a646f
/src/main/java/com/levelofhierarchy/model/Roles.java
960dad4bece58ecc503007b5ef0fd53c9e03267c
[]
no_license
udhaya97/levelofhierarchyexample
e1f0e84ae8c3cc2e028a9b7c5b63af3e1b5e0afd
605661be60ea297326687486f5ddc205ed3a63ee
refs/heads/master
2023-03-28T05:06:14.347670
2021-03-27T13:20:30
2021-03-27T13:20:30
352,078,264
0
0
null
null
null
null
UTF-8
Java
false
false
921
java
package com.levelofhierarchy.model; import java.util.List; import javax.persistence.Entity; import javax.persistence.Id; import javax.persistence.OneToMany; import javax.persistence.Table; @Entity @Table(name="roles") public class Roles { @Id private int roleId; private String roleName; @OneToMany(mappedBy = "roles") private List<ProductRoles> prodRules; public int getRoleId() { return roleId; } public void setRoleId(int roleId) { this.roleId = roleId; } public String getRoleName() { return roleName; } public void setRoleName(String roleName) { this.roleName = roleName; } public List<ProductRoles> getProdRules() { return prodRules; } public void setProdRules(List<ProductRoles> prodRules) { this.prodRules = prodRules; } public Roles(int roleId, String roleName) { super(); this.roleId = roleId; this.roleName = roleName; } public Roles() { super(); } }
[ "udhaya2cse@gmail.com" ]
udhaya2cse@gmail.com
4246e689668427a7b78500a3b308a1e3fa5b4c6a
b52bdef128ecebcc8808ed95f8287bc97a4c4174
/client/src/main/java/com/orientechnologies/orient/client/remote/OEngineRemote.java
0431415ba31cd6778e2d448a49b77209c0a23f96
[ "Apache-2.0", "CDDL-1.0", "BSD-3-Clause" ]
permissive
saeedtabrizi/orientdb
4736d86e82e713b34d21566ca844db5af177f53a
361cf4816b6597ab7d5cd356745ee3f7f475116d
refs/heads/develop
2021-01-15T14:43:20.379474
2019-09-09T12:20:03
2019-09-09T12:20:03
56,811,541
0
0
Apache-2.0
2019-09-09T12:22:10
2016-04-21T23:24:41
Java
UTF-8
Java
false
false
1,838
java
/* * * * Copyright 2010-2016 OrientDB LTD (http://orientdb.com) * * * * Licensed under the Apache License, Version 2.0 (the "License"); * * you may not use this file except in compliance with the License. * * You may obtain a copy of the License at * * * * http://www.apache.org/licenses/LICENSE-2.0 * * * * Unless required by applicable law or agreed to in writing, software * * distributed under the License is distributed on an "AS IS" BASIS, * * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * * See the License for the specific language governing permissions and * * limitations under the License. * * * * For more information: http://orientdb.com * */ package com.orientechnologies.orient.client.remote; import com.orientechnologies.orient.core.engine.OEngineAbstract; import com.orientechnologies.orient.core.exception.OStorageException; import com.orientechnologies.orient.core.storage.OStorage; import java.util.Map; /** * Remote engine implementation. * * @author Luca Garulli (l.garulli--(at)--orientdb.com) */ public class OEngineRemote extends OEngineAbstract { public static final String NAME = "remote"; public static final String PREFIX = NAME + ":"; public OEngineRemote() { } public OStorageRemote createStorage(final String iURL, final Map<String, String> iConfiguration, long maxWalSegSize, long doubleWriteLogMaxSegSize) { throw new OStorageException("deprecated"); } @Override public void removeStorage(final OStorage iStorage) { } @Override public void startup() { super.startup(); } @Override public void shutdown() { super.shutdown(); } @Override public String getNameFromPath(String dbPath) { return dbPath; } public String getName() { return NAME; } }
[ "lomakin.andrey@gmail.com" ]
lomakin.andrey@gmail.com
400501ea35a9cb42c6c3a94d7c3f0d76d95da350
ba333491a13967e09ee2c2e48a64b8aa05a08d2c
/base/src/main/java/com/wind/base/http/page/SePage.java
65904b978a81c0e5e649babb55a4f4fd026bbf9c
[]
no_license
yqyzxd/AppFramework
33fddbad3bbade131325d8ec9fce07233b00f1f6
5d588f985e4ffe2afe888d5d7ebdf87b269fdaaa
refs/heads/master
2021-01-24T10:27:52.976864
2019-09-19T07:54:27
2019-09-19T07:54:27
123,052,999
0
0
null
null
null
null
UTF-8
Java
false
false
1,418
java
package com.wind.base.http.page; import com.wind.base.api.IPageApi; import com.wind.base.request.PageRequest; import com.wind.base.response.PageResponse; import javax.inject.Inject; /** * ๅˆ†้กต็ญ–็•ฅ2: startIndex, endIndex * * @author hiphonezhu@gmail.com * @version [Android-BaseLine, 2015-09-29 21:54] */ public abstract class SePage<Q extends PageRequest, R extends PageResponse> extends AbstractPage<Q,R> { public SePage(IPageApi pageApi) { super(pageApi); } @Override public int handlePageIndex(int currPageIndex, int pageSize) { if (currPageIndex == getStartPageIndex() - 1) // ๅŠ ่ฝฝ็ฌฌไธ€้กตๆ•ฐๆฎ(้˜ฒๆญข็ฌฌไธ€้กตไฝฟ็”จ"ไธŠๆ‹‰ๅŠ ่ฝฝๆ›ดๅคš") { return getStartPageIndex(); } return currPageIndex + pageSize; } @Override public int handlePage(int currPageIndex, int pageSize) { return currPageIndex + pageSize - 1; } /** * ่ตทๅง‹ไธ‹ๆ ‡้€’ๅ‡ */ public void decreaseStartIndex() { currPageIndex--; checkBound(); } /** * ่ตทๅง‹ไธ‹ๆ ‡้€’ๅ‡ */ public void decreaseStartIndex(int size) { currPageIndex -= size; checkBound(); } /** * ่พน็•Œๆฃ€ๆต‹ */ private void checkBound() { if (currPageIndex < getStartPageIndex() - pageSize) { currPageIndex = getStartPageIndex() - pageSize; } } }
[ "shihaowind@163.com" ]
shihaowind@163.com
cba89120c409638d8a446fa6f82eef5403fc2127
1ba27fc930ba20782e9ef703e0dc7b69391e191b
/Src/Base/src/main/java/com/compuware/caqs/service/SettingsSvc.java
aeb5675b04bc8c57d88b96ace69a4d9808ca746a
[]
no_license
LO-RAN/codeQualityPortal
b0d81c76968bdcfce659959d0122e398c647b09f
a7c26209a616d74910f88ce0d60a6dc148dda272
refs/heads/master
2023-07-11T18:39:04.819034
2022-03-31T15:37:56
2022-03-31T15:37:56
37,261,337
0
0
null
null
null
null
UTF-8
Java
false
false
2,699
java
package com.compuware.caqs.service; import com.compuware.caqs.constants.Constants; import com.compuware.caqs.constants.MessagesCodes; import com.compuware.caqs.dao.factory.DaoFactory; import com.compuware.caqs.dao.interfaces.SettingsDao; import com.compuware.caqs.domain.dataschemas.settings.SettingValuesBean; import com.compuware.caqs.domain.dataschemas.settings.Settings; import com.compuware.caqs.exception.DataAccessException; import com.compuware.toolbox.util.logging.LoggerManager; public class SettingsSvc { private static final SettingsSvc instance = new SettingsSvc(); private SettingsSvc() { } public static SettingsSvc getInstance() { return instance; } protected static org.apache.log4j.Logger logger = LoggerManager.getLogger(Constants.LOG4J_IHM_LOGGER_KEY); /** * @return all available themes */ public SettingValuesBean getAvailablePreferences(Settings setting) { SettingValuesBean retour = null; SettingsDao dao = DaoFactory.getInstance().getSettingsDao(); retour = dao.getSettingValues(setting); return retour; } /** * @param setting the setting for which the value has to be retrieved * @param userId the user for which the setting must be retrieved * @return the preference value for the provided user */ public String getPreferenceForUser(Settings setting, String userId) { String retour = null; SettingsDao dao = DaoFactory.getInstance().getSettingsDao(); retour = dao.getSettingValueForUser(setting, userId); return retour; } /** * @param setting the setting for which the value has to be retrieved * @param userId the user for which the setting must be retrieved * @return the preference for the user, as a boolean */ public boolean getBooleanPreferenceForUser(Settings setting, String userId) { boolean retour = false; SettingsDao dao = DaoFactory.getInstance().getSettingsDao(); String val = dao.getSettingValueForUser(setting, userId); if(val != null) { retour = Boolean.valueOf(val); } return retour; } public MessagesCodes updatePreferenceForUser(Settings setting, String userId, String newTheme) { MessagesCodes retour = MessagesCodes.NO_ERROR; SettingsDao dao = DaoFactory.getInstance().getSettingsDao(); try { dao.updateSettingValueForUser(setting, userId, newTheme); } catch(DataAccessException exc) { retour = MessagesCodes.DATABASE_ERROR; } return retour; } }
[ "laurent.izac@gmail.com" ]
laurent.izac@gmail.com
dbd59ab8098467a5d64df209409065f62f3b3bcc
9725f230d1330703a963fba3ba6f369a10887526
/aliyun-java-sdk-elasticsearch/src/main/java/com/aliyuncs/elasticsearch/transform/v20170613/UpdateWhiteIpsResponseUnmarshaller.java
f3f57b339e8f7e804bae0c1f9e58c5c36a4afd99
[ "Apache-2.0" ]
permissive
czy95czy/aliyun-openapi-java-sdk
21e74b8f23cced2f65fb3a1f34648c7bf01e3c48
5410bde6a54fe40a471b43e50696f991f5df25aa
refs/heads/master
2020-07-13T02:18:08.645626
2019-08-29T03:16:37
2019-08-29T03:16:37
204,966,560
0
0
NOASSERTION
2019-08-28T23:38:50
2019-08-28T15:38:50
null
UTF-8
Java
false
false
1,592
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.elasticsearch.transform.v20170613; import java.util.ArrayList; import java.util.List; import com.aliyuncs.elasticsearch.model.v20170613.UpdateWhiteIpsResponse; import com.aliyuncs.elasticsearch.model.v20170613.UpdateWhiteIpsResponse.Result; import com.aliyuncs.transform.UnmarshallerContext; public class UpdateWhiteIpsResponseUnmarshaller { public static UpdateWhiteIpsResponse unmarshall(UpdateWhiteIpsResponse updateWhiteIpsResponse, UnmarshallerContext context) { updateWhiteIpsResponse.setRequestId(context.stringValue("UpdateWhiteIpsResponse.RequestId")); Result result = new Result(); List<String> esIPWhitelist = new ArrayList<String>(); for (int i = 0; i < context.lengthValue("UpdateWhiteIpsResponse.Result.esIPWhitelist.Length"); i++) { esIPWhitelist.add(context.stringValue("UpdateWhiteIpsResponse.Result.esIPWhitelist["+ i +"]")); } result.setEsIPWhitelist(esIPWhitelist); updateWhiteIpsResponse.setResult(result); return updateWhiteIpsResponse; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
e6632fd70a87e3c11e35b36c0e0d8b747d6b2900
c47c254ca476c1f9969f8f3e89acb4d0618c14b6
/datasets/github_java_10/9/81.java
1e50eca4c54e16c4c1fd19e1a2761d21556db01f
[ "BSD-2-Clause" ]
permissive
yijunyu/demo
5cf4e83f585254a28b31c4a050630b8f661a90c8
11c0c84081a3181494b9c469bda42a313c457ad2
refs/heads/master
2023-02-22T09:00:12.023083
2021-01-25T16:51:40
2021-01-25T16:51:40
175,939,000
3
6
BSD-2-Clause
2021-01-09T23:00:12
2019-03-16T07:13:00
C
UTF-8
Java
false
false
654
java
package ็ฎ—ๆณ•.ๅ‡ ็งๅธธ่ง็š„ๆŽ’ๅบ็ฎ—ๆณ•; import java.util.Arrays; public class SelectionSort { public static void main(String[] args) { int selectionSort[]= new int[]{5,2,8,4,9,1}; for (int i=0;i<selectionSort.length-1;i++){ int flag=i; for (int j=i;j<selectionSort.length;j++){ if (selectionSort[j]<selectionSort[flag]){ flag=j; } } int temp=selectionSort[flag]; selectionSort[flag]=selectionSort[i]; selectionSort[i]=temp; } System.out.println(Arrays.toString(selectionSort)); } }
[ "y.yu@open.ac.uk" ]
y.yu@open.ac.uk
833d6009b1de5919715cd17ecfdcbbcb20fa5a0a
8b290fb5bb213c8fe83031f8d90ab4a59ab77d42
/alps/vehiclecommerceservices/src/com/bp/alps/vehiclecommerceservices/order/AlpsOrderEntryManagementStrategy.java
defb3ba4e34972ac3d80505a96bc66185c40de81
[]
no_license
SSJLYY/SR2
f5a05df0b6f8333890e5b91a95f99e6c260b447a
e69bc5295c9a7e995462e2eec989d06983e2b938
refs/heads/master
2020-03-30T06:04:40.417452
2018-10-24T03:14:50
2018-10-24T03:14:50
null
0
0
null
null
null
null
UTF-8
Java
false
false
847
java
package com.bp.alps.vehiclecommerceservices.order; import com.bp.alps.core.data.order.AlpsCommerceEntryResult; import com.bp.alps.core.data.order.AlpsCommerceOrderEntryParameter; import com.bp.alps.core.data.order.AlpsCommercePlaceOrderParameter; import com.bp.alps.core.data.order.AlpsCommerceResult; import de.hybris.platform.core.model.order.AbstractOrderModel; import java.util.List; public interface AlpsOrderEntryManagementStrategy { List<AlpsCommerceEntryResult> updateEntry(AlpsCommercePlaceOrderParameter parameter); List<AlpsCommerceEntryResult> addEntryToOrder(AlpsCommercePlaceOrderParameter parameter); List<AlpsCommerceEntryResult> getUnavailableProduct(final List<AlpsCommerceOrderEntryParameter> parameterList); List<AlpsCommerceOrderEntryParameter> calculateIncrementEntry(AlpsCommercePlaceOrderParameter parameter); }
[ "18621616775@163.com" ]
18621616775@163.com
42dcc45badd699a4294776343e0ff24515ec01c7
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
/aliyun-java-sdk-sas/src/main/java/com/aliyuncs/sas/model/v20181203/GetLocalInstallScriptResponse.java
9a7f86aad9e29eb7e2c8990ca5e4113828fd85a4
[ "Apache-2.0" ]
permissive
caojiele/aliyun-openapi-java-sdk
b6367cc95469ac32249c3d9c119474bf76fe6db2
ecc1c949681276b3eed2500ec230637b039771b8
refs/heads/master
2023-06-02T02:30:02.232397
2021-06-18T04:08:36
2021-06-18T04:08:36
172,076,930
0
0
NOASSERTION
2019-02-22T14:08:29
2019-02-22T14:08:29
null
UTF-8
Java
false
false
1,480
java
/* * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.aliyuncs.sas.model.v20181203; import com.aliyuncs.AcsResponse; import com.aliyuncs.sas.transform.v20181203.GetLocalInstallScriptResponseUnmarshaller; import com.aliyuncs.transform.UnmarshallerContext; /** * @author auto create * @version */ public class GetLocalInstallScriptResponse extends AcsResponse { private String requestId; private String script; public String getRequestId() { return this.requestId; } public void setRequestId(String requestId) { this.requestId = requestId; } public String getScript() { return this.script; } public void setScript(String script) { this.script = script; } @Override public GetLocalInstallScriptResponse getInstance(UnmarshallerContext context) { return GetLocalInstallScriptResponseUnmarshaller.unmarshall(this, context); } @Override public boolean checkShowJsonItemName() { return false; } }
[ "sdk-team@alibabacloud.com" ]
sdk-team@alibabacloud.com
caf35c61c3b1a49594188a9b431115ea9025861d
e30d3a7e5ddc968f50cb0694c877f51e0fe6ca59
/src/test/java/com/xwintop/xJavaFxTool/javafx/tool/TableBeanTool.java
fdfb38f2c44e586f4e7e8f9d306e1af703408245
[ "Apache-2.0", "LicenseRef-scancode-mulanpsl-2.0-en", "MulanPSL-2.0", "LicenseRef-scancode-unknown-license-reference" ]
permissive
foukation/xJavaFxTool
0a098e8b9001989080068682c3451f655245f6cb
d9f30ddef75e29c7dfa7204577789d4167090bb9
refs/heads/master
2021-05-25T14:43:21.070194
2020-03-21T08:00:12
2020-03-21T08:00:12
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,056
java
package com.xwintop.xJavaFxTool.javafx.tool; import com.xwintop.xcore.util.StrUtil; import org.apache.commons.lang3.reflect.FieldUtils; import org.junit.Test; import java.lang.reflect.Field; public class TableBeanTool { @Test public void buildTableBean(){ // Class<?> beanClass = EmailToolTableBean.class; Class<?> beanClass = this.getClass(); Field[] fields = FieldUtils.getAllFields(beanClass); StringBuffer soutStringBuffer = new StringBuffer();//่พ“ๅ‡บๅญ—็ฌฆไธฒ StringBuffer stringBuffer = new StringBuffer();//ๆž„้€ ๅ‡ฝๆ•ฐๅคด StringBuffer stringBuffer2 = new StringBuffer();//ๆž„้€ ๅ‡ฝๆ•ฐ็ป“ๆž„ StringBuffer stringBuffer3 = new StringBuffer();//ๆž„้€ ๅ‡ฝๆ•ฐ2ๅคด StringBuffer stringBuffer4 = new StringBuffer();//่Žทๅ–ๆž„้€ ๅ‡ฝๆ•ฐ StringBuffer stringBuffer5 = new StringBuffer();//่Žทๅ–getSetๆ–นๆณ• stringBuffer.append("public ").append(beanClass.getSimpleName()).append("("); stringBuffer3.append("public ").append(beanClass.getSimpleName()).append("(String propertys) {\nString[] strings = propertys.split(\"__\","+fields.length+");\n"); stringBuffer4.append("public String getPropertys() {\nreturn "); int i = 0; for (Field field : fields) { String fieldName = field.getName(); String typeName = field.getType().getSimpleName(); String typeSimpleName = typeName.substring(6, typeName.indexOf("Property")); String typeClassName = typeName.substring(6); String UpFieldName = StrUtil.fristToUpCase(fieldName); stringBuffer.append(typeSimpleName).append(" "+fieldName+","); stringBuffer2.append("this."+fieldName+" = new "+typeName+"("+fieldName+");\n"); if("Boolean".equals(typeSimpleName)){ stringBuffer3.append("this."+fieldName+" = new "+typeName+"(Boolean.valueOf(strings["+i+"]));\n"); }else if("Integer".equals(typeSimpleName)){ stringBuffer3.append("this."+fieldName+" = new "+typeName+"(Integer.valueOf(strings["+i+"]));\n"); }else{ stringBuffer3.append("this."+fieldName+" = new "+typeName+"(strings["+i+"]);\n"); } stringBuffer4.append(fieldName +".get() + \"__\" + "); if(!"String".equals(typeSimpleName)){ stringBuffer5.append("public "+typeClassName+" "+fieldName+"Property(){\n"); stringBuffer5.append("return "+fieldName+";\n}\n\n"); } stringBuffer5.append("public "+typeSimpleName+" get"+UpFieldName+"(){\n"); stringBuffer5.append("return "+fieldName+".get();\n}\n\n"); stringBuffer5.append("public void set"+UpFieldName+"("+typeSimpleName+" "+fieldName+"){\n"); stringBuffer5.append("this."+fieldName+".set("+fieldName+");\n}\n\n"); i++; } stringBuffer.deleteCharAt(stringBuffer.length()-1).append("){\n"); stringBuffer4.delete(stringBuffer4.length()-10, stringBuffer4.length()).append(";\n"); soutStringBuffer.append(stringBuffer.toString()+stringBuffer2+"}\n\n"); soutStringBuffer.append(stringBuffer3.toString()+"}\n\n"); soutStringBuffer.append(stringBuffer4.toString()+"}\n\n"); soutStringBuffer.append(stringBuffer5.toString()+"\n\n"); System.out.println(soutStringBuffer); } }
[ "1277032935@qq.com" ]
1277032935@qq.com
1d8063faafdbfbdde54d42e393bd86472b444440
dc0919c9609f03f5b239ec0799cea22ed070f411
/android/support/v4/view/accessibility/AccessibilityNodeInfoCompat$AccessibilityNodeInfoImpl.java
4b62a987068ecca36bd97b982e422aea66379fba
[]
no_license
jjensn/milight-decompile
a8f98af475f452c18a74fd1032dce8680f23abc0
47c4b9eea53c279f6fab3e89091e2fef495c6159
refs/heads/master
2021-06-01T17:23:28.555123
2016-10-12T18:07:53
2016-10-12T18:07:53
70,721,205
5
0
null
null
null
null
UTF-8
Java
false
false
4,907
java
package android.support.v4.view.accessibility; import android.graphics.Rect; import android.os.Bundle; import android.view.View; import java.util.List; abstract interface AccessibilityNodeInfoCompat$AccessibilityNodeInfoImpl { public abstract void addAction(Object paramObject, int paramInt); public abstract void addChild(Object paramObject, View paramView); public abstract void addChild(Object paramObject, View paramView, int paramInt); public abstract List<Object> findAccessibilityNodeInfosByText(Object paramObject, String paramString); public abstract Object findFocus(Object paramObject, int paramInt); public abstract Object focusSearch(Object paramObject, int paramInt); public abstract int getActions(Object paramObject); public abstract void getBoundsInParent(Object paramObject, Rect paramRect); public abstract void getBoundsInScreen(Object paramObject, Rect paramRect); public abstract Object getChild(Object paramObject, int paramInt); public abstract int getChildCount(Object paramObject); public abstract CharSequence getClassName(Object paramObject); public abstract CharSequence getContentDescription(Object paramObject); public abstract int getMovementGranularities(Object paramObject); public abstract CharSequence getPackageName(Object paramObject); public abstract Object getParent(Object paramObject); public abstract CharSequence getText(Object paramObject); public abstract String getViewIdResourceName(Object paramObject); public abstract int getWindowId(Object paramObject); public abstract boolean isAccessibilityFocused(Object paramObject); public abstract boolean isCheckable(Object paramObject); public abstract boolean isChecked(Object paramObject); public abstract boolean isClickable(Object paramObject); public abstract boolean isEnabled(Object paramObject); public abstract boolean isFocusable(Object paramObject); public abstract boolean isFocused(Object paramObject); public abstract boolean isLongClickable(Object paramObject); public abstract boolean isPassword(Object paramObject); public abstract boolean isScrollable(Object paramObject); public abstract boolean isSelected(Object paramObject); public abstract boolean isVisibleToUser(Object paramObject); public abstract Object obtain(); public abstract Object obtain(View paramView); public abstract Object obtain(View paramView, int paramInt); public abstract Object obtain(Object paramObject); public abstract boolean performAction(Object paramObject, int paramInt); public abstract boolean performAction(Object paramObject, int paramInt, Bundle paramBundle); public abstract void recycle(Object paramObject); public abstract void setAccessibilityFocused(Object paramObject, boolean paramBoolean); public abstract void setBoundsInParent(Object paramObject, Rect paramRect); public abstract void setBoundsInScreen(Object paramObject, Rect paramRect); public abstract void setCheckable(Object paramObject, boolean paramBoolean); public abstract void setChecked(Object paramObject, boolean paramBoolean); public abstract void setClassName(Object paramObject, CharSequence paramCharSequence); public abstract void setClickable(Object paramObject, boolean paramBoolean); public abstract void setContentDescription(Object paramObject, CharSequence paramCharSequence); public abstract void setEnabled(Object paramObject, boolean paramBoolean); public abstract void setFocusable(Object paramObject, boolean paramBoolean); public abstract void setFocused(Object paramObject, boolean paramBoolean); public abstract void setLongClickable(Object paramObject, boolean paramBoolean); public abstract void setMovementGranularities(Object paramObject, int paramInt); public abstract void setPackageName(Object paramObject, CharSequence paramCharSequence); public abstract void setParent(Object paramObject, View paramView); public abstract void setParent(Object paramObject, View paramView, int paramInt); public abstract void setPassword(Object paramObject, boolean paramBoolean); public abstract void setScrollable(Object paramObject, boolean paramBoolean); public abstract void setSelected(Object paramObject, boolean paramBoolean); public abstract void setSource(Object paramObject, View paramView); public abstract void setSource(Object paramObject, View paramView, int paramInt); public abstract void setText(Object paramObject, CharSequence paramCharSequence); public abstract void setViewIdResourceName(Object paramObject, String paramString); public abstract void setVisibleToUser(Object paramObject, boolean paramBoolean); } /* Location: * Qualified Name: android.support.v4.view.accessibility.AccessibilityNodeInfoCompat.AccessibilityNodeInfoImpl * Java Class Version: 6 (50.0) * JD-Core Version: 0.6.1-SNAPSHOT */
[ "jjensen@GAM5YG3QC-MAC.local" ]
jjensen@GAM5YG3QC-MAC.local
eb893d4d065e129863d3744535e0ad5b05fbb4e1
28f1bd2053f48abad4ee0dc51ccb5d28730937c0
/็–ฏ็‹‚Java่ฎฒไน‰๏ผˆ็ฌฌ3็‰ˆ๏ผ‰ๅ…‰็›˜ๅ†…ๅฎน/codes/09/9.1/GenericList.java
3ffb236106196a9f0ce46584aab26b594ac363e1
[ "Apache-2.0" ]
permissive
JamesKing9/-Java-3-
ce029cd2d78b50aaf4bdf39f120b83fd9ff1cf94
3fa0aae7bc5dd95a119322c431431f116fda9ec8
refs/heads/master
2020-12-02T10:03:32.508167
2017-07-09T13:05:31
2017-07-09T13:05:31
96,684,655
2
1
null
null
null
null
GB18030
Java
false
false
700
java
import java.util.*; /** * Description: * <br/>็ฝ‘็ซ™: <a href="http://www.crazyit.org">็–ฏ็‹‚Java่”็›Ÿ</a> * <br/>Copyright (C), 2001-2016, Yeeku.H.Lee * <br/>This program is protected by copyright laws. * <br/>Program Name: * <br/>Date: * @author Yeeku.H.Lee kongyeeku@163.com * @version 1.0 */ public class GenericList { public static void main(String[] args) { // ๅˆ›ๅปบไธ€ไธชๅชๆƒณไฟๅญ˜ๅญ—็ฌฆไธฒ็š„List้›†ๅˆ List<String> strList = new ArrayList<String>(); // โ‘  strList.add("็–ฏ็‹‚Java่ฎฒไน‰"); strList.add("็–ฏ็‹‚Android่ฎฒไน‰"); // ไธ‹้ขไปฃ็ ๅฐ†ๅผ•่ตท็ผ–่ฏ‘้”™่ฏฏ strList.add(5); // โ‘ก strList.forEach(str -> System.out.println(str.length())); // โ‘ข } }
[ "shencheng.wan@outlook.com" ]
shencheng.wan@outlook.com
8214337a9df2d50f19134a225a7ab9cc65f83af7
547ce67e4fb170d5dd7fac896bdc92532dea2a38
/src/java/com/ctc/wstx/io/BranchingReaderSource.java
1278786cb9c56347ead8ec8f8847918459f66a1e
[]
no_license
xranby/Woodstox4
c3c510d84334f1aacacb26858ac95bbc9b7add19
ad17cef017f8a3032bfde37ad0f2c812598efd02
refs/heads/master
2021-01-17T09:03:06.799677
2015-03-14T23:48:59
2015-03-14T23:48:59
null
0
0
null
null
null
null
UTF-8
Java
false
false
4,747
java
package com.ctc.wstx.io; import java.io.IOException; import java.io.Reader; import javax.xml.stream.XMLStreamException; import com.ctc.wstx.api.ReaderConfig; import com.ctc.wstx.util.TextBuffer; /** * Specialized input source that can "branch" input it reads; essentially * both giving out read data AND also writing it out to a Writer. *<p> * Currently this Reader is only used as the main-level Reader, to allow for * branching of internal DTD subset to a text buffer if necessary. */ public final class BranchingReaderSource extends ReaderSource { // // // Branching information TextBuffer mBranchBuffer = null; int mBranchStartOffset = 0; boolean mConvertLFs = false; /** * Flag that indicates that last char from previous buffer was * '\r', and that following '\n' (if there is one) needs to be * ignored. */ boolean mGotCR = false; public BranchingReaderSource(ReaderConfig cfg, String pubId, SystemId sysId, Reader r, boolean realClose) { /* null -> no parent, * null -> not from explicit entity (no id/name) */ super(cfg, null, null, pubId, sysId, r, realClose); } public int readInto(WstxInputData reader) throws IOException, XMLStreamException { // Need to flush out branched content? if (mBranchBuffer != null) { if (mInputLast > mBranchStartOffset) { appendBranched(mBranchStartOffset, mInputLast); } mBranchStartOffset = 0; } return super.readInto(reader); } public boolean readMore(WstxInputData reader, int minAmount) throws IOException, XMLStreamException { // Existing data to output to branch? if (mBranchBuffer != null) { int ptr = reader.mInputPtr; int currAmount = mInputLast - ptr; if (currAmount > 0) { if (ptr > mBranchStartOffset) { appendBranched(mBranchStartOffset, ptr); } mBranchStartOffset = 0; } } return super.readMore(reader, minAmount); } /* ////////////////////////////////////////////////// // Branching methods; used mostly to make a copy // of parsed internal subsets. ////////////////////////////////////////////////// */ public void startBranch(TextBuffer tb, int startOffset, boolean convertLFs) { mBranchBuffer = tb; mBranchStartOffset = startOffset; mConvertLFs = convertLFs; mGotCR = false; } /** * Currently this input source does not implement branching */ public void endBranch(int endOffset) { if (mBranchBuffer != null) { if (endOffset > mBranchStartOffset) { appendBranched(mBranchStartOffset, endOffset); } // Let's also make sure no branching is done from this point on: mBranchBuffer = null; } } /* ////////////////////////////////////////////////// // Internal methods ////////////////////////////////////////////////// */ private void appendBranched(int startOffset, int pastEnd) { // Main tricky thing here is just replacing of linefeeds... if (mConvertLFs) { char[] inBuf = mBuffer; /* this will also unshare() and ensure there's room for at * least one more char */ char[] outBuf = mBranchBuffer.getCurrentSegment(); int outPtr = mBranchBuffer.getCurrentSegmentSize(); // Pending \n to skip? if (mGotCR) { if (inBuf[startOffset] == '\n') { ++startOffset; } } while (startOffset < pastEnd) { char c = inBuf[startOffset++]; if (c == '\r') { if (startOffset < pastEnd) { if (inBuf[startOffset] == '\n') { ++startOffset; } } else { mGotCR = true; } c = '\n'; } // Ok, let's add char to output: outBuf[outPtr++] = c; // Need more room? if (outPtr >= outBuf.length) { outBuf = mBranchBuffer.finishCurrentSegment(); outPtr = 0; } } mBranchBuffer.setCurrentLength(outPtr); } else { mBranchBuffer.append(mBuffer, startOffset, pastEnd-startOffset); } } }
[ "tatu.saloranta@iki.fi" ]
tatu.saloranta@iki.fi
22f55d5a53b671b77eacfc10cbac8e9fedf858c6
193b758dd2aebac01edd6cee9dc4ac97febc09fa
/src/main/java/com/ricardojlrufino/eventbus/EventMessage.java
920807398349686933cda74de15594f5a94aa1db
[ "MIT" ]
permissive
ricardojlrufino/eventbus4j
3127ed38b137baef8dba7f50500ef11fc218d906
a663b9c06eb23fd6bce412754cce20e2ca9bca91
refs/heads/master
2022-12-31T23:02:14.653040
2020-05-21T02:40:44
2020-05-21T02:41:10
265,714,366
0
0
MIT
2020-10-13T22:09:29
2020-05-21T00:17:55
Java
UTF-8
Java
false
false
184
java
package com.ricardojlrufino.eventbus; /** * A Event is an object with a specific type that is associated to a specific {@link * EventHandler}. */ public interface EventMessage { }
[ "ricardo.jl.rufino@gmail.com" ]
ricardo.jl.rufino@gmail.com
a44ddab44e18f8aec3d35d0299359bbf8637933e
258a8585ed637342645b56ab76a90a1256ecbb45
/Folitics/src/main/java/com/ohmuk/folitics/hibernate/repository/verdict/global/GlobalVerdictReligionDistributionRepository.java
2b5cb238055f4b6c38eafdab90c9d43c88e44a7e
[]
no_license
exatip407/folitics
06e899aae2dbfdeda981c40c0ce578d223979568
aff3392e09c35f5f799e3fb1c4534b5343a22f01
refs/heads/master
2021-01-01T16:23:14.684470
2017-07-20T10:27:08
2017-07-20T10:27:08
97,819,592
0
0
null
null
null
null
UTF-8
Java
false
false
7,194
java
package com.ohmuk.folitics.hibernate.repository.verdict.global; import java.util.List; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; import org.springframework.stereotype.Repository; import com.ohmuk.folitics.hibernate.entity.verdict.global.GlobalVerdictReligionDistribution; import com.ohmuk.folitics.hibernate.entity.verdict.lookup.Religion; /** * Repository implementation for {@link GlobalVerdictReligionDistribution} * * @author Abhishek * */ @Component @Repository public class GlobalVerdictReligionDistributionRepository implements IGlobalVerdictDistributionRepository<GlobalVerdictReligionDistribution, Religion> { private static Logger logger = LoggerFactory .getLogger(GlobalVerdictReligionDistributionRepository.class); @Autowired private SessionFactory sessionFactory; private Session getSession() { return sessionFactory.getCurrentSession(); } @Override public GlobalVerdictReligionDistribution save( GlobalVerdictReligionDistribution globalVerdictReligionDistribution) { logger.debug("Entered GlobalVerdictReligionDistributionRepository save method"); logger.debug("Trying to save GlobalVerdictReligionDistribution for Religion id = " + globalVerdictReligionDistribution.getReligion().getId()); globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .save(globalVerdictReligionDistribution); logger.debug("Saved GlobalVerdictReligionDistribution object and got id = " + globalVerdictReligionDistribution.getReligion().getId() + " and now getting GlobalVerdictReligionDistribution object from database"); globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .get(GlobalVerdictReligionDistribution.class, globalVerdictReligionDistribution.getReligion().getId()); logger.debug("Got GlobalVerdictReligionDistribution object from database. Exiting GlobalVerdictReligionDistributionRepository save method"); return globalVerdictReligionDistribution; } @Override public GlobalVerdictReligionDistribution find(Religion religion) { logger.debug("Entered GlobalVerdictReligionDistributionRepository find method"); logger.debug("Trying to get GlobalVerdictReligionDistribution with id = " + religion.getId()); GlobalVerdictReligionDistribution globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .get(GlobalVerdictReligionDistribution.class, religion.getId()); logger.debug("Got GlobalVerdictReligionDistribution object from database. Exiting GlobalVerdictReligionDistributionRepository find method"); return globalVerdictReligionDistribution; } @Override public List<GlobalVerdictReligionDistribution> findAll() { logger.debug("Entered GlobalVerdictReligionDistributionRepository findAll method"); logger.debug("Trying to get all GlobalVerdictReligionDistribution"); Criteria selectAllCriteria = getSession().createCriteria( GlobalVerdictReligionDistribution.class); @SuppressWarnings("unchecked") List<GlobalVerdictReligionDistribution> globalVerdictReligionDistributions = selectAllCriteria .list(); logger.debug("Got all GlobalVerdictReligionDistribution objects from database. Exiting GlobalVerdictReligionDistributionRepository findAll method"); return globalVerdictReligionDistributions; } @Override public GlobalVerdictReligionDistribution update( GlobalVerdictReligionDistribution globalVerdictReligionDistribution) { logger.debug("Entered GlobalVerdictReligionDistributionRepository update method"); logger.debug("Merging the object first with id = " + globalVerdictReligionDistribution.getReligion().getId()); globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .merge(globalVerdictReligionDistribution); logger.debug("Now updating the GlobalVerdictReligionDistribution object in database with id = " + globalVerdictReligionDistribution.getReligion().getId()); getSession().update(globalVerdictReligionDistribution); logger.debug("Getting the GlobalVerdictReligionDistribution object from database"); globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .get(GlobalVerdictReligionDistribution.class, globalVerdictReligionDistribution.getReligion().getId()); logger.debug("Got GlobalVerdictReligionDistribution object from database. Exiting GlobalVerdictReligionDistributionRepository update method"); return globalVerdictReligionDistribution; } @Override public boolean deleteById(Religion religion) { logger.debug("Entered GlobalVerdictReligionDistributionRepository deleteById method"); logger.debug("Trying to get GlobalVerdictReligionDistribution with id = " + religion.getId()); GlobalVerdictReligionDistribution globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .get(GlobalVerdictReligionDistribution.class, religion); logger.debug("Now trying to delete the GlobalVerdictReligionDistribution object with id = " + globalVerdictReligionDistribution.getReligion().getId()); getSession().delete(globalVerdictReligionDistribution); globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .get(GlobalVerdictReligionDistribution.class, religion.getId()); if (globalVerdictReligionDistribution == null) { logger.debug("Deleted GlobalVerdictReligionDistribution object from database. Exiting GlobalVerdictReligionDistributionRepository deleteById method"); return true; } else { return false; } } @Override public boolean delete( GlobalVerdictReligionDistribution globalVerdictReligionDistribution) { logger.debug("Entered GlobalVerdictReligionDistributionRepository delete method"); logger.debug("Trying to get GlobalVerdictReligionDistribution with id = " + globalVerdictReligionDistribution.getReligion().getId()); globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .get(GlobalVerdictReligionDistribution.class, globalVerdictReligionDistribution.getReligion().getId()); logger.debug("Now trying to delete the GlobalVerdictReligionDistribution object with id = " + globalVerdictReligionDistribution.getReligion().getId()); getSession().delete(globalVerdictReligionDistribution); globalVerdictReligionDistribution = (GlobalVerdictReligionDistribution) getSession() .get(GlobalVerdictReligionDistribution.class, globalVerdictReligionDistribution.getReligion().getId()); if (globalVerdictReligionDistribution == null) { logger.debug("Deleted GlobalVerdictReligionDistribution object from database. Exiting GlobalVerdictReligionDistributionRepository deleteById method"); return true; } else { return false; } } }
[ "gautam@exatip.com" ]
gautam@exatip.com
6c83a02d313caac196f55550a5988a98ae6192d6
c2d8181a8e634979da48dc934b773788f09ffafb
/storyteller/output/mazdasalestool/GrepExhibitionReportUsedOnVisitmotivationintroductionAction.java
ec127ab23f547e76c9144ca3ec46504200e12ac0
[]
no_license
toukubo/storyteller
ccb8281cdc17b87758e2607252d2d3c877ffe40c
6128b8d275efbf18fd26d617c8503a6e922c602d
refs/heads/master
2021-05-03T16:30:14.533638
2016-04-20T12:52:46
2016-04-20T12:52:46
9,352,300
0
0
null
null
null
null
UTF-8
Java
false
false
1,597
java
package net.mazdasalestool.web; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import net.mazdasalestool.model.*; import net.mazdasalestool.model.crud.*; import org.apache.struts.action.Action; import org.apache.struts.action.ActionForm; import org.apache.struts.action.ActionForward; import org.apache.struts.action.ActionMapping; import org.hibernate.Criteria; import org.hibernate.Session; import org.hibernate.SessionFactory; import org.hibernate.criterion.Restrictions; import org.springframework.beans.factory.BeanFactory; import org.springframework.web.context.support.WebApplicationContextUtils; import net.enclosing.util.HibernateSession; public class GrepExhibitionReportUsedOnVisitmotivationintroductionAction extends Action{ public ActionForward execute( ActionMapping mapping, ActionForm form, HttpServletRequest req, HttpServletResponse res) throws Exception{ Session session = new HibernateSession().currentSession(this .getServlet().getServletContext()); Criteria criteria = session.createCriteria(ExhibitionReportUsed.class); if(req.getParameter("q") !=null && !req.getParameter("q").equals("")){ criteria.add(Restrictions.like("visitmotivationintroduction","%" + new String(req.getParameter("q").getBytes("8859_1"), "UTF-8") + "%")); } session.flush(); req.setAttribute("intrausers", criteria.list()); req.setAttribute("from","GrepExhibitionReportUsedOnVisitmotivationintroduction"); return mapping.findForward("success"); } }
[ "toukubo@gmail.com" ]
toukubo@gmail.com
eda5e302145c1e1d97d0389d4a5c26f4d01c4d70
333f031638b9357162730551f5fece29de26f58e
/app/src/main/java-gen/com/kinth/football/dao/PushMessageDao.java
727dc6aa2318c07288538bbef0262e6440526e0f
[]
no_license
Solaning/cloud-football
19a21f0585989c639846f44bd30cdff8aff84f22
7e310daceb2694851c6a52c3a956a8bc4a7a3d2f
refs/heads/master
2021-01-10T15:43:08.658612
2015-10-24T08:52:55
2015-10-24T08:52:55
44,853,394
2
0
null
null
null
null
UTF-8
Java
false
false
5,139
java
package com.kinth.football.dao; import android.database.Cursor; import android.database.sqlite.SQLiteDatabase; import android.database.sqlite.SQLiteStatement; import de.greenrobot.dao.AbstractDao; import de.greenrobot.dao.Property; import de.greenrobot.dao.internal.DaoConfig; import com.kinth.football.dao.PushMessage; // THIS CODE IS GENERATED BY greenDAO, DO NOT EDIT. /** * DAO for table PUSH_MESSAGE. */ public class PushMessageDao extends AbstractDao<PushMessage, Long> { public static final String TABLENAME = "PUSH_MESSAGE"; /** * Properties of entity PushMessage.<br/> * Can be used for QueryBuilder and for referencing column names. */ public static class Properties { public final static Property Id = new Property(0, Long.class, "id", true, "_id"); public final static Property Type = new Property(1, String.class, "type", false, "TYPE"); public final static Property Date = new Property(2, Long.class, "date", false, "DATE"); public final static Property Content = new Property(3, String.class, "content", false, "CONTENT"); public final static Property HasRead = new Property(4, Boolean.class, "hasRead", false, "HAS_READ"); public final static Property IsClick = new Property(5, Integer.class, "isClick", false, "IS_CLICK"); }; public PushMessageDao(DaoConfig config) { super(config); } public PushMessageDao(DaoConfig config, DaoSession daoSession) { super(config, daoSession); } /** Creates the underlying database table. */ public static void createTable(SQLiteDatabase db, boolean ifNotExists) { String constraint = ifNotExists? "IF NOT EXISTS ": ""; db.execSQL("CREATE TABLE " + constraint + "'PUSH_MESSAGE' (" + // "'_id' INTEGER PRIMARY KEY ," + // 0: id "'TYPE' TEXT NOT NULL ," + // 1: type "'DATE' INTEGER," + // 2: date "'CONTENT' TEXT," + // 3: content "'HAS_READ' INTEGER," + // 4: hasRead "'IS_CLICK' INTEGER);"); // 5: isClick } /** Drops the underlying database table. */ public static void dropTable(SQLiteDatabase db, boolean ifExists) { String sql = "DROP TABLE " + (ifExists ? "IF EXISTS " : "") + "'PUSH_MESSAGE'"; db.execSQL(sql); } /** @inheritdoc */ @Override protected void bindValues(SQLiteStatement stmt, PushMessage entity) { stmt.clearBindings(); Long id = entity.getId(); if (id != null) { stmt.bindLong(1, id); } stmt.bindString(2, entity.getType()); Long date = entity.getDate(); if (date != null) { stmt.bindLong(3, date); } String content = entity.getContent(); if (content != null) { stmt.bindString(4, content); } Boolean hasRead = entity.getHasRead(); if (hasRead != null) { stmt.bindLong(5, hasRead ? 1l: 0l); } Integer isClick = entity.getIsClick(); if (isClick != null) { stmt.bindLong(6, isClick); } } /** @inheritdoc */ @Override public Long readKey(Cursor cursor, int offset) { return cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0); } /** @inheritdoc */ @Override public PushMessage readEntity(Cursor cursor, int offset) { PushMessage entity = new PushMessage( // cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0), // id cursor.getString(offset + 1), // type cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2), // date cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3), // content cursor.isNull(offset + 4) ? null : cursor.getShort(offset + 4) != 0, // hasRead cursor.isNull(offset + 5) ? null : cursor.getInt(offset + 5) // isClick ); return entity; } /** @inheritdoc */ @Override public void readEntity(Cursor cursor, PushMessage entity, int offset) { entity.setId(cursor.isNull(offset + 0) ? null : cursor.getLong(offset + 0)); entity.setType(cursor.getString(offset + 1)); entity.setDate(cursor.isNull(offset + 2) ? null : cursor.getLong(offset + 2)); entity.setContent(cursor.isNull(offset + 3) ? null : cursor.getString(offset + 3)); entity.setHasRead(cursor.isNull(offset + 4) ? null : cursor.getShort(offset + 4) != 0); entity.setIsClick(cursor.isNull(offset + 5) ? null : cursor.getInt(offset + 5)); } /** @inheritdoc */ @Override protected Long updateKeyAfterInsert(PushMessage entity, long rowId) { entity.setId(rowId); return rowId; } /** @inheritdoc */ @Override public Long getKey(PushMessage entity) { if(entity != null) { return entity.getId(); } else { return null; } } /** @inheritdoc */ @Override protected boolean isEntityUpdateable() { return true; } }
[ "384276310@qq.com" ]
384276310@qq.com
7ebed1fe9eec58572dcac0e8cd5ad376b2b6d61e
fa91450deb625cda070e82d5c31770be5ca1dec6
/Diff-Raw-Data/4/4_8bc0cb14b19ad5cabf5f29eb6ebcf6b6e42d47a4/SourceCode/4_8bc0cb14b19ad5cabf5f29eb6ebcf6b6e42d47a4_SourceCode_s.java
50c77f16d1ed739bc774fdefc16bc3ec2b759ac2
[]
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,381
java
/** * BSD-style license; for more info see http://pmd.sourceforge.net/license.html */ package net.sourceforge.pmd.cpd; import java.io.File; import java.io.FileInputStream; import java.io.InputStreamReader; import java.io.LineNumberReader; import java.io.Reader; import java.io.StringReader; import java.lang.ref.SoftReference; import java.util.ArrayList; import java.util.List; import net.sourceforge.pmd.PMD; public class SourceCode { public static abstract class CodeLoader { private SoftReference<List<String>> code; public List<String> getCode() { List<String> c = null; if (code != null) { c = code.get(); } if (c != null) { return c; } this.code = new SoftReference<List<String>>(load()); return code.get(); } public abstract String getFileName(); protected abstract Reader getReader() throws Exception; protected List<String> load() { LineNumberReader lnr = null; try { lnr = new LineNumberReader(getReader()); List<String> lines = new ArrayList<String>(); String currentLine; while ((currentLine = lnr.readLine()) != null) { lines.add(currentLine); } return lines; } catch (Exception e) { e.printStackTrace(); throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage()); } finally { try { if (lnr != null) { lnr.close(); } } catch (Exception e) { throw new RuntimeException("Problem while reading " + getFileName() + ":" + e.getMessage()); } } } } public static class FileCodeLoader extends CodeLoader { private File file; private String encoding; public FileCodeLoader(File file, String encoding) { this.file = file; this.encoding = encoding; } @Override public Reader getReader() throws Exception { return new InputStreamReader(new FileInputStream(file), encoding); } @Override public String getFileName() { return this.file.getAbsolutePath(); } } public static class StringCodeLoader extends CodeLoader { public static final String DEFAULT_NAME = "CODE_LOADED_FROM_STRING"; private String code; private String name; public StringCodeLoader(String code) { this(code, DEFAULT_NAME); } public StringCodeLoader(String code, String name) { this.code = code; this.name = name; } @Override public Reader getReader() { return new StringReader(code); } @Override public String getFileName() { return name; } } private CodeLoader cl; public SourceCode(CodeLoader cl) { this.cl = cl; } public List<String> getCode() { return cl.getCode(); } public StringBuffer getCodeBuffer() { StringBuffer sb = new StringBuffer(); List<String> lines = cl.getCode(); for (String line : lines) { sb.append(line); sb.append(PMD.EOL); } return sb; } public String getSlice(int startLine, int endLine) { StringBuffer sb = new StringBuffer(); List<String> lines = cl.getCode(); for (int i = startLine - 1; i < endLine && i < lines.size(); i++) { if (sb.length() != 0) { sb.append(PMD.EOL); } sb.append(lines.get(i)); } return sb.toString(); } public String getFileName() { return cl.getFileName(); } }
[ "yuzhongxing88@gmail.com" ]
yuzhongxing88@gmail.com
85ce9a421b1b36321bad74b18b098fb036a28b95
4b451a3f8c0a309d27b7afbcd3a1bc9475665f67
/wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/tables/Th.java
d6483a8f3cf16f35d388a107fa43703f267c2fba
[ "Apache-2.0" ]
permissive
deshpamit/wff
0ba31ea65a77f206dd368d27595ad20ab2d66aca
2551216cf78fa48e37a3eb6ddcb60e79b8b1b2f1
refs/heads/master
2021-01-12T14:08:08.175632
2016-10-01T14:18:17
2016-10-01T14:18:17
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,034
java
package com.webfirmframework.wffweb.tag.html.tables; import java.util.logging.Logger; import com.webfirmframework.wffweb.settings.WffConfiguration; import com.webfirmframework.wffweb.tag.html.AbstractHtml; import com.webfirmframework.wffweb.tag.html.TagNameConstants; import com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute; import com.webfirmframework.wffweb.tag.html.identifier.GlobalAttributable; import com.webfirmframework.wffweb.tag.html.identifier.ThAttributable; /** * @author WFF * @since 1.0.0 * @version 1.0.0 * */ public class Th extends AbstractHtml { private static final long serialVersionUID = 1_0_0L; public static final Logger LOGGER = Logger.getLogger(Th.class.getName()); { init(); } /** * Represents the root of an HTML or XHTML document. All other elements must * be descendants of this element. * * @param base * i.e. parent tag of this tag * @param attributes * An array of {@code AbstractAttribute} * * @since 1.0.0 */ public Th(final AbstractHtml base, final AbstractAttribute... attributes) { super(TagNameConstants.TH, base, attributes); if (WffConfiguration.isDirectionWarningOn()) { warnForUnsupportedAttributes(attributes); } } private static void warnForUnsupportedAttributes( final AbstractAttribute... attributes) { for (final AbstractAttribute abstractAttribute : attributes) { if (!(abstractAttribute != null && (abstractAttribute instanceof ThAttributable || abstractAttribute instanceof GlobalAttributable))) { LOGGER.warning(abstractAttribute + " is not an instance of ThAttribute"); } } } /** * invokes only once per object * * @author WFF * @since 1.0.0 */ protected void init() { // to override and use this method } }
[ "webfirm.framework@gmail.com" ]
webfirm.framework@gmail.com
7ac70cca2fb8e37e7bff1d9b32f725a1a80dbdc2
752769cdbde5709ec894e46509ea26d072f63860
/jsf-demos/im/src/main/java/com/jsf/config/DataConfig.java
aa9ec10d7881e95816f72d541f0aa9799e39ecdd
[ "BSD-3-Clause" ]
permissive
cjg208/JSF
dca375b472d16e2a7cb9ac56e939b63d60cc86cf
693041b6bb6a1b753d3be072c8ee7d879622e6b5
refs/heads/master
2023-01-01T08:39:47.925873
2020-10-27T08:35:08
2020-10-27T08:35:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
3,577
java
package com.jsf.config; import com.github.pagehelper.PageInterceptor; import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.session.SqlSessionFactory; import org.mybatis.spring.SqlSessionFactoryBean; import org.mybatis.spring.SqlSessionTemplate; import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.boot.autoconfigure.SpringBootVFS; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Primary; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.jdbc.datasource.DataSourceTransactionManager; import org.springframework.transaction.PlatformTransactionManager; import org.springframework.transaction.annotation.EnableTransactionManagement; import javax.sql.DataSource; import java.util.Properties; /** * Created with IntelliJ IDEA. * Description: DBๆ•ฐๆฎๆบใ€Mybatis|Pluginsใ€ไบ‹ๅŠก * User: xujunfei * Date: 2017-11-28 * Time: 10:43 * * @version 2.0 */ @Configuration @MapperScan(basePackages = {DataConfig.mapperPackage}, sqlSessionFactoryRef = "sqlSessionFactory") @EnableTransactionManagement public class DataConfig { private Logger logger = LoggerFactory.getLogger(DataConfig.class); public final static String mapperPackage = "com.jsf.database.mapper"; public final static String modelPackage = "com.jsf.database.model"; public final static String xmlMapperLocation = "classpath*:mapper/**/*.xml"; @Bean(name = "sqlSessionFactory") @Primary public SqlSessionFactory sqlSessionFactory(DataSource dataSource) { try { SqlSessionFactoryBean bean = new SqlSessionFactoryBean(); bean.setDataSource(dataSource); // we MUST set the 'VFS' if you use jar bean.setVfs(SpringBootVFS.class); // ๅฎžไฝ“็ฑปไฝ็ฝฎ bean.setTypeAliasesPackage(modelPackage); // ่ฎพ็ฝฎmapper.xmlๆ–‡ไปถๆ‰€ๅœจไฝ็ฝฎ org.springframework.core.io.Resource[] resources = new PathMatchingResourcePatternResolver().getResources(xmlMapperLocation); bean.setMapperLocations(resources); // ๆทปๅŠ ๅˆ†้กตๆ’ไปถ PageInterceptor pageHelper = new PageInterceptor(); Properties p = new Properties(); p.setProperty("helperDialect", "mysql"); // ๆ•ฐๆฎๅบ“ๆ–น่จ€๏ผŒๆณจๆ„ๅฆ‚ๆžœๆ˜ฏpgๆ•ฐๆฎๅบ“๏ผŒ่ฏทๆ›ฟๆขไธบpostgresql p.setProperty("supportMethodsArguments", "true"); p.setProperty("params", "pageNum=pageNo;pageSize=pageSize;"); pageHelper.setProperties(p); Interceptor[] plugins = new Interceptor[]{pageHelper}; bean.setPlugins(plugins); return bean.getObject(); } catch (Exception e) { logger.error("Database sqlSessionFactory create error!", e); return null; } } @Bean(name = "sqlSessionTemplate") @Primary public SqlSessionTemplate sqlSessionTemplate(@Qualifier("sqlSessionFactory") SqlSessionFactory sqlSessionFactory) { return new SqlSessionTemplate(sqlSessionFactory); } /** * ไบ‹ๅŠก็ฎก็† * * @return */ @Bean(name = "platformTransactionManager") @Primary public PlatformTransactionManager platformTransactionManager(DataSource dataSource) { return new DataSourceTransactionManager(dataSource); } }
[ "809573150@qq.com" ]
809573150@qq.com
86cbb904c1bdde335c500fcc9b77d9f5440fcb0b
0e0343f1ceacde0b67d7cbf6b0b81d08473265ab
/bpmn/aurora.bpmn.designer.rcp/src/aurora/ide/designer/diagram/feature/AChoreographyTaskFeatureContainer.java
77cdc94dd178035e7cdd6db8b2cc864801f7a6d0
[]
no_license
Chajunghun/aurora-project
33d5f89e9f21c49d01d3d09d32102d3c496df851
d4d39861446ea941929780505987dbaf9e3b7a8d
refs/heads/master
2021-01-01T05:39:36.339810
2015-03-24T07:41:45
2015-03-24T07:41:45
33,435,911
0
1
null
null
null
null
UTF-8
Java
false
false
812
java
package aurora.ide.designer.diagram.feature; import org.eclipse.bpmn2.modeler.ui.features.choreography.ChoreographyTaskFeatureContainer; import org.eclipse.graphiti.features.IFeatureProvider; import org.eclipse.graphiti.features.custom.ICustomFeature; import aurora.ide.bpmn.model.ex.feature.ShowWebSettingFeature; public class AChoreographyTaskFeatureContainer extends ChoreographyTaskFeatureContainer { public ICustomFeature[] getCustomFeatures(IFeatureProvider fp) { ICustomFeature[] superFeatures = super.getCustomFeatures(fp); ICustomFeature[] thisFeatures = new ICustomFeature[1 + superFeatures.length]; for (int i = 0; i < superFeatures.length; ++i) { thisFeatures[i] = superFeatures[i]; } thisFeatures[superFeatures.length] = new ShowWebSettingFeature(fp); return thisFeatures; } }
[ "rufus.sly@gmail.com@c3805726-bc34-11dd-8164-2ff6f70dce53" ]
rufus.sly@gmail.com@c3805726-bc34-11dd-8164-2ff6f70dce53
b1ce0d4fa91e2f729ed421844b00ddc344be5e6e
963599f6f1f376ba94cbb504e8b324bcce5de7a3
/sources/com/jakewharton/rxbinding2/view/AutoValue_ViewLayoutChangeEvent.java
e55fffe58325d4ab54a9ec10e424cafdda3c9e17
[]
no_license
NikiHard/cuddly-pancake
563718cb73fdc4b7b12c6233d9bf44f381dd6759
3a5aa80d25d12da08fd621dc3a15fbd536d0b3d4
refs/heads/main
2023-04-09T06:58:04.403056
2021-04-20T00:45:08
2021-04-20T00:45:08
null
0
0
null
null
null
null
UTF-8
Java
false
false
2,890
java
package com.jakewharton.rxbinding2.view; import android.view.View; final class AutoValue_ViewLayoutChangeEvent extends ViewLayoutChangeEvent { private final int bottom; private final int left; private final int oldBottom; private final int oldLeft; private final int oldRight; private final int oldTop; private final int right; private final int top; private final View view; AutoValue_ViewLayoutChangeEvent(View view2, int i, int i2, int i3, int i4, int i5, int i6, int i7, int i8) { if (view2 != null) { this.view = view2; this.left = i; this.top = i2; this.right = i3; this.bottom = i4; this.oldLeft = i5; this.oldTop = i6; this.oldRight = i7; this.oldBottom = i8; return; } throw new NullPointerException("Null view"); } public View view() { return this.view; } public int left() { return this.left; } public int top() { return this.top; } public int right() { return this.right; } public int bottom() { return this.bottom; } public int oldLeft() { return this.oldLeft; } public int oldTop() { return this.oldTop; } public int oldRight() { return this.oldRight; } public int oldBottom() { return this.oldBottom; } public String toString() { return "ViewLayoutChangeEvent{view=" + this.view + ", left=" + this.left + ", top=" + this.top + ", right=" + this.right + ", bottom=" + this.bottom + ", oldLeft=" + this.oldLeft + ", oldTop=" + this.oldTop + ", oldRight=" + this.oldRight + ", oldBottom=" + this.oldBottom + "}"; } public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof ViewLayoutChangeEvent)) { return false; } ViewLayoutChangeEvent viewLayoutChangeEvent = (ViewLayoutChangeEvent) obj; if (this.view.equals(viewLayoutChangeEvent.view()) && this.left == viewLayoutChangeEvent.left() && this.top == viewLayoutChangeEvent.top() && this.right == viewLayoutChangeEvent.right() && this.bottom == viewLayoutChangeEvent.bottom() && this.oldLeft == viewLayoutChangeEvent.oldLeft() && this.oldTop == viewLayoutChangeEvent.oldTop() && this.oldRight == viewLayoutChangeEvent.oldRight() && this.oldBottom == viewLayoutChangeEvent.oldBottom()) { return true; } return false; } public int hashCode() { return ((((((((((((((((this.view.hashCode() ^ 1000003) * 1000003) ^ this.left) * 1000003) ^ this.top) * 1000003) ^ this.right) * 1000003) ^ this.bottom) * 1000003) ^ this.oldLeft) * 1000003) ^ this.oldTop) * 1000003) ^ this.oldRight) * 1000003) ^ this.oldBottom; } }
[ "a.amirovv@mail.ru" ]
a.amirovv@mail.ru
531ab0d9a89bad8c844ec28e10a687e4c7651d4c
32f38cd53372ba374c6dab6cc27af78f0a1b0190
/app/src/main/java/com/autonavi/minimap/basemap/traffic/net/AudioDownloadCallback.java
41600c87f193b1ca71f6918af5277ca5adacbef7
[]
no_license
shuixi2013/AmapCode
9ea7aefb42e0413f348f238f0721c93245f4eac6
1a3a8d4dddfcc5439df8df570000cca12b15186a
refs/heads/master
2023-06-06T23:08:57.391040
2019-08-29T04:36:02
2019-08-29T04:36:02
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,633
java
package com.autonavi.minimap.basemap.traffic.net; import android.os.Environment; import com.amap.bundle.blutils.FileUtil; import com.autonavi.common.Callback; import com.autonavi.common.Callback.CachePolicyCallback; import com.autonavi.common.Callback.CachePolicyCallback.CachePolicy; import com.autonavi.common.Callback.d; import java.io.File; public abstract class AudioDownloadCallback implements Callback<File>, CachePolicyCallback, d { private String url; public String getCacheKey() { return null; } public void onCancelled() { } public void onLoading(long j, long j2) { } public void onStart() { } public String getUrl() { return this.url; } public void setUrl(String str) { this.url = str; } public CachePolicy getCachePolicy() { return CachePolicy.NetworkOnly; } public final String getSavePath() { String substring = this.url.substring(this.url.lastIndexOf("/") + 1); StringBuilder sb = new StringBuilder(); sb.append(agy.a(substring)); sb.append(".spx"); String sb2 = sb.toString(); if (Environment.getExternalStorageState().equals("mounted")) { StringBuilder sb3 = new StringBuilder(); sb3.append(Environment.getExternalStorageDirectory()); sb3.append("/autonavi/audio/"); return new File(sb3.toString(), sb2).getPath(); } StringBuilder sb4 = new StringBuilder(); sb4.append(FileUtil.getFilesDir()); sb4.append("/audio/"); sb4.append(sb2); return sb4.toString(); } }
[ "hubert.yang@nf-3.com" ]
hubert.yang@nf-3.com
8b080005a3bfdf47729fbdc0ddcfce6bad27cc1f
54f220fdf8a4e9a49a3ce0235f4c550440fe91e0
/network-programming-in-java/src/main/java/com/youxiang/chapter09/PooledDaytimeServer.java
1e86d0223e959c0ca7136f3e4829949a13f815a9
[]
no_license
RiversLau/java-network-programming
5af90789cf93e23abe3b5be1014e699a808bc88c
895828d8b937db72242d7441b57f382953ff5854
refs/heads/master
2020-03-08T14:26:12.204199
2018-04-15T09:10:16
2018-04-15T09:10:16
128,184,860
0
0
null
null
null
null
UTF-8
Java
false
false
1,902
java
package com.youxiang.chapter09; import java.io.IOException; import java.io.OutputStreamWriter; import java.io.Writer; import java.net.ServerSocket; import java.net.Socket; import java.util.Date; import java.util.concurrent.Callable; import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; /** * @author: Rivers * @date: 2018/4/7 */ public class PooledDaytimeServer { private static final int PORT = 1313; public static void main(String[] args) { ExecutorService pool = Executors.newFixedThreadPool(50); try (ServerSocket ss = new ServerSocket(PORT)) { while (true) { try { Socket connection = ss.accept(); DaytimeTask task = new DaytimeTask(connection); pool.submit(task); } catch (IOException ex) { System.out.println("Accept failed"); } } } catch (IOException ex) { System.out.println("Initialize ServerSocket failed"); } } private static class DaytimeTask implements Callable<Void> { private Socket connection; DaytimeTask(Socket connection) { this.connection = connection; } @Override public Void call() throws Exception { try { Writer out = new OutputStreamWriter(connection.getOutputStream()); Date now = new Date(); out.write(now.toString() + "\r\n"); out.flush(); } catch (IOException e) { e.printStackTrace(); System.out.println(e); } finally { try { connection.close(); } catch (IOException e) { //do nothing } } return null; } } }
[ "zhaoxiang0805@hotmail.com" ]
zhaoxiang0805@hotmail.com
1c811648e60e0c81cce8a6440391cc5a071d3a74
27b591ce909342d4b30682a73b4971521f8984b6
/wiki-admin/src/main/java/com/hzqing/admin/domain/system/UserInfoDetails.java
0ca827f6bb00c9ba021b1f2b4411ae0a25cb966e
[ "MIT" ]
permissive
scokaven/HZQ-Wiki
699726de8285ec566091b43de41df42406ce34ab
8573e1f40e7a5868156694db1d165c63d76a6843
refs/heads/master
2020-12-10T23:00:05.019170
2020-01-11T08:47:30
2020-01-11T08:47:30
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,809
java
package com.hzqing.admin.domain.system; import lombok.Data; import org.springframework.security.core.GrantedAuthority; import org.springframework.security.core.userdetails.UserDetails; import java.util.List; /** * @author hzqing * @date 2019-05-21 10:47 */ @Data public class UserInfoDetails implements UserDetails { /** * ็”จๆˆทid */ int userId; /** * ็”จๆˆท็™ป้™†ๅ็งฐ */ String username; /** * ็”จๆˆท็™ป้™†ๅฏ†็  */ String password; /** * ๆ‰€ๆœ‰็š„่ต„ๆบid */ List<GrantedAuthority> authorities; boolean accountNonExpired; boolean accountNonLocked; boolean credentialsNonExpired; boolean enabled; public UserInfoDetails() { } public UserInfoDetails(int userId, String username, String password) { this.userId = userId; this.username = username; this.password = password; } public UserInfoDetails(int userId, String username, String password, List<GrantedAuthority> authorities, boolean accountNonExpired, boolean accountNonLocked, boolean credentialsNonExpired, boolean enabled) { this.userId = userId; this.username = username; this.password = password; this.authorities = authorities; this.accountNonExpired = accountNonExpired; this.accountNonLocked = accountNonLocked; this.credentialsNonExpired = credentialsNonExpired; this.enabled = enabled; } @Override public boolean isAccountNonExpired() { return true; } @Override public boolean isAccountNonLocked() { return true; } @Override public boolean isCredentialsNonExpired() { return true; } @Override public boolean isEnabled() { return true; } }
[ "hengzhaoqing@163.com" ]
hengzhaoqing@163.com
45c7ffc102baceedde364a4e828b4b5555a4566b
205135c18cd7e264d5a3abd49a096930c7453970
/test/com/xfashion/shared/BarcodeHelperTest.java
95edbc1278065c87b847ba6e9a9de6a5de9958ca
[]
no_license
archmage74/x-fashion
25f34b2fb0a76b04ae921de95facf6d576c4eaae
a72f6facd0716e3b74b42cfdeea1000d2e7fe338
refs/heads/master
2020-04-09T10:37:37.353269
2012-10-21T16:57:55
2012-10-21T16:57:55
3,690,556
0
0
null
null
null
null
UTF-8
Java
false
false
611
java
package com.xfashion.shared; import org.junit.Test; import junit.framework.Assert; public class BarcodeHelperTest { @Test public void barcodeTest1() { BarcodeHelper bh = new BarcodeHelper(); Long input = 101008000037L; String actual = bh.generateEan(input); String expected = "1010080000370"; Assert.assertEquals(expected, actual); } @Test public void barcodeTest2() { BarcodeHelper bh = new BarcodeHelper(); Long input = 567814569871L; String actual = bh.generateEan(input); String expected = "5678145698717"; Assert.assertEquals(expected, actual); } }
[ "werner.puff@gmx.net" ]
werner.puff@gmx.net
d5d139f7c90626e628e7a9bcd8546cb7f9ebc6b2
eaae18539fef63104faf926e88f4e39721cc313b
/src/Poberezhets/e-olimp/week2/Main.java
a8937b5381e38bc5e722dfe2c5075c478cea7e48
[]
no_license
anneteka/OKAlabs
e83977d9f58f93ce3c985584e45330b7d7d06b2b
44c1215cf90117ea15e8db0035adcab895a0a970
refs/heads/master
2020-04-09T15:10:40.869208
2018-12-20T22:05:53
2018-12-20T22:05:53
160,418,193
2
8
null
null
null
null
UTF-8
Java
false
false
2,433
java
/** * ะฏะบะพััŒ ะฝะฐั€ะตัˆั‚ั– ะถะธั‚ะตะปั– ะฟะปะฐะฝะตั‚ะธ ะ—ะตะผะปั ะทะฝะฐะนัˆะปะธ ะทะฐัะตะปะตะฝัƒ ะฟะปะฐะฝะตั‚ัƒ, ะฝะฐะทะฒะฐะปะธ ั—ั— ะขะขะ’, * ั– ะฒั–ะดะฟั€ะฐะฒะธะปะธ ั€ะฐะทะพะผ ะท ะบะพั€ะฐะฑะปะตะผ ั‚ัƒะดะธ ะพะดะฝะพะณะพ ะบั€ะพะปะธะบะฐ. ะšั€ะพะปะธะบัƒ ัะฟะพะดะพะฑะฐะฒัั ะบะปั–ะผะฐั‚ * ะฝะพะฒะพั— ะฟะปะฐะฝะตั‚ะธ ั– ั‡ะตั€ะตะท ะผั–ััั†ัŒ ะฒั–ะฝ ะฝะฐั€ะพะดะธะฒ ะฝะฐ ัะฒั–ั‚ ั‰ะต ะพะดะฝะพะณะพ ะบั€ะพะปะธะบะฐ. ะ’ั–ะดะพะผะพ, * ั‰ะพ ะบะพะถะตะฝ ะผั–ััั† ะบะพะถะตะฝ ะบั€ะพะปะธะบ, ัะบะธะน ะฑัƒะฒ ะฟั€ะธััƒั‚ะฝั–ั ะฝะฐ ะฟะปะฐะฝะตั‚ั–, ะฒั–ะดั‚ะฒะพั€ัŽะฒะฐะฒ ะฝะฐ * ัะฒั–ั‚ ั‰ะต ะพะดะฝะพะณะพ ะบั€ะพะปะธะบะฐ. ะะฐ ะฟะปะฐะฝะตั‚ั– ะทะฒั–ะดะบั–ะปัััŒ ะทะฐะฒั–ัั ะผะพะฝัั‚ั€, ัะบะธะน ะฝะฐ ะฟะพั‡ะฐั‚ะบัƒ * ะผั–ััั†ั ะท'ั—ะดะฐะฒ k ะบั€ะพะปะธะบั–ะฒ, ัะบ ั‚ั–ะปัŒะบะธ ั—ั… ัั‚ะฐะฒะฐะปะพ ัั‚ั€ะพะณะพ ะฑั–ะปัŒัˆะต k. ะฃ ะทะฐะดะฐั‡ั– * ะฝะตะพะฑั…ั–ะดะฝะพ ะฒะธะทะฝะฐั‡ะธั‚ะธ ะบั–ะปัŒะบั–ัั‚ัŒ ะบั€ะพะปะธะบั–ะฒ, ัะบะฐ ะฑัƒะดะต ะฝะฐ ะฟะปะฐะฝะตั‚ั– ั‡ะตั€ะตะท n ะผั–ััั†ั–ะฒ * ะฟั–ัะปั ะฟั€ะธะฑัƒั‚ั‚ั ะฝะฐ ะฝะตั— ะบะพัะผั–ั‡ะฝะพะณะพ ะบะพั€ะฐะฑะปั ะท ะฟะตั€ัˆะธะผ ะบั€ะพะปะธะบะพะผ. * * * ะ’ั…ั–ะดะฝั– ะดะฐะฝั– * * ะŸะตั€ัˆะธะน ั€ัะดะพะบ ะผั–ัั‚ะธั‚ัŒ ะบั–ะปัŒะบั–ัั‚ัŒ ะผั–ััั†ั–ะฒ n (0 โ‰ค n โ‰ค 100), ะดั€ัƒะณะธะน - ั‡ะธัะปะพ * ะบั€ะพะปะธะบั–ะฒ k(0 โ‰ค k โ‰ค 10000), ัะบะธั… ะท'ั—ะดะฐะฒ ะผะพะฝัั‚ั€. * * ะ’ะธั…ั–ะดะฝั– ะดะฐะฝั– * * ะ’ะธะทะฝะฐั‡ั–ั‚ัŒ ะบั–ะปัŒะบั–ัั‚ัŒ ะบั€ะพะปะธะบั–ะฒ, ัะบั– ะฑัƒะดัƒั‚ัŒ ะทะฝะฐั…ะพะดะธั‚ะธััŒ ะฝะฐ ะฟะปะฐะฝะตั‚ั– ะขะขะ’ ั‡ะตั€ะตะท n * ะผั–ััั†ั–ะฒ ะฟั–ัะปั ะฟะพัะตะปะตะฝะฝั ะฝะฐ ะฝะตั— ะฟะตั€ัˆะพะณะพ ะบั€ะพะปะธะบะฐ. ะ’ั–ะดะพะผะพ, ั‰ะพ ั€ะตะทัƒะปัŒั‚ะฐั‚ ะดะปั * ะดะพะฒั–ะปัŒะฝะพะณะพ ั‚ะตัั‚ัƒ ะทะฐะฒะถะดะธ ะฝะต ะฟะตั€ะตะฒะธั‰ัƒั” 2*109. * * @author ะ‘ะพะณะดะฐะฝะฐ * */ import java.io.IOError; import java.io.IOException; import java.io.InputStream; import java.util.Scanner; public class Main { public static void main(String[] args) throws IOException { Main obj=new Main(); obj.beginProcess(); } void beginProcess() throws IOException{ Scanner in = new Scanner(System.in); while (in.hasNextInt()) { int n = in.nextInt(); int k = in.nextInt(); if ((n >=0 && n <= 100) && (k >=0 && k <=10000)) { System.out.println(rabbits(n, k)); } } } public static int rabbits(int n, int k) { int am = 1; for (int i = 0; i < n; i++) { if (am > k) am = am - k; am = am * 2; } return am; } }
[ "a.karlysheva@ukma.edu.ua" ]
a.karlysheva@ukma.edu.ua
ca119e9c4773d58a517ef85f2a457509032c1009
58d9997a806407a09c14aa0b567e57d486b282d4
/com/planet_ink/coffee_mud/Commands/AutoInvoke.java
c8a75957d1be6361e7b2663c0a8c677c00c523dc
[ "Apache-2.0" ]
permissive
kudos72/DBZCoffeeMud
553bc8619a3542fce710ba43bac01144148fe2ed
19a3a7439fcb0e06e25490e19e795394da1df490
refs/heads/master
2021-01-10T07:57:01.862867
2016-03-17T23:04:25
2016-03-17T23:04:25
39,215,834
0
0
null
null
null
null
UTF-8
Java
false
false
6,557
java
package com.planet_ink.coffee_mud.Commands; import com.planet_ink.coffee_mud.core.interfaces.*; import com.planet_ink.coffee_mud.core.*; import com.planet_ink.coffee_mud.core.collections.*; import com.planet_ink.coffee_mud.Abilities.interfaces.*; import com.planet_ink.coffee_mud.Areas.interfaces.*; import com.planet_ink.coffee_mud.Behaviors.interfaces.*; import com.planet_ink.coffee_mud.CharClasses.interfaces.*; import com.planet_ink.coffee_mud.Commands.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.*; import com.planet_ink.coffee_mud.Common.interfaces.Session.InputCallback; import com.planet_ink.coffee_mud.Exits.interfaces.*; import com.planet_ink.coffee_mud.Items.interfaces.*; import com.planet_ink.coffee_mud.Libraries.interfaces.*; import com.planet_ink.coffee_mud.Locales.interfaces.*; import com.planet_ink.coffee_mud.MOBS.interfaces.*; import com.planet_ink.coffee_mud.Races.interfaces.*; import java.util.*; /* Copyright 2000-2014 Bo Zimmerman 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. */ @SuppressWarnings("rawtypes") public class AutoInvoke extends StdCommand { public AutoInvoke(){} private final String[] access=I(new String[]{"AUTOINVOKE"}); @Override public String[] getAccessWords(){return access;} protected enum AutoInvokeCommand { TOGGLE, INVOKE, UNINVOKE } protected void autoInvoke(MOB mob, Ability foundA, String s, Set<String> effects, AutoInvokeCommand cmd) { if(foundA==null) mob.tell(L("'@x1' is invalid.",s)); else if(effects.contains(foundA.ID())) { if((cmd == AutoInvokeCommand.UNINVOKE) || (cmd == AutoInvokeCommand.TOGGLE)) { foundA=mob.fetchEffect(foundA.ID()); if(foundA!=null) { mob.delEffect(foundA); if(mob.fetchEffect(foundA.ID())!=null) mob.tell(L("@x1 failed to successfully deactivate.",foundA.name())); else mob.tell(L("@x1 successfully deactivated.",foundA.name())); } } } else { if((cmd == AutoInvokeCommand.INVOKE) || (cmd == AutoInvokeCommand.TOGGLE)) { foundA.autoInvocation(mob, true); if(mob.fetchEffect(foundA.ID())!=null) mob.tell(L("@x1 successfully invoked.",foundA.name())); else mob.tell(L("@x1 failed to successfully invoke.",foundA.name())); } } } @Override public boolean execute(final MOB mob, Vector commands, int metaFlags) throws java.io.IOException { final List<Ability> abilities=new Vector<Ability>(); final Set<String> abilityids=new TreeSet<String>(); for(int a=0;a<mob.numAbilities();a++) { final Ability A=mob.fetchAbility(a); if((A!=null) &&(A.isAutoInvoked()) &&((A.classificationCode()&Ability.ALL_ACODES)!=Ability.ACODE_LANGUAGE) &&((A.classificationCode()&Ability.ALL_ACODES)!=Ability.ACODE_PROPERTY)) { abilities.add(A); abilityids.add(A.ID()); } } final Set<String> effects=new TreeSet<String>(); for(int a=0;a<mob.numEffects();a++) { final Ability A=mob.fetchEffect(a); if((A!=null) &&(abilityids.contains(A.ID())) &&(!A.isSavable())) effects.add(A.ID()); } abilityids.clear(); Collections.sort(abilities,new Comparator<Ability>(){ @Override public int compare(Ability o1, Ability o2) { if(o1==null) { if(o2==null) return 0; return -1; } else if(o2==null) return 1; else return o1.name().compareToIgnoreCase(o2.name()); } }); final StringBuffer str=new StringBuffer(L("^xAuto-invoking abilities:^?^.\n\r^N")); int col=0; for(Ability A : abilities) { if(A!=null) { if(effects.contains(A.ID())) str.append(L("@x1.^xACTIVE^?^.^N ",CMStrings.padRightWith(A.Name(),'.',29))); else str.append(L("@x1^xINACTIVE^?^.^N",CMStrings.padRightWith(A.Name(),'.',29))); if(++col==2) { col=0; str.append("\n\r"); } else str.append(" "); } } if(col==1) str.append("\n\r"); mob.tell(str.toString()); final Session session=mob.session(); if(session!=null) { final AutoInvoke me=this; session.prompt(new InputCallback(InputCallback.Type.PROMPT,"",0) { @Override public void showPrompt() { session.promptPrint(L("Enter one to toggle or RETURN: "));} @Override public void timedOut() { } @Override public void callBack() { String s=this.input; AutoInvokeCommand cmd=AutoInvokeCommand.TOGGLE; if(s.toUpperCase().startsWith("INVOKE ")) { s=s.substring(7).trim(); cmd=AutoInvokeCommand.INVOKE; } else if(s.toUpperCase().startsWith("UNINVOKE ")) { s=s.substring(9).trim(); cmd=AutoInvokeCommand.UNINVOKE; } boolean startsWith=s.endsWith("*"); if(startsWith) s=s.substring(0,s.length()-1).toLowerCase(); boolean endsWith=s.startsWith("*"); if(endsWith) s=s.substring(1).toLowerCase(); if(startsWith || endsWith) { for(Ability A : abilities) { if((A!=null) &&(A.name().equalsIgnoreCase(s) || (startsWith && A.name().toLowerCase().startsWith(s)) || (endsWith && A.name().toLowerCase().endsWith(s)))) { me.autoInvoke(mob, A, s, effects, cmd); } } } else if(s.length()>0) { Ability foundA=null; for(Ability A : abilities) { if((A!=null) &&(A.name().equalsIgnoreCase(s) || (startsWith && A.name().toLowerCase().startsWith(s)) || (endsWith && A.name().toLowerCase().endsWith(s)))) { foundA=A; break;} } if(foundA==null) for(Ability A : abilities) { if((A!=null)&&(CMLib.english().containsString(A.name(),s))) { foundA=A; break;} } me.autoInvoke(mob, foundA, s, effects, cmd); } mob.recoverCharStats(); mob.recoverPhyStats(); mob.recoverMaxState(); if(mob.location()!=null) mob.location().recoverRoomStats(); mob.recoverCharStats(); mob.recoverPhyStats(); mob.recoverMaxState(); } }); } return false; } @Override public boolean canBeOrdered(){return true;} }
[ "kirk.narey@gmail.com" ]
kirk.narey@gmail.com
9a7875979b9486e51257405e356107c004e06efd
263b9556d76279459ab9942b0005a911e2b085c5
/src/main/java/com/alipay/api/response/SsdataDataserviceRiskDeviceidentityQueryResponse.java
73a58305851b7b7eb236a527db1f1538c3cdd2ea
[ "Apache-2.0" ]
permissive
getsgock/alipay-sdk-java-all
1c98ffe7cb5601c715b4f4b956e6c2b41a067647
1ee16a85df59c08fb9a9b06755743711d5cd9814
refs/heads/master
2020-03-30T05:42:59.554699
2018-09-19T06:17:22
2018-09-19T06:17:22
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,883
java
package com.alipay.api.response; import com.alipay.api.internal.mapping.ApiField; import com.alipay.api.AlipayResponse; /** * ALIPAY API: ssdata.dataservice.risk.deviceidentity.query response. * * @author auto create * @since 1.0, 2017-12-14 10:15:49 */ public class SsdataDataserviceRiskDeviceidentityQueryResponse extends AlipayResponse { private static final long serialVersionUID = 7411114497277413953L; /** * ็›—ๅก็›—่ดฆๆˆทๆฆ‚็އ๏ผŒ็”จไบŽ่ฏ†ๅˆซ่ดฆๅท่ขซ็›—็š„้ฃŽ้™ฉ๏ผŒๆ•ฐๅ€ผ่ถŠๅคง้ฃŽ้™ฉๆฆ‚็އ่ถŠๅคง๏ผŒ่Œƒๅ›ด0~1๏ผŒๅฐๆ•ฐ็‚นๅŽไฟ็•™6ๆœ‰ๆ•ˆๆ•ฐ */ @ApiField("ato_score") private String atoScore; /** * ่บซไปฝ่ขซๅ†’็”จๆฆ‚็އ๏ผŒ็”จไบŽ่ฏ†ๅˆซ่ดฆๅท่ขซๅ†’็”จ้ฃŽ้™ฉ๏ผŒๆ•ฐๅ€ผ่ถŠๅคง้ฃŽ้™ฉๆฆ‚็އ่ถŠๅคง๏ผŒ่Œƒๅ›ด0~1๏ผŒๅฐๆ•ฐ็‚นๅŽไฟ็•™6ๆœ‰ๆ•ˆๆ•ฐ */ @ApiField("fake_score") private String fakeScore; /** * ๅžƒๅœพ่ดฆๆˆทๆฆ‚็އ๏ผŒ็”จไบŽ่ฏ†ๅˆซๅžƒๅœพ่ดฆๆˆท็š„้ฃŽ้™ฉ๏ผŒๆ•ฐๅ€ผ่ถŠๅคง้ฃŽ้™ฉๆฆ‚็އ่ถŠๅคง๏ผŒ่Œƒๅ›ด0~1๏ผŒๅฐๆ•ฐ็‚นๅŽไฟ็•™6ๆœ‰ๆ•ˆๆ•ฐ */ @ApiField("rub_score") private String rubScore; /** * ่ฎพๅค‡ID๏ผŒ่ฎพๅค‡็š„ๅ”ฏไธ€่ฏ†ๅˆซๅท */ @ApiField("umid") private String umid; /** * ่ฐƒ็”จ่ฎขๅ•ๅท๏ผŒๆœๅŠก็ซฏๅ”ฏไธ€ไธช่ฏ†ๅˆซๅท */ @ApiField("unique_id") private String uniqueId; public void setAtoScore(String atoScore) { this.atoScore = atoScore; } public String getAtoScore( ) { return this.atoScore; } public void setFakeScore(String fakeScore) { this.fakeScore = fakeScore; } public String getFakeScore( ) { return this.fakeScore; } public void setRubScore(String rubScore) { this.rubScore = rubScore; } public String getRubScore( ) { return this.rubScore; } public void setUmid(String umid) { this.umid = umid; } public String getUmid( ) { return this.umid; } public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; } public String getUniqueId( ) { return this.uniqueId; } }
[ "liuqun.lq@alibaba-inc.com" ]
liuqun.lq@alibaba-inc.com
eda139cbb3f5f3b5d55c0501bbfb82951d3bb35d
99a9d063175d24b6c7a29c5419e8078057327f8b
/spring-boot-springbatch/src/main/java/com/sl/conditional/Conditional.java
264e67271e7b12ab9e9eccd8df11bd2f6abb6196
[]
no_license
FadeHub/spring-boot-learn
4fce4f17229434583526a8aa903abb29b5c5ecaa
5df5333e9c6e0c5721d9389bcc98b5669b8f92fb
refs/heads/master
2022-10-13T14:18:52.842687
2022-10-04T09:09:53
2022-10-04T09:09:53
196,712,086
33
48
null
2022-10-04T09:10:48
2019-07-13T11:06:26
Java
UTF-8
Java
false
false
517
java
package com.sl.conditional; /** * @author shuliangzhao * @Title: Test * @ProjectName spring-boot-learn * @Description: TODO * @date 2020/12/16 20:18 */ public class Conditional { private String user; private Boolean enable; public void setUser(String user) { this.user = user; } public String getUser() { return user; } public Boolean getEnable() { return enable; } public void setEnable(Boolean enable) { this.enable = enable; } }
[ "809894780@qq.com" ]
809894780@qq.com
d90802d7d2a9f1064af281470ecc8b10953b09e3
fb3f91fb6c18bb93c5d51b58d13e201203833994
/Trabajos/Sernanp/sources/SernanpApp/SernanpAppDao/src/main/java/sernanp/app/dao/query/mapper/RpPadronTrabajadoresQueryMapper.java
b0f1909c9204046a8efbf4faaa541cac47f52f7e
[]
no_license
cgb-extjs-gwt/avgust-extjs-generator
d24241e594078eb8af8e33e99be64e56113a1c0c
30677d1fef4da73e2c72b6c6dfca85d492e1a385
refs/heads/master
2023-07-20T04:39:13.928605
2018-01-16T18:17:23
2018-01-16T18:17:23
null
0
0
null
null
null
null
UTF-8
Java
false
false
897
java
package sernanp.app.dao.query.mapper; import java.util.List; import java.util.Map; import org.apache.ibatis.session.RowBounds; import sernanp.app.dao.query.domain.RpPadronTrabajadoresQuery; import sernanp.app.dao.query.domain.RpPadronTrabajadoresQueryCriteria; public interface RpPadronTrabajadoresQueryMapper { List<RpPadronTrabajadoresQuery> getListQueryByCriteria(RpPadronTrabajadoresQueryCriteria criteria); List<RpPadronTrabajadoresQuery> getListQueryByMap(Map<String, Object> paramMap); List<RpPadronTrabajadoresQuery> getListQueryPaginationByCriteria(RpPadronTrabajadoresQueryCriteria criteria, RowBounds rowBounds); List<RpPadronTrabajadoresQuery> getListQueryPaginationByMap(Map<String, Object> paramMap, RowBounds rowBounds); int getCountRowsByCriteria(RpPadronTrabajadoresQueryCriteria criteria); int getCountRowsByMap(Map<String, Object> paramMap); }
[ "raffo8924@gmail.com" ]
raffo8924@gmail.com
8065444fdfe5571749c46ff0caa5b43b73b60fc5
574afb819e32be88d299835d42c067d923f177b0
/src/net/minecraft/client/gui/inventory/GuiBrewingStand.java
4f8372ed10008df4702bd1e2c28d1f09f400ac0f
[]
no_license
SleepyKolosLolya/WintWare-Before-Zamorozka
7a474afff4d72be355e7a46a38eb32376c79ee76
43bff58176ec7422e826eeaf3ab8e868a0552c56
refs/heads/master
2022-07-30T04:20:18.063917
2021-04-25T18:16:01
2021-04-25T18:16:01
361,502,972
6
0
null
null
null
null
UTF-8
Java
false
false
2,575
java
package net.minecraft.client.gui.inventory; import net.minecraft.client.renderer.GlStateManager; import net.minecraft.entity.player.InventoryPlayer; import net.minecraft.inventory.ContainerBrewingStand; import net.minecraft.inventory.IInventory; import net.minecraft.util.ResourceLocation; import net.minecraft.util.math.MathHelper; public class GuiBrewingStand extends GuiContainer { private static final ResourceLocation BREWING_STAND_GUI_TEXTURES = new ResourceLocation("textures/gui/container/brewing_stand.png"); private static final int[] BUBBLELENGTHS = new int[]{29, 24, 20, 16, 11, 6, 0}; private final InventoryPlayer playerInventory; private final IInventory tileBrewingStand; public GuiBrewingStand(InventoryPlayer playerInv, IInventory p_i45506_2_) { super(new ContainerBrewingStand(playerInv, p_i45506_2_)); this.playerInventory = playerInv; this.tileBrewingStand = p_i45506_2_; } public void drawScreen(int mouseX, int mouseY, float partialTicks) { this.drawDefaultBackground(); super.drawScreen(mouseX, mouseY, partialTicks); this.func_191948_b(mouseX, mouseY); } protected void drawGuiContainerForegroundLayer(int mouseX, int mouseY) { String s = this.tileBrewingStand.getDisplayName().getUnformattedText(); this.fontRendererObj.drawString(s, (float)(this.xSize / 2 - this.fontRendererObj.getStringWidth(s) / 2), 6.0F, 4210752); this.fontRendererObj.drawString(this.playerInventory.getDisplayName().getUnformattedText(), 8.0F, (float)(this.ySize - 96 + 2), 4210752); } protected void drawGuiContainerBackgroundLayer(float partialTicks, int mouseX, int mouseY) { GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F); this.mc.getTextureManager().bindTexture(BREWING_STAND_GUI_TEXTURES); int i = (width - this.xSize) / 2; int j = (height - this.ySize) / 2; this.drawTexturedModalRect(i, j, 0, 0, this.xSize, this.ySize); int k = this.tileBrewingStand.getField(1); int l = MathHelper.clamp((18 * k + 20 - 1) / 20, 0, 18); if (l > 0) { this.drawTexturedModalRect(i + 60, j + 44, 176, 29, l, 4); } int i1 = this.tileBrewingStand.getField(0); if (i1 > 0) { int j1 = (int)(28.0F * (1.0F - (float)i1 / 400.0F)); if (j1 > 0) { this.drawTexturedModalRect(i + 97, j + 16, 176, 0, 9, j1); } j1 = BUBBLELENGTHS[i1 / 2 % 7]; if (j1 > 0) { this.drawTexturedModalRect(i + 63, j + 14 + 29 - j1, 185, 29 - j1, 12, j1); } } } }
[ "ask.neverhide@gmail.com" ]
ask.neverhide@gmail.com
f985fb5d119b0d78cf4713f465b15e1b4a7c1a88
56852a3692b9190c1e70b66312a0330a3693d3a0
/src/main/java/net/dries007/ccmv/cmd/CommandPos.java
6d4ec8006cf624cc880e1aa6cb00f5461e881fff
[]
no_license
dries007/ccmv
f111d08f68b600d5af5b8ce6e3120f50cbfdbc0d
7ee10f5b020f91eef22da7e45657ebe042c74f8c
refs/heads/master
2020-04-23T08:34:44.705373
2019-02-16T19:16:10
2019-02-16T19:16:10
171,041,865
0
0
null
null
null
null
UTF-8
Java
false
false
3,050
java
/* * Copyright (c) 2014-2016, Dries007 & DoubleDoorDevelopment * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, this * list of conditions and the following disclaimer. * * Redistributions in binary form must reproduce the above copyright notice, * this list of conditions and the following disclaimer in the documentation * and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ package net.dries007.ccmv.cmd; import net.dries007.ccmv.BlockPosDim; import net.minecraft.command.CommandBase; import net.minecraft.command.CommandException; import net.minecraft.command.ICommandSender; import net.minecraft.command.WrongUsageException; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.server.MinecraftServer; import net.minecraft.util.math.BlockPos; import net.minecraft.util.text.TextComponentString; import javax.annotation.Nullable; import java.util.List; public class CommandPos extends CommandBase { @Override public String getName() { return "pos"; } @Override public String getUsage(ICommandSender icommandsender) { return "/pos <username>"; } @Override public boolean isUsernameIndex(final String[] args, final int userIndex) { return userIndex == 0; } @Override public List<String> getTabCompletions(MinecraftServer server, ICommandSender sender, String[] args, @Nullable BlockPos pos) { if (args.length == 1) return getListOfStringsMatchingLastWord(args, server.getOnlinePlayerNames()); return super.getTabCompletions(server, sender, args, pos); } @Override public void execute(MinecraftServer server, ICommandSender sender, String[] args) throws CommandException { if (args.length == 0) throw new WrongUsageException(getUsage(sender)); EntityPlayerMP target = getPlayer(server, sender, args[0]); sender.sendMessage(target.getDisplayName().appendSibling(new TextComponentString(" is at ").appendSibling(new BlockPosDim(target).toClickableChatString()))); } }
[ "admin@dries007.net" ]
admin@dries007.net
952983795a7072102c3d09836fefe2b3b6b66541
68a19507f18acff18aa4fa67d6611f5b8ac8913c
/slfx/slfx-jp/slfx-jp-domain/src/main/java/slfx/jp/domain/model/policy/JPPlatformPolicy.java
9f6dce533a94cb136ce9332e6dc507650b433b25
[]
no_license
ksksks2222/pl-workspace
cf0d0be2dfeaa62c0d4d5437f85401f60be0eadd
6146e3e3c2384c91cac459d25b27ffeb4f970dcd
refs/heads/master
2021-09-13T08:59:17.177105
2018-04-27T09:46:42
2018-04-27T09:46:42
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,355
java
package slfx.jp.domain.model.policy; import hg.common.component.BaseModel; import hg.common.util.UUIDGenerator; import java.text.SimpleDateFormat; import java.util.Date; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.FetchType; import javax.persistence.JoinColumn; import javax.persistence.OneToOne; import javax.persistence.Table; import slfx.jp.command.admin.policy.PolicyCommand; import slfx.jp.domain.model.J; import slfx.jp.domain.model.dealer.Dealer; import slfx.jp.domain.model.supplier.Supplier; import slfx.jp.pojo.system.PolicyConstants; /** * * @็ฑปๅŠŸ่ƒฝ่ฏดๆ˜Ž๏ผšๅนณๅฐไปทๆ ผๆ”ฟ็ญ– * @็ฑปไฟฎๆ”น่€…๏ผš * @ไฟฎๆ”นๆ—ฅๆœŸ๏ผš * @ไฟฎๆ”น่ฏดๆ˜Ž๏ผš * @ๅ…ฌๅธๅ็งฐ๏ผšๆต™ๆฑŸๆฑ‡่ดญ็ง‘ๆŠ€ๆœ‰้™ๅ…ฌๅธ * @้ƒจ้—จ๏ผšๆŠ€ๆœฏ้ƒจ * @ไฝœ่€…๏ผšqiuxianxiang * @ๅˆ›ๅปบๆ—ถ้—ด๏ผš2014ๅนด8ๆœˆ5ๆ—ฅไธŠๅˆ9:36:36 * @็‰ˆๆœฌ๏ผšV1.0 * */ @Entity @Table(name = J.TABLE_PREFIX + "POLICY") public class JPPlatformPolicy extends BaseModel{ private static final long serialVersionUID = 2115168437070L; /** ๆ”ฟ็ญ–็ผ–ๅท*/ @Column(name="POLICY_NO", length=64) private String no; /** ๆ”ฟ็ญ–ๅ็งฐ*/ @Column(name="POLICY_NAME", length=64) private String name; /** ไพ›ๅบ”ๅ•†ID*/ @Column(name="SUPP_ID", length=64) private String suppId; /** ็ป้”€ๅ•†ID*/ @Column(name="DEALER_ID", length=64) private String dealerId; /** ๅผ€ๅง‹็”Ÿๆ•ˆๆ—ถ้—ด*/ @Column(name="BEGIN_TIME", columnDefinition = J.DATE_COLUM) private Date beginTime; /** ็ป“ๆŸ็”Ÿๆ•ˆๆ—ถ้—ด*/ @Column(name="END_TIME", columnDefinition = J.DATE_COLUM) private Date endTime; /** ไปทๆ ผๆ”ฟ็ญ–*/ @Column(name="PRICE_POLICY", columnDefinition = J.MONEY_COLUM) private Double pricePolicy; /** ไปทๆ ผ็™พๅˆ†ๆฏ”ๆ”ฟ็ญ–:ไปฅ0.23็š„ๅฝขๅผๅญ˜ๅœจ,ๅณ23% */ @Column(name="PERCENT_POLICY", columnDefinition = J.MONEY_COLUM) private Double percentPolicy; /** ็Šถๆ€ * ๆœชๅ‘ๅธƒใ€ ๅทฒๅ‘ๅธƒ ใ€ ๅทฒๅผ€ๅง‹ใ€ ๅทฒไธ‹ๆžถใ€ ๅทฒๅ–ๆถˆ 0 1 2 3 4 * */ @Column(name="STATUS", columnDefinition = J.CHAR_COLUM) private String status; /** ๅˆ›ๅปบไบบ */ @Column(name="CREATE_PERSION", length=64) private String createPersion; /** ๅˆ›ๅปบๆ—ถ้—ด*/ @Column(name="CREATE_TIME", columnDefinition = J.DATE_COLUM) private Date createTime; /** ๅค‡ๆณจ*/ @Column(name="REMARK", length=4000) private String remark; /** ๅ–ๆถˆๅŽŸๅ› */ @Column(name="CANCLE_REASON", length=4000) private String cancleReason; @OneToOne(fetch = FetchType.EAGER) @JoinColumn(name = "SUPP_ID_FOR") private Supplier supplier; @OneToOne(fetch = FetchType.EAGER) @JoinColumn(name = "DEALER_ID_FOR") private Dealer dealer; public JPPlatformPolicy() { super(); // TODO Auto-generated constructor stub } public JPPlatformPolicy(PolicyCommand command) { setId(UUIDGenerator.getUUID()); Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); //ไฝฟ็”จๆ—ถ้—ดไฝœไธบๆ”ฟ็ญ–็ผ–ๅท setNo(sdf.format(date)); setName(command.getName()); setBeginTime(command.getBeginTime()); setEndTime(command.getEndTime()); setPricePolicy(command.getPricePolicy()); setPercentPolicy(command.getPercentPolicy()); setStatus(PolicyConstants.PRE_PUBLISH); setCreatePersion(command.getCreatePersion()); setCreateTime(new Date()); setRemark(command.getRemark()); } public JPPlatformPolicy(PolicyCommand command,Supplier supplier,Dealer dealer) { setId(UUIDGenerator.getUUID()); Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmssSSS"); //ไฝฟ็”จๆ—ถ้—ดไฝœไธบๆ”ฟ็ญ–็ผ–ๅท setNo(sdf.format(date)); setName(command.getName()); setBeginTime(command.getBeginTime()); setEndTime(command.getEndTime()); setPricePolicy(command.getPricePolicy()); setPercentPolicy(command.getPercentPolicy()); setStatus(PolicyConstants.PRE_PUBLISH); setCreatePersion(command.getCreatePersion()); setCreateTime(new Date()); setRemark(command.getRemark()); setSupplier(supplier); setSuppId(supplier.getCode()); setDealer(dealer); setDealerId(dealer.getCode()); } public String getNo() { return no; } public void setNo(String no) { this.no = no; } public String getName() { return name; } public void setName(String name) { this.name = name; } public String getSuppId() { return suppId; } public void setSuppId(String suppId) { this.suppId = suppId; } public String getDealerId() { return dealerId; } public void setDealerId(String dealerId) { this.dealerId = dealerId; } public Date getBeginTime() { return beginTime; } public void setBeginTime(Date beginTime) { this.beginTime = beginTime; } public Date getEndTime() { return endTime; } public void setEndTime(Date endTime) { this.endTime = endTime; } public Double getPricePolicy() { return pricePolicy; } public void setPricePolicy(Double pricePolicy) { this.pricePolicy = pricePolicy; } public Double getPercentPolicy() { return percentPolicy; } public void setPercentPolicy(Double percentPolicy) { this.percentPolicy = percentPolicy; } public String getStatus() { return status; } public void setStatus(String status) { this.status = status; } public String getCreatePersion() { return createPersion; } public void setCreatePersion(String createPersion) { this.createPersion = createPersion; } public Date getCreateTime() { return createTime; } public void setCreateTime(Date createTime) { this.createTime = createTime; } public String getRemark() { return remark; } public void setRemark(String remark) { this.remark = remark; } public String getCancleReason() { return cancleReason; } public void setCancleReason(String cancleReason) { this.cancleReason = cancleReason; } public Supplier getSupplier() { return supplier; } public void setSupplier(Supplier supplier) { this.supplier = supplier; } public Dealer getDealer() { return dealer; } public void setDealer(Dealer dealer) { this.dealer = dealer; } }
[ "cangsong6908@gmail.com" ]
cangsong6908@gmail.com
b3a48264ab1ec79d2a9a2150be63a45ba6d558b9
f0d3fe0ac281c8e4c35fc9f52a17174e47999288
/lion-api/src/main/java/com/lancq/lion/api/event/UserOnlineEvent.java
eb8b2b2cc399b5b07d6677ddc1c3d450b5fbcff2
[]
no_license
lanchunqiu/lion
fc03f6dfa956ff7d2def069ea8a3a854dabbc5c1
69e24657fd64a0048ce864f3856765ad440cae9c
refs/heads/master
2020-04-18T18:59:45.322672
2019-01-28T01:25:02
2019-01-28T01:25:02
167,700,804
2
4
null
null
null
null
UTF-8
Java
false
false
555
java
package com.lancq.lion.api.event; import com.lancq.lion.api.connection.Connection; /** * @Author lancq * @Description * @Date 2019/1/26 **/ public final class UserOnlineEvent implements Event { private final Connection connection; private final String userId; public UserOnlineEvent(Connection connection, String userId) { this.connection = connection; this.userId = userId; } public Connection getConnection() { return connection; } public String getUserId() { return userId; } }
[ "1046582540@qq.com" ]
1046582540@qq.com
67b8243fd2341b911f1814a00e156d0a5e902714
d9ecff17a5bb51d49963e0bd6f0135c86e067dcb
/ReactImport/src/blurock/core/Hierarchy.java
87466b97a8c2496b46cb88d7d09011988f507319
[]
no_license
blurock/webReaction
edcd5e28d0f42e0afa949b32f1a0b3abd0083b66
7a443d30ba48d343da3ee2a30bb011c30b9dbbe8
refs/heads/master
2020-05-17T08:49:41.755387
2019-04-30T20:13:05
2019-04-30T20:13:05
183,616,837
0
0
null
null
null
null
UTF-8
Java
false
false
6,323
java
/* * Hierarchy.java * * Created on May 8, 2001, 2:48 PM */ package blurock.core; import blurock.coreobjects.*; import java.util.*; import javax.swing.*; import javax.swing.tree.*; import java.awt.event.*; import javax.swing.event.*; /** * * @author reaction * @version */ public class Hierarchy extends javax.swing.JPanel { ObjectAsTreeNode topNode = new ObjectAsTreeNode("Build Structure"); DefaultTreeModel treeModel; Hashtable nodeSet = new Hashtable(); public ObjectAsTreeNode selectedNode = null; public boolean isLeafNode = false; public boolean nodeSelected = false; DataObjectClass nodeNameClass; ObjectDisplayManager dispManager; /** Creates new form Hierarchy */ public Hierarchy() { treeModel = new DefaultTreeModel(topNode); treeModel.addTreeModelListener(new MyTreeModelListener()); initComponents (); } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the FormEditor. */ private void initComponents() {//GEN-BEGIN:initComponents scrollPanel = new javax.swing.JScrollPane(); hierarchy = new JTree(treeModel); setLayout(new java.awt.BorderLayout()); hierarchy.setPreferredSize(new java.awt.Dimension(300, 500)); hierarchy.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { hierarchyMouseClicked(evt); } } ); scrollPanel.setViewportView(hierarchy); add(scrollPanel, java.awt.BorderLayout.CENTER); }//GEN-END:initComponents public void setup(DataObjectClass cls, ObjectDisplayManager man) { nodeNameClass = cls; dispManager = man; } private void hierarchyMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_hierarchyMouseClicked // Add your handling code here: nodeSelected = setNode(evt); if(nodeSelected) { System.out.println("Hierarchy Mouse Clicked: " + selectedNode.toString()); if(isLeafNode) System.out.println("Leaf Node"); } else { System.out.println("Hierarchy Mouse Clicked: failure"); } }//GEN-LAST:event_hierarchyMouseClicked public boolean setNode(MouseEvent e) { boolean success = true; TreePath path = hierarchy.getPathForLocation(e.getX(),e.getY()); if(path != null) { selectedNode = (ObjectAsTreeNode) path.getLastPathComponent(); nodeSelected = true; success = setLeafStatus(e); } else { success = false; } return success; } public boolean setLeafStatus(MouseEvent e) { boolean success = true; int selRow = hierarchy.getRowForLocation(e.getX(),e.getY()); if(selRow != -1) { isLeafNode = hierarchy.getModel().isLeaf(selectedNode); } else { success = false; } return success; } public void setTopNode(ObjectAsTreeNode top) { topNode = top; scrollPanel.remove(hierarchy); treeModel = new DefaultTreeModel(topNode); treeModel.addTreeModelListener(new MyTreeModelListener()); hierarchy = new JTree(treeModel); hierarchy.setEditable(true); hierarchy.getSelectionModel().setSelectionMode (TreeSelectionModel.SINGLE_TREE_SELECTION); hierarchy.setShowsRootHandles(true); scrollPanel.setViewportView(hierarchy); scrollPanel.updateUI(); hierarchy.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { hierarchyMouseClicked(evt); }}); nodeSet.put((Object) top.toString(), (Object) top); } public void addNodeToSet(ObjectAsTreeNode node, ObjectAsTreeNode parent) { nodeSet.put((Object) node.toString(), (Object) node); addObject(parent,node,true); updateUI(); } public void addObject(DefaultMutableTreeNode parent, DefaultMutableTreeNode childNode, boolean shouldBeVisible) { System.out.println("Adding: '" + childNode + "' to '" + parent + "'"); System.out.println("Parent Child Count: " + parent.getChildCount()); treeModel.insertNodeInto(childNode, parent, parent.getChildCount()); // Make sure the user can see the lovely new node. if (shouldBeVisible) { hierarchy.scrollPathToVisible(new TreePath(childNode.getPath())); } } class MyTreeModelListener implements TreeModelListener { public void treeNodesChanged(TreeModelEvent e) { DefaultMutableTreeNode node; node = (DefaultMutableTreeNode) (e.getTreePath().getLastPathComponent()); /* * If the event lists children, then the changed * node is the child of the node we've already * gotten. Otherwise, the changed node and the * specified node are the same. */ try { int index = e.getChildIndices()[0]; node = (DefaultMutableTreeNode) (node.getChildAt(index)); } catch (NullPointerException exc) {} System.out.println("The user has finished editing the node."); System.out.println("New value: " + node.getUserObject()); String name = (String) node.getUserObject(); node.setUserObject(name); } public void treeNodesInserted(TreeModelEvent e) { } public void treeNodesRemoved(TreeModelEvent e) { } public void treeStructureChanged(TreeModelEvent e) { } } // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JScrollPane scrollPanel; private javax.swing.JTree hierarchy; // End of variables declaration//GEN-END:variables }
[ "edward.blurock@gmail.com" ]
edward.blurock@gmail.com
f530feba6ba6591623747ed576129acc86f95d10
b3c22d2b26180e9fa5b535e02a12108c28df549e
/ttms3.0/src/main/java/cn/tedu/ttms/common/exception/BaseExceptionHandler.java
853a4ad3cd577469b3f54feb6056fee803774e60
[]
no_license
kenyim001/Eclipse
bef78193911a34d023da62dcf7ef0b5d39475eaa
0df890550d3e7a639cc8f9e8fa55e1f856abd0ab
refs/heads/master
2020-03-14T11:17:47.693826
2018-04-30T10:36:49
2018-04-30T10:36:49
131,587,793
0
0
null
null
null
null
UTF-8
Java
false
false
514
java
package cn.tedu.ttms.common.exception; import org.springframework.web.bind.annotation.ControllerAdvice; import org.springframework.web.bind.annotation.ExceptionHandler; import org.springframework.web.bind.annotation.ResponseBody; import cn.tedu.ttms.util.JsonResult; @ControllerAdvice public class BaseExceptionHandler { @ExceptionHandler(RuntimeException.class) @ResponseBody public JsonResult handleRuntimeException(Exception e){ System.err.println(e.getMessage()); return new JsonResult(e); } }
[ "38854212+kenyim001@users.noreply.github.com" ]
38854212+kenyim001@users.noreply.github.com
651b62f085afe8cbf1f75baa4b1b564df8991011
339f7a7b7e3a27a9da05f7a269c2b5b78549b97a
/yours-dev-jenkins/mvp-ms-web/src/main/java/com/hsb/mvpmsweb/model/payload/SendSMSResponseData.java
7a2037996dc869e73613e0ecf80dab49fb8d8a66
[]
no_license
tangchaolibai/mvp
131f84784fc533b31e5f4e5220536a9dbe13c774
56a83e409a4477655e131008ebc806d51dcdb3d0
refs/heads/master
2023-04-15T03:57:12.190617
2021-04-21T13:50:38
2021-04-21T13:50:38
360,185,381
0
0
null
null
null
null
UTF-8
Java
false
false
568
java
package com.hsb.mvpmsweb.model.payload; import com.fasterxml.jackson.annotation.JsonProperty; import io.swagger.annotations.ApiModel; import lombok.Data; import lombok.ToString; import lombok.experimental.Accessors; @ApiModel(description = "This entity is used to send SMS for invitation response data.") @Data @Accessors(fluent = true) @ToString public class SendSMSResponseData { @JsonProperty("phoneNumber") private String phoneNumber = null; @JsonProperty("inviter") private String inviter = null; @JsonProperty("SMS") private String SMS = null; }
[ "heweiqing@formssi.com" ]
heweiqing@formssi.com
b3de98d54cc6d162182364d614d1974ac827e3d1
e308fb3a7c49a9fda6e43cc0c2cf33738eaa912a
/app/src/main/java/cloud/antelope/lingmou/mvp/contract/DevicesContract.java
0ce2ce0d33a8d325396e4df360d9f3b88b3a224c
[ "Apache-2.0" ]
permissive
allenzhangfan/Lingmou2
1d37cbe5484ea15438c73037558343f96ee97223
c22d5f1b6ea5e325f1c2b5d8836dcba0ce53e325
refs/heads/master
2020-04-26T01:58:57.205750
2019-01-23T01:40:32
2019-01-23T01:40:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,828
java
package cloud.antelope.lingmou.mvp.contract; import com.jess.arms.mvp.IModel; import com.jess.arms.mvp.IView; import java.util.List; import cloud.antelope.lingmou.mvp.model.entity.CameraNewStreamEntity; import cloud.antelope.lingmou.mvp.model.entity.GetKeyStoreBaseEntity; import cloud.antelope.lingmou.mvp.model.entity.OrgCameraEntity; import cloud.antelope.lingmou.mvp.model.entity.OrgCameraParentEntity; import cloud.antelope.lingmou.mvp.model.entity.OrgMainEntity; import cloud.antelope.lingmou.mvp.model.entity.SetKeyStoreRequest; import io.reactivex.Observable; public interface DevicesContract { //ๅฏนไบŽ็ปๅธธไฝฟ็”จ็š„ๅ…ณไบŽUI็š„ๆ–นๆณ•ๅฏไปฅๅฎšไน‰ๅˆฐIViewไธญ,ๅฆ‚ๆ˜พ็คบ้š่—่ฟ›ๅบฆๆก,ๅ’Œๆ˜พ็คบๆ–‡ๅญ—ๆถˆๆฏ interface View extends IView { void getMainOrgsSuccess(List<OrgMainEntity> entityList); void getMainOrgsFail(); void getMainOrgCamerasSuccess(List<OrgCameraEntity> entityList); void getMainOrgCameraFail(); void getOrgNoPermission(); void getCameraNoPermission(); void onCameraLikeSuccess(GetKeyStoreBaseEntity entity,boolean like); void getCollectionsSuccess(GetKeyStoreBaseEntity entity); void getCoversSuccess(CameraNewStreamEntity entity); } //Modelๅฑ‚ๅฎšไน‰ๆŽฅๅฃ,ๅค–้ƒจๅช้œ€ๅ…ณๅฟƒModel่ฟ”ๅ›ž็š„ๆ•ฐๆฎ,ๆ— ้œ€ๅ…ณๅฟƒๅ†…้ƒจ็ป†่Š‚,ๅณๆ˜ฏๅฆไฝฟ็”จ็ผ“ๅญ˜ interface Model extends IModel { Observable<List<OrgMainEntity>> getMainOrgs(); Observable<OrgCameraParentEntity> getMainOrgCameras(int page, int pageSize, String[] orgIds); Observable<GetKeyStoreBaseEntity> getCollections(String userId); Observable<GetKeyStoreBaseEntity> cameraLike(String storeKey, SetKeyStoreRequest keyStoreRequest); Observable<CameraNewStreamEntity> getCameraCovers(Long[] cids); } }
[ "yeguoqiang6@outlook.com" ]
yeguoqiang6@outlook.com
7a01a1e60f1acbe71cdc18171b2a879bba4baaa7
9490430bcf21d615cce1a186a4227c6427db1394
/libam/src/main/java/com/hades/libam/updata/StorageUtils.java
75d0fef052335619f69fa046e9a1839cebdc74f8
[]
no_license
coolhades/CloudProject
6b74a8787da9841ee0ec71824a87013441803fe6
2fddff73fbfd92980325cfd98505e32d5869fb9d
refs/heads/master
2020-06-19T03:04:42.738501
2016-10-31T06:00:27
2016-10-31T06:00:27
74,925,003
0
0
null
2016-11-28T01:56:04
2016-11-28T01:10:15
Java
UTF-8
Java
false
false
3,250
java
/******************************************************************************* * Copyright 2011-2013 Sergey Tarasevich * <p> * 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 * <p> * http://www.apache.org/licenses/LICENSE-2.0 * <p> * 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.hades.libam.updata; import android.content.Context; import android.content.pm.PackageManager; import android.os.Environment; import android.util.Log; import java.io.File; import java.io.IOException; import static android.os.Environment.MEDIA_MOUNTED; /** * Provides application storage paths * * @author Sergey Tarasevich (nostra13[at]gmail[dot]com) * @since 1.0.0 */ final class StorageUtils { private static final String EXTERNAL_STORAGE_PERMISSION = "android.permission.WRITE_EXTERNAL_STORAGE"; private StorageUtils() { } /** * Returns application cache directory. Cache directory will be created on SD card * <i>("/Android/data/[app_package_name]/cache")</i> if card is mounted and app has appropriate permission. Else - * Android defines cache directory on device's file system. * * @param context Application context * @return Cache {@link File directory} */ public static File getCacheDirectory(Context context) { File appCacheDir = null; if (MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) && hasExternalStoragePermission(context)) { appCacheDir = getExternalCacheDir(context); } if (appCacheDir == null) { appCacheDir = context.getCacheDir(); } if (appCacheDir == null) { Log.w(Constants.TAG, "Can't define system cache directory! The app should be re-installed."); } return appCacheDir; } private static File getExternalCacheDir(Context context) { File dataDir = new File(new File(Environment.getExternalStorageDirectory(), "Android"), "data"); File appCacheDir = new File(new File(dataDir, context.getPackageName()), "cache"); if (!appCacheDir.exists()) { if (!appCacheDir.mkdirs()) { Log.w(Constants.TAG, "Unable to create external cache directory"); return null; } try { new File(appCacheDir, ".nomedia").createNewFile(); } catch (IOException e) { Log.i(Constants.TAG, "Can't create \".nomedia\" file in application external cache directory"); } } return appCacheDir; } private static boolean hasExternalStoragePermission(Context context) { int perm = context.checkCallingOrSelfPermission(EXTERNAL_STORAGE_PERMISSION); return perm == PackageManager.PERMISSION_GRANTED; } }
[ "723760950@qq.com" ]
723760950@qq.com
af3aa30bc67d15f3dd1b25a3aa2611ce9b612a06
6b2a8dd202fdce77c971c412717e305e1caaac51
/solutions_5744014401732608_0/java/teacup123123/ProbB.java
de28a68045277870bb0d12e6867e18031823ff6a
[]
no_license
alexandraback/datacollection
0bc67a9ace00abbc843f4912562f3a064992e0e9
076a7bc7693f3abf07bfdbdac838cb4ef65ccfcf
refs/heads/master
2021-01-24T18:27:24.417992
2017-05-23T09:23:38
2017-05-23T09:23:38
84,313,442
2
4
null
null
null
null
UTF-8
Java
false
false
1,543
java
package jamC; import java.io.BufferedReader; import java.io.BufferedWriter; import java.io.IOException; public class ProbB extends Prob{ public static void main(String[] args) { System.out.println((int)'A'); ProbB pa= new ProbB(); pa.fromFile("C:\\Users\\tchang\\Downloads\\B-small-attempt3.in"); } @Override public void load(BufferedReader br,BufferedWriter bw) { try{ int T=Integer.parseInt(br.readLine()); for(int cas=0;cas<T;cas++) { String ans="",line[]=br.readLine().split(" "),possibilityStr=""; int B=Integer.parseInt(line[0]); int M=Integer.parseInt(line[1]); String binStr=Integer.toBinaryString(M); binStr=new StringBuilder(binStr).reverse().toString(); boolean possib=binStr.length()<B-1||M==Math.pow(2, B-2); possibilityStr=(possib)?"POSSIBLE":"IMPOSSIBLE"; int mat[][]=new int[B][B];//i j if(possib) { for(int jj=0;jj<B-1;jj++) { for (int i=0;i<jj;i++) mat[i][jj]=1; } if(M==Math.pow(2, B-2)) for(int i=0;i<B-1;i++) mat[i][B-1]=1; else for(int i=0;i<binStr.length();i++) { mat[i+1][B-1]=Integer.parseInt(""+binStr.charAt(i)); } } bw.write("Case #"+(cas+1)+": "+possibilityStr); bw.newLine(); if(possib) { for(int i =0;i<B;i++) { for(int j =0;j<B;j++) bw.write(""+mat[i][j]); bw.newLine(); } } } } catch (IOException e) { e.printStackTrace(); } } }
[ "alexandra1.back@gmail.com" ]
alexandra1.back@gmail.com
df3ac3abbaf8a2ce611ea6daf3e0225e551afe8e
a4ed3b1f3ab045bf5e3a1e6bf0694e51e51f7233
/sldparser/src/main/geotools/filter/LogicFilterImpl.java
2ff94075734139b4b10d318d06efbccf515c7433
[ "Apache-2.0" ]
permissive
TerraMobile/TerraMobile
7ffd2d6a2e4f04e59fb5b71badb00a962998d46d
6380b6c3730294947c8d70d6f3b3a06dce12aa92
refs/heads/master
2021-07-15T08:23:50.581870
2016-04-13T20:43:00
2016-04-13T20:43:00
32,412,196
2
2
Apache-2.0
2020-07-12T09:50:30
2015-03-17T18:26:56
Java
UTF-8
Java
false
false
7,480
java
/* * GeoTools - The Open Source Java GIS Toolkit * http://geotools.org * * (C) 2002-2008, Open Source Geospatial Foundation (OSGeo) * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; * version 2.1 of the License. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ package org.geotools.filter; import java.util.ArrayList; import java.util.Iterator; import java.util.List; import java.util.logging.Level; import java.util.logging.Logger; import org.opengis.filter.Filter; import org.opengis.filter.FilterVisitor; /** * Defines a logic filter (the only filter type that contains other filters). * This filter holds one or more filters together and relates them logically * with an internally defined type (AND, OR, NOT). * * @author Rob Hranac, TOPP * * * @source $URL$ * @version $Id$ */ public abstract class LogicFilterImpl extends BinaryLogicAbstract { /** The logger for the default core module. */ private static final Logger LOGGER = org.geotools.util.logging.Logging.getLogger("org.geotools.core"); @Deprecated protected LogicFilterImpl() { this(new ArrayList<Filter>()); } protected LogicFilterImpl(List<Filter> children) { super(children); } /** * Convenience constructor to create a NOT logic filter. * * @param filter The initial sub filter. * @throws org.geotools.filter.IllegalFilterException Does not conform to logic filter * structure */ @Deprecated protected LogicFilterImpl(Filter filter) throws IllegalFilterException { this(); children.add(filter); } /** * Convenience constructor to create an AND/OR logic filter. * * @param filter1 An initial sub filter. * @param filter2 An initial sub filter. * @param filterType The final relation between all sub filters. * * @throws org.geotools.filter.IllegalFilterException Does not conform to logic filter * structure */ protected LogicFilterImpl(Filter filter1, Filter filter2, short filterType) throws IllegalFilterException { this(); // Push the initial filter on the stack children.add(filter1); // Add the second filter via internal method to check for illegal NOT this.addFilter(filter2); } /** * Adds a sub filter to this filter. * * @param filter Specified filter to add to the sub filter list. * * @throws org.geotools.filter.IllegalFilterException Does not conform to logic filter * structure * * @task REVISIT: make all filters immutable. This should return a new * filter. */ public final void addFilter(Filter filter) throws IllegalFilterException { int filterType = Filters.getFilterType(this); if ((filterType != LOGIC_NOT) || (children.size() == 0)) { children.add(filter); } else { throw new IllegalFilterException( "Attempted to add an more than one filter to a NOT filter."); } } /** * Gets an iterator for the filters held by this logic filter. * * @return the iterator of the filters. */ public Iterator getFilterIterator() { return children.iterator(); } /** * package private method to get the internal storage of filters. * * @return the internal sub filter list. * * @deprecated use {@link #getChildren()} */ List getSubFilters() { return children; } /** * Returns a string representation of this filter. * * @return String representation of the logic filter. */ public String toString() { String returnString = "["; String operator = ""; Iterator iterator = children.iterator(); int filterType = Filters.getFilterType(this); if (filterType == LOGIC_OR) { operator = " OR "; } else if (filterType == LOGIC_AND) { operator = " AND "; } else if (filterType == LOGIC_NOT) { return "[ NOT " + iterator.next().toString() + " ]"; } while (iterator.hasNext()) { returnString = returnString + iterator.next().toString(); if (iterator.hasNext()) { returnString = returnString + operator; } } return returnString + "]"; } /** * Compares this filter to the specified object. Returns true if the * passed in object is the same as this filter. Checks to make sure the * filter types are the same, and then checks that the subFilters lists * are the same size and that one list contains the other. This means * that logic filters with different internal orders of subfilters are * equal. * * @param obj - the object to compare this LogicFilter against. * * @return true if specified object is equal to this filter; false * otherwise. */ public boolean equals(Object obj) { if (obj == this ) return true; if ((obj != null) && (obj.getClass() == this.getClass())) { LogicFilterImpl logFilter = (LogicFilterImpl) obj; if( LOGGER.isLoggable(Level.FINEST)) { LOGGER.finest("filter type match:" + (Filters.getFilterType( logFilter ) == Filters.getFilterType( this ))); LOGGER.finest("same size:" + (logFilter.getSubFilters().size() == this.children.size()) + "; inner size: " + logFilter.getSubFilters().size() + "; outer size: " + this.children.size()); LOGGER.finest("contains:" + logFilter.getSubFilters().containsAll(this.children)); } return ((Filters.getFilterType( logFilter ) == Filters.getFilterType( this )) && (logFilter.getSubFilters().size() == this.children.size()) && logFilter.getSubFilters().containsAll(this.children)); } else { return false; } } /** * Override of hashCode method. * * @return a code to hash this object by. */ public int hashCode() { int result = 17; int filterType = Filters.getFilterType(this); result = (37 * result) + filterType; result = (37 * result) + children.hashCode(); return result; } /** * Used by FilterVisitors to perform some action on this filter instance. * Typicaly used by Filter decoders, but may also be used by any thing * which needs infomration from filter structure. Implementations should * always call: visitor.visit(this); It is importatant that this is not * left to a parent class unless the parents API is identical. * * @param visitor The visitor which requires access to this filter, the * method must call visitor.visit(this); */ public abstract Object accept(FilterVisitor visitor, Object extraData); }
[ "claudio.bogossian@gmail.com" ]
claudio.bogossian@gmail.com
bf4a1a76033738c324d32c021fe326881cf3abfa
04bfaf142c9c2aaa52dceeba7b37452a4b7fd03b
/bps/V1.0.2/src/main/java/com/vilio/bps/inquiry/worldunion/service/WUGetHousingInfo.java
b7c83d0e4e799e3060141efd7b98e4f1137057a2
[]
no_license
yanzj/hhsite
a1dd19a11a5623bcc04651dd364640767df9b335
603ef16f7d4d53494e4ab99cae631cfafeee3159
refs/heads/master
2020-04-14T04:18:35.363346
2018-12-31T02:18:04
2018-12-31T02:18:04
163,632,151
0
1
null
2018-12-31T02:16:10
2018-12-31T02:16:10
null
UTF-8
Java
false
false
653
java
package com.vilio.bps.inquiry.worldunion.service; import com.vilio.bps.commonMapper.pojo.BpsPlots; import com.vilio.bps.inquiry.worldunion.pojo.SearchBean; import com.vilio.bps.inquiry.worldunion.pojo.WUConstruction; import java.util.List; /** * Created by dell on 2017/5/12/0012. */ public interface WUGetHousingInfo { public List<SearchBean> getConstruction(String cityId, String name) throws Exception; public List<WUConstruction> getConstrutionViewInfoById(String conId) throws Exception; public List<SearchBean> getBuild(String conId) throws Exception; public List<SearchBean> getHouse(String buildId) throws Exception; }
[ "panda7168@163.com" ]
panda7168@163.com
ca763af96363e94818cb52d5cd622805f5bf9f31
408fa67e9d4a425f164da274ed7dd65e3ae155ca
/spring-boot/004-bean/src/main/java/com/git/hui/boot/bean/rest/DemoController.java
fe355c59a9b12766e35b3135adc328798a98ffe9
[ "Apache-2.0" ]
permissive
liuyueyi/spring-boot-demo
c7d1c73135d998b366c793ab05ce5fed295cc32a
8960892da18cc3aa3f32b131d6d524d13bbec6fa
refs/heads/master
2023-08-30T22:52:04.738407
2023-08-16T14:50:02
2023-08-16T14:50:02
149,739,805
584
328
Apache-2.0
2023-04-29T12:52:28
2018-09-21T09:14:27
Java
UTF-8
Java
false
false
1,845
java
package com.git.hui.boot.bean.rest; import com.alibaba.fastjson.JSON; import com.git.hui.boot.autoconfig.AutoBean; import com.git.hui.boot.autoconfig.AutoConfBean; import com.git.hui.boot.bean.autoload.factory.FacDemoBean; import com.git.hui.boot.bean.autoload.simple.AnoDemoBean; import com.git.hui.boot.bean.autoload.simple.ConfigDemoBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RestController; import java.util.HashMap; import java.util.Map; /** * Created by @author yihui in 17:04 18/9/30. */ @RestController public class DemoController { /** * ๆž„้€ ๆ–นๆณ•ๅผ•ๅ…ฅๆ–นๅผ */ private AnoDemoBean anoDemoBean; public DemoController(AnoDemoBean anoDemoBean) { this.anoDemoBean = anoDemoBean; } /** * ็ปๅ…ธ็š„ๆณจ่งฃๅผ•ๅ…ฅๆ–นๅผ */ @Autowired private ConfigDemoBean configDemoBean; /** * ้€š่ฟ‡ FactoryBean ๅˆ›ๅปบbean็š„ไฝฟ็”จๆต‹่ฏ• */ private FacDemoBean facDemoBean; @Autowired private void setFacDemoBean(FacDemoBean facDemoBean) { this.facDemoBean = facDemoBean; } /** * ๆต‹่ฏ•ๅผ•ๅ…ฅ็ฌฌไธ‰ๆ–นๅŒ…็š„ๆƒ…ๅ†ต */ @Autowired private AutoBean autoBean; @Autowired private AutoConfBean autoConfBean; @GetMapping(path = "/show") public String show(String name) { Map<String, String> map = new HashMap<>(4); map.put("ano", anoDemoBean.getName(name)); map.put("config", configDemoBean.getName(name)); map.put("fac", facDemoBean.getName(name)); map.put("auto", autoBean != null ? autoBean.getName() : "null"); map.put("autoConf", autoConfBean != null ? autoConfBean.getName() : "null"); return JSON.toJSONString(map); } }
[ "bangzewu@126.com" ]
bangzewu@126.com
8e61c01d7d3ba470bf10cbf0735863dddff3c9bf
2b3774f5b9137b51f8cdd684e21229b43e36eed7
/src/edu/colorado/collections/LinkedQueue.java
b60bc7bb43d0dfee39e3fc613868f3505e0875cb
[]
no_license
Vagacoder/Data_Structures_and_Other_Objects_Using_Java
ac232d9f8c0f0472b57243818d051f7ec4983bc3
81fd832d4c7f232193f571aa9e529423c629ac2e
refs/heads/master
2021-04-30T12:44:14.506423
2019-01-22T07:20:31
2019-01-22T07:20:31
121,281,083
0
0
null
2018-04-26T05:51:34
2018-02-12T17:53:11
Java
UTF-8
Java
false
false
5,132
java
// File: LinkedQueue.java from the package edu.colorado.collections // Complete documentation is available from the LinkedQueue link in: // http://www.cs.colorado.edu/~main/docs/ package edu.colorado.collections; import java.util.NoSuchElementException; import edu.colorado.nodes.Node; /****************************************************************************** * A <CODE>LinkedQueue&lt;E&gt;</CODE> is a queue of references to E objects. * * <b>Limitations:</b> * Beyond <CODE>Int.MAX_VALUE</CODE> items, <CODE>size</CODE> is wrong. * * <b>Java Source Code for this class:</b> * <A HREF="../../../../edu/colorado/collections/LinkedQueue.java"> * http://www.cs.colorado.edu/~main/edu/colorado/collections/LinkedQueue.java * </A> * * @author Michael Main * <A HREF="mailto:main@colorado.edu"> (main@colorado.edu) </A> * * @version Feb 10, 2016 * * @see ArrayQueue ******************************************************************************/ public class LinkedQueue<E> implements Cloneable { // Invariant of the LinkedQueue class: // 1. The number of items in the queue is stored in the instance variable // manyNodes. // 2. The items in the queue are stored in a linked list, with the front // of the queue stored at the head node, and the rear of the queue at // the final node. // 3. For a non-empty queue, the instance variable front is the head // reference of the linked list of items and the instance variable rear // is the tail reference of the linked list. For an empty queue, both // front and rear are the null reference. private int manyNodes; private Node<E> front; private Node<E> rear; /** * Initialize an empty queue. * <b>Postcondition:</b> * This queue is empty. **/ public LinkedQueue( ) { front = null; rear = null; } /** * Put a new a new item in this queue. * @param item * the item to be pushed onto this queue * <b>Postcondition:</b> * The item has been pushed onto this queue. * @exception OutOfMemoryError * Indicates insufficient memory for increasing the queue's capacity. * <b>Note:</b> * An attempt to increase the capacity beyond * <CODE>Integer.MAX_VALUE</CODE> will cause the queue to fail with an * arithmetic overflow. **/ public void add(E item) { if (isEmpty( )) { // Insert first item. front = new Node<E>(item, null); rear = front; } else { // Insert an item that is not the first. rear.addNodeAfter(item); rear = rear.getLink( ); } manyNodes++; } /** * Generate a copy of this queue. * @return * The return value is a copy of this queue. Subsequent changes to the * copy will not affect the original, nor vice versa. Note that the return * value must be type cast to an <CODE>LinkedQueue</CODE> before it can be used. * @exception OutOfMemoryError * Indicates insufficient memory for creating the clone. **/ @SuppressWarnings("unchecked") public LinkedQueue<E> clone( ) { // Clone a LinkedQueue<E>. LinkedQueue<E> answer; Object[ ] cloneInfo; try { answer = (LinkedQueue<E>) super.clone( ); } catch (CloneNotSupportedException e) { // This exception should not occur. But if it does, it would probably indicate a // programming error that made super.clone unavailable. The most comon error // The most common error would be forgetting the "Implements Cloneable" // clause at the start of this class. throw new RuntimeException ("This class does not implement Cloneable"); } cloneInfo = Node.listCopyWithTail(front); answer.front = (Node<E>) cloneInfo[0]; answer.rear = (Node<E>) cloneInfo[1]; return answer; } /** * Determine whether this queue is empty. * @return * <CODE>true</CODE> if this queue is empty; * <CODE>false</CODE> otherwise. **/ public boolean isEmpty( ) { return (manyNodes == 0); } /** * Get the front item, removing it from this queue. * <b>Precondition:</b> * This queue is not empty. * @return * The return value is the front item of this queue, and the item has * been removed. * @exception NoSuchElementException * Indicates that this queue is empty. **/ public E remove( ) { E answer; if (manyNodes == 0) // NoSuchElementException is from java.util and its constructor has no argument. throw new NoSuchElementException("Queue underflow"); answer = front.getData( ); front = front.getLink( ); manyNodes--; if (manyNodes == 0) rear = null; return answer; } /** * Accessor method to determine the number of items in this queue. * @return * the number of items in this queue **/ public int size( ) { return manyNodes; } }
[ "qiruihu@gmail.com" ]
qiruihu@gmail.com
cdffaca4227ba339c30a7c387ebf87d3191450ca
c35b52076b811acc01939e1940c306aaa87fd0ce
/src-common/com/liaoliao/basedao/RowMapper.java
73df399fed3166ebd710700ea7168e38c3714a33
[]
no_license
chen1044316902/cc_app
8c713862445477e6a9831540370663807c82d547
30a2b8a3f90b95c3a2aea0cab561e96e18453a54
refs/heads/master
2020-03-23T23:53:40.118232
2018-07-25T07:29:42
2018-07-25T07:29:42
142,261,969
0
0
null
null
null
null
UTF-8
Java
false
false
223
java
package com.liaoliao.basedao; import java.sql.ResultSet; import java.sql.SQLException; /** * RowMapper */ public interface RowMapper { public Object mapRow(ResultSet rs, int index) throws SQLException; }
[ "1044316902@qq.com" ]
1044316902@qq.com
54c1457f118eda98000cc0ac78a31801075bb66e
35639eaf326d315149905ad38c34211d3b88e76f
/src/day38_Statics/ScrumTask/Developer.java
ab4de75deb0d56b124dab5d6092d8e71d1e84c27
[]
no_license
blackpars4x4/JavaProgramming2020_B21
3e761061d8182660b42d9d317fefd0c5ca5c0d25
eac69380e156abe0433358423ecd5937eba8d719
refs/heads/master
2023-03-03T22:33:50.436451
2021-02-10T16:36:25
2021-02-10T16:36:25
306,726,974
1
0
null
2020-11-20T05:22:51
2020-10-23T19:17:48
Java
UTF-8
Java
false
false
1,267
java
package day38_Statics.ScrumTask; public class Developer { public String name, ID, jobTitle, companyName; public double salary; public char gender; public static boolean hasCodingSkills = true; public void setInfo(String name, String ID, String jobTitle, String companyName, double salary, char gender) { this.name = name; this.ID = ID; this.jobTitle = jobTitle; this.companyName = companyName; this.salary = salary; this.gender = gender; } public void coding() { System.out.println(jobTitle + " " + name + " is coding"); } public void fixingBug(){ System.out.println(jobTitle+" "+name+" is crying"); } @Override public String toString() { return "Developer{" + "name='" + name + '\'' + ", ID='" + ID + '\'' + ", jobTitle='" + jobTitle + '\'' + ", companyName='" + companyName + '\'' + ", salary=" + salary + ", gender=" + gender + '}'; } } /* create a class called Developer Attributes: name, employeeID, JobTitle, Salary hasCodingSkills, Actions: setInfo(), coding(), fixingBug(), toString() */
[ "55367496+blackpars4x4@users.noreply.github.com" ]
55367496+blackpars4x4@users.noreply.github.com
d3618f32ea119ee72e0f1adcefc326576ac02345
d730308970df56fba9be1f2ff81bcc5814b9c787
/Vipians/src/muni/Zip.java
96ac0cd9a277dd3444bed2ca19a5b9873b63220f
[]
no_license
munivictoria/sgmdv
dda1285de24477e75986d655c9fc4d805ef47a4e
9da300b2c90cb3ec7f7c3af47509db884f71ab05
refs/heads/master
2021-01-18T21:16:59.795064
2016-05-16T13:36:11
2016-05-16T13:36:11
28,036,850
0
0
null
null
null
null
UTF-8
Java
false
false
1,289
java
package muni; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; import java.util.List; import java.util.zip.ZipEntry; import java.util.zip.ZipOutputStream; /** * * @author nico * */ public class Zip { private String carpetaTemporal; public String getCarpetaTemporal() { return carpetaTemporal; } public void setCarpetaTemporal(String carpetaTemporal) { this.carpetaTemporal = carpetaTemporal; } /** * El primer File es el Zip, el resto son los archivos a meter dentro del zip. * @param archivos */ public void comprimir(List<File> pListaArchivos, File pZip) { byte[] buffer = new byte[1024]; try { FileOutputStream locFOS = new FileOutputStream(pZip.getPath()); ZipOutputStream locZOS = new ZipOutputStream(locFOS); for(File cadaArchivo : pListaArchivos) { ZipEntry ze = new ZipEntry(cadaArchivo.getName()); locZOS.putNextEntry(ze); FileInputStream in = new FileInputStream(this.carpetaTemporal + File.separator + cadaArchivo.getName()); int len; while((len = in.read(buffer)) > 0) { locZOS.write(buffer, 0, len); } in.close(); } locZOS.closeEntry(); locZOS.close(); } catch(IOException ex) { ex.printStackTrace(); } } }
[ "ferna@fernando-notebook.(none)" ]
ferna@fernando-notebook.(none)
0b29f7d0e91bad00610b9c2a9d4fa4882e5d1fa3
fec4c1754adce762b5c4b1cba85ad057e0e4744a
/jfAppService/src/main/java/com/jf/service/CombineDepositOrderService.java
a957b776f2a26e375b5b7d98a027d517db99a300
[]
no_license
sengeiou/workspace_xg
140b923bd301ff72ca4ae41bc83820123b2a822e
540a44d550bb33da9980d491d5c3fd0a26e3107d
refs/heads/master
2022-11-30T05:28:35.447286
2020-08-19T02:30:25
2020-08-19T02:30:25
null
0
0
null
null
null
null
UTF-8
Java
false
false
811
java
package com.jf.service; import com.jf.common.base.BaseService; import com.jf.dao.CombineDepositOrderMapper; import com.jf.entity.CombineDepositOrder; import com.jf.entity.CombineDepositOrderExample; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; @Service @Transactional public class CombineDepositOrderService extends BaseService<CombineDepositOrder, CombineDepositOrderExample> { @Autowired private CombineDepositOrderMapper combineDepositOrderMapper; @Autowired public void setCombineDepositOrderMapper(CombineDepositOrderMapper combineDepositOrderMapper) { super.setDao(combineDepositOrderMapper); this.combineDepositOrderMapper = combineDepositOrderMapper; } }
[ "397716215@qq.com" ]
397716215@qq.com
712eb060bad163bb6b707453902a09bf70d03b2b
ba74038a0d3a24d93e6dbd1f166530f8cb1dd641
/teamclock/src/java/com/fivesticks/time/useradmin/xwork/PasswordModifyAction.java
e0e9a8fe41284033de77e0e81e5d6dccaa043a30
[]
no_license
ReidCarlberg/teamclock
63ce1058c62c0a00d63a429bac275c4888ada79a
4ac078610be86cf0902a73b1ba2a697f9dcf4e3c
refs/heads/master
2016-09-05T23:46:28.600606
2009-09-18T07:25:37
2009-09-18T07:25:37
32,190,901
0
0
null
null
null
null
UTF-8
Java
false
false
6,293
java
/* * Created on Sep 30, 2004 by Reid */ package com.fivesticks.time.useradmin.xwork; import com.fivesticks.time.common.SessionContext; import com.fivesticks.time.common.SessionContextAware; import com.fivesticks.time.common.util.ValidationHelper; import com.fivesticks.time.menu.MenuSection; import com.fstx.stdlib.authen.users.User; import com.fstx.stdlib.authen.users.UserBD; import com.fstx.stdlib.authen.users.UserBDFactory; import com.fstx.stdlib.common.simpledate.SimpleDate; import com.opensymphony.xwork.ActionSupport; /** * @author Reid */ public class PasswordModifyAction extends ActionSupport implements SessionContextAware, PasswordModifyContextAware, UserModifyContextAware { private SessionContext sessionContext; private PasswordModifyContext passwordModifyContext; private UserModifyContext userModifyContext; private String submitPassword; private String cancelPassword; private String userPassword1; private String userPassword2; private String targetUser; public String execute() throws Exception { this.getSessionContext().setMenuSection(MenuSection.PASSWORD); if (this.getCancelPassword() != null) { if (this.getUserModifyContext().getTarget() == null) return SUCCESS; else return SUCCESS + "-admin"; } if (this.getSubmitPassword() == null && this.getCancelPassword() == null) { if (this.getTargetUser() != null) { User user = UserBDFactory.factory.build().getByUsername( this.getTargetUser()); if (user == null) { return ERROR; } this.getPasswordModifyContext().setTargetUser(user); } else { this.getPasswordModifyContext().setTargetUser( this.getSessionContext().getUser().getUser()); } return INPUT; } validate(); if (this.hasErrors()) { return INPUT; } UserBD bd = UserBDFactory.factory.build(); SimpleDate expires = SimpleDate.factory.buildMidnight(); expires.advanceDay(new Long(this.getSessionContext().getSettings().getUserPasswordLife()).intValue()); bd.changePassword(this.getPasswordModifyContext().getTargetUser(), this .getUserPassword1(),expires); this.getPasswordModifyContext().setTargetUser(null); if (this.getUserModifyContext().getTarget() == null) return SUCCESS; else return SUCCESS + "-admin"; } public void validate() { ValidationHelper helper = new ValidationHelper(); if (helper.isStringEmpty(this.getUserPassword1())) { this.addFieldError("userPassword1", "Password is required."); } if (helper.isStringEmpty(this.getUserPassword2())) { this.addFieldError("userPassword2", "Password (confirm) is required."); } if (!this.getUserPassword1().equals(this.getUserPassword2())) { this.addFieldError("userPassword1", "Passwords must match."); } } /** * @return Returns the sessionContext. */ public SessionContext getSessionContext() { return sessionContext; } /** * @param sessionContext * The sessionContext to set. */ public void setSessionContext(SessionContext sessionContext) { this.sessionContext = sessionContext; } /** * @return Returns the passwordModifyContext. */ public PasswordModifyContext getPasswordModifyContext() { return passwordModifyContext; } /** * @param passwordModifyContext * The passwordModifyContext to set. */ public void setPasswordModifyContext( PasswordModifyContext passwordModifyContext) { this.passwordModifyContext = passwordModifyContext; } /** * @return Returns the passwordCancel. */ public String getCancelPassword() { return cancelPassword; } /** * @param passwordCancel * The passwordCancel to set. */ public void setCancelPassword(String passwordCancel) { this.cancelPassword = passwordCancel; } /** * @return Returns the passwordSubmit. */ public String getSubmitPassword() { return submitPassword; } /** * @param passwordSubmit * The passwordSubmit to set. */ public void setSubmitPassword(String passwordSubmit) { this.submitPassword = passwordSubmit; } /** * @return Returns the userPassword1. */ public String getUserPassword1() { return userPassword1; } /** * @param userPassword1 * The userPassword1 to set. */ public void setUserPassword1(String userPassword1) { this.userPassword1 = userPassword1; } /** * @return Returns the userPassword2. */ public String getUserPassword2() { return userPassword2; } /** * @param userPassword2 * The userPassword2 to set. */ public void setUserPassword2(String userPassword2) { this.userPassword2 = userPassword2; } /** * @return Returns the targetUser. */ public String getTargetUser() { return targetUser; } /** * @param targetUser * The targetUser to set. */ public void setTargetUser(String targetUser) { this.targetUser = targetUser; } /** * @return Returns the userModifyContext. */ public UserModifyContext getUserModifyContext() { return userModifyContext; } /** * @param userModifyContext * The userModifyContext to set. */ public void setUserModifyContext(UserModifyContext userModifyContext) { this.userModifyContext = userModifyContext; } }
[ "reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662" ]
reidcarlberg@c917f71e-a3f3-11de-ba6e-69e41c8db662
87b65a59310cc9a4da0f17da840697f3f18b9b3f
79f38f93cfcd47711fe9db76b2b56ef37f18bf92
/telegraph/cq/core-app/core-app-list/src/main/java/uk/co/telegraph/core/list/dynamic/impl/StandardDynamicComparisonList.java
a4ef665c0b1cc949b8c8b19b0231dd5c92a1fd23
[]
no_license
jsdelivrbot/ionic4-angular6
3a6361bce9db129fbc841ee31fc029abe14ea273
0c67b344397c1ce276a808388f602ea68becaf2e
refs/heads/master
2020-04-10T13:58:48.155725
2018-12-09T12:53:32
2018-12-09T12:53:32
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,479
java
package uk.co.telegraph.core.list.dynamic.impl; import java.util.List; import uk.co.telegraph.core.list.ListItem; import uk.co.telegraph.core.list.dynamic.AbstractDynamicList; import uk.co.telegraph.core.list.dynamic.ListSearchEngineWrapper; import uk.co.telegraph.core.search.api.ComparisonSearchCriteria; import uk.co.telegraph.core.search.api.Hits; import uk.co.telegraph.core.search.api.SearchResultOrder; /** * Comparison list */ public class StandardDynamicComparisonList extends AbstractDynamicList { @Override public List<ListItem> getItems(int offset, int limit) { return findItems(offset, limit); } protected List<ListItem> findItems(int offset, int limit) { ComparisonSearchCriteria searchCriteria = new ComparisonSearchCriteria(); searchCriteria.setTags(tags); ComparisonListSearchEngineWrapper wrapper = new ComparisonListSearchEngineWrapper(); wrapper.setSearchCriteria(searchCriteria); return findAllItems(wrapper, offset, limit); } private class ComparisonListSearchEngineWrapper implements ListSearchEngineWrapper { private ComparisonSearchCriteria searchCriteria; @Override public Hits findItems(int limit, int offset) { return getSearchEngine().findComparisons(searchCriteria, SearchResultOrder.fromString(listConfiguration.getOrderBy()), limit, offset, listConfiguration.isPaginated()); } public void setSearchCriteria(ComparisonSearchCriteria searchCriteria) { this.searchCriteria = searchCriteria; } } }
[ "d15_1_89@msn.com" ]
d15_1_89@msn.com
312a4c8ef7cd58c7da8300d2956c883ce84073ac
cf729a7079373dc301d83d6b15e2451c1f105a77
/adwords_appengine/src/main/java/com/google/api/ads/adwords/jaxws/v201601/o/package-info.java
c559f3262d2224641ee91873ead87538ab1130e0
[]
no_license
cvsogor/Google-AdWords
044a5627835b92c6535f807ea1eba60c398e5c38
fe7bfa2ff3104c77757a13b93c1a22f46e98337a
refs/heads/master
2023-03-23T05:49:33.827251
2021-03-17T14:35:13
2021-03-17T14:35:13
348,719,387
0
0
null
null
null
null
UTF-8
Java
false
false
221
java
@javax.xml.bind.annotation.XmlSchema(namespace = "https://adwords.google.com/api/adwords/o/v201601", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package com.google.api.ads.adwords.jaxws.v201601.o;
[ "vacuum13@gmail.com" ]
vacuum13@gmail.com
ae8084f3cbfae98fdfebdc19c3ca77834d7d52aa
28fb9884e4b35831bbccf3ead11296bf08272173
/estatioapp/app/src/main/java/org/estatio/module/lease/dom/invoicing/summary/comms/DocAndCommForInvoiceDoc_downloadSelected.java
8c67d262d1f5d1ad21210d67c9dbbee2aeb77a0c
[ "Apache-2.0" ]
permissive
grandPiano/estatio
1703191d57f4a784fbfa33f96cd3fe68ce66a575
3923f15a59fc13dff2aa181e89dbd4fa6750c107
refs/heads/master
2020-08-12T18:39:28.628482
2019-10-04T09:33:09
2019-10-04T09:33:09
214,820,841
1
0
Apache-2.0
2019-10-13T13:00:55
2019-10-13T13:00:55
null
UTF-8
Java
false
false
1,218
java
/* * * Copyright 2012-2014 Eurocommercial Properties NV * * * 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.estatio.module.lease.dom.invoicing.summary.comms; import org.apache.isis.applib.annotation.Mixin; import org.estatio.module.invoice.dom.DocumentTypeData; /** * TODO: inline this mixin (including superclass functionality) ... too confusing/abstracted */ @Mixin(method = "act") public class DocAndCommForInvoiceDoc_downloadSelected extends DocAndCommAbstract_downloadSelected<DocAndCommForInvoiceDoc> { public DocAndCommForInvoiceDoc_downloadSelected(final DocAndCommForInvoiceDoc docAndComm) { super(docAndComm, DocumentTypeData.INVOICE); } }
[ "dan@haywood-associates.co.uk" ]
dan@haywood-associates.co.uk
79bcd38dae89e1c88222bf6d0daa62b198ec83ef
0af8b92686a58eb0b64e319b22411432aca7a8f3
/single-large-project/src/test/java/org/gradle/test/performancenull_191/Testnull_19073.java
9b72fdca98729a49bba600da115772924e0241de
[]
no_license
gradle/performance-comparisons
b0d38db37c326e0ce271abebdb3c91769b860799
e53dc7182fafcf9fedf07920cbbea8b40ee4eef4
refs/heads/master
2023-08-14T19:24:39.164276
2022-11-24T05:18:33
2022-11-24T05:18:33
80,121,268
17
15
null
2022-09-30T08:04:35
2017-01-26T14:25:33
null
UTF-8
Java
false
false
308
java
package org.gradle.test.performancenull_191; import static org.junit.Assert.*; public class Testnull_19073 { private final Productionnull_19073 production = new Productionnull_19073("value"); @org.junit.Test public void test() { assertEquals(production.getProperty(), "value"); } }
[ "cedric.champeau@gmail.com" ]
cedric.champeau@gmail.com
55e299694344e97c80016b08cc28c2555bdc791f
273a9e2aaaba7b4dafe9acbf5d52a20339f762b3
/src/main/java/com/young/http/DataUtil.java
9fe355a9339a8d85c8ceba6259443ffbaed910c8
[]
no_license
missaouib/icore
419ba817de7c466ec3962ad62bcaadb854c5d90e
759a2f472f3d52e07ed466120fbcd9dfa02213e9
refs/heads/master
2021-12-30T05:37:47.338587
2018-02-06T02:05:39
2018-02-06T02:05:39
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,822
java
package com.young.http; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.nio.ByteBuffer; import java.util.regex.Matcher; import java.util.regex.Pattern; /** * Internal static utilities for handling data. * */ public class DataUtil { private static final Pattern charsetPattern = Pattern .compile("(?i)\\bcharset=\\s*\"?([^\\s;\"]*)"); public static final String defaultCharset = "UTF-8"; // used if not found in // header // or meta charset private static final int bufferSize = 0x20000; // ~130K. public DataUtil() { } /** * Loads a file to a Document. * * @param in * file to load * @param charsetName * character set of input * @param baseUri * base URI of document, to resolve relative links against * @return Document * @throws IOException * on IO error */ public static ByteBuffer readToByteBuffer(InputStream inStream) throws IOException { byte[] buffer = new byte[bufferSize]; ByteArrayOutputStream outStream = new ByteArrayOutputStream(bufferSize); int read; while (true) { read = inStream.read(buffer); if (read == -1) break; outStream.write(buffer, 0, read); } ByteBuffer byteData = ByteBuffer.wrap(outStream.toByteArray()); return byteData; } /** * Parse out a charset from a content type header. * * @param contentType * e.g. "text/html; charset=EUC-JP" * @return "EUC-JP", or null if not found. Charset is trimmed and * uppercased. */ static String getCharsetFromContentType(String contentType) { if (contentType == null) return null; Matcher m = charsetPattern.matcher(contentType); if (m.find()) { return m.group(1).trim().toUpperCase(); } return null; } }
[ "cng1985@gmail.com" ]
cng1985@gmail.com
26b6f3a008b942a5abd78eb64542481811b93299
52b948436b826df8164565ffe69e73a92eb92cda
/Source/comingd4jmore/GenProg_patch_Defects4J_Closure_21_0_500/CheckSideEffects/GenProg_patch_Defects4J_Closure_21_0_500_CheckSideEffects_t.java
cd4b39a42f258af0af14379b42b2cf95d3ec4049
[]
no_license
tdurieux/ODSExperiment
910365f1388bc684e9916f46f407d36226a2b70b
3881ef06d6b8d5efb751860811def973cb0220eb
refs/heads/main
2023-07-05T21:30:30.099605
2021-08-18T15:56:56
2021-08-18T15:56:56
null
0
0
null
null
null
null
UTF-8
Java
false
false
6,892
java
/* * Copyright 2006 The Closure Compiler Authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ package com.google.javascript.jscomp; import com.google.common.collect.Lists; import com.google.javascript.jscomp.CheckLevel; import com.google.javascript.jscomp.NodeTraversal.AbstractPostOrderCallback; import com.google.javascript.rhino.IR; import com.google.javascript.rhino.JSDocInfoBuilder; import com.google.javascript.rhino.Node; import com.google.javascript.rhino.Token; import java.util.List; /** * Checks for non side effecting statements such as * <pre> * var s = "this string is " * "continued on the next line but you forgot the +"; * x == foo(); // should that be '='? * foo();; // probably just a stray-semicolon. Doesn't hurt to check though * </p> * and generates warnings. * */ final class CheckSideEffects extends AbstractPostOrderCallback implements HotSwapCompilerPass { static final DiagnosticType USELESS_CODE_ERROR = DiagnosticType.warning( "JSC_USELESS_CODE", "Suspicious code. {0}"); static final String PROTECTOR_FN = "JSCOMPILER_PRESERVE"; private final CheckLevel level; private final List<Node> problemNodes = Lists.newArrayList(); private final AbstractCompiler compiler; private final boolean protectSideEffectFreeCode; CheckSideEffects(AbstractCompiler compiler, CheckLevel level, boolean protectSideEffectFreeCode) { this.compiler = compiler; this.level = level; this.protectSideEffectFreeCode = protectSideEffectFreeCode; } @Override public void process(Node externs, Node root) { NodeTraversal.traverse(compiler, root, this); // Code with hidden side-effect code is common, for example // accessing "el.offsetWidth" forces a reflow in browsers, to allow this // will still allowing local dead code removal in general, // protect the "side-effect free" code in the source. // if (protectSideEffectFreeCode) { protectSideEffects(); } } @Override public void hotSwapScript(Node scriptRoot, Node originalRoot) { NodeTraversal.traverse(compiler, scriptRoot, this); } @Override public void visit(NodeTraversal t, Node n, Node parent) { // VOID nodes appear when there are extra semicolons at the BLOCK level. // I've been unable to think of any cases where this indicates a bug, // and apparently some people like keeping these semicolons around, // so we'll allow it. if (n.isEmpty() || n.isComma()) { return; } if (parent == null) { return; } // Do not try to remove a block or an expr result. We already handle // these cases when we visit the child, and the peephole passes will // fix up the tree in more clever ways when these are removed. if (n.isExprResult()) { return; } // This no-op statement was there so that JSDoc information could // be attached to the name. This check should not complain about it. if (n.isQualifiedName() && n.getJSDocInfo() != null) { return; } boolean isResultUsed = NodeUtil.isExpressionResultUsed(n); boolean isSimpleOp = NodeUtil.isSimpleOperatorType(n.getType()); if (parent.getType() == Token.COMMA) { if (isResultUsed) { return; } if (n == parent.getLastChild()) { int start = 0; } } else if (parent.getType() != Token.EXPR_RESULT && parent.getType() != Token.BLOCK) { if (! (parent.getType() == Token.FOR && parent.getChildCount() == 4 && (n == parent.getFirstChild() || n == parent.getFirstChild().getNext().getNext()))) { return; } } if ( (isSimpleOp || !NodeUtil.mayHaveSideEffects(n, t.getCompiler()))) { String msg = "This code lacks side-effects. Is there a bug?"; if (n.isString()) { msg = "Is there a missing '+' on the previous line?"; } else if (isSimpleOp) { msg = "The result of the '" + Token.name(n.getType()).toLowerCase() + "' operator is not being used."; } t.getCompiler().report( t.makeError(n, level, USELESS_CODE_ERROR, msg)); // TODO(johnlenz): determine if it is necessary to // try to protect side-effect free statements as well. if (!NodeUtil.isStatement(n)) { problemNodes.add(n); } } } /** * Protect side-effect free nodes by making them parameters * to a extern function call. This call will be removed * after all the optimizations passes have run. */ private void protectSideEffects() { if (!problemNodes.isEmpty()) { addExtern(); for (Node n : problemNodes) { Node name = IR.name(PROTECTOR_FN).srcref(n); name.putBooleanProp(Node.IS_CONSTANT_NAME, true); Node replacement = IR.call(name).srcref(n); replacement.putBooleanProp(Node.FREE_CALL, true); n.getParent().replaceChild(n, replacement); replacement.addChildToBack(n); } compiler.reportCodeChange(); } } private void addExtern() { Node name = IR.name(PROTECTOR_FN); name.putBooleanProp(Node.IS_CONSTANT_NAME, true); Node var = IR.var(name); // Add "@noalias" so we can strip the method when AliasExternals is enabled. JSDocInfoBuilder builder = new JSDocInfoBuilder(false); var.setJSDocInfo(builder.build(var)); CompilerInput input = compiler.getSynthesizedExternsInput(); input.getAstRoot(compiler).addChildrenToBack(var); compiler.reportCodeChange(); } /** * Remove side-effect sync functions. */ static class StripProtection extends AbstractPostOrderCallback implements CompilerPass { private final AbstractCompiler compiler; StripProtection(AbstractCompiler compiler) { this.compiler = compiler; } @Override public void process(Node externs, Node root) { NodeTraversal.traverse(compiler, root, this); } @Override public void visit(NodeTraversal t, Node n, Node parent) { if (n.isCall()) { Node target = n.getFirstChild(); // TODO(johnlenz): add this to the coding convention // so we can remove goog.reflect.sinkValue as well. if (target.isName() && target.getString().equals(PROTECTOR_FN)) { Node expr = n.getLastChild(); n.detachChildren(); parent.replaceChild(n, expr); } } } } }
[ "he_ye_90s@hotmail.com" ]
he_ye_90s@hotmail.com
5de61781b926410ead066fd5f84ac2022b2f6694
15e74fb0aabc1fa26826853d43461a349f9664f7
/nlf2-core/src/main/java/com/nlf/dao/setting/IDbSettingManager.java
fac6da810c977658aef3c1931951892eb4ce00f9
[ "MIT" ]
permissive
BasicTime/nlf2-maven
6b9b4c20cf0a3f307cceb6bddb0648813317bcf6
cd654bb905bb775ddf2faadf1185d5696808ed41
refs/heads/master
2023-01-23T03:21:27.104030
2020-12-10T09:20:26
2020-12-10T09:20:26
null
0
0
null
null
null
null
UTF-8
Java
false
false
236
java
package com.nlf.dao.setting; /** * DB้…็ฝฎ็ฎก็†ๆŽฅๅฃ * * @author 6tail * */ public interface IDbSettingManager{ /** * ่Žทๅ–DB้…็ฝฎๅˆ—่กจ * @return DB้…็ฝฎๅˆ—่กจ */ java.util.List<IDbSetting> listDbSettings(); }
[ "6tail@6tail.cn" ]
6tail@6tail.cn
23fe9b35e349da391a97027bad11153568744c07
46739ddb77feee2265af8436db6ac0eb2517e85a
/wallet-dap/wallet-dap-common/src/main/java/org/wallet/dap/common/bind/Results.java
1df6361767ad14bf8ba04a5f28217df333453b33
[]
no_license
guolinxin/wallet-parent
9f21e6208153a35c85ed9feb1e2112c5ca53d8c5
47dcec9c477dfe0433464033d234acf62c2dad57
refs/heads/master
2022-04-06T23:50:50.385832
2020-02-04T07:07:40
2020-02-04T07:07:40
null
0
0
null
null
null
null
UTF-8
Java
false
false
1,413
java
package org.wallet.dap.common.bind; import org.wallet.common.dto.SimpleResult; import org.wallet.common.enums.ResultCode; import org.wallet.dap.common.dubbo.ServiceResponse; /** * @author zengfucheng **/ public class Results { public static <T> SimpleResult<T> by(ServiceResponse response){ if(null == response){ return success(); } if(response.success()){ return success(response.getResult()); }else{ return fail(response.getRespMsg()); } } public static <T> SimpleResult<T> success(){ return new SimpleResult<>(); } public static <T> SimpleResult<T> success(T t){ return new SimpleResult<>(t); } public static <T> SimpleResult<T> of(String code, String message) { return new SimpleResult<>(code, message); } public static <T> SimpleResult<T> fail(String msg){ return new SimpleResult<>(ResultCode.BusinessFail.getCode(), msg); } public static <T> SimpleResult<T> fatal(String msg){ return new SimpleResult<>(ResultCode.ServiceFatal.getCode(), msg); } public static <T> SimpleResult<T> paramInvalid(String msg) { return new SimpleResult<>(ResultCode.ParamInvalid.getCode(), msg); } public static <T> SimpleResult<T> byCode(ResultCode resultCode){ return new SimpleResult<>(resultCode.getCode(), resultCode.getMessage()); } }
[ "snzke@live.cn" ]
snzke@live.cn
53643f1f9d72a43907ffb37c9ebd87a410e4d379
42e6d3197c94ca9a18c93deba739dfd2876f8acd
/WebdriverProject/src/day18/Xpath.java
6cc6cce2c5edd87f5fbff1d637b4ef0869d6fb74
[]
no_license
SaiKrishna12/24hrFitnessSessions
4475d80a692735994f09cdefb8db85b8e3a950f9
1e051273cd40c4d89a0af0b7ccfad79db366a728
refs/heads/master
2020-04-04T15:26:59.566107
2015-04-27T11:28:40
2015-04-27T11:28:40
33,820,413
0
0
null
null
null
null
UTF-8
Java
false
false
669
java
package day18; import org.openqa.selenium.By; import org.openqa.selenium.firefox.FirefoxDriver; import org.openqa.selenium.firefox.FirefoxProfile; import org.openqa.selenium.firefox.internal.ProfilesIni; import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class Xpath { FirefoxDriver driver; @BeforeMethod public void setup() { ProfilesIni pr=new ProfilesIni(); FirefoxProfile fp=pr.getProfile("SeleniumUser"); driver=new FirefoxDriver(fp); driver.get("http://yahoo.com"); } @Test public void xpathTest() { driver.findElement(By.xpath("//*[starts-with(@id,'yui_3_12_0_1_14254')]/div/ol/li[6]/a")).click(); } }
[ "saikrishna_gandham@yahoo.co.in" ]
saikrishna_gandham@yahoo.co.in
2d112647e63e568367d7424dfbf676d35dfda0b6
bf4122f5ae3a9f9b9c2cc94ef87cdb9dcadc9dc9
/Transfer/My Study/forestrymanagementsystemcollection/src/main/java/com/tyss/forestrymanagementsystemcollection/controller/ProductIO.java
a7f3f02cc528a32bd567a403cef6a23c8d009685
[]
no_license
haren7474/TY_ELF_JFS_HarendraKumar
7ef8b9a0bb6d6bdddb94b88ab2db4e0aef0fbc1d
f99ef30b40d0877167c8159e8b7f322af7cc87b9
refs/heads/master
2023-01-11T01:01:10.458037
2020-01-23T18:20:20
2020-01-23T18:20:20
225,845,989
0
0
null
2023-01-07T22:01:21
2019-12-04T11:00:37
HTML
UTF-8
Java
false
false
6,862
java
package com.tyss.forestrymanagementsystemcollection.controller; import java.util.List; import java.util.Scanner; import com.tyss.forestrymanagementsystemcollection.dto.ProductBean; import com.tyss.forestrymanagementsystemcollection.factory.ForestryManagementSystemFactory; import com.tyss.forestrymanagementsystemcollection.services.ProductServices; public class ProductIO { static Scanner sc = new Scanner(System.in); static ProductBean product = null; static List<ProductBean> productList = null; static ProductServices productServices = ForestryManagementSystemFactory.instanceOfProductServies(); public static void productHandler(String userType) { while (true) { int productId; switch (productMenu(userType)) { case 1: displayAllProducts(); break; case 2: System.out.println("Please enter Product Id to be searched"); productId = Validation.readValidInteger(); product = productServices.searchProduct(productId); if (product != null) { System.out.println("Product Id: " + productId + " is present in database."); System.out.println("Product Name: " + product.getProductName()); System.out.println("Product Quantity: " + product.getProductQuantity()); System.out.println("Product Price: " + product.getProductPrice()); } else { System.out.println("Product Id: " + productId + " is not present in database."); } break; case 3: displayProductDemand(); break; case 4: if (userType.equalsIgnoreCase("Owner")) { if (productServices.addProduct(readProductDetails())) { System.out.println("New Product has been added"); } else { System.err.println("Incorrect Input, please try again."); } } else { System.out.println("Modification rights are reserved for Owner only."); } break; case 5: if (userType.equalsIgnoreCase("Owner")) { System.out.println("Please enter Product Id to be deleted"); productId = Validation.readValidInteger(); if (productServices.deleteProduct(productId)) { System.out.println("Product with ID: " + productId + " has been deleted"); } else { System.out.println("Product with ID: " + productId + " is not present in database"); } } else { System.out.println("Modification rights are reserved for Owner only."); } break; case 6: if (userType.equalsIgnoreCase("Owner")) { displayAllProducts(); System.out.println("Please enter Product Id from above list to update quantity"); productId = Validation.readValidInteger(); if (productServices.searchProduct(productId) != null) { System.out.println("Please enter new Quantity"); int newQuantity = Validation.readValidQuantity(); productServices.updateQuantity(productId, newQuantity); System.out.println("Product quantity has been updated."); } else { System.out.println("Product Id: " + productId + " is not present in database."); } } else { System.out.println("Modification rights are reserved for Owner only."); } break; case 7: return; case 8: System.exit(0); break; default: System.out.println("Invalid Choice"); } } } private static void displayProductDemand() { productList = productServices.getAllProduct(); if (productList.size() > 0) { System.out.println("\t\t<<<<<<Product Details>>>>>"); System.out.println("PId\tOwnId\tQuantity\tPrice($)\tName\t\tComments"); System.out.println("---------------------------------------------------------------------"); int countOfProductsInDemand = 0; for (ProductBean product : productList) { if (product.getProductQuantity() < 20) { countOfProductsInDemand++; System.out.println(product); } } if (countOfProductsInDemand == 0) { System.out.println("All product have enough stock as per current demand!!!!"); } else { System.out.println(countOfProductsInDemand + " products which are listed above are in demand, need to be imported"); } } else { System.out.println("No Database for Products, please add new product"); } } public static int productMenu(String userType) { if (userType.equalsIgnoreCase("Owner")) { System.out.println("***********Product Menu***********"); System.out.println( "1. Display All Product\n2. Search Product\n3. Check Product Demand\n4. Add Product\n5. Delete Product\n6. Update Product Quantity\n7. Go to Dashboard\n8. Exit"); System.out.println("*********************************"); System.out.println("Please enter your choice from Product Menu"); int productChoice = Validation.readValidInteger(); return productChoice; } else { System.out.println("***********Product Menu***********"); System.out.println( "1. Display All Product\n2. Search Product\n3. Check Product Demand\n4. Go to Dashboard\n5. Exit"); System.out.println("*********************************"); System.out.println("Please enter your choice from Product Menu"); int productChoice = Validation.readValidInteger(); if (productChoice == 1) { productChoice = 1; } else if (productChoice == 2) { productChoice = 2; } else if (productChoice == 3) { productChoice = 3; } else if (productChoice == 4) { productChoice = 7; } else if (productChoice == 5) { productChoice = 8; } else { productChoice = -1; } return productChoice; } } public static ProductBean readProductDetails() { product = new ProductBean(); System.out.println("Please enter Product Id"); int productId = Validation.readValidInteger(); product.setProductId(productId); System.out.println("Please enter Product Name"); sc.nextLine(); String productName = Validation.readValidName(); product.setProductName(productName); System.out.println("Please enter Product Quantity"); int productQuantity = Validation.readValidInteger(); product.setProductQuantity(productQuantity); System.out.println("Please enter Product Price per unit"); double productPrice = sc.nextDouble(); product.setProductPrice(productPrice); System.out.println("Please enter Product Comments"); sc.nextLine(); product.setProductComments(sc.nextLine()); product.setProductOwnerId(ContractIO.displayAllUsersGetIdInput("Owner")); return product; } public static void displayAllProducts() { productList = productServices.getAllProduct(); if (productList.size() > 0) { System.out.println("\t\t<<<<<<Product Details>>>>>"); System.out.println("PId\tOwnId\tQuantity\tPrice($)\tName\t\tComments"); System.out.println("---------------------------------------------------------------------"); for (ProductBean product : productList) { System.out.println(product); } } else { System.out.println("No Database for Products, please add new product"); } } }
[ "harendra10104698@gmail.com" ]
harendra10104698@gmail.com