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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
cdcc21efbd633de22c6b8a3c1cd72a7f13692fa9 | 12563229bd1c69d26900d4a2ea34fe4c64c33b7e | /nan21.dnet.module.hr/nan21.dnet.module.hr.business/src/main/java/net/nan21/dnet/module/hr/skill/business/serviceimpl/RatingScaleService.java | ea16635e3246cf335d02e90a6c738d4d93e08079 | [] | no_license | nan21/nan21.dnet.modules | 90b002c6847aa491c54bd38f163ba40a745a5060 | 83e5f02498db49e3d28f92bd8216fba5d186dd27 | refs/heads/master | 2023-03-15T16:22:57.059953 | 2012-08-01T07:36:57 | 2012-08-01T07:36:57 | 1,918,395 | 0 | 1 | null | 2012-07-24T03:23:00 | 2011-06-19T05:56:03 | Java | UTF-8 | Java | false | false | 1,212 | java | /*
* DNet eBusiness Suite
* Copyright: 2008-2012 Nan21 Electronics SRL. All rights reserved.
* Use is subject to license terms.
*/
package net.nan21.dnet.module.hr.skill.business.serviceimpl;
import net.nan21.dnet.core.api.session.Session;
import net.nan21.dnet.core.business.service.AbstractEntityService;
import net.nan21.dnet.module.hr.skill.business.service.IRatingScaleService;
import javax.persistence.EntityManager;
import net.nan21.dnet.module.hr.skill.domain.entity.RatingScale;
public class RatingScaleService extends AbstractEntityService<RatingScale>
implements IRatingScaleService {
public RatingScaleService() {
super();
}
public RatingScaleService(EntityManager em) {
super();
this.em = em;
}
@Override
protected Class<RatingScale> getEntityClass() {
return RatingScale.class;
}
public RatingScale findByName(String name) {
return (RatingScale) this.em
.createNamedQuery(RatingScale.NQ_FIND_BY_NAME)
.setParameter("pClientId", Session.user.get().getClientId())
.setParameter("pName", name).getSingleResult();
}
}
| [
"mathe_attila@yahoo.com"
] | mathe_attila@yahoo.com |
d470033820c5ff9b729a108ab7a6473d08bd5397 | f28dce60491e33aefb5c2187871c1df784ccdb3a | /src/main/java/com/tencent/tinker/android/utils/SparseIntArray.java | 48e7f6dad39cddcf48c7bd90293e54d4c6700c7e | [
"Apache-2.0"
] | permissive | JackChan1999/boohee_v5.6 | 861a5cad79f2bfbd96d528d6a2aff84a39127c83 | 221f7ea237f491e2153039a42941a515493ba52c | refs/heads/master | 2021-06-11T23:32:55.977231 | 2017-02-14T18:07:04 | 2017-02-14T18:07:04 | 81,962,585 | 8 | 6 | null | null | null | null | UTF-8 | Java | false | false | 5,450 | java | package com.tencent.tinker.android.utils;
public class SparseIntArray implements Cloneable {
private static final int[] EMPTY_INT_ARRAY = new int[0];
private int[] mKeys;
private int mSize;
private int[] mValues;
public SparseIntArray() {
this(10);
}
public SparseIntArray(int initialCapacity) {
if (initialCapacity == 0) {
this.mKeys = EMPTY_INT_ARRAY;
this.mValues = EMPTY_INT_ARRAY;
} else {
this.mKeys = new int[initialCapacity];
this.mValues = new int[this.mKeys.length];
}
this.mSize = 0;
}
public static int growSize(int currentSize) {
return currentSize <= 4 ? 8 : (currentSize >> 1) + currentSize;
}
public SparseIntArray clone() {
SparseIntArray clone = null;
try {
clone = (SparseIntArray) super.clone();
clone.mKeys = (int[]) this.mKeys.clone();
clone.mValues = (int[]) this.mValues.clone();
return clone;
} catch (CloneNotSupportedException e) {
return clone;
}
}
public int get(int key) {
return get(key, 0);
}
public int get(int key, int valueIfKeyNotFound) {
int i = binarySearch(this.mKeys, this.mSize, key);
return i < 0 ? valueIfKeyNotFound : this.mValues[i];
}
public void delete(int key) {
int i = binarySearch(this.mKeys, this.mSize, key);
if (i >= 0) {
removeAt(i);
}
}
public void removeAt(int index) {
System.arraycopy(this.mKeys, index + 1, this.mKeys, index, this.mSize - (index + 1));
System.arraycopy(this.mValues, index + 1, this.mValues, index, this.mSize - (index + 1));
this.mSize--;
}
public void put(int key, int value) {
int i = binarySearch(this.mKeys, this.mSize, key);
if (i >= 0) {
this.mValues[i] = value;
return;
}
i ^= -1;
this.mKeys = insertElementIntoIntArray(this.mKeys, this.mSize, i, key);
this.mValues = insertElementIntoIntArray(this.mValues, this.mSize, i, value);
this.mSize++;
}
public int size() {
return this.mSize;
}
public int keyAt(int index) {
return this.mKeys[index];
}
public int valueAt(int index) {
return this.mValues[index];
}
public int indexOfKey(int key) {
return binarySearch(this.mKeys, this.mSize, key);
}
public int indexOfValue(int value) {
for (int i = 0; i < this.mSize; i++) {
if (this.mValues[i] == value) {
return i;
}
}
return -1;
}
public void clear() {
this.mSize = 0;
}
public void append(int key, int value) {
if (this.mSize == 0 || key > this.mKeys[this.mSize - 1]) {
this.mKeys = appendElementIntoIntArray(this.mKeys, this.mSize, key);
this.mValues = appendElementIntoIntArray(this.mValues, this.mSize, value);
this.mSize++;
return;
}
put(key, value);
}
private int binarySearch(int[] array, int size, int value) {
int lo = 0;
int hi = size - 1;
while (lo <= hi) {
int i = (lo + hi) >>> 1;
int midVal = array[i];
if (midVal < value) {
lo = i + 1;
} else if (midVal <= value) {
return i;
} else {
hi = i - 1;
}
}
return lo ^ -1;
}
private int[] appendElementIntoIntArray(int[] array, int currentSize, int element) {
if (currentSize > array.length) {
throw new IllegalArgumentException("Bad currentSize, originalSize: " + array.length +
" currentSize: " + currentSize);
}
if (currentSize + 1 > array.length) {
int[] newArray = new int[growSize(currentSize)];
System.arraycopy(array, 0, newArray, 0, currentSize);
array = newArray;
}
array[currentSize] = element;
return array;
}
private int[] insertElementIntoIntArray(int[] array, int currentSize, int index, int element) {
if (currentSize > array.length) {
throw new IllegalArgumentException("Bad currentSize, originalSize: " + array.length +
" currentSize: " + currentSize);
} else if (currentSize + 1 <= array.length) {
System.arraycopy(array, index, array, index + 1, currentSize - index);
array[index] = element;
return array;
} else {
int[] newArray = new int[growSize(currentSize)];
System.arraycopy(array, 0, newArray, 0, index);
newArray[index] = element;
System.arraycopy(array, index, newArray, index + 1, array.length - index);
return newArray;
}
}
public String toString() {
if (size() <= 0) {
return "{}";
}
StringBuilder buffer = new StringBuilder(this.mSize * 28);
buffer.append('{');
for (int i = 0; i < this.mSize; i++) {
if (i > 0) {
buffer.append(", ");
}
buffer.append(keyAt(i));
buffer.append('=');
buffer.append(valueAt(i));
}
buffer.append('}');
return buffer.toString();
}
}
| [
"jackychan2040@gmail.com"
] | jackychan2040@gmail.com |
398e45aaf7832010790f2f58acd49690e60d0761 | 76b27c5bf9e463e1966f1bac6673f7470bf32d90 | /client/src/main/java/com/berzenin/backup/client/App.java | 90a346e122681092931b626f501918a6342ee63e | [] | no_license | FilippBerzenin/backupService | 95af73c392940d72ed472192114be47abb7b55e1 | ceea4a87e44aa504c9107c0bab762d97be0fd19f | refs/heads/master | 2021-06-13T06:06:01.712450 | 2019-06-07T12:50:24 | 2019-06-07T12:50:24 | 188,823,882 | 0 | 0 | null | 2021-04-26T19:11:47 | 2019-05-27T10:38:32 | Java | UTF-8 | Java | false | false | 1,458 | java | package com.berzenin.backup.client;
import java.nio.file.Path;
import java.nio.file.Paths;
import lombok.extern.java.Log;
@Log
public class App {
private String serverIp;
private Path workingDirectoryPath;
private int port;
private Client client;
public App(String serverIp, Path workingDirectoryPath, int port) {
this.serverIp = serverIp;
this.workingDirectoryPath = workingDirectoryPath;
this.port = port;
startClient(this);
}
public App() {
}
public static void main(String[] args) {
App app = new App();
if (args.length == 3 && app.isArgsRight(args[0], args[1], args[2])) {
app.workingDirectoryPath = Paths.get(args[0]);
app.serverIp = args[1];
app.port = Integer.parseInt(args[2]);
app.startClient(app);
} else {
new JFrameForArgs().createGUI();;
}
}
private boolean isArgsRight(String workingDirectoryPath, String serverIp, String port) {
if (workingDirectoryPath.equals(null) || workingDirectoryPath.length() == 0) {
return false;
}
if (serverIp.equals(null) || workingDirectoryPath.length() == 0) {
return false;
}
if (port.equals(null) || port.length() == 0) {
return false;
}
return true;
}
private void startClient(App app) {
log.info("workingDirectoryPath: " + app.workingDirectoryPath);
log.info("serverIp: " + app.serverIp);
log.info("port: " + app.port);
app.client = new Client(app.workingDirectoryPath, app.serverIp, app.port);
app.client.run();
}
}
| [
"filipp.berzenin@gmail.com"
] | filipp.berzenin@gmail.com |
34aa7311fa0443a3aa1e97c2e2ae2b69ac5ba93f | 167c6226bc77c5daaedab007dfdad4377f588ef4 | /java/ql/test/stubs/jackson-core-2.12/com/fasterxml/jackson/core/JsonGenerationException.java | 66c2be492e25ccc56bf17beaebffb5b0e4100b66 | [
"MIT"
] | permissive | github/codeql | 1eebb449a34f774db9e881b52cb8f7a1b1a53612 | d109637e2d7ab3b819812eb960c05cb31d9d2168 | refs/heads/main | 2023-08-20T11:32:39.162059 | 2023-08-18T14:33:32 | 2023-08-18T14:33:32 | 143,040,428 | 5,987 | 1,363 | MIT | 2023-09-14T19:36:50 | 2018-07-31T16:35:51 | CodeQL | UTF-8 | Java | false | false | 776 | java | /*
* Jackson JSON-processor.
*
* Copyright (c) 2007- Tatu Saloranta, tatu.saloranta@iki.fi
*/
package com.fasterxml.jackson.core;
public class JsonGenerationException extends JsonProcessingException {
public JsonGenerationException(Throwable rootCause) {}
public JsonGenerationException(String msg) {}
public JsonGenerationException(String msg, Throwable rootCause) {}
public JsonGenerationException(Throwable rootCause, JsonGenerator g) {}
public JsonGenerationException(String msg, JsonGenerator g) {}
public JsonGenerationException(String msg, Throwable rootCause, JsonGenerator g) {}
public JsonGenerationException withGenerator(JsonGenerator g) {
return null;
}
@Override
public JsonGenerator getProcessor() {
return null;
}
}
| [
"atorralba@users.noreply.github.com"
] | atorralba@users.noreply.github.com |
2ddf59823cff61838c28e5d52731586b33ef9390 | 556c3751f0b608a7d34f0cc9e1be7f6c84660c9c | /modules/plugin.action/source/java/action/us/terebi/plugins/action/efun/CommandEfun.java | 6f13744619a3b6deaa34dacbf055a7b3a3d8459e | [] | no_license | tvernum/terebi | b187dc70a412733a81f31dfcccdb4c2c75b0bb5a | 1a4e77a16f50040f173dd6b69d9b919f7627eb4d | refs/heads/master | 2021-01-02T09:32:50.701832 | 2019-08-21T01:58:27 | 2019-08-21T01:58:27 | 7,537,314 | 2 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,789 | java | /* ------------------------------------------------------------------------
* Copyright 2010 Tim Vernum
* ------------------------------------------------------------------------
* 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 us.terebi.plugins.action.efun;
import java.util.Collections;
import java.util.List;
import us.terebi.lang.lpc.runtime.ArgumentDefinition;
import us.terebi.lang.lpc.runtime.LpcType;
import us.terebi.lang.lpc.runtime.LpcValue;
import us.terebi.lang.lpc.runtime.jvm.LpcConstants;
import us.terebi.lang.lpc.runtime.jvm.efun.AbstractEfun;
import us.terebi.lang.lpc.runtime.jvm.efun.Efun;
import us.terebi.lang.lpc.runtime.jvm.type.Types;
import us.terebi.lang.lpc.runtime.util.ArgumentSpec;
/**
*
*/
public class CommandEfun extends AbstractEfun implements Efun
{
protected List< ? extends ArgumentDefinition> defineArguments()
{
return Collections.singletonList(new ArgumentSpec("str", Types.STRING));
}
public LpcType getReturnType()
{
return Types.INT;
}
public LpcValue execute(List< ? extends LpcValue> arguments)
{
// @TODO Auto-generated method stub
return LpcConstants.INT.ZERO;
}
}
| [
"tim@adjective.org"
] | tim@adjective.org |
8c958771ce9a8d5f3ba6b0c0eb1ca22774746879 | a204e2fdeb1cbe7b295be45f8c69536945345b39 | /independent-projects/resteasy-reactive/server/runtime/src/main/java/org/jboss/resteasy/reactive/server/jaxrs/QuarkusRestAbstractInterceptorContext.java | c0ce7e36a1b3e72d7cc52adfa281b06bcd10617a | [
"Apache-2.0"
] | permissive | nelsongraca/quarkus | a5f8d479dee62973c9827f2928c476bb43b56ce7 | 04283ec0eb0f0b81f7f5faf1140cac089bd9a052 | refs/heads/master | 2023-01-24T20:42:10.026234 | 2020-11-25T13:19:27 | 2020-11-25T13:19:27 | 215,742,126 | 0 | 0 | Apache-2.0 | 2023-01-19T22:32:03 | 2019-10-17T08:31:40 | Java | UTF-8 | Java | false | false | 2,637 | java | package org.jboss.resteasy.reactive.server.jaxrs;
import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Collection;
import java.util.Objects;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.ext.InterceptorContext;
import org.jboss.resteasy.reactive.server.core.ResteasyReactiveRequestContext;
import org.jboss.resteasy.reactive.server.core.ServerSerialisers;
public abstract class QuarkusRestAbstractInterceptorContext implements InterceptorContext {
protected final ResteasyReactiveRequestContext context;
protected Annotation[] annotations;
protected Class<?> type;
protected Type genericType;
protected MediaType mediaType;
protected final ServerSerialisers serialisers;
// as the interceptors can change the type or mediaType, when that happens we need to find a new reader/writer
protected boolean rediscoveryNeeded = false;
public QuarkusRestAbstractInterceptorContext(ResteasyReactiveRequestContext context, Annotation[] annotations,
Class<?> type,
Type genericType, MediaType mediaType, ServerSerialisers serialisers) {
this.context = context;
this.annotations = annotations;
this.type = type;
this.genericType = genericType;
this.mediaType = mediaType;
this.serialisers = serialisers;
}
public Object getProperty(String name) {
return context.getProperty(name);
}
public Collection<String> getPropertyNames() {
return context.getPropertyNames();
}
public void setProperty(String name, Object object) {
context.setProperty(name, object);
}
public void removeProperty(String name) {
context.removeProperty(name);
}
public Annotation[] getAnnotations() {
return annotations;
}
public void setAnnotations(Annotation[] annotations) {
Objects.requireNonNull(annotations);
this.annotations = annotations;
}
public Class<?> getType() {
return type;
}
public void setType(Class<?> type) {
if ((this.type != type) && (type != null)) {
rediscoveryNeeded = true;
}
this.type = type;
}
public Type getGenericType() {
return genericType;
}
public void setGenericType(Type genericType) {
this.genericType = genericType;
}
public MediaType getMediaType() {
return mediaType;
}
public void setMediaType(MediaType mediaType) {
if (this.mediaType != mediaType) {
rediscoveryNeeded = true;
}
this.mediaType = mediaType;
}
}
| [
"geoand@gmail.com"
] | geoand@gmail.com |
d46a3cf8299cc0bbfac9cfb2af3c2399feff995e | c031ec74cccfd04e8a55b69cb9b79b6cd3dcb6fe | /src/algorithm12_20/ms/GenerateParentheses.java | 501106d067f32a052e6c413fd13382a519e18d27 | [] | no_license | tunks/aglo-practise1 | 3b76b427b917a872d804ef4dfe31e06272c8ed20 | bf3232b1b0afa507dad9415296e640e51dfee94d | refs/heads/main | 2023-02-09T21:08:19.962878 | 2021-01-05T17:15:36 | 2021-01-05T17:15:36 | 320,035,951 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,293 | java | package algorithm12_20.ms;
/**
*
* Generate Parentheses
Medium
6722
305
Add to List
Share
Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.
Example 1:
Input: n = 3
Output: ["((()))","(()())","(())()","()(())","()()()"]
Example 2:
Input: n = 1
Output: ["()"]
* */
public class GenerateParentheses {
public List<String> generateParenthesis(int n) {
/*List<String> res= new ArrayList<>();
helper(n, res, 0,0,"");
//O(n^4)
return res;
*/
return generateParenthesis2(n);
}
public void helper(int n, List<String> res, int open, int close, String curr){
if(curr.length()==2*n) {
res.add(curr);
}
if(open<n) {
helper(n,res,open+1,close, curr+"(");
}
if(close<open){
helper(n,res,open,close+1, curr+")");
}
}
public List<String> generateParenthesis2(final int n) {
if (n == 0) {
return Collections.emptyList();
}
var result = new ArrayList<String>();
var queue = new ArrayDeque<Parenthesis>();
queue.offer(new Parenthesis(0, 0, ""));
while (!queue.isEmpty()) {
var current = queue.poll();
int opening = current.openingCount;
int closing = current.closingCount;
String bracket = current.bracket;
if (opening == n && closing == n) {
result.add(bracket);
}
else{
if (opening < n) {
queue.offer(new Parenthesis(opening + 1, closing, bracket + "("));
}
if (opening > closing) {
queue.offer(new Parenthesis(opening, closing + 1, bracket + ")"));
}
}
}
return result;
}
private static class Parenthesis {
int openingCount;
int closingCount;
String bracket;
Parenthesis(int openingCount, int closingCount, String bracket) {
this.openingCount = openingCount;
this.closingCount = closingCount;
this.bracket = bracket;
}
}
}
| [
"ebrimatunkara@gmail.com"
] | ebrimatunkara@gmail.com |
68e31eab5c20a11efc01ddce709d5e09cd5a8c16 | 2fbb920555d82dc6fdadc129749acf6c632fb7d4 | /gdsap-framework/src/main/java/uk/co/quidos/gdsap/framework/log/persistence/GdsapAltTypeMapper.java | 07b029232dc8df77544e8a0880c7be830a7b14b1 | [
"Apache-2.0"
] | permissive | ZhangPeng1990/crm | 3cd31b6a121418c47032979354af0886a236a0cf | c5b176718924c024a13cc6ceccb2e737e70cedd3 | refs/heads/master | 2020-06-05T18:25:41.600112 | 2015-04-29T10:38:01 | 2015-04-29T10:38:01 | 34,787,517 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 613 | java | package uk.co.quidos.gdsap.framework.log.persistence;
import java.util.List;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;
import org.springframework.stereotype.Repository;
import uk.co.quidos.dal.BaseMapper;
import uk.co.quidos.gdsap.framework.log.persistence.object.GdsapAltType;
/**
* @author peng.shi
*
*/
@Repository
public interface GdsapAltTypeMapper extends BaseMapper<GdsapAltType,String>
{
List<String> findPageBreakAllIdsByTitle(@Param("title")String title,RowBounds rb);
int findNumberByTitle(@Param("title")String title);
} | [
"peng.zhang@argylesoftware.co.uk"
] | peng.zhang@argylesoftware.co.uk |
c2fd9aa53d46ff833de7b7930f1e21efc14f232b | 0640b8621220bb7376c1dd8dc8189d5ef14897c9 | /src/main/java/com/util/CommonByteUtil.java | 15cb15cab1a177a56de56503b126f78dced3f013 | [] | no_license | yuanlincheng/ara-util | ea627df0f835be6e7c409dfbd4781c930371d012 | bc3d56da9d2fb5033f161d82f8c6350cd43dc4ba | refs/heads/master | 2021-01-21T13:15:10.306666 | 2017-09-20T03:39:11 | 2017-09-20T03:39:11 | 97,467,384 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,645 | java | package com.util;
/**
* 文件名:
* 作者:tree
* 时间:2017/5/2
* 描述:
* 版权:亚略特
*/
public class CommonByteUtil {
/**
* @author 作者:tree
* @Date 时间:2017/5/5 16:17
* 功能说明:进行多个byte截位组装 暂时无用 备用
* @param srcByte 原byte数组
* @return 目标byte数组
*/
public static byte[] bytePlainMerger(byte[] srcByte){
byte[] desByte = null;
int num = 32;
int x = 5;
int y = 40;
if(srcByte[1] == 121){
desByte = new byte[srcByte.length+1];
if (srcByte[3] == 32) {
x = x - 1;
y = y - 1;
}else{
y = y - 1;
}
}else{
desByte = new byte[srcByte.length+2];
if(srcByte[3] == 32){
srcByte[3] = 33;
}
if(srcByte[37] == 32){
srcByte[37] = 33;
}
}
System.arraycopy(srcByte, 0, desByte, 0, 4);
System.arraycopy(srcByte, 4, desByte, x, 34);
System.arraycopy(srcByte,38, desByte, y, srcByte.length - 38);
return desByte;
}
/**
* @author 作者:tree
* @Date 时间:2017/5/5 16:17
* 功能说明:进行多个byte截位组装 暂时无用 备用
* @param srcByte 原byte数组
* @return 目标byte数组
*/
public static byte[] changeJceByte(byte[] srcByte,int type){
if(srcByte[0] == 48){
byte[] desByte = null;
if(1==type){
desByte = new byte[srcByte.length+1];
System.arraycopy(srcByte, 0, desByte, 0, 38);
desByte[1] = 122;
desByte[38] = 33;
desByte[39] = 0;
System.arraycopy(srcByte, 39, desByte, 40, srcByte.length - 39);
}else if (2 == type){
desByte = new byte[srcByte.length-1];
System.arraycopy(srcByte, 0, desByte, 0, 4);
desByte[1] = 120;
desByte[3] = 32;
System.arraycopy(srcByte, 5, desByte, 4, srcByte.length - 5);
}else{
desByte = new byte[srcByte.length];
System.arraycopy(srcByte, 0, desByte, 0, 4);
desByte[3] = 32;
System.arraycopy(srcByte, 5, desByte, 4, 34);
desByte[37] = 33;
desByte[38] = 0;
System.arraycopy(srcByte, 39, desByte, 39, srcByte.length - 39);
}
return desByte;
}else{
return srcByte;
}
}
}
| [
"yuanlinchengyx@163.com"
] | yuanlinchengyx@163.com |
67cfb4289c5e1aa20751642b7483f68bee9d26fe | 3a3d82fd0faeed8f0f443dfe3faab5131726daa0 | /gui/simple/RoomTempCellRenderer.java | 8f73f0c3300099b4cd3c3b78a1d791dce8297c8a | [] | no_license | galgalusha/webitc | 3252c69b399c410091ae48f56422d23f07ee54cd | 3cc4908bf67908a3eeb8d63f3a4d9b9339331f37 | refs/heads/master | 2021-08-06T05:46:05.823169 | 2017-11-03T13:52:08 | 2017-11-03T13:52:08 | 109,401,575 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 645 | java | package webitc.gui.simple;
import java.awt.Component;
import javax.swing.JTable;
import webitc.data.ID;
import webitc.gui.common.IconRes;
class RoomTempCellRenderer
extends SimpleCellRendererAbst
{
RoomTempCellRenderer() {}
public Component getTableCellRendererComponent(JTable paramJTable, Object paramObject, boolean paramBoolean1, boolean paramBoolean2, int paramInt1, int paramInt2)
{
setColor(paramBoolean1);
if (paramObject != null)
{
setIcon(IconRes.getIcon(100));
ID localID = (ID)paramObject;
String str = SimpleCommon.getRoomTempStr(localID);
setText(str);
}
return this;
}
}
| [
"koren.gal@gmail.com"
] | koren.gal@gmail.com |
dbbf24070e6e6956ea65e01cbe342d75c3a8431b | 493a8065cf8ec4a4ccdf136170d505248ac03399 | /net.sf.ictalive.service.owlseditor.diagram/src/control/diagram/part/ControlShortcutPropertyTester.java | 5fe20188cba794bc2e9c27ef5ba13d9cec94f089 | [] | no_license | ignasi-gomez/aliveclipse | 593611b2d471ee313650faeefbed591c17beaa50 | 9dd2353c886f60012b4ee4fe8b678d56972dff97 | refs/heads/master | 2021-01-14T09:08:24.839952 | 2014-10-09T14:21:01 | 2014-10-09T14:21:01 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 938 | java | /*
*
*/
package control.diagram.part;
import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.emf.ecore.EAnnotation;
import org.eclipse.gmf.runtime.notation.View;
import control.diagram.edit.parts.OuterProcessEditPart;
/**
* @generated
*/
public class ControlShortcutPropertyTester extends PropertyTester {
/**
* @generated
*/
protected static final String SHORTCUT_PROPERTY = "isShortcut"; //$NON-NLS-1$
/**
* @generated
*/
public boolean test(Object receiver, String method, Object[] args,
Object expectedValue) {
if (false == receiver instanceof View) {
return false;
}
View view = (View) receiver;
if (SHORTCUT_PROPERTY.equals(method)) {
EAnnotation annotation = view.getEAnnotation("Shortcut"); //$NON-NLS-1$
if (annotation != null) {
return OuterProcessEditPart.MODEL_ID.equals(annotation
.getDetails().get("modelID")); //$NON-NLS-1$
}
}
return false;
}
}
| [
"salvarez@lsi.upc.edu"
] | salvarez@lsi.upc.edu |
8a12d86c0a975cebb176e834420afa8335fb4a53 | 6517e5e03a8ee0c500c6f29749a6d0ee97a55190 | /src/main/java/com/kushmiruk/prospring/chapter05/staticmethodmatcherpointcut/SimpleStaticPointcut.java | 85d430e88c7818b94aae7e466d6afd5003dc0380 | [] | no_license | rkushmiruk/ProSpringTasks | d52b3c6c54bfbaad06e67227a1de505ab32bdaf9 | 5587bc2c5aae0d256e36e3b2e807f0c27c7dff92 | refs/heads/master | 2021-01-01T18:51:47.716681 | 2017-10-04T13:21:45 | 2017-10-04T13:21:45 | 98,452,880 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 671 | java | package com.kushmiruk.prospring.chapter05.staticmethodmatcherpointcut;
import org.springframework.aop.ClassFilter;
import org.springframework.aop.support.StaticMethodMatcherPointcut;
import java.lang.reflect.Method;
public class SimpleStaticPointcut extends StaticMethodMatcherPointcut {
@Override
public boolean matches(Method method, Class<?> targetClass) {
return "foo".equals(method.getName());
}
@Override
public ClassFilter getClassFilter() {
return new ClassFilter() {
@Override
public boolean matches(Class<?> clazz) {
return clazz == BeanOne.class;
}
};
}
}
| [
"rKushmiruk@gmail.com"
] | rKushmiruk@gmail.com |
3ee87755117f01c0ef84d6c7f5e52f10883bfebe | c164d8f1a6068b871372bae8262609fd279d774c | /src/main/java/edu/uiowa/slis/VIVOISF/Non_self_governing/Non_self_governingCodeISO3.java | 87bb2b1b723b8160d647d14a3e7d6d33c4911e4e | [
"Apache-2.0"
] | permissive | eichmann/VIVOISF | ad0a299df177d303ec851ff2453cbcbd7cae1ef8 | e80cd8b74915974fac7ebae8e5e7be8615355262 | refs/heads/master | 2020-03-19T03:44:27.662527 | 2018-06-03T22:44:58 | 2018-06-03T22:44:58 | 135,757,275 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,033 | java | package edu.uiowa.slis.VIVOISF.Non_self_governing;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
@SuppressWarnings("serial")
public class Non_self_governingCodeISO3 extends edu.uiowa.slis.VIVOISF.TagLibSupport {
static Non_self_governingCodeISO3 currentInstance = null;
private static final Log log = LogFactory.getLog(Non_self_governingCodeISO3.class);
// non-functional property
public int doStartTag() throws JspException {
try {
Non_self_governingCodeISO3Iterator theNon_self_governing = (Non_self_governingCodeISO3Iterator)findAncestorWithClass(this, Non_self_governingCodeISO3Iterator.class);
pageContext.getOut().print(theNon_self_governing.getCodeISO3());
} catch (Exception e) {
log.error("Can't find enclosing Non_self_governing for codeISO3 tag ", e);
throw new JspTagException("Error: Can't find enclosing Non_self_governing for codeISO3 tag ");
}
return SKIP_BODY;
}
}
| [
"david-eichmann@uiowa.edu"
] | david-eichmann@uiowa.edu |
107a58a72a9b57ce7e04f1d730aea61f9085db2b | 9ccc082e895428cecd61f220b16a4228521922de | /main/src/java/self/micromagic/eterna/sql/ResultReaderManager.java | bf1387379aa3bc3268feea93de081f092d1d96a4 | [
"Apache-2.0"
] | permissive | hugcoday/eterna | f58bf59ddfe237613e5c3d9bfa7c89d655b3d3c6 | d85099bc9574808060cb6f4a517ed7f264620963 | refs/heads/master | 2021-01-19T06:55:28.280038 | 2014-11-20T09:51:34 | 2014-11-20T09:51:34 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,034 | java | /*
* Copyright 2009-2015 xinjunli (micromagic@sina.com).
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package self.micromagic.eterna.sql;
import java.util.List;
import self.micromagic.eterna.digester.ConfigurationException;
import self.micromagic.eterna.security.Permission;
import self.micromagic.eterna.share.EternaFactory;
public interface ResultReaderManager
{
/**
* 初始化本ResultReaderManager对象, 系统会在初始化时调用此方法. <p>
* 该方法的主要作用是初始化每个ResultReader对象, 并根据父对象来组成自己
* 自己的reader列表.
*
* @param factory EternaFactory的实例, 可以从中获得父对象
*/
void initialize(EternaFactory factory) throws ConfigurationException;
/**
* 设置本ResultReaderManager的名称.
*/
void setName(String name) throws ConfigurationException;
/**
* 获取本ResultReaderManager的名称.
*/
String getName() throws ConfigurationException;
/**
* 设置父ResultReaderManager的名称.
*/
void setParentName(String name) throws ConfigurationException;
/**
* 获取父ResultReaderManager的名称.
*/
String getParentName() throws ConfigurationException;
/**
* 设置本ResultReaderManager的名称.
*/
ResultReaderManager getParent() throws ConfigurationException;
/**
* 获取生成本ResultReaderManager的工厂.
*/
EternaFactory getFactory() throws ConfigurationException;
/**
* 设置列名是否是大小写敏感的, 默认的是敏感的. <p>
* 注: 只有在没有添加reader的时候才能设置这个属性.
*/
void setColNameSensitive(boolean colNameSensitive) throws ConfigurationException;
/**
* 获取列名是否大小写敏感的. <p>
*
* @return true为大小写敏感的, false为不区分大小写
*/
boolean isColNameSensitive() throws ConfigurationException;
/**
* 获得ResultReader的排序方式字符串.
*/
String getReaderOrder() throws ConfigurationException;
/**
* 设置ResultReader的排序方式字符串.
*/
void setReaderOrder(String readerOrder) throws ConfigurationException;
/**
* 获得ResultReaderManager中的ResultReader总个数, 这个数字一般等于或大于
* ReaderList中的ResultReader个数. <p>
*
* @see #getReaderList(Permission)
* @see #getReaderInList(int)
*/
int getReaderCount() throws ConfigurationException;
/**
* 通过reader的名称获取一个ResultReader.
*/
ResultReader getReader(String name) throws ConfigurationException;
/**
* 添加一个<code>ResultReader</code>.
* <p>如果该<code>ResultReader</code>的名称已经存在, 则会覆盖原来的reader.
*
* @param reader 要添加的<code>ResultReader</code>
* @return 当该<code>ResultReader</code>的名称已经存在时则返回被覆盖掉
* 的<code>ResultReader</code>, 否则返回<code>null</code>.
* @throws ConfigurationException 当相关配置出错时
*/
ResultReader addReader(ResultReader reader) throws ConfigurationException;
/**
* 设置<code>ResultReader</code>的排列顺序以及查询的排序规则.
*
* @param names 存放<code>ResultReader</code>的名称级排序的数组,
* <code>ResultReader</code>将按这个数组所指定的顺序排列,
* 并根据他来设置排序.
* 列名及排序的格式为[名称][排序(1个字符)].
* 排序分别为: "-"无, "A"升序, "D"降序.
*
* @throws ConfigurationException 当相关配置出错时
*/
void setReaderList(String[] names) throws ConfigurationException;
/**
* 通过reader的名称获取该reader对象所在的索引值.
*
* @param name reader的名称
* @param notThrow 设为<code>true<code>时, 当对应名称的reader不存在时
* 不会抛出异常, 而只是返回-1
* @return reader所在的索引值, 或-1(当对应名称的reader不存在时)
* 第一个值为1, 第二个值为2, ...
*/
int getIndexByName(String name, boolean notThrow) throws ConfigurationException;
/**
* 通过reader的名称获取该reader对象所在的索引值.
*/
int getIndexByName(String name) throws ConfigurationException;
/**
* 获取用于排序的sql子语句.
*/
String getOrderByString() throws ConfigurationException;
/**
* 获得一个<code>ResultReader</code>的列表.
* 此方法列出的是所有的<code>ResultReader</code>.
* 无论setReaderList设置了怎样的值, 都是返回所有的.
*
* @return 用于读取数据的所有<code>ResultReader</code>的列表.
* @throws ConfigurationException 当相关配置出错时
* @see #setReaderList
*/
List getReaderList() throws ConfigurationException;
/**
* 根据权限, 获得一个<code>ResultReader</code>的列表.
* 如果setReaderList设置了显示的<code>ResultReader</code>, 那返回的列表只会在
* 此范围内.
* 如果某个列没有读取权限的话, 那相应的列会替换为<code>NullResultReader</code>
* 的实例.
*
* @return 正式用于读取数据的<code>ResultReader</code>的列表.
* @throws ConfigurationException 当相关配置出错时
* @see #setReaderList
*/
List getReaderList(Permission permission) throws ConfigurationException;
/**
* 根据索引值, 从reader列表中获取一个ResultReader.
* reader列表会随着列设置而改变.
* 第一个值为0, 第二个值为1, ...
*/
ResultReader getReaderInList(int index) throws ConfigurationException;
/**
* 锁住自己的所有属性, 这样使用者只能读取, 而不能修改. <p>
* 一般用在通过xml装载后, 在EternaFactory的初始化中调用此方法.
* 注:在调用了copy方法后, 新复制的ResultReaderManager是不被锁住的.
*
* @see #copy(String)
*/
void lock() throws ConfigurationException;
/**
* 判断是否已锁住所有属性, 这样使用者只能读取, 而不能修改. <p>
*
* @return true表示已锁, false表示未锁
* @see #lock
*/
boolean isLocked() throws ConfigurationException;
/**
* 复制自身的所有属性, 并返回.
* 当copyName不为null时, 名称将改为:"[原name]+[copyName]".
* 反之名称将不会改变.
*/
ResultReaderManager copy(String copyName) throws ConfigurationException;
} | [
"micromagic@sina.com"
] | micromagic@sina.com |
dee9eef3c347c3b657b7241bd18fdb768ce2a619 | c80f25f9c8faa1ea9db5bb1b8e36c3903a80a58b | /laosiji-sources/feng/android/sources/com/feng/library/emoticons/keyboard/adpater/PageSetAdapter.java | 8adca3329245cd55beae0086bfe59be5d3590f68 | [] | no_license | wenzhaot/luobo_tool | 05c2e009039178c50fd878af91f0347632b0c26d | e9798e5251d3d6ba859bb15a00d13f085bc690a8 | refs/heads/master | 2020-03-25T23:23:48.171352 | 2019-09-21T07:09:48 | 2019-09-21T07:09:48 | 144,272,972 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,542 | java | package com.feng.library.emoticons.keyboard.adpater;
import android.support.v4.view.PagerAdapter;
import android.text.TextUtils;
import android.view.View;
import android.view.ViewGroup;
import com.feng.library.emoticons.keyboard.data.PageEntity;
import com.feng.library.emoticons.keyboard.data.PageSetEntity;
import com.feng.library.emoticons.keyboard.data.PageSetEntity.Builder;
import java.util.ArrayList;
import java.util.Iterator;
public class PageSetAdapter extends PagerAdapter {
private final ArrayList<PageSetEntity> mPageSetEntityList = new ArrayList();
public ArrayList<PageSetEntity> getPageSetEntityList() {
return this.mPageSetEntityList;
}
public int getPageSetStartPosition(PageSetEntity pageSetEntity) {
if (pageSetEntity == null || TextUtils.isEmpty(pageSetEntity.getUuid())) {
return 0;
}
int startPosition = 0;
int i = 0;
while (i < this.mPageSetEntityList.size()) {
if (i == this.mPageSetEntityList.size() - 1 && !pageSetEntity.getUuid().equals(((PageSetEntity) this.mPageSetEntityList.get(i)).getUuid())) {
return 0;
}
if (pageSetEntity.getUuid().equals(((PageSetEntity) this.mPageSetEntityList.get(i)).getUuid())) {
return startPosition;
}
startPosition += ((PageSetEntity) this.mPageSetEntityList.get(i)).getPageCount();
i++;
}
return startPosition;
}
public void add(View view) {
add(this.mPageSetEntityList.size(), view);
}
public void add(int index, View view) {
this.mPageSetEntityList.add(index, new Builder().addPageEntity(new PageEntity(view)).setShowIndicator(false).build());
}
public void add(PageSetEntity pageSetEntity) {
add(this.mPageSetEntityList.size(), pageSetEntity);
}
public void add(int index, PageSetEntity pageSetEntity) {
if (pageSetEntity != null) {
this.mPageSetEntityList.add(index, pageSetEntity);
}
}
public PageSetEntity get(int position) {
return (PageSetEntity) this.mPageSetEntityList.get(position);
}
public void remove(int position) {
this.mPageSetEntityList.remove(position);
notifyData();
}
public void notifyData() {
}
public PageEntity getPageEntity(int position) {
Iterator it = this.mPageSetEntityList.iterator();
while (it.hasNext()) {
PageSetEntity pageSetEntity = (PageSetEntity) it.next();
if (pageSetEntity.getPageCount() > position) {
return (PageEntity) pageSetEntity.getPageEntityList().get(position);
}
position -= pageSetEntity.getPageCount();
}
return null;
}
public int getCount() {
int count = 0;
Iterator it = this.mPageSetEntityList.iterator();
while (it.hasNext()) {
count += ((PageSetEntity) it.next()).getPageCount();
}
return count;
}
public Object instantiateItem(ViewGroup container, int position) {
View view = getPageEntity(position).instantiateItem(container, position, null);
if (view == null) {
return null;
}
container.addView(view);
return view;
}
public void destroyItem(ViewGroup container, int position, Object object) {
container.removeView((View) object);
}
public boolean isViewFromObject(View arg0, Object arg1) {
return arg0 == arg1;
}
}
| [
"tanwenzhao@vipkid.com.cn"
] | tanwenzhao@vipkid.com.cn |
83e7359e8d688d02a3c0bfeda5c00da8837bdce0 | d2eee6e9a3ad0b3fd2899c3d1cf94778615b10cb | /PROMISE/archives/synapse/1.2/org/apache/synapse/config/xml/FilterMediatorFactory.java | 8bb5ac84b42dde0bdbe4278d9b600155cdab7258 | [] | no_license | hvdthong/DEFECT_PREDICTION | 78b8e98c0be3db86ffaed432722b0b8c61523ab2 | 76a61c69be0e2082faa3f19efd76a99f56a32858 | refs/heads/master | 2021-01-20T05:19:00.927723 | 2018-07-10T03:38:14 | 2018-07-10T03:38:14 | 89,766,606 | 5 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,866 | java | package org.apache.synapse.config.xml;
import org.apache.axiom.om.OMAttribute;
import org.apache.axiom.om.OMElement;
import org.apache.synapse.Mediator;
import org.apache.synapse.SynapseConstants;
import org.apache.synapse.mediators.filters.FilterMediator;
import org.jaxen.JaxenException;
import javax.xml.namespace.QName;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
/**
* <p>Creates a filter mediator instance with the default behavior</p>
*
* <pre>
* <filter (source="xpath" regex="string") | xpath="xpath">
* mediator+
* </filter>
* </pre>
*
* <p>or if the filter medaitor needs to support the else behavior as well (i.e. a set of mediators
* to be executed when the filter evaluates to false).</p>
*
* <pre>
* <filter (source="xpath" regex="string") | xpath="xpath">
* <then [sequence="string"]>
* mediator+
* </then>
* <else [sequence="string"]>
* mediator+
* </else>
* </filter>
* </pre>
*/
public class FilterMediatorFactory extends AbstractListMediatorFactory {
private static final QName FILTER_Q = new QName(SynapseConstants.SYNAPSE_NAMESPACE, "filter");
private static final QName THEN_Q = new QName(SynapseConstants.SYNAPSE_NAMESPACE, "then");
private static final QName ELSE_Q = new QName(SynapseConstants.SYNAPSE_NAMESPACE, "else");
public Mediator createMediator(OMElement elem) {
FilterMediator filter = new FilterMediator();
OMAttribute attXpath = elem.getAttribute(ATT_XPATH);
OMAttribute attSource = elem.getAttribute(ATT_SOURCE);
OMAttribute attRegex = elem.getAttribute(ATT_REGEX);
if (attXpath != null) {
if (attXpath.getAttributeValue() != null &&
attXpath.getAttributeValue().trim().length() == 0) {
handleException("Invalid attribute value specified for xpath");
} else {
try {
filter.setXpath(SynapseXPathFactory.getSynapseXPath(elem, ATT_XPATH));
} catch (JaxenException e) {
handleException("Invalid XPath expression for attribute xpath : "
+ attXpath.getAttributeValue(), e);
}
}
} else if (attSource != null && attRegex != null) {
if ((attSource.getAttributeValue() != null &&
attSource.getAttributeValue().trim().length() == 0) || (attRegex.getAttributeValue()
!= null && attRegex.getAttributeValue().trim().length() == 0) ){
handleException("Invalid attribute values for source and/or regex specified");
} else {
try {
filter.setSource(SynapseXPathFactory.getSynapseXPath(elem, ATT_SOURCE));
} catch (JaxenException e) {
handleException("Invalid XPath expression for attribute source : "
+ attSource.getAttributeValue(), e);
}
try {
filter.setRegex(Pattern.compile(attRegex.getAttributeValue()));
} catch (PatternSyntaxException pse) {
handleException("Invalid Regular Expression for attribute regex : "
+ attRegex.getAttributeValue(), pse);
}
}
} else {
handleException("An xpath or (source, regex) attributes are required for a filter");
}
processTraceState(filter,elem);
OMElement thenElem = elem.getFirstChildWithName(THEN_Q);
if (thenElem != null) {
filter.setThenElementPresent(true);
OMAttribute sequenceAttr = thenElem.getAttribute(ATT_SEQUENCE);
if (sequenceAttr != null && sequenceAttr.getAttributeValue() != null) {
filter.setThenKey(sequenceAttr.getAttributeValue());
} else {
addChildren(thenElem, filter);
}
OMElement elseElem = elem.getFirstChildWithName(ELSE_Q);
if (elseElem != null) {
sequenceAttr = elseElem.getAttribute(ATT_SEQUENCE);
if (sequenceAttr != null && sequenceAttr.getAttributeValue() != null) {
filter.setElseKey(sequenceAttr.getAttributeValue());
} else {
AnonymousListMediator listMediator =
AnonymousListMediatorFactory.createAnonymousListMediator(elseElem);
filter.setElseMediator(listMediator);
}
}
} else {
filter.setThenElementPresent(false);
addChildren(elem, filter);
}
return filter;
}
public QName getTagQName() {
return FILTER_Q;
}
}
| [
"hvdthong@github.com"
] | hvdthong@github.com |
ce94d5bab04db0c0e234c045ee0bdd5fdaac824f | 001eae35851e132f4d76c54fb668bd013c53dc60 | /nosql/mapdb/src/test/java/org/mapdb/issues/Issue157Test.java | d48143bbff86819f4e15183bda80914183ff32fd | [
"CC-PDDC",
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] | permissive | paulnguyen/data | b7f538bd4b4a24787c3c320e27535e3ce6558dd2 | 991f3930ff0b86cfc3afbe14cf94d983e1fcf77e | refs/heads/master | 2021-12-14T09:50:30.339094 | 2021-12-04T03:17:10 | 2021-12-04T03:17:10 | 47,385,936 | 1 | 24 | null | null | null | null | UTF-8 | Java | false | false | 1,193 | java | package org.mapdb.issues;
import org.junit.Test;
import org.mapdb.BTreeMap;
import org.mapdb.DB;
import org.mapdb.DBMaker;
import java.util.Map;
import static org.junit.Assert.assertTrue;
public class Issue157Test {
@Test
public void concurrent_BTreeMap() throws InterruptedException {
DB db = DBMaker.memoryDB().make();
final BTreeMap<Integer, String> map = db.treeMap("COL_2");
map.clear();
Thread t1 = new Thread() {
public void run() {
for(int i=0; i<=10000; i++) {
map.put(i, "foo");
}
}
};
Thread t2 = new Thread() {
public void run() {
for(int i=10000; i>=0; i--) {
map.put(i, "bar");
}
}
};
t1.start();
t2.start();
t1.join();
t2.join();
// map.printTreeStructure();
for(Map.Entry entry : map.entrySet()) {
// System.out.println(entry.getKey() + " => " + entry.getValue());
assertTrue(""+entry.getKey(),"bar".equals(entry.getValue())||"foo".equals(entry.getValue()));
}
}
}
| [
"paul.nguyen@sjsu.edu"
] | paul.nguyen@sjsu.edu |
460b69408d2959a154ec992fc55e166662259087 | 48d61d9a951a9ce30a8ec178d9491f5b60160679 | /oceans/src/main/java/com/nevermore/oceans/widget/BottomTabLayout.java | e7f16240ee53f21a5719317d92f0d2c5b376a09d | [] | no_license | led-os/yimeinew | 209387195be8d6b04e4ec06d3d79f3e265d8af7b | 3ee181f2440cf8809ddabd7ec4d73713124af277 | refs/heads/master | 2022-02-22T08:38:24.126333 | 2019-09-17T03:30:43 | 2019-09-17T03:30:43 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,435 | java | package com.nevermore.oceans.widget;
import android.content.Context;
import android.os.Parcel;
import android.os.Parcelable;
import android.support.annotation.Nullable;
import android.support.v4.view.ViewCompat;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.View;
import android.widget.LinearLayout;
/**
* author: XuNeverMore
* create on 2017/5/16 0016
* github https://github.com/XuNeverMore
*/
public class BottomTabLayout extends LinearLayout {
private static final String TAG = "BottomTabLayout";
private OnItemTabClickListener onItemTabClickListener;
private int lastSelectedItemPos = 0;
private ViewPager viewPager;
private ViewPager.OnPageChangeListener onPageChangeListener = new ViewPager.OnPageChangeListener() {
@Override
public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
}
@Override
public void onPageSelected(int position) {
selectItem(position);
}
@Override
public void onPageScrollStateChanged(int state) {
}
};
public BottomTabLayout(Context context) {
this(context, null);
}
public BottomTabLayout(Context context, @Nullable AttributeSet attrs) {
this(context, attrs, 0);
}
public BottomTabLayout(Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
super(context, attrs, defStyleAttr);
setOrientation(HORIZONTAL);//水平方向
ViewCompat.setElevation(this, 5);
}
private void setListeners() {
int childCount = getChildCount();
for (int i = 0; i < childCount; i++) {
final int position = i;
final View child = getChildAt(i);
child.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
if (onItemTabClickListener != null) {
//防止选中的tab被重复点击
int indexOfChild = indexOfChild(v);
if (lastSelectedItemPos == indexOfChild) {
return;
}
if (viewPager != null) {
viewPager.setCurrentItem(indexOfChild, false);
}
if (onItemTabClickListener.onItemTabClick(position, v)) {
return;
}
selectItem(indexOfChild);
}
}
});
}
}
public void setUpWithViewPager(ViewPager viewPager) {
if (viewPager != null && viewPager.getAdapter() != null) {
this.viewPager = viewPager;
viewPager.addOnPageChangeListener(onPageChangeListener);
setOnItemTabClickListener(new OnItemTabClickListener() {
@Override
public boolean onItemTabClick(int position, View itemView) {
BottomTabLayout.this.selectItem(itemView);
return false;
}
});
}
}
public void setOnItemTabClickListener(OnItemTabClickListener onItemTabClickListener) {
this.onItemTabClickListener = onItemTabClickListener;
}
public void selectItem(View itemView) {
int index = indexOfChild(itemView);
selectItem(index);
}
public void selectItem(int position) {
if (position < getChildCount()) {
View lastItem = getChildAt(lastSelectedItemPos);
//让上一个被选中的tab恢复原来状态
changeItemSelectState(lastItem, false);
lastSelectedItemPos = position;
View selectedItem = getChildAt(lastSelectedItemPos);
//选中itemView
changeItemSelectState(selectedItem, true);
}
}
//改变tab 选中状态
private void changeItemSelectState(View view, boolean selected) {
if (view instanceof BottomTabView) {
((BottomTabView) view).setSelectState(selected);
} else {
view.setSelected(selected);
}
}
@Override
protected void onDetachedFromWindow() {
super.onDetachedFromWindow();
if (viewPager != null) {
viewPager.removeOnPageChangeListener(onPageChangeListener);
}
}
@Nullable
@Override
protected Parcelable onSaveInstanceState() {
Parcelable parcelable = super.onSaveInstanceState();
if (parcelable != null) {
SavedState ss = new SavedState(parcelable);
ss.pos = lastSelectedItemPos;
return ss;
}
return parcelable;
}
@Override
protected void onRestoreInstanceState(Parcelable state) {
if (!(state instanceof SavedState)) {
super.onRestoreInstanceState(state);
return;
}
SavedState ss = (SavedState) state;
int pos = ss.pos;
selectItem(pos);
super.onRestoreInstanceState(state);
}
@Override
protected void onFinishInflate() {
super.onFinishInflate();
if (getChildCount() > 0) {
View childAt = getChildAt(0);
selectItem(childAt);
}
setListeners();
}
public interface OnItemTabClickListener {
/**
* @param position position of item
* @param itemView child at position
* @return weather consumer event
*/
boolean onItemTabClick(int position, View itemView);
}
public static class SavedState extends BaseSavedState {
public static final Creator<SavedState> CREATOR = new Creator<SavedState>() {
@Override
public SavedState createFromParcel(Parcel source) {
return new SavedState(source);
}
@Override
public SavedState[] newArray(int size) {
return new SavedState[size];
}
};
int pos;
public SavedState(Parcelable superState) {
super(superState);
}
public SavedState(Parcel source) {
super(source);
}
@Override
public void writeToParcel(Parcel out, int flags) {
super.writeToParcel(out, flags);
out.writeInt(pos);
}
}
}
| [
"869798794@qq.com"
] | 869798794@qq.com |
6eb3c5c4ab0298455d374f763a64da3519e05735 | 86fa67369e29c0086601fad2d5502322f539a321 | /subprojects/kernel/doovos-kernel-vanilla/src/org/doovos/kernel/vanilla/jvm/interpreter/linkerinterpreter/instr/KJVM_MONITORENTER.java | 1f01908d304705f9f66a44a5d07977fee63742e0 | [] | no_license | thevpc/doovos | 05a4ce98825bf3dbbdc7972c43cd15fc18afdabb | 1ae822549a3a546381dbf3b722814e0be1002b11 | refs/heads/master | 2021-01-12T14:56:52.283641 | 2020-08-22T12:37:40 | 2020-08-22T12:37:40 | 72,081,680 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,737 | java | ///**
// * ====================================================================
// * Doovos (Distributed Object Oriented Operating System)
// *
// * Doovos is a new Open Source Distributed Object Oriented Operating System
// * Design and implementation based on the Java Platform.
// * Actually, it is a try for designing a distributed operation system in
// * top of existing centralized/network OS.
// * Designed OS will follow the object oriented architecture for redefining
// * all OS resources (memory,process,file system,device,...etc.) in a highly
// * distributed context.
// * Doovos is also a distributed Java virtual machine that implements JVM
// * specification on top the distributed resources context.
// *
// * Doovos Kernel is the heart of Doovos OS. It implements also the Doovos JVM
// * Doovos Kernel code is executed on host JVM
// *
// * Copyright (C) 2008-2010 Taha BEN SALAH
// *
// * This program is free software; you can redistribute it and/or modify
// * it under the terms of the GNU General Public License as published by
// * the Free Software Foundation; either version 2 of the License, or
// * (at your option) any later version.
// *
// * This program is distributed in the hope that it will be useful,
// * but WITHOUT ANY WARRANTY; without even the implied warranty of
// * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// * GNU General Public License for more details.
// *
// * You should have received a copy of the GNU General Public License along
// * with this program; if not, write to the Free Software Foundation, Inc.,
// * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
// * ====================================================================
// */
//package org.doovos.kernel.vanilla.jvm.interpreter.linkerinterpreter.instr;
//
//import org.doovos.kernel.api.jvm.bytecode.KOperator;
//import org.doovos.kernel.vanilla.jvm.interpreter.linkerinterpreter.KInstructionLnk;
//import org.doovos.kernel.vanilla.jvm.interpreter.jitsrcinterpreter.JITContext;
//import org.doovos.kernel.vanilla.jvm.interpreter.jitsrcinterpreter.JITJavaSource;
//import org.doovos.kernel.vanilla.jvm.interpreter.jitsrcinterpreter.JITJavaSourceImpl;
//import org.doovos.kernel.vanilla.jvm.interpreter.jitsrcinterpreter.JITJavaSourceProvider;
//import org.doovos.kernel.api.jvm.reflect.KInstruction;
//import org.doovos.kernel.api.jvm.reflect.KMethod;
//import org.doovos.kernel.api.jvm.interpreter.KFrame;
//import org.doovos.kernel.api.process.KProcess;
//
//import java.rmi.RemoteException;
//
///**
// * Created by IntelliJ IDEA.
// * User: vpc
// * Date: 22 févr. 2009
// * Time: 14:21:52
// * To change this template use File | Settings | File Templates.
// */
//public final class KJVM_MONITORENTER extends KInstructionLnk implements Cloneable {
// public static final KJVM_MONITORENTER INSTANCE = new KJVM_MONITORENTER();
//
//
// private KJVM_MONITORENTER() {
// super(KOperator.MONITORENTER);
// }
//
// public int run(KFrame frame) throws RemoteException {
// frame.pop();
// return KProcess.NEXT_STATEMENT;
// }
//
// public KInstructionLnk run(KFrame frame) throws RemoteException {
// frame.pop();
// frame.setInstruction(ordinal+1);
// return next;
// }
//
// public void relink(int index, KInstructionLnk[] code, KMethod method) {
// this.ordinal = index;
// this.next = code[index + 1];
// }
//
// public JITJavaSource toJITJavaSource(JITContext jitContext) {
// return new JITJavaSourceImpl(
// null,
// null, null,
// " " + jitContext.pop() + ";"
// , null, null, null
// );
// }
//}
| [
"taha.bensalah@gmail.com"
] | taha.bensalah@gmail.com |
0f26f4e69d0ca01d0358737116530ad443fc54f7 | 995f73d30450a6dce6bc7145d89344b4ad6e0622 | /Honor5C-7.0/src/main/java/android/filterpacks/imageproc/ImageSlicer.java | a17032646e98cae8e1e90b93a88e0b531b2f1a9b | [] | 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 | 3,223 | java | package android.filterpacks.imageproc;
import android.filterfw.core.Filter;
import android.filterfw.core.FilterContext;
import android.filterfw.core.Frame;
import android.filterfw.core.FrameFormat;
import android.filterfw.core.GenerateFieldPort;
import android.filterfw.core.MutableFrameFormat;
import android.filterfw.core.Program;
import android.filterfw.core.ShaderProgram;
import android.filterfw.format.ImageFormat;
public class ImageSlicer extends Filter {
private int mInputHeight;
private int mInputWidth;
private Frame mOriginalFrame;
private int mOutputHeight;
private int mOutputWidth;
@GenerateFieldPort(name = "padSize")
private int mPadSize;
private Program mProgram;
private int mSliceHeight;
private int mSliceIndex;
private int mSliceWidth;
@GenerateFieldPort(name = "xSlices")
private int mXSlices;
@GenerateFieldPort(name = "ySlices")
private int mYSlices;
public ImageSlicer(String name) {
super(name);
this.mSliceIndex = 0;
}
public void setupPorts() {
addMaskedInputPort("image", ImageFormat.create(3, 3));
addOutputBasedOnInput("image", "image");
}
public FrameFormat getOutputFormat(String portName, FrameFormat inputFormat) {
return inputFormat;
}
private void calcOutputFormatForInput(Frame frame) {
this.mInputWidth = frame.getFormat().getWidth();
this.mInputHeight = frame.getFormat().getHeight();
this.mSliceWidth = ((this.mInputWidth + this.mXSlices) - 1) / this.mXSlices;
this.mSliceHeight = ((this.mInputHeight + this.mYSlices) - 1) / this.mYSlices;
this.mOutputWidth = this.mSliceWidth + (this.mPadSize * 2);
this.mOutputHeight = this.mSliceHeight + (this.mPadSize * 2);
}
public void process(FilterContext context) {
if (this.mSliceIndex == 0) {
this.mOriginalFrame = pullInput("image");
calcOutputFormatForInput(this.mOriginalFrame);
}
MutableFrameFormat outputFormat = this.mOriginalFrame.getFormat().mutableCopy();
outputFormat.setDimensions(this.mOutputWidth, this.mOutputHeight);
Frame output = context.getFrameManager().newFrame(outputFormat);
if (this.mProgram == null) {
this.mProgram = ShaderProgram.createIdentity(context);
}
((ShaderProgram) this.mProgram).setSourceRect(((float) ((this.mSliceWidth * (this.mSliceIndex % this.mXSlices)) - this.mPadSize)) / ((float) this.mInputWidth), ((float) ((this.mSliceHeight * (this.mSliceIndex / this.mXSlices)) - this.mPadSize)) / ((float) this.mInputHeight), ((float) this.mOutputWidth) / ((float) this.mInputWidth), ((float) this.mOutputHeight) / ((float) this.mInputHeight));
this.mProgram.process(this.mOriginalFrame, output);
this.mSliceIndex++;
if (this.mSliceIndex == this.mXSlices * this.mYSlices) {
this.mSliceIndex = 0;
this.mOriginalFrame.release();
setWaitsOnInputPort("image", true);
} else {
this.mOriginalFrame.retain();
setWaitsOnInputPort("image", false);
}
pushOutput("image", output);
output.release();
}
}
| [
"dstmath@163.com"
] | dstmath@163.com |
d25538797829a0adf6ddb36ec9a49e77f208c841 | 5f498d9c751a7c0263e129544c5a42606541627f | /org.eclipse.bpel.ui/src/org/eclipse/bpel/ui/adapters/XSDAbstractAdapter.java | 4feae72e7ad78984dea40126543980398671dfbb | [] | no_license | saatkamp/simpl09 | 2c2f65ea12245888b19283cdcddb8b73d03b9cf0 | 9d81c4f50bed863518497ab950af3d6726f2b3c8 | refs/heads/master | 2021-01-10T03:56:30.975085 | 2011-11-09T19:36:14 | 2011-11-09T19:36:14 | 55,900,095 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,928 | java | /**
*
*/
package org.eclipse.bpel.ui.adapters;
import java.util.Map;
import org.eclipse.bpel.model.adapters.AbstractAdapter;
import org.eclipse.bpel.model.adapters.IStatefullAdapter;
import org.eclipse.bpel.model.util.BPELUtils;
import org.eclipse.bpel.ui.BPELUIPlugin;
import org.eclipse.bpel.ui.IBPELUIConstants;
import org.eclipse.bpel.ui.util.BPELUtil;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.swt.graphics.Image;
import org.eclipse.xsd.XSDNamedComponent;
/**
* @author Michal Chmielewski (michal.chmielewski@oracle.com)
*
*/
public class XSDAbstractAdapter extends AbstractAdapter
implements ILabeledElement, IStatefullAdapter
{
public Image getLargeImage(Object object) {
return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_PART_32);
}
public Image getSmallImage(Object object) {
return BPELUIPlugin.INSTANCE.getImage(IBPELUIConstants.ICON_PART_16);
}
public String getNamespacePrefix(String namespace) {
Object context = getContext();
// if this is
if (context instanceof EObject) {
EObject eObject = (EObject) context;
return BPELUtils.getNamespacePrefix(eObject, namespace);
} else if (context instanceof Map) {
return (String) ((Map)context).get(namespace);
}
return null;
}
public String getTypeLabel ( Object obj ) {
return obj.getClass().getName();
}
public String getLabel ( Object obj )
{
XSDNamedComponent component = (XSDNamedComponent) BPELUtil.resolveXSDObject(obj);;
String name = component.getName();
String ns = component.getTargetNamespace();
if (name == null) {
return getTypeLabel( obj );
}
if (ns == null) {
return name;
}
String prefix = getNamespacePrefix(ns);
if (prefix == null) {
return "{" + ns + "}" + name; //$NON-NLS-1$ //$NON-NLS-2$
}
return prefix + ":" + name; //$NON-NLS-1$
}
} | [
"hahnml@t-online.de"
] | hahnml@t-online.de |
f58e9ec6e95e74ed4e1ff059feb124c203513f3f | 89be44270846bd4f32ca3f51f29de4921c1d298a | /bitcamp-java/src/main/java/com/eomcs/spring/ioc/ex08/c/MyBeanPostProcessor.java | 04ceb44d804f707d19462bd31802f26e9b2d3d19 | [] | no_license | nayoung00/bitcamp-study | 931b439c40a8fe10bdee49c0aaf449399d8fe801 | b3d3c9135114cf17c7afd3ceaee83b5c2cedff29 | refs/heads/master | 2020-09-28T17:39:04.332086 | 2020-04-30T23:57:45 | 2020-04-30T23:57:45 | 226,825,309 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,196 | java | package com.eomcs.spring.ioc.ex08.c;
import org.springframework.beans.BeansException;
import org.springframework.beans.factory.config.BeanPostProcessor;
// Spring IoC 컨테이너에 새 기능을 추가하는 예 :
// => 새 기능이 IoC 컨테이너가 생성한 객체를 사용해야 한다면,
// 객체 생성 후에 그 작업을 수행하면 된다.
// => 이렇게 개발자가 컨테이너의 기능을 확장할 수 있도록
// BeanPostProcessor라는 규칙을 제공한다.
//
// 즉, 빈 생성 후에 어떤 작업을 수행할 객체를 만들고 싶다면?
// => BeanPostProcessor 규칙에 따라 클래스를 만들라!
//
public class MyBeanPostProcessor implements BeanPostProcessor {
public MyBeanPostProcessor() {
System.out.println("MyBeanPostProcessor()");
}
@Override
public Object postProcessBeforeInitialization(Object bean, String beanName)
throws BeansException {
System.out.println("postProcessBeforeInitialization()");
return null;
}
@Override
public Object postProcessAfterInitialization(Object bean, String beanName) throws BeansException {
System.out.println("postProcessAfterInitialization()");
return null;
}
}
| [
"invin1201@gmail.com"
] | invin1201@gmail.com |
388b3ea0e3a817f4e8d8af31c16891390a2dfc81 | 45e5b8e4d43925525e60fe3bc93dc43a04962c4a | /nodding/libs/GlassVoice/com/google/common/annotations/CompileTimeConstant.java | 776d0edd020b0696bfdb755bdde7e18d66ef9106 | [
"BSD-3-Clause"
] | permissive | ramonwirsch/glass_snippets | 1818ba22b4c11cdb8a91714e00921028751dd405 | 2495edec63efc051e3a10bf5ed8089811200e9ad | refs/heads/master | 2020-04-08T09:37:22.980415 | 2014-06-24T12:07:53 | 2014-06-24T12:07:53 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 492 | java | package com.google.common.annotations;
import java.lang.annotation.Annotation;
import java.lang.annotation.Documented;
import java.lang.annotation.Target;
@Documented
@Target({java.lang.annotation.ElementType.PARAMETER})
@GoogleInternal
@GwtCompatible
public @interface CompileTimeConstant
{
}
/* Location: /home/phil/workspace/glass_hello_world/libs/GlassVoice-dex2jar.jar
* Qualified Name: com.google.common.annotations.CompileTimeConstant
* JD-Core Version: 0.6.2
*/ | [
"scholl@ess.tu-darmstadt.de"
] | scholl@ess.tu-darmstadt.de |
4fe6c91aeb1ad2ad1b75268b5a1b944f395d4bde | d8e1f5b8ff88a4c7578ae5c8632c306bd565f049 | /bindings/src/main/java/org/jadira/bindings/core/provider/JodaConvertConverterProvider.java | 08a87aeba8a18eb86ffd21dad7aa732bd90ddae7 | [
"Apache-2.0"
] | permissive | sigmamupi/jadira | eb0205e304a3b57989844e96b2e77dbc390a2a2b | 09c9a28a6305852366a2ff0908e8dd0bb9c04407 | refs/heads/master | 2020-12-02T01:06:50.192392 | 2019-12-30T12:20:49 | 2019-12-30T12:20:49 | 230,838,403 | 0 | 0 | Apache-2.0 | 2019-12-30T03:09:35 | 2019-12-30T03:09:34 | null | UTF-8 | Java | false | false | 1,971 | java | /*
* Copyright 2010, 2011 Chris Pheby
*
* 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.jadira.bindings.core.provider;
import java.lang.reflect.Constructor;
import java.lang.reflect.Method;
import org.jadira.bindings.core.spi.ConverterProvider;
import org.joda.convert.FromString;
import org.joda.convert.ToString;
/**
* Provider that is aware of Joda Convert annotations
*/
public class JodaConvertConverterProvider extends AbstractAnnotationMatchingConverterProvider<ToString, FromString> implements ConverterProvider {
/**
* Subclasses can override this template method with their own matching strategy
* @param method The method to be determined
* @return True if match
*/
protected boolean isToMatch(Method method) {
return String.class.equals(method.getReturnType());
}
/**
* Subclasses can override this template method with their own matching strategy
* @param constructor The constructor to be determined
* @return True if match
*/
protected boolean isFromMatch(Constructor<?> constructor) {
return String.class.equals(constructor.getParameterTypes()[0]);
}
/**
* Subclasses can override this template method with their own matching strategy
* @param method The method to be determined
* @return True if match
*/
protected boolean isFromMatch(Method method) {
return String.class.equals(method.getParameterTypes()[0]);
}
}
| [
"chris@jadira.co.uk"
] | chris@jadira.co.uk |
662c200584e71865083f2609b13cbd00832b449e | 0ba73ffd4c12ef4c49674ce512ab12fbbb6227ea | /Java-Brains/Spring-Boot/Unit-4-Spring-Data-JPA-The-Data-Tier/Embedded-Database/src/main/java/com.jurik99/course/service/CourseService.java | f85d607eaaa5e1b4cfc5281e6211287f5dc6eb80 | [] | no_license | patrykgrudzien/code-from-learning | e5d6958baf3a44e3fc709f06837bad025b1db5df | 382904b804afd95d9e5d450f61d2529415ddfe96 | refs/heads/master | 2021-07-05T08:41:22.267369 | 2020-01-13T10:37:25 | 2020-01-13T10:37:25 | 188,905,995 | 0 | 0 | null | 2020-10-13T13:30:12 | 2019-05-27T20:34:47 | Java | UTF-8 | Java | false | false | 1,306 | java | package com.jurik99.course.service;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
import java.util.stream.Collectors;
import com.jurik99.course.domain.Course;
import com.jurik99.course.repository.CourseRepository;
@Service
public class CourseService {
private CourseRepository courseRepository;
@Autowired
public CourseService(final CourseRepository courseRepository) {
this.courseRepository = courseRepository;
}
/*
* The framework sees the embedded Derby database in the classpath and assumes that to be the database to
* connect to. No connection information necessary !!!
*/
public List<Course> getAllCourses(final String topicId) {
return courseRepository.findByTopicId(topicId)
.stream()
.collect(Collectors.toList());
}
public Course getCourse(final String courseId) {
return courseRepository.findOne(courseId);
}
public void addCourse(final Course course) {
courseRepository.save(course);
}
public void updateCourse(final Course course) {
// there is no update() method but save() can do BOTH
courseRepository.save(course);
}
public void deleteCourse(final String courseId) {
courseRepository.delete(courseId);
}
}
| [
"patryk.grudzien.91@gmail.com"
] | patryk.grudzien.91@gmail.com |
7c1a99317d1e91ea7943aec6568f9d0b6df99e90 | 9f8304a649e04670403f5dc1cb049f81266ba685 | /web-in/src/main/java/com/cmcc/vrp/province/security/MySessionAttributeListener.java | 2c32a2d6f3c6999e4c1277b85349ad7e77cdc774 | [] | no_license | hasone/pdata | 632d2d0df9ddd9e8c79aca61a87f52fc4aa35840 | 0a9cfd988e8a414f3bdbf82ae96b82b61d8cccc2 | refs/heads/master | 2020-03-25T04:28:17.354582 | 2018-04-09T00:13:55 | 2018-04-09T00:13:55 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,460 | java | package com.cmcc.vrp.province.security;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import javax.servlet.http.HttpSession;
import javax.servlet.http.HttpSessionAttributeListener;
import javax.servlet.http.HttpSessionBindingEvent;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
/**
* <p>Title: </p>
* <p>Description: </p>
* @author lgk8023
* @date 2017年1月22日 下午4:09:26
*/
public class MySessionAttributeListener implements HttpSessionAttributeListener {
public static final Map<String, HttpSession> sessionMap = new ConcurrentHashMap<String, HttpSession>();
@Override
public void attributeAdded(HttpSessionBindingEvent se) {
String name = (String) se.getName();
if ("currentUserId".equals(name)) {//name属性保存用户登录信息,name=为唯一信息如用户名
String currentUserId = (String) se.getValue();
if (sessionMap.containsKey(currentUserId)) {
HttpSession session = sessionMap.remove(currentUserId);
session.invalidate();
throw new UsernameNotFoundException("首次登陆自动注册账户失败!", new Object[]{});
}
sessionMap.put(name, se.getSession());
}
}
@Override
public void attributeRemoved(HttpSessionBindingEvent se) {
}
@Override
public void attributeReplaced(HttpSessionBindingEvent se) {
}
} | [
"fromluozuwu@qq.com"
] | fromluozuwu@qq.com |
f639ea10a9f0d6a7f43d354a5641c76edd0ac781 | ed3cb95dcc590e98d09117ea0b4768df18e8f99e | /project_1_1/src/b/a/e/j/Calc_1_1_10498.java | c25db93612296e1beea07ad9ce02a8215e37c630 | [] | no_license | chalstrick/bigRepo1 | ac7fd5785d475b3c38f1328e370ba9a85a751cff | dad1852eef66fcec200df10083959c674fdcc55d | refs/heads/master | 2016-08-11T17:59:16.079541 | 2015-12-18T14:26:49 | 2015-12-18T14:26:49 | 48,244,030 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 134 | java | package b.a.e.j;
public class Calc_1_1_10498 {
/** @return the sum of a and b */
public int add(int a, int b) {
return a+b;
}
}
| [
"christian.halstrick@sap.com"
] | christian.halstrick@sap.com |
788d2fc6100dc1078bdc7f3df80407d76f84cd0a | 808b985690efbca4cd4db5b135bb377fe9c65b88 | /tbs_core_45016_20191122114850_nolog_fs_obfs/assets/webkit/unZipCode/miniqb_dex.src/com/tencent/smtt/net/SWReporter.java | 99d4ca483bd537405ab4f9222f5a19d73f130581 | [] | no_license | polarrwl/WebviewCoreAnalysis | 183e12b76df3920c5afc65255fd30128bb96246b | e21a294bf640578e973b3fac604b56e017a94060 | refs/heads/master | 2022-03-16T17:34:15.625623 | 2019-12-17T03:16:51 | 2019-12-17T03:16:51 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,061 | java | package com.tencent.smtt.net;
import com.tencent.smtt.webkit.service.SmttServiceProxy;
import org.chromium.base.annotations.CalledByNative;
public class SWReporter
{
private static SWReporter jdField_a_of_type_ComTencentSmttNetSWReporter;
private final String jdField_a_of_type_JavaLangString = "SERVICEWORKER";
@CalledByNative
private void OnReportSWRegistJNI(String paramString)
{
SmttServiceProxy.getInstance().onReportSWRegistInfo(paramString);
}
@CalledByNative
public static SWReporter getInstance()
{
try
{
if (jdField_a_of_type_ComTencentSmttNetSWReporter == null) {
jdField_a_of_type_ComTencentSmttNetSWReporter = new SWReporter();
}
SWReporter localSWReporter = jdField_a_of_type_ComTencentSmttNetSWReporter;
return localSWReporter;
}
finally {}
}
}
/* Location: C:\Users\Administrator\Desktop\学习资料\dex2jar\dex2jar-2.0\classes-dex2jar.jar!\com\tencent\smtt\net\SWReporter.class
* Java compiler version: 6 (50.0)
* JD-Core Version: 0.7.1
*/ | [
"1542951820@qq.com"
] | 1542951820@qq.com |
665b7b9d75919b7af772fd8e7aa6320d11775022 | 87f420a0e7b23aefe65623ceeaa0021fb0c40c56 | /ruoyi-vue-pro-master/yudao-module-bpm/yudao-module-bpm-biz-flowable/src/main/java/cn/iocoder/yudao/module/bpm/controller/admin/task/BpmTaskController.java | 52b16297d2cbbce0077d4e24bd616071d2c27831 | [
"MIT"
] | permissive | xioxu-web/xioxu-web | 0361a292b675d8209578d99451598bf4a56f9b08 | 7fe3f9539e3679e1de9f5f614f3f9b7f41a28491 | refs/heads/master | 2023-05-05T01:59:43.228816 | 2023-04-28T07:44:58 | 2023-04-28T07:44:58 | 367,005,744 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,451 | java | package cn.iocoder.yudao.module.bpm.controller.admin.task;
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.bpm.controller.admin.task.vo.task.*;
import cn.iocoder.yudao.module.bpm.service.task.BpmTaskService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.flowable.bpmn.model.BpmnModel;
import org.flowable.engine.TaskService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
@Api(tags = "管理后台 - 流程任务实例")
@RestController
@RequestMapping("/bpm/task")
@Validated
public class BpmTaskController {
@Resource
private BpmTaskService taskService;
@GetMapping("todo-page")
@ApiOperation("获取 Todo 待办任务分页")
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<PageResult<BpmTaskTodoPageItemRespVO>> getTodoTaskPage(@Valid BpmTaskTodoPageReqVO pageVO) {
return success(taskService.getTodoTaskPage(getLoginUserId(), pageVO));
}
@GetMapping("done-page")
@ApiOperation("获取 Done 已办任务分页")
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<PageResult<BpmTaskDonePageItemRespVO>> getDoneTaskPage(@Valid BpmTaskDonePageReqVO pageVO) {
return success(taskService.getDoneTaskPage(getLoginUserId(), pageVO));
}
@GetMapping("/list-by-process-instance-id")
@ApiOperation(value = "获得指定流程实例的任务列表", notes = "包括完成的、未完成的")
@ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<List<BpmTaskRespVO>> getTaskListByProcessInstanceId(
@RequestParam("processInstanceId") String processInstanceId) {
return success(taskService.getTaskListByProcessInstanceId(processInstanceId));
}
@PutMapping("/approve")
@ApiOperation("通过任务")
@PreAuthorize("@ss.hasPermission('bpm:task:update')")
public CommonResult<Boolean> approveTask(@Valid @RequestBody BpmTaskApproveReqVO reqVO) {
taskService.approveTask(getLoginUserId(), reqVO);
return success(true);
}
@PutMapping("/reject")
@ApiOperation("不通过任务")
@PreAuthorize("@ss.hasPermission('bpm:task:update')")
public CommonResult<Boolean> rejectTask(@Valid @RequestBody BpmTaskRejectReqVO reqVO) {
taskService.rejectTask(getLoginUserId(), reqVO);
return success(true);
}
@PutMapping("/update-assignee")
@ApiOperation(value = "更新任务的负责人", notes = "用于【流程详情】的【转派】按钮")
@PreAuthorize("@ss.hasPermission('bpm:task:update')")
public CommonResult<Boolean> updateTaskAssignee(@Valid @RequestBody BpmTaskUpdateAssigneeReqVO reqVO) {
taskService.updateTaskAssignee(getLoginUserId(), reqVO);
return success(true);
}
}
| [
"xb01049438@alibaba-inc.com"
] | xb01049438@alibaba-inc.com |
cf4a44ac33ec5710f5f08e39a5a65a9d0a79afac | a3a080983e500484203156c5c230de0924dd92bf | /airplan_4/decompile/src/net/techpoint/note/helpers/NOPLoggerFactoryBuilder.java | 5264e3cb6bdb0324ee471001885ce8dc570fb5bf | [] | no_license | perctapera/STAC-engagement-src | f1b45754e346bacd78983ac624bfff6badf899b0 | 1f964e9941421dea53b2d92bea4676b761357f56 | refs/heads/master | 2020-09-03T11:54:04.023501 | 2017-06-23T13:15:56 | 2017-06-23T13:15:56 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 267 | java | /*
* Decompiled with CFR 0_121.
*/
package net.techpoint.note.helpers;
import net.techpoint.note.helpers.NOPLoggerFactory;
public class NOPLoggerFactoryBuilder {
public NOPLoggerFactory formNOPLoggerFactory() {
return new NOPLoggerFactory();
}
}
| [
"fengyu8299@gmail.com"
] | fengyu8299@gmail.com |
2731c68ad88529ed41c77f957ed683fc50b252ba | 53d677a55e4ece8883526738f1c9d00fa6560ff7 | /com/tencent/mm/plugin/appbrand/jsapi/v.java | 00a29fb017b4a23ce12145daa3eae9e939ead2b0 | [] | 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 | 1,678 | java | package com.tencent.mm.plugin.appbrand.jsapi;
import a.f.b.j;
import a.l;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.mm.plugin.appbrand.page.u;
import com.tencent.mm.plugin.appbrand.q;
import com.tencent.mm.plugin.appbrand.r.g;
@l(dWo={1, 1, 13}, dWp={""}, dWq={"Lcom/tencent/mm/plugin/appbrand/jsapi/EventOnKeyboardHeightChange;", "Lcom/tencent/mm/plugin/appbrand/jsapi/AppBrandJsApiEvent;", "()V", "dispatch", "", "height", "", "service", "Lcom/tencent/mm/plugin/appbrand/AppBrandService;", "page", "Lcom/tencent/mm/plugin/appbrand/page/AppBrandPageView;", "inputId", "(ILcom/tencent/mm/plugin/appbrand/AppBrandService;Lcom/tencent/mm/plugin/appbrand/page/AppBrandPageView;Ljava/lang/Integer;)V", "Companion", "luggage-wxa-app_release"})
public final class v extends p
{
public static final int CTRL_INDEX = 590;
public static final String NAME = "onKeyboardHeightChange";
public static final v.a hwn;
static
{
AppMethodBeat.i(87573);
hwn = new v.a((byte)0);
AppMethodBeat.o(87573);
}
public final void a(int paramInt, q paramq, u paramu, Integer paramInteger)
{
AppMethodBeat.i(87572);
j.p(paramq, "service");
j.p(paramu, "page");
n("height", Integer.valueOf(g.pZ(paramInt)));
if (paramInteger != null)
n("inputId", Integer.valueOf(paramInteger.intValue()));
i((c)paramq).aCj();
i((c)paramu).aCj();
AppMethodBeat.o(87572);
}
}
/* Location: C:\Users\Lin\Downloads\dex-tools-2.1-SNAPSHOT\dex-tools-2.1-SNAPSHOT\classes8-dex2jar.jar
* Qualified Name: com.tencent.mm.plugin.appbrand.jsapi.v
* JD-Core Version: 0.6.2
*/ | [
"172601673@qq.com"
] | 172601673@qq.com |
2df8a3327d375ffd57d716744b5bc90ed5c910a2 | 08a57e8ee68882d06df4cd0f3cf34be77931e09b | /ttestapp1/src/test/java/com/nfinity/ll/ttestapp1/domain/pets/PetsManagerTest.java | 463bfd6e35076fb995cc4df631f30a2587ee0474 | [] | no_license | musman013/sample1 | 397b9c00d63d83e10f92d91a1bb4d0e1534567fb | 7659329adfedac945cb4aa867fc37978721cc06c | refs/heads/master | 2022-09-19T09:10:39.126249 | 2020-03-27T11:06:11 | 2020-03-27T11:06:11 | 250,512,532 | 0 | 0 | null | 2022-05-20T21:31:13 | 2020-03-27T11:06:51 | Java | UTF-8 | Java | false | false | 4,945 | java | package com.nfinity.ll.ttestapp1.domain.pets;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.anyLong;
import static org.mockito.ArgumentMatchers.anyString;
import static org.mockito.Mockito.doNothing;
import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
import java.util.Optional;
import org.assertj.core.api.Assertions;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.Mockito;
import org.mockito.MockitoAnnotations;
import org.slf4j.Logger;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.nfinity.ll.ttestapp1.domain.model.PetsEntity;
import com.nfinity.ll.ttestapp1.domain.irepository.IVisitsRepository;
import com.nfinity.ll.ttestapp1.domain.irepository.ITypesRepository;
import com.nfinity.ll.ttestapp1.domain.model.TypesEntity;
import com.nfinity.ll.ttestapp1.domain.irepository.IOwnersRepository;
import com.nfinity.ll.ttestapp1.domain.model.OwnersEntity;
import com.nfinity.ll.ttestapp1.domain.irepository.IPetsRepository;
import com.nfinity.ll.ttestapp1.commons.logging.LoggingHelper;
import com.querydsl.core.types.Predicate;
@RunWith(SpringJUnit4ClassRunner.class)
public class PetsManagerTest {
@InjectMocks
PetsManager _petsManager;
@Mock
IPetsRepository _petsRepository;
@Mock
IVisitsRepository _visitsRepository;
@Mock
ITypesRepository _typesRepository;
@Mock
IOwnersRepository _ownersRepository;
@Mock
private Logger loggerMock;
@Mock
private LoggingHelper logHelper;
private static Integer ID=15;
@Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(_petsManager);
when(logHelper.getLogger()).thenReturn(loggerMock);
doNothing().when(loggerMock).error(anyString());
}
@After
public void tearDown() throws Exception {
}
@Test
public void findPetsById_IdIsNotNullAndIdExists_ReturnPets() {
PetsEntity pets =mock(PetsEntity.class);
Optional<PetsEntity> dbPets = Optional.of((PetsEntity) pets);
Mockito.<Optional<PetsEntity>>when(_petsRepository.findById(any(Integer.class))).thenReturn(dbPets);
Assertions.assertThat(_petsManager.findById(ID)).isEqualTo(pets);
}
@Test
public void findPetsById_IdIsNotNullAndIdDoesNotExist_ReturnNull() {
Mockito.<Optional<PetsEntity>>when(_petsRepository.findById(any(Integer.class))).thenReturn(Optional.empty());
Assertions.assertThat(_petsManager.findById(ID)).isEqualTo(null);
}
@Test
public void createPets_PetsIsNotNullAndPetsDoesNotExist_StorePets() {
PetsEntity pets =mock(PetsEntity.class);
Mockito.when(_petsRepository.save(any(PetsEntity.class))).thenReturn(pets);
Assertions.assertThat(_petsManager.create(pets)).isEqualTo(pets);
}
@Test
public void deletePets_PetsExists_RemovePets() {
PetsEntity pets =mock(PetsEntity.class);
_petsManager.delete(pets);
verify(_petsRepository).delete(pets);
}
@Test
public void updatePets_PetsIsNotNullAndPetsExists_UpdatePets() {
PetsEntity pets =mock(PetsEntity.class);
Mockito.when(_petsRepository.save(any(PetsEntity.class))).thenReturn(pets);
Assertions.assertThat(_petsManager.update(pets)).isEqualTo(pets);
}
@Test
public void findAll_PageableIsNotNull_ReturnPage() {
Page<PetsEntity> pets = mock(Page.class);
Pageable pageable = mock(Pageable.class);
Predicate predicate = mock(Predicate.class);
Mockito.when(_petsRepository.findAll(any(Predicate.class),any(Pageable.class))).thenReturn(pets);
Assertions.assertThat(_petsManager.findAll(predicate,pageable)).isEqualTo(pets);
}
//Types
@Test
public void getTypes_if_PetsIdIsNotNull_returnTypes() {
PetsEntity pets = mock(PetsEntity.class);
TypesEntity types = mock(TypesEntity.class);
Optional<PetsEntity> dbPets = Optional.of((PetsEntity) pets);
Mockito.<Optional<PetsEntity>>when(_petsRepository.findById(any(Integer.class))).thenReturn(dbPets);
Mockito.when(pets.getTypes()).thenReturn(types);
Assertions.assertThat(_petsManager.getTypes(ID)).isEqualTo(types);
}
//Owners
@Test
public void getOwners_if_PetsIdIsNotNull_returnOwners() {
PetsEntity pets = mock(PetsEntity.class);
OwnersEntity owners = mock(OwnersEntity.class);
Optional<PetsEntity> dbPets = Optional.of((PetsEntity) pets);
Mockito.<Optional<PetsEntity>>when(_petsRepository.findById(any(Integer.class))).thenReturn(dbPets);
Mockito.when(pets.getOwners()).thenReturn(owners);
Assertions.assertThat(_petsManager.getOwners(ID)).isEqualTo(owners);
}
}
| [
"jhipster-bot@jhipster.tech"
] | jhipster-bot@jhipster.tech |
b0fda7d4cf49500fe0b71abacd7ad98c09b0a217 | 55cd9819273b2a0677c3660b2943951b61c9e52e | /gtl/src/main/java/com/basics/mall/entity/MallProductKindContrast.java | 02c7db34d5def486f2ab2aa4e9197c92b92935a0 | [] | no_license | h879426654/mnc | 0fb61dff189404f47e7ee1fb6cb89f0c1e2f006f | 9e1c33efc90b9f23c47069606ee2b0b0073cc7e3 | refs/heads/master | 2022-12-27T05:26:22.276805 | 2019-10-21T05:16:14 | 2019-10-21T05:16:14 | 210,249,616 | 0 | 0 | null | 2022-12-16T10:37:07 | 2019-09-23T02:36:55 | JavaScript | UTF-8 | Java | false | false | 638 | java | package com.basics.mall.entity;
public class MallProductKindContrast extends MallProductKindContrastBase{
/**
* 商品维度对照ID
*/
public MallProductKindContrast id(String id){
this.setId(id);
return this;
}
/**
* 商品主维度ID
*/
public MallProductKindContrast kindId(String kindId){
this.setKindId(kindId);
return this;
}
/**
* 商品子维度ID
*/
public MallProductKindContrast kindDetailId(String kindDetailId){
this.setKindDetailId(kindDetailId);
return this;
}
/**
* 商品ID
*/
public MallProductKindContrast productId(String productId){
this.setProductId(productId);
return this;
}
} | [
"879426654@qq.com"
] | 879426654@qq.com |
caf36a867a4ddf172f616beddac02193de9d77b0 | 83d56024094d15f64e07650dd2b606a38d7ec5f1 | /sicc_druida/fuentes/java/CalGuiasConectorTransactionQuery.java | 9f447813700a7ffc004a27bcfd6cbc12031453e3 | [] | no_license | cdiglesias/SICC | bdeba6af8f49e8d038ef30b61fcc6371c1083840 | 72fedb14a03cb4a77f62885bec3226dbbed6a5bb | refs/heads/master | 2021-01-19T19:45:14.788800 | 2016-04-07T16:20:51 | 2016-04-07T16:20:51 | null | 0 | 0 | null | null | null | null | ISO-8859-3 | Java | false | false | 7,294 | java |
import org.w3c.dom.*;
import java.util.ArrayList;
public class CalGuiasConectorTransactionQuery implements es.indra.druida.base.ObjetoXML {
private ArrayList v = new ArrayList();
public Element getXML (Document doc){
getXML0(doc);
getXML90(doc);
return (Element)v.get(0);
}
/* Primer nodo */
private void getXML0(Document doc) {
v.add(doc.createElement("CONECTOR"));
((Element)v.get(0)).setAttribute("TIPO","DRUIDATRANSACTION" );
((Element)v.get(0)).setAttribute("REVISION","3.1" );
((Element)v.get(0)).setAttribute("NOMBRE","CalGuiasTransactionQuery" );
((Element)v.get(0)).setAttribute("OBSERVACIONES","Conector transaccional para la ejección de query sobre la entidad CalGuias" );
/* Empieza nodo:1 / Elemento padre: 0 */
v.add(doc.createElement("ENTRADA"));
((Element)v.get(0)).appendChild((Element)v.get(1));
/* Empieza nodo:2 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(2)).setAttribute("NOMBRE","codGuia" );
((Element)v.get(2)).setAttribute("TIPO","STRING" );
((Element)v.get(2)).setAttribute("LONGITUD","4" );
((Element)v.get(1)).appendChild((Element)v.get(2));
/* Termina nodo:2 */
/* Empieza nodo:3 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(3)).setAttribute("NOMBRE","dpteOidDepa" );
((Element)v.get(3)).setAttribute("TIPO","STRING" );
((Element)v.get(3)).setAttribute("LONGITUD","12" );
((Element)v.get(1)).appendChild((Element)v.get(3));
/* Termina nodo:3 */
/* Empieza nodo:4 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(4)).setAttribute("NOMBRE","valTitu" );
((Element)v.get(4)).setAttribute("TIPO","STRING" );
((Element)v.get(4)).setAttribute("LONGITUD","40" );
((Element)v.get(1)).appendChild((Element)v.get(4));
/* Termina nodo:4 */
/* Empieza nodo:5 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(5)).setAttribute("NOMBRE","fecInicVali" );
((Element)v.get(5)).setAttribute("TIPO","STRING" );
((Element)v.get(5)).setAttribute("LONGITUD","12" );
((Element)v.get(1)).appendChild((Element)v.get(5));
/* Termina nodo:5 */
/* Empieza nodo:6 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(6)).setAttribute("NOMBRE","fecFinVali" );
((Element)v.get(6)).setAttribute("TIPO","STRING" );
((Element)v.get(6)).setAttribute("LONGITUD","12" );
((Element)v.get(1)).appendChild((Element)v.get(6));
/* Termina nodo:6 */
/* Empieza nodo:7 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(7)).setAttribute("NOMBRE","valDescGuia" );
((Element)v.get(7)).setAttribute("TIPO","STRING" );
((Element)v.get(7)).setAttribute("LONGITUD","2000" );
((Element)v.get(1)).appendChild((Element)v.get(7));
/* Termina nodo:7 */
/* Empieza nodo:8 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(8)).setAttribute("NOMBRE","pageCount" );
((Element)v.get(8)).setAttribute("TIPO","STRING" );
((Element)v.get(8)).setAttribute("LONGITUD","30" );
((Element)v.get(1)).appendChild((Element)v.get(8));
/* Termina nodo:8 */
/* Empieza nodo:9 / Elemento padre: 1 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(9)).setAttribute("NOMBRE","pageSize" );
((Element)v.get(9)).setAttribute("TIPO","STRING" );
((Element)v.get(9)).setAttribute("LONGITUD","30" );
((Element)v.get(1)).appendChild((Element)v.get(9));
/* Termina nodo:9 */
/* Termina nodo:1 */
/* Empieza nodo:10 / Elemento padre: 0 */
v.add(doc.createElement("SALIDA"));
((Element)v.get(0)).appendChild((Element)v.get(10));
/* Empieza nodo:11 / Elemento padre: 10 */
v.add(doc.createElement("ROWSET"));
((Element)v.get(11)).setAttribute("NOMBRE","result" );
((Element)v.get(11)).setAttribute("LONGITUD","50" );
((Element)v.get(10)).appendChild((Element)v.get(11));
/* Empieza nodo:12 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(12)).setAttribute("NOMBRE","id" );
((Element)v.get(12)).setAttribute("TIPO","STRING" );
((Element)v.get(12)).setAttribute("LONGITUD","12" );
((Element)v.get(11)).appendChild((Element)v.get(12));
/* Termina nodo:12 */
/* Empieza nodo:13 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(13)).setAttribute("NOMBRE","codGuia" );
((Element)v.get(13)).setAttribute("TIPO","STRING" );
((Element)v.get(13)).setAttribute("LONGITUD","4" );
((Element)v.get(11)).appendChild((Element)v.get(13));
/* Termina nodo:13 */
/* Empieza nodo:14 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(14)).setAttribute("NOMBRE","dpteOidDepa" );
((Element)v.get(14)).setAttribute("TIPO","STRING" );
((Element)v.get(14)).setAttribute("LONGITUD","12" );
((Element)v.get(11)).appendChild((Element)v.get(14));
/* Termina nodo:14 */
/* Empieza nodo:15 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(15)).setAttribute("NOMBRE","valTitu" );
((Element)v.get(15)).setAttribute("TIPO","STRING" );
((Element)v.get(15)).setAttribute("LONGITUD","40" );
((Element)v.get(11)).appendChild((Element)v.get(15));
/* Termina nodo:15 */
/* Empieza nodo:16 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(16)).setAttribute("NOMBRE","fecInicVali" );
((Element)v.get(16)).setAttribute("TIPO","STRING" );
((Element)v.get(16)).setAttribute("LONGITUD","12" );
((Element)v.get(11)).appendChild((Element)v.get(16));
/* Termina nodo:16 */
/* Empieza nodo:17 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(17)).setAttribute("NOMBRE","fecFinVali" );
((Element)v.get(17)).setAttribute("TIPO","STRING" );
((Element)v.get(17)).setAttribute("LONGITUD","12" );
((Element)v.get(11)).appendChild((Element)v.get(17));
/* Termina nodo:17 */
/* Empieza nodo:18 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(18)).setAttribute("NOMBRE","valDescGuia" );
((Element)v.get(18)).setAttribute("TIPO","STRING" );
((Element)v.get(18)).setAttribute("LONGITUD","2000" );
((Element)v.get(11)).appendChild((Element)v.get(18));
/* Termina nodo:18 */
/* Empieza nodo:19 / Elemento padre: 11 */
v.add(doc.createElement("CAMPO"));
((Element)v.get(19)).setAttribute("NOMBRE","timestamp" );
}
private void getXML90(Document doc) {
((Element)v.get(19)).setAttribute("TIPO","STRING" );
((Element)v.get(19)).setAttribute("LONGITUD","30" );
((Element)v.get(11)).appendChild((Element)v.get(19));
/* Termina nodo:19 */
/* Termina nodo:11 */
/* Termina nodo:10 */
}
}
| [
"hp.vega@hotmail.com"
] | hp.vega@hotmail.com |
bc7f3eacddfb1f8406d45ac967a6b35883e875f8 | cf1dcabf9447df1d80ae525f6730e051c1d9d9b4 | /core/src/main/java/org/carrot2/language/StopwordFilterDictionary.java | c87b0140a1e0a0585b865d41a9342e4f1e8cbf8a | [
"BSD-3-Clause",
"LicenseRef-scancode-bsd-ack-carrot2",
"Apache-2.0"
] | permissive | surmount1/carrot2 | d7bccefe4708cc09a0610a3f34fbc701c9cf4fc6 | bd529fdd725ab4f148cd606fb89a2be3449e827c | refs/heads/master | 2023-02-02T16:14:57.862219 | 2020-12-17T16:07:29 | 2020-12-17T16:07:29 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 581 | java | /*
* Carrot2 project.
*
* Copyright (C) 2002-2020, Dawid Weiss, Stanisław Osiński.
* All rights reserved.
*
* Refer to the full license file "carrot2.LICENSE"
* in the root folder of the repository checkout or at:
* https://www.carrot2.org/carrot2.LICENSE
*/
package org.carrot2.language;
import org.carrot2.attrs.AcceptingVisitor;
/**
* An attribute supplying a {@link StopwordFilter}.
*
* @see DefaultDictionaryImpl
* @see EphemeralDictionaries
*/
public interface StopwordFilterDictionary extends AcceptingVisitor {
StopwordFilter compileStopwordFilter();
}
| [
"dawid.weiss@carrotsearch.com"
] | dawid.weiss@carrotsearch.com |
8754bd6c69e1817cff6c1290badc56fbb59b2049 | 9fb7d5c8b7f279c6bd469b82b2a6a5317718860e | /src/main/java/joshie/enchiridion/EInfo.java | 649824cfe9113944bb44002176a5f5dcc4f22895 | [
"MIT"
] | permissive | Mazdallier/Enchiridion | 95d02d4419a19b05742a9a2c3696d0e382a2bbc8 | b89f8c4606b9ae307a276a0b635740331f9c5094 | refs/heads/master | 2021-01-24T21:47:59.590040 | 2015-01-26T06:47:20 | 2015-01-26T06:47:20 | 29,850,171 | 0 | 0 | null | 2015-01-26T07:36:48 | 2015-01-26T07:36:48 | null | UTF-8 | Java | false | false | 371 | java | package joshie.enchiridion;
public class EInfo {
public static final String JAVAPATH = "joshie.enchiridion.";
public static final String MODID = "Enchiridion2";
public static final String MODNAME = "Enchiridion 2";
public static final String MODPATH = "enchiridion";
public static final String VERSION = "@VERSION@";
public static final int WIKI_ID = 0;
}
| [
"joshjackwildman@gmail.com"
] | joshjackwildman@gmail.com |
7ef5164d48ff8c7dce37454c6d705192a4540228 | 776031c494e397f39c055bcf56bc266d078a4ba4 | /common/src/main/java/edu/uci/ics/jung/graph/Forest.java | beee0dfb8b16cb34f6bcadc8fd9feedd5fdeb8c1 | [] | no_license | geogebra/geogebra | 85f648e733454c5b471bf7b13b54607979bb1830 | 210ee8862951f91cecfb3a76a9c4114019c883b8 | refs/heads/master | 2023-09-05T11:09:42.662430 | 2023-09-05T08:10:05 | 2023-09-05T08:10:05 | 2,543,687 | 1,319 | 389 | null | 2023-07-20T11:49:58 | 2011-10-09T17:57:35 | Java | UTF-8 | Java | false | false | 3,674 | java | package edu.uci.ics.jung.graph;
import java.util.Collection;
/**
* An interface for a graph which consists of a collection of rooted directed
* acyclic graphs.
*
* @author Joshua O'Madadhain
*/
public interface Forest<V, E> extends DirectedGraph<V, E> {
/**
* Returns a view of this graph as a collection of <code>Tree</code>
* instances.
*
* @return a view of this graph as a collection of <code>Tree</code>s
*/
Collection<Tree<V, E>> getTrees();
/**
* Returns the parent of <code>vertex</code> in this tree. (If
* <code>vertex</code> is the root, returns <code>null</code>.) The parent
* of a vertex is defined as being its predecessor in the (unique) shortest
* path from the root to this vertex. This is a convenience method which is
* equivalent to
* <code>Graph.getPredecessors(vertex).iterator().next()</code>.
*
* @return the parent of <code>vertex</code> in this tree
* @see Graph#getPredecessors(Object)
* @see #getParentEdge(Object)
*/
public V getParent(V vertex);
/**
* Returns the edge connecting <code>vertex</code> to its parent in this
* tree. (If <code>vertex</code> is the root, returns <code>null</code>.)
* The parent of a vertex is defined as being its predecessor in the
* (unique) shortest path from the root to this vertex. This is a
* convenience method which is equivalent to
* <code>Graph.getInEdges(vertex).iterator().next()</code>, and also to
* <code>Graph.findEdge(vertex, getParent(vertex))</code>.
*
* @return the edge connecting <code>vertex</code> to its parent, or
* <code>null</code> if <code>vertex</code> is the root
* @see Graph#getInEdges(Object)
* @see #getParent(Object)
*/
public E getParentEdge(V vertex);
/**
* Returns the children of <code>vertex</code> in this tree. The children of
* a vertex are defined as being the successors of that vertex on the
* respective (unique) shortest paths from the root to those vertices. This
* is syntactic (maple) sugar for <code>getSuccessors(vertex)</code>.
*
* @param vertex
* the vertex whose children are to be returned
* @return the <code>Collection</code> of children of <code>vertex</code> in
* this tree
* @see Graph#getSuccessors(Object)
* @see #getChildEdges(Object)
*/
public Collection<V> getChildren(V vertex);
/**
* Returns the edges connecting <code>vertex</code> to its children in this
* tree. The children of a vertex are defined as being the successors of
* that vertex on the respective (unique) shortest paths from the root to
* those vertices. This is syntactic (maple) sugar for
* <code>getOutEdges(vertex)</code>.
*
* @param vertex
* the vertex whose child edges are to be returned
* @return the <code>Collection</code> of edges connecting
* <code>vertex</code> to its children in this tree
* @see Graph#getOutEdges(Object)
* @see #getChildren(Object)
*/
public Collection<E> getChildEdges(V vertex);
/**
* Returns the number of children that <code>vertex</code> has in this tree.
* The children of a vertex are defined as being the successors of that
* vertex on the respective (unique) shortest paths from the root to those
* vertices. This is syntactic (maple) sugar for
* <code>getSuccessorCount(vertex)</code>.
*
* @param vertex
* the vertex whose child edges are to be returned
* @return the <code>Collection</code> of edges connecting
* <code>vertex</code> to its children in this tree
* @see #getChildEdges(Object)
* @see #getChildren(Object)
* @see Graph#getSuccessorCount(Object)
*/
public int getChildCount(V vertex);
}
| [
"michael@geogebra.org"
] | michael@geogebra.org |
89ec6f18ae7257501af73d8530a51ae5e05f0300 | 81e675a8e2d3017c8b71ba4233d68d1af0173d04 | /atrs-web/src/main/java/jp/co/ntt/atrs/app/a0/ErrorResultDto.java | 5d58bffe14bc7c7627d634cee0e3e584a1ad0486 | [] | no_license | epasham/atrs | f5117cfb2d6b05a69a516183e3fa4bee6530197f | e1d1fc353db7a086394a0a41575bad315254950d | refs/heads/master | 2020-08-04T11:06:06.959125 | 2019-01-23T04:14:38 | 2019-01-23T04:14:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,723 | java | /*
* Copyright 2014-2018 NTT Corporation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package jp.co.ntt.atrs.app.a0;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
/**
* エラー情報DTOクラス。
*
* @author NTT 電電太郎
*/
public class ErrorResultDto implements Serializable {
/**
* serialVersionUID。
*/
private static final long serialVersionUID = 5765200265354207181L;
/**
* メッセージリスト。
*/
private List<String> messages = new ArrayList<>();
/**
* メッセージリストを取得する。
*
* @return 処理結果
*/
public List<String> getMessages() {
return messages;
}
/**
* メッセージを追加する。
*
* @param message メッセージ
*/
public void add(String message) {
this.messages.add(message);
}
/**
* {@inheritDoc}
*/
@Override
public String toString() {
return ToStringBuilder.reflectionToString(this, ToStringStyle.MULTI_LINE_STYLE);
}
}
| [
"macchinetta.fw@gmail.com"
] | macchinetta.fw@gmail.com |
c19a0939ca43362dbb1b7d80d4d03cbe71b54c24 | cf0f34937b476ecde5ebcca7e2119bcbb27cfbf2 | /src/com/huateng/po/base/BaseTblPptMsg.java | b948531cd0927b0f3d58a6c3ecaba27a8c4a9758 | [] | no_license | Deron84/xxxTest | b5f38cc2dfe3fe28b01634b58b1236b7ec5b4854 | 302b807f394e31ac7350c5c006cb8dc334fc967f | refs/heads/master | 2022-02-01T03:32:54.689996 | 2019-07-23T11:04:09 | 2019-07-23T11:04:09 | 198,212,201 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,760 | java | package com.huateng.po.base;
import java.io.Serializable;
/**
* This is an object that contains data related to the TBL_PPT_MSG table.
* Do not modify this class because it will be overwritten if the configuration file
* related to this class is modified.
*
* @hibernate.class
* table="TBL_PPT_MSG"
*/
public abstract class BaseTblPptMsg implements Serializable {
public static String REF = "TblPptMsg";
public static String PROP_MSG_FMT3 = "MsgFmt3";
public static String PROP_CRT_DATE = "CrtDate";
public static String PROP_MSG_FMT2 = "MsgFmt2";
public static String PROP_UPD_DATE = "UpdDate";
public static String PROP_MSG_FMT1 = "MsgFmt1";
public static String PROP_PPT_MSG3 = "PptMsg3";
public static String PROP_PPT_MSG1 = "PptMsg1";
public static String PROP_PPT_MSG2 = "PptMsg2";
public static String PROP_ID = "Id";
public static String PROP_TMP_ID = "TmpId";
// constructors
public BaseTblPptMsg () {
initialize();
}
/**
* Constructor for primary key
*/
public BaseTblPptMsg (com.huateng.po.epos.TblPptMsgPK id) {
this.setId(id);
initialize();
}
/**
* Constructor for required fields
*/
public BaseTblPptMsg (
com.huateng.po.epos.TblPptMsgPK id,
java.lang.Integer tmpId,
java.lang.String crtDate,
java.lang.String updDate) {
this.setId(id);
this.setTmpId(tmpId);
this.setCrtDate(crtDate);
this.setUpdDate(updDate);
initialize();
}
protected void initialize () {}
private int hashCode = Integer.MIN_VALUE;
// primary key
private com.huateng.po.epos.TblPptMsgPK id;
// fields
private java.lang.Integer tmpId;
private java.lang.String msgFmt1;
private java.lang.String pptMsg1;
private java.lang.String msgFmt2;
private java.lang.String pptMsg2;
private java.lang.String msgFmt3;
private java.lang.String pptMsg3;
private java.lang.String crtDate;
private java.lang.String updDate;
/**
* Return the unique identifier of this class
* @hibernate.id
*/
public com.huateng.po.epos.TblPptMsgPK getId () {
return id;
}
/**
* Set the unique identifier of this class
* @param id the new ID
*/
public void setId (com.huateng.po.epos.TblPptMsgPK id) {
this.id = id;
this.hashCode = Integer.MIN_VALUE;
}
/**
* Return the value associated with the column: TMP_ID
*/
public java.lang.Integer getTmpId () {
return tmpId;
}
/**
* Set the value related to the column: TMP_ID
* @param tmpId the TMP_ID value
*/
public void setTmpId (java.lang.Integer tmpId) {
this.tmpId = tmpId;
}
/**
* Return the value associated with the column: MSG_FMT1
*/
public java.lang.String getMsgFmt1 () {
return msgFmt1;
}
/**
* Set the value related to the column: MSG_FMT1
* @param msgFmt1 the MSG_FMT1 value
*/
public void setMsgFmt1 (java.lang.String msgFmt1) {
this.msgFmt1 = msgFmt1;
}
/**
* Return the value associated with the column: PPT_MSG1
*/
public java.lang.String getPptMsg1 () {
return pptMsg1;
}
/**
* Set the value related to the column: PPT_MSG1
* @param pptMsg1 the PPT_MSG1 value
*/
public void setPptMsg1 (java.lang.String pptMsg1) {
this.pptMsg1 = pptMsg1;
}
/**
* Return the value associated with the column: MSG_FMT2
*/
public java.lang.String getMsgFmt2 () {
return msgFmt2;
}
/**
* Set the value related to the column: MSG_FMT2
* @param msgFmt2 the MSG_FMT2 value
*/
public void setMsgFmt2 (java.lang.String msgFmt2) {
this.msgFmt2 = msgFmt2;
}
/**
* Return the value associated with the column: PPT_MSG2
*/
public java.lang.String getPptMsg2 () {
return pptMsg2;
}
/**
* Set the value related to the column: PPT_MSG2
* @param pptMsg2 the PPT_MSG2 value
*/
public void setPptMsg2 (java.lang.String pptMsg2) {
this.pptMsg2 = pptMsg2;
}
/**
* Return the value associated with the column: MSG_FMT3
*/
public java.lang.String getMsgFmt3 () {
return msgFmt3;
}
/**
* Set the value related to the column: MSG_FMT3
* @param msgFmt3 the MSG_FMT3 value
*/
public void setMsgFmt3 (java.lang.String msgFmt3) {
this.msgFmt3 = msgFmt3;
}
/**
* Return the value associated with the column: PPT_MSG3
*/
public java.lang.String getPptMsg3 () {
return pptMsg3;
}
/**
* Set the value related to the column: PPT_MSG3
* @param pptMsg3 the PPT_MSG3 value
*/
public void setPptMsg3 (java.lang.String pptMsg3) {
this.pptMsg3 = pptMsg3;
}
/**
* Return the value associated with the column: CRT_DATE
*/
public java.lang.String getCrtDate () {
return crtDate;
}
/**
* Set the value related to the column: CRT_DATE
* @param crtDate the CRT_DATE value
*/
public void setCrtDate (java.lang.String crtDate) {
this.crtDate = crtDate;
}
/**
* Return the value associated with the column: UPD_DATE
*/
public java.lang.String getUpdDate () {
return updDate;
}
/**
* Set the value related to the column: UPD_DATE
* @param updDate the UPD_DATE value
*/
public void setUpdDate (java.lang.String updDate) {
this.updDate = updDate;
}
public boolean equals (Object obj) {
if (null == obj) return false;
if (!(obj instanceof com.huateng.po.epos.TblPptMsg)) return false;
else {
com.huateng.po.epos.TblPptMsg tblPptMsg = (com.huateng.po.epos.TblPptMsg) obj;
if (null == this.getId() || null == tblPptMsg.getId()) return false;
else return (this.getId().equals(tblPptMsg.getId()));
}
}
public int hashCode () {
if (Integer.MIN_VALUE == this.hashCode) {
if (null == this.getId()) return super.hashCode();
else {
String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
this.hashCode = hashStr.hashCode();
}
}
return this.hashCode;
}
public String toString () {
return super.toString();
}
} | [
"weijx@inspur.com"
] | weijx@inspur.com |
946c68208106c5141e42165718e0ed6da16ad6c4 | 5e2d5c68c78d844cfb7ddac82cd5be0615057fc3 | /app/src/main/java/com/bwash/bwashcar/activities/PartnerCountActivity.java | 51bafe5f21b2073c71c1dbc5a7d0c18d876bee3f | [] | no_license | rogerlzp/bwashcar | 1a9eb058c59799093be1405fcf082febe6fcbca7 | 60be9a4b7c84b24a1e775bd7db4f5054b6c6fbcd | refs/heads/master | 2021-01-19T14:10:52.997241 | 2017-04-19T14:42:31 | 2017-04-19T14:42:31 | 88,133,099 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,415 | java | package com.bwash.bwashcar.activities;
import android.os.Bundle;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.content.ContextCompat;
import android.support.v4.view.ViewPager;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;
import com.bwash.bwashcar.R;
import com.bwash.bwashcar.fragment.PartnerCountFragment;
import com.bwash.bwashcar.view.PagerSlidingTabStrip;
import java.util.ArrayList;
import java.util.List;
public class PartnerCountActivity extends BaseActivity implements OnClickListener{
public static final int TYPE_DEATIL = 0;
public static final String REFRESH_HOME_DATA = "refreshHomeData";
private PagerSlidingTabStrip tabs = null;
private ViewPager mPager = null;
private boolean isBaidu = false;
private List<PartnerCountFragment> fragments = new ArrayList<PartnerCountFragment>();
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_income_detail);
initView();
}
private void initView() {
((TextView)findViewById(R.id.title)).setText("好友统计");
findViewById(R.id.back_btn).setOnClickListener(this);
PartnerCountFragment friends = new PartnerCountFragment();
Bundle bundle = new Bundle();
bundle.putInt("type", 0);
friends.setArguments(bundle);
fragments.add(friends);
PartnerCountFragment friendss = new PartnerCountFragment();
Bundle bundle1 = new Bundle();
bundle1.putInt("type", 1);
friendss.setArguments(bundle1);
fragments.add(friendss);
tabs = (PagerSlidingTabStrip) findViewById(R.id.tabs);
mPager = (ViewPager) findViewById(R.id.homePager);
mPager.setAdapter(new MyPagerAdapter(getSupportFragmentManager()));
tabs.setViewPager(mPager);
tabs.setIndicatorColor(getResources().getColor(R.color.tab_color));
tabs.setTextSize(16);
// mPager.addOnPageChangeListener(new ViewPager.OnPageChangeListener() {
// @Override
// public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {
// fragments.get(position).refresh();
// }
//
// @Override
// public void onPageSelected(int position) {
//
// }
//
// @Override
// public void onPageScrollStateChanged(int state) {
//
// }
// });
}
public class MyPagerAdapter extends FragmentPagerAdapter implements PagerSlidingTabStrip.IconTabProvider{
private final String[] TITLES = { "我推荐的好友", "好友推荐好友"};
public MyPagerAdapter(FragmentManager fm) {
super(fm);
}
@Override
public CharSequence getPageTitle(int position) {
return TITLES[position];
}
@Override
public int getCount() {
return TITLES.length;
}
@Override
public Fragment getItem(int position) {
return fragments.get(position);
}
@Override
public int getPageIconResId(int position) {
return R.drawable.transparent_background;
}
@Override
public int getPageTextColor(int position) {
// TODO Auto-generated method stub
if(mPager.getCurrentItem()==position){
return ContextCompat.getColor(PartnerCountActivity.this, R.color.button_color);
}
return 0xff666666;
}
}
@Override
public void onClick(View v) {
switch (v.getId()) {
case R.id.back_btn:
finish();
break;
default:
break;
}
}
private long mExitTime;
}
| [
"rogerlzp@gmail.com"
] | rogerlzp@gmail.com |
6577b3e9530704b414cbd7d0aed871b9ba224e0b | 84a39f19ad4a4028620e305305c7b0267a6f006c | /JBotEvolver/src/evolutionaryrobotics/evolution/odneat/setups/NEATEvolutionEngine.java | e93a9bbac92b968d1c035af258ea954a3cd214c4 | [] | no_license | ci-group/ECAL_SocialLearning | d10a1a142f503428c412714ad9355671ad45216a | ce868eea9387580ec5f3ecbae544af02661cdb03 | refs/heads/master | 2021-01-21T18:34:27.408393 | 2017-05-22T14:37:19 | 2017-05-22T14:37:19 | 92,062,304 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,930 | java | package evolutionaryrobotics.evolution.odneat.setups;
import java.io.BufferedWriter;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.util.Scanner;
import taskexecutor.TaskExecutor;
import evolutionaryrobotics.evolution.Evolution;
import evolutionaryrobotics.ExtendedJBotEvolver;
public class NEATEvolutionEngine {
protected static final String OBJECTIVES_KEY = "INSERT_OBJECTIVES";
protected static final String WEIGHTS_KEY = "INSERT_WEIGHTS";
protected static final String OUTPUT_KEY = "INSERT_OUTPUT";
public static void main(String[] args) throws Exception {
int runFrom = 1, runTo = 30;
/*String[] confFiles = new String[]{"conf_examples/navigation_static_obstacles.conf",
"conf_examples/navigation_random_obstacles.conf"};*/
String[] confFiles = new String[]{
"confs/neat/neat_turn_left_behaviour.conf",
"confs/neat/neat_turn_right_behaviour.conf",
"confs/neat/neat_move_forward_behaviour.conf"};
int[] objectives = {1};
String[] weights = new String[]{"1.0"};
for(String confFile : confFiles){
System.out.println(confFile);
for(int objectiveIndex = 0; objectiveIndex < objectives.length; objectiveIndex++){
for(int run = runFrom; run <= runTo; run++){
System.out.println("RUN: " + run + "/" + runTo);
double time = System.currentTimeMillis();
String paramsFile = processConfigurationFile(confFile,
objectives[objectiveIndex], weights[objectiveIndex], run);
args = new String[]{paramsFile};
ExtendedJBotEvolver jBotEvolver = new ExtendedJBotEvolver(args);
TaskExecutor taskExecutor = TaskExecutor.getTaskExecutor(jBotEvolver, jBotEvolver.getArguments().get("--executor"));
taskExecutor.start();
Evolution evo = Evolution.getEvolution(jBotEvolver, taskExecutor,
jBotEvolver.getArguments().get("--evolution"));
evo.executeEvolution();
taskExecutor.stopTasks();
double timeSeconds = (System.currentTimeMillis() - time)/1000;
System.out.println(timeSeconds + " seconds.");
}
}
}
}
private static String processConfigurationFile(String confFile, int numberOfObjectives,
String objectivesWeights, int currentRun) throws IOException {
String outputDirectory = confFile.replace(".conf","_v" + currentRun);
String newConfFile = outputDirectory + ".conf";
outputDirectory = "evolution_macro_neurons/" + outputDirectory.replace("confs/", "");
Scanner sc = new Scanner(new FileReader(confFile));
BufferedWriter writer = new BufferedWriter(new FileWriter(
newConfFile));
while(sc.hasNextLine()){
String line = sc.nextLine();
line = line.replace(OBJECTIVES_KEY, String.valueOf(numberOfObjectives));
line = line.replace(WEIGHTS_KEY, objectivesWeights);
line = line.replace(OUTPUT_KEY, outputDirectory);
writer.write(line);
writer.newLine();
}
sc.close();
writer.close();
return newConfFile;
}
}
| [
"jacqueline.heinerman@gmail.com"
] | jacqueline.heinerman@gmail.com |
7919012d71e579830bb2d1362b0aec0db37d5123 | dafaa331edc190827a30254d7578aadcc006ae1d | /app/src/main/java/com/tajiang/leifeng/model/CancelReason.java | 50db3ed5dbd1b68ef7f64a780505c6ff40761451 | [] | no_license | yuexingxing/LeiFeng_studio | e960933fa723dcb677167c132102e11b7a72fec7 | 831f6530264b5c3233d2c12b269cac3600401d54 | refs/heads/master | 2020-03-09T08:54:41.458320 | 2018-04-09T01:28:36 | 2018-04-09T01:28:36 | 128,699,809 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 833 | java | package com.tajiang.leifeng.model;
import java.io.Serializable;
/**
* Created by wushu on 2017-02-05.
*/
public class CancelReason implements Serializable{
private boolean isChoose = false;
private String reasonText;
public String getReasonText() {
return reasonText;
}
public void setReasonText(String reasonText) {
this.reasonText = reasonText;
}
public boolean isChoose() {
return isChoose;
}
public void setChoose(boolean choose) {
isChoose = choose;
}
@Override
public String toString() {
return "CancelReason{" +
"isChoose=" + isChoose +
", reasonText='" + reasonText + '\'' +
'}';
}
public CancelReason( String reasonText) {
this.reasonText = reasonText;
}
}
| [
"670176656@qq.com"
] | 670176656@qq.com |
c9e784f16daea6a6616fffd1029de89ca42765a0 | 32bdd1b2fddc92a6cb8df128f2e049834148139c | /extra/src/main/java/org/operamasks/faces/extra/messagebox/MessageBoxType.java | 8028a0a44e92fac81c851f83e15a3d6ecb3c650d | [] | no_license | luobenyu/OperaMasks | e678ed4ad9dbb237a047ca0124da1bfb3249e28c | b772b2fd51d7d3da0471d7f46d69a521dc47e7d9 | refs/heads/master | 2021-05-28T09:47:20.328604 | 2012-11-17T22:19:51 | 2012-11-17T22:20:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 937 | java | /*
* $Id: MessageBoxType.java,v 1.1 2008/03/17 17:30:40 jacky Exp $
*
* Copyright (C) 2006 Operamasks Community.
* Copyright (C) 2000-2006 Apusic Systems, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see http://www.gnu.org/licenses.
*/
package org.operamasks.faces.extra.messagebox;
public enum MessageBoxType
{
OKCANCEL,
YESNO,
YESNOCANCEL,
WAITTING,
PROMPT,
ALERT
}
| [
"daniel.yuan@me.com"
] | daniel.yuan@me.com |
840740d9b339cbb76028e5da42b7494f775a4ff1 | 3d3b08631e0aecd0f2cf749b19627374e9581c27 | /impl/src/main/java/org/jboss/arquillian/persistence/dbunit/configuration/DBUnitConfigurationPropertyMapper.java | 64a11760ec35f973b9aff28b000d3f10ab8c4349 | [
"Apache-2.0"
] | permissive | ruettimac/arquillian-extension-persistence | 12ebb11d0f5e17fae08f288b6c74eabebf37cac3 | c70c1bc2f76093d5ac03ee30f974ac379e07ca81 | refs/heads/master | 2021-01-15T23:27:44.957238 | 2012-12-03T21:37:36 | 2012-12-03T21:37:36 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 3,820 | java | /*
* JBoss, Home of Professional Open Source
* Copyright 2011 Red Hat Inc. and/or its affiliates and other contributors
* as indicated by the @authors tag. All rights reserved.
* See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* 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.jboss.arquillian.persistence.dbunit.configuration;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.jboss.arquillian.persistence.core.util.Strings;
import org.jboss.arquillian.persistence.dbunit.configuration.annotations.Feature;
import org.jboss.arquillian.persistence.dbunit.configuration.annotations.Property;
public class DBUnitConfigurationPropertyMapper
{
private static final String FEATURE_PREFIX = "http://www.dbunit.org/features/";
private static final String PROPERTY_PREFIX = "http://www.dbunit.org/properties/";
public Map<String, Object> map(DBUnitConfiguration configuration)
{
final Map<String, Object> convertedProperties = new HashMap<String, Object>();
mapProperties(configuration, convertedProperties);
mapFeatures(configuration, convertedProperties);
return convertedProperties ;
}
private void mapFeatures(DBUnitConfiguration configuration, final Map<String, Object> convertedProperties)
{
final List<Field> features = ReflectionHelper.getFieldsWithAnnotation(DBUnitConfiguration.class, Feature.class);
try
{
for (Field feature : features)
{
String featurePrefix = FEATURE_PREFIX;
final Feature featureAnnotation = feature.getAnnotation(Feature.class);
if (!Strings.isEmpty(featureAnnotation.value()))
{
featurePrefix += featureAnnotation.value() + "/";
}
final String key = featurePrefix + feature.getName();
final Object value = feature.get(configuration);
if (value != null)
{
convertedProperties.put(key, value);
}
}
}
catch (Exception e)
{
// TODO introduce / reuse dbunit exception
throw new RuntimeException("Unable to map dbunit settings", e);
}
}
private void mapProperties(DBUnitConfiguration configuration, final Map<String, Object> convertedProperties)
{
final List<Field> properties = ReflectionHelper.getFieldsWithAnnotation(DBUnitConfiguration.class, Property.class);
try
{
for (Field property : properties)
{
String propertyPrefix = PROPERTY_PREFIX;
final Property propertyAnnotation = property.getAnnotation(Property.class);
if (!Strings.isEmpty(propertyAnnotation.value()))
{
propertyPrefix += propertyAnnotation.value() + "/";
}
final String key = propertyPrefix + property.getName();
final Object value = property.get(configuration);
if (value != null)
{
convertedProperties.put(key, value);
}
}
}
catch (Exception e)
{
// TODO introduce / reuse dbunit exception
throw new RuntimeException("Unable to map dbunit settings", e);
}
}
}
| [
"bartosz.majsak@gmail.com"
] | bartosz.majsak@gmail.com |
3fe99eb346c8d56f78165328588ce7e8e97a626c | a6da8bbf46ffdf292537ff80306d0e5d80433d9c | /src/main/java/io/netty/util/concurrent/PromiseTask.java | 4c3d0f7748e7488012cff88d9d316417f70219ac | [] | no_license | cugxdy/InitNettyServer | eef9903a94a500c8784bb104af192b7c513a31ce | dd86754d8ca571815ed4d0e41dec5801992f1d5b | refs/heads/master | 2021-07-05T20:46:42.928710 | 2019-06-10T06:05:19 | 2019-06-10T06:05:19 | 190,327,704 | 1 | 0 | null | 2020-10-13T13:41:35 | 2019-06-05T04:49:34 | Java | GB18030 | Java | false | false | 4,611 | java | /*
* Copyright 2013 The Netty Project
*
* The Netty Project licenses this file to you under the Apache License,
* version 2.0 (the "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at:
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
* License for the specific language governing permissions and limitations
* under the License.
*/
package io.netty.util.concurrent;
import java.util.concurrent.Callable;
import java.util.concurrent.RunnableFuture;
class PromiseTask<V> extends DefaultPromise<V> implements RunnableFuture<V> {
// 创建RunnableAdapter对象
static <T> Callable<T> toCallable(Runnable runnable, T result) {
return new RunnableAdapter<T>(runnable, result);
}
// 运行任务适配器RunnableAdapter
private static final class RunnableAdapter<T> implements Callable<T> {
final Runnable task; // Runnable
final T result; // 结果对象
RunnableAdapter(Runnable task, T result) {
this.task = task;
this.result = result;
}
@Override
public T call() {
// 任务运行
task.run();
// 返回result
return result;
}
@Override
public String toString() {
return "Callable(task: " + task + ", result: " + result + ')';
}
}
// Callable对象
protected final Callable<V> task;
PromiseTask(EventExecutor executor, Runnable runnable, V result) {
// 创建RunnableAdapter对象并设置task字段
this(executor, toCallable(runnable, result));
}
PromiseTask(EventExecutor executor, Callable<V> callable) {
super(executor);// --> DefaultPromise类
// 设置Callable域字段值
task = callable;
}
@Override// 哈希值
public final int hashCode() {
return System.identityHashCode(this);
}
@Override // 判断两者对象是否相等
public final boolean equals(Object obj) {
return this == obj;
}
@Override
public void run() {
try {
// 将DefaultPromise中result设置为UNCANCELLABLE状态。
// 防止在执行过程中被调用撤销方法
if (setUncancellableInternal()) {
// 调用task.run()方法
V result = task.call();
// 触发成功执行该函数,将DefaultPromise中result设置为success状态。
setSuccessInternal(result);
}
} catch (Throwable e) {
// 设置为失败状态,将DefaultPromise中result设置为failure状态。
setFailureInternal(e);
}
}
@Override// 抛出IllegalStateException异常
public final Promise<V> setFailure(Throwable cause) {
throw new IllegalStateException();
}
// 设置异常状态
protected final Promise<V> setFailureInternal(Throwable cause) {
super.setFailure(cause);
return this;
}
@Override// 设置为失败状态
public final boolean tryFailure(Throwable cause) {
return false;
}
protected final boolean tryFailureInternal(Throwable cause) {
return super.tryFailure(cause);
}
@Override
public final Promise<V> setSuccess(V result) {
throw new IllegalStateException();
}
// 触发成功执行调用事件
protected final Promise<V> setSuccessInternal(V result) {
super.setSuccess(result); // --> DefaultPromise.setSuccess()方法
return this;
}
@Override
public final boolean trySuccess(V result) {
return false;
}
protected final boolean trySuccessInternal(V result) {
return super.trySuccess(result);
}
@Override
public final boolean setUncancellable() {
throw new IllegalStateException();
}
// Make this future impossible to cancel.
// 设置RunnableFuture为UNCANCELLABLE状态
protected final boolean setUncancellableInternal() {
return super.setUncancellable();
}
@Override// 创建StringBuilder对象
protected StringBuilder toStringBuilder() {
StringBuilder buf = super.toStringBuilder();
buf.setCharAt(buf.length() - 1, ',');
return buf.append(" task: ")
.append(task)
.append(')');
}
}
| [
"cugxdy@163.com"
] | cugxdy@163.com |
f5a9c21d7404da482619f2c6f781aa2c0ea16e0a | 6b102ab7fec59a757af76d17ea81e998525424e6 | /CMUPayTmallFront/src/main/java/com/huateng/core/parse/error/ErrorConfigUtil.java | d71710b0c24073be6598998ae05e00969b686b6b | [] | no_license | justfordream/my-2 | a52516b87de9321916c0f111328fe1ced17e3549 | e7b2d1003afbd5df8351342692e94a11b7ec15c5 | refs/heads/master | 2016-08-10T13:48:44.772153 | 2015-06-01T15:40:45 | 2015-06-01T15:40:45 | 36,330,084 | 1 | 1 | null | null | null | null | UTF-8 | Java | false | false | 4,583 | java | package com.huateng.core.parse.error;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.dom4j.Document;
import org.dom4j.DocumentException;
import org.dom4j.Element;
import org.dom4j.io.SAXReader;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.huateng.core.parse.error.bean.ErrorBean;
import com.huateng.core.parse.error.bean.ErrorConfig;
import com.huateng.tmall.bean.mapper.UpayCsysImsiLdCdMapper;
/**
* 读取错误码配置文件
*
* @author Gary
*
*/
public class ErrorConfigUtil {
/**
* 配置文件名称
*/
private final static String ERROR_CODE_FILE = File.separator+"config"+File.separator+"ErrorCode.xml";
private final static String INNER_CODE = "innerCode";
private final static String OUTER_CODE = "outerCode";
private final static String ERROR_MSG = "desc";
public final static String BANK = "bank";
public final static String CMU = "crm";
private static ErrorConfig errorConfig;
private static Logger logger = LoggerFactory.getLogger("ErrorConfigUtil");
private static UpayCsysImsiLdCdMapper errcdMapper;
static {
if (errorConfig == null) {
errorConfig = ErrorConfigUtil.readConfigFile();
}
}
public static String getBankErrCode(String str) {
if (str == null || str.trim().equals(""))
return "015A06";
if (str.length() != 4 && str.length() != 6)
return "015A06";
Map<String ,Object> params = new HashMap<String ,Object>();
params.put("platformCd", "crm");
params.put("errCode", str);
params.put("errFlag", "0");
String errCd = errcdMapper.selectErrcode(params);
if(errCd==null||"".equals(errCd)){
return "015A06";
}else {
return errCd;
}
}
/**
* 读取XML文件内容
*
* @param fullPath
*/
@SuppressWarnings("unchecked")
public static ErrorConfig readConfigFile() {
URL url = ErrorConfigUtil.class.getClassLoader().getResource(ERROR_CODE_FILE);
SAXReader reader = new SAXReader();
ErrorConfig msg = new ErrorConfig();
List<ErrorBean> bankErrorList = new ArrayList<ErrorBean>();
List<ErrorBean> cmuErrorList = new ArrayList<ErrorBean>();
try {
Document doc = reader.read(url);
List<Element> provinceList = doc.selectNodes("/ErrorConfig/ErrorList");
ErrorBean bean = null;
String type = null;
List<Element> errorList = null;
for (Element ele : provinceList) {
type = ele.attributeValue("type");
errorList = ele.elements();
if (BANK.equals(type)) {
for (Element bankEle : errorList) {
bean = new ErrorBean();
bean.setInnerCode(bankEle.attributeValue(INNER_CODE));
bean.setOuterCode(bankEle.attributeValue(OUTER_CODE));
bean.setDesc(bankEle.attributeValue(ERROR_MSG));
bankErrorList.add(bean);
}
} else if (CMU.equals(type)) {
for (Element cmuEle : errorList) {
bean = new ErrorBean();
bean.setInnerCode(cmuEle.attributeValue(INNER_CODE));
bean.setOuterCode(cmuEle.attributeValue(OUTER_CODE));
bean.setDesc(cmuEle.attributeValue(ERROR_MSG));
cmuErrorList.add(bean);
}
}
}
msg.setBankErrorList(bankErrorList);
msg.setCmuErrorList(cmuErrorList);
} catch (DocumentException e) {
logger.error("", e);
}
return msg;
}
/**
* 根据网厅地址取得省机构号
*
* @param url
* 省网厅BackURL
* @return 省网厅机构号
*/
public static ErrorBean getErrorBean(String type, String innerCode) {
List<ErrorBean> errorList = null;
ErrorBean bean = null;
if (BANK.equals(type)) {
errorList = errorConfig.getBankErrorList();
} else if (CMU.equals(type)) {
errorList = errorConfig.getCmuErrorList();
} else {
errorList = new ArrayList<ErrorBean>();
}
for (ErrorBean obj : errorList) {
if (obj.getInnerCode().equals(innerCode) || obj.getOuterCode().equals(innerCode)) {
bean = obj;
break;
}
}
return bean;
}
/**
* 获取银行端错误码
*
* @param code
* 错误码
* @return
*/
public static ErrorBean getBankError(String code) {
return getErrorBean(BANK, code);
}
/**
* 获得CRM端错误码
*
* @param code
* 错误码
* @return
*/
public static ErrorBean getCrmError(String code) {
return getErrorBean(CMU, code);
}
/**
* @param args
*/
public static void main(String[] args) {
ErrorBean bean = ErrorConfigUtil.getErrorBean(BANK, "UPAY-B-025A09");
System.out.println(bean.getOuterCode() + ":" + bean.getDesc());
}
}
| [
"2323173088@qq.com"
] | 2323173088@qq.com |
61e78fcf5afd0f0c8a06b23e72e12fcee6763dac | e7ca3a996490d264bbf7e10818558e8249956eda | /aliyun-java-sdk-linkface/src/main/java/com/aliyuncs/linkface/model/v20180720/QueryAddUserInfoRequest.java | ef9fa39774b48fca813c1c3a60442f6c30530b17 | [
"Apache-2.0"
] | permissive | AndyYHL/aliyun-openapi-java-sdk | 6f0e73f11f040568fa03294de2bf9a1796767996 | 15927689c66962bdcabef0b9fc54a919d4d6c494 | refs/heads/master | 2020-03-26T23:18:49.532887 | 2018-08-21T04:12:23 | 2018-08-21T04:12:23 | 145,530,169 | 1 | 0 | null | 2018-08-21T08:14:14 | 2018-08-21T08:14:13 | null | UTF-8 | Java | false | false | 1,349 | 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.linkface.model.v20180720;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.ProtocolType;
import com.aliyuncs.http.MethodType;
/**
* @author auto create
* @version
*/
public class QueryAddUserInfoRequest extends RpcAcsRequest<QueryAddUserInfoResponse> {
public QueryAddUserInfoRequest() {
super("LinkFace", "2018-07-20", "QueryAddUserInfo");
setProtocol(ProtocolType.HTTPS);
setMethod(MethodType.POST);
}
private String iotId;
public String getIotId() {
return this.iotId;
}
public void setIotId(String iotId) {
this.iotId = iotId;
if(iotId != null){
putBodyParameter("IotId", iotId);
}
}
@Override
public Class<QueryAddUserInfoResponse> getResponseClass() {
return QueryAddUserInfoResponse.class;
}
}
| [
"yixiong.jxy@alibaba-inc.com"
] | yixiong.jxy@alibaba-inc.com |
349d09a068f4adc07ad1dc04e6c35f5d1f9d7172 | 7e1511cdceeec0c0aad2b9b916431fc39bc71d9b | /flakiness-predicter/input_data/original_tests/activiti-activiti/nonFlakyMethods/org.activiti.standalone.calendar.DurationHelperTest-daylightSavingFallObservedSecondHour.java | 68f250b861cc5e03846dbdaa3fbcda8a82ce3f64 | [
"BSD-3-Clause"
] | permissive | Taher-Ghaleb/FlakeFlagger | 6fd7c95d2710632fd093346ce787fd70923a1435 | 45f3d4bc5b790a80daeb4d28ec84f5e46433e060 | refs/heads/main | 2023-07-14T16:57:24.507743 | 2021-08-26T14:50:16 | 2021-08-26T14:50:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 454 | java | @Test public void daylightSavingFallObservedSecondHour() throws Exception {
Clock testingClock=new DefaultClockImpl();
testingClock.setCurrentCalendar(parseCalendar("20131103-00:45:00",TimeZone.getTimeZone("US/Eastern")));
DurationHelper dh=new DurationHelper("R2/2013-11-03T00:45:00-04:00/PT2H",testingClock);
Calendar expected=parseCalendarWithOffset("20131103-01:45:00 -05:00");
assertTrue(expected.compareTo(dh.getCalendarAfter()) == 0);
}
| [
"aalsha2@masonlive.gmu.edu"
] | aalsha2@masonlive.gmu.edu |
f670a3440d1770bd5953a81534ea26631c8cb6c4 | cf64ff59a0292500d65d69fcfb0b42d7e4dba9d8 | /samples/excel/build/src/office/WorkflowTask.java | b32418234bb72855a88067ee019492d4343cbbb0 | [
"BSD-2-Clause"
] | permissive | nosdod/CDWriterJava | 0bb3db2e68278c445b78afc665731e058dc42ea4 | 7146689889d8d50d7162b21ea0b98fc5c2364306 | refs/heads/main | 2023-09-06T01:32:33.614647 | 2021-11-23T15:14:42 | 2021-11-23T15:14:42 | 431,142,538 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,581 | java | package office ;
import com4j.*;
@IID("{000CD900-0000-0000-C000-000000000046}")
public interface WorkflowTask extends office._IMsoDispObj {
// Methods:
/**
* <p>
* Getter method for the COM property "Id"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(1) //= 0x1. The runtime will prefer the VTID if present
@VTID(9)
java.lang.String getId();
/**
* <p>
* Getter method for the COM property "ListID"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(2) //= 0x2. The runtime will prefer the VTID if present
@VTID(10)
java.lang.String getListID();
/**
* <p>
* Getter method for the COM property "WorkflowID"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(3) //= 0x3. The runtime will prefer the VTID if present
@VTID(11)
java.lang.String getWorkflowID();
/**
* <p>
* Getter method for the COM property "Name"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(4) //= 0x4. The runtime will prefer the VTID if present
@VTID(12)
java.lang.String getName();
/**
* <p>
* Getter method for the COM property "Description"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(5) //= 0x5. The runtime will prefer the VTID if present
@VTID(13)
java.lang.String getDescription();
/**
* <p>
* Getter method for the COM property "AssignedTo"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(6) //= 0x6. The runtime will prefer the VTID if present
@VTID(14)
java.lang.String getAssignedTo();
/**
* <p>
* Getter method for the COM property "CreatedBy"
* </p>
* @return Returns a value of type java.lang.String
*/
@DISPID(7) //= 0x7. The runtime will prefer the VTID if present
@VTID(15)
java.lang.String getCreatedBy();
/**
* <p>
* Getter method for the COM property "DueDate"
* </p>
* @return Returns a value of type java.util.Date
*/
@DISPID(8) //= 0x8. The runtime will prefer the VTID if present
@VTID(16)
java.util.Date getDueDate();
/**
* <p>
* Getter method for the COM property "CreatedDate"
* </p>
* @return Returns a value of type java.util.Date
*/
@DISPID(9) //= 0x9. The runtime will prefer the VTID if present
@VTID(17)
java.util.Date getCreatedDate();
/**
* @return Returns a value of type int
*/
@DISPID(10) //= 0xa. The runtime will prefer the VTID if present
@VTID(18)
int show();
// Properties:
}
| [
"mark.dodson@dodtech.co.uk"
] | mark.dodson@dodtech.co.uk |
b6ecdea1f7e9f519e359873d75b944f9c5e84e0c | d5decb236da7da2bb8d123311207766b6a8435cf | /src/com/taobao/api/domain/ArticleSub.java | cf81dfdf5daf3434d4a3a3386537befba06fe9fc | [] | no_license | tasfe/my-project-taobao-demo | 85fee9861361e1e9ef4810f56aa5bbb3290ea216 | f05a8141b6f3b23e88053bad4a12c8a138c2ef51 | refs/heads/master | 2021-01-13T01:30:17.440485 | 2013-02-16T08:38:02 | 2013-02-16T08:38:02 | 32,249,939 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 2,681 | java | package com.taobao.api.domain;
import java.util.Date;
import com.taobao.api.TaobaoObject;
import com.taobao.api.internal.mapping.ApiField;
/**
* 应用订购信息
*
* @author auto create
* @since 1.0, null
*/
public class ArticleSub extends TaobaoObject {
private static final long serialVersionUID = 3436286886239694131L;
/**
* 应用收费代码,从合作伙伴后台(my.open.taobao.com)-收费管理-收费项目列表 能够获得该应用的收费代码
*/
@ApiField("article_code")
private String articleCode;
/**
* 应用名称
*/
@ApiField("article_name")
private String articleName;
/**
* 是否自动续费
*/
@ApiField("autosub")
private Boolean autosub;
/**
* 订购关系到期时间
*/
@ApiField("deadline")
private Date deadline;
/**
* 是否到期提醒
*/
@ApiField("expire_notice")
private Boolean expireNotice;
/**
* 收费项目代码,从合作伙伴后台(my.open.taobao.com)-收费管理-收费项目列表 能够获得收费项目代码
*/
@ApiField("item_code")
private String itemCode;
/**
* 收费项目名称
*/
@ApiField("item_name")
private String itemName;
/**
* 淘宝会员名
*/
@ApiField("nick")
private String nick;
/**
* 状态,1=有效 2=过期
*/
@ApiField("status")
private Long status;
public String getArticleCode() {
return this.articleCode;
}
public void setArticleCode(String articleCode) {
this.articleCode = articleCode;
}
public String getArticleName() {
return this.articleName;
}
public void setArticleName(String articleName) {
this.articleName = articleName;
}
public Boolean getAutosub() {
return this.autosub;
}
public void setAutosub(Boolean autosub) {
this.autosub = autosub;
}
public Date getDeadline() {
return this.deadline;
}
public void setDeadline(Date deadline) {
this.deadline = deadline;
}
public Boolean getExpireNotice() {
return this.expireNotice;
}
public void setExpireNotice(Boolean expireNotice) {
this.expireNotice = expireNotice;
}
public String getItemCode() {
return this.itemCode;
}
public void setItemCode(String itemCode) {
this.itemCode = itemCode;
}
public String getItemName() {
return this.itemName;
}
public void setItemName(String itemName) {
this.itemName = itemName;
}
public String getNick() {
return this.nick;
}
public void setNick(String nick) {
this.nick = nick;
}
public Long getStatus() {
return this.status;
}
public void setStatus(Long status) {
this.status = status;
}
}
| [
"bingzhaoliu@gmail.com@28b099c3-0654-7635-3fca-eff556b9d3f2"
] | bingzhaoliu@gmail.com@28b099c3-0654-7635-3fca-eff556b9d3f2 |
0e713845f5ab3d82d9a2f2fec55f6beea2db1f31 | 1b88ab63e8b8df8b0230f9c0736bb7a6a9e4725a | /wffweb/src/main/java/com/webfirmframework/wffweb/tag/html/attribute/Accept.java | b9c82fbb82892cf17125dc1095cf4e20cc94e49d | [
"Apache-2.0"
] | permissive | zhiqinghuang/wff | 188b1a497629ba7b303aa5364a770235d41f536c | 57602834e6d292dbadf017ec11eaf9b242da8551 | refs/heads/master | 2020-04-06T03:42:36.844322 | 2016-05-04T18:24:03 | 2016-05-04T18:24:03 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,562 | java | /*
* Copyright 2014-2016 Web Firm Framework
*
* 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.
* @author WFF
*/
package com.webfirmframework.wffweb.tag.html.attribute;
import com.webfirmframework.wffweb.tag.html.attribute.core.AbstractAttribute;
import com.webfirmframework.wffweb.tag.html.identifier.InputAttributable;
/**
*
* <code>accept</code> attribute for the element.
*
* <pre>
*
* If the value of the type attribute is file, this attribute indicates the types of files that the server accepts; otherwise it is ignored. The value must be a comma-separated list of unique content type specifiers:
* A file extension starting with the STOP character (U+002E). (E.g.: ".jpg,.png,.doc")
* A valid MIME type with no extensions
* audio/* representing sound files <i>(HTML5)</i>
* video/* representing video files <i>(HTML5)</i>
* image/* representing image files <i>(HTML5)</i>
*
* </pre>
*
* @author WFF
* @since 1.0.0
*/
public class Accept extends AbstractAttribute implements InputAttributable {
private static final long serialVersionUID = 1_0_0L;
{
super.setAttributeName(AttributeNameConstants.ACCEPT);
init();
}
/**
*
* @param value
* the value for the attribute
* @since 1.0.0
* @author WFF
*/
public Accept(final String value) {
setAttributeValue(value);
}
/**
* sets the value for this attribute
*
* @param value
* the value for the attribute.
* @since 1.0.0
* @author WFF
*/
protected void setValue(final String value) {
super.setAttributeValue(value);
}
/**
* gets the value of this attribute
*
* @return the value of the attribute
* @since 1.0.0
* @author WFF
*/
public String getValue() {
return super.getAttributeValue();
}
/**
* 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 |
0a371e16121d98940a0c881657aa654014dde562 | 62b8441631f0d262bf59e7e2451a88603915aadf | /.svn/pristine/6f/6fbbde792e5f4cacc44e8b489af427042665eb11.svn-base | 4d4a8e2d5b90329cdd7f59c1f92798dffc7487ef | [] | no_license | WJtoy/mainHousehold- | 496fc5af19657d938324d384f2d0b72d70e60c0e | 4cff9537a5f78058a84d4b33f5f58595380597d8 | refs/heads/master | 2023-06-17T22:55:08.988873 | 2021-07-15T07:18:25 | 2021-07-15T07:18:25 | 385,202,403 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,471 | package com.wolfking.jeesite.ms.providerrpt.controller;
import com.kkl.kklplus.entity.rpt.RPTReminderResponseTimeEntity;
import com.kkl.kklplus.entity.rpt.exception.RPTBaseException;
import com.wolfking.jeesite.common.persistence.AjaxJsonEntity;
import com.wolfking.jeesite.common.persistence.Page;
import com.wolfking.jeesite.common.utils.DateUtils;
import com.wolfking.jeesite.modules.rpt.entity.RptSearchCondition;
import com.wolfking.jeesite.modules.rpt.web.BaseRptController;
import com.wolfking.jeesite.modules.sys.entity.User;
import com.wolfking.jeesite.modules.sys.utils.UserUtils;
import com.wolfking.jeesite.ms.providerrpt.service.MSReminderResponseTimeRptService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
@Controller
@RequestMapping(value = "${adminPath}/rpt/provider/reminderResponseTime/")
public class MSReminderResponseTimeRptController extends BaseRptController {
@Autowired
private MSReminderResponseTimeRptService msReminderResponseTimeRptService;
/**
* 获取报表的查询条件
*
* @param rptSearchCondition
* @return
*/
@ModelAttribute("rptSearchCondition")
public RptSearchCondition get(@ModelAttribute("rptSearchCondition") RptSearchCondition rptSearchCondition) {
if (rptSearchCondition == null) {
rptSearchCondition = new RptSearchCondition();
}
return rptSearchCondition;
}
/**
* 催单时效统计
*/
@RequestMapping(value = "reminderResponseTimeReport")
public String reminderResponseTimeReport(RptSearchCondition rptSearchCondition, HttpServletRequest request, HttpServletResponse response, Model model) {
Page<RPTReminderResponseTimeEntity> page = new Page<>(request, response);
if (rptSearchCondition.getBeginDate() == null) {
rptSearchCondition.setEndDate(DateUtils.getDateEnd(new Date()));
rptSearchCondition.setBeginDate(DateUtils.getStartDayOfMonth(DateUtils.addMonth(new Date(), -1)));
} else {
rptSearchCondition.setEndDate(DateUtils.getDateEnd(rptSearchCondition.getEndDate()));
}
if (rptSearchCondition.isSearching()) {
page = msReminderResponseTimeRptService.getReminderResponseTimeList(page, rptSearchCondition.getOrderNo(), rptSearchCondition.getAreaId(), rptSearchCondition.getReminderNo(),
rptSearchCondition.getReminderTimes(), rptSearchCondition.getBeginDate(), rptSearchCondition.getEndDate());
}
model.addAttribute("page", page);
return "modules/providerrpt/reminderResponseTimeReport";
}
@ResponseBody
@RequestMapping(value = "checkExportTask", method = RequestMethod.POST)
public AjaxJsonEntity checkExportTask(RptSearchCondition rptSearchCondition) {
AjaxJsonEntity result = new AjaxJsonEntity(true);
try {
User user = UserUtils.getUser();
String orderNo = rptSearchCondition.getOrderNo();
Long areaId = rptSearchCondition.getAreaId();
String reminderNo = rptSearchCondition.getReminderNo();
Integer reminderTimes = rptSearchCondition.getReminderTimes();
Date beginDate = rptSearchCondition.getBeginDate();
Date endDate = DateUtils.getDateEnd(rptSearchCondition.getEndDate());
msReminderResponseTimeRptService.checkRptExportTask(orderNo, areaId, reminderNo, reminderTimes, beginDate, endDate, user);
} catch (RPTBaseException e) {
result.setSuccess(false);
result.setMessage(e.getMessage());
} catch (Exception e) {
result.setSuccess(false);
result.setMessage("创建报表导出任务失败,请重试");
}
return result;
}
@ResponseBody
@RequestMapping(value = "export", method = RequestMethod.POST)
public AjaxJsonEntity export(RptSearchCondition rptSearchCondition) {
AjaxJsonEntity result = new AjaxJsonEntity(true);
try {
User user = UserUtils.getUser();
String orderNo = rptSearchCondition.getOrderNo();
Long areaId = rptSearchCondition.getAreaId();
String reminderNo = rptSearchCondition.getReminderNo();
Integer reminderTimes = rptSearchCondition.getReminderTimes();
Date beginDate = rptSearchCondition.getBeginDate();
Date endDate = DateUtils.getDateEnd(rptSearchCondition.getEndDate());
msReminderResponseTimeRptService.createRptExportTask(orderNo, areaId, reminderNo, reminderTimes, beginDate, endDate, user);
result.setMessage("报表导出任务创建成功,请前往'报表中心->报表下载'功能下载");
} catch (RPTBaseException e) {
result.setSuccess(false);
result.setMessage(e.getMessage());
} catch (Exception e) {
result.setSuccess(false);
result.setMessage("创建报表导出任务失败,请重试");
}
return result;
}
}
| [
"1227679550@qq.com"
] | 1227679550@qq.com | |
cc1979d1426112e08f37d4375833df489401c81a | 918687803c2dd38925b6a33c01e4eac4234a26f7 | /src/test/java/com/stackroute/keepnote/test/model/UserTest.java | 55a254d01d62721bfd7ebf19dfb16e5f1e0c8264 | [] | no_license | pradeepsure/KeepNote-Step3-Boilerplate | 76331870c9fbdfb33b8e5dad1e5008e12f48c5e0 | 84b4b724811cbe7cea80e150d0902f7127a6cf8c | refs/heads/master | 2020-04-29T16:21:37.485282 | 2019-02-13T05:24:07 | 2019-02-13T05:24:07 | 176,256,780 | 1 | 8 | null | null | null | null | UTF-8 | Java | false | false | 566 | java | package com.stackroute.keepnote.test.model;
import java.util.Date;
import org.junit.Before;
import org.junit.Test;
import org.meanbean.test.BeanTester;
import com.stackroute.keepnote.model.User;
public class UserTest {
private User user;
@Before
public void setUp() throws Exception {
user = new User();
user.setUserId("Jhon123");
user.setUserName("Jhon Simon");
user.setUserPassword("123456");
user.setUserMobile("9898989898");
user.setUserAddedDate(new Date());
}
@Test
public void test() {
new BeanTester().testBean(User.class);
}
}
| [
"rutuja.bacchuwar@stackroute.in"
] | rutuja.bacchuwar@stackroute.in |
76b270d6923d3f41be34393b1063fd98d5648325 | aa097b782c7754ed43dce82e83f070cc2ed37410 | /HibernateEx/src/com/hiber/MainLogic.java | 72f96bf3dd9f8221f8c31297681dda802edc816d | [] | no_license | sravanimeduri/hello-world | 196724da778b4847d44de928c6ae0f02677bc6e1 | c1f386af306cc0cd88ae002c8dd5870c15030ac4 | refs/heads/main | 2023-02-02T09:11:17.467730 | 2020-12-16T17:15:09 | 2020-12-16T17:15:09 | 308,038,071 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 579 | java | package com.hiber;
import java.util.Scanner;
public class MainLogic {
public static void main(String[] args) throws Exception {
Scanner sc=new Scanner(System.in);
int choice=0;
do {
System.out.println("Select your option\n 1. Insert\n 2. Display\n 3. Update\n 4. Delete\n 5. Exit");
choice=sc.nextInt();
if(choice == 1) {
OperationInsert.insert();
}else if(choice == 2) {
OperationDisplay.display();
}else if(choice == 3) {
OperationUpdate.update();
}else if(choice == 4) {
OperationDelete.delete();
}
}while(choice!=5);
}
}
| [
"you@example.com"
] | you@example.com |
b5bd02e507390545f2e11ce00d2286cee3db7f0a | e6c51943104fa6b1350935dd24e0e31fe04da406 | /apps/routing/src/main/java/org/onosproject/routing/cli/RemoveRouteCommand.java | 3e216f95d83dfecb276302f0739bc608b34890ca | [
"Apache-2.0"
] | permissive | onfsdn/atrium-onos | bf7feed533b4e210a47312cbf31c614e036375ac | cd39c45d4ee4b23bd77449ac326148d3f6a23ef4 | refs/heads/support/atrium-16A | 2021-01-17T22:06:52.781691 | 2016-02-09T18:13:31 | 2016-02-09T18:13:31 | 51,386,951 | 3 | 4 | null | 2016-07-19T19:28:21 | 2016-02-09T18:03:47 | Java | UTF-8 | Java | false | false | 2,182 | java | /*
* Copyright 2015 Open Networking Laboratory
*
* 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.onosproject.routing.cli;
import org.apache.karaf.shell.commands.Argument;
import org.apache.karaf.shell.commands.Command;
import org.onlab.packet.IpAddress;
import org.onlab.packet.IpPrefix;
import org.onlab.packet.MacAddress;
import org.onosproject.cli.AbstractShellCommand;
import org.onosproject.routing.FibEntry;
import org.onosproject.routing.FibListener;
import org.onosproject.routing.FibUpdate;
import org.onosproject.routing.StaticRoutingService;
import java.util.Arrays;
import java.util.Collections;
@Command(scope = "onos", name = "remove-route", description = "Removes static route")
public class RemoveRouteCommand extends AbstractShellCommand {
@Argument(index = 0, name = "prefix IP MAC",
description = "prefix nexthopIP nexthopMAC",
required = true, multiValued = true)
String[] fibEntryString = null;
@Override
protected void execute() {
StaticRoutingService routingService = get(StaticRoutingService.class);
if (fibEntryString.length < 3) {
return;
}
IpPrefix prefix = IpPrefix.valueOf(fibEntryString[0]);
IpAddress nextHopIp = IpAddress.valueOf(fibEntryString[1]);
MacAddress nextHopMac = MacAddress.valueOf(fibEntryString[2]);
FibEntry fibEntry = new FibEntry(prefix, nextHopIp, nextHopMac);
FibUpdate fibUpdate = new FibUpdate(FibUpdate.Type.DELETE, fibEntry);
FibListener fibListener = routingService.getFibListener();
fibListener.update(Collections.emptyList(), Arrays.asList(fibUpdate));
}
}
| [
"gerrit@onlab.us"
] | gerrit@onlab.us |
5a1390268d10f1214452f23b95f50d85a3a5c86f | 19f7e40c448029530d191a262e5215571382bf9f | /decompiled/instagram/sources/p000X/C12300gW.java | d7123f35bdb62f713d846a1d42c49b8728597518 | [] | no_license | stanvanrooy/decompiled-instagram | c1fb553c52e98fd82784a3a8a17abab43b0f52eb | 3091a40af7accf6c0a80b9dda608471d503c4d78 | refs/heads/master | 2022-12-07T22:31:43.155086 | 2020-08-26T03:42:04 | 2020-08-26T03:42:04 | 283,347,288 | 18 | 1 | null | null | null | null | UTF-8 | Java | false | false | 5,561 | java | package p000X;
import android.app.ActivityManager;
import android.content.Context;
import java.util.ArrayList;
import java.util.Collections;
/* renamed from: X.0gW reason: invalid class name and case insensitive filesystem */
public final class C12300gW {
public static volatile Integer A00;
/* JADX WARNING: Code restructure failed: missing block: B:98:0x01a7, code lost:
if (p000X.C12310gX.A00() < 1800000) goto L_0x01a9;
*/
public static int A00(Context context) {
int i;
int i2;
int i3;
int i4;
if (A00 == null) {
synchronized (C12300gW.class) {
if (A00 == null) {
ActivityManager.MemoryInfo memoryInfo = new ActivityManager.MemoryInfo();
((ActivityManager) context.getSystemService("activity")).getMemoryInfo(memoryInfo);
long j = memoryInfo.totalMem;
if (j == -1) {
ArrayList arrayList = new ArrayList();
int A01 = C12310gX.A01();
if (A01 < 1) {
i2 = -1;
} else if (A01 == 1) {
i2 = 2008;
} else {
i2 = 2012;
if (A01 <= 3) {
i2 = 2011;
}
}
if (i2 != -1) {
arrayList.add(Integer.valueOf(i2));
}
long A002 = (long) C12310gX.A00();
if (A002 == -1) {
i3 = -1;
} else if (A002 <= 528000) {
i3 = 2008;
} else if (A002 <= 620000) {
i3 = 2009;
} else if (A002 <= 1020000) {
i3 = 2010;
} else if (A002 <= 1220000) {
i3 = 2011;
} else if (A002 <= 1520000) {
i3 = 2012;
} else {
i3 = 2014;
if (A002 <= 2020000) {
i3 = 2013;
}
}
if (i3 != -1) {
arrayList.add(Integer.valueOf(i3));
}
ActivityManager.MemoryInfo memoryInfo2 = new ActivityManager.MemoryInfo();
((ActivityManager) context.getSystemService("activity")).getMemoryInfo(memoryInfo2);
long j2 = memoryInfo2.totalMem;
if (j2 <= 0) {
i4 = -1;
} else if (j2 <= 201326592) {
i4 = 2008;
} else if (j2 <= 304087040) {
i4 = 2009;
} else if (j2 <= 536870912) {
i4 = 2010;
} else if (j2 <= 1073741824) {
i4 = 2011;
} else if (j2 <= 1610612736) {
i4 = 2012;
} else {
i4 = 2014;
if (j2 <= 2147483648L) {
i4 = 2013;
}
}
if (i4 != -1) {
arrayList.add(Integer.valueOf(i4));
}
if (arrayList.isEmpty()) {
i = -1;
} else {
Collections.sort(arrayList);
if ((arrayList.size() & 1) == 1) {
i = ((Integer) arrayList.get(arrayList.size() >> 1)).intValue();
} else {
int size = (arrayList.size() >> 1) - 1;
i = ((Integer) arrayList.get(size)).intValue() + ((((Integer) arrayList.get(size + 1)).intValue() - ((Integer) arrayList.get(size)).intValue()) >> 1);
}
}
} else if (j <= 805306368) {
i = 2010;
if (C12310gX.A01() <= 1) {
i = 2009;
}
} else {
i = 2012;
if (j > 1073741824) {
if (j > 1610612736) {
if (j > 2147483648L) {
if (j <= 3221225472L) {
i = 2014;
} else {
i = 2016;
if (j <= 5368709120L) {
i = 2015;
}
}
}
}
i = 2013;
} else if (C12310gX.A00() < 1300000) {
i = 2011;
}
}
A00 = Integer.valueOf(i);
}
}
}
return A00.intValue();
}
}
| [
"stan@rooy.works"
] | stan@rooy.works |
583450aa0375951abccb5eb766d37ae881eb494b | 0c65f879cdf8858b9e931bb9a3a914cc76307685 | /src/main/java/ch/alpine/sophus/flt/ExponentialMovingAverage.java | 39558e7617a72fbdeb96ef56763cae3c9eae769c | [] | no_license | datahaki/sophus | b9674f6e4068d907f8667fb546398fc0dbb5abc6 | cedce627452a70beed13ee2031a1cf98a413c2a7 | refs/heads/master | 2023-08-16T23:45:40.252757 | 2023-08-09T17:46:17 | 2023-08-09T17:46:17 | 232,996,526 | 3 | 0 | null | 2022-06-08T22:39:06 | 2020-01-10T08:02:55 | Java | UTF-8 | Java | false | false | 205 | java | // code by jph
package ch.alpine.sophus.flt;
/** ExponentialMovingAverage is an IIRFilter applied to a sequence of measurements */
public enum ExponentialMovingAverage {
// TODO OWL 20220315 use this
}
| [
"jan.hakenberg@gmail.com"
] | jan.hakenberg@gmail.com |
62af3c4494a1e5500a766bddbb0760af214a3bef | 5c8cdc4f433b7658e31fffd5adf7175d6bad9d30 | /mate-support/mate-job-admin/src/main/java/com/xxl/job/admin/controller/annotation/PermissionLimit.java | 379efd46b956758445d9f60105b4faa9abfee07d | [
"Apache-2.0"
] | permissive | matevip/matecloud | 9e603dde9be212f045549332d76a18a171297714 | 3a39a7a7090850b5936068f228dd58d73960410e | refs/heads/dev | 2023-09-03T12:41:19.704337 | 2023-07-30T02:05:17 | 2023-07-30T02:05:17 | 218,435,426 | 1,438 | 427 | Apache-2.0 | 2023-06-22T11:17:52 | 2019-10-30T03:25:43 | Java | UTF-8 | Java | false | false | 542 | java | package com.xxl.job.admin.controller.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* 权限限制
* @author xuxueli 2015-12-12 18:29:02
*/
@Target(ElementType.METHOD)
@Retention(RetentionPolicy.RUNTIME)
public @interface PermissionLimit {
/**
* 登录拦截 (默认拦截)
*/
boolean limit() default true;
/**
* 要求管理员权限
*
* @return
*/
boolean adminuser() default false;
} | [
"7333791@qq.com"
] | 7333791@qq.com |
ff623f2a4802e230c46db04698007237c100e06b | 9d9c0d9aba0c3102787a0215621b24dbe7f64b59 | /jeecms-component/src/main/java/com/jeecms/interact/domain/CmsFormTypeEntity.java | a1dbaaf1de178d3bf075dedc62935849114504e5 | [] | no_license | hd19901110/jeecms1.4.1test | b354019c57a06384524d53aa667614c1f4e5a743 | 4e3e0cb31513e53004aa20c108f79741203becb0 | refs/heads/master | 2022-12-08T06:10:06.868825 | 2020-08-31T09:59:19 | 2020-08-31T09:59:19 | 285,445,431 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 3,240 | java | package com.jeecms.interact.domain;/**
* @Copyright: 江西金磊科技发展有限公司 All rights reserved.Notice 仅限于授权后使用,禁止非授权传阅以及私自用于商业目的。
*/
import com.jeecms.common.base.domain.AbstractSortDomain;
import com.jeecms.system.domain.CmsSite;
import org.hibernate.annotations.Where;
import javax.persistence.*;
import java.util.List;
import java.util.Objects;
/**
*
* @author: tom
* @date: 2020/2/13 9:53
*/
@Entity
@Table(name = "jc_ex_form_type")
public class CmsFormTypeEntity extends AbstractSortDomain<Integer> {
private Integer id;
private String name;
private Integer siteId;
/**排序权重*/
private Integer sortWeight;
private CmsSite site;
private List<CmsFormEntity> forms;
public void init(){
if(getSortWeight()==null){
setSortWeight(10);
}
if(getSortNum()==null){
setSortNum(10);
}
}
@Id
@Column(name = "type_id")
@TableGenerator(name = "jc_ex_form_type", pkColumnValue = "jc_ex_form_type", initialValue = 0, allocationSize = 10)
@GeneratedValue(strategy = GenerationType.TABLE, generator = "jc_ex_form_type")
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
@Basic
@Column(name = "name")
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
@Column(name = "sort_weight", length = 11)
public Integer getSortWeight() {
return sortWeight;
}
public void setSortWeight(Integer sortWeight) {
this.sortWeight = sortWeight;
}
@Column(name = "site_id", length = 11)
public Integer getSiteId() {
return siteId;
}
public void setSiteId(Integer siteId) {
this.siteId = siteId;
}
@ManyToOne(fetch = FetchType.LAZY)
@JoinColumn(name = "site_id", insertable = false, updatable = false)
public CmsSite getSite() {
return site;
}
public void setSite(CmsSite site) {
this.site = site;
}
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
CmsFormTypeEntity that = (CmsFormTypeEntity) o;
return id.equals(that.id) &&
Objects.equals(name, that.name) &&
Objects.equals(createTime, that.createTime) &&
Objects.equals(updateTime, that.updateTime) &&
Objects.equals(createUser, that.createUser) &&
Objects.equals(updateUser, that.updateUser);
}
@OneToMany(mappedBy = "formType")
@Where(clause = " deleted_flag=0 ")
public List<CmsFormEntity> getForms() {
return forms;
}
public void setForms(List<CmsFormEntity> forms) {
this.forms = forms;
}
@Override
public int hashCode() {
return Objects.hash(id, name, createTime, updateTime, createUser, updateUser);
}
}
| [
"2638177992@qq.com"
] | 2638177992@qq.com |
799157095e622d6b7a31078d77104ae3a6e9570b | 786d48794a9957d377aca967b8d95f80c5fa2120 | /jp.ac.nagoya_u.is.nces.a_rte.model/src/jp/ac/nagoya_u/is/nces/a_rte/model/rte/interaction/PeriodicComSendProxy.java | 0cab0b10b149f9a3befa8120858a3814175d5ab6 | [] | no_license | PizzaFactory/a-workflow-demo | 590dec0c1c3bed38394fca686cd798aebad60e7d | e98d95236bf78b7fe3ad8b64681b8594f3bdd4eb | refs/heads/master | 2020-06-13T17:47:15.225297 | 2016-12-05T00:30:24 | 2016-12-05T00:30:24 | 75,572,426 | 0 | 1 | null | 2016-12-05T00:30:26 | 2016-12-04T23:51:29 | Java | UTF-8 | Java | false | false | 3,316 | java | /*
* TOPPERS/A-RTEGEN
* Automotive Runtime Environment Generator
*
* Copyright (C) 2013-2016 by Eiwa System Management, Inc., JAPAN
*
* 上記著作権者は,以下の(1)〜(4)の条件を満たす場合に限り,本ソフトウェ
* ア(本ソフトウェアを改変したものを含む.以下同じ)を使用・複製・改
* 変・再配布(以下,利用と呼ぶ)することを無償で許諾する.
* (1) 本ソフトウェアをソースコードの形で利用する場合には,上記の著作
* 権表示,この利用条件および下記の無保証規定が,そのままの形でソー
* スコード中に含まれていること.
* (2) 本ソフトウェアを,ライブラリ形式など,他のソフトウェア開発に使
* 用できる形で再配布する場合には,再配布に伴うドキュメント(利用
* 者マニュアルなど)に,上記の著作権表示,この利用条件および下記
* の無保証規定を掲載すること.
* (3) 本ソフトウェアを,機器に組み込むなど,他のソフトウェア開発に使
* 用できない形で再配布する場合には,次のいずれかの条件を満たすこ
* と.
* (a) 再配布に伴うドキュメント(利用者マニュアルなど)に,上記の著
* 作権表示,この利用条件および下記の無保証規定を掲載すること.
* (b) 再配布の形態を,別に定める方法によって,TOPPERSプロジェクトに
* 報告すること.
* (4) 本ソフトウェアの利用により直接的または間接的に生じるいかなる損
* 害からも,上記著作権者およびTOPPERSプロジェクトを免責すること.
* また,本ソフトウェアのユーザまたはエンドユーザからのいかなる理
* 由に基づく請求からも,上記著作権者およびTOPPERSプロジェクトを
* 免責すること.
*
* 本ソフトウェアは,AUTOSAR(AUTomotive Open System ARchitecture)仕
* 様に基づいている.上記の許諾は,AUTOSARの知的財産権を許諾するもので
* はない.AUTOSARは,AUTOSAR仕様に基づいたソフトウェアを商用目的で利
* 用する者に対して,AUTOSARパートナーになることを求めている.
*
* 本ソフトウェアは,無保証で提供されているものである.上記著作権者お
* よびTOPPERSプロジェクトは,本ソフトウェアに関して,特定の使用目的
* に対する適合性も含めて,いかなる保証も行わない.また,本ソフトウェ
* アの利用により直接的または間接的に生じたいかなる損害に関しても,そ
* の責任を負わない.
*
* $Id $
*/
/**
*/
package jp.ac.nagoya_u.is.nces.a_rte.model.rte.interaction;
/**
* <!-- begin-user-doc -->
* A representation of the model object '<em><b>Periodic Com Send Proxy</b></em>'.
* <!-- end-user-doc -->
*
*
* @see jp.ac.nagoya_u.is.nces.a_rte.model.rte.interaction.InteractionPackage#getPeriodicComSendProxy()
* @model
* @generated
*/
public interface PeriodicComSendProxy extends ComSendProxy {
} // PeriodicComSendProxy
| [
"monaka@monami-ya.com"
] | monaka@monami-ya.com |
c2cde230b1d8596c62cebcaba5d8879babf79c21 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/14/14_a2bc3208f52264ed0a952d8a3ebf9287f7a51ffc/SelectionActivity/14_a2bc3208f52264ed0a952d8a3ebf9287f7a51ffc_SelectionActivity_t.java | 823d53642f13c2131a509b62d7368f2005ad47fa | [] | no_license | zhongxingyu/Seer | 48e7e5197624d7afa94d23f849f8ea2075bcaec0 | c11a3109fdfca9be337e509ecb2c085b60076213 | refs/heads/master | 2023-07-06T12:48:55.516692 | 2023-06-22T07:55:56 | 2023-06-22T07:55:56 | 259,613,157 | 6 | 2 | null | 2023-06-22T07:55:57 | 2020-04-28T11:07:49 | null | UTF-8 | Java | false | false | 6,493 | java |
package de.greencity.bladenightapp.android.selection;
import android.content.BroadcastReceiver;
import android.content.ComponentName;
import android.content.Context;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.view.ViewPager;
import android.util.Log;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TextView;
import com.google.gson.Gson;
import de.greencity.bladenightapp.android.R;
import de.greencity.bladenightapp.android.map.BladenightMapActivity;
import de.greencity.bladenightapp.android.network.Actions;
import de.greencity.bladenightapp.android.network.NetworkService;
import de.greencity.bladenightapp.android.options.OptionsActivity;
import de.greencity.bladenightapp.android.social.SocialActivity;
import de.greencity.bladenightapp.android.statistics.StatisticsActivity;
import de.greencity.bladenightapp.android.utils.BroadcastReceiversRegister;
import de.greencity.bladenightapp.network.messages.EventsListMessage;
public class SelectionActivity extends FragmentActivity {
private MyAdapter mAdapter;
private ViewPager mPager;
private final String TAG = "SelectionActivity";
private ServiceConnection serviceConnection;
private BroadcastReceiversRegister broadcastReceiversRegister = new BroadcastReceiversRegister(this);
@Override
public void onCreate(Bundle savedInstanceState) {
Log.i(TAG, "onCreate");
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_CUSTOM_TITLE);
setContentView(R.layout.activity_selection);
getWindow().setFeatureInt(Window.FEATURE_CUSTOM_TITLE, R.layout.titlebar);
ImageView titlebar = (ImageView)findViewById(R.id.icon);
titlebar.setImageResource(R.drawable.ic_calendar);
TextView titletext = (TextView)findViewById(R.id.title);
titletext.setText(R.string.title_selection);
// mAdapter = new MyAdapter(getSupportFragmentManager(), );
mPager = (ViewPager) findViewById(R.id.pager);
// mPager.setAdapter(mAdapter);
}
@Override
protected void onStart() {
Log.i(TAG, "onStart");
super.onStart();
broadcastReceiversRegister.registerReceiver(Actions.GOT_ALL_EVENTS, gotAllEventsReceiver);
broadcastReceiversRegister.registerReceiver(Actions.CONNECTED, connectedReceiver);
serviceConnection = new ServiceConnection() {
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
Log.i(TAG+".ServiceConnection", "onServiceConnected");
sendBroadcast(new Intent(Actions.GET_ALL_EVENTS));
}
@Override
public void onServiceDisconnected(ComponentName name) {
Log.i(TAG+".ServiceConnection", "onServiceDisconnected");
}
};
bindService(new Intent(this, NetworkService.class), serviceConnection, BIND_AUTO_CREATE);
}
@Override
protected void onStop() {
Log.i(TAG, "onStop");
super.onStop();
broadcastReceiversRegister.unregisterReceivers();
unbindService(serviceConnection);
}
@Override
protected void onResume() {
super.onResume();
}
@Override
protected void onPause() {
super.onPause();
}
// Will be called via the onClick attribute
// of the buttons in main.xml
public void onClick(View view) {
switch (view.getId()) {
case R.id.group_top:
System.out.println(view.getTag());
if(view.getTag().equals("old")){
goStatistics();
}
else if(view.getTag().equals("upcoming")){
goAction();
}
break;
case R.id.options: goOptions();
break;
case R.id.social: goSocial();
break;
}
}
private void goStatistics(){
Intent intent = new Intent(SelectionActivity.this, StatisticsActivity.class);
startActivity(intent);
}
private void goAction(){
Intent intent = new Intent(SelectionActivity.this, BladenightMapActivity.class);
startActivity(intent);
}
private void goSocial(){
Intent intent = new Intent(SelectionActivity.this, SocialActivity.class);
startActivity(intent);
}
private void goOptions(){
Intent intent = new Intent(SelectionActivity.this, OptionsActivity.class);
startActivity(intent);
}
private final BroadcastReceiver gotAllEventsReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.d(TAG,"getAllEventsReceiver.onReceive");
Log.d(TAG,"getAllEventsReceiver.onReceive " + intent);
Log.d(TAG,"getAllEventsReceiver.onReceive " + intent.getExtras());
String json = (String) intent.getExtras().get("json");
if ( json == null ) {
Log.e(TAG,"Failed to get json");
return;
}
Log.d(TAG, json);
EventsListMessage eventsListMessage = new Gson().fromJson(json, EventsListMessage.class);
if ( eventsListMessage == null ) {
Log.e(TAG,"Failed to parse json");
return;
}
mAdapter = new MyAdapter(getSupportFragmentManager(), eventsListMessage);
mPager.setAdapter(mAdapter);
// mAdapter.notifyDataSetChanged();
}
};
private final BroadcastReceiver connectedReceiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.d(TAG,"getAllEventsReceiver.onReceive");
sendBroadcast(new Intent(Actions.GET_ALL_EVENTS));
}
};
public static class MyAdapter extends FragmentPagerAdapter {
@SuppressWarnings("unused")
final private String TAG = "SelectionActivity.MyAdapter";
public EventsListMessage eventsListMessage;
public MyAdapter(FragmentManager fm, EventsListMessage eventsListMessage) {
super(fm);
this.eventsListMessage = eventsListMessage;
}
@Override
public int getCount() {
// Log.d(TAG, "getCount");
return eventsListMessage.size();
}
@Override
public int getItemPosition(Object object) {
// Log.d(TAG, "getItemPosition");
return POSITION_NONE;
}
@Override
public Fragment getItem(int position) {
// Log.d(TAG, "getItem("+position+")");
boolean hasRight = position < getCount()-1;
boolean hasLeft = position > 0;
Fragment fragment = new EventFragment(eventsListMessage.get(position), hasLeft, hasRight);
return fragment;
}
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
9d5c5c518110de5d44aa766fed1ba5477f3a343d | 9484b60a9f1665505a6dd44f7682632a85601ab0 | /lamp-tenant/lamp-tenant-biz/src/main/java/top/tangyh/lamp/tenant/strategy/impl/SchemaInitSystemStrategy.java | de8e5292906dba80eb6d061e689d900860f752e9 | [
"Apache-2.0"
] | permissive | soon14/zuihou-admin-cloud | 9c94dfa0864a565d53fb4b5849a08eb6c2150568 | 403f5fcf0d439ae2796efe10d6a8f9c1635af204 | refs/heads/master | 2022-10-18T07:11:25.337950 | 2022-09-13T00:37:19 | 2022-09-13T00:37:19 | 233,331,880 | 0 | 0 | Apache-2.0 | 2022-09-27T09:29:03 | 2020-01-12T03:20:51 | null | UTF-8 | Java | false | false | 6,247 | java | package top.tangyh.lamp.tenant.strategy.impl;
import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.DbType;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.io.Resources;
import org.apache.ibatis.jdbc.ScriptRunner;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import top.tangyh.basic.database.properties.DatabaseProperties;
import top.tangyh.basic.exception.BizException;
import top.tangyh.basic.utils.DbPlusUtil;
import top.tangyh.basic.utils.StrPool;
import top.tangyh.lamp.tenant.dao.InitDbMapper;
import top.tangyh.lamp.tenant.dto.TenantConnectDTO;
import top.tangyh.lamp.tenant.strategy.InitSystemStrategy;
import javax.sql.DataSource;
import java.io.BufferedReader;
import java.io.Reader;
import java.io.StringReader;
import java.nio.charset.StandardCharsets;
import java.sql.Connection;
import java.util.List;
/**
* 初始化系统
* <p>
* 初始化规则:
* 表结构: lamp-tenant-server/src/main/resources/schema/{数据库类型}/{数据库前缀}.sql
* 租户初始数据: lamp-tenant-server/src/main/resources/data/{数据库类型}/{数据库前缀}.sql
* <p>
* 不支持ORACLE!
*
* @author zuihou
* @date 2019/10/25
*/
@Service("SCHEMA")
@Slf4j
@RequiredArgsConstructor
public class SchemaInitSystemStrategy implements InitSystemStrategy {
/**
* 需要初始化的sql文件在classpath中的路径
*/
private static final String SCHEMA_PATH = "schema/{}/{}.sql";
private static final String DATA_PATH = "data/{}/{}.sql";
private static final String LINE_SEPARATOR = System.lineSeparator();
private final DataSource dataSource;
private final InitDbMapper initDbMapper;
private final DatabaseProperties databaseProperties;
private String getDefDatabase() {
return DbPlusUtil.getDatabase(dataSource);
}
@Override
@Transactional(rollbackFor = Exception.class)
public boolean initConnect(TenantConnectDTO tenantConnect) {
String tenant = tenantConnect.getTenant();
this.initDatabase(tenant);
ScriptRunner runner = this.getScriptRunner();
this.initSchema(runner, tenant);
this.initData(runner, tenant);
// 切换为默认数据源
this.resetDatabase(runner);
return true;
}
@Override
public boolean reset(String tenant) {
ScriptRunner runner = this.getScriptRunner();
this.initSchema(runner, tenant);
this.initData(runner, tenant);
// 切换为默认数据源
this.resetDatabase(runner);
return true;
}
public void initDatabase(String tenant) {
databaseProperties.getInitDatabasePrefix().forEach(database -> this.initDbMapper.createDatabase(StrUtil.join(StrUtil.UNDERLINE, database, tenant)));
}
public void initSchema(ScriptRunner runner, String tenant) {
runScript(runner, tenant, SCHEMA_PATH);
}
/**
* 角色表
* 菜单表
* 资源表
*
* @param tenant 租户编码
*/
public void initData(ScriptRunner runner, String tenant) {
runScript(runner, tenant, DATA_PATH);
}
private void runScript(ScriptRunner runner, String tenant, String path) {
try {
for (String database : databaseProperties.getInitDatabasePrefix()) {
String useDb = StrUtil.format("use {};", StrUtil.join(StrUtil.UNDERLINE, database, tenant));
StringBuilder script = new StringBuilder();
script.append(useDb);
script.append(LINE_SEPARATOR);
Reader reader = Resources.getResourceAsReader(StrUtil.format(path, getDbType().getDb(), database));
BufferedReader lineReader = new BufferedReader(reader);
String line;
while ((line = lineReader.readLine()) != null) {
script.append(line);
script.append(LINE_SEPARATOR);
}
runner.runScript(new StringReader(script.toString()));
}
} catch (Exception e) {
log.error("初始化数据失败", e);
throw new BizException("初始化数据失败", e);
}
}
private DbType getDbType() {
return DbPlusUtil.getDbType(dataSource);
}
public void resetDatabase(ScriptRunner runner) {
try {
runner.runScript(new StringReader(StrUtil.format("use {};", getDefDatabase())));
} catch (Exception e) {
log.error("切换为默认数据源失败", e);
throw new BizException("切换为默认数据源失败", e);
}
}
@SuppressWarnings("AlibabaRemoveCommentedCode")
public ScriptRunner getScriptRunner() {
try {
Connection connection = this.dataSource.getConnection();
ScriptRunner runner = new ScriptRunner(connection);
runner.setAutoCommit(false);
//遇见错误是否停止
runner.setStopOnError(true);
/*
* 按照那种方式执行 方式一:true则获取整个脚本并执行; 方式二:false则按照自定义的分隔符每行执行;
*/
runner.setSendFullScript(true);
// 设置是否输出日志,null不输出日志,不设置自动将日志输出到控制台
// runner.setLogWriter(null);
Resources.setCharset(StandardCharsets.UTF_8);
// 设置分隔符
// runner.setDelimiter(databaseProperties.getDelimiter());
runner.setFullLineDelimiter(false);
return runner;
} catch (Exception ex) {
throw new BizException("获取连接失败", ex);
}
}
@Override
public boolean delete(List<Long> ids, List<String> tenantCodeList) {
if (tenantCodeList.isEmpty()) {
return true;
}
databaseProperties.getInitDatabasePrefix().forEach(prefix -> tenantCodeList.forEach(tenant -> {
String database = prefix + StrPool.UNDERSCORE + tenant;
initDbMapper.dropDatabase(database);
}));
return true;
}
}
| [
"244387066@qq.com"
] | 244387066@qq.com |
396cff4f8f0a44f7d39182ab468d4ba36bfe7200 | 3c4425d520faeaa78a24ade0673da6cff431671e | /后台调试版/src/main/java/lottery/domains/content/dao/impl/UserDividendBillDaoImpl.java | 607e50f8eb037b172cbd399713ce73c294b2d406 | [] | no_license | yuruyigit/lotteryServer | de5cc848b9c7967817a33629efef4e77366b74c0 | 2cc97c54a51b9d76df145a98d72d3fe097bdd6af | refs/heads/master | 2020-06-17T03:39:24.838151 | 2019-05-25T11:32:00 | 2019-05-25T11:32:00 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,905 | java | package lottery.domains.content.dao.impl;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javautils.jdbc.PageList;
import javautils.jdbc.hibernate.HibernateSuperDao;
import lottery.domains.content.dao.UserDividendBillDao;
import lottery.domains.content.entity.UserDividendBill;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.hibernate.criterion.Criterion;
import org.hibernate.criterion.Order;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class UserDividendBillDaoImpl
implements UserDividendBillDao
{
private final String tab = UserDividendBill.class.getSimpleName();
@Autowired
private HibernateSuperDao<UserDividendBill> superDao;
public PageList search(List<Criterion> criterions, List<Order> orders, int start, int limit)
{
String propertyName = "id";
return this.superDao.findPageList(UserDividendBill.class, propertyName, criterions, orders, start, limit);
}
public double[] sumUserAmount(List<Integer> userIds, String sTime, String eTime, Double minUserAmount, Double maxUserAmount)
{
String hql = "select sum(case when issueType = 1 and status in (1,2,3,6) and totalLoss < 0 then totalLoss else 0 end), sum(case when issueType = 1 and status in (1,2,3,6) then calAmount else 0 end),sum(case when issueType = 2 and status in (1,2,3,6,7) then calAmount else 0 end) from " + this.tab + " where 1=1";
Map<String, Object> params = new HashMap();
if (CollectionUtils.isNotEmpty(userIds))
{
hql = hql + " and userId in :userId";
params.put("userId", userIds);
}
if (StringUtils.isNotEmpty(sTime))
{
hql = hql + " and indicateStartDate >= :sTime";
params.put("sTime", sTime);
}
if (StringUtils.isNotEmpty(eTime))
{
hql = hql + " and indicateEndDate <= :eTime";
params.put("eTime", eTime);
}
if (minUserAmount != null)
{
hql = hql + " and userAmount >= :minUserAmount";
params.put("minUserAmount", minUserAmount);
}
if (maxUserAmount != null)
{
hql = hql + " and userAmount <= :maxUserAmount";
params.put("maxUserAmount", maxUserAmount);
}
Object result = this.superDao.uniqueWithParams(hql, params);
if (result == null) {
return new double[] { 0.0D, 0.0D };
}
Object[] results = (Object[])result;
int index = 0;
double totalLoss = results[index] == null ? 0.0D : ((Double)results[index]).doubleValue();index++;
double platformTotalUserAmount = results[index] == null ? 0.0D : ((Double)results[index]).doubleValue();index++;
double upperTotalUserAmount = results[index] == null ? 0.0D : ((Double)results[index]).doubleValue();index++;
return new double[] { totalLoss, platformTotalUserAmount, upperTotalUserAmount };
}
public List<UserDividendBill> findByCriteria(List<Criterion> criterions, List<Order> orders)
{
return this.superDao.findByCriteria(UserDividendBill.class, criterions, orders);
}
public boolean updateAllExpire()
{
String hql = "update " + this.tab + " set status = 8 where status in (3, 6, 7)";
Object[] values = new Object[0];
return this.superDao.update(hql, values);
}
public UserDividendBill getById(int id)
{
String hql = "from " + this.tab + " where id = ?0";
Object[] values = { Integer.valueOf(id) };
return (UserDividendBill)this.superDao.unique(hql, values);
}
public UserDividendBill getByUserId(int userId, String indicateStartDate, String indicateEndDate)
{
String hql = "from " + this.tab + " where userId = ?0 and indicateStartDate = ?1 and indicateEndDate = ?2";
Object[] values = { Integer.valueOf(userId), indicateStartDate, indicateEndDate };
return (UserDividendBill)this.superDao.unique(hql, values);
}
public boolean add(UserDividendBill dividendBill)
{
return this.superDao.save(dividendBill);
}
public boolean addAvailableMoney(int id, double money)
{
String hql = "update " + this.tab + " set availableAmount = availableAmount+?1 where id = ?0";
Object[] values = { Integer.valueOf(id), Double.valueOf(money) };
return this.superDao.update(hql, values);
}
public boolean addUserAmount(int id, double money)
{
String hql = "update " + this.tab + " set userAmount = userAmount+?1 where id = ?0";
Object[] values = { Integer.valueOf(id), Double.valueOf(money) };
return this.superDao.update(hql, values);
}
public boolean setAvailableMoney(int id, double money)
{
String hql = "update " + this.tab + " set availableAmount = ?1 where id = ?0";
Object[] values = { Integer.valueOf(id), Double.valueOf(money) };
return this.superDao.update(hql, values);
}
public boolean addTotalReceived(int id, double money)
{
String hql = "update " + this.tab + " set totalReceived = totalReceived+?1 where id = ?0";
Object[] values = { Integer.valueOf(id), Double.valueOf(money) };
return this.superDao.update(hql, values);
}
public boolean addLowerPaidAmount(int id, double money)
{
String hql = "update " + this.tab + " set lowerPaidAmount = lowerPaidAmount+?1 where id = ?0";
Object[] values = { Integer.valueOf(id), Double.valueOf(money) };
return this.superDao.update(hql, values);
}
public boolean update(UserDividendBill dividendBill)
{
return this.superDao.update(dividendBill);
}
public boolean update(int id, int status, String remarks)
{
String hql = "update " + this.tab + " set status = ?1, remarks = ?2 where id = ?0";
Object[] values = { Integer.valueOf(id), Integer.valueOf(status), remarks };
return this.superDao.update(hql, values);
}
public boolean update(int id, int status, double availableAmount, String remarks)
{
String hql = "update " + this.tab + " set status = ?1, availableAmount = ?2, remarks = ?3 where id = ?0";
Object[] values = { Integer.valueOf(id), Integer.valueOf(status), Double.valueOf(availableAmount), remarks };
return this.superDao.update(hql, values);
}
public boolean del(int id)
{
String hql = "delete from " + this.tab + " where id = ?0";
Object[] values = { Integer.valueOf(id) };
return this.superDao.delete(hql, values);
}
public boolean updateStatus(int id, int status)
{
String hql = "update " + this.tab + " set status = ?1 where id = ?0";
Object[] values = { Integer.valueOf(id), Integer.valueOf(status) };
return this.superDao.update(hql, values);
}
public boolean updateStatus(int id, int status, String remarks)
{
String hql = "update " + this.tab + " set status = ?1, remarks = ?2 where id = ?0";
Object[] values = { Integer.valueOf(id), Integer.valueOf(status), remarks };
return this.superDao.update(hql, values);
}
}
| [
"nengbowan@163.com"
] | nengbowan@163.com |
51045a9f4739c70b328a1096a0fead4cf58b6dd0 | 18ecbf7653c8d762fe343fa26d6c44408620c7ea | /c-bbs/src/main/java/com/redmoon/forum/plugin/flower/FlowerViewAddReply.java | cd430edeabac0fd23a8d40928444ec3f984d07a0 | [] | no_license | cloudwebsoft/ywoa | 7ef667de489006a71f697f962a0bac2aa1eec57d | 9aee0a5a206e8f5448ba70e14ec429470ba524d7 | refs/heads/oa_git6.0 | 2022-07-28T21:17:06.523669 | 2021-07-15T00:16:12 | 2021-07-15T00:16:12 | 181,577,992 | 33 | 10 | null | 2021-06-15T13:44:46 | 2019-04-15T23:07:47 | Java | UTF-8 | Java | false | false | 1,799 | java | package com.redmoon.forum.plugin.flower;
import javax.servlet.http.HttpServletRequest;
import com.redmoon.forum.plugin.base.IPluginViewAddReply;
import com.redmoon.forum.plugin.base.UIAddReply;
import org.apache.log4j.Logger;
import com.redmoon.forum.plugin.BoardDb;
public class FlowerViewAddReply implements IPluginViewAddReply {
HttpServletRequest request;
long msgRootId;
Logger logger = Logger.getLogger(this.getClass().getName());
public FlowerViewAddReply(HttpServletRequest request, String boardCode, long msgRootId) {
this.request = request;
this.boardCode = boardCode;
this.msgRootId = msgRootId;
init();
}
public String render(int position) {
String str = "";
switch (position) {
case UIAddReply.POS_FORM_NOTE:
str = getFormNote();
break;
case UIAddReply.POS_FORM_ELEMENT:
str = getFormElement();
break;
default:
}
return str;
}
public void setBoardCode(String boardCode) {
this.boardCode = boardCode;
}
public void setFormNote(String formNote) {
this.formNote = formNote;
}
public void setFormElement(String formElement) {
this.formElement = formElement;
}
public String getBoardCode() {
return boardCode;
}
public boolean IsPluginBoard() {
BoardDb sb = new BoardDb();
return sb.isPluginBoard(FlowerUnit.code, boardCode);
}
public String getFormElement() {
return formElement;
}
public void init() {
formElement = "";
}
public String getFormNote() {
return formNote;
}
private String boardCode;
private String formNote = "";
private String formElement = "";
}
| [
"bestfeng@163.com"
] | bestfeng@163.com |
d9197fdbc3d5f5c51a68c616b699fc53396af0f6 | 184907d3b2e40564deb5082d73e2653912101f76 | /ezyfox-server-nio/src/main/java/com/tvd12/ezyfoxserver/nio/handler/EzySimpleNioHandlerGroup.java | e1658f95d183131cc7ae9e8e7c7882d2266a244b | [
"Apache-2.0"
] | permissive | erharut/ezyfox-server | fa3bcc8300218c48c180c92dfba7448280c2e155 | 496a679e8b9028be85811fd65a74da8526f63dee | refs/heads/master | 2021-08-16T09:00:46.025110 | 2017-11-19T13:21:52 | 2017-11-19T13:21:52 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,163 | java | package com.tvd12.ezyfoxserver.nio.handler;
import com.tvd12.ezyfoxserver.callback.EzyCallback;
import com.tvd12.ezyfoxserver.codec.EzyMessage;
public class EzySimpleNioHandlerGroup
extends EzyAbstractHandlerGroup<EzyNioDataDecoder, EzyNioDataEncoder>
implements EzyNioHandlerGroup {
private final EzyCallback<EzyMessage> decodeBytesCallback;
public EzySimpleNioHandlerGroup(Builder builder) {
super(builder);
this.decodeBytesCallback = this::executeHandleReceivedMessage;
}
@Override
protected EzyNioDataDecoder newDecoder(Object decoder) {
return new EzySimpleNioDataDecoder((EzyNioByteToObjectDecoder)decoder);
}
@Override
protected EzyNioDataEncoder newEncoder(Object encoder) {
return new EzySimpleNioDataEncoder((EzyNioObjectToByteEncoder)encoder);
}
@Override
protected Object encodeData(Object data) throws Exception {
return encoder.encode(data);
}
@Override
public void fireBytesReceived(byte[] bytes) throws Exception {
handleReceivedBytes(bytes);
executeAddReadBytes(bytes.length);
}
private synchronized void handleReceivedBytes(byte[] bytes) {
try {
decoder.decode(bytes, decodeBytesCallback);
}
catch(Exception throwable) {
fireExceptionCaught(throwable);
}
}
private void executeHandleReceivedMessage(EzyMessage message) {
codecThreadPool.execute(() -> handleReceivedMesssage(message));
}
private void handleReceivedMesssage(EzyMessage message) {
Object data = decodeMessage(message);
handlerThreadPool.execute(() -> handleReceivedData(data));
}
private Object decodeMessage(EzyMessage message) {
try {
return decoder.decode(message);
}
catch(Exception e) {
getLogger().error("decode message error", e);
return null;
}
}
private void handleReceivedData(Object data) {
try {
handler.channelRead(data);
} catch (Exception e) {
getLogger().error("handle data error, data: " + data, e);
}
}
public static Builder builder() {
return new Builder();
}
public static class Builder extends EzyAbstractHandlerGroup.Builder {
@Override
public EzyNioHandlerGroup build() {
return new EzySimpleNioHandlerGroup(this);
}
}
}
| [
"itprono3@gmail.com"
] | itprono3@gmail.com |
75f31728848de8d6910d3a1a691364c8ca708dd4 | c547b82dde6124ab3ac0a57c2fe12177c2bda0ec | /plugins/org.fusesource.ide.jvmmonitor.core/src/org/fusesource/ide/jvmmonitor/internal/core/AbstractJvm.java | f80c231ad3ead02d5696574194860b6d3a7fc72c | [] | no_license | paulorcf/fuseide | 34fbe73845426b08d3812a57bc700054b65966f6 | fe1d2f274658e0cbd956362a4dc0783b13901c71 | refs/heads/master | 2020-04-05T18:55:49.841156 | 2013-11-13T10:15:04 | 2013-11-13T10:15:04 | 14,440,023 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 7,141 | java | /*******************************************************************************
* Copyright (c) 2010 JVM Monitor project. All rights reserved.
*
* This code is distributed under the terms of the Eclipse Public License v1.0
* which is available at http://www.eclipse.org/legal/epl-v10.html
*******************************************************************************/
package org.fusesource.ide.jvmmonitor.internal.core;
import java.io.File;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.osgi.util.NLS;
import org.fusesource.ide.jvmmonitor.core.Activator;
import org.fusesource.ide.jvmmonitor.core.IHost;
import org.fusesource.ide.jvmmonitor.core.IJvm;
import org.fusesource.ide.jvmmonitor.core.ISnapshot;
import org.fusesource.ide.jvmmonitor.core.JvmCoreException;
import org.fusesource.ide.jvmmonitor.core.JvmModel;
import org.fusesource.ide.jvmmonitor.core.JvmModelEvent;
import org.fusesource.ide.jvmmonitor.core.JvmModelEvent.State;
/**
* The JVM.
*/
abstract public class AbstractJvm implements IJvm {
/** The process ID. */
private int pid;
/** The port. */
private int port;
/** The user name. */
private String userName;
/** The password. */
private String password;
/** The main class. */
private String mainClass;
/** The host. */
private IHost host;
/** The snapshots. */
protected List<ISnapshot> snapshots;
/**
* The constructor.
*
* @param pid
* The process ID
* @param port
* The port
* @param userName
* The user name
* @param password
* The password
* @param host
* The host
*/
public AbstractJvm(int pid, int port, String userName, String password,
IHost host) {
this.pid = pid;
this.port = port;
this.userName = userName;
this.password = password;
this.host = host;
if (pid != -1) {
refreshSnapshots();
}
}
/**
* The constructor.
*
* @param pid
* The process ID
* @param host
* The host
*/
public AbstractJvm(int pid, IHost host) {
this(pid, -1, null, null, host);
}
/**
* The constructor.
*
* @param port
* The port
* @param userName
* The user name
* @param password
* The password
* @param host
* The host
*/
public AbstractJvm(int port, String userName, String password, IHost host) {
this(-1, port, userName, password, host);
}
/**
* The constructor.
*
* @param userName
* The user name
* @param password
* The password
*/
public AbstractJvm(String userName, String password) {
this(-1, -1, userName, password, null);
}
/*
* @see IJvm#getProcessId()
*/
@Override
public int getPid() {
return pid;
}
/*
* @see IJvm#getPort()
*/
@Override
public int getPort() {
return port;
}
/*
* @see IJvm#getMainClass()
*/
@Override
public String getMainClass() {
if (mainClass == null) {
return ""; //$NON-NLS-1$
}
return mainClass;
}
/*
* @see IJvm#getHost()
*/
@Override
public IHost getHost() {
return host;
}
/*
* @see IJvm#getShapshots()
*/
@Override
public List<ISnapshot> getShapshots() {
return snapshots;
}
/*
* @see IJvm#deleteSnapshot(ISnapshot)
*/
@Override
public void deleteSnapshot(ISnapshot snapshot) {
snapshots.remove(snapshot);
try {
snapshot.getFileStore().delete(EFS.NONE, null);
} catch (CoreException e) {
Activator.log(IStatus.ERROR, NLS.bind(Messages.deleteFileFailedMsg,
snapshot.getFileStore().getName()), e);
}
JvmModel.getInstance().fireJvmModelChangeEvent(
new JvmModelEvent(State.ShapshotRemoved, this));
}
/**
* Adds the given snapshot to JVM.
*
* @param snapshot
* The snapshot
*/
public void addSnapshot(ISnapshot snapshot) {
snapshots.add(snapshot);
}
/**
* Gets the base directory.
*
* @return The base directory
* @throws JvmCoreException
*/
public IPath getBaseDirectory() throws JvmCoreException {
IPath stateLocation = Activator.getDefault().getStateLocation();
IPath dirPath = stateLocation.append(File.separator + host.getName()
+ Host.DIR_SUFFIX + File.separator + pid + IJvm.DIR_SUFFIX);
if (!dirPath.toFile().exists() && !dirPath.toFile().mkdir()) {
throw new JvmCoreException(IStatus.ERROR, NLS.bind(
Messages.createDirectoryFailedMsg, dirPath.toFile()
.getName()), null);
}
return dirPath;
}
/**
* Gets the user name.
*
* @return The user name
*/
protected String getUserName() {
return userName;
}
/**
* Gets the pass word.
*
* @return The password
*/
protected String getPassword() {
return password;
}
/**
* Sets the PID.
*
* @param pid
* The process ID
*/
protected void setPid(int pid) {
this.pid = pid;
}
/**
* Sets the main class.
*
* @param mainClass
* The main class
*/
protected void setMainClass(String mainClass) {
this.mainClass = mainClass;
}
/**
* Sets the host.
*
* @param host
* The host
*/
protected void setHost(IHost host) {
this.host = host;
}
/**
* Refreshes the snapshots.
*/
protected void refreshSnapshots() {
snapshots = new ArrayList<ISnapshot>();
IPath baseDirectory;
try {
baseDirectory = getBaseDirectory();
} catch (JvmCoreException e) {
// do nothing
return;
}
File[] files = baseDirectory.toFile().listFiles();
if (files == null) {
return;
}
for (File file : files) {
String fileName = file.getName();
if (Snapshot.isValidFile(fileName)) {
Snapshot snapshot = new Snapshot(Util.getFileStore(fileName,
baseDirectory), this);
snapshots.add(snapshot);
}
}
}
}
| [
"james.strachan@gmail.com"
] | james.strachan@gmail.com |
1815e5969c3bc33eb18588b3615460f40e1f0f50 | 6eb9945622c34e32a9bb4e5cd09f32e6b826f9d3 | /src/com/inponsel/android/rsstab/RSSInteraksiActivity$KomentarAsycAfterTask$4$1.java | 85fffee8605ba0184084448512f1ab3454d9bb12 | [] | no_license | alexivaner/GadgetX-Android-App | 6d700ba379d0159de4dddec4d8f7f9ce2318c5cc | 26c5866be12da7b89447814c05708636483bf366 | refs/heads/master | 2022-06-01T09:04:32.347786 | 2020-04-30T17:43:17 | 2020-04-30T17:43:17 | 260,275,241 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 6,071 | java | // Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: braces fieldsfirst space lnc
package com.inponsel.android.rsstab;
import android.content.DialogInterface;
import android.content.Intent;
import android.os.AsyncTask;
import android.view.View;
import com.inponsel.android.utils.Log;
import com.inponsel.android.utils.UserFunctions;
import com.inponsel.android.v2.LoginActivity;
import com.inponsel.android.v2.RegisterActivity;
// Referenced classes of package com.inponsel.android.rsstab:
// RSSInteraksiActivity
class this._cls2
implements android.content.terTask._cls4._cls1
{
final this._cls2 this$2;
public void onClick(DialogInterface dialoginterface, int i)
{
dialoginterface.dismiss();
}
l.tl_id()
{
this$2 = this._cls2.this;
super();
}
// Unreferenced inner class com/inponsel/android/rsstab/RSSInteraksiActivity$KomentarAsycAfterTask$4
/* anonymous class */
class RSSInteraksiActivity.KomentarAsycAfterTask._cls4
implements android.view.View.OnClickListener
{
final RSSInteraksiActivity.KomentarAsycAfterTask this$1;
private final String val$id_komrss;
private final String val$tl_id;
public void onClick(View view)
{
if (RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).userFunctions.isUserLoggedIn(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this)))
{
RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).statuslike = "0";
RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).idkom_pos = id_komrss;
RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).querylike = (new StringBuilder("status=")).append(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).statuslike).append("&id_kom=").append(id_komrss).append("&tl_id=").append(tl_id).append("&id_usr=").append(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).user_id).append("&t=").append(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).t).toString();
Log.e("querylike", RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this).querylike);
if (android.os.Build.VERSION.SDK_INT >= 11)
{
(new RSSInteraksiActivity.PostBagusKurangTask(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this))).executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR, new Void[0]);
return;
} else
{
(new RSSInteraksiActivity.PostBagusKurangTask(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this))).execute(new Void[0]);
return;
}
} else
{
view = new android.app.AlertDialog.Builder(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(RSSInteraksiActivity.KomentarAsycAfterTask.this));
view.setMessage("Untuk memberi penilaian harus login terlebih dahulu.");
view.setPositiveButton("Tutup", new RSSInteraksiActivity.KomentarAsycAfterTask._cls4._cls1());
view.setNeutralButton("Register", new RSSInteraksiActivity.KomentarAsycAfterTask._cls4._cls2());
view.setNegativeButton("Login", new RSSInteraksiActivity.KomentarAsycAfterTask._cls4._cls3());
view.show();
return;
}
}
{
this$1 = final_komentarasycaftertask;
id_komrss = s;
tl_id = String.this;
super();
}
// Unreferenced inner class com/inponsel/android/rsstab/RSSInteraksiActivity$KomentarAsycAfterTask$4$2
/* anonymous class */
class RSSInteraksiActivity.KomentarAsycAfterTask._cls4._cls2
implements android.content.DialogInterface.OnClickListener
{
final RSSInteraksiActivity.KomentarAsycAfterTask._cls4 this$2;
public void onClick(DialogInterface dialoginterface, int i)
{
dialoginterface = new Intent(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(this$1), com/inponsel/android/v2/RegisterActivity);
RSSInteraksiActivity.KomentarAsycAfterTask.access$2(this$1).startActivity(dialoginterface);
}
{
this$2 = RSSInteraksiActivity.KomentarAsycAfterTask._cls4.this;
super();
}
}
// Unreferenced inner class com/inponsel/android/rsstab/RSSInteraksiActivity$KomentarAsycAfterTask$4$3
/* anonymous class */
class RSSInteraksiActivity.KomentarAsycAfterTask._cls4._cls3
implements android.content.DialogInterface.OnClickListener
{
final RSSInteraksiActivity.KomentarAsycAfterTask._cls4 this$2;
public void onClick(DialogInterface dialoginterface, int i)
{
dialoginterface = new Intent(RSSInteraksiActivity.KomentarAsycAfterTask.access$2(this$1), com/inponsel/android/v2/LoginActivity);
dialoginterface.putExtra("activity", "main");
RSSInteraksiActivity.KomentarAsycAfterTask.access$2(this$1).startActivity(dialoginterface);
}
{
this$2 = RSSInteraksiActivity.KomentarAsycAfterTask._cls4.this;
super();
}
}
}
}
| [
"hutomoivan@gmail.com"
] | hutomoivan@gmail.com |
879de2a89fe651d69147c708f4f16de3ec4f7d59 | 8d7c7d45f535f15936d1b22b48e1f64a5bfd1779 | /lesson-42-spring-boot-jpa/src/main/java/app/core/entities/Student.java | c3c556a4dfef978ccea6df5d4751c17f2696693a | [] | no_license | roncohen15/822-126 | 4b1a44416ea61a90979d26712851b4979541bc18 | 05aa777ed5bcb4754614a7e934b0ef68fe0bfc0b | refs/heads/master | 2023-04-02T23:24:08.278172 | 2021-04-05T10:26:10 | 2021-04-05T10:26:10 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,230 | java | package app.core.entities;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
@Entity
public class Student {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String name;
private String email;
@Enumerated(EnumType.STRING)
private Gender gender;
public enum Gender {
M, F;
}
public Student() {
}
public Student(String name, String email, Gender gender) {
super();
this.name = name;
this.email = email;
this.gender = gender;
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getEmail() {
return email;
}
public void setEmail(String email) {
this.email = email;
}
public Gender getGender() {
return gender;
}
public void setGender(Gender gender) {
this.gender = gender;
}
@Override
public String toString() {
return "Student [id=" + id + ", name=" + name + ", email=" + email + ", gender=" + gender + "]";
}
}
| [
"eldarba@gmail.com"
] | eldarba@gmail.com |
1be250bc6c47c7891e1e88408b2d4ce304ce5d49 | 71975999c9d702a0883ec9038ce3e76325928549 | /src2.4.0/src/main/java/com/sina/weibo/sdk/utils/MD5.java | 1c12e3e0c8e790202d342b4fa127a3df58eaacbd | [] | no_license | XposedRunner/PhysicalFitnessRunner | dc64179551ccd219979a6f8b9fe0614c29cd61de | cb037e59416d6c290debbed5ed84c956e705e738 | refs/heads/master | 2020-07-15T18:18:23.001280 | 2019-09-02T04:21:34 | 2019-09-02T04:21:34 | 205,620,387 | 3 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,285 | java | package com.sina.weibo.sdk.utils;
import java.security.MessageDigest;
public class MD5 {
private static final char[] hexDigits = new char[]{'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
public static String hexdigest(String str) {
try {
return hexdigest(str.getBytes());
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static String hexdigest(byte[] bArr) {
try {
MessageDigest instance = MessageDigest.getInstance("MD5");
instance.update(bArr);
bArr = instance.digest();
char[] cArr = new char[32];
int i = 0;
int i2 = 0;
while (i < 16) {
byte b = bArr[i];
int i3 = i2 + 1;
cArr[i2] = hexDigits[(b >>> 4) & 15];
i2 = i3 + 1;
cArr[i3] = hexDigits[b & 15];
i++;
}
return new String(cArr);
} catch (Exception e) {
e.printStackTrace();
return null;
}
}
public static void main(String[] strArr) {
System.out.println(hexdigest("c"));
}
}
| [
"xr_master@mail.com"
] | xr_master@mail.com |
3fb332ee34c943ab8c3744d5dfb78409c51c2454 | 378b0fd5e6069028178c143b771a77105aef8a2e | /book/RxJava리액티브프로그래밍/RxJava리액티브프로그래밍예제/src/main/java/chap04/sec02/ConcatMapEagerSample.java | 484d001b0973900d0e2811fb138d00255f842585 | [] | no_license | somyungsub/study-java | 75f66e3e0fc1104d9e721210adb334344dd95f78 | 21eebe90b7c276da7f03acb75bc879898c632787 | refs/heads/master | 2023-05-01T05:42:04.309887 | 2020-12-05T14:14:39 | 2020-12-05T14:14:39 | 172,334,093 | 3 | 0 | null | 2023-04-17T19:48:56 | 2019-02-24T12:20:58 | Java | UTF-8 | Java | false | false | 1,188 | java | package chap04_DP적용전략.sec02;
import java.util.concurrent.TimeUnit;
import chap04_DP적용전략.DebugSubscriber;
import io.reactivex.Flowable;
/** 예제 4-28 concatMapEager(mapper) 예제 */
public class ConcatMapEagerSample {
public static void main(String[] args) throws Exception {
Flowable<String> flowable = Flowable.range(10, 3)
// 받은 데이터로 Flowable을 생성하고 바로 실행하지만 통지는 순서대로 한다
.concatMapEager(
// 데이터를 통지할 Flowable을 생성한다
sourceData -> Flowable.interval(500L, TimeUnit.MILLISECONDS)
// 2건까지 통지한다
.take(2)
// 원본 통지 데이터와 이 Flowable의 데이터를 조합해 문자열을 만든다
.map(data -> {
// 통지 시 시스템 시각도 데이터에 추가한다
long time = System.currentTimeMillis();
return time + "ms: [" + sourceData + "] " + data;
}));
// 구독한다
flowable.subscribe(new DebugSubscriber<>());
// 잠시 기다린다
Thread.sleep(4000L);
}
}
| [
"gkdldy5@naver.com"
] | gkdldy5@naver.com |
8b3b06864e904285d49d5562a7f992bd686eaaa3 | 1050871cbcb9c3207f1c66dec5656c1339895de7 | /resource-manager/src/main/java/cn/bucheng/rm/remoting/RemotingClient.java | 3de09ee297c5cbf19658dc1487b9079f3f9212ab | [] | no_license | yinkaihuang/distributed-transaction | 57764ac2c61b481b9417edc11dd1bf75f69d0c22 | 8905877b70cabfe02d98bcf865f0005ae245e967 | refs/heads/master | 2022-06-23T23:41:21.018546 | 2019-09-19T13:15:43 | 2019-09-19T13:15:43 | 204,659,019 | 0 | 0 | null | 2022-06-21T01:45:50 | 2019-08-27T08:41:45 | Java | UTF-8 | Java | false | false | 1,364 | java | package cn.bucheng.rm.remoting;
import cn.bucheng.rm.remoting.exception.RemotingConnectException;
import cn.bucheng.rm.remoting.exception.RemotingSendRequestException;
import cn.bucheng.rm.remoting.exception.RemotingTimeoutException;
import cn.bucheng.rm.remoting.protocol.RemotingCommand;
import java.sql.SQLException;
public interface RemotingClient {
/**
* 启动,完成基本初始化工作
*/
void start();
/**
* 进行远程连接
*
* @param ip
* @param port
*/
void connect(String ip, int port);
/**
* 关闭,完成基本资源释放
*/
void shutdown();
/**
* 判断key对应的远程通道是否正常
*
* @return
*/
boolean channelActive();
/**
* 同步阻塞发送数据
*
* @param command
* @param timeoutMillis
* @return
* @throws InterruptedException
* @throws RemotingSendRequestException
* @throws RemotingTimeoutException
* @throws RemotingConnectException
*/
void invokeSync(final RemotingCommand command, final long timeoutMillis) throws InterruptedException, RemotingSendRequestException, RemotingTimeoutException, RemotingConnectException;
/**
* 处理消息
* @param command
*/
void handleRemotingCommand(RemotingCommand command) throws SQLException;
}
| [
"yin.chong@intellif.com"
] | yin.chong@intellif.com |
3e59ce167aedfbaff2877cfed0b512f83e042bd9 | 2ebc9528389faf1551574a8d6203cbe338a72221 | /zf/src/main/java/com/chinazhoufan/admin/modules/bus/dao/oe/ExperienceProduceDao.java | cb7dbe9aea32271a26330d243f765c595387ad4e | [
"Apache-2.0"
] | permissive | flypig5211/zf-admin | 237a7299a5dc65e33701df2aeca50fd4b2107e21 | dbf36f42e2d6a2f3162d4856e9daa8152ee1d56e | refs/heads/master | 2022-02-27T00:14:12.904808 | 2017-12-06T10:01:15 | 2017-12-06T10:01:15 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,152 | java | /**
* Copyright © 2012-2014 <a href="https://github.com/chinazhoufan/admin">JeeSite</a> All rights reserved.
*/
package com.chinazhoufan.admin.modules.bus.dao.oe;
import java.util.List;
import java.util.Map;
import com.chinazhoufan.admin.modules.bus.entity.oe.ExperienceOrder;
import org.apache.ibatis.annotations.Param;
import com.chinazhoufan.admin.common.persistence.CrudDao;
import com.chinazhoufan.admin.common.persistence.annotation.MyBatisDao;
import com.chinazhoufan.admin.modules.bus.entity.oe.ExperienceProduce;
/**
* 体验产品DAO接口
* @author 张金俊
* @version 2017-04-12
*/
@MyBatisDao
public interface ExperienceProduceDao extends CrudDao<ExperienceProduce> {
void updateByExperienceOrderAndProduce(Map<String, Object> map);
List<ExperienceProduce> getByExperienceOrder(@Param("experienceOrderId")String experienceOrderId);
List<ExperienceProduce> getByProduceId(@Param("produceId")String produceId);
void updateStatus(ExperienceProduce experienceProduce);
void updateBuyNumByExperienceOrderAndProduce(Map<String, Object> map);
void updateChangeNumByExperienceOrderAndProduce(Map<String, Object> map);
} | [
"646686483@qq.com"
] | 646686483@qq.com |
73f59a04ba9988af4e7bd00dfe42f5b0befc5139 | fa91450deb625cda070e82d5c31770be5ca1dec6 | /Diff-Raw-Data/15/15_c30e87d85b1635c4e5bca8f7fb8e26041c4fb5c7/FormRenderProperties/15_c30e87d85b1635c4e5bca8f7fb8e26041c4fb5c7_FormRenderProperties_t.java | 1995c3be37c8029ab7d1542e3c1298faa0fccec1 | [] | 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 | 1,331 | java | package ar.com.cuyum.cnc.utils;
import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;
import javax.annotation.PostConstruct;
import javax.enterprise.context.ApplicationScoped;
import org.apache.log4j.Logger;
import ar.com.cuyum.cnc.exceptions.TechnicalException;
@SuppressWarnings("serial")
@ApplicationScoped
public class FormRenderProperties extends Properties {
public static final String DEFAULT_FILE_NAME = "formrender.properties";
static Logger log = Logger.getLogger(FormRenderProperties.class);
@PostConstruct
protected void init() {
try {
InputStream is = this.getClass().getClassLoader()
.getResourceAsStream(DEFAULT_FILE_NAME);
this.load(is);
} catch (IOException e) {
log.error(e.getMessage());
throw new TechnicalException (
"No puedo cargar el arhivo properties " + DEFAULT_FILE_NAME,
e);
}
}
public String getDestinationXml(){
return this.getProperty("xmlForms.destination");
}
public String getRemoteListHost(){
return this.getProperty("list.remote.host")+":"+this.getProperty("list.remote.port");
}
public String getRemoteSubmissionHost(){
String rsh = this.getProperty("submit.remote.host")+":"+this.getProperty("submit.remote.port");
log.info(rsh);
return rsh;
}
}
| [
"yuzhongxing88@gmail.com"
] | yuzhongxing88@gmail.com |
49f1b8476fab829823a4710eec2015c819f74e40 | 4b92ec3669a290fb3d3241d0ce88d904211e2ded | /BinarySearch/SearchInRotatedSortedArray_8.java | ab9a017804c496ce1358b27e865d31a8b4ccc91f | [] | no_license | rkcyberog/AdityaVermaPlayList | 990d1e939f309d5f2e95c7844d4c625d7c99b601 | 601ccbaf96e0ce47457f82ac4d14ea663f79b9eb | refs/heads/main | 2023-06-10T23:45:41.583624 | 2021-07-05T22:16:30 | 2021-07-05T22:16:30 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,720 | java | package BinarySearch;
import java.util.Scanner;
public class SearchInRotatedSortedArray_8 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner sc = new Scanner (System.in);
int n = sc.nextInt();
int[] arr = new int[n];
for(int i = 0;i<n;i++) {
arr[i] = sc.nextInt();
}
int x = sc.nextInt();
System.out.println(searchInRotatedArray(arr,x));
}
private static int searchInRotatedArray(int[] arr, int x) {
int min = checkArrayRotation(arr);
int first = binarySearch(arr, x, 0, min-1);
int sec = binarySearch(arr, x, min, arr.length-1);
return Math.max(first, sec);
}
private static int binarySearch(int[] arr, int x,int start,int end) {
while(start<=end) {
int mid = start+((end-start)/2);
if(arr[mid] == x) {
return mid;
}else if(arr[mid] < x) {
start = mid+1;
}else {
end = mid-1;
}
}
return -1;
}
private static int checkArrayRotation(int[] arr) {
if(arr.length==2){
if(arr[0]<arr[1]){
return 0;
}else return 1;
}
int n = arr.length -1;
int start = 0;
int end = arr.length-1;
int small= -1;
while(start<=end) {
if(arr[start] <= arr[end]){
return start;
}
int mid = start+ ((end- start)/2);
int next =(mid + 1)%n ;
int prev =(mid+n-1)%n;
if(arr[mid]<=arr[next] && arr[mid]<=arr[prev] ) {
return mid;
}
if(arr[start]<=arr[mid]) {
start= mid+1;
}else if (arr[mid]<= arr[end]) {
end = mid -1;
}
}
return small;
}
}
| [
"sahilshirodkar1630@gmail.com"
] | sahilshirodkar1630@gmail.com |
9dccdcc7dac2c217b376f94f31a1237df93b60fd | 97fd02f71b45aa235f917e79dd68b61c62b56c1c | /src/main/java/com/tencentcloudapi/monitor/v20180724/models/DescribePrometheusGlobalNotificationResponse.java | 1aef9bd4da06a680694e697c241e3a130810705a | [
"Apache-2.0"
] | permissive | TencentCloud/tencentcloud-sdk-java | 7df922f7c5826732e35edeab3320035e0cdfba05 | 09fa672d75e5ca33319a23fcd8b9ca3d2afab1ec | refs/heads/master | 2023-09-04T10:51:57.854153 | 2023-09-01T03:21:09 | 2023-09-01T03:21:09 | 129,837,505 | 537 | 317 | Apache-2.0 | 2023-09-13T02:42:03 | 2018-04-17T02:58:16 | Java | UTF-8 | Java | false | false | 3,669 | java | /*
* Copyright (c) 2017-2018 THL A29 Limited, a Tencent company. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* 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.tencentcloudapi.monitor.v20180724.models;
import com.tencentcloudapi.common.AbstractModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class DescribePrometheusGlobalNotificationResponse extends AbstractModel{
/**
* 全局告警通知渠道
注意:此字段可能返回 null,表示取不到有效值。
*/
@SerializedName("Notification")
@Expose
private PrometheusNotificationItem Notification;
/**
* 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
@SerializedName("RequestId")
@Expose
private String RequestId;
/**
* Get 全局告警通知渠道
注意:此字段可能返回 null,表示取不到有效值。
* @return Notification 全局告警通知渠道
注意:此字段可能返回 null,表示取不到有效值。
*/
public PrometheusNotificationItem getNotification() {
return this.Notification;
}
/**
* Set 全局告警通知渠道
注意:此字段可能返回 null,表示取不到有效值。
* @param Notification 全局告警通知渠道
注意:此字段可能返回 null,表示取不到有效值。
*/
public void setNotification(PrometheusNotificationItem Notification) {
this.Notification = Notification;
}
/**
* Get 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @return RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public String getRequestId() {
return this.RequestId;
}
/**
* Set 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
* @param RequestId 唯一请求 ID,每次请求都会返回。定位问题时需要提供该次请求的 RequestId。
*/
public void setRequestId(String RequestId) {
this.RequestId = RequestId;
}
public DescribePrometheusGlobalNotificationResponse() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public DescribePrometheusGlobalNotificationResponse(DescribePrometheusGlobalNotificationResponse source) {
if (source.Notification != null) {
this.Notification = new PrometheusNotificationItem(source.Notification);
}
if (source.RequestId != null) {
this.RequestId = new String(source.RequestId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap<String, String> map, String prefix) {
this.setParamObj(map, prefix + "Notification.", this.Notification);
this.setParamSimple(map, prefix + "RequestId", this.RequestId);
}
}
| [
"tencentcloudapi@tencent.com"
] | tencentcloudapi@tencent.com |
b2e5862c13cd5d7973bdca82f25a931fa0f7415f | a5d01febfd8d45a61f815b6f5ed447e25fad4959 | /Source Code/5.27.0/sources/io/card/payment/i18n/a/i.java | aaf5d07786ff69b7284270ffe1e09fa85a942a22 | [] | no_license | kkagill/Decompiler-IQ-Option | 7fe5911f90ed2490687f5d216cb2940f07b57194 | c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6 | refs/heads/master | 2020-09-14T20:44:49.115289 | 2019-11-04T06:58:55 | 2019-11-04T06:58:55 | 223,236,327 | 1 | 0 | null | 2019-11-21T18:17:17 | 2019-11-21T18:17:16 | null | UTF-8 | Java | false | false | 2,218 | java | package io.card.payment.i18n.a;
import io.card.payment.i18n.StringKey;
import io.card.payment.i18n.c;
import java.util.HashMap;
import java.util.Map;
/* compiled from: LocalizedStringsFR */
public class i implements c<StringKey> {
private static Map<StringKey, String> eLx = new HashMap();
private static Map<String, String> eLy = new HashMap();
public String getName() {
return "fr";
}
/* renamed from: b */
public String a(StringKey stringKey, String str) {
StringBuilder stringBuilder = new StringBuilder();
stringBuilder.append(stringKey.toString());
stringBuilder.append("|");
stringBuilder.append(str);
str = stringBuilder.toString();
if (eLy.containsKey(str)) {
return (String) eLy.get(str);
}
return (String) eLx.get(stringKey);
}
public i() {
eLx.put(StringKey.CANCEL, "Annuler");
eLx.put(StringKey.CARDTYPE_AMERICANEXPRESS, "American Express");
eLx.put(StringKey.CARDTYPE_DISCOVER, "Discover");
eLx.put(StringKey.CARDTYPE_JCB, "JCB");
eLx.put(StringKey.CARDTYPE_MASTERCARD, "MasterCard");
eLx.put(StringKey.CARDTYPE_VISA, "Visa");
eLx.put(StringKey.DONE, "OK");
eLx.put(StringKey.ENTRY_CVV, "Crypto.");
eLx.put(StringKey.ENTRY_POSTAL_CODE, "Code postal");
eLx.put(StringKey.ENTRY_CARDHOLDER_NAME, "Nom du titulaire de la carte");
eLx.put(StringKey.ENTRY_EXPIRES, "Date d’expiration");
eLx.put(StringKey.EXPIRES_PLACEHOLDER, "MM/AA");
eLx.put(StringKey.SCAN_GUIDE, "Maintenez la carte à cet endroit.\nElle va être automatiquement scannée.");
eLx.put(StringKey.KEYBOARD, "Clavier…");
eLx.put(StringKey.ENTRY_CARD_NUMBER, "Nº de carte");
eLx.put(StringKey.MANUAL_ENTRY_TITLE, "Carte");
eLx.put(StringKey.ERROR_NO_DEVICE_SUPPORT, "Cet appareil ne peut pas utiliser l’appareil photo pour lire les numéros de carte.");
eLx.put(StringKey.ERROR_CAMERA_CONNECT_FAIL, "L’appareil photo n’est pas disponible.");
eLx.put(StringKey.ERROR_CAMERA_UNEXPECTED_FAIL, "Une erreur s’est produite en ouvrant l’appareil photo.");
}
}
| [
"yihsun1992@gmail.com"
] | yihsun1992@gmail.com |
503579f5fb0a2494e9386696e7435314f7600212 | 547f667fc96ff43cad7d6b4372d7cd095ad8cc38 | /src/main/java/edu/cmu/cs/stage3/alice/core/question/math/Exp.java | bb5b9e8bc61a5e77b7cca69c07d0586065327981 | [
"BSD-2-Clause"
] | permissive | ericpauley/Alice | ca01da9cd90ebe743d392522e1e283d63bdaa184 | a0b732c548f051f5c99dd90ec9410866ba902479 | refs/heads/master | 2020-06-05T03:15:51.421453 | 2012-03-20T13:50:16 | 2012-03-20T13:50:16 | 2,081,310 | 3 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,275 | java | /*
* Copyright (c) 1999-2003, Carnegie Mellon University. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* 3. Products derived from the software may not be called "Alice",
* nor may "Alice" appear in their name, without prior written
* permission of Carnegie Mellon University.
*
* 4. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes software developed by Carnegie Mellon University"
*/
package edu.cmu.cs.stage3.alice.core.question.math;
public class Exp extends edu.cmu.cs.stage3.alice.core.question.UnaryNumberResultingInNumberQuestion {
@Override
protected double getValue(double aValue) {
return Math.exp(aValue);
}
} | [
"zonedabone@gmail.com"
] | zonedabone@gmail.com |
d4b8713e8cb49bbe72727242768194eb6d21d932 | ac521c975e7e3aa4e8ea053e0280ceae437848f3 | /src/main/java/com/bearever/async/permission/checker/test/CallLogWriteTest.java | d32bd6bb204cd8880f2ac2b8efcc0c80b7d1389a | [] | no_license | Luomingbear/AsyncPermission | 11c63b19ac9941a60b738dc904991f3ad3eea3b7 | 9827a21a289ea10e052743775c53f67c789b6de4 | refs/heads/master | 2020-09-06T08:58:02.872257 | 2019-11-08T03:44:49 | 2019-11-08T03:44:49 | 220,380,505 | 14 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,737 | java | /*
* Copyright © Zhenjie Yan
*
* 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.bearever.async.permission.checker.test;
import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.net.Uri;
import android.provider.CallLog;
/**
* Created by Zhenjie Yan on 2018/1/14.
*/
class CallLogWriteTest implements PermissionTest {
private ContentResolver mResolver;
CallLogWriteTest(Context context) {
this.mResolver = context.getContentResolver();
}
@Override
public boolean test() throws Throwable {
try {
ContentValues content = new ContentValues();
content.put(CallLog.Calls.TYPE, CallLog.Calls.INCOMING_TYPE);
content.put(CallLog.Calls.NUMBER, "1");
content.put(CallLog.Calls.DATE, 20080808);
content.put(CallLog.Calls.NEW, "0");
Uri resourceUri = mResolver.insert(CallLog.Calls.CONTENT_URI, content);
return ContentUris.parseId(resourceUri) > 0;
} finally {
mResolver.delete(CallLog.Calls.CONTENT_URI, CallLog.Calls.NUMBER + "=?", new String[] {"1"});
}
}
} | [
"luomingbear@163.com"
] | luomingbear@163.com |
35716106a966d083990d3fa6da5c995c0bbe2bed | e5bb4c1c5cb3a385a1a391ca43c9094e746bb171 | /Service/trunk/service/service-customer/src/main/java/com/hzfh/service/customer/mapper/PaymentMoneyWithdrawMapper.java | d875f6e4a6e5fb16768aa239764b4e4c62c37322 | [] | no_license | FashtimeDotCom/huazhen | 397143967ebed9d50073bfa4909c52336a883486 | 6484bc9948a29f0611855f84e81b0a0b080e2e02 | refs/heads/master | 2021-01-22T14:25:04.159326 | 2016-01-11T09:52:40 | 2016-01-11T09:52:40 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 1,203 | java | package com.hzfh.service.customer.mapper;
import com.hzfh.api.customer.model.PaymentMoneyWithdraw;
import com.hzfh.api.customer.model.query.PaymentMoneyWithdrawCondition;
import com.hzframework.data.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Service;
/*******************************************************************************
*
* Copyright 2015 HZFH. All rights reserved.
* Author: GuoZhenYu
* Create Date: 2015/6/8
* Description:
*
* Revision History:
* Date Author Description
*
******************************************************************************/
@Service("paymentMoneyWithdrawMapper")
public interface PaymentMoneyWithdrawMapper extends BaseMapper<PaymentMoneyWithdraw, PaymentMoneyWithdrawCondition> {
int updateMoneyAmount(@Param("amount")double money, @Param("sn")String sn);
int updateState(@Param("stateNo")String stateNo,@Param("sn") String sn);
PaymentMoneyWithdraw getbySn(@Param("sn")String sn);
int updateWithdraw(PaymentMoneyWithdraw paymentMoneyWithdraw);
PaymentMoneyWithdraw getInfoBystateAndSn(@Param("status")String status, @Param("sn")String sn);
} | [
"ulei0343@163.com"
] | ulei0343@163.com |
53c08967fda0643ada18f85a7cefbd0cf51e9c2f | 1ca86d5d065372093c5f2eae3b1a146dc0ba4725 | /spring-di/src/test/java/com/surya/methodinjections/StudentIntegrationTest.java | 08ca84e839124f2c5507208c3e178d9dbf406708 | [] | no_license | Suryakanta97/DemoExample | 1e05d7f13a9bc30f581a69ce811fc4c6c97f2a6e | 5c6b831948e612bdc2d9d578a581df964ef89bfb | refs/heads/main | 2023-08-10T17:30:32.397265 | 2021-09-22T16:18:42 | 2021-09-22T16:18:42 | 391,087,435 | 0 | 1 | null | null | null | null | UTF-8 | Java | false | false | 1,329 | java | package com.surya.methodinjections;
import org.junit.Assert;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
public class StudentIntegrationTest {
@Test
public void whenLookupMethodCalled_thenNewInstanceReturned() {
AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext(AppConfig.class);
Student student1 = context.getBean("studentBean", Student.class);
Student student2 = context.getBean("studentBean", Student.class);
Assert.assertEquals(student1, student2);
Assert.assertNotEquals(student1.getNotification("Alex"), student2.getNotification("Bethany"));
context.close();
}
@Test
public void whenAbstractGetterMethodInjects_thenNewInstanceReturned() {
ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("beans.xml");
StudentServices services = context.getBean("studentServices", StudentServices.class);
Assert.assertEquals("PASS", services.appendMark("Alex", 76));
Assert.assertEquals("FAIL", services.appendMark("Bethany", 44));
Assert.assertEquals("PASS", services.appendMark("Claire", 96));
context.close();
}
}
| [
"suryakanta97@github.com"
] | suryakanta97@github.com |
3c7ed4a32e9c876feb40b50f3112a9173826fa22 | a15ad136a8584932e6fa90ce282cde15805bc473 | /src/main/java/com/zgj/restrain/admin/util/TreeList.java | 27421ce8cdd04855a9b818a7f14167aac108e8d8 | [] | no_license | GaoJunzhang/restainAdmin | 4da51cc7436611ef4f6dda0843a1b2bd11c85da3 | 01764ad16e41a96fbb8a2115a60c176bca74689e | refs/heads/master | 2020-03-16T22:00:44.199289 | 2018-05-17T08:51:17 | 2018-05-17T08:51:17 | 133,023,335 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,451 | java | package com.zgj.restrain.admin.util;
import com.zgj.restrain.admin.model.SysPermission;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* Created by user on 2018/5/10.
*/
public class TreeList {
private List<SysPermission> resultNodes = new ArrayList<SysPermission>();//树形结构排序之后list内容
private List<SysPermission> nodes; //传入list参数
public TreeList(List<SysPermission> nodes) {//通过构造函数初始化
this.nodes = nodes;
}
private List<Map<String,Object>> list = new ArrayList<Map<String,Object>>();
/**
* 构建树形结构list
* @return 返回树形结构List列表
*/
public List<SysPermission> buildTree() {
for (SysPermission node : nodes) {
String id = node.getId().toString();
if (node.getParentId() == 0) {//通过循环一级节点 就可以通过递归获取二级以下节点
Map<String, Object> m = new HashMap<String, Object>();
m.put("id",node.getId());
resultNodes.add(node);//添加一级节点
build(node);//递归获取二级、三级、。。。节点
}
}
return resultNodes;
}
/**
* 递归循环子节点
*
* @param node 当前节点
*/
private void build(SysPermission node) {
List<SysPermission> children = getChildren(node);
if (!children.isEmpty()) {//如果存在子节点
for (SysPermission child : children) {//将子节点遍历加入返回值中
Map<String, Object> m = new HashMap<String, Object>();
m.put("children",child);
list.add(m);
resultNodes.add(child);
build(child);
}
}
}
/**
* @param node
* @return 返回
*/
private List<SysPermission> getChildren(SysPermission node) {
List<SysPermission> children = new ArrayList<SysPermission>();
String id = node.getId().toString();
for (SysPermission child : nodes) {
System.out.println(id+"========"+child.getParentId());
if (id.equals(child.getParentId().toString())) {//如果id等于父id
System.out.println("success");
children.add(child);//将该节点加入循环列表中
}
}
return children;
}
}
| [
"1228671674@qq.com"
] | 1228671674@qq.com |
785ec21aefee8d8f33334397c147d6569785739e | a2b699456c94eed6cc54bf8366d1fab91781aeca | /inf-root/inf-base/src/main/java/com/colourfulchina/inf/base/utils/FileUtils.java | 53ea9b87944bfe46acb38b4b2b7a951e96c49145 | [] | no_license | elephant5/old-code | 8a35aa17163e87f506c6f12da032b1978b0c4ec3 | bfb27297d5fcb6aaea8eac5a4032eba7d01cc7ee | refs/heads/master | 2023-01-24T12:25:53.549609 | 2020-12-04T01:50:15 | 2020-12-04T01:50:15 | 318,364,156 | 1 | 2 | null | null | null | null | UTF-8 | Java | false | false | 1,115 | java | package com.colourfulchina.inf.base.utils;
import lombok.experimental.UtilityClass;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.multipart.MultipartFile;
import java.io.File;
@Slf4j
@UtilityClass
public class FileUtils {
/**
* MultipartFile转File
* @param multipartFile
* @param filePath
* @return
* @throws Exception
*/
public static File multiTransferToFile(MultipartFile multipartFile,String filePath)throws Exception{
File file = null;
try {
File uploadDir = new File(filePath);
if(!uploadDir.exists()){//判断目录是否存在
uploadDir.mkdirs();
}
file = new File(uploadDir + File.separator + System.currentTimeMillis() + multipartFile.getOriginalFilename());//将mfile转化成file,以供后续处理
//将上传的文件写入到新建的目录中
multipartFile.transferTo(file);
}catch (Exception e){
log.error("获取输入流错误",e);
throw new Exception(e);
}
return file;
}
}
| [
"ryan.wu@colourchina.com"
] | ryan.wu@colourchina.com |
0515264d7e58cc52d3a2249ee30ed9682607fcd4 | 7f69e2b6ec47fdfd7088f63eda64c80d9f1f1b0f | /Web2SMS_Common_DALayer/src/main/java/com/edafa/web2sms/dalayer/model/QuotaHistory.java | 04d16162df9715f307c7326c0436a239b5243579 | [] | no_license | MahmoudFouadMohamed/WEB2SMS | 53246564d5c0098737222aa602955238e60338c2 | 1693b5a1749a7f1ebfa0fc4d15d1e3117759efc9 | refs/heads/master | 2020-05-17T01:49:23.308128 | 2019-04-25T19:37:06 | 2019-04-25T19:37:06 | 183,435,780 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 8,078 | java | package com.edafa.web2sms.dalayer.model;
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
import java.io.Serializable;
import java.util.Calendar;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.persistence.Transient;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import javax.xml.bind.annotation.XmlRootElement;
import com.edafa.web2sms.dalayer.enums.MonthName;
import com.edafa.web2sms.dalayer.model.constants.QuotaHistoryConst;
/**
*
* @author khalid
*/
@Entity
@Table(name = "QUOTA_HISTORY")
@XmlRootElement
@NamedQueries({
@NamedQuery(name = "QuotaHistory.findAll", query = "SELECT q FROM QuotaHistory q"),
@NamedQuery(name = "QuotaHistory.findByAccountId", query = "SELECT q FROM QuotaHistory q WHERE q.accountId = :accountId"),
@NamedQuery(name = "QuotaHistory.findByUpdateTimestamp", query = "SELECT q FROM QuotaHistory q WHERE q.updateTimestamp = :updateTimestamp") })
public class QuotaHistory implements Serializable , QuotaHistoryConst{
private static final long serialVersionUID = 1L;
@Id
@Basic(optional = false)
@NotNull
@Size(min = 1, max = 50)
@Column(name = "ACCOUNT_ID")
private String accountId;
@Column(name = "JAN")
private int jan;
@Column(name = "FEB")
private int feb;
@Column(name = "MAR")
private int mar;
@Column(name = "APR")
private int apr;
@Column(name = "MAY")
private int may;
@Column(name = "JUNE")
private int june;
@Column(name = "JULY")
private int july;
@Column(name = "AUG")
private int aug;
@Column(name = "SEPT")
private int sept;
@Column(name = "OCT")
private int oct;
@Column(name = "NOV")
private int nov;
@Column(name = "DEC")
private int dec;
@Column(name = "UPDATE_TIMESTAMP")
@Temporal(TemporalType.TIMESTAMP)
private Date updateTimestamp;
@JoinColumn(name = "ACCOUNT_ID", referencedColumnName = "ACCOUNT_ID", insertable = false, updatable = false)
@OneToOne(optional = false, cascade = CascadeType.DETACH)
private Account account;
@Transient
private int[] historyArr;
public QuotaHistory() {
historyArr = new int[12];
}
public QuotaHistory(String accountId) {
this.accountId = accountId;
}
public String getAccountId() {
return accountId;
}
public void setAccountId(String accountId) {
this.accountId = accountId;
}
public int getJan() {
return jan;
}
public void setJan(int jan) {
this.jan = jan;
}
public int getFeb() {
return feb;
}
public void setFeb(int feb) {
this.feb = feb;
}
public int getMar() {
return mar;
}
public void setMar(int mar) {
this.mar = mar;
}
public int getApr() {
return apr;
}
public void setApr(int apr) {
this.apr = apr;
}
public int getMay() {
return may;
}
public void setMay(int may) {
this.may = may;
}
public int getJune() {
return june;
}
public void setJune(int june) {
this.june = june;
}
public int getJuly() {
return july;
}
public void setJuly(int july) {
this.july = july;
}
public int getAug() {
return aug;
}
public void setAug(int aug) {
this.aug = aug;
}
public int getSept() {
return sept;
}
public void setSept(int sept) {
this.sept = sept;
}
public int getOct() {
return oct;
}
public void setOct(int oct) {
this.oct = oct;
}
public int getNov() {
return nov;
}
public void setNov(int nov) {
this.nov = nov;
}
public int getDec() {
return dec;
}
public void setDec(int dec) {
this.dec = dec;
}
public Date getUpdateTimestamp() {
return updateTimestamp;
}
public void setUpdateTimestamp(Date updateTimestamp) {
this.updateTimestamp = updateTimestamp;
}
public Account getAccounts() {
return account;
}
public void setAccounts(Account accounts) {
this.account = accounts;
}
public int getMonthValue(MonthName month) {
int result;
switch (month) {
case JAN:
result = jan;
break;
case FEB:
result = feb;
break;
case MAR:
result = mar;
break;
case APR:
result = apr;
break;
case MAY:
result = may;
break;
case JUNE:
result = june;
break;
case JULY:
result = july;
break;
case AUG:
result = aug;
break;
case SEPT:
result = sept;
break;
case OCT:
result = oct;
break;
case NOV:
result = nov;
break;
case DEC:
result = dec;
break;
default:
result = 0;
break;
}
return result;
}
public void setMonthValue(MonthName month, int value) {
switch (month) {
case JAN:
this.jan = value;
break;
case FEB:
this.feb = value;
break;
case MAR:
this.mar = value;
break;
case APR:
this.apr = value;
break;
case MAY:
this.may = value;
break;
case JUNE:
this.june = value;
break;
case JULY:
this.july = value;
break;
case AUG:
this.aug = value;
break;
case SEPT:
this.sept = value;
break;
case OCT:
this.oct = value;
break;
case NOV:
this.nov = value;
break;
case DEC:
this.dec = value;
break;
default:
break;
}
}
public int getMonthValue(int month) {
int result;
switch (month) {
case 0:
result = jan;
break;
case 1:
result = feb;
break;
case 2:
result = mar;
break;
case 3:
result = apr;
break;
case 4:
result = may;
break;
case 5:
result = june;
break;
case 6:
result = july;
break;
case 7:
result = aug;
break;
case 8:
result = sept;
break;
case 9:
result = oct;
break;
case 10:
result = nov;
break;
case 11:
result = dec;
break;
default:
result = 0;
break;
}
return result;
}
public void setMonthValue(int month, int value) {
switch (month) {
case 0:
this.jan = value;
break;
case 1:
this.feb = value;
break;
case 2:
this.mar = value;
break;
case 3:
this.apr = value;
break;
case 4:
this.may = value;
break;
case 5:
this.june = value;
break;
case 6:
this.july = value;
break;
case 7:
this.aug = value;
break;
case 8:
this.sept = value;
break;
case 9:
this.oct = value;
break;
case 10:
this.nov = value;
break;
case 11:
this.dec = value;
break;
default:
break;
}
}
public int[] getQuotaHistory() {
if (updateTimestamp == null) {
return null;
}
// Create calendar instance to get month of updateTimestamp
Calendar updateDate = Calendar.getInstance();
updateDate.setTime(updateTimestamp);
// Jan ==> 0 , Feb ==> 1, ... etc.
int month = updateDate.get(Calendar.MONTH);
int i = month;
for (int j = 0; j < 12; j++) {
if (i == -1) {
i = 11;
}
historyArr[j] = getMonthValue(--i);
}
return historyArr;
}
@Override
public int hashCode() {
int hash = 0;
hash += (accountId != null ? accountId.hashCode() : 0);
return hash;
}
@Override
public boolean equals(Object object) {
// TODO: Warning - this method won't work in the case the id fields are
// not set
if (!(object instanceof QuotaHistory)) {
return false;
}
QuotaHistory other = (QuotaHistory) object;
if ((this.accountId == null && other.accountId != null)
|| (this.accountId != null && !this.accountId.equals(other.accountId))) {
return false;
}
return true;
}
@Override
public String toString() {
return "QuotaHistory [accountId=" + accountId + ", jan=" + jan + ", feb=" + feb + ", mar=" + mar + ", apr="
+ apr + ", may=" + may + ", june=" + june + ", july=" + july + ", aug=" + aug + ", sept=" + sept
+ ", oct=" + oct + ", nov=" + nov + ", dec=" + dec + ", updateTimestamp=" + updateTimestamp
+ "]";
}
}
| [
"mahmoud.fouad@edafa.com"
] | mahmoud.fouad@edafa.com |
4ffe330aeeab6a2bbecedc128b394e0055f031ab | 0af8b92686a58eb0b64e319b22411432aca7a8f3 | /large-multiproject/project11/src/test/java/org/gradle/test/performance11_4/Test11_383.java | e11622f5adc969bceff01c365e4a3ca6f05ca127 | [] | 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 | 292 | java | package org.gradle.test.performance11_4;
import static org.junit.Assert.*;
public class Test11_383 {
private final Production11_383 production = new Production11_383("value");
@org.junit.Test
public void test() {
assertEquals(production.getProperty(), "value");
}
} | [
"cedric.champeau@gmail.com"
] | cedric.champeau@gmail.com |
a8e9dc87f161d01210b34662c0f081a3a56de68f | d82e5f15a619e82b2373dab7345b9629259ec820 | /service-registry/registry-service-center/src/test/java/org/apache/servicecomb/serviceregistry/diagnosis/instance/TestInstanceCacheCheckerWithoutMock.java | 479f58a9564c34e7bb8bb81d1b3624dc354bc5e3 | [
"Apache-2.0"
] | permissive | South-NanCi/servicecomb-java-chassis | 1b4ae59763979e272950f528c297034387b27443 | e413d6367079f4b0cb7e78f30e9691e0439abcbb | refs/heads/master | 2022-08-30T19:29:17.375418 | 2020-05-24T13:57:44 | 2020-05-25T08:59:16 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,318 | java | /*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.servicecomb.serviceregistry.diagnosis.instance;
import java.util.Arrays;
import org.apache.servicecomb.config.ConfigUtil;
import org.apache.servicecomb.foundation.common.Holder;
import org.apache.servicecomb.foundation.common.testing.MockClock;
import org.apache.servicecomb.foundation.test.scaffolding.config.ArchaiusUtils;
import org.apache.servicecomb.serviceregistry.DiscoveryManager;
import org.apache.servicecomb.serviceregistry.RegistryUtils;
import org.apache.servicecomb.serviceregistry.ServiceRegistry;
import org.apache.servicecomb.serviceregistry.consumer.MicroserviceVersionRule;
import org.apache.servicecomb.serviceregistry.definition.DefinitionConst;
import org.apache.servicecomb.serviceregistry.diagnosis.Status;
import org.apache.servicecomb.serviceregistry.registry.LocalServiceRegistryFactory;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import io.vertx.core.json.Json;
public class TestInstanceCacheCheckerWithoutMock {
private static final Logger LOGGER = LoggerFactory.getLogger(TestInstanceCacheCheckerWithoutMock.class);
ServiceRegistry serviceRegistry = LocalServiceRegistryFactory.createLocal();
InstanceCacheChecker checker;
InstanceCacheSummary expectedSummary = new InstanceCacheSummary();
String appId = "appId";
String microserviceName = "msName";
@Before
public void setUp() throws Exception {
ConfigUtil.installDynamicConfig();
DiscoveryManager.renewInstance();
serviceRegistry.init();
RegistryUtils.setServiceRegistry(serviceRegistry);
checker = new InstanceCacheChecker(DiscoveryManager.INSTANCE.getAppManager());
checker.clock = new MockClock(new Holder<>(1L));
expectedSummary.setStatus(Status.NORMAL);
expectedSummary.setTimestamp(1);
}
@After
public void tearDown() throws Exception {
ArchaiusUtils.resetConfig();
}
@Test
public void check_appManager_empty() {
InstanceCacheSummary instanceCacheSummary = checker.check();
Assert.assertEquals(Json.encode(expectedSummary), Json.encode(instanceCacheSummary));
}
@Test
public void check_microserviceManager_empty() {
try {
appId = "notExist";
DiscoveryManager.INSTANCE.getAppManager().getOrCreateMicroserviceVersions(appId, microserviceName);
InstanceCacheSummary instanceCacheSummary = checker.check();
Assert.assertEquals(Json.encode(expectedSummary), Json.encode(instanceCacheSummary));
} catch (Exception e) {
LOGGER.error("", e);
Assert.fail();
}
}
@Test
public void check_StaticMicroservice() {
microserviceName = appId + ":" + microserviceName;
serviceRegistry.registerMicroserviceMappingByEndpoints(microserviceName,
"1",
Arrays.asList("rest://localhost:8080"),
ThirdPartyServiceForUT.class);
MicroserviceVersionRule microserviceVersionRule = DiscoveryManager.INSTANCE.getAppManager()
.getOrCreateMicroserviceVersionRule(appId, microserviceName, DefinitionConst.VERSION_RULE_ALL);
Assert.assertEquals(microserviceName, microserviceVersionRule.getLatestMicroserviceVersion().getMicroserviceName());
InstanceCacheSummary instanceCacheSummary = checker.check();
expectedSummary.setStatus(Status.NORMAL);
Assert.assertEquals(Json.encode(expectedSummary), Json.encode(instanceCacheSummary));
}
private interface ThirdPartyServiceForUT {
String sayHello(String name);
}
}
| [
"bismy@qq.com"
] | bismy@qq.com |
88e9f548cb446494133e9a2803c5061749a54d84 | 8edecda16a4420159c0f11155e68d9d5463b380f | /app/src/main/java/com/duykhanh/storeapp/view/userpage/orderdetails/OrderDetailsItemClickListener.java | 51141544822a15e36050d27ba50b93083d9aea5b | [] | no_license | vanthanh1411/Store | 7ce4092da291edd31b32abadb579231f4fb49cdb | 97c4481c126b63654490e64e0991fb51e9bbeed9 | refs/heads/master | 2020-09-28T19:02:02.157384 | 2019-12-16T04:07:19 | 2019-12-16T04:07:19 | 226,841,040 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 154 | java | package com.duykhanh.storeapp.view.userpage.orderdetails;
public interface OrderDetailsItemClickListener {
void onItemClickListener(int position);
}
| [
"="
] | = |
535ba18eeabdf560ed6ba0087d2c5c3761a068d4 | 92fa08ae33fd552b78f388a95290713827074bea | /src/main/java/shop/customer/pojo/FundDetailSync.java | 78ec846eb112fa58f45546384e2c7018d8e3e46d | [] | no_license | lyouyue/frontnew | 76c1eccce4b9b8a15789f3f33e502b2cb6f95627 | 8546ab96e002fcbba601142977711d66b6b90d8a | refs/heads/master | 2021-07-06T15:42:57.725901 | 2017-09-20T11:14:29 | 2017-09-20T11:14:29 | 104,205,500 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 2,105 | java | package shop.customer.pojo;
import util.pojo.BaseEntity;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* 资金流水明细表同步表
*/
public class FundDetailSync extends BaseEntity implements Serializable{
private static final long serialVersionUID = 3650767127452328391L;
/**资金流水明细ID**/
private Integer fundId;
/**用户ID**/
private Integer customerId;
/**订单号 **/
private String ordersNo;
/**明细流水号**/
private String fundDetailsCode;
/**金额**/
private BigDecimal amount;
/**消费类型 1收入 2支出**/
private Integer fundDetailsType;
/**交易时间**/
private Date transactionTime;
/**来源【1充值,2返利,3余额消费,4提现】**/
private Integer source;
/**同步状态[1 未同步,2 已同步]**/
private Integer status;
public Integer getFundId() {
return fundId;
}
public void setFundId(Integer fundId) {
this.fundId = fundId;
}
public Integer getCustomerId() {
return customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
public String getOrdersNo() {
return ordersNo;
}
public void setOrdersNo(String ordersNo) {
this.ordersNo = ordersNo;
}
public String getFundDetailsCode() {
return fundDetailsCode;
}
public void setFundDetailsCode(String fundDetailsCode) {
this.fundDetailsCode = fundDetailsCode;
}
public BigDecimal getAmount() {
return amount;
}
public void setAmount(BigDecimal amount) {
this.amount = amount;
}
public Integer getFundDetailsType() {
return fundDetailsType;
}
public void setFundDetailsType(Integer fundDetailsType) {
this.fundDetailsType = fundDetailsType;
}
public Date getTransactionTime() {
return transactionTime;
}
public void setTransactionTime(Date transactionTime) {
this.transactionTime = transactionTime;
}
public Integer getSource() {
return source;
}
public void setSource(Integer source) {
this.source = source;
}
public Integer getStatus() {
return status;
}
public void setStatus(Integer status) {
this.status = status;
}
}
| [
"136861916@qq.com"
] | 136861916@qq.com |
eef4d99aa573c3814237ba4ea2d2fd72664e458b | 35d9fafb099ac519a9bffe3796f3dc6e0cd0a46c | /SampleJava/src/greedy/Graph.java | 2e5a541bbd47928d69e20ca322843fc3a03cb585 | [] | no_license | narendrachouhan1992/algorithm-practice | 34f87d6dc10c56d59e1c156ab89647bec335eed8 | 7677939b3097c48fc3a00fc650b535c675a4f39e | refs/heads/master | 2021-01-21T11:36:50.833933 | 2017-09-23T13:55:56 | 2017-09-23T13:55:56 | 102,019,105 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,075 | java | package greedy;
// Java program for Kruskal's algorithm to find Minimum Spanning Tree
// of a given connected, undirected and weighted graph
import java.util.*;
class Graph
{
// A class to represent a graph edge
class Edge implements Comparable<Edge>
{
int src, dest, weight;
// Comparator function used for sorting edges based on
// their weight
public int compareTo(Edge compareEdge)
{
return this.weight-compareEdge.weight;
}
};
// A class to represent a subset for union-find
class subset
{
int parent, rank;
};
int V, E; // V-> no. of vertices & E->no.of edges
Edge edge[]; // collection of all edges
// Creates a graph with V vertices and E edges
Graph(int v, int e)
{
V = v;
E = e;
edge = new Edge[E];
for (int i=0; i<e; ++i)
edge[i] = new Edge();
}
// A utility function to find set of an element i
// (uses path compression technique)
int find(subset subsets[], int i)
{
// find root and make root as parent of i (path compression)
if (subsets[i].parent != i)
subsets[i].parent = find(subsets, subsets[i].parent);
return subsets[i].parent;
}
// A function that does union of two sets of x and y
// (uses union by rank)
void Union(subset subsets[], int x, int y)
{
int xroot = find(subsets, x);
int yroot = find(subsets, y);
// Attach smaller rank tree under root of high rank tree
// (Union by Rank)
if (subsets[xroot].rank < subsets[yroot].rank)
subsets[xroot].parent = yroot;
else if (subsets[xroot].rank > subsets[yroot].rank)
subsets[yroot].parent = xroot;
// If ranks are same, then make one as root and increment
// its rank by one
else
{
subsets[yroot].parent = xroot;
subsets[xroot].rank++;
}
}
// The main function to construct MST using Kruskal's algorithm
void KruskalMST()
{
Edge result[] = new Edge[V]; // Tnis will store the resultant MST
int e = 0; // An index variable, used for result[]
int i = 0; // An index variable, used for sorted edges
for (i=0; i<V; ++i)
result[i] = new Edge();
// Step 1: Sort all the edges in non-decreasing order of their
// weight. If we are not allowed to change the given graph, we
// can create a copy of array of edges
Arrays.sort(edge);
// Allocate memory for creating V ssubsets
subset subsets[] = new subset[V];
for(i=0; i<V; ++i)
subsets[i]=new subset();
// Create V subsets with single elements
for (int v = 0; v < V; ++v)
{
subsets[v].parent = v;
subsets[v].rank = 0;
}
i = 0; // Index used to pick next edge
// Number of edges to be taken is equal to V-1
while (e < V - 1)
{
// Step 2: Pick the smallest edge. And increment the index
// for next iteration
Edge next_edge = new Edge();
next_edge = edge[i++];
int x = find(subsets, next_edge.src);
int y = find(subsets, next_edge.dest);
// If including this edge does't cause cycle, include it
// in result and increment the index of result for next edge
if (x != y)
{
result[e++] = next_edge;
Union(subsets, x, y);
}
// Else discard the next_edge
}
// print the contents of result[] to display the built MST
System.out.println("Following are the edges in the constructed MST");
for (i = 0; i < e; ++i)
System.out.println(result[i].src+" -- "+result[i].dest+" == "+
result[i].weight);
}
// Driver Program
public static void main (String[] args)
{
/* Let us create following weighted graph
10
0--------1
| \ |
6| 5\ |15
| \ |
2--------3
4 */
int V = 4; // Number of vertices in graph
int E = 5; // Number of edges in graph
Graph graph = new Graph(V, E);
// add edge 0-1
graph.edge[0].src = 0;
graph.edge[0].dest = 1;
graph.edge[0].weight = 10;
// add edge 0-2
graph.edge[1].src = 0;
graph.edge[1].dest = 2;
graph.edge[1].weight = 6;
// add edge 0-3
graph.edge[2].src = 0;
graph.edge[2].dest = 3;
graph.edge[2].weight = 5;
// add edge 1-3
graph.edge[3].src = 1;
graph.edge[3].dest = 3;
graph.edge[3].weight = 15;
// add edge 2-3
graph.edge[4].src = 2;
graph.edge[4].dest = 3;
graph.edge[4].weight = 4;
graph.KruskalMST();
}
} | [
"narendra.chouhan@oracle.com"
] | narendra.chouhan@oracle.com |
ec57c192dc1827dffebeb82f8dd71a3f39053c44 | fb0e19758824bbbd5dda39a8ef911e5590eb1841 | /framework/ISpring/src/main/java/cn/jdbctemplate/dao/IAccountDao.java | fb6b7517ac8e70008aa43e6207c1f015f5e3293e | [] | no_license | aqqje/bexercise | e16ceefd5a89ce75e20fa419e212ffaf15ff5a5f | bcc6a52d147d5b910cd4d495501bb986007168f3 | refs/heads/master | 2022-12-23T17:42:58.965990 | 2021-05-02T10:45:34 | 2021-05-02T10:45:34 | 182,517,809 | 0 | 0 | null | 2022-12-16T15:45:43 | 2019-04-21T10:07:28 | Java | UTF-8 | Java | false | false | 304 | java | package cn.jdbctemplate.dao;
import cn.jdbctemplate.domain.Account;
import java.util.List;
public interface IAccountDao {
List<Account> findAll();
Account findById(int id);
void delete(int id);
void save(Account account);
void update(Account account);
int findAlldis();
}
| [
"1042136232@qq.com"
] | 1042136232@qq.com |
6d4ee98f1899c62950a1aea95c35a908bfe873e6 | 982c6b06d72d646c809d5a12866359f720305067 | /gradle/libraries/gradle-build-script/src/main/java/dev/gradleplugins/buildscript/blocks/PluginManagementBlock.java | 50cb004964e7d685145cfb9df170aaf04fe9cb63 | [
"Apache-2.0"
] | permissive | nokeedev/gradle-native | e46709a904e20183ca09ff64b92d222d3c888df2 | 6e6ee42cefa69d81fd026b2cfcb7e710dd62d569 | refs/heads/master | 2023-05-30T02:27:59.371101 | 2023-05-18T15:36:49 | 2023-05-23T14:43:18 | 243,841,556 | 52 | 9 | Apache-2.0 | 2023-05-23T14:58:33 | 2020-02-28T19:42:28 | Java | UTF-8 | Java | false | false | 2,151 | java | /*
* Copyright 2022 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 dev.gradleplugins.buildscript.blocks;
import dev.gradleplugins.buildscript.statements.BlockStatement;
import dev.gradleplugins.buildscript.statements.GroupStatement;
import dev.gradleplugins.buildscript.statements.Statement;
import java.util.function.Consumer;
import static dev.gradleplugins.buildscript.syntax.Syntax.literal;
public final class PluginManagementBlock extends AbstractBlock {
private PluginManagementBlock(Statement delegate) {
super(delegate);
}
public static BlockStatement<PluginManagementBlock> pluginManagement(Consumer<? super PluginManagementBlock.Builder> action) {
final PluginManagementBlock.Builder builder = new Builder();
action.accept(builder);
return BlockStatement.of(literal("pluginManagement"), builder.build());
}
public static final class Builder {
private final GroupStatement.Builder builder = GroupStatement.builder();
public Builder add(Statement statement) {
builder.add(statement);
return this;
}
public Builder plugins(Consumer<? super PluginsBlock.Builder> action) {
builder.add(PluginsBlock.plugins(action));
return this;
}
public Builder repositories(Consumer<? super RepositoriesBlock.Builder> action) {
builder.add(RepositoriesBlock.repositories(action));
return this;
}
public Builder includeBuild(String buildPath) {
builder.add(SettingsBlock.IncludeBuildStatement.includeBuild(buildPath));
return this;
}
public PluginManagementBlock build() {
return new PluginManagementBlock(builder.build());
}
}
}
| [
"lacasseio@users.noreply.github.com"
] | lacasseio@users.noreply.github.com |
5bfc882b372a8d201e9891451558e0c99cdfe1f8 | 7b4f8397c2ae7cc527de946cfd5ca22ebec48186 | /org/omg/DynamicAny/DynValueBox.java | 0bd71a237e9e6a4e0cb0db6b4f44a7d9fa386f4c | [] | no_license | hjsw1/jdk8-source | cd025ebd0f1231c021de894c5df88a05e1f9c060 | 75c2330e65a472e1a672d4ec8e86a5b07c711f42 | refs/heads/main | 2023-06-19T23:29:42.308929 | 2021-07-21T16:46:38 | 2021-07-21T16:46:38 | null | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 862 | java | package org.omg.DynamicAny;
/**
* org/omg/DynamicAny/DynValueBox.java .
* Generated by the IDL-to-Java compiler (portable), version "3.2"
* from /HUDSON3/workspace/8-2-build-linux-amd64/jdk8u112/7884/corba/src/share/classes/org/omg/DynamicAny/DynamicAny.idl
* Thursday, September 22, 2016 9:11:51 PM PDT
*/
/**
* DynValueBox objects support the manipulation of IDL boxed value types.
* The DynValueBox interface can represent both null and non-null value types.
* For a DynValueBox representing a non-null value type, the DynValueBox has a single component
* of the boxed type. A DynValueBox representing a null value type has no components
* and a current position of -1.
*/
public interface DynValueBox extends DynValueBoxOperations, org.omg.DynamicAny.DynValueCommon, org.omg.CORBA.portable.IDLEntity
{
} // interface DynValueBox
| [
"2506597416@qq.com"
] | 2506597416@qq.com |
4a9c2baa426a74577a4f90b6e0737c832a5e1037 | c885ef92397be9d54b87741f01557f61d3f794f3 | /tests-without-trycatch/Closure-111/com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter/BBC-F0-opt-70/28/com/google/javascript/jscomp/type/ClosureReverseAbstractInterpreter_ESTest.java | b0218e9e5e5fd53932d454c12b78a795f046e467 | [
"CC-BY-4.0",
"MIT"
] | permissive | pderakhshanfar/EMSE-BBC-experiment | f60ac5f7664dd9a85f755a00a57ec12c7551e8c6 | fea1a92c2e7ba7080b8529e2052259c9b697bbda | refs/heads/main | 2022-11-25T00:39:58.983828 | 2022-04-12T16:04:26 | 2022-04-12T16:04:26 | 309,335,889 | 0 | 1 | null | 2021-11-05T11:18:43 | 2020-11-02T10:30:38 | null | UTF-8 | Java | false | false | 6,178 | java | /*
* This file was automatically generated by EvoSuite
* Sat Oct 23 21:13:19 GMT 2021
*/
package com.google.javascript.jscomp.type;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.shaded.org.mockito.Mockito.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.google.javascript.jscomp.CodingConvention;
import com.google.javascript.jscomp.GoogleCodingConvention;
import com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter;
import com.google.javascript.jscomp.type.FlowScope;
import com.google.javascript.rhino.Node;
import com.google.javascript.rhino.SimpleErrorReporter;
import com.google.javascript.rhino.jstype.JSTypeRegistry;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.evosuite.runtime.ViolatedAssumptionAnswer;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class ClosureReverseAbstractInterpreter_ESTest extends ClosureReverseAbstractInterpreter_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, (JSTypeRegistry) null);
Node node0 = Node.newString("");
Node node1 = Node.newString("");
Node node2 = new Node(37, node0, node1, 38, 38);
FlowScope flowScope0 = mock(FlowScope.class, new ViolatedAssumptionAnswer());
doReturn("").when(flowScope0).toString();
node2.addChildrenToFront(node2);
FlowScope flowScope1 = closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome(node2, flowScope0, false);
assertSame(flowScope1, flowScope0);
}
@Test(timeout = 4000)
public void test1() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, (JSTypeRegistry) null);
Node node0 = Node.newString("");
FlowScope flowScope0 = mock(FlowScope.class, new ViolatedAssumptionAnswer());
doReturn("").when(flowScope0).toString();
FlowScope flowScope1 = closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome(node0, flowScope0, false);
assertSame(flowScope1, flowScope0);
}
@Test(timeout = 4000)
public void test2() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter();
JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0);
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, jSTypeRegistry0);
// Undeclared exception!
// try {
closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome((Node) null, (FlowScope) null, false);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter", e);
// }
}
@Test(timeout = 4000)
public void test3() throws Throwable {
SimpleErrorReporter simpleErrorReporter0 = new SimpleErrorReporter();
JSTypeRegistry jSTypeRegistry0 = new JSTypeRegistry(simpleErrorReporter0, true);
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = null;
// try {
closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter((CodingConvention) null, jSTypeRegistry0);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.common.base.Preconditions", e);
// }
}
@Test(timeout = 4000)
public void test4() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, (JSTypeRegistry) null);
Node node0 = Node.newString("w");
Node node1 = new Node(37, node0, node0, 38, 38);
Node node2 = Node.newString(57, "com.google.javascript.jscomp.type.ClosureReverseAbstractInterpreter$2", 16, (-11));
node1.addChildrenToFront(node2);
FlowScope flowScope0 = closureReverseAbstractInterpreter0.firstPreciserScopeKnowingConditionOutcome(node1, (FlowScope) null, true);
assertNull(flowScope0);
}
@Test(timeout = 4000)
public void test5() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, (JSTypeRegistry) null);
Node node0 = Node.newString("w");
Node node1 = new Node(37, node0, node0, 38, 38);
FlowScope flowScope0 = closureReverseAbstractInterpreter0.firstPreciserScopeKnowingConditionOutcome(node1, (FlowScope) null, true);
assertNull(flowScope0);
}
@Test(timeout = 4000)
public void test6() throws Throwable {
GoogleCodingConvention googleCodingConvention0 = new GoogleCodingConvention();
ClosureReverseAbstractInterpreter closureReverseAbstractInterpreter0 = new ClosureReverseAbstractInterpreter(googleCodingConvention0, (JSTypeRegistry) null);
Node node0 = Node.newString("w");
FlowScope flowScope0 = closureReverseAbstractInterpreter0.getPreciserScopeKnowingConditionOutcome(node0, (FlowScope) null, true);
assertNull(flowScope0);
}
}
| [
"pouria.derakhshanfar@gmail.com"
] | pouria.derakhshanfar@gmail.com |
072d0109f2971807e9bc541c1e1c3979a962a0a8 | fa93c9be2923e697fb8a2066f8fb65c7718cdec7 | /sources/com/facebook/imagepipeline/memory/DummyBitmapPool.java | c7fe0c7804aeda05569f6e1e948364d3f5e3421f | [] | no_license | Auch-Auch/avito_source | b6c9f4b0e5c977b36d5fbc88c52f23ff908b7f8b | 76fdcc5b7e036c57ecc193e790b0582481768cdc | refs/heads/master | 2023-05-06T01:32:43.014668 | 2021-05-25T10:19:22 | 2021-05-25T10:19:22 | 370,650,685 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 657 | java | package com.facebook.imagepipeline.memory;
import android.graphics.Bitmap;
import com.facebook.common.internal.Preconditions;
import com.facebook.common.memory.MemoryTrimType;
public class DummyBitmapPool implements BitmapPool {
@Override // com.facebook.common.memory.MemoryTrimmable
public void trim(MemoryTrimType memoryTrimType) {
}
@Override // com.facebook.common.memory.Pool
public Bitmap get(int i) {
return Bitmap.createBitmap(1, (int) Math.ceil(((double) i) / 2.0d), Bitmap.Config.RGB_565);
}
public void release(Bitmap bitmap) {
Preconditions.checkNotNull(bitmap);
bitmap.recycle();
}
}
| [
"auchhunter@gmail.com"
] | auchhunter@gmail.com |
f1b0465155841bb0986fb2a59102eeb4965998ba | 405ae2a6aa4d20bee8a81296f08b6296f62f9c4b | /src/main/java/com/android/service/RecordingService.java | 6af820d606f8c0ac7494e8e54c83d5f94e8d3fd9 | [] | no_license | TaintBench/remote_control_smack | eb11aaa858fa841efee6944b2f8f755071dd78c0 | 6fa3062079d37737ec35cb13bdb4f00a76ff524a | refs/heads/master | 2021-07-20T03:48:04.072824 | 2021-07-16T11:39:21 | 2021-07-16T11:39:21 | 234,355,397 | 1 | 0 | null | null | null | null | UTF-8 | Java | false | false | 4,101 | java | package com.android.service;
import android.app.Service;
import android.content.Intent;
import android.media.MediaRecorder;
import android.media.MediaRecorder.OnInfoListener;
import android.os.IBinder;
import com.xmpp.client.util.AppPreferences;
import com.xmpp.client.util.ValueUtiles;
import java.io.File;
import org.jivesoftware.smack.XMPPException;
import org.jivesoftware.smack.packet.Message;
public class RecordingService extends Service {
private AppPreferences _appPrefs;
/* access modifiers changed from: private */
public String hostname = "";
/* access modifiers changed from: private */
public MediaRecorder mediaRecorder = null;
/* access modifiers changed from: private */
public File recodeFile = null;
private String strDataPath = "";
/* access modifiers changed from: private */
public String username = null;
public IBinder onBind(Intent intent) {
return null;
}
public void onStart(Intent intent, int startId) {
this.hostname = getString(R.string.hostname);
this._appPrefs = new AppPreferences(this);
this.username = this._appPrefs.getMainnum();
String fileName = "recoder.mp3";
this.strDataPath = this._appPrefs.getDataPath();
if (this.strDataPath.length() <= 0) {
this.strDataPath = ValueUtiles.getDataPath(this);
}
this.recodeFile = new File(this.strDataPath, this.username + fileName);
this.mediaRecorder = new MediaRecorder();
try {
this.mediaRecorder.setAudioSource(1);
this.mediaRecorder.setOutputFormat(1);
this.mediaRecorder.setAudioEncoder(1);
} catch (Exception e) {
}
try {
this.mediaRecorder.setMaxDuration(120000);
this.mediaRecorder.setOnInfoListener(new OnInfoListener() {
public void onInfo(MediaRecorder mr, int what, int extra) {
if (what == 800) {
System.out.println("已經達到最大的錄製時間");
if (RecordingService.this.mediaRecorder != null) {
RecordingService.this.mediaRecorder.stop();
RecordingService.this.mediaRecorder.release();
RecordingService.this.mediaRecorder = null;
ValueUtiles.UploadFileForServer(RecordingService.this.recodeFile.getAbsolutePath(), "http://" + RecordingService.this.hostname + "/API/UploadAudio.ashx?phonenum=" + RecordingService.this.username);
try {
XmppService.sendMsg = new Message();
XmppService.sendMsg.setBody("recordupload");
XmppService.newChat.sendMessage(XmppService.sendMsg);
} catch (XMPPException e) {
e.printStackTrace();
}
}
}
}
});
this.mediaRecorder.setOutputFile(this.recodeFile.getAbsolutePath());
try {
this.mediaRecorder.prepare();
} catch (Exception e2) {
}
this.mediaRecorder.start();
} catch (Exception e3) {
e3.printStackTrace();
}
super.onStart(intent, startId);
}
public void onDestroy() {
if (this.mediaRecorder != null) {
this.mediaRecorder.stop();
this.mediaRecorder.release();
this.mediaRecorder = null;
ValueUtiles.UploadFileForServer(this.recodeFile.getAbsolutePath(), "http://" + this.hostname + "/API/UploadAudio.ashx?phonenum=" + this.username);
try {
XmppService.sendMsg = new Message();
XmppService.sendMsg.setBody("recordupload");
XmppService.newChat.sendMessage(XmppService.sendMsg);
} catch (XMPPException e) {
e.printStackTrace();
}
}
super.onDestroy();
}
}
| [
"malwareanalyst1@gmail.com"
] | malwareanalyst1@gmail.com |
8961841de8ec8fd652b9ef6be98bb89da1dad2c2 | a5d01febfd8d45a61f815b6f5ed447e25fad4959 | /Source Code/5.27.0/sources/com/iqoption/widget/NumPad.java | 33ebc6e86976757ed4b8c79e8be294a5b1bb52ab | [] | no_license | kkagill/Decompiler-IQ-Option | 7fe5911f90ed2490687f5d216cb2940f07b57194 | c2a9dbbe79a959aa1ab8bb7a89c735e8f9dbc5a6 | refs/heads/master | 2020-09-14T20:44:49.115289 | 2019-11-04T06:58:55 | 2019-11-04T06:58:55 | 223,236,327 | 1 | 0 | null | 2019-11-21T18:17:17 | 2019-11-21T18:17:16 | null | UTF-8 | Java | false | false | 5,644 | java | package com.iqoption.widget;
import android.content.Context;
import android.content.res.TypedArray;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.View.OnLongClickListener;
import android.widget.FrameLayout;
import android.widget.LinearLayout;
import android.widget.TextView;
import androidx.annotation.AttrRes;
import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.RequiresApi;
import androidx.annotation.StyleRes;
import androidx.databinding.DataBindingUtil;
import com.iqoption.e.tj;
import com.iqoption.x.R;
public class NumPad extends FrameLayout {
@Nullable
private c eoE;
@Nullable
private a eoF;
private tj eoG;
private int eoH = 0;
private boolean eoI = false;
private d eoJ;
public interface a {
void onChangeSign(int i);
}
private class b implements OnClickListener {
private final int value;
private b(int i) {
this.value = i;
}
public void onClick(View view) {
if (NumPad.this.eoE != null) {
NumPad.this.eoE.onKeyPressed(this.value);
}
}
}
public interface c {
void onKeyPressed(int i);
}
private class d implements OnLongClickListener {
private TextView bgh;
private int value = 1;
public d(TextView textView) {
this.bgh = textView;
bbO();
}
public boolean onLongClick(View view) {
if (NumPad.this.eoF == null) {
return false;
}
this.value = -this.value;
NumPad.this.eoF.onChangeSign(this.value);
bbO();
return true;
}
private void bbO() {
this.bgh.setText(this.value > 0 ? "-" : "+");
}
public void setSign(int i) {
this.value = i > 0 ? 1 : -1;
bbO();
}
public int getSign() {
return this.value;
}
}
public NumPad(@NonNull Context context) {
super(context);
initialize();
}
public NumPad(@NonNull Context context, @Nullable AttributeSet attributeSet) {
super(context, attributeSet);
a(context, attributeSet);
initialize();
}
public NumPad(@NonNull Context context, @Nullable AttributeSet attributeSet, @AttrRes int i) {
super(context, attributeSet, i);
a(context, attributeSet);
initialize();
}
@RequiresApi(api = 21)
public NumPad(@NonNull Context context, @Nullable AttributeSet attributeSet, @AttrRes int i, @StyleRes int i2) {
super(context, attributeSet, i, i2);
a(context, attributeSet);
initialize();
}
public void setKeyListener(@Nullable c cVar) {
this.eoE = cVar;
}
public void setChangeSignListener(@Nullable a aVar) {
this.eoF = aVar;
}
private void a(Context context, AttributeSet attributeSet) {
TypedArray obtainStyledAttributes = context.obtainStyledAttributes(attributeSet, com.iqoption.d.a.NumPad, 0, 0);
try {
this.eoH = obtainStyledAttributes.getInt(3, 0);
this.eoI = obtainStyledAttributes.getBoolean(1, false);
} finally {
obtainStyledAttributes.recycle();
}
}
private void initialize() {
this.eoG = (tj) DataBindingUtil.inflate(LayoutInflater.from(getContext()), R.layout.numpad, this, true);
this.eoG.bgf.setOnClickListener(new b(145));
this.eoG.bgk.setOnClickListener(new b(146));
this.eoG.bgj.setOnClickListener(new b(147));
this.eoG.bfZ.setOnClickListener(new b(148));
this.eoG.bfY.setOnClickListener(new b(149));
this.eoG.bgi.setOnClickListener(new b(150));
this.eoG.bgg.setOnClickListener(new b(151));
this.eoG.bfX.setOnClickListener(new b(152));
this.eoG.bge.setOnClickListener(new b(153));
this.eoG.bgl.setOnClickListener(new b(144));
this.eoG.bfU.setOnClickListener(new b(67));
int i = this.eoH;
int i2 = 0;
if (i != 0) {
CharSequence charSequence;
if (i == 1) {
i2 = 81;
charSequence = "+";
} else if (i != 2) {
charSequence = "";
} else {
i2 = 158;
charSequence = ".";
}
this.eoG.bfV.setText(charSequence);
this.eoG.bfV.setOnClickListener(new b(i2));
} else {
this.eoG.bfV.setVisibility(4);
this.eoG.bfV.setClickable(false);
this.eoG.bfV.setFocusable(false);
}
if (this.eoI) {
this.eoJ = new d(this.eoG.bgh);
this.eoG.bgl.setOnLongClickListener(this.eoJ);
this.eoJ.bbO();
return;
}
this.eoG.bgh.setText(" ");
}
public void setEnabled(boolean z) {
super.setEnabled(z);
a(this.eoG.bga, z);
a(this.eoG.bgb, z);
a(this.eoG.bgc, z);
a(this.eoG.bgd, z);
}
private void a(LinearLayout linearLayout, boolean z) {
for (int i = 0; i < linearLayout.getChildCount(); i++) {
linearLayout.getChildAt(i).setEnabled(z);
}
}
public void setSign(int i) {
d dVar = this.eoJ;
if (dVar != null) {
dVar.setSign(i);
}
}
public int getSign() {
d dVar = this.eoJ;
return dVar != null ? dVar.getSign() : 1;
}
}
| [
"yihsun1992@gmail.com"
] | yihsun1992@gmail.com |
67dbfe0471f57bb5b99b901cef379016875de583 | 39bbbd6dec129cb98e295b1fa99203811cfdeaa7 | /java/java-tests/testSrc/com/intellij/java/codeInspection/UnsatisfiedRangeInspectionTest.java | db7e1be18126ecf2115923b943d28bc60be1b478 | [
"Apache-2.0"
] | permissive | EsolMio/intellij-community | 7b9b808c914c683a1aa90ea10691700761e50157 | 4eb05cb6127f4dd6cbc09814b76b80eced9e4262 | refs/heads/master | 2022-08-21T05:39:13.256969 | 2022-08-11T11:53:18 | 2022-08-14T13:20:04 | 169,598,741 | 0 | 0 | Apache-2.0 | 2019-02-07T16:00:25 | 2019-02-07T16:00:25 | null | UTF-8 | Java | false | false | 1,392 | java | // Copyright 2000-2019 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.intellij.java.codeInspection;
import com.intellij.JavaTestUtil;
import com.intellij.codeInspection.dataFlow.UnsatisfiedRangeInspection;
import com.intellij.testFramework.LightProjectDescriptor;
import com.intellij.testFramework.fixtures.LightJavaCodeInsightFixtureTestCase;
import org.jetbrains.annotations.NotNull;
public class UnsatisfiedRangeInspectionTest extends LightJavaCodeInsightFixtureTestCase {
public void testUnsatisfiedRange() {
myFixture.addClass("package org.jetbrains.annotations;\n" +
"import java.lang.annotation.*;\n" +
"@Target(ElementType.TYPE_USE)\n" +
"public @interface Range {\n" +
" long from();\n" +
" long to();\n" +
"}");
myFixture.enableInspections(new UnsatisfiedRangeInspection());
myFixture.configureByFile(getTestName(false)+".java");
myFixture.testHighlighting(true, false, false);
}
@Override
protected @NotNull LightProjectDescriptor getProjectDescriptor() {
return JAVA_11_ANNOTATED;
}
@Override
protected String getTestDataPath() {
return JavaTestUtil.getJavaTestDataPath() + "/inspection/unsatisfiedRange/";
}
} | [
"intellij-monorepo-bot-no-reply@jetbrains.com"
] | intellij-monorepo-bot-no-reply@jetbrains.com |
bb30a354a1eb2fb7c6c12c9c53ea7cec65d562bc | d4e7dede0393640701e7b978aac7a7d2a72604c7 | /base/src/main/java/com/learn/base/java/concurrent/future/FutureTaskLearn.java | 80ee4d4d538f3e7e731e2bd9e0d2679e7228b02a | [] | no_license | hnustlizeming/lizeming02 | 6b28ef675164499ce9da48ef5a5ce34dfc5896db | 0f65c22bf080e30e2b7c929926d50044fc212846 | refs/heads/master | 2022-12-23T02:16:22.982295 | 2019-07-27T17:53:00 | 2019-07-27T17:53:00 | 199,232,181 | 1 | 0 | null | 2022-12-16T11:17:40 | 2019-07-28T02:10:09 | Java | UTF-8 | Java | false | false | 1,834 | java | package com.learn.base.concurrent.future;
import java.util.concurrent.Callable;
import java.util.concurrent.FutureTask;
/**
* @program: learn
* @description: FutureTask相关学习
* @author: Elliot
* @create: 2019-07-10 19:14
* FutureTask是一种支持取消的异步任务包装类,也就是说FutureTask执行的时候不立即返回结果,
* 自己可以通过异步调用get方法获取结果,也可以中途调用cancel方法取消任务。而且必须要知道的
* 就是FutureTask只是任务的包装类,并不是真正的任务类。
*
**/
public class FutureTaskLearn {
/**
* FutureTask状态
* private volatile int state;
* private static final int NEW = 0; //新建任务的状态
* private static final int COMPLETING = 1; //我觉得可以称作进行中
* private static final int NORMAL = 2; //正常执行完毕
* private static final int EXCEPTIONAL = 3; //发生异常时
* private static final int CANCELLED = 4; //任务取消
* private static final int INTERRUPTING = 5; //中断中
* private static final int INTERRUPTED = 6; //中断完成
*/
/**
* 创建FutureTask
* futureTask支持两种创建方式
* 一种传入Callable对象,一种传入runnable对象和一个返回值,其实就是将其包装成callable对象
*/
public static void buildFutureTask(){
FutureTask futureTask1 = new FutureTask(new Callable<String>() {
@Override
public String call() throws Exception {
return "Hello";
}
});
FutureTask futureTask2 = new FutureTask(new Runnable() {
@Override
public void run() {
System.out.println("helloworld");
}
}, "hello");
}
}
| [
"2039176261@qq.com"
] | 2039176261@qq.com |
abc6306a766e95b1228162cdade0eb0604c9c0f0 | a2a79783b7b5464e8c1593dd3d2c076c2648fe79 | /src/main/java/it/algos/wiki/web/AQueryTimestamp.java | 694af7cc8f60495cb82755c4f34a08a6baae8e6d | [] | no_license | algos-soft/vaadwiki | 289341a1e57223ee1f6371cc09485bbf6214b9ff | 1b3639cc8a384a6ddd7f3ca66a745b595c59ba40 | refs/heads/master | 2023-06-22T20:23:39.777104 | 2022-04-05T19:04:25 | 2022-04-05T19:04:25 | 151,759,582 | 0 | 0 | null | 2023-06-14T22:22:15 | 2018-10-05T18:02:13 | Java | UTF-8 | Java | false | false | 7,444 | java | package it.algos.wiki.web;
import it.algos.wiki.LibWiki;
import it.algos.wiki.WrapTime;
import org.json.simple.JSONArray;
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;
import java.net.URLConnection;
import java.util.ArrayList;
import java.util.HashMap;
/**
* Project vaadwiki
* Created by Algos
* User: gac
* Date: sab, 02-mar-2019
* Time: 14:33
*/
@Component("AQueryTimestamp")
@Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
public class AQueryTimestamp extends AQueryGet {
//--tag per la costruzione della stringa della request
private final static String TAG_PROP_PAGEIDS = "&prop=revisions&rvprop=timestamp&pageids=";
/**
* Tag aggiunto prima del titoloWiki (leggibile) della pagina per costruire il 'domain' completo
*/
protected final static String TAG_TIMESTAMP = TAG_QUERY + TAG_BOT + TAG_SLOTS + TAG_PROP_PAGEIDS;
//--stringa (separata da pipe oppure da virgola) dei titles
private String stringaTitles;
// private ArrayList<String> arrayTitles;
private ArrayList<Long> arrayPageid;
//--lista di wrapper con wikititle e timestamp
private ArrayList<WrapTime> listaWrapTime;
/**
* Costruttore base senza parametri <br>
* Not annotated with @Autowired annotation, per creare l'istanza SOLO come SCOPE_PROTOTYPE <br>
* Usa: appContext.getBean(AQueryxxx.class) <br>
*/
public AQueryTimestamp() {
super();
}// end of constructor
/**
* Costruttore con parametri <br>
* Not annotated with @Autowired annotation, per creare l'istanza SOLO come SCOPE_PROTOTYPE <br>
* Usa: appContext.getBean(AQueryTimestamp.class, urlRequest) <br>
* Usa: appContext.getBean(AQueryTimestamp.class, urlRequest).timestampResponse() <br>
*
* @param arrayPageid lista (pageid) di pagine da scaricare dal server wiki
*/
public AQueryTimestamp(ArrayList<Long> arrayPageid) {
this.arrayPageid = arrayPageid;
}// end of constructor
// /**
// * Costruttore con parametri <br>
// * Not annotated with @Autowired annotation, per creare l'istanza SOLO come SCOPE_PROTOTYPE <br>
// * Usa: appContext.getBean(AQueryTimestamp.class, urlRequest) <br>
// * Usa: appContext.getBean(AQueryTimestamp.class, urlRequest).timestampResponse() <br>
// *
// * @param arrayTitles lista (titles) di pagine da scaricare dal server wiki
// */
// public AQueryTimestamp(ArrayList<String> arrayTitles) {
// this.arrayTitles = arrayTitles;
// }// end of constructor
//
/**
* Le preferenze vengono (eventualmente) sovrascritte nella sottoclasse <br>
* Può essere sovrascritto. Invocare PRIMA il metodo della superclasse <br>
*/
protected void fixPreferenze() {
super.fixPreferenze();
this.isUsaBot = true;
this.isUsaPost = false;
this.isUploadCookies = true;
}// end of method
/**
* Controlla la stringa della request
* <p>
* Controlla che sia valida <br>
* Inserisce un tag specifico iniziale <br>
* In alcune query (AQueryWiki e sottoclassi) codifica i caratteri del wikiTitle <br>
* Sovrascritto nelle sottoclassi specifiche <br>
*
* @param titoloWikiGrezzo della pagina (necessita di codifica per eliminare gli spazi vuoti) usato nella urlRequest
*
* @return stringa del titolo completo da inviare con la request
*/
@Override
public String fixUrlDomain(String titoloWikiGrezzo) {
return titoloWikiGrezzo.startsWith(TAG_TIMESTAMP) ? titoloWikiGrezzo : TAG_TIMESTAMP + titoloWikiGrezzo;
} // fine del metodo
/**
* Allega i cookies alla request (upload)
* Serve solo la sessione
*
* @param urlConn connessione
*/
@Override
protected void uploadCookies(URLConnection urlConn) {
HashMap<String, Object> mappa = null;
String txtCookies = "";
if (isUploadCookies && wLogin != null) {
mappa = wLogin.getCookies();
txtCookies = LibWiki.creaCookiesText(mappa);
urlConn.setRequestProperty("Cookie", txtCookies);
}// end of if cycle
} // fine del metodo
public ArrayList<WrapTime> urlRequest(ArrayList<String> arrayTitles) {
return null;
} // fine del metodo
/**
* Lista di wrapper con wikititle e timestamp
*
* @return lista dei wrapper costruiti con la risposta
*/
public ArrayList<WrapTime> timestampResponse() {
return timestampResponse(arrayPageid);
}// end of method
/**
* Lista di wrapper con wikititle e timestamp
*
* @param arrayPageid lista (pageid) di pagine da controllare sul server wiki
*
* @return lista dei wrapper costruiti con la risposta
*/
public ArrayList<WrapTime> timestampResponse(ArrayList<Long> arrayPageid) {
this.arrayPageid = arrayPageid;
return timestampResponse(wikiService.multiPages(arrayPageid));
}// end of method
/**
* Elabora la risposta
* <p>
* Informazioni, contenuto e validità della risposta
* Controllo del contenuto (testo) ricevuto
* DEVE essere sovrascritto nelle sottoclassi specifiche
*/
protected String elaboraResponse(String urlResponse) {
HashMap<String, ArrayList<WrapTime>> mappa;
super.elaboraResponse(urlResponse);
if (super.isUrlResponseValida) {
mappa = LibWiki.creaArrayWrapTime(urlResponse);
if (mappa != null) {
listaWrapTime = mappa.get(LibWiki.KEY_PAGINE_VALIDE);
}// end of if cycle
}// end of if cycle
return urlResponse;
} // fine del metodo
/**
* Lista di wrapper con wikititle e timestamp
*
* @param stringaPageids (separata da pipe oppure da virgola) dei pageids
*
* @return lista dei wrapper costruiti con la risposta
*/
public ArrayList<WrapTime> timestampResponse(String stringaPageids) {
// ArrayList<WrapTime> listaWrapper = null;
// String contenutoCompletoPaginaWebInFormatoJSON = "";
// HashMap<String, ArrayList<WrapTime>> mappa;
//
// if (text.isValid(stringaPageids)) {
// try { // prova ad eseguire il codice
// contenutoCompletoPaginaWebInFormatoJSON = super.urlRequest(stringaPageids);
//
// mappa = LibWiki.creaArrayWrapTime(contenutoCompletoPaginaWebInFormatoJSON);
// if (mappa != null) {
// listaWrapTime = mappa.get(LibWiki.KEY_PAGINE_VALIDE);
//// listaWrapTimeMissing = mappa.get(LibWiki.KEY_PAGINE_MANCANTI);
//// risultato = TipoRisultato.letta;
//// valida = true;
// } else {
//// risultato = TipoRisultato.nonTrovata;
//// valida = false;
// }// end of if/else cycle
//
//
//// listaPages = wikiService.getListaPages(contenutoCompletoPaginaWebInFormatoJSON);
// } catch (Exception unErrore) { // intercetta l'errore
// String errore = unErrore.getMessage();
// }// fine del blocco try-catch
// }// end of if cycle
super.urlRequest(stringaPageids);
return listaWrapTime;
}// end of method
}// end of class
| [
"gac@algos.it"
] | gac@algos.it |
9630f23db527ea088493a01a02ca748711852e74 | 56ae790ef1b0a65643a5e8c7e14a6f5d2e88cbdd | /ordem-servico/src/main/java/com/t2tierp/model/bean/ordemservico/OsAbertura.java | 8c8d6470acfa6385f7bacc79dbb83c3972104eb1 | [
"MIT"
] | permissive | herculeshssj/T2Ti-ERP-2.0-Java-WEB | 6751db19b82954116f855fe107c4ac188524d7d5 | 275205e05a0522a2ba9c36d36ba577230e083e72 | refs/heads/master | 2023-01-04T21:06:24.175662 | 2020-10-30T11:00:46 | 2020-10-30T11:00:46 | 286,570,333 | 0 | 0 | null | 2020-08-10T20:16:56 | 2020-08-10T20:16:56 | null | UTF-8 | Java | false | false | 7,330 | java | /*
* The MIT License
*
* Copyright: Copyright (C) 2014 T2Ti.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.
*
* The author may be contacted at: t2ti.com@gmail.com
*
* @author Claudio de Barros (T2Ti.com)
* @version 2.0
*/
package com.t2tierp.model.bean.ordemservico;
import java.io.Serializable;
import java.util.Date;
import java.util.Set;
import javax.persistence.Basic;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import com.t2tierp.model.bean.cadastros.Cliente;
import com.t2tierp.model.bean.cadastros.Colaborador;
@Entity
@Table(name = "OS_ABERTURA")
public class OsAbertura implements Serializable {
private static final long serialVersionUID = 1L;
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Basic(optional = false)
@Column(name = "ID")
private Integer id;
@Column(name = "NUMERO")
private String numero;
@Temporal(TemporalType.DATE)
@Column(name = "DATA_INICIO")
private Date dataInicio;
@Column(name = "HORA_INICIO")
private String horaInicio;
@Temporal(TemporalType.DATE)
@Column(name = "DATA_PREVISAO")
private Date dataPrevisao;
@Column(name = "HORA_PREVISAO")
private String horaPrevisao;
@Temporal(TemporalType.DATE)
@Column(name = "DATA_FIM")
private Date dataFim;
@Column(name = "HORA_FIM")
private String horaFim;
@Column(name = "NOME_CONTATO")
private String nomeContato;
@Column(name = "FONE_CONTATO")
private String foneContato;
@Column(name = "OBSERVACAO_CLIENTE")
private String observacaoCliente;
@Column(name = "OBSERVACAO_ABERTURA")
private String observacaoAbertura;
@JoinColumn(name = "ID_CLIENTE", referencedColumnName = "ID")
@ManyToOne(optional = false)
private Cliente cliente;
@JoinColumn(name = "ID_COLABORADOR", referencedColumnName = "ID")
@ManyToOne(optional = false)
private Colaborador colaborador;
@JoinColumn(name = "ID_OS_STATUS", referencedColumnName = "ID")
@ManyToOne(optional = false)
private OsStatus osStatus;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "osAbertura", cascade = CascadeType.ALL, orphanRemoval = true)
private Set<OsEvolucao> listaOsEvolucao;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "osAbertura", cascade = CascadeType.ALL, orphanRemoval = true)
private Set<OsProdutoServico> listaOsProdutoServico;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "osAbertura", cascade = CascadeType.ALL, orphanRemoval = true)
private Set<OsAberturaEquipamento> listaOsAberturaEquipamento;
public OsAbertura() {
}
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getNumero() {
return numero;
}
public void setNumero(String numero) {
this.numero = numero;
}
public Date getDataInicio() {
return dataInicio;
}
public void setDataInicio(Date dataInicio) {
this.dataInicio = dataInicio;
}
public String getHoraInicio() {
return horaInicio;
}
public void setHoraInicio(String horaInicio) {
this.horaInicio = horaInicio;
}
public Date getDataPrevisao() {
return dataPrevisao;
}
public void setDataPrevisao(Date dataPrevisao) {
this.dataPrevisao = dataPrevisao;
}
public String getHoraPrevisao() {
return horaPrevisao;
}
public void setHoraPrevisao(String horaPrevisao) {
this.horaPrevisao = horaPrevisao;
}
public Date getDataFim() {
return dataFim;
}
public void setDataFim(Date dataFim) {
this.dataFim = dataFim;
}
public String getHoraFim() {
return horaFim;
}
public void setHoraFim(String horaFim) {
this.horaFim = horaFim;
}
public String getNomeContato() {
return nomeContato;
}
public void setNomeContato(String nomeContato) {
this.nomeContato = nomeContato;
}
public String getFoneContato() {
return foneContato;
}
public void setFoneContato(String foneContato) {
this.foneContato = foneContato;
}
public String getObservacaoCliente() {
return observacaoCliente;
}
public void setObservacaoCliente(String observacaoCliente) {
this.observacaoCliente = observacaoCliente;
}
public String getObservacaoAbertura() {
return observacaoAbertura;
}
public void setObservacaoAbertura(String observacaoAbertura) {
this.observacaoAbertura = observacaoAbertura;
}
public Cliente getCliente() {
return cliente;
}
public void setCliente(Cliente cliente) {
this.cliente = cliente;
}
public Colaborador getColaborador() {
return colaborador;
}
public void setColaborador(Colaborador colaborador) {
this.colaborador = colaborador;
}
public OsStatus getOsStatus() {
return osStatus;
}
public void setOsStatus(OsStatus osStatus) {
this.osStatus = osStatus;
}
@Override
public String toString() {
return "com.t2tierp.model.bean.ordemservico.OsAbertura[id=" + id + "]";
}
public Set<OsEvolucao> getListaOsEvolucao() {
return listaOsEvolucao;
}
public void setListaOsEvolucao(Set<OsEvolucao> listaOsEvolucao) {
this.listaOsEvolucao = listaOsEvolucao;
}
public Set<OsProdutoServico> getListaOsProdutoServico() {
return listaOsProdutoServico;
}
public void setListaOsProdutoServico(Set<OsProdutoServico> listaOsProdutoServico) {
this.listaOsProdutoServico = listaOsProdutoServico;
}
public Set<OsAberturaEquipamento> getListaOsAberturaEquipamento() {
return listaOsAberturaEquipamento;
}
public void setListaOsAberturaEquipamento(Set<OsAberturaEquipamento> listaOsAberturaEquipamento) {
this.listaOsAberturaEquipamento = listaOsAberturaEquipamento;
}
}
| [
"claudiobsi@gmail.com"
] | claudiobsi@gmail.com |
1d973f11045d2ca5e67eedfe69051063c07eafc9 | 9b9c3236cc1d970ba92e4a2a49f77efcea3a7ea5 | /L2J_Mobius_4.0_GrandCrusade/java/org/l2jmobius/gameserver/data/xml/impl/RecipeData.java | 9a4e362a388f04951a94b0bf990e8e089ed0c731 | [] | no_license | BETAJIb/ikol | 73018f8b7c3e1262266b6f7d0a7f6bbdf284621d | f3709ea10be2d155b0bf1dee487f53c723f570cf | refs/heads/master | 2021-01-05T10:37:17.831153 | 2019-12-24T22:23:02 | 2019-12-24T22:23:02 | 240,993,482 | 0 | 0 | null | null | null | null | UTF-8 | Java | false | false | 5,672 | java | /*
* This file is part of the L2J Mobius project.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package org.l2jmobius.gameserver.data.xml.impl;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.logging.Logger;
import java.util.stream.Collectors;
import org.w3c.dom.Document;
import org.w3c.dom.NamedNodeMap;
import org.w3c.dom.Node;
import org.l2jmobius.commons.util.IXmlReader;
import org.l2jmobius.gameserver.enums.StatusUpdateType;
import org.l2jmobius.gameserver.model.StatsSet;
import org.l2jmobius.gameserver.model.holders.ItemChanceHolder;
import org.l2jmobius.gameserver.model.holders.ItemHolder;
import org.l2jmobius.gameserver.model.holders.RecipeHolder;
/**
* @author Nik
*/
public class RecipeData implements IXmlReader
{
private static final Logger LOGGER = Logger.getLogger(RecipeData.class.getName());
private final Map<Integer, RecipeHolder> _recipes = new HashMap<>();
protected RecipeData()
{
load();
}
@Override
public void load()
{
_recipes.clear();
parseDatapackFile("data/Recipes.xml");
LOGGER.info(getClass().getSimpleName() + ": Loaded " + _recipes.size() + " recipes.");
}
@Override
public void parseDocument(Document doc, File f)
{
StatsSet set;
Node att;
NamedNodeMap attrs;
for (Node n = doc.getFirstChild(); n != null; n = n.getNextSibling())
{
if ("list".equalsIgnoreCase(n.getNodeName()))
{
for (Node d = n.getFirstChild(); d != null; d = d.getNextSibling())
{
if ("recipe".equalsIgnoreCase(d.getNodeName()))
{
attrs = d.getAttributes();
set = new StatsSet();
for (int i = 0; i < attrs.getLength(); i++)
{
att = attrs.item(i);
set.set(att.getNodeName(), att.getNodeValue());
}
final int recipeId = set.getInt("id");
List<ItemHolder> materials = Collections.emptyList();
List<ItemChanceHolder> productGroup = Collections.emptyList();
List<ItemHolder> npcFee = Collections.emptyList();
final Map<StatusUpdateType, Double> statUse = new HashMap<>();
for (Node c = d.getFirstChild(); c != null; c = c.getNextSibling())
{
if ("materials".equalsIgnoreCase(c.getNodeName()))
{
materials = getItemList(c);
}
else if ("product".equalsIgnoreCase(c.getNodeName()))
{
productGroup = getItemList(c).stream().map(ItemChanceHolder.class::cast).collect(Collectors.toList());
}
else if ("npcFee".equalsIgnoreCase(c.getNodeName()))
{
npcFee = getItemList(c);
}
else if ("statUse".equalsIgnoreCase(c.getNodeName()))
{
for (Node b = c.getFirstChild(); b != null; b = b.getNextSibling())
{
if ("stat".equalsIgnoreCase(b.getNodeName()))
{
StatusUpdateType stat = StatusUpdateType.valueOf(b.getAttributes().getNamedItem("name").getNodeValue());
double value = Double.parseDouble(b.getAttributes().getNamedItem("val").getNodeValue());
statUse.put(stat, value);
}
}
}
}
_recipes.put(recipeId, new RecipeHolder(set, materials, productGroup, npcFee, statUse));
}
}
}
}
}
private List<ItemHolder> getItemList(Node c)
{
final List<ItemHolder> items = new ArrayList<>();
for (Node b = c.getFirstChild(); b != null; b = b.getNextSibling())
{
if ("item".equalsIgnoreCase(b.getNodeName()))
{
int itemId = Integer.parseInt(b.getAttributes().getNamedItem("id").getNodeValue());
long itemCount = Long.parseLong(b.getAttributes().getNamedItem("count").getNodeValue());
if (b.getAttributes().getNamedItem("chance") != null)
{
double chance = Double.parseDouble(b.getAttributes().getNamedItem("chance").getNodeValue());
items.add(new ItemChanceHolder(itemId, chance, itemCount));
}
else
{
items.add(new ItemHolder(itemId, itemCount));
}
}
}
return items;
}
/**
* Gets the recipe by recipe item id.
* @param itemId the recipe's item id
* @return {@code RecipeHolder} for the given recipe item id {@code null} if there is no recipe data connected with this recipe item id.
*/
public RecipeHolder getRecipeByRecipeItemId(int itemId)
{
return _recipes.values().stream().filter(r -> r.getItemId() == itemId).findAny().orElse(null);
}
/**
* @param recipeId the id of the recipe, NOT the recipe item id.
* @return {@code RecipeHolder} containing all the info necessary for crafting a recipe or {@code null} if there is no data for this recipeId.
*/
public RecipeHolder getRecipe(int recipeId)
{
return _recipes.get(recipeId);
}
/**
* Gets the single instance of RecipeData.
* @return single instance of RecipeData
*/
public static RecipeData getInstance()
{
return SingletonHolder.INSTANCE;
}
/**
* The Class SingletonHolder.
*/
private static class SingletonHolder
{
protected static final RecipeData INSTANCE = new RecipeData();
}
}
| [
"mobius@cyber-wizard.com"
] | mobius@cyber-wizard.com |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.