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
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
011300c5b0c5d5a357a574c715752c44ba0c3c58
|
64947f8aa77f2fbb97abf7a1605d881daedab3b3
|
/Insurance System MVC/view/insuranceSystemView/salesView/salesMan/watchActivityPlan/WatchDetailActivityPlanView.java
|
574c65354e7c9a4510e20f089960140a7973fa66
|
[] |
no_license
|
JungSangHyeon/2020-Insurance-System
|
3646d1d83b99c2a7e12736b3104b68a46827d021
|
58d0df95a63d1a26110437eb26ed89c5d446fe51
|
refs/heads/master
| 2022-11-10T21:59:48.291472
| 2020-07-03T02:14:06
| 2020-07-03T02:14:06
| 275,736,859
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 2,544
|
java
|
package view.insuranceSystemView.salesView.salesMan.watchActivityPlan;
import java.awt.Color;
import java.awt.event.ActionListener;
import javax.swing.JLabel;
import model.data.activityPlanData.ActivityPlanData;
import model.dataList.IntDataList;
import view.aConstant.InsuranceSystemViewConstant;
import view.component.BasicLabel;
import view.component.SeparateLine;
import view.component.button.LinkButton;
import view.component.textArea.OutputTextArea;
import view.insuranceSystemView.absInsuranceSystemView.InsuranceSystemView;
public class WatchDetailActivityPlanView extends InsuranceSystemView {
private static final long serialVersionUID = 1L;
// Static
public enum EActionCommands {SigninCustomer,LookupAvailableProduct,WatchActivityPlan, WatchSalesTrainingPlan}
// Constructor
public WatchDetailActivityPlanView(ActionListener actionListener, int activityPlanID, IntDataList<ActivityPlanData> activityPlanList) {
ActivityPlanData watchingActivityPlanData = activityPlanList.search(activityPlanID);
// add component
this.addComponent(new BasicLabel("세부 활동 계획 정보"));
this.addComponent(new SeparateLine(Color.black));
this.addComponent(new JLabel("조회하신 활동 계획의 세부 정보입니다."));
this.addComponent(new OutputTextArea("제목", watchingActivityPlanData.getTitle()));
this.addComponent(new OutputTextArea("날짜", watchingActivityPlanData.getSalesDuration()));
this.addComponent(new OutputTextArea("전체 매출 목표", Integer.toString(watchingActivityPlanData.getSalesGoal())));
this.addComponent(new OutputTextArea("전체 활동목표", watchingActivityPlanData.getActivityGoal()));
this.addComponent(new OutputTextArea("추가 구인 필요량 ", Integer.toString(watchingActivityPlanData.getAdditionalJobOffer())));
this.addComponent(new OutputTextArea("주력 고객 선정 ", watchingActivityPlanData.getSalesTargetCustomer().toString()));
this.addToLinkPanel(
new LinkButton(InsuranceSystemViewConstant.SomeThingLookGreat, "", null),
new LinkButton(InsuranceSystemViewConstant.SomeThingLookNide, "", null),
new LinkButton("고객 가입", EActionCommands.SigninCustomer.name(), actionListener),
new LinkButton("가능 보험 조회", EActionCommands.LookupAvailableProduct.name(), actionListener),
new LinkButton("판매 활동 조회", EActionCommands.WatchActivityPlan.name(), actionListener),
new LinkButton("영업 활동 조회", EActionCommands.WatchSalesTrainingPlan.name(), actionListener)
);
}
}
|
[
"solea1204@naver.com"
] |
solea1204@naver.com
|
0859a6c404e4c92359981881975b06b7b5d519a8
|
d08b7b8ecbfcdb181093aeed4d2c95d118bc8c51
|
/igc-clientlibrary/src/main/java/org/odpi/egeria/connectors/ibm/igc/clientlibrary/model/base/MwbDatabaseAlias.java
|
8c551fc082a05dd98be9962be5116bf42b0e4faf
|
[
"CC-BY-4.0",
"Apache-2.0"
] |
permissive
|
odpi/egeria-connector-ibm-information-server
|
fd2c7e8dfb26f0daeec4b18b2355092c444cce8a
|
ad84432f4488392ee2813fa69488b7a0a71a3fe5
|
refs/heads/main
| 2023-08-31T23:21:28.510833
| 2023-06-05T08:34:47
| 2023-06-05T08:34:47
| 181,748,801
| 23
| 20
|
Apache-2.0
| 2023-09-04T18:21:55
| 2019-04-16T18:55:17
|
Java
|
UTF-8
|
Java
| false
| false
| 3,857
|
java
|
/* SPDX-License-Identifier: Apache-2.0 */
/* Copyright Contributors to the ODPi Egeria project. */
package org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.base;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonAutoDetect;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonTypeName;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.NONE;
import static com.fasterxml.jackson.annotation.JsonAutoDetect.Visibility.PUBLIC_ONLY;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.common.Reference;
import org.odpi.egeria.connectors.ibm.igc.clientlibrary.model.common.ItemList;
/**
* POJO for the {@code mwb_database_alias} asset type in IGC, displayed as '{@literal Database Alias}' in the IGC UI.
* <br><br>
* (this code has been created based on out-of-the-box IGC metadata types.
* If modifications are needed, eg. to handle custom attributes,
* extending from this class in your own custom class is the best approach.)
*/
@JsonTypeInfo(use=JsonTypeInfo.Id.NAME, include=JsonTypeInfo.As.EXISTING_PROPERTY, property="_type", visible=true, defaultImpl=MwbDatabaseAlias.class)
@JsonAutoDetect(getterVisibility=PUBLIC_ONLY, setterVisibility=PUBLIC_ONLY, fieldVisibility=NONE)
@JsonInclude(JsonInclude.Include.NON_NULL)
@JsonIgnoreProperties(ignoreUnknown=true)
@JsonTypeName("mwb_database_alias")
public class MwbDatabaseAlias extends Reference {
@JsonProperty("database")
protected Database database;
@JsonProperty("name")
protected String name;
@JsonProperty("referenced_by_jobs")
protected ItemList<Dsjob> referencedByJobs;
@JsonProperty("type")
protected String type;
/**
* Retrieve the {@code database} property (displayed as '{@literal Database}') of the object.
* @return {@code Database}
*/
@JsonProperty("database")
public Database getDatabase() { return this.database; }
/**
* Set the {@code database} property (displayed as {@code Database}) of the object.
* @param database the value to set
*/
@JsonProperty("database")
public void setDatabase(Database database) { this.database = database; }
/**
* Retrieve the {@code name} property (displayed as '{@literal Name}') of the object.
* @return {@code String}
*/
@JsonProperty("name")
public String getTheName() { return this.name; }
/**
* Set the {@code name} property (displayed as {@code Name}) of the object.
* @param name the value to set
*/
@JsonProperty("name")
public void setTheName(String name) { this.name = name; }
/**
* Retrieve the {@code referenced_by_jobs} property (displayed as '{@literal Referenced by Jobs}') of the object.
* @return {@code ItemList<Dsjob>}
*/
@JsonProperty("referenced_by_jobs")
public ItemList<Dsjob> getReferencedByJobs() { return this.referencedByJobs; }
/**
* Set the {@code referenced_by_jobs} property (displayed as {@code Referenced by Jobs}) of the object.
* @param referencedByJobs the value to set
*/
@JsonProperty("referenced_by_jobs")
public void setReferencedByJobs(ItemList<Dsjob> referencedByJobs) { this.referencedByJobs = referencedByJobs; }
/**
* Retrieve the {@code type} property (displayed as '{@literal Type}') of the object.
* @return {@code String}
*/
@JsonProperty("type")
public String getTheType() { return this.type; }
/**
* Set the {@code type} property (displayed as {@code Type}) of the object.
* @param type the value to set
*/
@JsonProperty("type")
public void setTheType(String type) { this.type = type; }
}
|
[
"chris@thegrotes.net"
] |
chris@thegrotes.net
|
6702e4d9ee76211f42195992155ce4ede1339615
|
5fa48a0da4bb139dd859c11c255114ef6872ba76
|
/alipaysdk/src/main/java/com/alipay/api/response/AlipayOpenPublicLabelCreateResponse.java
|
a0ae0538f50d9a40275494ba709e7ef053d70cf0
|
[] |
no_license
|
zhangzui/alipay_sdk
|
0b6c4ff198fc5c1249ff93b4d26245405015f70f
|
e86b338364b24f554e73a6be430265799765581c
|
refs/heads/master
| 2020-03-22T17:43:26.553694
| 2018-07-11T10:28:33
| 2018-07-11T10:28:33
| 140,411,652
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 840
|
java
|
package com.alipay.api.response;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: alipay.open.public.label.create response.
*
* @author auto create
* @since 1.0, 2016-12-08 11:55:52
*/
public class AlipayOpenPublicLabelCreateResponse extends AlipayResponse {
private static final long serialVersionUID = 1119647237915523919L;
/**
* 支付宝返回的标签ID,开发者后续通过该ID进行标签的查询、修改、删除等操作
*/
@ApiField("id")
private Long id;
/**
* 开发者传入name的值
*/
@ApiField("name")
private String name;
public void setId(Long id) {
this.id = id;
}
public Long getId( ) {
return this.id;
}
public void setName(String name) {
this.name = name;
}
public String getName( ) {
return this.name;
}
}
|
[
"zhangzuizui@qq.com"
] |
zhangzuizui@qq.com
|
2b8328bb30b90e553a76e2515e23f7cb722c243a
|
b098dc80fedd6a269705f04cc7ab99ca4191c7da
|
/Chapter03/src/Thread3_1/Thread3_1_11/stack_2_old/P_Thread.java
|
74873b2d931228998ad5ff742413db6e5f92cd7c
|
[] |
no_license
|
WingedCat/Multithread
|
ee9eaf4b277d9d309c8611b25cec07a189a1eba9
|
80489a5482a2f798d248d16d286d54afc793ae47
|
refs/heads/master
| 2020-04-25T21:16:44.607837
| 2019-03-23T09:06:23
| 2019-03-23T09:06:23
| 173,075,598
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 260
|
java
|
package Thread3_1.Thread3_1_11.stack_2_old;
public class P_Thread extends Thread {
private P p;
public P_Thread(P p){
this.p = p;
}
@Override
public void run(){
while(true){
p.pushService();
}
}
}
|
[
"2233749193@qq.com"
] |
2233749193@qq.com
|
a5b53b264e37a2f8f10c2539f0b85aa59f636dbf
|
0f93c503d224d28e35223106c2678691dc686163
|
/basic-application/basic-application-webapp/src/main/java/fr/openwide/core/basicapp/web/application/common/form/impl/UserGroupChoiceRenderer.java
|
b39d7acbb358737298244a2e2919370ea468e6f3
|
[
"Apache-2.0"
] |
permissive
|
designreuse/owsi-core-parent
|
31e0940ac045fa1b1a89a2e0b136706555d945bb
|
a65f5a6f378ff7049cbe333224fb548a16ff90b7
|
refs/heads/master
| 2021-09-25T02:47:50.766317
| 2018-10-17T11:39:25
| 2018-10-17T11:39:25
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 978
|
java
|
package fr.openwide.core.basicapp.web.application.common.form.impl;
import org.apache.wicket.markup.html.form.ChoiceRenderer;
import fr.openwide.core.basicapp.core.business.user.model.UserGroup;
import fr.openwide.core.basicapp.web.application.common.renderer.UserGroupRenderer;
import fr.openwide.core.wicket.more.rendering.GenericEntityIdStringRenderer;
public final class UserGroupChoiceRenderer extends ChoiceRenderer<UserGroup> {
private static final long serialVersionUID = 8473460282352945231L;
private static final UserGroupChoiceRenderer INSTANCE = new UserGroupChoiceRenderer();
public static UserGroupChoiceRenderer get() {
return INSTANCE;
}
private UserGroupChoiceRenderer() {
}
@Override
public Object getDisplayValue(UserGroup user) {
return user != null ? UserGroupRenderer.get().render(user, null) : "";
}
@Override
public String getIdValue(UserGroup user, int index) {
return GenericEntityIdStringRenderer.get().render(user);
}
}
|
[
"guillaume.smet@gmail.com"
] |
guillaume.smet@gmail.com
|
c600bfa89b9f8abf96441f2910173c3d87db2f00
|
ef50e50e0b61db62d0476b5b7df3d5f5044a16a9
|
/Graph_theory/kingdom-connectivity/java/lwc626.java
|
39f12cfd2392e2ad4187713948c6e56fbd0bc287
|
[] |
no_license
|
saketrule/Research_Project-HackerRank_CheckStyle
|
09fd6ef3a067926c754af693b13566cc55fe16ae
|
4334bcbc4620fb94fd3d63034a320756e7233ded
|
refs/heads/master
| 2021-01-22T13:03:08.055929
| 2017-09-12T12:11:19
| 2017-09-12T12:11:19
| 102,361,527
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,769
|
java
|
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Comparator;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.Writer;
import java.util.StringTokenizer;
import java.util.Queue;
import java.util.LinkedList;
import java.util.Collection;
import java.io.InputStream;
/**
* Built using CHelper plug-in
* Actual solution is at the top
* @author lwc626
*/
public class Solution {
public static void main(String[] args) {
InputStream inputStream = System.in;
OutputStream outputStream = System.out;
MyInputReader in = new MyInputReader(inputStream);
MyOutputWriter out = new MyOutputWriter(outputStream);
Kingdom_Connectivity solver = new Kingdom_Connectivity();
solver.solve(1, in, out);
out.close();
}
}
class Kingdom_Connectivity {
static final int mod = 1000000000;
public void solve(int testNumber, MyInputReader in, MyOutputWriter out) {
int N = in.nextInt(), M = in.nextInt();
int[] from = new int[M], to = new int[M];
IOUtils.readIntArrays(in, from, to);
ArrayUtils.decreaseByOne(from, to);
int[][] graph = GraphUtils.buildSimpleGraph(N, from, to, true);
getDAG(out, graph);
//IOUtils.printIntArrays( out,color );
int[] belongCnt = new int[bcnt + 1];
for (int i = 0; i < N; i++)
belongCnt[color[i]]++;
int[] dp = new int[bcnt + 1];
Arrays.fill(dp, 0);
HashMap<Integer, ArrayList<Integer>> G = new HashMap<Integer, ArrayList<Integer>>();
for (int i = 1; i <= bcnt; i++) G.put(i, new ArrayList<Integer>());
int[] degree = new int[bcnt + 1];
Arrays.fill( degree , 0 );
for (int i = 0; i < M; i++) {
from[i] = color[from[i]];
to[i] = color[to[i]];
if (from[i] != to[i]) {
G.get(from[i]).add(to[i]);
}else dp[ from[i] ] = -1;
}
Queue<Integer> Q = new LinkedList<Integer>();
Q.offer( color[0] );
boolean [] mark = new boolean[ bcnt + 1];
Arrays.fill( mark , false ) ;
mark[ color[0] ] = true;
while (!Q.isEmpty() ){
int now = Q.poll();
for (int v : G.get(now)) {
++degree[v];
if( !mark[v] ){
Q.offer( v );
mark[v] = true;
}
}
}
if( dp[color[0] ] == 0 )
dp[color[0]] = 1;
Q.offer(color[0]);
while (!Q.isEmpty()) {
int now = Q.poll();
for (int v : G.get(now)) {
if (dp[now] == -1 || dp[v] == -1 )
dp[v] = -1;
else
dp[v] = (dp[v] + dp[now]) % mod;
if (--degree[v] == 0)
Q.offer(v);
}
}
//out.printLine( dp[ color[N-1] ] );
out.printLine(dp[color[N - 1]] != -1 ? dp[color[N - 1]] : "INFINITE PATHS");
}
static int dfsIndex, stackTop, bcnt;
static int[] color, minDfsNumber, dfsNumber, stack;
static boolean[] inStack;
public static int[] getDAG(MyOutputWriter out, int[][] graph) {
int vertexCount = graph.length;
color = new int[vertexCount];
minDfsNumber = new int[vertexCount];
dfsNumber = new int[vertexCount];
stack = new int[vertexCount + 1];
inStack = new boolean[vertexCount];
dfsIndex = 0;
stackTop = 0;
bcnt = 0;
Arrays.fill(color, -1);
Arrays.fill(dfsNumber, 0);
for (int i = 0; i < vertexCount; i++)
if (color[i] == -1) {
tarjan(graph, i);
}
//System.out.println( dfsIndex +" " + stackTop +" "+ bcnt);
//IOUtils.printIntArrays( out,dfsNumber ,minDfsNumber );
return color;
}
public static void tarjan(int[][] graph, int u) {
dfsNumber[u] = minDfsNumber[u] = ++dfsIndex;
stack[++stackTop] = u;
inStack[u] = true;
for (int v : graph[u]) {
if (dfsNumber[v] == 0) {
tarjan(graph, v);
minDfsNumber[u] = Math.min(minDfsNumber[u], minDfsNumber[v]);
} else if (inStack[v]) {
minDfsNumber[u] = Math.min(minDfsNumber[u], dfsNumber[v]);
}
}
if (dfsNumber[u] == minDfsNumber[u]) {
int v;
++bcnt;
do {
v = stack[stackTop--];
inStack[v] = false;
color[v] = bcnt;
} while (v != u);
}
}
}
class MyInputReader {
private BufferedReader reader;
private StringTokenizer tokenizer;
public MyInputReader(InputStream stream) {
reader = new BufferedReader(new InputStreamReader(stream));
tokenizer = null;
}
public String next() {
while (tokenizer == null || !tokenizer.hasMoreTokens()) {
try {
tokenizer = new StringTokenizer(reader.readLine());
} catch (IOException e) {
throw new RuntimeException(e);
}
}
return tokenizer.nextToken();
}
public int nextInt() {
return Integer.parseInt(next());
}
}
class MyOutputWriter {
private final PrintWriter writer;
public MyOutputWriter(OutputStream outputStream) {
writer = new PrintWriter(outputStream);
}
public MyOutputWriter(Writer writer) {
this.writer = new PrintWriter(writer);
}
public void print(Object...objects) {
for (int i = 0; i < objects.length; i++) {
if (i != 0)
writer.print(' ');
writer.print(objects[i]);
}
}
public void printLine(Object...objects) {
print(objects);
writer.println();
}
public void close() {
writer.close();
}
}
class IOUtils {
public static void readIntArrays( MyInputReader in,int[]... arrays ){
for(int i = 0 ; i < arrays[0].length; i++ )
for( int j = 0 ; j < arrays.length ; j ++ )
arrays[j][i] = in.nextInt();
}
}
class ArrayUtils {
public static void decreaseByOne(int[]... arrays){
for(int[] array:arrays)
for( int i = 0 ; i < array.length ; i++ )
array[i] --;
}
}
class GraphUtils {
public static int[][] buildGraph(int vertexCount, int[] from, int[] to ,boolean isDirected ) {
int edgeCount = from.length;
int[] degree = new int[vertexCount];
for (int i = 0; i < edgeCount; i++) {
degree[from[i]]++;
if(!isDirected)degree[to[i]]++;
}
int[][] graph = new int[vertexCount][];
for (int i = 0; i < vertexCount; i++) {
graph[i] = new int[degree[i]];
}
for (int i = 0; i < edgeCount; i++) {
graph[from[i]][--degree[from[i]]] = i;
if(!isDirected)graph[to[i]][--degree[to[i]]] = i;
}
return graph;
}
public static int otherVertex(int vertex, int from, int to) {
return from + to - vertex;
}
public static int[][] buildSimpleGraph(int vertexCount, int[] from, int[] to,boolean isDirected) {
int[][] graph = buildGraph(vertexCount, from, to,isDirected);
simplifyGraph(graph, from, to);
return graph;
}
private static void simplifyGraph(int[][] graph, int[] from, int[] to) {
for (int i = 0; i < graph.length; i++)
for (int j = 0; j < graph[i].length; j++)
graph[i][j] = otherVertex(i, from[graph[i][j]], to[graph[i][j]]);
}
}
|
[
"anonymoussaketjoshi@gmail.com"
] |
anonymoussaketjoshi@gmail.com
|
b48c73c3329a60043b003a63b41a0d73ee29e2ce
|
59e6dc1030446132fb451bd711d51afe0c222210
|
/components/mediation-statistics/org.wso2.carbon.mediation.statistics/4.2.0/src/main/java/org/wso2/carbon/mediation/statistics/StatisticsUtil.java
|
4bddece88a1145e6b54620de73d8b348196140cf
|
[] |
no_license
|
Alsan/turing-chunk07
|
2f7470b72cc50a567241252e0bd4f27adc987d6e
|
e9e947718e3844c07361797bd52d3d1391d9fb5e
|
refs/heads/master
| 2020-05-26T06:20:24.554039
| 2014-02-07T12:02:53
| 2014-02-07T12:02:53
| 38,284,349
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,134
|
java
|
/*
* Copyright (c) 2005-2010, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* WSO2 Inc. 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.wso2.carbon.mediation.statistics;
import org.apache.log4j.Logger;
import org.apache.synapse.aspects.ComponentType;
import java.util.List;
public class StatisticsUtil {
private static Logger log = Logger.getLogger(StatisticsUtil.class);
public static final String ENDPOINT_CATEGORY = "endpoint";
public static final String PROXY_SERVICE_CATEGORY = "proxy-service";
public static final String SEQUENCE_CATEGORY = "sequence";
public static final String IN_DIRECTION = "in";
public static final String OUT_DIRECTION = "out";
public static StatisticsRecord getCombinedRecord(List<StatisticsRecord> records) {
if (records == null || records.size() == 0) {
return null;
}
StatisticsRecord combinedRecord = new StatisticsRecord(records.get(0));
records.remove(0);
for (StatisticsRecord r : records) {
combinedRecord.updateRecord(r);
}
return combinedRecord;
}
public static ComponentType getComponentType(int type) {
switch (type) {
case StatisticsConstants.ENDPOINT_STATISTICS : return ComponentType.ENDPOINT;
case StatisticsConstants.PROXY_SERVICE_STATISTICS: return ComponentType.PROXYSERVICE;
case StatisticsConstants.SEQUENCE_STATISTICS: return ComponentType.SEQUENCE;
default: return null;
}
}
public static String getCategory(long category) throws MediationStatisticsException {
switch ((int) category) {
case StatisticsConstants.ENDPOINT_STATISTICS:
return ENDPOINT_CATEGORY;
case StatisticsConstants.PROXY_SERVICE_STATISTICS:
return PROXY_SERVICE_CATEGORY;
case StatisticsConstants.SEQUENCE_STATISTICS:
return SEQUENCE_CATEGORY;
default:
handleException("Unknown category");
}
return "";
}
public static String getDirection(long direction) throws MediationStatisticsException {
switch ((int) direction) {
case StatisticsConstants.IN:
return IN_DIRECTION;
case StatisticsConstants.OUT:
return OUT_DIRECTION;
default:
handleException("Unknown direction");
}
return "";
}
public static long getCategory(String catetory) throws MediationStatisticsException {
if (ENDPOINT_CATEGORY.equals(catetory)) {
return StatisticsConstants.ENDPOINT_STATISTICS;
} else if (PROXY_SERVICE_CATEGORY.equals(catetory)) {
return StatisticsConstants.PROXY_SERVICE_STATISTICS;
} else if (SEQUENCE_CATEGORY.equals(catetory)) {
return StatisticsConstants.SEQUENCE_STATISTICS;
} else {
handleException("Unknow category " + catetory);
}
return -1;
}
public static long getDirection(String direction) throws MediationStatisticsException {
if (IN_DIRECTION.equals(direction)) {
return StatisticsConstants.IN;
} else if (OUT_DIRECTION.equals(direction)) {
return StatisticsConstants.OUT;
} else {
handleException("Unknown direction " + direction);
}
return -1;
}
private static void handleException(String msg) throws MediationStatisticsException {
log.error(msg);
throw new MediationStatisticsException(msg);
}
}
|
[
"malaka@wso2.com"
] |
malaka@wso2.com
|
4c06c08f5c6fd3dbab65ae00d7c940afac2effa0
|
156ed60b65c508f7210f279a6680280a10006400
|
/2.JavaCore/src/com/javarush/task/task20/task2019/Solution.java
|
79295ec8142fe5b2a22b78cecdeaaeaf82ec2f27
|
[] |
no_license
|
Abergaz/JavaRushTasks
|
90f42c6d37402098528d5cb6b7dfb63bd51220ae
|
5dcb38dff61c09384bf711d2357848f7327b08ec
|
refs/heads/master
| 2020-04-29T02:16:21.371765
| 2019-07-23T11:13:27
| 2019-07-23T11:13:27
| 175,760,604
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,891
|
java
|
package com.javarush.task.task20.task2019;
import java.io.*;
import java.util.HashMap;
import java.util.Map;
/*
Исправить ошибку. Сериализация
После десериализации объекта класса Solution обнаружили, что данных в словаре [m] нет :(
Исправить 1 ошибку.
Требования:
1. В классе Solution не должно быть метода void Solution без параметров.
2. В классе Solution должен существовать конструктор без параметров.
3. В классе Solution должен существовать метод size без параметров.
4. В классе Solution метод size должен возвращать значение типа int.
*/
public class Solution implements Serializable {
public static void main(String args[]) throws Exception {
FileOutputStream fileOutput = new FileOutputStream("C:\\1.txt");
ObjectOutputStream outputStream = new ObjectOutputStream(fileOutput);
Solution solution = new Solution();
outputStream.writeObject(solution);
fileOutput.close();
outputStream.close();
//load
FileInputStream fiStream = new FileInputStream("C:\\1.txt");
ObjectInputStream objectStream = new ObjectInputStream(fiStream);
Solution loadedObject = (Solution) objectStream.readObject();
fiStream.close();
objectStream.close();
//Attention!!
System.out.println(loadedObject.size());
}
private Map<String, String> m = new HashMap<>();
public Map<String, String> getMap() {
return m;
}
public Solution() {
m.put("Mickey", "Mouse");
m.put("Mickey", "Mantle");
}
public int size() {
return m.size();
}
}
|
[
"zagreba@gmail.com"
] |
zagreba@gmail.com
|
ce105ea9dd7ee3a489a30872c2e59d846c6d8306
|
2cd9e29634541b889335b0a7f9f6efe83b871ce6
|
/demo/repo/app/src/test/java/org/springframework/samples/petclinic/service/AbstractClinicServiceTests.java
|
5088c7d46fc2ac454285bc1b80ba98ff2371bb56
|
[
"MIT"
] |
permissive
|
mrsonicblue/docker-workflow-plugin
|
b125cbf658165d0d096fbe3a39e8a845b18c12e2
|
6c80d6e35478520c4f498f1e758c2c8289dde6d3
|
refs/heads/master
| 2021-09-08T23:30:14.988121
| 2020-01-01T22:54:18
| 2020-01-01T22:54:18
| 231,271,634
| 0
| 1
|
MIT
| 2021-09-01T02:28:18
| 2020-01-01T22:40:05
|
Java
|
UTF-8
|
Java
| false
| false
| 7,267
|
java
|
/*
* Copyright 2002-2013 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.samples.petclinic.service;
import static org.assertj.core.api.Assertions.assertThat;
import java.util.Collection;
import org.joda.time.DateTime;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.samples.petclinic.model.Owner;
import org.springframework.samples.petclinic.model.Pet;
import org.springframework.samples.petclinic.model.PetType;
import org.springframework.samples.petclinic.model.Vet;
import org.springframework.samples.petclinic.model.Visit;
import org.springframework.samples.petclinic.util.EntityUtils;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.transaction.annotation.Transactional;
/**
* <p> Base class for {@link ClinicService} integration tests. </p> <p> Subclasses should specify Spring context
* configuration using {@link ContextConfiguration @ContextConfiguration} annotation </p> <p>
* AbstractclinicServiceTests and its subclasses benefit from the following services provided by the Spring
* TestContext Framework: </p> <ul> <li><strong>Spring IoC container caching</strong> which spares us unnecessary set up
* time between test execution.</li> <li><strong>Dependency Injection</strong> of test fixture instances, meaning that
* we don't need to perform application context lookups. See the use of {@link Autowired @Autowired} on the <code>{@link
* AbstractclinicServiceTests#clinicService clinicService}</code> instance variable, which uses autowiring <em>by
* type</em>. <li><strong>Transaction management</strong>, meaning each test method is executed in its own transaction,
* which is automatically rolled back by default. Thus, even if tests insert or otherwise change database state, there
* is no need for a teardown or cleanup script. <li> An {@link org.springframework.context.ApplicationContext
* ApplicationContext} is also inherited and can be used for explicit bean lookup if necessary. </li> </ul>
*
* @author Ken Krebs
* @author Rod Johnson
* @author Juergen Hoeller
* @author Sam Brannen
* @author Michael Isvy
*/
public abstract class AbstractClinicServiceTests {
@Autowired
protected ClinicService clinicService;
@Test
public void shouldFindOwnersByLastName() {
Collection<Owner> owners = this.clinicService.findOwnerByLastName("Davis");
assertThat(owners.size()).isEqualTo(2);
owners = this.clinicService.findOwnerByLastName("Daviss");
assertThat(owners.isEmpty());
}
@Test
public void shouldFindSingleOwnerWithPet() {
Owner owner = this.clinicService.findOwnerById(1);
assertThat(owner.getLastName()).startsWith("Franklin");
assertThat(owner.getPets().size()).isEqualTo(1);
}
@Test
@Transactional
public void shouldInsertOwner() {
Collection<Owner> owners = this.clinicService.findOwnerByLastName("Schultz");
int found = owners.size();
Owner owner = new Owner();
owner.setFirstName("Sam");
owner.setLastName("Schultz");
owner.setAddress("4, Evans Street");
owner.setCity("Wollongong");
owner.setTelephone("4444444444");
this.clinicService.saveOwner(owner);
assertThat(owner.getId().longValue()).isNotEqualTo(0);
owners = this.clinicService.findOwnerByLastName("Schultz");
assertThat(owners.size()).isEqualTo(found + 1);
}
@Test
@Transactional
public void shouldUpdateOwner() {
Owner owner = this.clinicService.findOwnerById(1);
String oldLastName = owner.getLastName();
String newLastName = oldLastName + "X";
owner.setLastName(newLastName);
this.clinicService.saveOwner(owner);
// retrieving new name from database
owner = this.clinicService.findOwnerById(1);
assertThat(owner.getLastName()).isEqualTo(newLastName);
}
@Test
public void shouldFindPetWithCorrectId() {
Pet pet7 = this.clinicService.findPetById(7);
assertThat(pet7.getName()).startsWith("Samantha");
assertThat(pet7.getOwner().getFirstName()).isEqualTo("Jean");
}
@Test
public void shouldFindAllPetTypes() {
Collection<PetType> petTypes = this.clinicService.findPetTypes();
PetType petType1 = EntityUtils.getById(petTypes, PetType.class, 1);
assertThat(petType1.getName()).isEqualTo("cat");
PetType petType4 = EntityUtils.getById(petTypes, PetType.class, 4);
assertThat(petType4.getName()).isEqualTo("snake");
}
@Test
@Transactional
public void shouldInsertPetIntoDatabaseAndGenerateId() {
Owner owner6 = this.clinicService.findOwnerById(6);
int found = owner6.getPets().size();
Pet pet = new Pet();
pet.setName("bowser");
Collection<PetType> types = this.clinicService.findPetTypes();
pet.setType(EntityUtils.getById(types, PetType.class, 2));
pet.setBirthDate(new DateTime());
owner6.addPet(pet);
assertThat(owner6.getPets().size()).isEqualTo(found + 1);
this.clinicService.savePet(pet);
this.clinicService.saveOwner(owner6);
owner6 = this.clinicService.findOwnerById(6);
assertThat(owner6.getPets().size()).isEqualTo(found + 1);
// checks that id has been generated
assertThat(pet.getId()).isNotNull();
}
@Test
@Transactional
public void sholdUpdatePetName() throws Exception {
Pet pet7 = this.clinicService.findPetById(7);
String oldName = pet7.getName();
String newName = oldName + "X";
pet7.setName(newName);
this.clinicService.savePet(pet7);
pet7 = this.clinicService.findPetById(7);
assertThat(pet7.getName()).isEqualTo(newName);
}
@Test
public void shouldFindVets() {
Collection<Vet> vets = this.clinicService.findVets();
Vet vet = EntityUtils.getById(vets, Vet.class, 3);
assertThat(vet.getLastName()).isEqualTo("Douglas");
assertThat(vet.getNrOfSpecialties()).isEqualTo(2);
assertThat(vet.getSpecialties().get(0).getName()).isEqualTo("dentistry");
assertThat(vet.getSpecialties().get(1).getName()).isEqualTo("surgery");
}
@Test
@Transactional
public void shouldAddNewVisitForPet() {
Pet pet7 = this.clinicService.findPetById(7);
int found = pet7.getVisits().size();
Visit visit = new Visit();
pet7.addVisit(visit);
visit.setDescription("test");
this.clinicService.saveVisit(visit);
this.clinicService.savePet(pet7);
pet7 = this.clinicService.findPetById(7);
assertThat(pet7.getVisits().size()).isEqualTo(found + 1);
assertThat(visit.getId()).isNotNull();
}
}
|
[
"jglick@cloudbees.com"
] |
jglick@cloudbees.com
|
601395077d6d86d9f1af10261320f976851540c1
|
06160568a0c464f3e4ddbe41573b575ed77016fd
|
/library/src/main/java/cn/itsite/aguider/position/IPosition.java
|
a006d4d886a993755f1930c439e7eeafec130f47
|
[
"Apache-2.0"
] |
permissive
|
leguang/AGuider
|
a116c9c6dbc42b7db47fe83cc8a70134b4689ffa
|
dad63627020d0a787792adf85db60f2607c0ac73
|
refs/heads/master
| 2021-09-14T14:55:44.305902
| 2018-05-15T09:06:26
| 2018-05-15T09:06:26
| 112,313,075
| 17
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 285
|
java
|
package cn.itsite.aguider.position;
/**
* @author leguang
* @version v0.0.0
* @E-mail langmanleguang@qq.com
* @time 2017/11/27 0027 18:41
*/
public interface IPosition {
int left(int x, int highlightWidth, int width);
int top(int y, int highlightHeight, int height);
}
|
[
"langmanleguang@qq.com"
] |
langmanleguang@qq.com
|
b2887a542a1699d6e827ca78e9513b3be7443182
|
c24365b0bc1b66cab982b79ddcd4292bcd12fde9
|
/src/main/java/org/jukeboxmc/block/BlockDeepslateTileDoubleSlab.java
|
788b85cecf4739a99d4933dba1dbcee122bf18f0
|
[] |
no_license
|
EinBexiii/JukeboxMC
|
ef80f9ab937aa27a39375699478caead58882292
|
badf160762d7cb8eea3cba4098d84bd4331067c4
|
refs/heads/master
| 2023-06-06T20:32:57.241985
| 2021-07-08T14:25:01
| 2021-07-08T14:25:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,068
|
java
|
package org.jukeboxmc.block;
import org.jukeboxmc.block.direction.BlockFace;
import org.jukeboxmc.item.Item;
import org.jukeboxmc.item.ItemDeepslateTileSlab;
import org.jukeboxmc.math.Vector;
import org.jukeboxmc.player.Player;
import org.jukeboxmc.world.World;
/**
* @author LucGamesYT
* @version 1.0
*/
public class BlockDeepslateTileDoubleSlab extends BlockSlab {
public BlockDeepslateTileDoubleSlab() {
super( "minecraft:deepslate_tile_double_slab" );
}
@Override
public boolean placeBlock( Player player, World world, Vector blockPosition, Vector placePosition, Vector clickedPosition, Item itemIndHand, BlockFace blockFace ) {
super.placeBlock( player, world, blockPosition, placePosition, clickedPosition, itemIndHand, blockFace );
world.setBlock( placePosition, this );
return true;
}
@Override
public ItemDeepslateTileSlab toItem() {
return new ItemDeepslateTileSlab();
}
@Override
public BlockType getBlockType() {
return BlockType.DEEPSLATE_TILE_SLAB;
}
}
|
[
"beckerluca16@gmail.com"
] |
beckerluca16@gmail.com
|
2a612ba5fb66f28f08ec8c590beb2cf6053f6a0d
|
723fd77bbb8c532c16e467f0689cf579ff730b9b
|
/Module2/src/_07_AbstractClass_Interface/bai_tap/interface_colorable/Shape.java
|
9cfe771863f19aa1988ad289ad52105ca6e6d6d2
|
[] |
no_license
|
nhkhanh6398/A2010I1_NguyenHuuKhanh
|
a4d23e0e9e00eb14186077c629d0af91d22b0336
|
0220559c19467533534c73997af2531cc52ef045
|
refs/heads/main
| 2023-08-14T08:02:13.722516
| 2021-09-15T15:24:39
| 2021-09-15T15:24:39
| 309,373,995
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 932
|
java
|
package _07_AbstractClass_Interface.bai_tap.interface_colorable;
public class Shape {
private String color = "green";
private boolean filled = true;
public Shape() {
}
public Shape(String color, boolean filled) {
this.color = color;
this.filled = filled;
}
public String getColor() {
return color;
}
public void setColor(String color) {
this.color = color;
}
public boolean isFilled() {
return filled;
}
public void setFilled(boolean filled) {
this.filled = filled;
}
public static void printShape(Shape[] shapes) {
for (Shape x : shapes){
System.out.println(x.toString());
}
}
@Override
public String toString() {
return "A Shape with color of "
+ getColor()
+ " and "
+ (isFilled() ? "filled" : "not filled");
}
}
|
[
"nhkhanh6398@gmail.com"
] |
nhkhanh6398@gmail.com
|
de0199d760c2cf756b59a2e945bcee85f0f4df66
|
0085acce00bbd20658f312f30575632b6272090d
|
/src/algorithm/ValidBST.java
|
279f3f82b127c859c325f4f03b3f6e7672253ac0
|
[] |
no_license
|
garderobin/Leetcode
|
52fce8279e4963bc7824a19aae903ca6aad83867
|
ea10ce7fe465431399e444c6ecb0b7560b17e1e4
|
refs/heads/master
| 2021-01-17T14:43:49.423071
| 2018-11-12T00:55:47
| 2018-11-12T00:55:47
| 51,183,667
| 0
| 1
| null | 2018-11-12T00:55:48
| 2016-02-06T01:00:36
|
Java
|
UTF-8
|
Java
| false
| false
| 2,011
|
java
|
package algorithm;
/**
* 一定要注意相等的边界条件
* @author jasmineliu
*
*/
public class ValidBST {
class TreeNode {
int val;
TreeNode left;
TreeNode right;
TreeNode(int x) { val = x; }
}
class StatNode {
TreeNode node;
int min;
int max;
StatNode(TreeNode node, int min, int max) {
this.node = node;
this.min = min;
this.max = max;
}
}
public boolean isValidBST(TreeNode root) {
//return false;
//return myIsValidBST(new StatNode(root, root.val, root.val));
return myIsValidBST(root, Integer.MIN_VALUE, Integer.MAX_VALUE);
// if (root == null) {
// return true;
// }
//
// if (root.left == null && root.right == null) {
// return true;
// }
// if (root.left == null) {
// return root.right.val >= root.val && isValidBST(root.right);
// }
// if (root.right == null) {
// return root.left.val <= root.val && isValidBST(root.left);
// }
// return root.right.val >= root.val && root.left.val <= root.val && isValidBST(root.left) && isValidBST(root.right);
}
private boolean myIsValidBST(TreeNode root, int allowMin, int allowMax) {
if (root == null) {
return true;
}
if (root.val <= allowMin || root.val >= allowMax ) {
return false;
}
if (root.left == null && root.right == null) {
return true;
}
if (root.left == null) {
return root.right.val > root.val && myIsValidBST(root.right, root.val, allowMax);
}
if (root.right == null) {
return root.left.val < root.val && myIsValidBST(root.left, allowMin, root.val);
}
return root.right.val > root.val && root.left.val < root.val && myIsValidBST(root.right, root.val, allowMax) && myIsValidBST(root.left, allowMin, root.val);
}
// private StatNode getStatNode(TreeNode root) {
// int min, max;
// if (root == null) {
// return null;
// }
// if (root.left == null) {
// min = Math.min(root.left.val, root.val);
// }
// StatNode sl = getStatNode(root.left);
// StatNode sr = getStatNode(root.right);
// return root;
// }
}
|
[
"garderobinshot@hotmail.com"
] |
garderobinshot@hotmail.com
|
958e75c9064ddf0ebf1fa28ebdc83e313a0ab506
|
778da6dbb2eb27ace541338d0051f44353c3f924
|
/src/main/java/com/espertech/esper/epl/join/assemble/CartesianProdAssemblyNodeFactory.java
|
1a8532a30adfd6e7c584823f8c32232a2d58fb93
|
[] |
no_license
|
jiji87432/ThreadForEsperAndBenchmark
|
daf7188fb142f707f9160173d48c2754e1260ec7
|
fd2fc3579b3dd4efa18e079ce80d3aee98bf7314
|
refs/heads/master
| 2021-12-12T02:15:18.810190
| 2016-12-01T12:15:01
| 2016-12-01T12:15:01
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,396
|
java
|
/**************************************************************************************
* Copyright (C) 2006-2015 EsperTech Inc. All rights reserved. *
* http://www.espertech.com/esper *
* http://www.espertech.com *
* ---------------------------------------------------------------------------------- *
* The software in this package is published under the terms of the GPL license *
* a copy of which has been included with this distribution in the license.txt file. *
**************************************************************************************/
package com.espertech.esper.epl.join.assemble;
import com.espertech.esper.client.EventBean;
import com.espertech.esper.epl.join.rep.Node;
import com.espertech.esper.util.IndentWriter;
import java.util.*;
/**
* Assembly node for an event stream that is a branch with a two or more child nodes (required and optional) below it.
*/
public class CartesianProdAssemblyNodeFactory extends BaseAssemblyNodeFactory
{
private final int[] childStreamIndex; // maintain mapping of stream number to index in array
private final boolean allSubStreamsOptional;
/**
* Ctor.
* @param streamNum - is the stream number
* @param numStreams - is the number of streams
* @param allSubStreamsOptional - true if all child nodes to this node are optional, or false if
* one or more child nodes are required for a result.
*/
public CartesianProdAssemblyNodeFactory(int streamNum, int numStreams, boolean allSubStreamsOptional)
{
super(streamNum, numStreams);
this.childStreamIndex = new int[numStreams];
this.allSubStreamsOptional = allSubStreamsOptional;
}
@Override
public void addChild(BaseAssemblyNodeFactory childNode)
{
childStreamIndex[childNode.getStreamNum()] = childNodes.size();
super.addChild(childNode);
}
public void print(IndentWriter indentWriter)
{
indentWriter.println("CartesianProdAssemblyNode streamNum=" + streamNum);
}
public BaseAssemblyNode makeAssemblerUnassociated() {
return new CartesianProdAssemblyNode(streamNum, numStreams, allSubStreamsOptional, childStreamIndex);
}
}
|
[
"qinjie2012@163.com"
] |
qinjie2012@163.com
|
f11f9ebf517950e4cf9a51b4eb160f3e31016cdb
|
81199cfa1d7f9365917376c3f4d641f630d19010
|
/src/main/java/com/jpoint/mystarter/MyDbException.java
|
eb55b8fccd2696b5a4f1516ec29170db9bceff27
|
[] |
no_license
|
Jeka1978/my-starter
|
c0a37bc41c48b124a39e214369a600a2b4d29290
|
12733e8414d258ad7eac592b95e6edf4de5fd209
|
refs/heads/master
| 2020-05-05T11:01:48.137247
| 2019-04-07T14:36:48
| 2019-04-07T14:36:48
| 179,971,629
| 1
| 4
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 193
|
java
|
package com.jpoint.mystarter;
/**
* @author Evgeny Borisov
*/
public class MyDbException extends RuntimeException{
public MyDbException(String message) {
super(message);
}
}
|
[
"kit2009"
] |
kit2009
|
727272be5b929b6024ef9cf1998db25c93fe4be6
|
445af4b9c2eb2578bfb066bb68279314f90c8977
|
/app/src/main/java/com/pay2ved/recharge/gprs_home_activity/Filter_transActivity.java
|
23243d7d9a007c5045a6e7c7ffc37d06de2fe0dd
|
[] |
no_license
|
SUNITECH19/PAY2VED
|
042b1331c3c2e309cb08b5e59f4fb5af82d6b09a
|
a63a0406ea16e6ec6c66210fe3a0c1fccdb7168f
|
refs/heads/master
| 2023-07-27T14:22:06.073481
| 2021-09-14T12:41:40
| 2021-09-14T12:41:40
| 406,361,843
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 6,358
|
java
|
package com.pay2ved.recharge.gprs_home_activity;
import android.app.Activity;
import android.app.DatePickerDialog;
import android.app.Dialog;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.DatePicker;
import android.widget.ImageView;
import android.widget.RelativeLayout;
import android.widget.TextView;
import com.pay2ved.recharge.R;
import com.pay2ved.recharge.other.AppsContants;
import java.util.Calendar;
public class Filter_transActivity extends Activity {
ImageView img_back;
Button ok, cancel;
TextView txt_from, txt_to;
String s_from = "", s_to = "";
RelativeLayout rlt_from, rlt_to;
DatePickerDialog.OnDateSetListener datePickerDialog_from, datePickerDialog_to;
String s_DATE_FROM = "", s_DATE_TO = "";
int startYear, startMonth, startDay;
int Year, Month, Day;
final int DATE_PICKER_TO = 0;
final int DATE_PICKER_FROM = 1;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_filter_trans);
rlt_from = (RelativeLayout) findViewById(R.id.rlt_from);
rlt_to = (RelativeLayout) findViewById(R.id.rlt_to);
Calendar c = Calendar.getInstance();
startYear = c.get(Calendar.YEAR);
startMonth = c.get(Calendar.MONTH);
startDay = c.get(Calendar.DAY_OF_MONTH);
Calendar calendar = Calendar.getInstance();
Year = calendar.get(Calendar.YEAR);
Month = calendar.get(Calendar.MONTH);
Day = calendar.get(Calendar.DAY_OF_MONTH);
datePickerDialog_from = new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker arg0, int year, int month, int dayOfMonth) {
startYear = year;
startMonth = month;
startDay = dayOfMonth;
//=========================================
int Day = startDay;
int Month = startMonth + 1;
String s_dayOfMonth = Day + "";
String s_month = Month + "";
if (Day < 10) {
s_dayOfMonth = "0" + Day;
}
if (Month < 10) {
s_month = "0" + Month;
}
txt_from.setText(startYear + "-" + (s_month) + "-" + s_dayOfMonth);
//========================================
/* txt_from.setText(new StringBuilder()
.append(startYear).append("-").append(startMonth + 1).append("-").append(startDay).append(" "));
*/
}
};
datePickerDialog_to = new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker arg0, int year, int month, int dayOfMonth) {
Year = year;
Month = month;
Day = dayOfMonth;
//=========================================
int S_day = Day;
int S_month = Month + 1;
String s_dayOfMonth = S_day + "";
String s_month = S_month + "";
if (S_day < 10) {
s_dayOfMonth = "0" + S_day;
}
if (S_month < 10) {
s_month = "0" + S_month;
}
txt_to.setText(Year + "-" + (s_month) + "-" + s_dayOfMonth);
//========================================
/* txt_to.setText(new StringBuilder()
.append(Year).append("-").append(Month + 1).append("-").append(Day).append(" "));*/
}
};
rlt_from.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showDialog(DATE_PICKER_FROM);
}
});
rlt_to.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
showDialog(DATE_PICKER_TO);
}
});
txt_from = (TextView) findViewById(R.id.txt_from);
txt_to = (TextView) findViewById(R.id.txt_to);
cancel = (Button) findViewById(R.id.cancel);
ok = (Button) findViewById(R.id.ok);
img_back = (ImageView) findViewById(R.id.img_back);
img_back.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
cancel.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
finish();
}
});
ok.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
s_from = txt_from.getText().toString().trim();
s_to = txt_to.getText().toString().trim();
AppsContants.sharedpreferences = getSharedPreferences(AppsContants.MyPREFERENCES, Context.MODE_PRIVATE);
SharedPreferences.Editor editor = AppsContants.sharedpreferences.edit();
editor.putString(AppsContants.DATE_FROM, s_from);
editor.putString(AppsContants.DATE_TO, s_to);
editor.commit();
AppsContants.sharedpreferences = getSharedPreferences(AppsContants.MyPREFERENCES, Context.MODE_PRIVATE);
s_DATE_TO = AppsContants.sharedpreferences.getString(AppsContants.DATE_FROM, "");
s_DATE_FROM = AppsContants.sharedpreferences.getString(AppsContants.DATE_TO, "");
Intent intent = new Intent(Filter_transActivity.this, Show_ReportActivity.class);
startActivity(intent);
finish();
}
});
}
@Override
protected Dialog onCreateDialog(int id) {
switch (id) {
case DATE_PICKER_FROM:
return new DatePickerDialog(this, datePickerDialog_from, startYear, startMonth, startDay);
case DATE_PICKER_TO:
return new DatePickerDialog(this, datePickerDialog_to, Year, Month, Day);
}
return null;
}
}
|
[
"="
] |
=
|
c3a9c48e8501152a701f16129b51adf7bf4bdbe3
|
3b645de622ac95efefcfa330fcb8ad9c777026f6
|
/src/br/com/saude/api/model/creation/builder/example/ClinicaExampleBuilder.java
|
95ae94c72230fc819fea13a492b61ff9a700bf36
|
[] |
no_license
|
fabiogaspari/saudeapi
|
5036eeb8d4095d4f296cf8ff5c1b193f03f72a56
|
8266e565fb8f8af1a3379fa23fa83e75a779a1a0
|
refs/heads/master
| 2023-09-04T06:32:54.925720
| 2023-08-20T11:52:58
| 2023-08-20T11:52:58
| 171,148,153
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,638
|
java
|
package br.com.saude.api.model.creation.builder.example;
import org.hibernate.criterion.Restrictions;
import br.com.saude.api.generic.GenericExampleBuilder;
import br.com.saude.api.generic.Helper;
import br.com.saude.api.model.entity.filter.ClinicaFilter;
import br.com.saude.api.model.entity.po.Clinica;
public class ClinicaExampleBuilder extends GenericExampleBuilder<Clinica, ClinicaFilter> {
public static ClinicaExampleBuilder newInstance(ClinicaFilter filter) {
return new ClinicaExampleBuilder(filter);
}
private ClinicaExampleBuilder(ClinicaFilter filter) {
super(filter);
}
@Override
protected void createExample() throws InstantiationException, IllegalAccessException {
addId();
addNome();
addUf();
addEndereco();
addTelefones();
}
@Override
protected void createExampleSelectList() throws InstantiationException, IllegalAccessException {
}
private void addId() {
if(this.filter.getId() > 0)
this.criterions.add(Restrictions.eq("id", (int)this.filter.getId()));
}
private void addNome() {
if(this.filter.getNome() != null)
this.entity.setNome(Helper.filterLike(this.filter.getNome()));
}
private void addUf() {
if(this.filter.getUf() != null)
this.entity.setUf(Helper.filterLike(this.filter.getUf()));
}
private void addEndereco() {
if(this.filter.getEndereco() != null)
this.entity.setEndereco(Helper.filterLike(this.filter.getEndereco()));
}
private void addTelefones() {
if(this.filter.getTelefones() != null)
this.entity.setTelefones(Helper.filterLike(this.filter.getTelefones()));
}
}
|
[
"fabio.gaspari@gmail.com"
] |
fabio.gaspari@gmail.com
|
f43a41934dfb01ab1b4eb9d491a99ae768ef59c0
|
27511a2f9b0abe76e3fcef6d70e66647dd15da96
|
/src/com/instagram/user/follow/ah.java
|
ec6f0fc56762c8baf3fa78058f1c7a36655a93bf
|
[] |
no_license
|
biaolv/com.instagram.android
|
7edde43d5a909ae2563cf104acfc6891f2a39ebe
|
3fcd3db2c3823a6d29a31ec0f6abcf5ceca995de
|
refs/heads/master
| 2022-05-09T15:05:05.412227
| 2016-07-21T03:48:36
| 2016-07-21T03:48:36
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 191
|
java
|
package com.instagram.user.follow;
public final class ah {}
/* Location:
* Qualified Name: com.instagram.user.follow.ah
* Java Class Version: 6 (50.0)
* JD-Core Version: 0.7.1
*/
|
[
"reverseengineeringer@hackeradmin.com"
] |
reverseengineeringer@hackeradmin.com
|
0b07c48ec0dd1283e953c1c201d0eb322d31df95
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_fe0553a38a92c11eec38a7f0eb8861ba1a1d568b/AccelerometerDataActivity/2_fe0553a38a92c11eec38a7f0eb8861ba1a1d568b_AccelerometerDataActivity_s.java
|
00c87ccedb34a18e777620bf49f765a81bee86f0
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,688
|
java
|
package com.fruitninjaremote;
import java.io.IOException;
import com.fruitninjaremote2.UDPSend;
import android.app.Activity;
import android.content.Context;
import android.hardware.Sensor;
import android.hardware.SensorEvent;
import android.hardware.SensorEventListener;
import android.hardware.SensorListener;
import android.hardware.SensorManager;
import android.os.Bundle;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.TextView;
public class AccelerometerDataActivity extends Activity implements SensorEventListener {
float xLinearAcceleration;
float yLinearAcceleration;
float zLinearAcceleration;
float[] gravity = new float[3];
TextView display;
SensorManager sm;
Sensor mAccelerometer;
long start;
long end;
public void onCreate(Bundle savedInstanceState)
{
super.onCreate( savedInstanceState);
start = System.currentTimeMillis();
end = start + 10*1000;
display = new TextView(this);
sm = (SensorManager) getSystemService(SENSOR_SERVICE);
mAccelerometer = sm.getDefaultSensor(Sensor.TYPE_LINEAR_ACCELERATION);
sm.registerListener(this, mAccelerometer, SensorManager.SENSOR_DELAY_NORMAL);
setContentView(display);
}
/*
public void onAccuracyChanged(Sensor arg0, int arg1) { }
public void onSensorChanged(SensorEvent event)
{
display.setText("idiot");
if (event.sensor != null && event.sensor.getType()==Sensor.TYPE_ACCELEROMETER)
{
xLinearAcceleration=event.values[0];
yLinearAcceleration=event.values[1];
zLinearAcceleration=event.values[2];
display.setText(xLinearAcceleration + " / " + yLinearAcceleration + " / " + zLinearAcceleration);
}
}*/
static final float NS2S = 1.0f / 1000000000.0f;
float[] last_values = null;
float[] velocity = null;
float[] position = null;
long last_timestamp = 0;
float[] linear_acceleration = new float[3];
boolean started = true;
public void onSensorChanged(SensorEvent event) {
if (started==true)
{
gravity[0] = event.values[0];
gravity[1] = event.values[1];
gravity[2] = event.values[2];
started = false;
}
linear_acceleration[0] = event.values[0] - gravity[0];
linear_acceleration[1] = event.values[1] - gravity[1];
linear_acceleration[2] = event.values[2] - gravity[2];
if(last_values != null){
float dt = (event.timestamp - last_timestamp) * NS2S;
for(int index = 0; index < 3;++index){
velocity[index] += (linear_acceleration[index] + last_values[index])/2 * dt;
position[index] += velocity[index] * dt;
}
}
else{
last_values = new float[3];
velocity = new float[3];
position = new float[3];
velocity[0] = velocity[1] = velocity[2] = 0f;
position[0] = position[1] = position[2] = 0f;
}
System.arraycopy(event.values, 0, last_values, 0, 3);
last_timestamp = event.timestamp;
// if (System.currentTimeMillis()<end)
try {
UDPSend.sendUDPMessage("1 2");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
display.setText(position[0] + " / " + position[1] + " / " + position[2] + "\n" + event.values[0] + " / " + event.values[1] + " / " + event.values[2] + "\n" + linear_acceleration[0] + " / " + linear_acceleration[1] + " / " + linear_acceleration[2]);
}
/*public void onAccuracyChanged(int arg0, int arg1) {
// TODO Auto-generated method stub
}
public void onSensorChanged(int sensor, float[] values) {
//display.setText("idiot");
if (sensor==SensorManager.SENSOR_ACCELEROMETER)
{
xLinearAcceleration=values[0];
yLinearAcceleration=values[1];
zLinearAcceleration=values[2];
display.setText(xLinearAcceleration + " / " + yLinearAcceleration + " / " + zLinearAcceleration);
}
}*/
/*@Override
protected void onResume() {
super.onResume();
// register this class as a listener for the orientation and accelerometer sensors
sm.registerListener(this, SensorManager.SENSOR_ACCELEROMETER|SensorManager.SENSOR_ORIENTATION, SensorManager.SENSOR_DELAY_NORMAL);
}
@Override
protected void onStop() {
// unregister listener
sm.unregisterListener(this);
super.onStop();
}*/
public void onAccuracyChanged(Sensor sensor, int accuracy) {
// TODO Auto-generated method stub
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
1e00e5b93286c3980d85185adbae7dc62b6061df
|
32b753fea469a3d1129a22c9ae6c495a39966ef4
|
/src/test/java/ar/edu/ucc/arqSoft/baseService/test/service/ClientServiceTest.java
|
d1e558fed5ca07cf56a8b6e5eec036e663d92351
|
[] |
no_license
|
martin22ca/DvdService
|
bb1713e7d0701f7e2a6e1d4253a91ef0d34fd955
|
962f0c71ee082d00d6b480e1ab7a809c5c866588
|
refs/heads/main
| 2022-12-30T09:40:03.411676
| 2020-10-26T21:13:36
| 2020-10-26T21:13:36
| 307,479,125
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,480
|
java
|
package ar.edu.ucc.arqSoft.baseService.test.service;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import ar.edu.ucc.arqSoft.baseService.dto.ClientRequestDto;
import ar.edu.ucc.arqSoft.baseService.dto.ClientResponseDto;
import ar.edu.ucc.arqSoft.baseService.service.ClientService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = { "classpath:test-context.xml", "classpath:/spring/applicationContext.xml" })
public class ClientServiceTest {
@Autowired
private ClientService clientService;
@Test
public void testFindById() {
ClientResponseDto response = clientService.getClientById((long) 1);
Assert.assertEquals("martin", response.getName());
return;
}
@Test
public void testInsert() {
ClientRequestDto request = new ClientRequestDto();
request.setName("Ignacio");
request.setLastName("Perez");
request.setEmail("perezignacio@gmail.com");
request.setDni("12335385");
ClientResponseDto response = clientService.RegisterClient(request);
Assert.assertEquals("Ignacio",response.getName());
Assert.assertEquals("Perez",response.getLastName());
Assert.assertEquals("perezignacio@gmail.com",response.getEmail());
Assert.assertEquals("12335385",response.getDni());
return;
}
}
|
[
"you@example.com"
] |
you@example.com
|
815aec9bd68c67c81bb3dce0f445c2f456a1de3e
|
7ac47b9273f8ace3450b2f526785d21e67306b23
|
/TeamProject_022_Weather/src/main/java/com/team/weather/controller/HomeController.java
|
c1a583e6616f6d7f6a17fbe650c47dbcbd5b5e5c
|
[] |
no_license
|
rudgjs8080/Biz_403_2021_06_SpringMVC
|
4891480965ead15211442d8d87e978686cc3f80b
|
bd8c35f68867f64f6a3af41bf2c56d84b0f473e2
|
refs/heads/master
| 2023-06-27T16:00:10.729289
| 2021-07-18T14:38:11
| 2021-07-18T14:38:11
| 372,743,310
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 458
|
java
|
package com.team.weather.controller;
import java.util.Locale;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class HomeController {
@RequestMapping(value = "/", method = RequestMethod.GET)
public String home(Locale locale, Model model) {
return "home";
}
}
|
[
"kkh_8080@naver.com"
] |
kkh_8080@naver.com
|
9975eddb650181857c2717e27b6fd517b176d28c
|
387f4c5fc59a312b9f8f68ac04646e724f040827
|
/common/src/main/java/me/lucko/luckperms/common/config/keys/AbstractKey.java
|
c3036b38122be8685859728b1a1693d9b1ecf05f
|
[
"LicenseRef-scancode-unknown-license-reference",
"MIT"
] |
permissive
|
frambinni/LuckPerms
|
67529aedcf5a04d83d8dfb9a51e8e65a14a42e76
|
c7b81346fd7311928b0ba4ee25a259a05513d761
|
refs/heads/master
| 2021-05-14T01:56:11.040247
| 2018-01-12T20:55:05
| 2018-01-12T20:55:05
| 116,580,191
| 0
| 0
| null | 2018-01-07T16:17:56
| 2018-01-07T16:17:56
| null |
UTF-8
|
Java
| false
| false
| 1,755
|
java
|
/*
* This file is part of LuckPerms, licensed under the MIT License.
*
* Copyright (c) lucko (Luck) <luck@lucko.me>
* Copyright (c) contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
package me.lucko.luckperms.common.config.keys;
import lombok.AllArgsConstructor;
import me.lucko.luckperms.common.config.ConfigKey;
import me.lucko.luckperms.common.config.adapter.ConfigurationAdapter;
import java.util.function.Function;
@AllArgsConstructor(staticName = "of")
public class AbstractKey<T> implements ConfigKey<T> {
private final Function<ConfigurationAdapter, T> function;
@Override
public T get(ConfigurationAdapter adapter) {
return function.apply(adapter);
}
}
|
[
"git@lucko.me"
] |
git@lucko.me
|
73fb47769c2831590593f43ae809999059d76cb5
|
aaabffe8bf55973bfb1390cf7635fd00ca8ca945
|
/src/main/java/com/microsoft/graph/requests/generated/IBaseWorkbookFunctionsImSinhRequest.java
|
52785db1f62e788ffa332c5ace7d88b27e7f238b
|
[
"MIT"
] |
permissive
|
rgrebski/msgraph-sdk-java
|
e595e17db01c44b9c39d74d26cd925b0b0dfe863
|
759d5a81eb5eeda12d3ed1223deeafd108d7b818
|
refs/heads/master
| 2020-03-20T19:41:06.630857
| 2018-03-16T17:31:43
| 2018-03-16T17:31:43
| 137,648,798
| 0
| 0
| null | 2018-06-17T11:07:06
| 2018-06-17T11:07:05
| null |
UTF-8
|
Java
| false
| false
| 1,848
|
java
|
// ------------------------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. See License in the project root for license information.
// ------------------------------------------------------------------------------
package com.microsoft.graph.requests.generated;
import com.microsoft.graph.concurrency.*;
import com.microsoft.graph.core.*;
import com.microsoft.graph.models.extensions.*;
import com.microsoft.graph.models.generated.*;
import com.microsoft.graph.http.*;
import com.microsoft.graph.requests.extensions.*;
import com.microsoft.graph.requests.generated.*;
import com.microsoft.graph.options.*;
import com.microsoft.graph.serializer.*;
import java.util.Arrays;
import java.util.EnumSet;
import com.google.gson.JsonObject;
import com.google.gson.annotations.*;
// **NOTE** This file was generated by a tool and any changes will be overwritten.
/**
* The interface for the Base Workbook Functions Im Sinh Request.
*/
public interface IBaseWorkbookFunctionsImSinhRequest {
void post(final ICallback<WorkbookFunctionResult> callback);
WorkbookFunctionResult post() throws ClientException;
/**
* Sets the select clause for the request
*
* @param value the select clause
* @return the updated request
*/
IWorkbookFunctionsImSinhRequest select(final String value) ;
/**
* Sets the top value for the request
*
* @param value the max number of items to return
* @return the updated request
*/
IWorkbookFunctionsImSinhRequest top(final int value);
/**
* Sets the expand clause for the request
*
* @param value the expand clause
* @return the updated request
*/
IWorkbookFunctionsImSinhRequest expand(final String value);
}
|
[
"caitbal@microsoft.com"
] |
caitbal@microsoft.com
|
400b99b6944ddc792c1bd1f711bc57a18e4ec6ad
|
70f7a06017ece67137586e1567726579206d71c7
|
/alimama/src/main/java/com/taobao/zcache/zipdownload/InstanceZipDownloader.java
|
69add669460ef4e877c1891aa01c11459cb997d4
|
[] |
no_license
|
liepeiming/xposed_chatbot
|
5a3842bd07250bafaffa9f468562021cfc38ca25
|
0be08fc3e1a95028f8c074f02ca9714dc3c4dc31
|
refs/heads/master
| 2022-12-20T16:48:21.747036
| 2020-10-14T02:37:49
| 2020-10-14T02:37:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,618
|
java
|
package com.taobao.zcache.zipdownload;
import java.lang.Thread;
import java.util.Map;
public class InstanceZipDownloader extends Thread implements IDownLoader {
private static final String TAG = "InstanceZipDownloader";
private String destFile = null;
private DownLoadManager downLoadManager = null;
private Map<String, String> header = null;
private int timeout = 5000;
public void cancelTask(boolean z) {
}
public InstanceZipDownloader(String str, DownLoadListener downLoadListener) {
this.downLoadManager = new DownLoadManager(str, downLoadListener);
this.downLoadManager.setTimeout(this.timeout);
this.downLoadManager.setHeaders(this.header);
this.downLoadManager.isTBDownloaderEnabled = false;
}
public void setTimeout(int i) {
if (this.downLoadManager != null) {
this.downLoadManager.setTimeout(i);
}
}
public void setHeader(Map<String, String> map) {
if (this.downLoadManager != null) {
this.downLoadManager.setHeaders(map);
}
}
public void setUrl(String str) {
if (this.downLoadManager != null) {
this.downLoadManager.setZipUrl(str);
}
}
public void setDestFile(String str) {
if (this.downLoadManager != null) {
this.downLoadManager.setDestFile(str);
}
}
public void run() {
if (this.downLoadManager != null) {
this.downLoadManager.doTask();
}
}
public Thread.State getDownLoaderStatus() {
return Thread.currentThread().getState();
}
}
|
[
"zhangquan@snqu.com"
] |
zhangquan@snqu.com
|
c87c4a3208a6a2272f49d4468f73a48fa20c47c9
|
135bec354622330ea6bcf637ef52c7363fb97467
|
/src/OoPs/Encapculation/Encap.java
|
1ac7e6a3eba4d3bab57e6ff4e02376ccd49df153
|
[] |
no_license
|
Orlando-Houston/Java
|
1b057b2e6447ba79e2173462139c6714c6743b4c
|
b6ccbf6c05d9cbec9580875be7c5edd6e42f0de9
|
refs/heads/master
| 2020-08-31T09:12:40.047696
| 2020-06-23T22:44:04
| 2020-06-23T22:44:04
| 238,321,900
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 445
|
java
|
package OoPs.Encapculation;
public class Encap {
private static int a,b,c;
public static int getA() {
return a;
}
public static void setA(int a) {
Encap.a = a;
}
public static int getB() {
return b;
}
public static void setB(int b) {
Encap.b = b;
}
public static int getC() {
return c;
}
public static void setC(int c) {
Encap.c = c;
}
}
|
[
"a.ozder@outlook.com"
] |
a.ozder@outlook.com
|
c9db5d71caa8b1c4d6b073b65fe2a29e844bc6d9
|
2eed2b6c7c7029d062a3a220eaee82bef4d5cbe5
|
/strings/JavaRegex/src/solution/java/RegexUtils.java
|
7b0879719a08e339f78daffb5eabf13772bfd602
|
[] |
no_license
|
chrislucas/hackerrank-lp-java
|
aa6ca41752471b3c66f4643c41196cf1da2591c3
|
56b816df04c109eada6335845ac7446e051a12ec
|
refs/heads/master
| 2021-01-01T10:41:55.229756
| 2020-05-13T04:18:48
| 2020-05-13T04:18:48
| 239,243,103
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,325
|
java
|
package solution.java;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
public class RegexUtils {
public static void log(Pattern pattern, String target) {
System.out.printf("%s %s with pattern %s\n", target
, pattern.matcher(target).matches() ? "Match" : "Not Match"
, pattern.pattern()
);
showMatch(pattern.matcher(target));
}
private static void showMatch(Matcher matcher) {
if (matcher.find()) {
String line = "------------------------------------------------------";
System.out.println(line);
for (int i=0; i<matcher.groupCount(); i++) {
String group = matcher.group(i);
System.out.printf("Group: %s; Start: %d; End: %d\n",
group
, i
, group.length()
);
}
if (matcher.groupCount() == 0) {
System.out.printf("Group: %s; Start: %d; End: %d\n",
matcher.group()
, matcher.start()
, matcher.end()
);
}
System.out.println(line);
}
else {
System.out.println("Nothing to show");
}
}
}
|
[
"christoffer.luccas@gmail.com"
] |
christoffer.luccas@gmail.com
|
f5ce594723ec65736fa243fbb98305fe51d82cd4
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/22/22_7d85bd9c9b45717f795771e8276507bd41d5de32/MultiSampleGaugeMeasurementTest/22_7d85bd9c9b45717f795771e8276507bd41d5de32_MultiSampleGaugeMeasurementTest_s.java
|
2b5b26e6dcc670250b796bf9ff440764099c8ad2
|
[] |
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,479
|
java
|
package com.librato.metrics;
import org.junit.Test;
/**
* User: mihasya
* Date: 7/1/12
* Time: 5:20 PM
* Verify that all the advanced details are filled in that are available
*/
public class MultiSampleGaugeMeasurementTest {
@Test(expected = IllegalArgumentException.class)
public void doesNotAcceptNaNAsSum() {
new MultiSampleGaugeMeasurement("testGauge", 12L, Double.NaN, 2, 2, 2);
}
@Test(expected = IllegalArgumentException.class)
public void doesNotAcceptPosInfAsSum() {
new MultiSampleGaugeMeasurement("testGauge", 12L, Double.POSITIVE_INFINITY, 2, 2, 2);
}
@Test(expected = IllegalArgumentException.class)
public void doesNotAcceptNegInfAsSum() {
new MultiSampleGaugeMeasurement("testGauge", 12L, Double.NEGATIVE_INFINITY, 2, 2, 2);
}
@Test(expected = IllegalArgumentException.class)
public void doesNotAcceptNonNumericValuesAsMax() {
new MultiSampleGaugeMeasurement("testGauge", 12L, 2, Double.NEGATIVE_INFINITY, 2, 2);
}
@Test(expected = IllegalArgumentException.class)
public void doesNotAcceptNonNumericValuesAsMin() {
new MultiSampleGaugeMeasurement("testGauge", 12L, 2, 2, Double.POSITIVE_INFINITY, 2);
}
@Test(expected = IllegalArgumentException.class)
public void doesNotAcceptNonNumericValuesAsSumSquares() {
new MultiSampleGaugeMeasurement("testGauge", 12L, 2, 2, 2, Double.NaN);
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
3e057cfabda1c7f0684e9a35d5c57f9539dbe2cf
|
ba998ec44d59df248d6c7e93d1d73b803f160af2
|
/app/src/main/java/com/nglinx/pulse/adapter/MyOrdersAdapter.java
|
8cf66c97b392c356459f15332a3a323517a27ed7
|
[] |
no_license
|
yrprasad/Famlinx
|
2f5888abf2a03072200d2786497c4e6f7e7eee77
|
103b4cb2ff1f2df5b895e4bda4b51f01249841b5
|
refs/heads/master
| 2020-03-13T14:19:30.237143
| 2019-02-14T13:29:16
| 2019-02-14T13:29:16
| 131,156,151
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,631
|
java
|
package com.nglinx.pulse.adapter;
import android.content.Context;
import android.support.v7.widget.PopupMenu;
import android.view.LayoutInflater;
import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import android.widget.ImageView;
import android.widget.TextView;
import com.nglinx.pulse.R;
import com.nglinx.pulse.activity.NotificationActivity;
import com.nglinx.pulse.models.DeviceOrderModel;
import com.nglinx.pulse.models.DeviceType;
import com.nglinx.pulse.utils.ApplicationUtils;
import java.util.ArrayList;
public class MyOrdersAdapter extends ArrayAdapter<DeviceOrderModel> {
private ViewHolder holder = null;
private ArrayList<DeviceOrderModel> arr2;
private LayoutInflater mInflater;
private Context context;
public MyOrdersAdapter(Context context, ArrayList<DeviceOrderModel> users) {
super(context, 0, users);
this.context = context;
mInflater = (LayoutInflater) context
.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
this.arr2 = users;
}
@Override
public int getViewTypeCount() {
return 1;
}
@Override
public int getCount() {
return arr2.size();
}
@Override
public int getItemViewType(int position) {
return position;
}
@Override
public DeviceOrderModel getItem(int position) {
return arr2.get(position);
}
@Override
public long getItemId(int position) {
return position;
}
@Override
public View getView(final int position, View convertView, ViewGroup parent) {
// Get the data item for this position
ViewHolder holder = null;
final DeviceOrderModel modelHolder = getItem(position);
// Check if an existing view is being reused, otherwise inflate the view
if (convertView == null) {
convertView = mInflater.inflate(R.layout.activity_my_account_order_row, null);
holder = new ViewHolder();
// Lookup view for data population
holder.tv_order_id = (TextView) convertView.findViewById(R.id.tv_order_id);
holder.tv_device_name = (TextView) convertView.findViewById(R.id.tv_device_name);
holder.tv_order_status = (TextView) convertView.findViewById(R.id.tv_order_status);
holder.tv_order_date = (TextView) convertView.findViewById(R.id.tv_order_date);
holder.img_device = (ImageView) convertView.findViewById(R.id.img_device);
convertView.setTag(holder);
} else
{
holder = (ViewHolder) convertView.getTag();
}
holder.tv_order_id.setText("Order # " + modelHolder.getId());
holder.tv_device_name.setText(modelHolder.getDeviceType().toString());
holder.tv_order_status.setText("Order Status : " + modelHolder.getStatus());
holder.tv_order_date.setText("Order Date : " +
ApplicationUtils.convertFormatByTimeZone(modelHolder.getCreatedDate()));
if (modelHolder.getDeviceType().equals(DeviceType.A9)) {
holder.img_device.setImageResource(R.drawable.a9);
} else if (modelHolder.getDeviceType().equals(DeviceType.V7)) {
holder.img_device.setImageResource(R.drawable.v7);
} else if (modelHolder.getDeviceType().equals(DeviceType.V16)) {
holder.img_device.setImageResource(R.drawable.v16);
} else if (modelHolder.getDeviceType().equals(DeviceType.MQTT)) {
holder.img_device.setImageResource(R.drawable.mqtt);
}
// Return the completed view to render on screen
return convertView;
}
public class ViewHolder {
public TextView tv_order_id;
public TextView tv_device_name;
public TextView tv_order_status;
public TextView tv_order_date;
public ImageView img_device;
}
private void showPopupMenu(final View view) {
PopupMenu popup = new PopupMenu(context, view);
popup.getMenuInflater().inflate(R.menu.activity_menu_notifications, popup.getMenu());
popup.show();
popup.setOnMenuItemClickListener(new PopupMenu.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_delete_notifications:
((NotificationActivity) context).deleteNotificationClickHandler(view);
return true;
}
return false;
}
});
}
}
|
[
"raghavendra.pra.yelisetty@hpe.com"
] |
raghavendra.pra.yelisetty@hpe.com
|
472fc12429381a0912edc1ec2cba11be71ce4a3b
|
8d3c54983e1e57e166b0e946baeda38e2b7aeb15
|
/jnpf-datareport/report-console/src/main/java/com/bstek/ureport/console/UReportServlet.java
|
8f802383e330f0e75952f4c7de26c4ce88de886c
|
[] |
no_license
|
houzhanwu/lowCodePlatform
|
01d3c6f8fc30eb6dfd6d0beea55c705231fd97a5
|
88c0822c974b129d6c5423fec59d7de9fa907527
|
refs/heads/master
| 2023-08-30T04:07:23.106710
| 2021-11-17T02:33:20
| 2021-11-17T02:33:20
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,733
|
java
|
/*******************************************************************************
* Copyright 2017 Bstek
*
* 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.bstek.ureport.console;
import com.bstek.ureport.console.util.ActionResult;
import com.bstek.ureport.console.util.UpdateData;
import jnpf.util.jwt.JwtUtil;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.codehaus.jackson.map.ObjectMapper;
import org.codehaus.jackson.map.SerializationConfig;
import org.codehaus.jackson.map.annotate.JsonSerialize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.context.WebApplicationContext;
import org.springframework.web.context.support.SpringBeanAutowiringSupport;
import org.springframework.web.context.support.WebApplicationContextUtils;
import javax.servlet.ServletConfig;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.text.SimpleDateFormat;
import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
/**
* @author
* @since 1月25日
*/
@Slf4j
public class UReportServlet extends HttpServlet {
@Autowired
private UpdateData updateData;
private static final long serialVersionUID = 533049461276487971L;
public static final String URL = "";
private Map<String, ServletAction> actionMap = new HashMap<String, ServletAction>();
@Override
public void init(ServletConfig config) throws ServletException {
super.init(config);
WebApplicationContext applicationContext = getWebApplicationContext(config);
Collection<ServletAction> handlers = applicationContext.getBeansOfType(ServletAction.class).values();
for (ServletAction handler : handlers) {
String url = handler.url();
if (actionMap.containsKey(url)) {
throw new RuntimeException("Handler [" + url + "] already exist.");
}
actionMap.put(url, handler);
}
//使@Autowired生效
SpringBeanAutowiringSupport.processInjectionBasedOnServletContext(this,
config.getServletContext());
}
protected WebApplicationContext getWebApplicationContext(ServletConfig config) {
return WebApplicationContextUtils.getWebApplicationContext(config.getServletContext());
}
@Override
protected void service(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
resp.addHeader("Access-Control-Allow-Origin", "*");
resp.setHeader("Access-Control-Allow-Credentials", "true");
resp.setHeader("Access-Control-Allow-Methods", "*");
resp.setHeader("Access-Control-Max-Age", "3600");
resp.setHeader("Access-Control-Allow-Headers", "Authorization,Origin,X-Requested-With,Content-Type,Accept,"
+ "content-Type,origin,x-requested-with,content-type,accept,authorization,token,id,X-Custom-Header,X-Cookie,Connection,User-Agent,Cookie,*");
resp.setHeader("Access-Control-Request-Headers", "Authorization,Origin, X-Requested-With,content-Type,Accept");
resp.setHeader("Access-Control-Expose-Headers", "*");
String path = req.getContextPath() + URL;
String uri = req.getRequestURI();
String targetUrl = uri.substring(path.length());
if (targetUrl.length() < 1) {
outContent(resp, "Welcome to use ureport,please specify target url.");
return;
}
int slashPos = targetUrl.indexOf("/", 1);
if (slashPos > -1) {
targetUrl = targetUrl.substring(0, slashPos);
}
ServletAction targetHandler = actionMap.get(targetUrl);
if (targetHandler == null) {
outContent(resp, "Handler [" + targetUrl + "] not exist.");
return;
}
RequestHolder.setRequest(req);
try {
//判断是否是多租户,切换数据源
boolean flag = updateData.getDbName(req);
//验证token
String token = "";
try {
token = JwtUtil.getRealToken(req.getHeader("Authorization"));
}catch (Exception e){
writeObjectToJson(resp,ActionResult.fail("Token验证失败"));
}
if (!flag) {
targetHandler.execute(req, resp);
} else {
String account = updateData.getUserId(token);
if (!StringUtils.isBlank(account) && !StringUtils.isEmpty(account)) {
targetHandler.execute(req, resp);
} else {
token = updateData.getUserId(req.getParameter("token"));
if (!StringUtils.isBlank(token) && !StringUtils.isEmpty(token)) {
targetHandler.execute(req, resp);
} else {
writeObjectToJson(resp, ActionResult.fail("token验证失败"));
}
}
}
} catch (Exception ex) {
// resp.setCharacterEncoding("UTF-8");
// PrintWriter pw=resp.getWriter();
// Throwable e=buildRootException(ex);
// resp.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);
// String errorMsg = e.getMessage();
// if(StringUtils.isBlank(errorMsg)){
// errorMsg=e.getClass().getName();
// }
// pw.write(errorMsg);
// pw.close();
// throw new ServletException(ex);
log.error(ex.getMessage());
// ex.printStackTrace();
writeObjectToJson(resp, ActionResult.fail("请检查接口路径、参数和数据库连接"));
} finally {
RequestHolder.clean();
}
}
private Throwable buildRootException(Throwable throwable) {
if (throwable.getCause() == null) {
return throwable;
}
return buildRootException(throwable.getCause());
}
private void outContent(HttpServletResponse resp, String msg) throws IOException {
resp.setContentType("text/html");
PrintWriter pw = resp.getWriter();
pw.write("<html>");
pw.write("<header><title>UReport Console</title></header>");
pw.write("<body>");
pw.write(msg);
pw.write("</body>");
pw.write("</html>");
pw.flush();
pw.close();
}
protected void writeObjectToJson(HttpServletResponse resp, Object obj) throws IOException {
resp.setContentType("text/json");
resp.setCharacterEncoding("UTF-8");
ObjectMapper mapper = new ObjectMapper();
mapper.setSerializationInclusion(JsonSerialize.Inclusion.NON_NULL);
mapper.configure(SerializationConfig.Feature.WRITE_DATES_AS_TIMESTAMPS, false);
mapper.setDateFormat(new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"));
OutputStream out = resp.getOutputStream();
try {
mapper.writeValue(out, obj);
} finally {
out.flush();
out.close();
}
}
}
|
[
"stvrandolph@icloud.com"
] |
stvrandolph@icloud.com
|
c4899983e2789fa6d6b22d5157bf9c2992f493c2
|
f045bd8718eecdd3209290f3c94477c9a869f9af
|
/sources/org/apache/http/impl/conn/DefaultRoutePlanner.java
|
59c2bdd73c82666a9e35c06c4f7ee538ae68778f
|
[] |
no_license
|
KswCarProject/Launcher3-PX6
|
ba6c44c150649ba2f8ea40eb49fde1c2dc6bee5e
|
56eab00443667f38622a94975f69011e56d6dc27
|
refs/heads/master
| 2022-06-18T02:41:27.553573
| 2020-05-13T02:05:40
| 2020-05-13T02:05:40
| 259,748,185
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,455
|
java
|
package org.apache.http.impl.conn;
import java.net.InetAddress;
import org.apache.http.HttpException;
import org.apache.http.HttpHost;
import org.apache.http.HttpRequest;
import org.apache.http.ProtocolException;
import org.apache.http.annotation.Contract;
import org.apache.http.annotation.ThreadingBehavior;
import org.apache.http.client.config.RequestConfig;
import org.apache.http.client.protocol.HttpClientContext;
import org.apache.http.conn.SchemePortResolver;
import org.apache.http.conn.UnsupportedSchemeException;
import org.apache.http.conn.routing.HttpRoute;
import org.apache.http.conn.routing.HttpRoutePlanner;
import org.apache.http.protocol.HttpContext;
import org.apache.http.util.Args;
@Contract(threading = ThreadingBehavior.IMMUTABLE_CONDITIONAL)
public class DefaultRoutePlanner implements HttpRoutePlanner {
private final SchemePortResolver schemePortResolver;
public DefaultRoutePlanner(SchemePortResolver schemePortResolver2) {
this.schemePortResolver = schemePortResolver2 == null ? DefaultSchemePortResolver.INSTANCE : schemePortResolver2;
}
public HttpRoute determineRoute(HttpHost host, HttpRequest request, HttpContext context) throws HttpException {
HttpHost target;
Args.notNull(request, "Request");
if (host == null) {
throw new ProtocolException("Target host is not specified");
}
RequestConfig config = HttpClientContext.adapt(context).getRequestConfig();
InetAddress local = config.getLocalAddress();
HttpHost proxy = config.getProxy();
if (proxy == null) {
proxy = determineProxy(host, request, context);
}
if (host.getPort() <= 0) {
try {
target = new HttpHost(host.getHostName(), this.schemePortResolver.resolve(host), host.getSchemeName());
} catch (UnsupportedSchemeException ex) {
throw new HttpException(ex.getMessage());
}
} else {
target = host;
}
boolean secure = target.getSchemeName().equalsIgnoreCase("https");
if (proxy == null) {
return new HttpRoute(target, local, secure);
}
return new HttpRoute(target, local, proxy, secure);
}
/* access modifiers changed from: protected */
public HttpHost determineProxy(HttpHost target, HttpRequest request, HttpContext context) throws HttpException {
return null;
}
}
|
[
"nicholas@prjkt.io"
] |
nicholas@prjkt.io
|
d4ba79c072000976e547cd266cd4df4466f5a2de
|
aa2cd49a57c043d5aa5429728c657da105e22c46
|
/module_contacts/src/main/java/com/example/module_contacts/mvp/di/component/GankHomeComponent.java
|
480c76a840965381360a41f2ad59b44c68d1e267
|
[] |
no_license
|
scygh/NEW_NFC
|
3718ebbe22b89f7e8d31e952b575d0dc44ed8fdf
|
61df95fbd7a2c779853edebc0b0d1b4299c8757f
|
refs/heads/master
| 2020-09-08T10:06:52.128400
| 2020-04-18T08:36:17
| 2020-04-18T08:36:17
| 221,102,822
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,838
|
java
|
/*
* Copyright 2017 JessYan
*
* 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.example.module_contacts.mvp.di.component;
import com.jess.arms.di.component.AppComponent;
import com.jess.arms.di.scope.ActivityScope;
import dagger.BindsInstance;
import dagger.Component;
import me.jessyan.armscomponent.gank.di.module.GankHomeModule;
import me.jessyan.armscomponent.gank.mvp.contract.GankHomeContract;
import me.jessyan.armscomponent.gank.mvp.ui.activity.GankHomeActivity;
/**
* ================================================
* 展示 Component 的用法
*
* @see <a href="https://github.com/JessYanCoding/MVPArms/wiki#2.4.6">Component wiki 官方文档</a>
* Created by JessYan on 09/04/2016 11:17
* <a href="mailto:jess.yan.effort@gmail.com">Contact me</a>
* <a href="https://github.com/JessYanCoding">Follow me</a>
* ================================================
*/
@ActivityScope
@Component(modules = GankHomeModule.class, dependencies = AppComponent.class)
public interface GankHomeComponent {
void inject(GankHomeActivity activity);
@Component.Builder
interface Builder {
@BindsInstance
GankHomeComponent.Builder view(GankHomeContract.View view);
GankHomeComponent.Builder appComponent(AppComponent appComponent);
GankHomeComponent build();
}
}
|
[
"1797484636@qq.com"
] |
1797484636@qq.com
|
11f8980b7f1206c881fc5c7f6f95ece40bfa45ca
|
a5c7793e6dd42e06ccf3cb38fa42ae5c57dfd3b6
|
/examples/android/java/gen/package_name/PlaceType.java
|
af807578d595a8308ec9e4d7b4deee4db1692059
|
[
"MIT",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
eaglesakura/swagger-codegen
|
231ff380b1062c005562d2c533f1c8617ac531d0
|
0b3343e9bc70c25f5bb978b33e56a69bb48f464a
|
refs/heads/v1.0.x
| 2022-03-11T23:31:11.755250
| 2017-12-27T05:44:35
| 2017-12-27T05:44:35
| 115,387,139
| 0
| 0
| null | 2017-12-27T05:44:36
| 2017-12-26T05:03:37
|
Go
|
UTF-8
|
Java
| false
| false
| 1,399
|
java
|
package java.gen.package_name;
import java.math.*;
import com.google.gson.annotations.*;
import android.support.annotation.*;
import com.eaglesakura.swagger.*;
public class PlaceType implements Validatable {
@SerializedName("name")
public String name = null;
@SerializedName("code")
public Integer code = null;
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
PlaceType placeType = (PlaceType) o;
return (this.name == null ? placeType.name == null : this.name
.equals(placeType.name))
&& (this.code == null ? placeType.code == null : this.code
.equals(placeType.code));
}
@Override
public int hashCode() {
int result = 17;
result = 31 * result + (this.name == null ? 0 : this.name.hashCode());
result = 31 * result + (this.code == null ? 0 : this.code.hashCode());
return result;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class PlaceType {\n");
sb.append(" name: ").append(name).append("\n");
sb.append(" code: ").append(code).append("\n");
sb.append("}\n");
return sb.toString();
}
@Override
public boolean valid() {
if (!new ParameterValidator(name)
.valid()) {
return false;
}
if (!new ParameterValidator(code)
.valid()) {
return false;
}
return true;
}
}
|
[
"eagle.sakura@gmail.com"
] |
eagle.sakura@gmail.com
|
ec94b0e4b674cb5e35f1c9d277bd24318b7e7724
|
4a015f5a9b655f027a4d4e04fdc926bb893d093d
|
/directory-microservice/src/main/java/mk/ukim/finki/directory/web/rest/errors/LoginAlreadyUsedException.java
|
f9ee6c2d4b3922b02b2a3a224f902de068ad7acf
|
[
"MIT"
] |
permissive
|
kirkovg/university-microservices
|
cd1bfe8f92dba3b422c56903b972a2aa9f0b45c7
|
2c8db22c3337014e3a8aa5de3e6a1a32d35c9ba0
|
refs/heads/master
| 2021-12-26T13:05:05.598702
| 2018-09-11T18:53:35
| 2018-09-11T18:53:35
| 147,234,534
| 0
| 0
|
MIT
| 2021-08-12T22:16:40
| 2018-09-03T17:25:19
|
Java
|
UTF-8
|
Java
| false
| false
| 343
|
java
|
package mk.ukim.finki.directory.web.rest.errors;
public class LoginAlreadyUsedException extends BadRequestAlertException {
private static final long serialVersionUID = 1L;
public LoginAlreadyUsedException() {
super(ErrorConstants.LOGIN_ALREADY_USED_TYPE, "Login name already used!", "userManagement", "userexists");
}
}
|
[
"gjorgjikirkov@gmail.com"
] |
gjorgjikirkov@gmail.com
|
fd40998557cc1ee5b804fed23c375c233622a715
|
a70bb22000cd7c6cfb01aa1db33164d92bf42a59
|
/rumo-springmvc-permission/src/main/java/com/rumo/vo/ServerResponse.java
|
497462d253629af40acfaac3888dd80d6473eb4e
|
[] |
no_license
|
zixuncool/springboot-all
|
ef6cc0281a92b8a6a41706966aaec3aad6c1c04b
|
478333f32ff28477613e95ffdf11e7acc21fd488
|
refs/heads/master
| 2020-05-19T10:19:15.819966
| 2018-10-10T12:00:09
| 2018-10-10T12:00:09
| 184,964,876
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,280
|
java
|
package com.rumo.vo;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;
import org.codehaus.jackson.annotate.JsonIgnore;
import org.codehaus.jackson.map.annotate.JsonSerialize;
/**
* Created by mofeng
*/
@JsonSerialize(include = JsonSerialize.Inclusion.NON_NULL)
public class ServerResponse implements Serializable {
private int status;
private String msg;
private Object data;
private String field;
private ServerResponse(int status) {
this.status = status;
}
private ServerResponse(int status, Object data) {
this.status = status;
this.data = data;
}
private ServerResponse(int status,String filed, String msg) {
this.status = status;
this.field = filed;
this.msg = msg;
}
private ServerResponse(int status, String msg, Object data) {
this.status = status;
this.msg = msg;
this.data = data;
}
private ServerResponse(int status, String msg) {
this.status = status;
this.msg = msg;
}
@JsonIgnore
public boolean isSuccess() {
return this.status == ResponseCode.SUCCESS.getCode();
}
public int getStatus() {
return status;
}
public Object getData() {
return data;
}
public String getMsg() {
return msg;
}
public String getField() {
return field;
}
public static ServerResponse createBySuccess() {
return new ServerResponse(ResponseCode.SUCCESS.getCode());
}
public static ServerResponse createBySuccessMessage(String msg) {
return new ServerResponse(ResponseCode.SUCCESS.getCode(), msg);
}
public static ServerResponse createBySuccess(Object data) {
return new ServerResponse(ResponseCode.SUCCESS.getCode(), data);
}
public static ServerResponse createBySuccess(String msg, Object data) {
return new ServerResponse(ResponseCode.SUCCESS.getCode(), msg, data);
}
public static ServerResponse createByError() {
return new ServerResponse(ResponseCode.ERROR.getCode(), ResponseCode.ERROR.getDesc());
}
public static ServerResponse createByErrorMessage(ResponseCode responseCode) {
return new ServerResponse(responseCode.getCode(), responseCode.getDesc());
}
public static ServerResponse createByErrorMessage(ResponseCode responseCode,Object data) {
return new ServerResponse(responseCode.getCode(), responseCode.getDesc(),data);
}
public static ServerResponse createByErrorMessage(String errorMessage) {
return new ServerResponse(ResponseCode.ERROR.getCode(), errorMessage);
}
public static ServerResponse createByValidatorError(String filed,String errorMessasge) {
return new ServerResponse(405,filed,errorMessasge);
}
public static ServerResponse createByErrorCodeMessage(int errorCode, String errorMessage) {
return new ServerResponse(errorCode, errorMessage);
}
/**
* 转化
* 方法名:toMap<br/>
* 创建人:mofeng <br/>
* 时间:2018年9月18日-下午3:05:17 <br/>
* 手机:1564545646464<br/>
* @return Map<String,Object><br/>
* @exception <br/>
* @since 1.0.0<br/>
*/
public Map<String, Object> toMap() {
HashMap<String, Object> map = new HashMap<>();
map.put("status", status);
map.put("msg",msg);
map.put("data",data);
return map;
}
}
|
[
"xuchengfeifei@163.com"
] |
xuchengfeifei@163.com
|
aae7c01c66505bc26e614a7eca8c8399a8917035
|
b8ab8c96dd7776aaaf522b04173a9646e5e28ab4
|
/src/crs-core/src/main/java/pl/nask/crs/entities/service/impl/EntitiesServiceImpl.java
|
b9b9cbdcc457ce811a212d6ecc03a0a18e19ebc4
|
[] |
no_license
|
srirammails/iedr
|
f7638717a62b5b12add24fb70515e982a0a687c6
|
848c2560e9e0c73d93b40e31ce0d0ce2453969d1
|
refs/heads/master
| 2023-02-18T21:51:23.701880
| 2017-08-22T08:17:24
| 2017-08-22T08:17:24
| 101,394,020
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,553
|
java
|
package pl.nask.crs.entities.service.impl;
import pl.nask.crs.entities.ClassCategoryEntity;
import pl.nask.crs.entities.service.EntitiesService;
import pl.nask.crs.entities.exceptions.HolderClassNotExistException;
import pl.nask.crs.entities.exceptions.HolderCategoryNotExistException;
import pl.nask.crs.entities.exceptions.ClassDontMatchCategoryException;
import pl.nask.crs.entities.exceptions.ClassCategoryPermissionException;
import pl.nask.crs.entities.dao.EntityClassDAO;
import pl.nask.crs.entities.dao.EntityCategoryDAO;
import pl.nask.crs.commons.utils.Validator;
import java.util.List;
/**
* @author: Marcin Tkaczyk
*/
public class EntitiesServiceImpl implements EntitiesService {
EntityClassDAO classDAO;
EntityCategoryDAO categoryDAO;
public EntitiesServiceImpl(EntityClassDAO entityClassDAO, EntityCategoryDAO entityCategoryDAO) {
this.classDAO = entityClassDAO;
this.categoryDAO = entityCategoryDAO;
}
@Override
public ClassCategoryEntity checkHolderEntities(String className, String categoryName, String nicHandleId) throws HolderClassNotExistException, HolderCategoryNotExistException, ClassDontMatchCategoryException {
Validator.assertNotEmpty(className, "holder class name");
Validator.assertNotEmpty(categoryName, "holder category name");
String clazz = classDAO.getClassByName(className);
if (clazz == null)
throw new HolderClassNotExistException(className);
String category = categoryDAO.getCategoryByName(categoryName);
if (category == null)
throw new HolderCategoryNotExistException(categoryName);
if (!classDAO.isClassMatchCategory(className, categoryName))
throw new ClassDontMatchCategoryException(className, categoryName);
return new ClassCategoryEntity(clazz, category);
}
@Override
public void checkHolderEntitiesPermissions(String className, String categoryName, String nicHandleId) throws ClassCategoryPermissionException {
Validator.assertNotEmpty(className, "holder class name");
Validator.assertNotEmpty(categoryName, "holder category name");
if (nicHandleId != null) {
if (!categoryDAO.hasPermissionToClassCategory(nicHandleId, className, categoryName))
throw new ClassCategoryPermissionException();
}
}
@Override
public List<ClassCategoryEntity> getClassCategory() {
return classDAO.getClassCategoryEntity();
}
}
|
[
"admin@work-vm.localdomain"
] |
admin@work-vm.localdomain
|
602fa8d969bcbcfe041a70cd66ec3b346b33c96f
|
c54062a41a990c192c3eadbb9807e9132530de23
|
/demos/src/main/java/abstractclass/Course.java
|
e81bc9abfee8e8173c9f5b197767010d25916519
|
[] |
no_license
|
Training360/strukturavalto-java-public
|
0d76a9dedd7f0a0a435961229a64023931ec43c7
|
82d9b3c54437dd7c74284f06f9a6647ec62796e3
|
refs/heads/master
| 2022-07-27T15:07:57.915484
| 2021-12-01T08:57:06
| 2021-12-01T08:57:06
| 306,286,820
| 13
| 115
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 363
|
java
|
package abstractclass;
public class Course {
private String name;
private boolean taken;
public Course(String name) {
this.name = name;
}
public String getName() {
return name;
}
public boolean isTaken() {
return taken;
}
public void setTaken(boolean taken) {
this.taken = taken;
}
}
|
[
"viczian.istvan@gmail.com"
] |
viczian.istvan@gmail.com
|
8d687704cd34f8acb7ec80f6533f69eed2d89a5a
|
5ecd15baa833422572480fad3946e0e16a389000
|
/framework/MCS-Open/subsystems/runtime/main/api/java/com/volantis/mcs/protocols/response/attributes/ResponseProgressAttributes.java
|
37630afd287952d514202ce682d1c68cfd05ba43
|
[] |
no_license
|
jabley/volmobserverce
|
4c5db36ef72c3bb7ef20fb81855e18e9b53823b9
|
6d760f27ac5917533eca6708f389ed9347c7016d
|
refs/heads/master
| 2021-01-01T05:31:21.902535
| 2009-02-04T02:29:06
| 2009-02-04T02:29:06
| 38,675,289
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,172
|
java
|
/*
This file is part of Volantis Mobility Server.
Volantis Mobility Server 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.
Volantis Mobility Server 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 Volantis Mobility Server. If not, see <http://www.gnu.org/licenses/>.
*/
/* ----------------------------------------------------------------------------
* (c) Volantis Systems Ltd 2006.
* ----------------------------------------------------------------------------
*/
package com.volantis.mcs.protocols.response.attributes;
import com.volantis.mcs.protocols.MCSAttributes;
/**
* Holds attributes specific to progress element from widgets-response namespace
*/
public class ResponseProgressAttributes extends MCSAttributes {
}
|
[
"iwilloug@b642a0b7-b348-0410-9912-e4a34d632523"
] |
iwilloug@b642a0b7-b348-0410-9912-e4a34d632523
|
dfa92248cb089313a5882d01236c0c2c4073ca66
|
9254e7279570ac8ef687c416a79bb472146e9b35
|
/iot-20180120/src/main/java/com/aliyun/iot20180120/models/CreateEdgeInstanceDeploymentRequest.java
|
e2a3911776765f5ef76eaf66e9ca7ba45657772b
|
[
"Apache-2.0"
] |
permissive
|
lquterqtd/alibabacloud-java-sdk
|
3eaa17276dd28004dae6f87e763e13eb90c30032
|
3e5dca8c36398469e10cdaaa34c314ae0bb640b4
|
refs/heads/master
| 2023-08-12T13:56:26.379027
| 2021-10-19T07:22:15
| 2021-10-19T07:22:15
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,265
|
java
|
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.iot20180120.models;
import com.aliyun.tea.*;
public class CreateEdgeInstanceDeploymentRequest extends TeaModel {
@NameInMap("IotInstanceId")
public String iotInstanceId;
@NameInMap("InstanceId")
public String instanceId;
@NameInMap("Type")
public String type;
public static CreateEdgeInstanceDeploymentRequest build(java.util.Map<String, ?> map) throws Exception {
CreateEdgeInstanceDeploymentRequest self = new CreateEdgeInstanceDeploymentRequest();
return TeaModel.build(map, self);
}
public CreateEdgeInstanceDeploymentRequest setIotInstanceId(String iotInstanceId) {
this.iotInstanceId = iotInstanceId;
return this;
}
public String getIotInstanceId() {
return this.iotInstanceId;
}
public CreateEdgeInstanceDeploymentRequest setInstanceId(String instanceId) {
this.instanceId = instanceId;
return this;
}
public String getInstanceId() {
return this.instanceId;
}
public CreateEdgeInstanceDeploymentRequest setType(String type) {
this.type = type;
return this;
}
public String getType() {
return this.type;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
95b096531a6ccff86fd20b5f41b5c4666310b6c4
|
b19dcd301f4b266ebff0854dc142fc16653d4e6f
|
/java/Thmod/Cards/SpellCards/HeartBreak.java
|
f289b44a9b1d8ff45158144d610d47483a498e9a
|
[] |
no_license
|
HOYKJ/KomeijiMod
|
fea7021ef13c4532001f4378635f67b3e84c8afc
|
760e0c51b918e406ba659a9c8b173a7354c687f6
|
refs/heads/master
| 2021-10-29T01:33:45.187642
| 2021-10-21T13:34:21
| 2021-10-21T13:34:21
| 140,571,160
| 11
| 6
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,530
|
java
|
package Thmod.Cards.SpellCards;
import com.megacrit.cardcrawl.actions.AbstractGameAction;
import com.megacrit.cardcrawl.actions.common.DamageAction;
import com.megacrit.cardcrawl.actions.common.ReducePowerAction;
import com.megacrit.cardcrawl.cards.AbstractCard;
import com.megacrit.cardcrawl.cards.DamageInfo;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.localization.CardStrings;
import com.megacrit.cardcrawl.monsters.AbstractMonster;
import com.megacrit.cardcrawl.monsters.ending.CorruptHeart;
import com.megacrit.cardcrawl.unlock.UnlockTracker;
import Thmod.Cards.DeriveCards.EasterEgg.RealHeartBreak;
public class HeartBreak extends AbstractSpellCards {
public static final String ID = "HeartBreak";
private static final CardStrings cardStrings;
public static final String NAME;
public static final String DESCRIPTION;
private int pointcost;
public HeartBreak() {
super("HeartBreak", HeartBreak.NAME, 1, HeartBreak.DESCRIPTION, CardType.ATTACK, CardRarity.SPECIAL, CardTarget.ALL_ENEMY);
this.baseDamage = 16;
this.baseMagicNumber = 6;
this.magicNumber = this.baseMagicNumber;
this.pointcost = 2;
}
public void use(final AbstractPlayer p, final AbstractMonster m) {
if (p.hasPower("PointPower")) {
if (p.getPower("PointPower").amount >= this.pointcost) {
if(AbstractDungeon.getCurrRoom().monsters.monsters.get(0) instanceof CorruptHeart){
AbstractMonster target = AbstractDungeon.getCurrRoom().monsters.monsters.get(0);
AbstractDungeon.actionManager.addToBottom(new DamageAction(target, new DamageInfo(p, 999, DamageInfo.DamageType.HP_LOSS), AbstractGameAction.AttackEffect.SMASH));
UnlockTracker.unlockCard(RealHeartBreak.ID);
}
else {
for (int i = 0; i < AbstractDungeon.getCurrRoom().monsters.monsters.size(); i++) {
AbstractMonster target = AbstractDungeon.getCurrRoom().monsters.monsters.get(i);
if ((!(target.isDying)) && (target.currentHealth > 0) && (!(target.isEscaping))) {
AbstractDungeon.actionManager.addToBottom(new DamageAction(target, new DamageInfo(p, this.damage, DamageInfo.DamageType.NORMAL), AbstractGameAction.AttackEffect.BLUNT_HEAVY));
this.damage += this.magicNumber;
}
}
}
AbstractDungeon.actionManager.addToTop(new ReducePowerAction(p,p,"PointPower",this.pointcost));
}
}
}
public boolean canUse(AbstractPlayer p, AbstractMonster m){
super.canUse(p,m);
if (p.hasPower("PointPower")) {
if (p.getPower("PointPower").amount >= this.pointcost) {
return true;
}
}
this.cantUseMessage = AbstractSpellCards.EXTENDED_DESCRIPTION[4];
return false;
}
public AbstractCard makeCopy() {
return new HeartBreak();
}
public void upgrade() {
if (!(this.upgraded)) {
this.upgradeName();
}
}
static {
cardStrings = CardCrawlGame.languagePack.getCardStrings("HeartBreak");
NAME = HeartBreak.cardStrings.NAME;
DESCRIPTION = HeartBreak.cardStrings.DESCRIPTION;
}
}
|
[
"1500959719@qq.com"
] |
1500959719@qq.com
|
787584e2c78355fbf61997a5ae88981ee1a0a55f
|
ae57590200b4620506f8f4020964a7b30951b194
|
/NeoDatis/src-gui/org/neodatis/odb/gui/connect/RemoteConnectionPanel.java
|
e8e243e1a9f7478fd4a3be70bf11b63c1a825d86
|
[] |
no_license
|
antonisvarsamis/NeoDatis
|
d472e2d0720a88afcfd2e6c3958683f4a162a1fc
|
022ed4fe5f1a800a970e8226a08599609db69617
|
refs/heads/master
| 2020-04-15T12:24:58.311118
| 2014-02-02T17:53:52
| 2014-02-02T17:53:52
| 164,673,078
| 0
| 0
| null | 2019-01-08T15:03:46
| 2019-01-08T15:03:45
| null |
UTF-8
|
Java
| false
| false
| 7,237
|
java
|
/*
NeoDatis ODB : Native Object Database (odb.info@neodatis.org)
Copyright (C) 2007 NeoDatis Inc. http://www.neodatis.org
"This file is part of the NeoDatis ODB open source object database".
NeoDatis ODB is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
NeoDatis ODB is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package org.neodatis.odb.gui.connect;
import java.awt.BorderLayout;
import java.awt.Dimension;
import java.awt.FlowLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.util.Collection;
import java.util.Vector;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTextField;
import org.neodatis.odb.ODB;
import org.neodatis.odb.ODBFactory;
import org.neodatis.odb.core.query.IQuery;
import org.neodatis.odb.core.query.criteria.Where;
import org.neodatis.odb.gui.LoggerPanel;
import org.neodatis.odb.gui.Messages;
import org.neodatis.odb.impl.core.query.criteria.CriteriaQuery;
import org.neodatis.tool.ILogger;
public class RemoteConnectionPanel extends ConnectionPanel implements ActionListener {
private JTextField tfHost;
private JTextField tfPort;
private JTextField tfBase;
private JTextField tfUserName;
private JPasswordField tfPassword;
private JComboBox cbConnections;
private ILogger logger;
public RemoteConnectionPanel(ILogger logger) {
this.logger = logger;
initGUI();
}
private void initGUI() {
logger.info("local connection");
tfHost = new JTextField(20);
tfPort = new JTextField(10);
tfUserName = new JTextField(20);
tfPassword = new JPasswordField(20);
tfBase = new JTextField(20);
Vector<RemoteConnection> v = null;
try {
v = new Vector<RemoteConnection>(getRecentRemoteConnections());
} catch (Exception e) {
String error = "Error while loading recent conections";
logger.error(error);
}
cbConnections = new JComboBox(v);
cbConnections.setActionCommand("choose-recent");
cbConnections.addActionListener(this);
cbConnections.setPreferredSize(new Dimension((int) cbConnections.getPreferredSize().getWidth(), (int) tfHost.getPreferredSize()
.getHeight()));
JButton btChoose = new JButton(Messages.getString("Choose"));
btChoose.setActionCommand("choose");
btChoose.addActionListener(this);
JPanel fieldsPanel = new JPanel(new BorderLayout(5, 5));
JPanel labelsPanel = new JPanel(new GridLayout(5, 1));
labelsPanel.add(new JLabel(Messages.getString("Recent")));
labelsPanel.add(new JLabel(Messages.getString("Host")));
labelsPanel.add(new JLabel(Messages.getString("Base")));
labelsPanel.add(new JLabel(Messages.getString("User")));
labelsPanel.add(new JLabel(Messages.getString("Password")));
JPanel panel0 = new JPanel(new FlowLayout(FlowLayout.LEFT));
panel0.add(cbConnections);
JPanel panel1 = new JPanel(new FlowLayout(FlowLayout.LEFT));
panel1.add(tfHost);
panel1.add(new JLabel(Messages.getString("Port")));
panel1.add(tfPort);
JPanel panel12 = new JPanel(new FlowLayout(FlowLayout.LEFT));
panel12.add(tfBase);
JPanel panel2 = new JPanel(new FlowLayout(FlowLayout.LEFT));
panel2.add(tfUserName);
JPanel panel3 = new JPanel(new FlowLayout(FlowLayout.LEFT));
panel3.add(tfPassword);
JPanel inputPanel = new JPanel(new GridLayout(5, 1));
inputPanel.add(panel0);
inputPanel.add(panel1);
inputPanel.add(panel12);
inputPanel.add(panel2);
inputPanel.add(panel3);
fieldsPanel.add(labelsPanel, BorderLayout.WEST);
fieldsPanel.add(inputPanel, BorderLayout.CENTER);
setLayout(new BorderLayout(5, 5));
add(fieldsPanel, BorderLayout.CENTER);
}
private Collection<RemoteConnection> getRecentRemoteConnections() throws Exception {
ODB odb = null;
try {
odb = ODBFactory.open(Constant.CONNECT_FILE_NAME);
return odb.getObjects(RemoteConnection.class, true);
} finally {
if (odb != null) {
odb.close();
}
}
}
private boolean existConnection(String host, int port, String user) throws Exception {
ODB odb = null;
try {
odb = ODBFactory.open(Constant.CONNECT_FILE_NAME);
IQuery query = new CriteriaQuery(RemoteConnection.class, Where.and().add(Where.equal("host", host)).add(
Where.equal("port", port)).add(Where.equal("user", user)));
return !odb.getObjects(query).isEmpty();
} finally {
if (odb != null) {
odb.close();
}
}
}
public void actionPerformed(ActionEvent e) {
String command = e.getActionCommand();
if ("choose-recent".equals(command)) {
chooseRecent();
}
}
private void chooseRecent() {
RemoteConnection rc = (RemoteConnection) cbConnections.getSelectedItem();
tfHost.setText(rc.getHost());
tfPort.setText(String.valueOf(rc.getPort()));
if (rc.getUser() != null) {
tfUserName.setText(rc.getUser());
}
tfBase.setText(rc.getBaseIdentifier());
}
public boolean validateData() {
if (tfHost.getText().length() == 0) {
logger.error("Please inform the Host name");
tfHost.requestFocus();
return false;
}
if (tfPort.getText().length() == 0) {
logger.error("Please inform the Port");
tfPort.requestFocus();
return false;
}
if (tfBase.getText().length() == 0) {
logger.error("Please inform the Base");
tfBase.requestFocus();
return false;
}
return true;
}
public Connection getConnection() throws Exception {
RemoteConnection rc = new RemoteConnection();
rc.setHost(tfHost.getText());
rc.setPort(Integer.parseInt(tfPort.getText()));
rc.setBaseIdentifier(tfBase.getText());
if (tfUserName.getText().length() > 0) {
rc.setUser(tfUserName.getText());
rc.setPassword(tfPassword.getText());
}
if (!existConnection(rc.getHost(), rc.getPort(), rc.getUser())) {
saveConnection(rc);
}
logger.info("connecting to " + rc);
return rc;
}
private void saveConnection(Connection connection) throws Exception {
ODB odb = null;
try {
odb = ODBFactory.open(Constant.CONNECT_FILE_NAME);
odb.store(connection);
} finally {
if (odb != null) {
odb.close();
}
}
}
public static void main(String[] args) {
LoggerPanel loggerPanel = new LoggerPanel();
RemoteConnectionPanel lcp = new RemoteConnectionPanel(loggerPanel);
JFrame f = new JFrame("Test RemoteConnectionPanel");
f.getContentPane().add(lcp);
f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f.pack();
f.setVisible(true);
JFrame f2 = new JFrame("Test RemoteConnectionPanel");
f2.getContentPane().add(loggerPanel);
f2.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
f2.pack();
f2.setVisible(true);
}
}
|
[
"sirlordt@gmail.com"
] |
sirlordt@gmail.com
|
0dbb47a8e29ea74e4aed539d27014708d0bb04ee
|
70b2493978c469a3e5cc1ad907d95e1ca85eb6dd
|
/jonix-onix2/src/main/java/com/tectonica/jonix/onix2/AlternativeFormatISBN.java
|
71d2f80c9aa9d3489fa90c1913b1caeee81ef8a8
|
[
"Apache-2.0"
] |
permissive
|
archi3315/jonix
|
9130d06790f0e5267d911c164fb256e00826e05c
|
e7f59e81d3d6e3f4fa78a9406eceed97901093d0
|
refs/heads/master
| 2020-05-17T15:23:31.701307
| 2019-04-29T15:13:49
| 2019-04-29T15:13:49
| 183,789,334
| 0
| 0
| null | 2019-04-27T15:21:51
| 2019-04-27T15:21:51
| null |
UTF-8
|
Java
| false
| false
| 4,303
|
java
|
/*
* Copyright (C) 2012 Zach Melamed
*
* Latest version available online at https://github.com/zach-m/jonix
* Contact me at zach@tectonica.co.il
*
* 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.tectonica.jonix.onix2;
import com.tectonica.jonix.JPU;
import com.tectonica.jonix.OnixElement;
import com.tectonica.jonix.codelist.LanguageCodes;
import com.tectonica.jonix.codelist.RecordSourceTypes;
import com.tectonica.jonix.codelist.TextCaseFlags;
import com.tectonica.jonix.codelist.TextFormats;
import com.tectonica.jonix.codelist.TransliterationSchemes;
import java.io.Serializable;
/*
* NOTE: THIS IS AN AUTO-GENERATED FILE, DO NOT EDIT MANUALLY
*/
/**
* <h1>Alternative-format ISBN</h1><p>International Standard Book Number identifying an alternative format in which the
* product is available. Optional and non-repeating. <strong>The <RelatedProduct> composite on a later page
* provides a more general method of handling related items, and is to be preferred.</strong></p><table border='1'
* cellpadding='3'><tr><td>Format</td><td>Fixed-length, 10 characters, all numeric except last character, which may be
* letter X.</td></tr><tr><td>Reference name</td><td><AlternativeFormatISBN></td></tr><tr><td>Short
* tag</td><td><h132></td></tr><tr><td>Example</td><td><h132>8474339790</h132></td></tr></table>
*/
public class AlternativeFormatISBN implements OnixElement<String>, Serializable {
private static final long serialVersionUID = 1L;
public static final String refname = "AlternativeFormatISBN";
public static final String shortname = "h132";
/////////////////////////////////////////////////////////////////////////////////
// ATTRIBUTES
/////////////////////////////////////////////////////////////////////////////////
public TextFormats textformat;
public TextCaseFlags textcase;
public LanguageCodes language;
public TransliterationSchemes transliteration;
/**
* (type: DateOrDateTime)
*/
public String datestamp;
public RecordSourceTypes sourcetype;
public String sourcename;
/////////////////////////////////////////////////////////////////////////////////
// VALUE MEMBER
/////////////////////////////////////////////////////////////////////////////////
/**
* Raw Format: Fixed-length, 10 characters, all numeric except last character, which may be letter X.<p> (type:
* NonEmptyString)
*/
public String value;
/**
* Internal API, use the {@link #value} field instead
*/
@Override
public String _value() {
return value;
}
/////////////////////////////////////////////////////////////////////////////////
// SERVICES
/////////////////////////////////////////////////////////////////////////////////
private final boolean exists;
public static final AlternativeFormatISBN EMPTY = new AlternativeFormatISBN();
public AlternativeFormatISBN() {
exists = false;
}
public AlternativeFormatISBN(org.w3c.dom.Element element) {
exists = true;
textformat = TextFormats.byCode(JPU.getAttribute(element, "textformat"));
textcase = TextCaseFlags.byCode(JPU.getAttribute(element, "textcase"));
language = LanguageCodes.byCode(JPU.getAttribute(element, "language"));
transliteration = TransliterationSchemes.byCode(JPU.getAttribute(element, "transliteration"));
datestamp = JPU.getAttribute(element, "datestamp");
sourcetype = RecordSourceTypes.byCode(JPU.getAttribute(element, "sourcetype"));
sourcename = JPU.getAttribute(element, "sourcename");
value = JPU.getContentAsString(element);
}
@Override
public boolean exists() {
return exists;
}
}
|
[
"zach@tectonica.co.il"
] |
zach@tectonica.co.il
|
892259baab051c90e9410b2996c83e8af874f3ea
|
0b4844d550c8e77cd93940e4a1d8b06d0fbeabf7
|
/JavaSource/dream/work/rpt/mapmtrend/form/MaPmTrendChartForm.java
|
31d19ca50015ec18b30fa8fbd719b850eb8a36d7
|
[] |
no_license
|
eMainTec-DREAM/DREAM
|
bbf928b5c50dd416e1d45db3722f6c9e35d8973c
|
05e3ea85f9adb6ad6cbe02f4af44d941400a1620
|
refs/heads/master
| 2020-12-22T20:44:44.387788
| 2020-01-29T06:47:47
| 2020-01-29T06:47:47
| 236,912,749
| 0
| 0
| null | null | null | null |
UHC
|
Java
| false
| false
| 698
|
java
|
package dream.work.rpt.mapmtrend.form;
import common.struts.BaseForm;
import dream.work.rpt.mapmtrend.dto.MaPmTrendChartDTO;
/**
* 예방점검경향분석 FORM
* @author kim21017
* @version $Id: MaPmTrendChartForm.java,v 1.0 2015/12/01 09:13:09 kim21017 Exp $
* @since 1.0
*
* @struts.form name="maPmTrendChartForm"
*/
public class MaPmTrendChartForm extends BaseForm
{
private MaPmTrendChartDTO maPmTrendChartDTO = new MaPmTrendChartDTO();
public MaPmTrendChartDTO getMaPmTrendChartDTO() {
return maPmTrendChartDTO;
}
public void setMaPmTrendChartDTO(MaPmTrendChartDTO maPmTrendChartDTO) {
this.maPmTrendChartDTO = maPmTrendChartDTO;
}
}
|
[
"HN4741@10.31.0.185"
] |
HN4741@10.31.0.185
|
9f4c577c2184dbc424b622fd879718581084a4de
|
3383c2127e51d07c32ae1a618ce632e316602e4f
|
/src/main/java/kz/tezdet/lessons/hibernate/models/Employee.java
|
7bab457cd74123b2a135be6b5de42eaee349446d
|
[] |
no_license
|
daucloudlab/HibernateTest-4
|
234536955e78a5276a7fdba56651d728b6c01585
|
4227192619c82ca08bdb959475883a90395ab976
|
refs/heads/master
| 2021-01-01T05:20:04.950270
| 2016-04-26T11:31:09
| 2016-04-26T11:31:09
| 57,122,945
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,154
|
java
|
package kz.tezdet.lessons.hibernate.models;
import javax.persistence.*;
import java.util.Date;
@Entity
@Table(name = "employee", catalog = "employee_db2")
public class Employee {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = "employee_id")
private Long employeeId ;
@Column(name = "firstname")
private String firstName ;
@Column(name = "lastname")
private String lastName ;
@Column(name = "birth_date")
private Date birthDate ;
@Column(name = "cell_phone")
private String cellPhone ;
@ManyToOne
@JoinColumn(name = "department_id")
private Department department ;
public Employee(){}
public Employee(String firstName, String lastName, String cellPhone) {
this.firstName = firstName;
this.lastName = lastName;
this.cellPhone = cellPhone;
}
public Employee(String firstName, String lastName,
Date birthDate, String cellPhone, Department department) {
this.firstName = firstName;
this.lastName = lastName;
this.birthDate = birthDate;
this.cellPhone = cellPhone;
this.department = department;
}
public Long getEmployeeId() {
return employeeId;
}
public void setEmployeeId(Long employeeId) {
this.employeeId = employeeId;
}
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public Date getBirthDate() {
return birthDate;
}
public void setBirthDate(Date birthDate) {
this.birthDate = birthDate;
}
public String getCellPhone() {
return cellPhone;
}
public void setCellPhone(String cellPhone) {
this.cellPhone = cellPhone;
}
public Department getDepartment() {
return department;
}
public void setDepartment(Department department) {
this.department = department;
}
}
|
[
"daucloudlab@gmail.com"
] |
daucloudlab@gmail.com
|
a9f1ca4420fbb1c3e7fd413a0ba339cead24cb40
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/6/6_ca02a1c39bd0201c4415458a4fe5f1a704b48426/ErlangStructureViewFactory/6_ca02a1c39bd0201c4415458a4fe5f1a704b48426_ErlangStructureViewFactory_t.java
|
5527cd10314d4673b4459c49aa749ac7808323e0
|
[] |
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
| 5,575
|
java
|
package org.intellij.erlang;
import com.intellij.ide.structureView.*;
import com.intellij.ide.util.treeView.smartTree.TreeElement;
import com.intellij.lang.PsiStructureViewFactory;
import com.intellij.navigation.ItemPresentation;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.pom.Navigatable;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.util.Function;
import com.intellij.util.PlatformIcons;
import com.intellij.util.containers.ContainerUtil;
import org.intellij.erlang.psi.*;
import org.jetbrains.annotations.NotNull;
import javax.swing.*;
import java.util.ArrayList;
import java.util.List;
/**
* @author ignatov
*/
public class ErlangStructureViewFactory implements PsiStructureViewFactory {
@Override
public StructureViewBuilder getStructureViewBuilder(final PsiFile psiFile) {
return new TreeBasedStructureViewBuilder() {
@NotNull
public StructureViewModel createStructureViewModel() {
return new Model(psiFile);
}
@Override
public boolean isRootNodeShown() {
return false;
}
};
}
public static class Model extends StructureViewModelBase implements StructureViewModel.ElementInfoProvider {
public Model(PsiFile psiFile) {
super(psiFile, new Element(psiFile));
withSuitableClasses(ErlangFile.class, ErlangFunction.class, ErlangFunctionClause.class, ErlangAttribute.class);
}
@Override
public boolean isAlwaysShowsPlus(StructureViewTreeElement structureViewTreeElement) {
return false;
}
@Override
public boolean isAlwaysLeaf(StructureViewTreeElement structureViewTreeElement) {
return false;
}
}
public static class Element implements StructureViewTreeElement, ItemPresentation {
private final PsiElement myElement;
public Element(PsiElement element) {
this.myElement = element;
}
@Override
public Object getValue() {
return myElement;
}
@Override
public void navigate(boolean requestFocus) {
((Navigatable) myElement).navigate(requestFocus);
}
@Override
public boolean canNavigate() {
return ((Navigatable) myElement).canNavigate();
}
@Override
public boolean canNavigateToSource() {
return ((Navigatable) myElement).canNavigateToSource();
}
@Override
public ItemPresentation getPresentation() {
return this;
}
@Override
public TreeElement[] getChildren() {
if (myElement instanceof ErlangFunctionClause) {
return EMPTY_ARRAY;
}
final ArrayList<TreeElement> result = new ArrayList<TreeElement>();
if (myElement instanceof ErlangFunction) {
final List<ErlangFunctionClause> clauses = ((ErlangFunction) myElement).getFunctionClauseList();
if (clauses.size() != 1) {
for (ErlangFunctionClause o : clauses) {
result.add(new Element(o));
}
}
} else if (myElement instanceof ErlangFile) {
for (ErlangAttribute o : ((ErlangFile) myElement).getAttributes()) {
result.add(new Element(o));
}
for (ErlangFunction o : ((ErlangFile) myElement).getFunctions()) {
result.add(new Element(o));
}
}
return result.toArray(new TreeElement[result.size()]);
}
@Override
public String getPresentableText() {
if (myElement instanceof ErlangFunctionClause) {
final List<ErlangArgumentDefinition> exprs = ((ErlangFunctionClause) myElement).getArgumentDefinitionList();
String res = ((ErlangFunctionClause) myElement).getQAtom().getText();
final List<String> strings = ContainerUtil.map(exprs, new Function<ErlangArgumentDefinition, String>() {
@Override
public String fun(ErlangArgumentDefinition o) {
return o.getText();
}
});
return res + "(" + StringUtil.join(strings, ", ") + ")";
}
if (myElement instanceof ErlangFunction) {
final int argCount = ((ErlangFunction) myElement).getFunctionClauseList().get(0).getArgumentDefinitionList().size();
return ((ErlangFunction) myElement).getAtomName().getText() + "/" + argCount;
} else if (myElement instanceof ErlangFile) {
return ((ErlangFile) myElement).getName();
} else if (myElement instanceof ErlangAttribute) {
ErlangAtomAttribute attribute = ((ErlangAttribute) myElement).getAtomAttribute();
ErlangSpecification specification = ((ErlangAttribute) myElement).getSpecification();
ErlangCallbackSpec callbackSpec = ((ErlangAttribute) myElement).getCallbackSpec();
return "-" + (attribute != null ? attribute.getQAtom().getText() :
specification != null ? "spec" :
callbackSpec != null ? "callback" : "<empty>");
}
throw new AssertionError(myElement.getClass().getName());
}
@Override
public String getLocationString() {
return null;
}
@Override
public Icon getIcon(boolean open) {
if (myElement instanceof ErlangFunction) {
return PlatformIcons.FUNCTION_ICON;
} else if (myElement instanceof ErlangFunctionClause) {
return PlatformIcons.PACKAGE_LOCAL_ICON;
} else if (myElement instanceof ErlangAttribute) {
return PlatformIcons.ANNOTATION_TYPE_ICON;
}
return myElement.getIcon(0);
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
347348fac139f0aa29ae6e0512fa01083718364e
|
dc1dbb7e5a4b95bf44170d2f51fd08b3814f2ac9
|
/data_defect4j/preprossed_method_corpus/Math/1/org/apache/commons/math3/dfp/DfpField_getOne_409.java
|
1b2db56b5d7cf1eea44267e151fda264559fd7a7
|
[] |
no_license
|
hvdthong/NetML
|
dca6cf4d34c5799b400d718e0a6cd2e0b167297d
|
9bb103da21327912e5a29cbf9be9ff4d058731a5
|
refs/heads/master
| 2021-06-30T15:03:52.618255
| 2020-10-07T01:58:48
| 2020-10-07T01:58:48
| 150,383,588
| 1
| 1
| null | 2018-09-26T07:08:45
| 2018-09-26T07:08:44
| null |
UTF-8
|
Java
| false
| false
| 875
|
java
|
org apach common math3 dfp
field decim float point instanc
version
dfp field dfpfield field dfp
constant
link dfp
dfp geton
|
[
"hvdthong@gmail.com"
] |
hvdthong@gmail.com
|
2fe383c1a7a3b0e8f97d80cca05d75c37ca59c0c
|
d9477e8e6e0d823cf2dec9823d7424732a7563c4
|
/plugins/JavaSideKick/tags/javasidekick-3-3-0/src/sidekick/java/JavaSideKickParsedData.java
|
96c8e56f504d6c048c383bcfd5569d67fb2491cf
|
[] |
no_license
|
RobertHSchmidt/jedit
|
48fd8e1e9527e6f680de334d1903a0113f9e8380
|
2fbb392d6b569aefead29975b9be12e257fbe4eb
|
refs/heads/master
| 2023-08-30T02:52:55.676638
| 2018-07-11T13:28:01
| 2018-07-11T13:28:01
| 140,587,948
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,773
|
java
|
/*
* 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
package sidekick.java;
import javax.swing.text.Segment;
import javax.swing.tree.*;
import java.util.*;
import org.gjt.sp.util.Log;
import sidekick.*;
import sidekick.util.Range;
import sidekick.java.node.CUNode;
import sidekick.java.node.TigerNode;
import org.gjt.sp.jedit.buffer.FoldHandler;
import org.gjt.sp.jedit.buffer.JEditBuffer;
/**
* Stores a buffer structure tree.
* Plugins can extend this class to persist plugin-specific information.
* For example, the XML plugin stores code completion-related structures using
* a subclass.
*
* @author Dale Anson
*/
public class JavaSideKickParsedData extends SideKickParsedData {
private FoldHandler foldHandler = null;
/**
* @param fileName The file name being parsed, used as the root of the
* tree.
*/
public JavaSideKickParsedData( String fileName ) {
super( fileName );
}
/**
* Overridden to search TigerNodes rather than TreeNodes. Not all tree nodes
* may be showing, need the deepest asset at the cursor position for code
* completion.
* @param pos the caret position within the code
*/
public IAsset getAssetAtOffset( int pos ) {
Object userObject = ( ( DefaultMutableTreeNode ) root ).getUserObject();
if ( ! ( userObject instanceof TigerNode ) ) {
return null;
}
TigerNode tn = getTigerNodeAtOffset( ( TigerNode ) userObject, pos );
return tn;
}
/**
* Drill down to the node containing the given position.
* @param tn The node to check the children of.
* @param pos The caret position within the code.
*/
private TigerNode getTigerNodeAtOffset( TigerNode tn, int pos ) {
int closestPosition = tn.getStart().getOffset();
TigerNode closestChild = tn;
for ( int i = 0; i < tn.getChildCount(); i++ ) {
TigerNode child = tn.getChildAt( i );
int start = child.getStart().getOffset();
int end = child.getEnd().getOffset();
// do two different checks here since
// during code completion, the parser may not be able to completely
// parse the buffer and won't be able to calculate the end position
// of nodes.
if ( end == 0 && start >= closestPosition && start <= pos ) {
closestPosition = start;
closestChild = child;
} else if ( start >= closestPosition && start <= pos && end >= pos ) {
closestPosition = start;
closestChild = child;
}
}
if ( closestChild == tn ) {
return tn;
}
return getTigerNodeAtOffset( closestChild, pos );
}
// overridden to handle Extends and Implements nodes
protected boolean canAddToPath( TreeNode node ) {
try {
TigerNode tn = ( TigerNode ) getAsset( node );
return ( tn.getOrdinal() == TigerNode.EXTENDS || tn.getOrdinal() == TigerNode.IMPLEMENTS ) ? false : true;
} catch ( Exception e ) {
return super.canAddToPath( node );
}
}
/**
* @return A special fold handler for java.
*/
public FoldHandler getFoldHandler() {
if ( foldHandler == null ) {
foldHandler = new JavaFoldHandler();
}
return foldHandler;
}
/**
* Java fold handler.
*/
private class JavaFoldHandler extends FoldHandler {
public JavaFoldHandler() {
super( "javasidekick" );
}
public int getFoldLevel( JEditBuffer buffer, int lineIndex, Segment seg ) {
if ( lineIndex == 0 ) {
return 0;
}
int lineStartOffset = buffer.getLineStartOffset( lineIndex );
TreePath path = getTreePathForPosition( lineStartOffset );
if ( path == null ) {
return 0;
} else {
Object userObject = ( ( DefaultMutableTreeNode ) root ).getUserObject();
if ( ! ( userObject instanceof CUNode ) ) {
return 0;
}
// check if in imports range
Range importsRange = ( ( CUNode ) userObject ).getImportsRange();
if ( importsRange != null && lineIndex >= importsRange.getStartLocation().line && lineIndex < importsRange.getEndLocation().line ) {
return 1;
}
// otherwise, proceed as usual
TreeNode treeNode = ( TreeNode ) path.getLastPathComponent();
IAsset asset = getAsset( treeNode );
if ( userObject.equals( asset ) ) {
return 0;
}
if ( asset.getStart().getOffset() == lineStartOffset ) {
if ( userObject instanceof CUNode ) {
return 0;
}
return path.getPathCount() - 2;
}
return path.getPathCount() - 1;
}
}
}
}
|
[
"daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e"
] |
daleanson@6b1eeb88-9816-0410-afa2-b43733a0f04e
|
bda3a6c4b1d2dc3d6c7152a81720fb774ddd9d36
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/17/17_e63797277a63a813992a01c8b45e6d1841f4cfad/ToolGroupButton/17_e63797277a63a813992a01c8b45e6d1841f4cfad_ToolGroupButton_t.java
|
b4be90b2661e07fd83a19aacecb918a16c826bf8
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 4,702
|
java
|
package au.org.intersect.faims.android.ui.map.button;
import java.util.ArrayList;
import java.util.List;
import android.content.Context;
import android.graphics.drawable.BitmapDrawable;
import android.view.Gravity;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.PopupWindow;
import android.widget.RelativeLayout;
import android.widget.TextView;
import au.org.intersect.faims.android.R;
import au.org.intersect.faims.android.ui.map.ToolsBarView;
import au.org.intersect.faims.android.util.ScaleUtil;
public class ToolGroupButton extends RelativeLayout {
private static final int BAR_COLOR = 0x88000000;
private static final int TEXT_COLOR = 0x88FFFFFF;
private ArrayList<ToolBarButton> buttons;
private ToolBarButton selectedButton;
private PopupWindow popupMenu;
private LinearLayout popupLayout;
private LinearLayout anchor;
private RelativeLayout holder;
private TextView label;
private ImageView image;
public ToolGroupButton(Context context) {
super(context);
setLayoutParams(new LayoutParams((int) ScaleUtil.getDip(context, ToolsBarView.BAR_HEIGHT), (int) ScaleUtil.getDip(context, ToolsBarView.BAR_HEIGHT)));
holder = new RelativeLayout(context);
holder.setLayoutParams(new LayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT)));
addView(holder);
this.label = new TextView(context);
label.setTextSize(10);
label.setTextColor(TEXT_COLOR);
RelativeLayout.LayoutParams labelParams = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
labelParams.alignWithParent = true;
labelParams.addRule(RelativeLayout.ALIGN_TOP);
labelParams.addRule(RelativeLayout.CENTER_HORIZONTAL);
label.setLayoutParams(labelParams);
holder.addView(label);
image = new ImageView(this.getContext());
image.setImageResource(R.drawable.dropdown_ic_arrow_normal_holo_light);
RelativeLayout.LayoutParams params = new RelativeLayout.LayoutParams(LayoutParams.WRAP_CONTENT, LayoutParams.WRAP_CONTENT);
params.alignWithParent = true;
params.addRule(RelativeLayout.ALIGN_BOTTOM);
params.addRule(RelativeLayout.ALIGN_RIGHT);
image.setLayoutParams(params);
holder.addView(image);
buttons = new ArrayList<ToolBarButton>();
}
public void setLabel(String value) {
label.setText(value);
}
public void setAnchorView(LinearLayout view) {
this.anchor = view;
}
public void addButton(final ToolBarButton button) {
buttons.add(button);
button.setOnLongClickListener(new OnLongClickListener() {
@Override
public boolean onLongClick(View arg0) {
showMenu(button);
return true;
}
});
if (selectedButton == null)
selectedButton = button;
update();
}
private void showMenu(ToolBarButton button) {
update();
popupLayout = new LinearLayout(this.getContext());
popupLayout.setLayoutParams(new LayoutParams(LayoutParams.MATCH_PARENT, LayoutParams.MATCH_PARENT));
popupLayout.setGravity(Gravity.CENTER_HORIZONTAL);
popupLayout.setBackgroundColor(BAR_COLOR);
popupLayout.setOrientation(LinearLayout.VERTICAL);
for (ToolBarButton b : buttons) {
if (selectedButton == b) continue;
popupLayout.addView(b);
}
int w = button.getWidth();
int h = button.getHeight();
int count = 0;
for(int i = 0; i < popupLayout.getChildCount(); i++){
if (popupLayout.getChildAt(i).getVisibility() == View.VISIBLE) count++;
}
popupMenu = new PopupWindow(popupLayout, w, h * count, true);
popupMenu.setOutsideTouchable(true);
popupMenu.setTouchable(true);
popupMenu.setBackgroundDrawable(new BitmapDrawable(getContext().getResources()));
popupMenu.showAsDropDown(anchor, this.getLeft(), 0);
}
public void setSelectedButton(ToolBarButton button) {
selectedButton = button;
update();
}
private void update() {
if (popupMenu != null) {
popupMenu.dismiss();
popupMenu = null;
}
if (popupLayout != null) {
popupLayout.removeAllViews();
popupLayout = null;
}
this.removeAllViews();
if (selectedButton != null) {
this.addView(selectedButton);
this.addView(holder);
}
}
public List<ToolBarButton> getButtons() {
return buttons;
}
public boolean isChecked() {
return selectedButton != null ? selectedButton.isChecked() : false;
}
public void setChecked(boolean checked) {
for (ToolBarButton button : buttons) {
button.setChecked(false);
}
if (selectedButton != null) {
selectedButton.setChecked(checked);
}
update();
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
367f81ed3e36432f9e10622dd2b1cb225835a8ac
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/2/2_eb787a4f12b61740331cec58bd8e031c33cf3659/ScriptException/2_eb787a4f12b61740331cec58bd8e031c33cf3659_ScriptException_t.java
|
dd5b29ce203dc88aa65ced4b804b795f64fad3fb
|
[] |
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
| 2,390
|
java
|
/**
*
* Copyright 2005 (C) The original author or authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package javax.script;
/**
* @version $Revision: $ $Date: $
*/
public class ScriptException extends Exception
{
private final String fileName;
private final int lineNumber;
private final int columnNumber;
public ScriptException(String message)
{
this(message, null, -1, -1);
}
public ScriptException(Exception e)
{
super(e.getMessage(), e);
this.fileName = null;
this.lineNumber = -1;
this.columnNumber = -1;
}
public ScriptException(String message, String fileName, int lineNumber)
{
this(message, fileName, lineNumber, -1);
}
public ScriptException(String message, String fileName, int lineNumber, int columnNumber)
{
super(message);
this.fileName = fileName;
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
}
public String getMessage()
{
StringBuffer message = new StringBuffer(super.getMessage());
if (fileName != null)
{
if (lineNumber != -1)
{
message.append(" at [").append(lineNumber);
if (columnNumber != -1) message.append(", ").append(columnNumber);
message.append("]");
}
message.append(" in file ").append(fileName);
}
return message.toString();
}
public String getFileName()
{
return fileName;
}
public int getLineNumber()
{
return lineNumber;
}
public int getColumnNumber()
{
return columnNumber;
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
2f1523db757382d8a68550dbf407fff5ee44b3e0
|
e9c2f8cdcee975a5900ecdc12e50aefc1f8be813
|
/spring-framework/src/org/springframework/web/servlet/i18n/LocaleChangeInterceptor.java
|
911c3f71c0c451fcbce0223adb7978408f5e807b
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
z-dp/springsource
|
feee1c285667098b72ff65c95a5e8fa5e2aa4b07
|
e217eeb091c27834409ac5ee55b690b8e669c2e8
|
refs/heads/master
| 2020-04-10T03:19:35.581789
| 2018-12-07T04:10:04
| 2018-12-07T04:10:04
| 160,766,989
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,391
|
java
|
/*
* Copyright 2002-2005 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.springframework.web.servlet.i18n;
import java.util.Locale;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.beans.propertyeditors.LocaleEditor;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
import org.springframework.web.servlet.support.RequestContextUtils;
/**
* Interceptor that allows for changing the current locale on every request,
* via a configurable request parameter.
*
* @author Juergen Hoeller
* @since 20.06.2003
* @see org.springframework.web.servlet.LocaleResolver
*/
public class LocaleChangeInterceptor extends HandlerInterceptorAdapter {
/**
* Default name of the locale specification parameter: "locale".
*/
public static final String DEFAULT_PARAM_NAME = "locale";
private String paramName = DEFAULT_PARAM_NAME;
/**
* Set the name of the parameter that contains a locale specification
* in a locale change request. Default is "locale".
*/
public void setParamName(String paramName) {
this.paramName = paramName;
}
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
throws ServletException {
String newLocale = request.getParameter(this.paramName);
if (newLocale != null) {
LocaleResolver localeResolver = RequestContextUtils.getLocaleResolver(request);
LocaleEditor localeEditor = new LocaleEditor();
localeEditor.setAsText(newLocale);
localeResolver.setLocale(request, response, (Locale) localeEditor.getValue());
}
// Proceed in any case.
return true;
}
}
|
[
"zidp@cyclecentury.com"
] |
zidp@cyclecentury.com
|
1878ad41731784ec52059f0d73c4665ee87041ee
|
7e6acb0d23e368a3ca0b813458cf47b7eaf7c10f
|
/JavaProgramming/src/ch12/exam04/CalcThread.java
|
d984fa335bc18ad2f42ee9ae872ac059d84b1f38
|
[] |
no_license
|
KoByungWook/PrivateRepository
|
12493c8bfe8869f7adfe67a6b1f46fd4e1f75bd3
|
2d1d6fbdf1f75941eb206da87631e57b89d09d34
|
refs/heads/master
| 2021-01-20T00:52:01.068782
| 2017-08-09T05:32:14
| 2017-08-09T05:32:14
| 89,203,318
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 218
|
java
|
package ch12.exam04;
public class CalcThread extends Thread {
public CalcThread(String name) {
setName(name);
}
public void run() {
for(int i=0; i<2000000000; i++) {
}
System.out.println(getName());
}
}
|
[
"rhquddnr0219@gmail.com"
] |
rhquddnr0219@gmail.com
|
587b6ec3a5d484aa680da14b7403932337b0a0ef
|
0b9f100fc229c88f7ec76bab2fcb3933635549b0
|
/simmail/src/us/pserver/smail/event/MailEvent.java
|
9154aea9c137398710645eac667b1c6bfebb1398
|
[] |
no_license
|
jun0rr/java
|
e080a7f0aab9e5c42d89756e4a5eba1ec3d6904e
|
7635ee51889555454461c58580df5a2a61dd9cbf
|
refs/heads/master
| 2020-06-26T18:51:41.024454
| 2014-10-23T17:29:30
| 2014-10-23T17:29:30
| 199,715,772
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,231
|
java
|
/*
* Direitos Autorais Reservados (c) 2011 Juno Roesler
* Contato: juno.rr@gmail.com
*
* Esta biblioteca é software livre; você pode redistribuí-la e/ou modificá-la sob os
* termos da Licença Pública Geral Menor do GNU conforme publicada pela Free
* Software Foundation; tanto a versão 2.1 da Licença, ou (a seu critério) qualquer
* versão posterior.
*
* Esta biblioteca é distribuída na expectativa de que seja útil, porém, SEM
* NENHUMA GARANTIA; nem mesmo a garantia implícita de COMERCIABILIDADE
* OU ADEQUAÇÃO A UMA FINALIDADE ESPECÍFICA. Consulte a Licença Pública
* Geral Menor do GNU para mais detalhes.
*
* Você deve ter recebido uma cópia da Licença Pública Geral Menor do GNU junto
* com esta biblioteca; se não, acesse
* http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html,
* ou escreva para a Free Software Foundation, Inc., no
* endereço 59 Temple Street, Suite 330, Boston, MA 02111-1307 USA.
*/
package us.pserver.smail.event;
import us.pserver.smail.Message;
import us.pserver.smail.SMail;
/**
* <p style="font-size: medium;">
* Evento gerado por SMail para conexão, envio e
* recebimento de emails.
* </p>
*
* @see us.pserver.smail.SMail
* @author Juno Roesler - juno.rr@gmail.com
* @version 1.0 - 2011.10.13
*/
public class MailEvent extends AbstractEvent<SMail> {
private Message message;
/**
* Construtor padrão que recebe o SMail
* gerador do evento.
* @param src Gerador do evento.
*/
public MailEvent(SMail src) {
super(src);
}
/**
* Construtor que recebe o gerador do evento e
* a mensagem relacionada ao evento.
* @param src Gerador do evento.
* @param msg Mensagem relacionada ao evento.
*/
public MailEvent(SMail src, Message msg) {
super(src);
this.setMessage(msg);
}
/**
* Retorna a mensagem relacionada ao evento.
* @return Mensagem.
*/
public Message getMessage() {
return message;
}
/**
* Define a mensagem relacionada ao evento.
* @param message Mensagem.
*/
public void setMessage(Message message) {
this.message = message;
}
}
|
[
"juno@pserver.us"
] |
juno@pserver.us
|
d48c4844c419417ccd91b57508ae984f1297be9e
|
c885ef92397be9d54b87741f01557f61d3f794f3
|
/tests-without-trycatch/Closure-108/com.google.javascript.jscomp.ScopedAliases/default/10/com/google/javascript/jscomp/ScopedAliases_ESTest.java
|
901cbbb0c45b63fbf39f366aafa7499dbdf64e54
|
[
"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
| 4,691
|
java
|
/*
* This file was automatically generated by EvoSuite
* Thu Jul 29 18:17:25 GMT 2021
*/
package com.google.javascript.jscomp;
import org.junit.Test;
import static org.junit.Assert.*;
import static org.evosuite.runtime.EvoAssertions.*;
import com.google.javascript.jscomp.AbstractCompiler;
import com.google.javascript.jscomp.Compiler;
import com.google.javascript.jscomp.CompilerOptions;
import com.google.javascript.jscomp.PreprocessorSymbolTable;
import com.google.javascript.jscomp.ScopedAliases;
import com.google.javascript.rhino.Node;
import org.evosuite.runtime.EvoRunner;
import org.evosuite.runtime.EvoRunnerParameters;
import org.junit.runner.RunWith;
@RunWith(EvoRunner.class) @EvoRunnerParameters(mockJVMNonDeterminism = true, useVFS = true, useVNET = true, resetStaticState = true, separateClassLoader = true)
public class ScopedAliases_ESTest extends ScopedAliases_ESTest_scaffolding {
@Test(timeout = 4000)
public void test0() throws Throwable {
Compiler compiler0 = new Compiler();
CompilerOptions compilerOptions0 = new CompilerOptions();
CompilerOptions.AliasTransformationHandler compilerOptions_AliasTransformationHandler0 = compilerOptions0.getAliasTransformationHandler();
ScopedAliases scopedAliases0 = new ScopedAliases(compiler0, (PreprocessorSymbolTable) null, compilerOptions_AliasTransformationHandler0);
Node node0 = Node.newString(4194304, "JSC_GOOG_SCOPE_ALIAS_REDEFINED", 2547, 4194304);
scopedAliases0.process(node0, node0);
assertFalse(node0.isTrue());
}
@Test(timeout = 4000)
public void test1() throws Throwable {
PreprocessorSymbolTable preprocessorSymbolTable0 = new PreprocessorSymbolTable((Node) null);
CompilerOptions.AliasTransformationHandler compilerOptions_AliasTransformationHandler0 = CompilerOptions.NULL_ALIAS_TRANSFORMATION_HANDLER;
ScopedAliases scopedAliases0 = new ScopedAliases((AbstractCompiler) null, preprocessorSymbolTable0, compilerOptions_AliasTransformationHandler0);
// Undeclared exception!
// try {
scopedAliases0.process((Node) null, (Node) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.javascript.jscomp.NodeTraversal", e);
// }
}
@Test(timeout = 4000)
public void test2() throws Throwable {
Compiler compiler0 = new Compiler();
CompilerOptions.AliasTransformationHandler compilerOptions_AliasTransformationHandler0 = CompilerOptions.NULL_ALIAS_TRANSFORMATION_HANDLER;
ScopedAliases scopedAliases0 = new ScopedAliases(compiler0, (PreprocessorSymbolTable) null, compilerOptions_AliasTransformationHandler0);
// Undeclared exception!
// try {
scopedAliases0.hotSwapScript((Node) null, (Node) null);
// fail("Expecting exception: RuntimeException");
// } catch(RuntimeException e) {
// //
// // INTERNAL COMPILER ERROR.
// // Please report this problem.
// // null
// //
// verifyException("com.google.common.base.Preconditions", e);
// }
}
@Test(timeout = 4000)
public void test3() throws Throwable {
CompilerOptions.AliasTransformationHandler compilerOptions_AliasTransformationHandler0 = CompilerOptions.NULL_ALIAS_TRANSFORMATION_HANDLER;
ScopedAliases scopedAliases0 = new ScopedAliases((AbstractCompiler) null, (PreprocessorSymbolTable) null, compilerOptions_AliasTransformationHandler0);
// Undeclared exception!
// try {
scopedAliases0.hotSwapScript((Node) null, (Node) null);
// fail("Expecting exception: NullPointerException");
// } catch(NullPointerException e) {
// //
// // no message in exception (getMessage() returned null)
// //
// verifyException("com.google.javascript.jscomp.NodeTraversal", e);
// }
}
@Test(timeout = 4000)
public void test4() throws Throwable {
Compiler compiler0 = new Compiler();
Node node0 = new Node(2147483633);
PreprocessorSymbolTable preprocessorSymbolTable0 = new PreprocessorSymbolTable(node0);
CompilerOptions.AliasTransformationHandler compilerOptions_AliasTransformationHandler0 = CompilerOptions.NULL_ALIAS_TRANSFORMATION_HANDLER;
ScopedAliases scopedAliases0 = new ScopedAliases(compiler0, preprocessorSymbolTable0, compilerOptions_AliasTransformationHandler0);
Node node1 = new Node(37, node0, node0, 0, 39);
scopedAliases0.hotSwapScript(node0, node1);
assertFalse(node1.isWith());
}
}
|
[
"pouria.derakhshanfar@gmail.com"
] |
pouria.derakhshanfar@gmail.com
|
013c3fc4852f4a118d8f9a01452a6cbafa771a08
|
b9a73a67abadd92d9da409befd439188084e8312
|
/Mx_Android2/src/com/moinapp/wuliao/ui/view/Mx_ViewPager.java
|
b631ed0ef0dc3566e36cdf6a0c899786c5be0961
|
[] |
no_license
|
caozhongzheng/moxingxiu_v1
|
14a574080ecb9c91ee27a421eba1098f1ae9d489
|
5f4190349d361e31abba0c2a615fca2a384db17f
|
refs/heads/master
| 2021-01-25T13:34:56.862619
| 2018-03-02T13:53:50
| 2018-03-02T13:53:50
| 123,584,907
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 552
|
java
|
package com.moinapp.wuliao.ui.view;
import android.content.Context;
import android.support.v4.view.ViewPager;
import android.util.AttributeSet;
import android.view.MotionEvent;
// 屏蔽左右滑动的viewpager
public class Mx_ViewPager extends ViewPager{
public Mx_ViewPager(Context context, AttributeSet attrs) {
super(context, attrs);
}
@Override
public boolean onInterceptTouchEvent(MotionEvent ev) {
return false;
}
@Override
public boolean onTouchEvent(MotionEvent arg0) {
return true;
}
}
|
[
"caozhongzheng@peersafe.cn"
] |
caozhongzheng@peersafe.cn
|
cedfa3a32fed85a34e08fe24e73b5e3cfeb19a9a
|
6eb473fdee564e75899580270c5566bdea7b5e08
|
/org/apache/lucene/search/PhraseScorer.java
|
c6a04a81f62f7c106849247115fa4bd0776e5734
|
[] |
no_license
|
Rashmos/Information_Retrieval_System
|
d2f9e3db1e8a7177b3114d430e0f9c799e59dd67
|
4b7bc23cb38a100a202df403fd90a217e89594e6
|
refs/heads/master
| 2020-05-26T18:35:47.617244
| 2014-01-28T07:06:33
| 2014-01-28T07:06:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,208
|
java
|
package org.apache.lucene.search;
import java.io.IOException;
import org.apache.lucene.index.TermPositions;
import org.apache.lucene.util.PriorityQueue;
abstract class PhraseScorer extends Scorer
{
protected byte[] norms;
protected float weight;
protected PhraseQueue pq;
protected PhrasePositions first;
protected PhrasePositions last;
PhraseScorer(TermPositions[] paramArrayOfTermPositions, byte[] paramArrayOfByte, float paramFloat)
throws IOException
{
this.norms = paramArrayOfByte;
this.weight = paramFloat;
this.pq = new PhraseQueue(paramArrayOfTermPositions.length);
for (int i = 0; i < paramArrayOfTermPositions.length; i++)
this.pq.put(new PhrasePositions(paramArrayOfTermPositions[i], i));
pqToList();
}
final void score(HitCollector paramHitCollector, int paramInt)
throws IOException
{
while (this.last.doc < paramInt)
{
while (this.first.doc < this.last.doc)
{
do
this.first.next();
while (this.first.doc < this.last.doc);
firstToLast();
if (this.last.doc >= paramInt)
return;
}
float f1 = phraseFreq();
if (f1 > 0.0D)
{
float f2 = Similarity.tf(f1) * this.weight;
f2 *= Similarity.norm(this.norms[this.first.doc]);
paramHitCollector.collect(this.first.doc, f2);
}
this.last.next();
}
}
protected abstract float phraseFreq()
throws IOException;
protected final void pqToList()
{
this.last = (this.first = null);
while (this.pq.top() != null)
{
PhrasePositions localPhrasePositions = (PhrasePositions)this.pq.pop();
if (this.last != null)
this.last.next = localPhrasePositions;
else
this.first = localPhrasePositions;
this.last = localPhrasePositions;
localPhrasePositions.next = null;
}
}
protected final void firstToLast()
{
this.last.next = this.first;
this.last = this.first;
this.first = this.first.next;
this.last.next = null;
}
}
/* Location: /Users/Rashmi/Downloads/set_rp2614/rashmi.jar
* Qualified Name: org.apache.lucene.search.PhraseScorer
* JD-Core Version: 0.6.2
*/
|
[
"Rashmi@rashmis-MacBook-Pro.local"
] |
Rashmi@rashmis-MacBook-Pro.local
|
ce772afdeae9f9faad91e101759964c68f2236b7
|
180e78725121de49801e34de358c32cf7148b0a2
|
/dataset/protocol1/spoon/learning/5258/RuntimeProcessingManager.java
|
9b9d9f21f32eb62b4bce4f8346ffef422fe5f6b2
|
[] |
no_license
|
ASSERT-KTH/synthetic-checkstyle-error-dataset
|
40e8d1e0a7ebe7f7711def96a390891a6922f7bd
|
40c057e1669584bfc6fecf789b5b2854660222f3
|
refs/heads/master
| 2023-03-18T12:50:55.410343
| 2019-01-25T09:54:39
| 2019-01-25T09:54:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 4,611
|
java
|
/**
* Copyright (C) 2006-2018 INRIA and contributors
* Spoon - http://spoon.gforge.inria.fr/
*
* This software is governed by the CeCILL-C License under French law and
* abiding by the rules of distribution of free software. You can use, modify
* and/or redistribute the software under the terms of the CeCILL-C license as
* circulated by CEA, CNRS and INRIA at http://www.cecill.info.
*
* This program is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the CeCILL-C License for more details.
*
* The fact that you are presently reading this means that you have had
* knowledge of the CeCILL-C license and that you accept its terms.
*/
package spoon.support;
import org.apache.log4j.Level;
import spoon.processing.ProcessInterruption;
import spoon.processing.ProcessingManager;
import spoon.processing.Processor;
import spoon.reflect.declaration.CtElement;
import spoon.reflect.declaration.CtNamedElement;
import spoon.reflect.factory.Factory;
import spoon.support.visitor.ProcessingVisitor;
import java.util.Collection;
import java.util.LinkedList;
import java.util.List;
/**
* This processing manager implements a blocking processing policy that consists
* of applying the processors in a FIFO order until no processors remain to be
* applied.
*/
public class RuntimeProcessingManager implements ProcessingManager {
Processor<?> current;
Factory factory;
List<Processor<?>> processors;
ProcessingVisitor visitor;
/**
* Creates a new processing manager that maintains a queue of processors to
* be applied to a given factory.
*
* @param factory
* the factory on which the processing applies (contains the
* meta-model)
*/
public RuntimeProcessingManager(Factory factory) {
setFactory(factory);
}
@Override
public void addProcessor(Class<? extends Processor<?>> type) {
try {
Processor<?> p = type.newInstance();
p.setFactory(factory);
p.init();
addProcessor(p);
} catch (Exception e) {
factory.getEnvironment().report(null, Level.ERROR, "Unable to instantiate processor \"" + type.getName() + "\" - Your processor should have a constructor with no arguments");
}
}
@Override
public boolean addProcessor(Processor<?> p) {
p.setFactory(getFactory());
return getProcessors().add(p);
}
@Override
@SuppressWarnings("unchecked")
public void addProcessor(String qualifiedName) {
try {
addProcessor((Class<? extends Processor<?>>) getFactory().getEnvironment().getInputClassLoader().loadClass(qualifiedName));
} catch (ClassNotFoundException e) {
factory.getEnvironment().report(null, Level.ERROR, "Unable to load processor \"" + qualifiedName + "\" - Check your classpath.");
}
}
public Processor<?> getCurrentProcessor() {
return current;
}
@Override
public Factory getFactory() {
return factory;
}
@Override
public List<Processor<?>> getProcessors() {
if (processors == null) {
processors = new LinkedList<>();
}
return processors;
}
private ProcessingVisitor getVisitor() {
if (visitor == null) {
visitor = new ProcessingVisitor(getFactory());
}
return visitor;
}
@Override
public void process(Collection<? extends CtElement> elements) {
for (Processor<?> p : getProcessors()) {
current = p;
process(elements, p);
}
}
/**
* Recursively processes elements and their children with a given processor.
*/
public void process(Collection<? extends CtElement> elements, Processor<?> processor) {
try {
getFactory().getEnvironment().debugMessage("processing with '" + processor.getClass().getName() + "'...");
current = processor;
for (CtElement e : elements) {
process(e, processor);
}
} catch (ProcessInterruption ignored) {
}
}
@Override
public void process(CtElement element) {
for (Processor<?> p : getProcessors()) {
current = p;
process(element, p);
}
}
/**
* Recursively processes an element and its children with a given processor.
*/
public void process(CtElement element, Processor<?> processor) {
getFactory().getEnvironment ().debugMessage(
"processing '" + ((element instanceof CtNamedElement) ? ((CtNamedElement) element).getSimpleName() : element.toString()) + "' with '" + processor.getClass().getName() + "'...");
processor.init();
getVisitor().setProcessor(processor);
getVisitor().scan(element);
processor.processingDone();
}
@Override
public void setFactory(Factory factory) {
this.factory = factory;
factory.getEnvironment().setManager(this);
}
}
|
[
"bloriot97@gmail.com"
] |
bloriot97@gmail.com
|
d03172c4ffad15d6e13f8d7394999bfc1f37e7e4
|
0d4f05c9909695a166e97b8958680945ea5c1266
|
/src/minecraft/com/sun/jna/win32/W32APIOptions.java
|
234decd3ba921c0bb4efbbfa8f8f167afc6361dc
|
[] |
no_license
|
MertDundar1/ETB-0.6
|
31f3f42f51064ffd7facaa95cf9b50d0c2d71995
|
145d008fed353545157cd0e73daae8bc8d7f50b9
|
refs/heads/master
| 2022-01-15T08:42:12.762634
| 2019-05-15T23:37:33
| 2019-05-15T23:37:33
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 394
|
java
|
package com.sun.jna.win32;
import java.util.HashMap;
import java.util.Map;
public abstract interface W32APIOptions
extends StdCallLibrary
{
public static final Map UNICODE_OPTIONS = new HashMap() {};
public static final Map ASCII_OPTIONS = new HashMap() {};
public static final Map DEFAULT_OPTIONS = Boolean.getBoolean("w32.ascii") ? ASCII_OPTIONS : UNICODE_OPTIONS;
}
|
[
"realhcfus@gmail.com"
] |
realhcfus@gmail.com
|
aaeecdbe1de64ac4c7d266e96a1a408fd0f0bfb4
|
ee2a51f827fd337e6dbb9b018f62cacd8e6399da
|
/Ch_1_4_Analysis_Of_Algorithms/Practise_1_4_10.java
|
d648c21c98ee701c2dba8f4576782c70d5e86c22
|
[] |
no_license
|
pengzhetech/Algorithms
|
97eab98283575fdef46ad06549dcb29993bea132
|
c379ff6de3a10dfb1818e84a9ea2516876958288
|
refs/heads/master
| 2022-08-16T18:04:59.992353
| 2022-07-21T16:17:42
| 2022-07-21T16:17:42
| 261,119,609
| 0
| 0
| null | 2020-05-04T08:31:22
| 2020-05-04T08:31:21
| null |
UTF-8
|
Java
| false
| false
| 8,085
|
java
|
package Ch_1_4_Analysis_Of_Algorithms;
import java.util.*;
import java.util.concurrent.TimeUnit;
import edu.princeton.cs.algs4.*;
public class Practise_1_4_10 {
/*
* 思路 :
*
* 首先我想到一种很简单粗暴的思路,但在最坏情况下时间会达到 O(N)
* 在这里列出来仅仅为了展示下思路历程
*
* 假设我们在某一次分治操作中,使用 mid 索引命中了目标,那么可以知道,目标序列一定是这样的情况
* ....... 3 4 5 6 6 6 6 7 7 7 8 9 9 9 10 .........
* 👆
* mid
* 要取得最小索引,我们只需要在此基础上递减 mid 直到 mid 索引指示的位置不再等于查找目标,再将 mid + 1
* 即为所求
*
* 上述方法固然很简单,但我们不妨考虑将其应用于以下序列
*
* 1 1 1 1 1 1 1 1 1 1....(都是 1)... 2 2 2 2 2 2 2 2 2 2
*
* 稍加思考就可发现,我们第一次命中目标时,离最小索引的举例在最坏情况下能达到目标序列的一半即 N/2,因此此
* 查找算法效率降低至 O(N),显然不满足题目要求的最坏情况下仍然是 O(lgN)
*
* 于是我尝试在原有二分查找算法上做改进
*
* 为了说明改进后的算法策略,我们先来思考,为什么将 while 循环执行条件设置为 lo <= hi ?
*
* 对于序列 ... 2 3 4 5 6 7 8 9 .... 我们想要查找 6 的索引,假设我们某一次 mid 命中了 7
* 那么我们就将 hi 置为 mid - 1,此时 hi 已经命中了我们的查找目标,由于序列是有序排列,因此 hi 左侧所有元素都小于待查找目标,
* 因此在随后的所有操作中,lo
* 都只可能在向靠近 hi 的位置移动,并且最后一定会经历一步 lo = mid + 1 使 lo == hi
* 此时 lo == hi == mid,查找到指定目标
* 因此我们会发现,如果在算法执行过程中,某一步 mid 命中了目标的前一个元素,那么 hi = mid - 1 就命中了目标
* 若某一步 mid 命中了目标的后一个元素,那么 lo = mid + 1 就命中了目标,这两种情况都会导致查找终结在
* lo == hi == mid 处
*
* 接下来可以这么想,对于序列,待查找目标是 3,我们在某一步 mid 时命中了 3 的以下索引
* .... 3 3 3 3 3 4 4 5 ....
* 👆
* mid
* 这时 lo 肯定不等于 hi,并且我们将新的查找范围缩小至 [0, mid]
* 对于新的子序列
* ....3 3 3
* 若我们在某一步 mid 命中了 3 的以下索引
* ... 3 3 3
* 👆
* mid
* 这时 lo 肯定不等于 hi,然后我们将新的查找范围缩小至 [0, mid]
* 根据我们上面的推论,该查找会终止于 lo == hi == mid 处,此时即为最小的索引
*
* 这种办法在前一种办法的基础上效率稍微有所提升,但在最坏情况下依然是 N/k * log(N) (k < N)
*
* 但我们得到了一点启发,也就是说,需要实现的算法具有这样的功能,在第一次命中目标时,它仍然对该命中抱有怀疑
* 因此它会继续深入某个子区域验证该怀疑,直到确定该命中的确是索引最小,或者索引最大方才终止
*
* 因此我们不妨把 判等跳出的分支和大于分支合并,变为如下形式
*
* while (lo < hi) {
* mid = (lo + hi) / 2;
* (key > arr[mid]) ? lo = mid : hi = mid - 1;
* }
* 对任何序列应用此算法,可以看到,都只会在 lo >= hi 时跳出循环
* 而在循环内部,只要 key <= arr[mid] 查找区域都会缩小至 [0, mid - 1]
* 因此假如此时命中了序列中的某个目标或者命中比目标小,hi 会持怀疑态度继续缩小查找范围
* 假设命中了最小索引目标,hi = mid - 1,那么可以知道,以后所有的 mid,都会比 hi 此时的位置小,所以
* 随着 lo 不断靠近 hi,循环终止于 lo == hi
* 而这个终止索引,只需要加 1,即为查找目标的最小索引
*/
static class BinarySearchModified {
/*
* in the worst situation total time will close to O(N)
*/
public static int rankFoolish_A(int key, int[] array) {
int lo = 0, hi = array.length - 1, mid = 0;
while (lo <= hi) {
mid = (lo + hi) / 2;
if (array[mid] > key) hi = mid - 1;
else if (array[mid] < key) lo = mid + 1;
else break;
}
if (array[mid] != key) return -1;
while (mid >= 0 && array[mid] == key) mid--;
return mid + 1;
}
/*
* continue to search until the middle index equals to right side index
*
* in that way, we can guarantee O((N/k) * logN) in the worst situation
*/
public static int rankFoolish_B(int key, int[] array) {
int lo = 0, hi = array.length - 1, mid = 0;
while (lo <= hi) {
mid = (lo + hi) / 2;
if (array[mid] > key) { hi = mid - 1; }
else if (array[mid] < key) { lo = mid + 1; }
else if (lo != hi) { lo = 0; hi = mid; }
else break;
}
return array[mid] == key ? mid : -1;
}
/*
* in that way, we can guarantee O(logN) in the worst situation
*/
public static int minimumRank(int key, int[] arr) {
int lo = 0, hi = arr.length - 1, mid = 0;
while (lo < hi) {
/*
* 试想,如果查找的元素不存在,比如查找 4,当前序列 ...3 5...
* lo 指向 3, hi 指向 5, 如果不向上取整,那么 mid 指向 3,由于 3 小于
* 待查找元素,因此 lo 指向 3, hi 指向 5,形成死循环
*/
mid = (int)Math.ceil((lo + hi) / 2.0);
if (arr[mid] >= key)
hi = mid - 1;
else
lo = mid;
}
/*
* 如果在这个判断分之就返回,说明命中元素在序列的首端或末端
*/
if (arr[hi] == key) return hi;
/*
* 如果执行到这里,说明即使有命中元素,命中元素只存在于排除首尾端的中间某个位置
* 我们让 hi 递增,同时判断是否是末端,如果是,结合上述理解,那么命中元素不存在,返回 -1
* 如果不是末端,说明如果有命中元素,那么命中元素在左侧除了首端的中间某个位置
* 因为前面的判断分支已经让 hi 递增,所以直接判断 a[hi] 是否就是命中元素
* 是返回当前的命中索引,不是的话,返回 -1
*/
return ++hi == arr.length || arr[hi] != key ? -1 : hi;
}
public static int maximumRank(int key, int[] arr) {
int lo = 0, hi = arr.length - 1, mid = 0;
while (lo < hi) {
mid = (lo + hi) >> 1;
if (arr[mid] <= key)
lo = mid + 1;
else
hi = mid;
}
// lo = arr.length - 1
if (arr[lo] == key) return lo;
// lo != arr.length - 1
return --lo < 0 || arr[lo] != key ? -1 : lo;
}
public static int[] sourceArr(int N) {
int[] arr = new int[N];
for (int i = 0; i < N; i++)
arr[i] = StdRandom.uniform(0, 10);
Arrays.sort(arr);
return arr;
}
public static void printArray(int[] arr) {
for (int i = 0; i < arr.length; i++)
if ((i + 1) % 10 == 0)
StdOut.print(arr[i] + "\n");
else
StdOut.print(arr[i] + " ");
StdOut.println();
}
public static void test(int key, int N) {
int[] arr = sourceArr(N);
printArray(arr);
StdOut.println("minimum index of " + key + " is " + minimumRank(key, arr));
}
}
public static void main(String[] args) {
BinarySearchModified.test(3, 100);
}
// output
/*
* 0 0 0 0 0 0 0 0 0 0
0 0 0 1 1 1 1 1 1 1
1 1 1 1 1 2 2 2 2 2
2 2 2 2 3 3 3 3 3 3
3 3 3 3 4 4 4 4 4 4
4 4 4 4 4 4 5 5 5 5
5 5 5 5 6 6 6 6 6 6
6 6 7 7 7 7 7 7 7 7
7 7 7 7 8 8 8 8 8 8
9 9 9 9 9 9 9 9 9 9
minimum index of 3 is 34
*/
}
|
[
"yangxiaohei321123@163.com"
] |
yangxiaohei321123@163.com
|
9822b0108278ba8c0989f08787cea6a0dd1bbf4f
|
71156bd9290a7eb62ee727b6038d83a9293440cf
|
/head-src/com/guardian/gameserver/network/serverpackets/SkillCoolTime.java
|
6b422063eb3b8b74d4b138078466d982b43571f6
|
[] |
no_license
|
RafaelRauber/GameServerL2
|
bcdd732e0ca0210339c9ff484021755b944ffbaa
|
0261e4797d5d66aaee49c4cf7653a4ef539be0d5
|
refs/heads/master
| 2021-05-19T00:24:45.494956
| 2020-04-10T18:37:02
| 2020-04-10T18:37:02
| 251,491,266
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,098
|
java
|
package com.guardian.gameserver.network.serverpackets;
import java.util.Collection;
import java.util.Iterator;
import com.guardian.gameserver.model.actor.instance.L2PcInstance;
import com.guardian.gameserver.network.L2GameClient;
public class SkillCoolTime extends L2GameServerPacket
{
@SuppressWarnings("rawtypes")
public Collection _reuseTimeStamps;
public SkillCoolTime(final L2PcInstance cha)
{
_reuseTimeStamps = cha.getReuseTimeStamps();
}
@SuppressWarnings("rawtypes")
@Override
protected final void writeImpl()
{
@SuppressWarnings("cast")
final L2PcInstance activeChar = ((L2GameClient) getClient()).getActiveChar();
if (activeChar == null)
return;
writeC(193);
writeD(_reuseTimeStamps.size());
L2PcInstance.TimeStamp ts;
for (final Iterator i$ = _reuseTimeStamps.iterator(); i$.hasNext(); writeD((int) ts.getRemaining() / 1000))
{
ts = (L2PcInstance.TimeStamp) i$.next();
writeD(ts.getSkill().getId());
writeD(0);
writeD((int) ts.getReuse() / 1000);
}
}
@Override
public String getType()
{
return "[S] c1 SkillCoolTime";
}
}
|
[
"rrafaelfr2@gmail.com"
] |
rrafaelfr2@gmail.com
|
7afdd7c14a8d49b7b996c066b0e7bd0b9dceb72f
|
ddfb3a710952bf5260dfecaaea7d515526f92ebb
|
/build/tmp/expandedArchives/forge-1.15.2-31.2.0_mapped_snapshot_20200514-1.15.1-sources.jar_c582e790131b6dd3325b282fce9d2d3d/net/minecraftforge/event/entity/player/PlayerXpEvent.java
|
eab79475cfa215a5ba43090b47ef2cb99c507762
|
[
"Apache-2.0"
] |
permissive
|
TheDarkRob/Sgeorsge
|
88e7e39571127ff3b14125620a6594beba509bd9
|
307a675cd3af5905504e34717e4f853b2943ba7b
|
refs/heads/master
| 2022-11-25T06:26:50.730098
| 2020-08-03T15:42:23
| 2020-08-03T15:42:23
| 284,748,579
| 0
| 0
|
Apache-2.0
| 2020-08-03T16:19:36
| 2020-08-03T16:19:35
| null |
UTF-8
|
Java
| false
| false
| 3,357
|
java
|
/*
* Minecraft Forge
* Copyright (c) 2016-2019.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation version 2.1
* of the License.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
package net.minecraftforge.event.entity.player;
import net.minecraft.entity.item.ExperienceOrbEntity;
import net.minecraft.entity.player.PlayerEntity;
import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.Cancelable;
/**
* PlayerXpEvent is fired whenever an event involving player experience occurs. <br>
* If a method utilizes this {@link net.minecraftforge.eventbus.api.Event} as its parameter, the method will
* receive every child event of this class.<br>
* <br>
* All children of this event are fired on the {@link MinecraftForge#EVENT_BUS}.
*/
public class PlayerXpEvent extends PlayerEvent
{
public PlayerXpEvent(PlayerEntity player)
{
super(player);
}
/**
* This event is fired after the player collides with an experience orb, but before the player has been given the experience.
* It can be cancelled, and no further processing will be done.
*/
@Cancelable
public static class PickupXp extends PlayerXpEvent
{
private final ExperienceOrbEntity orb;
public PickupXp(PlayerEntity player, ExperienceOrbEntity orb)
{
super(player);
this.orb = orb;
}
public ExperienceOrbEntity getOrb()
{
return orb;
}
}
/**
* This event is fired when the player's experience changes through the {@link PlayerEntity#giveExperiencePoints} method.
* It can be cancelled, and no further processing will be done.
*/
@Cancelable
public static class XpChange extends PlayerXpEvent
{
private int amount;
public XpChange(PlayerEntity player, int amount)
{
super(player);
this.amount = amount;
}
public int getAmount()
{
return this.amount;
}
public void setAmount(int amount)
{
this.amount = amount;
}
}
/**
* This event is fired when the player's experience level changes through the {@link PlayerEntity#addExperienceLevel} method.
* It can be cancelled, and no further processing will be done.
*/
@Cancelable
public static class LevelChange extends PlayerXpEvent
{
private int levels;
public LevelChange(PlayerEntity player, int levels)
{
super(player);
this.levels = levels;
}
public int getLevels()
{
return this.levels;
}
public void setLevels(int levels)
{
this.levels = levels;
}
}
}
|
[
"iodiceandrea251@gmail.com"
] |
iodiceandrea251@gmail.com
|
34a8070a21c1d5c4794376894a113a8260b86ce2
|
c3fce4f05fb7aa04ce5234d2895dd2e626c01c27
|
/jrds-core/src/main/java/jrds/probe/jmx/JmxAbstractDataSource.java
|
f04ee576ffa50bc800caa1b84d60de4c376cc799
|
[] |
no_license
|
superliuting/jrds
|
1cb664c96442fd1d4dc1d3e9f91d543349c48a94
|
b80ddf5dfce30537bdacbc9fcf84ff0f7295fff0
|
refs/heads/master
| 2020-07-10T23:03:23.021837
| 2019-07-31T20:37:39
| 2019-07-31T20:37:39
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 455
|
java
|
package jrds.probe.jmx;
import java.lang.reflect.InvocationTargetException;
import javax.management.ObjectName;
public abstract class JmxAbstractDataSource<JmxConnection> {
public final JmxConnection connection;
JmxAbstractDataSource(JmxConnection connection) {
this.connection = connection;
}
public abstract Number getValue(ObjectName mbeanName, String attributeName, String[] jmxPath) throws InvocationTargetException;
}
|
[
"fbacchella@spamcop.net"
] |
fbacchella@spamcop.net
|
9b073dbf4645a60d83241c4d8c20698a31c1755c
|
cd2ef82fb7f18d31f316da82bc94a76a497c4ab0
|
/api-backend/3scale-library/src/main/java/com/hisense/gateway/library/utils/CommonUtil.java
|
6377b6e551cecde18a1f6ecc3a2e6d84ce97ace6
|
[] |
no_license
|
xiongliang1/3scale-api-2.0.0
|
3b6a45f196f44235fd9da336e09ecbf4b7f854b4
|
2843b45d8639d10b75b0477e3e63786136bf23d3
|
refs/heads/master
| 2023-03-23T06:51:31.839019
| 2021-03-24T03:40:24
| 2021-03-24T03:40:24
| 350,931,316
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,696
|
java
|
package com.hisense.gateway.library.utils;
import com.hisense.api.library.utils.MiscUtil;
import com.hisense.gateway.library.constant.GatewayConstants;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import java.util.Arrays;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
import static com.hisense.gateway.library.constant.BaseConstants.TAG;
@Slf4j
public class CommonUtil {
public static String escape(String str) {
if (StringUtils.isBlank(str)) {
return null;
}
str = str.replaceAll("%", GatewayConstants.ESCAPESTR + "%")
.replaceAll("_", GatewayConstants.ESCAPESTR + "_");
return str;
}
public static String formatJson(String json) {
return json.replaceAll("\\\"", "\"");
}
// guilai.ming 2020/09/10
/**
* 列表成员按逗号分隔,组成字符串
*/
public static <T> String encodeListWithSplit(List<T> list, String split) {
if (MiscUtil.isEmpty(list)) {
return null;
}
StringBuilder sb = new StringBuilder();
for (T item : list) {
sb.append(item).append(split);
}
return MiscUtil.removeSuffixComma(sb.toString());
}
/**
* 从字符串中按逗号分隔, 提出列表成员
*/
public static <T> List<T> decodeListWithSplit(String items, String split, ValueGenerator<T> generator) {
String[] strIds;
if (MiscUtil.isEmpty(items) || MiscUtil.isEmpty(strIds = MiscUtil.splitItems(items, split))) {
return null;
}
return Arrays.stream(strIds).map(generator::valueOf).collect(Collectors.toList());
}
public interface ValueGenerator<T> {
T valueOf(String valueStr);
}
public static <T> String encodeListWithComma(List<T> list) {
return encodeListWithSplit(list, ",");
}
public static <T> List<T> decodeListWithComma(String items, ValueGenerator<T> generator) {
return decodeListWithSplit(items, ",", generator);
}
public static String encodeStrListWithComma(List<String> list) {
return encodeListWithComma(list);
}
public static List<String> decodeStrListWithComma(String items) {
return decodeListWithComma(items, String::valueOf);
}
public static String encodeIntListWithComma(List<Integer> list) {
return encodeListWithComma(list);
}
public static List<Integer> decodeIntListWithComma(String items) {
return decodeListWithComma(items, Integer::valueOf);
}
public static String encodeStrListWithUnderline(List<String> list) {
return encodeListWithSplit(list, "_");
}
public static List<String> decodeStrListWithUnderline(String items) {
return decodeListWithSplit(items, "_", String::valueOf);
}
public static <T> List<T> addList(List<T> a, List<T> b) {
List<T> res = null;
Set<T> aSet = MiscUtil.list2Set(a);
Set<T> bSet = MiscUtil.list2Set(b);
log.info("{}addList a={},b={}", TAG, a, b);
if (MiscUtil.isNotEmpty(aSet) && MiscUtil.isNotEmpty(bSet)) {
aSet.addAll(bSet);
res = MiscUtil.set2List(aSet);
} else if (MiscUtil.isNotEmpty(aSet)) {
res = a;
} else if (MiscUtil.isNotEmpty(bSet)) {
res = b;
}
return res;
}
public static <T> List<T> subtractionList(List<T> a, List<T> b) {
log.info("{}subtractionList a={},b={}", TAG, a, b);
if (MiscUtil.isNotEmpty(a) && MiscUtil.isNotEmpty(b)) {
a.removeIf(b::contains);
}
return a;
}
}
|
[
"chaoyang.beijing"
] |
chaoyang.beijing
|
d1501e76974b37125d32a86b61507105e749c0a9
|
9fb0ebc122dd014e26b6de881ee5fcc445db178c
|
/Databases Frameworks - Hibernate & Spring Data/11. Spring Data Auto Mapping Objects - Exercises/src/main/java/gamestore/models/entities/Game.java
|
a2cff46c3557f59da75ee26a10c723f01ec5dce0
|
[] |
no_license
|
Taewii/database-fundamentals
|
7b295825fa1b34f8e717b455e03801a8d124bea6
|
a29a476a3a5d4577ade14993b5436ef12c20b2e1
|
refs/heads/master
| 2020-03-28T11:15:12.634947
| 2018-11-17T21:07:27
| 2018-11-17T21:07:27
| 148,193,090
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,371
|
java
|
package gamestore.models.entities;
import javax.persistence.*;
import javax.validation.constraints.Digits;
import javax.validation.constraints.Min;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;
import java.math.BigDecimal;
import java.util.Date;
@Entity
@Table(name = "games")
public class Game {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@Pattern(regexp = "[A-Z].{2,}", message = "Invalid title")
private String title;
@Size(min = 11, max = 11, message = "Invalid title")
private String youtubeTrailer;
@Pattern(regexp = "(https://|http://).*", message = "Invalid Image URL")
private String imageURL;
@Min(value = 0, message = "Size must be positive")
@Digits(integer = 10, fraction = 1)
private double size;
@Min(value = 0, message = "Price must be positive")
@Digits(integer = 10, fraction = 2)
private BigDecimal price;
@Size(min = 20, message = "Size must be at least 20 symbols")
private String description;
private Date releaseDate;
public Game() {
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public String getTitle() {
return this.title;
}
public void setTitle(String title) {
this.title = title;
}
public String getYoutubeTrailer() {
return this.youtubeTrailer;
}
public void setYoutubeTrailer(String youtubeTrailer) {
this.youtubeTrailer = youtubeTrailer;
}
public String getImageURL() {
return this.imageURL;
}
public void setImageURL(String imageURL) {
this.imageURL = imageURL;
}
public double getSize() {
return this.size;
}
public void setSize(double size) {
this.size = size;
}
public BigDecimal getPrice() {
return this.price;
}
public void setPrice(BigDecimal price) {
this.price = price;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getReleaseDate() {
return this.releaseDate;
}
public void setReleaseDate(Date releaseDate) {
this.releaseDate = releaseDate;
}
}
|
[
"p3rfec7@abv.bg"
] |
p3rfec7@abv.bg
|
f8a24db634823522442abfb0e973531cb8534acc
|
513136e639bb395924b43141d7998c7e4c7e91d3
|
/summer-mis/src/main/java/cn/cerc/mis/other/TWHControl.java
|
5b699ebbc7c5d82e2c2d4708aa54fea25a5ebc63
|
[] |
no_license
|
ThemanerL/summer-framework
|
f87ac62cdc343ebb193b57cb07c6b532d74bea9f
|
1ede435cc09d901edf6f91fa3cbd2eed76a3c0ee
|
refs/heads/master
| 2021-05-26T02:11:55.500018
| 2020-03-05T02:41:37
| 2020-03-05T02:41:37
| 248,460,812
| 0
| 0
| null | 2020-03-19T09:25:26
| 2020-03-19T09:25:25
| null |
UTF-8
|
Java
| false
| false
| 557
|
java
|
package cn.cerc.mis.other;
import cn.cerc.core.DataSet;
import cn.cerc.core.Record;
public enum TWHControl {
whcNone, whcHead, whcBody;
/*
* 取得单头仓别
*/
public String getHeadWH(Record head) {
return this == TWHControl.whcNone ? "仓库" : head.getString("WHCode_");
}
/*
* 取得单身仓别
*/
public String getBodyWH(DataSet body, String defaultWH) {
if (this == whcBody)
return body.getCurrent().getString("CWCode_");
else
return defaultWH;
}
}
|
[
"l1091462907@gmail.com"
] |
l1091462907@gmail.com
|
2e07bee87b140f38b864ec30cde08cff6486b81a
|
f567c98cb401fc7f6ad2439cd80c9bcb45e84ce9
|
/src/main/java/com/alipay/api/response/KoubeiCateringPosSpecQueryResponse.java
|
15683965dd19eaf2100b43925e28ba9fe163dd28
|
[
"Apache-2.0"
] |
permissive
|
XuYingJie-cmd/alipay-sdk-java-all
|
0887fa02f857dac538e6ea7a72d4d9279edbe0f3
|
dd18a679f7543a65f8eba2467afa0b88e8ae5446
|
refs/heads/master
| 2023-07-15T23:01:02.139231
| 2021-09-06T07:57:09
| 2021-09-06T07:57:09
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 794
|
java
|
package com.alipay.api.response;
import java.util.List;
import com.alipay.api.internal.mapping.ApiField;
import com.alipay.api.internal.mapping.ApiListField;
import com.alipay.api.domain.SpecEntity;
import com.alipay.api.AlipayResponse;
/**
* ALIPAY API: koubei.catering.pos.spec.query response.
*
* @author auto create
* @since 1.0, 2019-01-07 20:51:15
*/
public class KoubeiCateringPosSpecQueryResponse extends AlipayResponse {
private static final long serialVersionUID = 2814234664691636829L;
/**
* 规格列表
*/
@ApiListField("specs")
@ApiField("spec_entity")
private List<SpecEntity> specs;
public void setSpecs(List<SpecEntity> specs) {
this.specs = specs;
}
public List<SpecEntity> getSpecs( ) {
return this.specs;
}
}
|
[
"ben.zy@antfin.com"
] |
ben.zy@antfin.com
|
9ea675f0f02344cbc8554c8db2003e867acbf2de
|
c7cc66b51bf91ff18e7f8b4218fcf46f5bfd3fda
|
/frame/src/main/java/com/xbin/frame/netty/NettyServerInitializer.java
|
537746bc7fe60a15d3bc27b7108741165b1108bf
|
[] |
no_license
|
Abin921214/frame
|
0863ff3cff84d1263caff7eca2504461bdfcbc54
|
2818ea7a0ee71a0df4ed644e4fabc8dae4a1e728
|
refs/heads/master
| 2022-06-30T23:18:03.413270
| 2019-12-12T14:50:43
| 2019-12-12T14:50:43
| 224,756,325
| 1
| 0
| null | 2022-06-17T02:47:16
| 2019-11-29T01:42:38
|
Java
|
UTF-8
|
Java
| false
| false
| 1,330
|
java
|
package com.xbin.frame.netty;
import com.xbin.frame.base.OperLog;
import io.netty.channel.ChannelInitializer;
import io.netty.channel.ChannelPipeline;
import io.netty.channel.socket.SocketChannel;
public class NettyServerInitializer<Handler extends NettyServerHandler, Decoder extends DecoderHandler, Encoder extends EncoderHandler> extends ChannelInitializer<SocketChannel> {
private Handler handler;
private Decoder decoder;
private Encoder encoder;
public NettyServerInitializer(Handler handler, Decoder decoder, Encoder encoder){
this.handler = handler;
this.decoder = decoder;
this.encoder = encoder;
}
/**
* 初始化channel
*/
@OperLog(operModul = "netty编码解码处理以及添加handler处理", operType = "handler", operDesc = "netty编码解码处理以及添加handler处理")
@Override
public void initChannel(SocketChannel ch) throws Exception {
ChannelPipeline pipeline = ch.pipeline();
if(decoder != null && decoder.getChannelHandler() != null){
pipeline.addLast("decoder", decoder.getChannelHandler());
}
if(encoder != null && encoder.getChannelHandler() != null){
pipeline.addLast("encoder",encoder.getChannelHandler());
}
pipeline.addLast(handler);
}
}
|
[
"l"
] |
l
|
f92ca9a40c606c35f3cfdec3c4f5c37da39157ea
|
b1fb8c75ad7a4a17a6d8b262a58ecd87ff75f3d8
|
/src/test/java/org/soulwing/credo/filters/UserContextBeanTest.java
|
3dd4fa77ba48724fc66a9a015ef695783a9edd12
|
[
"Apache-2.0"
] |
permissive
|
soulwing/credo
|
cd5138457af74ab9b9a820ee3365aa636e0323c3
|
261d79a32d57ca6482cd75371a552d745ca6e430
|
refs/heads/master
| 2016-09-06T18:03:52.771247
| 2016-02-27T12:08:17
| 2016-02-27T12:08:17
| 17,405,272
| 0
| 0
| null | 2014-03-04T20:04:19
| 2014-03-04T14:40:51
|
Java
|
UTF-8
|
Java
| false
| false
| 1,513
|
java
|
/*
* File created on Mar 10, 2014
*
* Copyright (c) 2014 Virginia Polytechnic Institute and State University
*
* 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.soulwing.credo.filters;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
import org.junit.Test;
/**
* Unit tests for {@link UserContextBean}.
*
* @author Carl Harris
*/
public class UserContextBeanTest {
private static final String LOGIN_NAME = "someUser";
private UserContextBean bean = new UserContextBean();
@Test
public void testSetAndGetLoginName() {
bean.setLoginName(LOGIN_NAME);
assertThat(bean.getLoginName(), is(equalTo(LOGIN_NAME)));
}
@Test(expected = IllegalStateException.class)
public void testGetLoginNameWhenNoRemoteUser() {
bean.getLoginName();
}
@Test(expected = IllegalArgumentException.class)
public void testSetNullRemoteUser() {
bean.setLoginName(null);
}
}
|
[
"ceharris@vt.edu"
] |
ceharris@vt.edu
|
5292df8b1dcc714c31dbaeb563cc181a689b2233
|
fa91450deb625cda070e82d5c31770be5ca1dec6
|
/Diff-Raw-Data/10/10_2af07a3826f4d2bf6804630156a4136ff53868f1/LoginPane/10_2af07a3826f4d2bf6804630156a4136ff53868f1_LoginPane_s.java
|
2640d767179e133ecea2e16b97dd283ea834be10
|
[] |
no_license
|
zhongxingyu/Seer
|
48e7e5197624d7afa94d23f849f8ea2075bcaec0
|
c11a3109fdfca9be337e509ecb2c085b60076213
|
refs/heads/master
| 2023-07-06T12:48:55.516692
| 2023-06-22T07:55:56
| 2023-06-22T07:55:56
| 259,613,157
| 6
| 2
| null | 2023-06-22T07:55:57
| 2020-04-28T11:07:49
| null |
UTF-8
|
Java
| false
| false
| 3,941
|
java
|
/*
* Mohammad Juma
*
* TCSS 360 - Winter 2013
* TCSS 360 Project
* November 11, 2013
*/
package view.login;
import javafx.concurrent.Task;
import javafx.event.Event;
import javafx.event.EventHandler;
import javafx.geometry.Insets;
import javafx.geometry.Pos;
import javafx.scene.control.Button;
import javafx.scene.control.Label;
import javafx.scene.control.TextField;
import javafx.scene.layout.GridPane;
import javafx.scene.layout.HBox;
import javafx.scene.paint.Color;
import javafx.scene.text.Font;
import javafx.scene.text.FontWeight;
import javafx.scene.text.Text;
import javafx.stage.Stage;
import model.database.DatabaseException;
import model.login.Login;
import model.users.User;
import view.main.MainPane;
import view.util.GenericPane;
import view.util.ProgressService;
import view.util.Validator;
import controller.user.LoggedUser;
/**
* JavaFX pane for displaying the login window.
*
* @author Mohammad Juma
* @version 11-11-2013
*/
public class LoginPane extends GenericPane<GridPane> implements EventHandler {
/**
* Text component for showing the welcome text.
*/
private Text welcomeText;
/**
* Label for showing the email label text.
*/
private Label emailLabel;
/**
* TextField for inputing the email.
*/
private TextField emailTextField;
/**
* Button for signing into the application.
*/
private Button signInButton;
/**
* Button for registering for an account.
*/
private Button registerButton;
/**
* Text for displaying sign in errors.
*/
private Text signInText;
/**
* Constructs a new LoginPane pane that extends GridPane and displays a prompt for the user to login or register.
*/
public LoginPane() {
super(new GridPane());
pane.setAlignment(Pos.CENTER);
pane.setHgap(10);
pane.setVgap(10);
pane.setPadding(new Insets(25, 25, 25, 25));
create();
}
/**
* Creates the main components of the LoginPane pane.
*/
private void create() {
welcomeText = new Text("Welcome");
welcomeText.setFont(Font.font("Tahoma", FontWeight.NORMAL, 20));
pane.add(welcomeText, 0, 0, 2, 1);
emailLabel = new Label("Email:");
pane.add(emailLabel, 0, 1);
emailTextField = new TextField();
pane.add(emailTextField, 1, 1);
signInButton = new Button("Sign in");
signInButton.setOnAction(this);
registerButton = new Button("Register");
registerButton.setOnAction(this);
final HBox buttonHBox = new HBox(10);
buttonHBox.setAlignment(Pos.BOTTOM_RIGHT);
buttonHBox.getChildren().add(signInButton);
buttonHBox.getChildren().add(registerButton);
pane.add(buttonHBox, 1, 4);
signInText = new Text();
signInText.setFill(Color.FIREBRICK);
pane.add(signInText, 1, 6);
}
/**
*
* @param event
*/
@Override
public void handle(Event event) {
if (event.getSource() == signInButton) {
String email = emailTextField.getText().trim();
if (email.isEmpty()) {
signInText.setText("Forgot to enter an email");
} else if (!Validator.isValidEmail(email)) {
signInText.setText("Not a valid email");
} else {
new LoginService(callbacks.getPrimaryStage()).start();
}
}
if (event.getSource() == registerButton) {
}
}
class LoginService extends ProgressService {
public LoginService(Stage primaryStage) {
super(primaryStage);
}
@Override
protected Task<String> createTask() {
return new Task<String>() {
@Override
protected String call() {
try {
User user = Login.loginUser(emailTextField.getText().trim());
LoggedUser.getInstance().setUser(user);
} catch (DatabaseException e) {
signInText.setText(e.getMessage());
}
return null;
}
};
}
@Override
protected void succeeded() {
super.succeeded();
callbacks.changeScene(new MainPane());
}
}
}
|
[
"yuzhongxing88@gmail.com"
] |
yuzhongxing88@gmail.com
|
d7ed29570bb89383c7211097e50772cd059c5a96
|
281fc20ae4900efb21e46e8de4e7c1e476f0d132
|
/framework/api/src/main/java/org/richfaces/event/scroll/package-info.java
|
f2109dbcc68f3f5fab0083879f27d15bb2124c99
|
[] |
no_license
|
nuxeo/richfaces-3.3
|
c23b31e69668810219cf3376281f669fa4bf256f
|
485749c5f49ac6169d9187cc448110d477acab3b
|
refs/heads/master
| 2023-08-25T13:27:08.790730
| 2015-01-05T10:42:11
| 2015-01-05T10:42:11
| 10,627,040
| 3
| 5
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 133
|
java
|
/**
* Interfaces and classes of events and listeners of scrollable RichFaces components
*/
package org.richfaces.event.scroll;
|
[
"grenard@nuxeo.com"
] |
grenard@nuxeo.com
|
5ae240d4ab25b030e4dede4278390656fd58af40
|
f26de64a7987af7746e0a9e9a8af3cb1c98566b7
|
/src/main/java/cn/kgc57/demo/uploadfilesspringboot/FileUtil/WebMvcConfig.java
|
a0be96a3e2d2e300b0e0b0b1a6f3d0ee930f5e83
|
[] |
no_license
|
864246719/springboot-UploadImage
|
aabe9991dc83b5695eea1c6438a14ce192bfc928
|
f4fd6290c50b6671d449953b4f984ec3698bebc3
|
refs/heads/master
| 2020-09-21T04:06:46.357612
| 2019-11-28T14:45:30
| 2019-11-28T14:45:30
| 224,673,502
| 2
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,701
|
java
|
package cn.kgc57.demo.uploadfilesspringboot.FileUtil;
import org.springframework.format.FormatterRegistry;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.validation.MessageCodesResolver;
import org.springframework.validation.Validator;
import org.springframework.web.method.support.HandlerMethodArgumentResolver;
import org.springframework.web.method.support.HandlerMethodReturnValueHandler;
import org.springframework.web.servlet.HandlerExceptionResolver;
import org.springframework.web.servlet.config.annotation.*;
import java.util.List;
public class WebMvcConfig implements WebMvcConfigurer {
@Override
public void configurePathMatch(PathMatchConfigurer pathMatchConfigurer) {
}
@Override
public void configureContentNegotiation(ContentNegotiationConfigurer contentNegotiationConfigurer) {
}
@Override
public void configureAsyncSupport(AsyncSupportConfigurer asyncSupportConfigurer) {
}
@Override
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer defaultServletHandlerConfigurer) {
}
@Override
public void addFormatters(FormatterRegistry formatterRegistry) {
}
@Override
public void addInterceptors(InterceptorRegistry interceptorRegistry) {
}
@Override
public void addResourceHandlers(ResourceHandlerRegistry registry) {
registry.addResourceHandler("/static/**").addResourceLocations("classpath:/static/");
registry.addResourceHandler("/advertIMG/**").addResourceLocations("file:D:/rentHouse/");
}
@Override
public void addCorsMappings(CorsRegistry corsRegistry) {
}
@Override
public void addViewControllers(ViewControllerRegistry viewControllerRegistry) {
}
@Override
public void configureViewResolvers(ViewResolverRegistry viewResolverRegistry) {
}
@Override
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> list) {
}
@Override
public void addReturnValueHandlers(List<HandlerMethodReturnValueHandler> list) {
}
@Override
public void configureMessageConverters(List<HttpMessageConverter<?>> list) {
}
@Override
public void extendMessageConverters(List<HttpMessageConverter<?>> list) {
}
@Override
public void configureHandlerExceptionResolvers(List<HandlerExceptionResolver> list) {
}
@Override
public void extendHandlerExceptionResolvers(List<HandlerExceptionResolver> list) {
}
@Override
public Validator getValidator() {
return null;
}
@Override
public MessageCodesResolver getMessageCodesResolver() {
return null;
}
}
|
[
"“"
] |
“
|
6207950e6f5575754e63753dc5a6ec8e0b64ebc8
|
feb6a76440cab5cc81d8ab0c5eeb0274cc828b7a
|
/src/main/java/fr/efrei/mamazon/security/UserNotActivatedException.java
|
9660d7d603196f024a2c28facfcd3b7dcb976490
|
[] |
no_license
|
pierre-filliolaud/mamazon
|
9756c6010b1af3c5a8fc6baf2958b233cf27a790
|
6af56c6c9915f32183c7cbbab8e41f99e4130007
|
refs/heads/master
| 2021-01-10T06:21:32.382256
| 2015-12-16T23:33:36
| 2015-12-16T23:33:36
| 48,137,060
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 457
|
java
|
package fr.efrei.mamazon.security;
import org.springframework.security.core.AuthenticationException;
/**
* This exception is throw in case of a not activated user trying to authenticate.
*/
public class UserNotActivatedException extends AuthenticationException {
public UserNotActivatedException(String message) {
super(message);
}
public UserNotActivatedException(String message, Throwable t) {
super(message, t);
}
}
|
[
"pierre.filliolaud@gmail.com"
] |
pierre.filliolaud@gmail.com
|
f84787ecc51c537948429a56b4e604a21379c0ee
|
835e64825c05e493bb2d3f4ffd2498747b2c2649
|
/etl-web/src/main/java/xdata/etl/web/client/ui/menu/MenuGroupView.java
|
c3d72d9dd42c30b2cd4859bb484363a78aa10e3c
|
[] |
no_license
|
wowcinder/canna
|
9120419d44d8010740a57f4d8ff6a1ebc503838e
|
61ac897a5812f2941c79d5c36776fd79859026b7
|
refs/heads/master
| 2021-01-02T09:38:07.170089
| 2013-10-15T13:39:28
| 2013-10-15T13:39:28
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,296
|
java
|
/*
* Copyright (C) 2013 BEIJING UNION VOOLE TECHNOLOGY CO., LTD
*/
package xdata.etl.web.client.ui.menu;
import xdata.etl.web.client.ServiceUtil;
import xdata.etl.web.client.common.editer.RpcEntitySimpleEditor;
import xdata.etl.web.client.common.gridcontainer.SimpleRpcEntityGridContainer;
import xdata.etl.web.client.rpc.RpcCaller;
import xdata.etl.web.client.ui.CenterView;
import xdata.etl.web.client.ui.menu.editor.MenuGroupEditor;
import xdata.etl.web.client.ui.menu.grid.MenuGroupGrid;
import xdata.etl.web.shared.annotations.MenuToken;
import xdata.etl.web.shared.entity.menu.MenuGroup;
/**
* @author XuehuiHe
* @date 2013年8月11日
*
*/
@MenuToken(name = "菜单组管理", token = "menu_group_manager")
public class MenuGroupView extends
SimpleRpcEntityGridContainer<Integer, MenuGroup> implements CenterView {
private static final MenuGroupEditor editor = new MenuGroupEditor();
public MenuGroupView() {
super(new MenuGroupGrid().create());
}
@Override
protected RpcEntitySimpleEditor<Integer, MenuGroup> getAddEditor() {
return editor;
}
@Override
protected RpcEntitySimpleEditor<Integer, MenuGroup> getUpdateEditor() {
return editor;
}
@Override
protected RpcCaller<Integer, MenuGroup> getRpcCaller() {
return ServiceUtil.MenuGroupRpcCaller;
}
}
|
[
"xuehuihe.java@gmail.com"
] |
xuehuihe.java@gmail.com
|
f6254c8e89d0dd77baed47f6af35ebf588f414df
|
b008e0596772d04310c9cdd394f06d13bac7e4da
|
/iBATIS/src/com/ibatis/sqlmap/engine/transaction/user/UserProvidedTransaction.java
|
1567dfcbd2145c31726dd81116571a2d884ec6ca
|
[
"Apache-2.0"
] |
permissive
|
changshoumeng/Open-Source-Research
|
78d2a4bd2ca34576c4bca750d6afb9c589976e90
|
b9f2aed9d0f060b80be45f713c3d48fe91f247b2
|
refs/heads/master
| 2021-01-19T08:09:51.812371
| 2017-02-07T11:16:45
| 2017-02-07T11:16:45
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,856
|
java
|
/*
* Copyright 2004 Clinton Begin
*
* 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.ibatis.sqlmap.engine.transaction.user;
import com.ibatis.common.jdbc.logging.ConnectionLogProxy;
import com.ibatis.common.logging.Log;
import com.ibatis.common.logging.LogFactory;
import com.ibatis.sqlmap.engine.transaction.Transaction;
import com.ibatis.sqlmap.engine.transaction.TransactionException;
import java.sql.Connection;
import java.sql.SQLException;
public class UserProvidedTransaction implements Transaction {
private static final Log connectionLog = LogFactory.getLog(Connection.class);
private Connection connection;
public UserProvidedTransaction(Connection connection) {
if (connectionLog.isDebugEnabled()) {
this.connection = ConnectionLogProxy.newInstance(connection);
} else {
this.connection = connection;
}
}
public void commit() throws SQLException, TransactionException {
connection.commit();
}
public void rollback() throws SQLException, TransactionException {
connection.rollback();
}
public void close() throws SQLException, TransactionException {
connection.close();
}
public Connection getConnection() throws SQLException, TransactionException {
return connection;
}
}
|
[
"zhh200910@gmail.com"
] |
zhh200910@gmail.com
|
1d3588008861ae87e0af15f49577884a23bd51a7
|
c194b05f5c859a823d6890444dbd011eee18c09b
|
/ca-client-api/src/main/java/org/xipki/ca/client/api/CertIdOrError.java
|
8869cfd0bdc1516d04705381cab369b99038f6cb
|
[
"Apache-2.0"
] |
permissive
|
sqf-ice/xipki
|
d9947ff10cbcd263f31f2b5dae0f8fb32144c396
|
a9d6420750a7cbcb4c555430731c7a3ee253a101
|
refs/heads/master
| 2020-04-01T06:59:34.565923
| 2018-10-13T19:30:22
| 2018-10-13T19:30:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,286
|
java
|
/*
*
* Copyright (c) 2013 - 2018 Lijun Liao
*
* 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.xipki.ca.client.api;
import org.bouncycastle.asn1.crmf.CertId;
import org.xipki.cmp.PkiStatusInfo;
import org.xipki.util.ParamUtil;
/**
* TODO.
* @author Lijun Liao
* @since 2.0.0
*/
public class CertIdOrError {
private final CertId certId;
private final PkiStatusInfo error;
public CertIdOrError(CertId certId) {
this.certId = ParamUtil.requireNonNull("certId", certId);
this.error = null;
}
public CertIdOrError(PkiStatusInfo error) {
this.certId = null;
this.error = ParamUtil.requireNonNull("error", error);
}
public CertId getCertId() {
return certId;
}
public PkiStatusInfo getError() {
return error;
}
}
|
[
"lijun.liao@gmail.com"
] |
lijun.liao@gmail.com
|
5e5c458beb5949fbd281e9e1ddfcf44567feaa12
|
5ec14f78722de7786e0fff100101ef7d670a70a9
|
/src/main/java/org/bukkit/craftbukkit/util/CraftIconCache.java
|
3d90b3426873a3528af14f7f1ab0adae0027da2e
|
[
"MIT"
] |
permissive
|
CBM1014/AkarinForge
|
2a0af52c99853455cdb5c0968a0ff502bdcaba88
|
bcfc57de2149c841b1a1514fd22cdb8e77a9d1b8
|
refs/heads/master
| 2020-03-21T09:28:59.891983
| 2018-06-23T12:52:51
| 2018-06-23T12:52:51
| 138,401,937
| 1
| 0
|
MIT
| 2018-06-23T13:09:30
| 2018-06-23T13:09:30
| null |
UTF-8
|
Java
| false
| false
| 309
|
java
|
package org.bukkit.craftbukkit.util;
import org.bukkit.util.CachedServerIcon;
public class CraftIconCache implements CachedServerIcon {
public final String value;
public String getData() { return value; } // Paper
public CraftIconCache(final String value) {
this.value = value;
}
}
|
[
"i@omc.hk"
] |
i@omc.hk
|
45fa86bceb380e09dc5d5fa22931b94078ce4fa3
|
445c3cf84dd4bbcbbccf787b2d3c9eb8ed805602
|
/aliyun-java-sdk-ecsops/src/main/java/com/aliyuncs/ecsops/model/v20160401/OpsModifyFleetStatusAndResultAndScalingIdRequest.java
|
d92b2ba6f4a27caba49a9c7d1a1954e51fcae452
|
[
"Apache-2.0"
] |
permissive
|
caojiele/aliyun-openapi-java-sdk
|
b6367cc95469ac32249c3d9c119474bf76fe6db2
|
ecc1c949681276b3eed2500ec230637b039771b8
|
refs/heads/master
| 2023-06-02T02:30:02.232397
| 2021-06-18T04:08:36
| 2021-06-18T04:08:36
| 172,076,930
| 0
| 0
|
NOASSERTION
| 2019-02-22T14:08:29
| 2019-02-22T14:08:29
| null |
UTF-8
|
Java
| false
| false
| 3,491
|
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.ecsops.model.v20160401;
import com.aliyuncs.RpcAcsRequest;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.ecsops.Endpoint;
/**
* @author auto create
* @version
*/
public class OpsModifyFleetStatusAndResultAndScalingIdRequest extends RpcAcsRequest<OpsModifyFleetStatusAndResultAndScalingIdResponse> {
private String scalingTaskId;
private String fleetId;
private String fleetTaskId;
private String operator;
private String result;
private String id;
private String status;
private String auditParamStr;
public OpsModifyFleetStatusAndResultAndScalingIdRequest() {
super("Ecsops", "2016-04-01", "OpsModifyFleetStatusAndResultAndScalingId", "ecs");
setMethod(MethodType.POST);
try {
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointMap").set(this, Endpoint.endpointMap);
com.aliyuncs.AcsRequest.class.getDeclaredField("productEndpointRegional").set(this, Endpoint.endpointRegionalType);
} catch (Exception e) {}
}
public String getScalingTaskId() {
return this.scalingTaskId;
}
public void setScalingTaskId(String scalingTaskId) {
this.scalingTaskId = scalingTaskId;
if(scalingTaskId != null){
putQueryParameter("ScalingTaskId", scalingTaskId);
}
}
public String getFleetId() {
return this.fleetId;
}
public void setFleetId(String fleetId) {
this.fleetId = fleetId;
if(fleetId != null){
putQueryParameter("FleetId", fleetId);
}
}
public String getFleetTaskId() {
return this.fleetTaskId;
}
public void setFleetTaskId(String fleetTaskId) {
this.fleetTaskId = fleetTaskId;
if(fleetTaskId != null){
putQueryParameter("FleetTaskId", fleetTaskId);
}
}
public String getOperator() {
return this.operator;
}
public void setOperator(String operator) {
this.operator = operator;
if(operator != null){
putQueryParameter("Operator", operator);
}
}
public String getResult() {
return this.result;
}
public void setResult(String result) {
this.result = result;
if(result != null){
putQueryParameter("Result", result);
}
}
public String getId() {
return this.id;
}
public void setId(String id) {
this.id = id;
if(id != null){
putQueryParameter("Id", id);
}
}
public String getStatus() {
return this.status;
}
public void setStatus(String status) {
this.status = status;
if(status != null){
putQueryParameter("Status", status);
}
}
public String getAuditParamStr() {
return this.auditParamStr;
}
public void setAuditParamStr(String auditParamStr) {
this.auditParamStr = auditParamStr;
if(auditParamStr != null){
putQueryParameter("AuditParamStr", auditParamStr);
}
}
@Override
public Class<OpsModifyFleetStatusAndResultAndScalingIdResponse> getResponseClass() {
return OpsModifyFleetStatusAndResultAndScalingIdResponse.class;
}
}
|
[
"sdk-team@alibabacloud.com"
] |
sdk-team@alibabacloud.com
|
68d9b67b2d34df5ac0d655ac023b2c0e7c0b10ea
|
72240256fc4c63e1aed5b86c6880228db63017bf
|
/src/main/java/com/hx/eplate/plugin/pay/tencent/protocol/reverse_protocol/ReverseReqData.java
|
eeb69af25970e84870e907d7f437bc797b62b9dd
|
[] |
no_license
|
AndyYHL/springMMControl
|
64384bdbe40cc1fa9f48206f4b93af897678fcc7
|
17a13ddc80d4c1c95e9ce601d91d299eecc14204
|
refs/heads/master
| 2021-09-08T10:18:39.836419
| 2018-03-09T04:25:39
| 2018-03-09T04:25:39
| 124,476,530
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,942
|
java
|
package com.hx.eplate.plugin.pay.tencent.protocol.reverse_protocol;
import com.hx.eplate.plugin.pay.tencent.common.Configure;
import com.hx.eplate.plugin.pay.tencent.common.RandomStringGenerator;
import com.hx.eplate.plugin.pay.tencent.common.Signature;
import java.lang.reflect.Field;
import java.util.HashMap;
import java.util.Map;
/**
* User: rizenguo
* Date: 2014/10/25
* Time: 16:42
*/
public class ReverseReqData {
//每个字段具体的意思请查看API文档
private String appid = "";
private String mch_id = "";
private String transaction_id = "";
private String out_trade_no = "";
private String nonce_str = "";
private String sign = "";
/**
* 请求撤销服务
* @param transactionID 是微信系统为每一笔支付交易分配的订单号,通过这个订单号可以标识这笔交易,它由支付订单API支付成功时返回的数据里面获取到。建议优先使用
* @param outTradeNo 商户系统内部的订单号,transaction_id 、out_trade_no 二选一,如果同时存在优先级:transaction_id>out_trade_no
* @return API返回的XML数据
* @throws Exception
*/
public ReverseReqData(String transactionID,String outTradeNo){
//--------------------------------------------------------------------
//以下是测试数据,请商户按照自己的实际情况填写具体的值进去
//--------------------------------------------------------------------
//微信分配的公众号ID(开通公众号之后可以获取到)
setAppid(Configure.getAppid());
//微信支付分配的商户号ID(开通公众号的微信支付功能之后可以获取到)
setMch_id(Configure.getMchid());
//transaction_id是微信系统为每一笔支付交易分配的订单号,通过这个订单号可以标识这笔交易,它由支付订单API支付成功时返回的数据里面获取到。
setTransaction_id(transactionID);
//商户系统自己生成的唯一的订单号
setOut_trade_no(outTradeNo);
//随机字符串,不长于32 位
setNonce_str(RandomStringGenerator.getRandomStringByLength(32));
//根据API给的签名规则进行签名
String sign = Signature.getSign(toMap());
setSign(sign);//把签名数据设置到Sign这个属性中
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid;
}
public String getMch_id() {
return mch_id;
}
public void setMch_id(String mch_id) {
this.mch_id = mch_id;
}
public String getTransaction_id() {
return transaction_id;
}
public void setTransaction_id(String transaction_id) {
this.transaction_id = transaction_id;
}
public String getOut_trade_no() {
return out_trade_no;
}
public void setOut_trade_no(String out_trade_no) {
this.out_trade_no = out_trade_no;
}
public String getNonce_str() {
return nonce_str;
}
public void setNonce_str(String nonce_str) {
this.nonce_str = nonce_str;
}
public String getSign() {
return sign;
}
public void setSign(String sign) {
this.sign = sign;
}
public Map<String,Object> toMap(){
Map<String,Object> map = new HashMap<String, Object>();
Field[] fields = this.getClass().getDeclaredFields();
for (Field field : fields) {
Object obj;
try {
obj = field.get(this);
if(obj!=null){
map.put(field.getName(), obj);
}
} catch (IllegalArgumentException e) {
e.printStackTrace();
} catch (IllegalAccessException e) {
e.printStackTrace();
}
}
return map;
}
}
|
[
"love90yhl@hotmail.com"
] |
love90yhl@hotmail.com
|
6402b45e433e5098c8691204cbc20922a2c7ac90
|
bd7ec3a3cee7bbfbd1ef126037d92f8cf2fbee0c
|
/solifeAdmin/src/com/cartmatic/estore/system/service/RegionItemManager.java
|
e07fb0008f7e651fa2bdf1d938a96d17fc34347b
|
[] |
no_license
|
1649865412/solifeAdmin
|
eef96d47b0ed112470bc7c44647c816004240a8d
|
d45d249513379e1d93868fbcebf6eb61acd08999
|
refs/heads/master
| 2020-06-29T03:38:44.894919
| 2015-06-26T06:53:37
| 2015-06-26T06:53:37
| 38,095,812
| 2
| 3
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 822
|
java
|
package com.cartmatic.estore.system.service;
import java.util.List;
import com.cartmatic.estore.common.model.system.RegionItem;
import com.cartmatic.estore.core.service.GenericManager;
/**
* Manager interface for RegionItem, responsible for business processing, and communicate between web and persistence layer.
*
*/
public interface RegionItemManager extends GenericManager<RegionItem> {
List<RegionItem> findByRegionId(List<Integer> regionIds,List<Integer> itemsIds);
/**
* 根据区域Id查找子区域RegionItem
* @param regionId
* @return
*/
public List<RegionItem> getRegionItemsByRegionId(Integer regionId);
/**
* 检查RegionItem是否已经存在
* @param regionId
* @param itemId
* @return
*/
public boolean isExistRegionItemForRegionAndItem(Integer regionId,Integer itemId);
}
|
[
"1649865412@qq.com"
] |
1649865412@qq.com
|
f354efaab85813808f3895144dfaf8da1e84b79d
|
5588afd239d2aca09149c38cbb7f93b848e1bcdd
|
/entity-view/impl/src/main/java/com/blazebit/persistence/view/impl/type/PrimitiveByteArrayBasicUserType.java
|
f64006495c77e460ef42be127f8d749ae7d904f3
|
[
"Apache-2.0",
"LicenseRef-scancode-unknown-license-reference"
] |
permissive
|
philippEder/blaze-persistence
|
c16b07ab006d0810a6529b962588b316a958580f
|
16c2d9f85b09cb6adbc3e68e74ea2758f984c8d0
|
refs/heads/master
| 2020-12-20T00:41:33.178315
| 2020-01-20T06:02:27
| 2020-01-20T12:04:13
| 235,902,203
| 0
| 0
| null | 2020-01-23T22:50:04
| 2020-01-23T22:50:03
| null |
UTF-8
|
Java
| false
| false
| 1,445
|
java
|
/*
* Copyright 2014 - 2020 Blazebit.
*
* 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.blazebit.persistence.view.impl.type;
import com.blazebit.persistence.view.spi.type.AbstractMutableBasicUserType;
import com.blazebit.persistence.view.spi.type.BasicUserType;
import java.util.Arrays;
/**
*
* @author Christian Beikov
* @since 1.2.0
*/
public class PrimitiveByteArrayBasicUserType extends AbstractMutableBasicUserType<byte[]> implements BasicUserType<byte[]> {
public static final BasicUserType<?> INSTANCE = new PrimitiveByteArrayBasicUserType();
@Override
public boolean isDeepEqual(byte[] object1, byte[] object2) {
return Arrays.equals(object1, object2);
}
@Override
public int hashCode(byte[] object) {
return Arrays.hashCode(object);
}
@Override
public byte[] deepClone(byte[] object) {
return Arrays.copyOf(object, object.length);
}
}
|
[
"christian.beikov@gmail.com"
] |
christian.beikov@gmail.com
|
a60e9d47f8e0c6dbaa96ff5a4c63cf1a88c5b395
|
cd4802766531a9ccf0fb54ca4b8ea4ddc15e31b5
|
/java/com/l2jmobius/gameserver/model/zone/type/L2DamageZone.java
|
4ba930be33fb3c55b5b643cda6b8067d1be3548a
|
[] |
no_license
|
singto53/underground
|
8933179b0d72418f4b9dc483a8f8998ef5268e3e
|
94264f5168165f0b17cc040955d4afd0ba436557
|
refs/heads/master
| 2021-01-13T10:30:20.094599
| 2016-12-11T20:32:47
| 2016-12-11T20:32:47
| 76,455,182
| 0
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 5,294
|
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 com.l2jmobius.gameserver.model.zone.type;
import com.l2jmobius.gameserver.ThreadPoolManager;
import com.l2jmobius.gameserver.enums.InstanceType;
import com.l2jmobius.gameserver.instancemanager.CastleManager;
import com.l2jmobius.gameserver.instancemanager.ZoneManager;
import com.l2jmobius.gameserver.model.actor.L2Character;
import com.l2jmobius.gameserver.model.actor.instance.L2PcInstance;
import com.l2jmobius.gameserver.model.entity.Castle;
import com.l2jmobius.gameserver.model.stats.Stats;
import com.l2jmobius.gameserver.model.zone.AbstractZoneSettings;
import com.l2jmobius.gameserver.model.zone.L2ZoneType;
import com.l2jmobius.gameserver.model.zone.TaskZoneSettings;
/**
* A damage zone
* @author durgus
*/
public class L2DamageZone extends L2ZoneType
{
private int _damageHPPerSec;
private int _damageMPPerSec;
private int _castleId;
private Castle _castle;
private int _startTask;
private int _reuseTask;
public L2DamageZone(int id)
{
super(id);
// Setup default damage
_damageHPPerSec = 200;
_damageMPPerSec = 0;
// Setup default start / reuse time
_startTask = 10;
_reuseTask = 5000;
// no castle by default
_castleId = 0;
_castle = null;
setTargetType(InstanceType.L2Playable); // default only playabale
AbstractZoneSettings settings = ZoneManager.getSettings(getName());
if (settings == null)
{
settings = new TaskZoneSettings();
}
setSettings(settings);
}
@Override
public TaskZoneSettings getSettings()
{
return (TaskZoneSettings) super.getSettings();
}
@Override
public void setParameter(String name, String value)
{
if (name.equals("dmgHPSec"))
{
_damageHPPerSec = Integer.parseInt(value);
}
else if (name.equals("dmgMPSec"))
{
_damageMPPerSec = Integer.parseInt(value);
}
else if (name.equals("castleId"))
{
_castleId = Integer.parseInt(value);
}
else if (name.equalsIgnoreCase("initialDelay"))
{
_startTask = Integer.parseInt(value);
}
else if (name.equalsIgnoreCase("reuse"))
{
_reuseTask = Integer.parseInt(value);
}
else
{
super.setParameter(name, value);
}
}
@Override
protected void onEnter(L2Character character)
{
if ((getSettings().getTask() == null) && ((_damageHPPerSec != 0) || (_damageMPPerSec != 0)))
{
final L2PcInstance player = character.getActingPlayer();
if (getCastle() != null) // Castle zone
{
if (!(getCastle().getSiege().isInProgress() && (player != null) && (player.getSiegeState() != 2))) // Siege and no defender
{
return;
}
}
synchronized (this)
{
if (getSettings().getTask() == null)
{
getSettings().setTask(ThreadPoolManager.getInstance().scheduleGeneralAtFixedRate(new ApplyDamage(this), _startTask, _reuseTask));
}
}
}
}
@Override
protected void onExit(L2Character character)
{
if (_characterList.isEmpty() && (getSettings().getTask() != null))
{
getSettings().clear();
}
}
protected int getHPDamagePerSecond()
{
return _damageHPPerSec;
}
protected int getMPDamagePerSecond()
{
return _damageMPPerSec;
}
protected Castle getCastle()
{
if ((_castleId > 0) && (_castle == null))
{
_castle = CastleManager.getInstance().getCastleById(_castleId);
}
return _castle;
}
private final class ApplyDamage implements Runnable
{
private final L2DamageZone _dmgZone;
private final Castle _castle;
protected ApplyDamage(L2DamageZone zone)
{
_dmgZone = zone;
_castle = zone.getCastle();
}
@Override
public void run()
{
if (!isEnabled())
{
return;
}
boolean siege = false;
if (_castle != null)
{
siege = _castle.getSiege().isInProgress();
// castle zones active only during siege
if (!siege)
{
_dmgZone.getSettings().clear();
return;
}
}
for (L2Character temp : _dmgZone.getCharactersInside())
{
if ((temp != null) && !temp.isDead())
{
if (siege)
{
// during siege defenders not affected
final L2PcInstance player = temp.getActingPlayer();
if ((player != null) && player.isInSiege() && (player.getSiegeState() == 2))
{
continue;
}
}
final double multiplier = 1 + (temp.getStat().getValue(Stats.DAMAGE_ZONE_VULN, 0) / 100);
if (getHPDamagePerSecond() != 0)
{
temp.reduceCurrentHp(_dmgZone.getHPDamagePerSecond() * multiplier, null, null);
}
if (getMPDamagePerSecond() != 0)
{
temp.reduceCurrentMp(_dmgZone.getMPDamagePerSecond() * multiplier);
}
}
}
}
}
}
|
[
"MobiusDev@7325c9f8-25fd-504a-9f63-8876acdc129b"
] |
MobiusDev@7325c9f8-25fd-504a-9f63-8876acdc129b
|
ced9c9c96faac1a05c4d6796577eaad299e45238
|
22b9536f4399460b9225f0f7594298257ef445d0
|
/hexie/src/main/java/com/yumu/hexie/common/config/HttpSessionConfig.java
|
066d184f190cf05f3a8dc86e8ee081cdb28df6cb
|
[] |
no_license
|
linknabor/dhzj3
|
d8ff11dd25d4bd16278f72d2bb4b25cf3e7bfbc6
|
8364af08d8b3ebfc2b06430f7497323ed01b2116
|
refs/heads/master
| 2022-12-20T19:10:44.487569
| 2020-09-28T02:00:37
| 2020-09-28T02:00:37
| 147,765,329
| 0
| 0
| null | 2022-12-16T04:41:18
| 2018-09-07T03:25:49
|
Java
|
UTF-8
|
Java
| false
| false
| 1,657
|
java
|
package com.yumu.hexie.common.config;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.redis.connection.jedis.JedisConnectionFactory;
import org.springframework.session.data.redis.config.annotation.web.http.EnableRedisHttpSession;
import org.springframework.session.web.http.CookieHttpSessionStrategy;
import org.springframework.session.web.http.HttpSessionStrategy;
@Configuration
@EnableRedisHttpSession(maxInactiveIntervalInSeconds = 360000, redisNamespace = "dhzj3")
public class HttpSessionConfig {
private static final Logger LOGGER = LoggerFactory.getLogger(HttpSessionConfig.class);
@Value(value = "${redis.host}")
private String host;
@Value(value = "${redis.port}")
private Integer port;
@Value(value = "${redis.password}")
private String password;
@Value(value = "${redis.database}")
private Integer database;
@Bean
public JedisConnectionFactory connectionFactory() {
LOGGER.error("JedisConnectionFactory connectionFactory()");
JedisConnectionFactory factory = new JedisConnectionFactory();
factory.setHostName(host);
factory.setPort(port);
factory.setPassword(password);
factory.setDatabase(database);
return factory;
}
@Bean
public HttpSessionStrategy httpSessionStrategy() {
//return new HeaderHttpSessionStrategy();
CookieHttpSessionStrategy c = new CookieHttpSessionStrategy();
return c;
}
}
|
[
"davidhardson@hotmail.com"
] |
davidhardson@hotmail.com
|
288150fe84ad96a1d6ff0ffec4118c085e8a62d3
|
cc1701cadaa3b0e138e30740f98d48264e2010bd
|
/weblayer/browser/java/org/chromium/weblayer_private/interfaces/SettingType.java
|
d10c89348e9ccfd1d39d365e50e80e1d27ab96b6
|
[
"BSD-3-Clause"
] |
permissive
|
dbuskariol-org/chromium
|
35d3d7a441009c6f8961227f1f7f7d4823a4207e
|
e91a999f13a0bda0aff594961762668196c4d22a
|
refs/heads/master
| 2023-05-03T10:50:11.717004
| 2020-06-26T03:33:12
| 2020-06-26T03:33:12
| 275,070,037
| 1
| 3
|
BSD-3-Clause
| 2020-06-26T04:04:30
| 2020-06-26T04:04:29
| null |
UTF-8
|
Java
| false
| false
| 665
|
java
|
// Copyright 2020 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
package org.chromium.weblayer_private.interfaces;
import androidx.annotation.IntDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@IntDef({SettingType.BASIC_SAFE_BROWSING_ENABLED, SettingType.UKM_ENABLED,
SettingType.EXTENDED_REPORTING_SAFE_BROWSING_ENABLED})
@Retention(RetentionPolicy.SOURCE)
public @interface SettingType {
int BASIC_SAFE_BROWSING_ENABLED = 0;
int UKM_ENABLED = 1;
int EXTENDED_REPORTING_SAFE_BROWSING_ENABLED = 2;
}
|
[
"commit-bot@chromium.org"
] |
commit-bot@chromium.org
|
b6bdc2fd9bbdce203a2e2e5ec01cc19c702407a9
|
03139f2a620e086deb1ea726d3599559e155742f
|
/commons/src/test/java/com/elastisys/scale/cloudpool/commons/scaledown/TestTerminationScheduler.java
|
5f63396c9b440dba18e2603a305549a1391e92a8
|
[
"Apache-2.0"
] |
permissive
|
simonklb/scale.cloudpool
|
f7972c1a44c592cc7636f1d5da7f07928db89baa
|
4f310ee6d4dd9b14c6b632843efce658af17167b
|
refs/heads/master
| 2021-01-13T07:16:00.838114
| 2017-10-27T08:12:51
| 2017-10-27T08:12:51
| 69,879,514
| 0
| 0
| null | 2016-10-03T14:37:26
| 2016-10-03T14:37:26
| null |
UTF-8
|
Java
| false
| false
| 6,352
|
java
|
package com.elastisys.scale.cloudpool.commons.scaledown;
import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.assertThat;
import java.util.Arrays;
import java.util.List;
import org.joda.time.DateTime;
import org.junit.Test;
import com.elastisys.scale.cloudpool.api.types.Machine;
import com.elastisys.scale.cloudpool.api.types.MachineState;
import com.elastisys.scale.cloudpool.commons.termqueue.ScheduledTermination;
import com.elastisys.scale.commons.util.time.FrozenTime;
import com.elastisys.scale.commons.util.time.UtcTime;
/**
* Exercises the {@link TerminationScheduler}.
*/
public class TestTerminationScheduler extends AbstractScaledownTest {
@Test
public void delayedTermination() {
FrozenTime.setFixed(UtcTime.parse("2013-06-01T12:00:00"));
// terminate five minutes prior to billing hour end
int prepaidHourTerminationMargin = 300;
TerminationScheduler scheduler = new TerminationScheduler(prepaidHourTerminationMargin);
// single victim
List<Machine> victims = Arrays.asList(instance("i-1", "2013-06-01T10:30:00"));
List<ScheduledTermination> terminations = scheduler.scheduleEvictions(victims);
// termination time should be five minutes prior to XX:30
assertThat(terminations.size(), is(1));
assertThat(terminations.get(0),
is(new ScheduledTermination(victims.get(0), UtcTime.parse("2013-06-01T12:25:00"))));
// multiple victims
victims = Arrays.asList(instance("i-1", "2013-06-01T10:30:00"), instance("i-2", "2013-05-31T14:50:00"));
terminations = scheduler.scheduleEvictions(victims);
assertThat(terminations.size(), is(2));
assertThat(terminations.get(0),
is(new ScheduledTermination(victims.get(0), UtcTime.parse("2013-06-01T12:25:00"))));
assertThat(terminations.get(1),
is(new ScheduledTermination(victims.get(1), UtcTime.parse("2013-06-01T12:45:00"))));
// corner case: just started next instance hour
victims = Arrays.asList(instance("i-1", "2013-06-01T10:00:00"));
terminations = scheduler.scheduleEvictions(victims);
assertThat(terminations.get(0),
is(new ScheduledTermination(victims.get(0), UtcTime.parse("2013-06-01T12:55:00"))));
// corner case: closer than margin (5 min) to end of billing hour
// in that case, instance is scheduled for immediate termination
victims = Arrays.asList(instance("i-1", "2013-06-01T10:02:00"));
terminations = scheduler.scheduleEvictions(victims);
assertThat(terminations.get(0),
is(new ScheduledTermination(victims.get(0), UtcTime.parse("2013-06-01T12:00:00"))));
}
/**
* Non-positive instance hour margin means immediate termination.
*/
@Test
public void immediateTermination() {
FrozenTime.setFixed(UtcTime.parse("2013-06-01T12:00:00"));
int prepaidHourTerminationMargin = -1;
TerminationScheduler scheduler = new TerminationScheduler(prepaidHourTerminationMargin);
// single victim
List<Machine> victims = Arrays.asList(instance("i-1", "2013-06-01T10:30:00"));
List<ScheduledTermination> terminations = scheduler.scheduleEvictions(victims);
// termination time should be now
assertThat(terminations.size(), is(1));
assertThat(terminations.get(0),
is(new ScheduledTermination(victims.get(0), UtcTime.parse("2013-06-01T12:00:00"))));
// multiple victims
victims = Arrays.asList(instance("i-1", "2013-06-01T10:30:00"), instance("i-2", "2013-05-31T14:50:00"));
terminations = scheduler.scheduleEvictions(victims);
assertThat(terminations.size(), is(2));
assertThat(terminations.get(0),
is(new ScheduledTermination(victims.get(0), UtcTime.parse("2013-06-01T12:00:00"))));
assertThat(terminations.get(1),
is(new ScheduledTermination(victims.get(1), UtcTime.parse("2013-06-01T12:00:00"))));
}
/**
* Zero instance hour margin means immediate termination.
*/
@Test
public void zeroMargin() {
FrozenTime.setFixed(UtcTime.parse("2013-06-01T12:00:00"));
int prepaidHourTerminationMargin = 0;
TerminationScheduler scheduler = new TerminationScheduler(prepaidHourTerminationMargin);
List<Machine> victims = Arrays.asList(instance("i-1", "2013-06-01T10:30:00"));
List<ScheduledTermination> terminations = scheduler.scheduleEvictions(victims);
assertThat(terminations.get(0),
is(new ScheduledTermination(victims.get(0), UtcTime.parse("2013-06-01T12:00:00"))));
}
@Test
public void emptyCandidateList() {
FrozenTime.setFixed(UtcTime.parse("2013-06-01T12:00:00"));
int prepaidHourTerminationMargin = 0;
TerminationScheduler scheduler = new TerminationScheduler(prepaidHourTerminationMargin);
List<Machine> victims = Arrays.asList();
List<ScheduledTermination> terminations = scheduler.scheduleEvictions(victims);
assertThat(terminations.size(), is(0));
}
@Test(expected = NullPointerException.class)
public void nullCandidateList() {
new TerminationScheduler(60).scheduleEvictions(null);
}
@Test(expected = IllegalArgumentException.class)
public void createWithIllegalMargin() {
new TerminationScheduler(3600);
}
@Test(expected = NullPointerException.class)
public void nullCandidate() {
new TerminationScheduler(60).scheduleEviction(null);
}
/**
* {@link Machine}s without a launch time set (it may not have been possible
* to determine) are to be scheduled for immediate termination.
*/
@Test
public void candidateWithNullLaunchTime() {
FrozenTime.setFixed(UtcTime.parse("2013-06-01T12:00:00"));
DateTime nullLaunchTime = null;
Machine machine = Machine.builder().id("i-1").machineState(MachineState.REQUESTED).cloudProvider("AWS-EC2")
.region("us-east-1").machineSize("m1.small").launchTime(nullLaunchTime).build();
ScheduledTermination eviction = new TerminationScheduler(60).scheduleEviction(machine);
assertThat(eviction.getTerminationTime(), is(UtcTime.now()));
}
}
|
[
"peter.gardfjall.work@gmail.com"
] |
peter.gardfjall.work@gmail.com
|
401d16696d99a6713ce6cfe333ca928956ada67c
|
4da340a6db0eb1d845fec6aaf6b75a6871987eea
|
/org.adichatz.testing/src/org/adichatz/testing/xjc/ParamType.java
|
7fe0600707f7d3df012f26b8b4a5bc168d3ee3b8
|
[] |
no_license
|
YvesDrumbonnet/Adichatz-RCP-Eclipse
|
107bbf784407a6167729e9ed82c5546f3f8e3b5d
|
359c430f6daec55cab93a63d08c669fcd05dea84
|
refs/heads/master
| 2023-08-26T02:06:25.194503
| 2020-04-28T15:49:51
| 2020-04-28T15:49:51
| 256,515,394
| 0
| 0
| null | null | null | null |
ISO-8859-1
|
Java
| false
| false
| 3,519
|
java
|
//
// Ce fichier a été généré par l'implémentation de référence JavaTM Architecture for XML Binding (JAXB), v2.2.8-b130911.1802
// Voir <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
// Toute modification apportée à ce fichier sera perdue lors de la recompilation du schéma source.
// Généré le : 2019.10.15 à 11:55:00 AM CEST
//
package org.adichatz.testing.xjc;
import java.io.Serializable;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.bind.annotation.XmlSchemaType;
import javax.xml.bind.annotation.XmlSeeAlso;
import javax.xml.bind.annotation.XmlType;
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
/**
* <p>Classe Java pour paramType complex type.
*
* <p>Le fragment de schéma suivant indique le contenu attendu figurant dans cette classe.
*
* <pre>
* <complexType name="paramType">
* <complexContent>
* <extension base="{}elementType">
* <attribute name="type" type="{http://www.w3.org/2001/XMLSchema}NCName" />
* <attribute name="optional" type="{http://www.w3.org/2001/XMLSchema}boolean" />
* <attribute name="value" type="{http://www.w3.org/2001/XMLSchema}string" />
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "paramType")
@XmlSeeAlso({
ContentProviderType.class
})
public class ParamType
extends ElementType
implements Serializable
{
private final static long serialVersionUID = 1L;
@XmlAttribute(name = "type")
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
@XmlSchemaType(name = "NCName")
protected String type;
@XmlAttribute(name = "optional")
protected Boolean optional;
@XmlAttribute(name = "value")
protected String value;
/**
* Obtient la valeur de la propriété type.
*
* @return
* possible object is
* {@link String }
*
*/
public String getType() {
return type;
}
/**
* Définit la valeur de la propriété type.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setType(String value) {
this.type = value;
}
/**
* Obtient la valeur de la propriété optional.
*
* @return
* possible object is
* {@link Boolean }
*
*/
public Boolean isOptional() {
return optional;
}
/**
* Définit la valeur de la propriété optional.
*
* @param value
* allowed object is
* {@link Boolean }
*
*/
public void setOptional(Boolean value) {
this.optional = value;
}
/**
* Obtient la valeur de la propriété value.
*
* @return
* possible object is
* {@link String }
*
*/
public String getValue() {
return value;
}
/**
* Définit la valeur de la propriété value.
*
* @param value
* allowed object is
* {@link String }
*
*/
public void setValue(String value) {
this.value = value;
}
}
|
[
"yves@adichatz.org"
] |
yves@adichatz.org
|
5972fd9b044a8c1dc7777ac92c4245b5bbfbab44
|
8bca6164fc085936891cda5ff7b2341d3d7696c5
|
/bootstrap/gensrc/de/hybris/platform/commons/model/VelocityFormatterModel.java
|
8f3f7af3c97aeadd404d6c88e51d653c4f8745d4
|
[] |
no_license
|
rgonthina1/newplatform
|
28819d22ba48e48d4edebbf008a925cad0ebc828
|
1cdc70615ea4e86863703ca9a34231153f8ef373
|
refs/heads/master
| 2021-01-19T03:03:22.221074
| 2016-06-20T14:49:25
| 2016-06-20T14:49:25
| 61,548,232
| 1
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 3,287
|
java
|
/*
* ----------------------------------------------------------------
* --- WARNING: THIS FILE IS GENERATED AND WILL BE OVERWRITTEN! ---
* --- Generated at 20 Jun, 2016 7:36:24 PM ---
* ----------------------------------------------------------------
*
* [y] hybris Platform
*
* Copyright (c) 2000-2015 hybris AG
* All rights reserved.
*
* This software is the confidential and proprietary information of hybris
* ("Confidential Information"). You shall not disclose such Confidential
* Information and shall use it only in accordance with the terms of the
* license agreement you entered into with hybris.
*
*/
package de.hybris.platform.commons.model;
import de.hybris.platform.catalog.model.CatalogVersionModel;
import de.hybris.platform.commons.model.ItemFormatterModel;
import de.hybris.platform.core.model.ItemModel;
import de.hybris.platform.servicelayer.model.ItemModelContext;
/**
* Generated model class for type VelocityFormatter first defined at extension commons.
*/
@SuppressWarnings("all")
public class VelocityFormatterModel extends ItemFormatterModel
{
/**<i>Generated model type code constant.</i>*/
public final static String _TYPECODE = "VelocityFormatter";
/**
* <i>Generated constructor</i> - Default constructor for generic creation.
*/
public VelocityFormatterModel()
{
super();
}
/**
* <i>Generated constructor</i> - Default constructor for creation with existing context
* @param ctx the model context to be injected, must not be null
*/
public VelocityFormatterModel(final ItemModelContext ctx)
{
super(ctx);
}
/**
* <i>Generated constructor</i> - Constructor with all mandatory attributes.
* @deprecated Since 4.1.1 Please use the default constructor without parameters
* @param _catalogVersion initial attribute declared by type <code>Formatter</code> at extension <code>catalog</code>
* @param _code initial attribute declared by type <code>Media</code> at extension <code>core</code>
* @param _outputMimeType initial attribute declared by type <code>Formatter</code> at extension <code>commons</code>
*/
@Deprecated
public VelocityFormatterModel(final CatalogVersionModel _catalogVersion, final String _code, final String _outputMimeType)
{
super();
setCatalogVersion(_catalogVersion);
setCode(_code);
setOutputMimeType(_outputMimeType);
}
/**
* <i>Generated constructor</i> - for all mandatory and initial attributes.
* @deprecated Since 4.1.1 Please use the default constructor without parameters
* @param _catalogVersion initial attribute declared by type <code>Formatter</code> at extension <code>catalog</code>
* @param _code initial attribute declared by type <code>Media</code> at extension <code>core</code>
* @param _outputMimeType initial attribute declared by type <code>Formatter</code> at extension <code>commons</code>
* @param _owner initial attribute declared by type <code>Item</code> at extension <code>core</code>
*/
@Deprecated
public VelocityFormatterModel(final CatalogVersionModel _catalogVersion, final String _code, final String _outputMimeType, final ItemModel _owner)
{
super();
setCatalogVersion(_catalogVersion);
setCode(_code);
setOutputMimeType(_outputMimeType);
setOwner(_owner);
}
}
|
[
"Kalpana"
] |
Kalpana
|
f59f821839395b9db7d031011c18f894aff38145
|
082e26b011e30dc62a62fae95f375e4f87d9e99c
|
/docs/weixin_7.0.4_source/反编译源码/反混淆后/src/main/java/com/tencent/p177mm/plugin/scanner/p740a/C43485i.java
|
08302aaae0458ed0fceb96d5eee754f021332200
|
[] |
no_license
|
xsren/AndroidReverseNotes
|
9631a5aabc031006e795a112b7ac756a8edd4385
|
9202c276fe9f04a978e4e08b08e42645d97ca94b
|
refs/heads/master
| 2021-04-07T22:50:51.072197
| 2019-07-16T02:24:43
| 2019-07-16T02:24:43
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,557
|
java
|
package com.tencent.p177mm.plugin.scanner.p740a;
import com.tencent.matrix.trace.core.AppMethodBeat;
import com.tencent.p177mm.network.C1902e;
import com.tencent.p177mm.network.C1918k;
import com.tencent.p177mm.network.C1929q;
import com.tencent.p177mm.p183ai.C1202f;
import com.tencent.p177mm.p183ai.C1207m;
import com.tencent.p177mm.p183ai.C7472b;
import com.tencent.p177mm.p183ai.C7472b.C1196a;
import com.tencent.p177mm.protocal.C7243d;
import com.tencent.p177mm.protocal.protobuf.C15358ld;
import com.tencent.p177mm.protocal.protobuf.C7546lc;
import com.tencent.p177mm.sdk.platformtools.C4988aa;
import com.tencent.p177mm.sdk.platformtools.C4990ab;
import com.tencent.ttpic.FilterEnum4Shaka;
/* renamed from: com.tencent.mm.plugin.scanner.a.i */
public final class C43485i extends C1207m implements C1918k {
private C7472b ehh;
private C1202f ehi;
public C43485i(String str, String str2, int i, String str3, int i2, int i3) {
AppMethodBeat.m2504i(80850);
C1196a c1196a = new C1196a();
c1196a.fsJ = new C7546lc();
c1196a.fsK = new C15358ld();
c1196a.uri = "/cgi-bin/mmbiz-bin/usrmsg/bizscanproductreport";
c1196a.fsI = FilterEnum4Shaka.MIC_WEISHI_BAIHUA;
this.ehh = c1196a.acD();
C7546lc c7546lc = (C7546lc) this.ehh.fsG.fsP;
c7546lc.vOz = C7243d.vxj;
c7546lc.vOA = C7243d.vxi;
c7546lc.vOB = C7243d.vxl;
c7546lc.vOC = C7243d.vxm;
c7546lc.vOD = C4988aa.dor();
c7546lc.pXL = 11294;
c7546lc.vOE = null;
c7546lc.pZp = str;
c7546lc.pZo = str2;
c7546lc.type = i;
c7546lc.value = str3;
c7546lc.count = i2;
c7546lc.oZe = i3;
C4990ab.m7418v("MircoMsg.NetSceneScanProductReport", "statid:".concat(String.valueOf(str2)));
AppMethodBeat.m2505o(80850);
}
/* renamed from: a */
public final void mo4498a(int i, int i2, int i3, String str, C1929q c1929q, byte[] bArr) {
AppMethodBeat.m2504i(80851);
C4990ab.m7410d("MircoMsg.NetSceneScanProductReport", "errType = " + i2 + ", errCode = " + i3);
this.ehi.onSceneEnd(i2, i3, str, this);
AppMethodBeat.m2505o(80851);
}
public final int getType() {
return FilterEnum4Shaka.MIC_WEISHI_BAIHUA;
}
/* renamed from: a */
public final int mo4456a(C1902e c1902e, C1202f c1202f) {
AppMethodBeat.m2504i(80852);
this.ehi = c1202f;
int a = mo4457a(c1902e, this.ehh, this);
AppMethodBeat.m2505o(80852);
return a;
}
}
|
[
"alwangsisi@163.com"
] |
alwangsisi@163.com
|
da26d024f505ecd11193d23b003eb6d82fe27903
|
263b9556d76279459ab9942b0005a911e2b085c5
|
/src/main/java/com/alipay/api/domain/AlipayEcoMycarMaintainServiceproductUpdateModel.java
|
854a759bda4bf792e62b56a1d55e38cfd570485e
|
[
"Apache-2.0"
] |
permissive
|
getsgock/alipay-sdk-java-all
|
1c98ffe7cb5601c715b4f4b956e6c2b41a067647
|
1ee16a85df59c08fb9a9b06755743711d5cd9814
|
refs/heads/master
| 2020-03-30T05:42:59.554699
| 2018-09-19T06:17:22
| 2018-09-19T06:17:22
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,454
|
java
|
package com.alipay.api.domain;
import com.alipay.api.AlipayObject;
import com.alipay.api.internal.mapping.ApiField;
/**
* 洗车保养服务商品变更
*
* @author auto create
* @since 1.0, 2017-04-12 11:49:05
*/
public class AlipayEcoMycarMaintainServiceproductUpdateModel extends AlipayObject {
private static final long serialVersionUID = 1744969959159676917L;
/**
* 请求操作(INSERT:新增;MODIFY:修改;DELETE:删除;QUERY:查询)
*/
@ApiField("operation_type")
private String operationType;
/**
* 外部服务商品标示,ISV保证唯一性。ISV同一门店同一服务项同一产品名称,只能配置一个商品。(存在同一服务项类目对应多个产品情况,5座普通洗车、5座SUV洗车)
*/
@ApiField("out_product_id")
private String outProductId;
/**
* 查询删除:否
新增修改:必填
*/
@ApiField("shop_product")
private MaitainShopProduct shopProduct;
public String getOperationType() {
return this.operationType;
}
public void setOperationType(String operationType) {
this.operationType = operationType;
}
public String getOutProductId() {
return this.outProductId;
}
public void setOutProductId(String outProductId) {
this.outProductId = outProductId;
}
public MaitainShopProduct getShopProduct() {
return this.shopProduct;
}
public void setShopProduct(MaitainShopProduct shopProduct) {
this.shopProduct = shopProduct;
}
}
|
[
"liuqun.lq@alibaba-inc.com"
] |
liuqun.lq@alibaba-inc.com
|
0a21c8409f7a5900f330cf024faddcc14a3753a7
|
9fd8d923be7552c44c2a3d6899460c83ab9c0a7c
|
/on_cms_admin/src/main/java/cn/onlov/on_cms_admin/cms/api/admin/assist/ContentTypeApiAct.java
|
7dab01517a764d1c33f3fb1ee5a2e97d07c0fe44
|
[] |
no_license
|
mwf415/on_parent
|
66d6c342efedb0661612caa89145f5a2646ece08
|
988d95da419bd27b8a3cf963ee66e7b3c9efb3b1
|
refs/heads/master
| 2020-05-18T00:27:41.379597
| 2019-05-12T09:06:10
| 2019-05-12T09:06:10
| 183,888,205
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 7,638
|
java
|
package cn.onlov.on_cms_admin.cms.api.admin.assist;
import cn.onlov.cms.common.cms.annotation.SignValidate;
import cn.onlov.cms.common.cms.api.ApiResponse;
import cn.onlov.cms.common.cms.api.ApiValidate;
import cn.onlov.cms.common.cms.api.Constants;
import cn.onlov.cms.common.cms.api.ResponseCode;
import cn.onlov.cms.common.cms.entity.main.ContentType;
import cn.onlov.cms.common.cms.manager.main.ContentTypeMng;
import cn.onlov.cms.common.common.util.StrUtils;
import cn.onlov.cms.common.common.web.ResponseUtils;
import cn.onlov.cms.common.core.manager.CmsLogMng;
import cn.onlov.cms.common.core.web.WebErrors;
import cn.onlov.cms.common.core.web.util.CmsUtils;
import org.json.JSONArray;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.List;
@Controller
public class ContentTypeApiAct {
private static final Logger log = LoggerFactory.getLogger(ContentTypeApiAct.class);
@RequestMapping("/type/list")
public void list(Boolean containDisabled,HttpServletRequest request,HttpServletResponse response){
List<ContentType> list = manager.getList(containDisabled);
JSONArray jsonArray = new JSONArray();
if (list!=null&&list.size()>0) {
for(int i = 0 ; i <list.size(); i++){
jsonArray.put(i,list.get(i).convertToJson());
}
}
String body = jsonArray.toString();
String message = Constants.API_MESSAGE_SUCCESS;
String code = ResponseCode.API_CODE_CALL_SUCCESS;
ApiResponse apiResponse = new ApiResponse(request,body, message, code);
ResponseUtils.renderApiJson(response, request, apiResponse);
}
@RequestMapping("/type/get")
public void get(Integer id,HttpServletRequest request,HttpServletResponse response){
String body = "\"\"";
String message = Constants.API_MESSAGE_PARAM_REQUIRED;
String code = ResponseCode.API_CODE_PARAM_REQUIRED;
ContentType bean = null;
if (id!=null) {
if (id.equals(0)) {
bean = new ContentType();
}else{
bean = manager.findById(id);
}
if (bean!=null) {
bean.init();
body = bean.convertToJson().toString();
message = Constants.API_MESSAGE_SUCCESS;
code = ResponseCode.API_CODE_CALL_SUCCESS;
}else{
message = Constants.API_MESSAGE_OBJECT_NOT_FOUND;
code = ResponseCode.API_CODE_NOT_FOUND;
}
}
ApiResponse apiResponse = new ApiResponse(request,body, message, code);
ResponseUtils.renderApiJson(response, request, apiResponse);
}
@SignValidate
@RequestMapping("/type/save")
public void save(ContentType bean,HttpServletResponse response,HttpServletRequest request){
String body = "\"\"";
String message = Constants.API_MESSAGE_PARAM_REQUIRED;
String code = ResponseCode.API_CODE_PARAM_REQUIRED;
WebErrors errors = WebErrors.create(request);
errors = ApiValidate.validateRequiredParams(request, errors, bean.getId(),bean.getName(),
bean.getHasImage(),bean.getDisabled(),bean.getImgHeight(),bean.getImgWidth());
if (!errors.hasErrors()) {
ContentType type = manager.findById(bean.getId());
if (type!=null) {
message = Constants.API_MESSAGE_CONTENTTYPE_ID_EXIST;
code = ResponseCode.API_CODE_CONTENTTYPE_ID_EXIST;
}else{
bean = manager.save(bean);
log.info("save ContentType id={}", bean.getId());
cmsLogMng.operating(request, "contentType.log.save", "id="
+ bean.getId() + ";name=" + bean.getName());
body = "{\"id\":"+"\""+bean.getId()+"\"}";
message = Constants.API_MESSAGE_SUCCESS;
code = ResponseCode.API_CODE_CALL_SUCCESS;
}
}
ApiResponse apiResponse = new ApiResponse(request,body, message, code);
ResponseUtils.renderApiJson(response, request, apiResponse);
}
@SignValidate
@RequestMapping("/type/update")
public void update(ContentType bean,HttpServletResponse response,HttpServletRequest request){
String body = "\"\"";
String message = Constants.API_MESSAGE_PARAM_REQUIRED;
String code = ResponseCode.API_CODE_PARAM_REQUIRED;
WebErrors errors = WebErrors.create(request);
errors = ApiValidate.validateRequiredParams(request, errors, bean.getId(),bean.getName(),
bean.getHasImage(),bean.getDisabled(),bean.getImgHeight(),bean.getImgWidth());
if (!errors.hasErrors()) {
ContentType type = manager.findById(bean.getId());
if (type==null) {
message = Constants.API_MESSAGE_OBJECT_NOT_FOUND;
code = ResponseCode.API_CODE_NOT_FOUND;
}else{
bean = manager.update(bean);
log.info("update ContentType id={}.", bean.getId());
cmsLogMng.operating(request, "contentType.log.update", "id="
+ bean.getId() + ";name=" + bean.getName());
body = "{\"id\":"+"\""+bean.getId()+"\"}";
message = Constants.API_MESSAGE_SUCCESS;
code = ResponseCode.API_CODE_CALL_SUCCESS;
}
}
ApiResponse apiResponse = new ApiResponse(request,body, message, code);
ResponseUtils.renderApiJson(response, request, apiResponse);
}
@SignValidate
@RequestMapping("/type/delete")
public void delete(String ids,HttpServletRequest request,HttpServletResponse response){
String body = "\"\"";
String message = Constants.API_MESSAGE_PARAM_REQUIRED;
String code = ResponseCode.API_CODE_PARAM_REQUIRED;
WebErrors errors = WebErrors.create(request);
Integer siteId = CmsUtils.getSiteId(request);
errors = ApiValidate.validateRequiredParams(request, errors, ids);
if (!errors.hasErrors()) {
Integer[] idArr = StrUtils.getInts(ids);
for(int i =0 ; i <idArr.length;i++){
vldExist(idArr[i], siteId, errors);
}
if (errors.hasErrors()) {
message = Constants.API_MESSAGE_PARAM_ERROR;
code = ResponseCode.API_CODE_PARAM_ERROR;
}else{
try {
ContentType[] beans = manager.deleteByIds(idArr);
for (ContentType bean : beans) {
log.info("delete ContentType id={}", bean.getId());
cmsLogMng.operating(request, "contentType.log.delete", "id="
+ bean.getId() + ";name=" + bean.getName());
}
message = Constants.API_MESSAGE_SUCCESS;
code = ResponseCode.API_CODE_CALL_SUCCESS;
} catch (Exception e) {
message = Constants.API_MESSAGE_DELETE_ERROR;
code = ResponseCode.API_CODE_DELETE_ERROR;
}
}
}
ApiResponse apiResponse = new ApiResponse(request,body, message, code);
ResponseUtils.renderApiJson(response, request, apiResponse);
}
@RequestMapping("/type/check_id")
public void CheckId(Integer id,HttpServletRequest request,HttpServletResponse response){
String body = "\"\"";
String message = Constants.API_MESSAGE_PARAM_REQUIRED;
String code = ResponseCode.API_CODE_PARAM_REQUIRED;
boolean result = false;
WebErrors errors = WebErrors.create(request);
errors = ApiValidate.validateRequiredParams(request, errors, id);
if (!errors.hasErrors()) {
ContentType type = manager.findById(id);
if (type!=null) {
result = true;
}
}
body = "{\"result\":"+result+"}";
message = Constants.API_MESSAGE_SUCCESS;
code = ResponseCode.API_CODE_CALL_SUCCESS;
ApiResponse apiResponse = new ApiResponse(request,body, message, code);
ResponseUtils.renderApiJson(response, request, apiResponse);
}
private boolean vldExist(Integer id, Integer siteId, WebErrors errors) {
if (errors.ifNull(id, "id", false)) {
return true;
}
ContentType entity = manager.findById(id);
if (errors.ifNotExist(entity, ContentType.class, id, false)) {
return true;
}
return false;
}
@Autowired
private CmsLogMng cmsLogMng;
@Autowired
private ContentTypeMng manager;
}
|
[
"mwf415@126.com"
] |
mwf415@126.com
|
d2613402350f5796abd0224185de35e67a256460
|
258de8e8d556901959831bbdc3878af2d8933997
|
/washington/washington-core/src/main/java/com/voxlearning/washington/net/message/exam/VerifyMathExaminationQuestionRequest.java
|
5bc45ac6c2c2c5cd2752b06dbc39e56c09676c5c
|
[] |
no_license
|
Explorer1092/vox
|
d40168b44ccd523748647742ec376fdc2b22160f
|
701160b0417e5a3f1b942269b0e7e2fd768f4b8e
|
refs/heads/master
| 2020-05-14T20:13:02.531549
| 2019-04-17T06:54:06
| 2019-04-17T06:54:06
| 181,923,482
| 0
| 4
| null | 2019-04-17T15:53:25
| 2019-04-17T15:53:25
| null |
UTF-8
|
Java
| false
| false
| 341
|
java
|
package com.voxlearning.washington.net.message.exam;
import java.io.Serializable;
/**
* TODO
*/
public class VerifyMathExaminationQuestionRequest implements Serializable
{
private static final long serialVersionUID = 0L ;
/** */
public String uid;
/** */
public String id;
/** */
public boolean verify;
}
|
[
"wangahai@300.cn"
] |
wangahai@300.cn
|
25b70e56d3413ef6fb0cc40a4864f0b04f11b462
|
9c2b23a2d6da1e762400ae963c1f787c3121eb89
|
/core/com.hundsun.ares.studio.jres.metadata.core/src/com/hundsun/ares/studio/jres/model/metadata/impl/TypeDefaultValueListImpl.java
|
064031ef1bb7b097b66f7bdfd796a71c0fcc646d
|
[
"MIT"
] |
permissive
|
zhuyf03516/ares-studio
|
5d67757283a52e51100666c9ce35227a63656f0e
|
5648b0f606cb061d06c39ac25b7b206f3307882f
|
refs/heads/master
| 2021-01-11T11:31:51.436304
| 2016-08-11T10:56:31
| 2016-08-11T10:56:31
| 65,444,199
| 0
| 0
| null | 2016-08-11T06:24:33
| 2016-08-11T06:24:32
| null |
GB18030
|
Java
| false
| false
| 3,338
|
java
|
/**
* 源程序名称:TypeDefaultValueListImpl.java
* 软件著作权:恒生电子股份有限公司 版权所有
* 系统名称:JRES Studio
* 模块名称:com.hundsun.ares.studio.jres.metadata.core
* 功能说明:元数据模型定义、错误检查相关
* 相关文档:
* 作者:
*/
package com.hundsun.ares.studio.jres.model.metadata.impl;
import org.apache.commons.lang.StringUtils;
import org.eclipse.emf.common.util.BasicEList;
import org.eclipse.emf.common.util.EList;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.emf.ecore.util.EObjectContainmentWithInverseEList;
import com.hundsun.ares.studio.core.model.Reference;
import com.hundsun.ares.studio.core.model.impl.TextAttributeReferenceWithNamespaceImpl;
import com.hundsun.ares.studio.jres.metadata.constant.IMetadataRefType;
import com.hundsun.ares.studio.jres.model.metadata.MetadataPackage;
import com.hundsun.ares.studio.jres.model.metadata.TypeDefaultValue;
import com.hundsun.ares.studio.jres.model.metadata.TypeDefaultValueList;
/**
* <!-- begin-user-doc -->
* An implementation of the model object '<em><b>Type Default Value List</b></em>'.
* <!-- end-user-doc -->
* <p>
* </p>
*
* @generated
*/
public class TypeDefaultValueListImpl extends MetadataResourceDataImpl<TypeDefaultValue> implements TypeDefaultValueList {
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public TypeDefaultValueListImpl() {
super();
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
@Override
protected EClass eStaticClass() {
return MetadataPackage.Literals.TYPE_DEFAULT_VALUE_LIST;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* This is specialized for the more specific element type known in this context.
* @generated
*/
@Override
public EList<TypeDefaultValue> getItems() {
if (items == null) {
items = new EObjectContainmentWithInverseEList<TypeDefaultValue>(TypeDefaultValue.class, this, MetadataPackage.TYPE_DEFAULT_VALUE_LIST__ITEMS, MetadataPackage.METADATA_ITEM__PARENT);
}
return items;
}
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public TypeDefaultValue find(String name) {
// TODO#模型设计#龚叶峰#普通#王小恒#已编码 #2011-7-27 #5 #5 #效的查找指定名字的默认值对象
// Ensure that you remove @generated or mark it @generated NOT
//throw new UnsupportedOperationException();
for(TypeDefaultValue value:getItems()){
if(StringUtils.equals(name, value.getName()))
return value;
}
return null;
}
/* (non-Javadoc)
* @see com.hundsun.ares.studio.jres.model.core.impl.JRESResourceInfoImpl#getReferences()
*/
@Override
public EList<Reference> getReferences() {
// TODO#模型设计#龚叶峰#简单#王小恒#已编码 #2011-7-29 #8#10#当前模型的引用信息收集返回
EList<Reference> references=new BasicEList<Reference>();
for(TypeDefaultValue value:getItems()){
if(value.getRefId()!=null && !StringUtils.isBlank(value.getRefId())){
Reference DefValueRef=new TextAttributeReferenceWithNamespaceImpl(IMetadataRefType.DefValue,value, MetadataPackage.Literals.METADATA_ITEM__REF_ID);
if(DefValueRef!=null){
references.add(DefValueRef);
}
}
}
return references;
}
} //TypeDefaultValueListImpl
|
[
"zhuyf@hundsun.com"
] |
zhuyf@hundsun.com
|
a028a6ae945095ba1cddf240db40a7d6f907e39f
|
a8d20b7b0e78956f32d3bb21ba1c97cfbd423807
|
/app/src/main/java/net/doyouhike/app/wildbird/ui/main/discovery/ranking/area/YearPage.java
|
0df85d89409b4187c02d476e093f300cf98771e6
|
[] |
no_license
|
dongodngtang/wlid_android
|
f78749d9df175b63a75eb4e2d58e33d9c226f60f
|
6755af36c5e18afd2cd28d396d7c61c93b6dd5e4
|
refs/heads/master
| 2021-09-05T07:18:59.720464
| 2018-01-25T04:38:31
| 2018-01-25T04:38:31
| 118,862,601
| 1
| 1
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 833
|
java
|
package net.doyouhike.app.wildbird.ui.main.discovery.ranking.area;
import android.content.Context;
import net.doyouhike.app.wildbird.biz.model.bean.RankAreaItem;
import net.doyouhike.app.wildbird.biz.model.request.get.AreaListRequestParam;
import net.doyouhike.app.wildbird.ui.main.discovery.ranking.page.PageBase;
/**
* 功能:
*
* @author:曾江 日期:16-4-7.
*/
public class YearPage extends PageBase<RankAreaItem> {
public YearPage(Context context) {
super();
mRequest = new AreaListRequestParam();
((AreaListRequestParam) mRequest).setType(0);
adapter = new RankAreaAdapter(context, items);
}
@Override
protected void setEmptyMsg() {
}
@Override
public AreaListRequestParam getRequestParam() {
return (AreaListRequestParam) mRequest;
}
}
|
[
"2270333671@qq.com"
] |
2270333671@qq.com
|
bf495f3a659474c8bf7685a26d1ed84313ede1b4
|
4192d19e5870c22042de946f211a11c932c325ec
|
/BM/src/cn/net/iccard/tx/action/struts/TblTxTransferRequestAction.java
|
8b00ebfad7a74d6a5dad3db78e5c2e3edfd0e91f
|
[] |
no_license
|
arthurxiaohz/ic-card
|
1f635d459d60a66ebda272a09ba65e616d2e8b9e
|
5c062faf976ebcffd7d0206ad650f493797373a4
|
refs/heads/master
| 2021-01-19T08:15:42.625340
| 2013-02-01T06:57:41
| 2013-02-01T06:57:41
| 39,082,049
| 2
| 1
| null | null | null | null |
GB18030
|
Java
| false
| false
| 3,970
|
java
|
package cn.net.iccard.tx.action.struts;
import java.util.List;
import org.hi.SpringContextHolder;
import org.hi.framework.paging.PageInfo;
import org.hi.framework.web.PageInfoUtil;
import org.hi.framework.web.struts.BaseAction;
import cn.net.iccard.tx.action.TblTxTransferRequestPageInfo;
import cn.net.iccard.tx.model.TblTxTransferRequest;
import cn.net.iccard.tx.service.TblTxTransferRequestManager;
public class TblTxTransferRequestAction extends BaseAction{
private TblTxTransferRequest tblTxTransferRequest;
private TblTxTransferRequestPageInfo pageInfo;
private List<TblTxTransferRequest> tblTxTransferRequests;
private String orderIndexs;
/**
* 新增/修改保存转账交易请求
*/
public String saveTblTxTransferRequest() throws Exception {
TblTxTransferRequestManager tblTxTransferRequestMgr = (TblTxTransferRequestManager)SpringContextHolder.getBean(TblTxTransferRequest.class);
if(super.perExecute(tblTxTransferRequest)!= null) return returnCommand();
tblTxTransferRequestMgr.saveTblTxTransferRequest(tblTxTransferRequest);
super.postExecute(tblTxTransferRequest);
return returnCommand();
}
/**
* 删除转账交易请求
*/
public String removeTblTxTransferRequest() throws Exception {
TblTxTransferRequestManager tblTxTransferRequestMgr = (TblTxTransferRequestManager)SpringContextHolder.getBean(TblTxTransferRequest.class);
tblTxTransferRequestMgr.removeTblTxTransferRequestById(tblTxTransferRequest.getId());
return returnCommand();
}
/**
* 删除指定的某些转账交易请求
*/
public String removeAllTblTxTransferRequest() throws Exception {
TblTxTransferRequestManager tblTxTransferRequestMgr = (TblTxTransferRequestManager)SpringContextHolder.getBean(TblTxTransferRequest.class);
if (orderIndexs != null && orderIndexs.length()> 0 )
{
String[] ids= orderIndexs.split(",");
for( int i=0; i<ids.length; i++)
{
if (ids[i].length()>0)
{
Integer tblTxTransferRequestid = new Integer( ids[i] );
tblTxTransferRequestMgr.removeTblTxTransferRequestById(tblTxTransferRequestid);
}
}
}
return returnCommand();
}
/**
*查看转账交易请求
*/
public String viewTblTxTransferRequest() throws Exception {
TblTxTransferRequestManager tblTxTransferRequestMgr = (TblTxTransferRequestManager)SpringContextHolder.getBean(TblTxTransferRequest.class);
tblTxTransferRequest = tblTxTransferRequestMgr.getTblTxTransferRequestById(tblTxTransferRequest.getId());
return returnCommand();
}
/**
* 转账交易请求列表
*/
public String tblTxTransferRequestList() throws Exception {
TblTxTransferRequestManager tblTxTransferRequestMgr = (TblTxTransferRequestManager)SpringContextHolder.getBean(TblTxTransferRequest.class);
pageInfo = pageInfo == null ? new TblTxTransferRequestPageInfo() : pageInfo;
PageInfo sarchPageInfo = PageInfoUtil.populate(pageInfo, this);
tblTxTransferRequests = tblTxTransferRequestMgr.getSecurityTblTxTransferRequestList(sarchPageInfo);
return returnCommand();
}
public TblTxTransferRequest getTblTxTransferRequest() {
return tblTxTransferRequest;
}
public void setTblTxTransferRequest(TblTxTransferRequest tblTxTransferRequest) {
this.tblTxTransferRequest = tblTxTransferRequest;
}
public List<TblTxTransferRequest> getTblTxTransferRequests() {
return tblTxTransferRequests;
}
public void setTblTxTransferRequests(List<TblTxTransferRequest> tblTxTransferRequests) {
this.tblTxTransferRequests = tblTxTransferRequests;
}
public TblTxTransferRequestPageInfo getPageInfo() {
return pageInfo;
}
public void setPageInfo(TblTxTransferRequestPageInfo pageInfo) {
this.pageInfo = pageInfo;
}
public String getOrderIndexs() {
return orderIndexs;
}
public void setOrderIndexs(String orderIndexs) {
this.orderIndexs = orderIndexs;
}
}
|
[
"Angi.Wang.AFE@gmail.com"
] |
Angi.Wang.AFE@gmail.com
|
175f97b0c3516f0f9a40a0390cdc878f8f284953
|
0cd572831cb486c09a6e8dcfe382fb37410b3909
|
/src/main/java/mcjty/incontrol/tools/varia/Box.java
|
f409d8d939660a92c4f891fe29d4ac65bd3d0097
|
[
"MIT"
] |
permissive
|
McJtyMods/InControl
|
dba7328923e4d9045b36a4e945329ee9e9fb3c73
|
235498f73827e0fcc256b0546f43ddbdd599e24f
|
refs/heads/1.16
| 2023-09-01T12:04:44.288029
| 2022-07-31T05:36:06
| 2022-07-31T05:36:06
| 79,094,539
| 42
| 21
|
MIT
| 2023-07-24T00:26:34
| 2017-01-16T07:39:46
|
Java
|
UTF-8
|
Java
| false
| false
| 2,977
|
java
|
package mcjty.incontrol.tools.varia;
import net.minecraft.util.math.BlockPos;
import java.util.Random;
public class Box {
private final int minX;
private final int minY;
private final int minZ;
private final int maxX;
private final int maxY;
private final int maxZ;
private Box(Builder builder) {
this.minX = builder.minX;
this.minY = builder.minY;
this.minZ = builder.minZ;
this.maxX = builder.maxX;
this.maxY = builder.maxY;
this.maxZ = builder.maxZ;
}
public int getMinX() {
return minX;
}
public int getMinY() {
return minY;
}
public int getMinZ() {
return minZ;
}
public int getMaxX() {
return maxX;
}
public int getMaxY() {
return maxY;
}
public int getMaxZ() {
return maxZ;
}
public boolean isValid() {
if (minX >= maxX) {
return false;
}
if (minY >= maxY) {
return false;
}
if (minZ >= maxZ) {
return false;
}
return true;
}
public boolean in(BlockPos pos) {
if (pos.getX() < minX || pos.getX() > maxX) {
return false;
}
if (pos.getY() < minY || pos.getY() > maxY) {
return false;
}
if (pos.getZ() < minZ || pos.getZ() > maxZ) {
return false;
}
return true;
}
public BlockPos randomPos(Random random) {
return new BlockPos(
minX + random.nextInt(maxX - minX+1),
minY + random.nextInt(maxY - minY+1),
minZ + random.nextInt(maxZ - minZ+1));
}
public static Builder create() {
return new Builder();
}
public static class Builder {
private int minX;
private int minY;
private int minZ;
private int maxX;
private int maxY;
private int maxZ;
public Builder minimum(BlockPos pos) {
minX = pos.getX();
minY = pos.getY();
minZ = pos.getZ();
return this;
}
public Builder maximum(BlockPos pos) {
maxX = pos.getX();
maxY = pos.getY();
maxZ = pos.getZ();
return this;
}
public Builder center(BlockPos center, int radiusX, int radiusY, int radiusZ) {
minX = center.getX() - radiusX;
minY = center.getY() - radiusY;
minZ = center.getZ() - radiusZ;
maxX = center.getX() + radiusX;
maxY = center.getY() + radiusY;
maxZ = center.getZ() + radiusZ;
return this;
}
public Builder clampY(int minimumY, int maximumY) {
minY = Math.max(minY, minimumY);
maxY = Math.min(maxY, maximumY);
return this;
}
public Box build() {
return new Box(this);
}
}
}
|
[
"mcjty1@gmail.com"
] |
mcjty1@gmail.com
|
1a672544af1b54c510e414ab4713345aec3c8375
|
95c14adc382890aec7a4f042d8dc1f1e302829f1
|
/src/main/java/exceptionclass/bank2/InvalidAccountNumberBankOperationException.java
|
1bd8c7bda8162b5c71f5332e076a394b95b31581
|
[] |
no_license
|
kovacseni/training-solutions
|
fdfbc0b113beea226346dc57abe4404beb855464
|
834e4f86fc8d403249913256a64918250d3434ed
|
refs/heads/master
| 2023-04-18T04:03:41.893938
| 2021-05-05T20:00:44
| 2021-05-05T20:00:44
| 308,728,317
| 0
| 2
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 421
|
java
|
package exceptionclass.bank2;
import exceptionclass.bank.ErrorCode;
public class InvalidAccountNumberBankOperationException extends InvalidBankOperationException {
private ErrorCode errorCode;
public InvalidAccountNumberBankOperationException() {
super();
this.errorCode = ErrorCode.INVALID_ACCOUNTNUMBER;
}
public ErrorCode getErrorCode() {
return errorCode;
}
}
|
[
"kovacseni@gmail.com"
] |
kovacseni@gmail.com
|
c212d5bef6384db1c768876436ffe7134ebbc025
|
323c723bdbdc9bdf5053dd27a11b1976603609f5
|
/nssicc/nssicc_service/src/main/java/biz/belcorp/ssicc/service/sisicc/impl/InterfazIVREnviarTablaProgramaDuplaCyzoneCorporativoServiceImpl.java
|
01569eb60ff0c3530b280a4682852db0276f3391
|
[] |
no_license
|
cbazalar/PROYECTOS_PROPIOS
|
adb0d579639fb72ec7871334163d3fef00123a1c
|
3ba232d1f775afd07b13c8246d0a8ac892e93167
|
refs/heads/master
| 2021-01-11T03:38:06.084970
| 2016-10-24T01:33:00
| 2016-10-24T01:33:00
| 71,429,267
| 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,369
|
java
|
package biz.belcorp.ssicc.service.sisicc.impl;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import biz.belcorp.ssicc.dao.sisicc.InterfazIVRDAO;
import biz.belcorp.ssicc.service.sisicc.framework.impl.BaseInterfazSalidaStoredProcedureAbstractService;
/**
* TODO Include class description here.
* <p>
* <a href="InterfazIVREnviarTablaProgramaDuplaCyzoneCorporativoServiceImpl.java.html"> <i>View Source
* </i> </a>
* </p>
*
* @author <a href="mailto:croman@csigcomt.com">Cristhian Roman</a>
*/
@Service("sisicc.interfazIVREnviarTablaProgramaDuplaCyzoneCorporativoService")
@Transactional(propagation=Propagation.REQUIRED, rollbackFor=Exception.class)
public class InterfazIVREnviarTablaProgramaDuplaCyzoneCorporativoServiceImpl extends BaseInterfazSalidaStoredProcedureAbstractService {
@Resource(name="sisicc.interfazIVRDAO")
InterfazIVRDAO interfazIVRDAO;
/* (non-Javadoc)
* @see biz.belcorp.ssicc.sisicc.service.framework.BaseInterfazSalidaStoredProcedureAbstractService#executeStoreProcedure(java.util.Map)
*/
protected void executeStoreProcedure(Map params) {
interfazIVRDAO.executeInterfazIVREnviarTablaProgramaDuplaCyzoneCorporativo(params);
}
}
|
[
"cbazalarlarosa@gmail.com"
] |
cbazalarlarosa@gmail.com
|
cea6a085570abaddf60b1a8f43783579518a40bc
|
f1a5cf469b0512c1fbbcc4ca878eed0f124e3120
|
/rong-parent/rong-console/rong-funds-service/src/main/java/com/rong/member/module/entity/TbMemProFav.java
|
e9493ee66093b8c43e09b955d91431a7070c3bb0
|
[] |
no_license
|
ShineDreamCatcher/JavaProject
|
aba9737156e9d197cbe1421dab2a0bdac36bbbde
|
4a64939ed77074ba0fb7ce6fb9cd4b310ab85023
|
refs/heads/master
| 2022-12-30T03:19:23.592240
| 2020-04-26T07:06:42
| 2020-04-26T07:06:42
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 743
|
java
|
package com.rong.member.module.entity;
import com.rong.common.module.BaseEntity;
import com.vitily.mybatis.core.annotation.Column;
import com.vitily.mybatis.core.annotation.Table;
import lombok.Data;
import lombok.experimental.Accessors;
/**
* @description : 会员产品收藏
* @author : lether
* @createDate : 2020-02-04
*/
@Table("`tb_mem_pro_fav`")
@Data()
@Accessors(chain = true)
public class TbMemProFav extends BaseEntity<TbMemProFav> {
/**
* 会员id
*/
@Column("`member_id`")
private Long memberId;
/**
* 产品规格参数id
*/
@Column("`spec_par_pro_id`")
private Long specParProId;
/**
* 产品Id
*/
@Column("`product_id`")
private Long productId;
}
|
[
"favor_zlx@163.com"
] |
favor_zlx@163.com
|
4c7be99a77a47e520fc5593a48c2fe565353ebaf
|
e029b729e3db8a99780b157813b05876f1e45b95
|
/guns-admin/src/main/java/com/geekq/guns/core/common/constant/factory/PageFactory.java
|
ed12dd45f551a8926f9be8124ec32e18e71b0136
|
[
"Apache-2.0"
] |
permissive
|
xurp/film
|
34904538f35864a9cd89de18d903e32a78fe6956
|
fce58d695fdf030bc2cf40a5b1c24a69c68f8fc6
|
refs/heads/master
| 2022-12-11T22:19:16.918408
| 2019-07-15T03:28:57
| 2019-07-15T03:28:57
| 194,622,944
| 1
| 0
|
NOASSERTION
| 2022-10-12T20:28:34
| 2019-07-01T07:36:19
|
Java
|
UTF-8
|
Java
| false
| false
| 1,367
|
java
|
package com.geekq.guns.core.common.constant.factory;
import com.baomidou.mybatisplus.plugins.Page;
import com.geekq.guns.core.common.constant.state.Order;
import com.geekq.guns.core.support.HttpKit;
import com.geekq.guns.core.util.ToolUtil;
import javax.servlet.http.HttpServletRequest;
/**
* BootStrap Table默认的分页参数创建
*
* @author fengshuonan
* @date 2017-04-05 22:25
*/
public class PageFactory<T> {
public Page<T> defaultPage() {
HttpServletRequest request = HttpKit.getRequest();
int limit = Integer.valueOf(request.getParameter("limit")); //每页多少条数据
int offset = Integer.valueOf(request.getParameter("offset")); //每页的偏移量(本页当前有多少条)
String sort = request.getParameter("sort"); //排序字段名称
String order = request.getParameter("order"); //asc或desc(升序或降序)
if (ToolUtil.isEmpty(sort)) {
Page<T> page = new Page<>((offset / limit + 1), limit);
page.setOpenSort(false);
return page;
} else {
Page<T> page = new Page<>((offset / limit + 1), limit, sort);
if (Order.ASC.getDes().equals(order)) {
page.setAsc(true);
} else {
page.setAsc(false);
}
return page;
}
}
}
|
[
"qiurunze@youxin.com"
] |
qiurunze@youxin.com
|
7f7a806ca59cba464a77ab654139204c6aaeb355
|
6140f3f0ff9c53b85a8454436f401234389e8018
|
/1.31-MakeK/src/MakeK.java
|
adc2ef3ca29cadedb59f8b29150ea5acf3ad10c5
|
[] |
no_license
|
sarahlc888/USACO-2018-Season
|
04aadc2269b3eb3e9e8a588b722ef992ec810d6b
|
23b6b3c60b023d99d10ac1c7b93a592557c86f7d
|
refs/heads/master
| 2021-06-30T04:10:14.728915
| 2019-03-13T01:58:12
| 2019-03-13T01:58:12
| 136,196,626
| 4
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 2,359
|
java
|
import java.io.*;
import java.util.*;
// make K using (+, -, *, /) out of N numbers
public class MakeK {
public static void main(String args[]) throws IOException {
//for (int i = 1; i <=10; i++) {
for (int i = 1; i <=1; i++) {
String filename = "testData/" + i + ".in";
processOneFile(filename, i);
}
}
public static void processOneFile(String filename, int k) throws IOException{
BufferedReader br = new BufferedReader(new FileReader(filename));
StringTokenizer st = new StringTokenizer(br.readLine());
int K = Integer.parseInt(st.nextToken()); // target value
int N = Integer.parseInt(st.nextToken()); // number of nums
int[] nums = new int[N]; // array of nums
st = new StringTokenizer(br.readLine());
for (int i = 0; i < N; i++) {
nums[i] = Integer.parseInt(st.nextToken());
}
/*
System.out.println("K: " + K);
System.out.println("N: " + N);
for (int i = 0; i < N; i++) {
System.out.println("nums " + i + ": " + nums[i]);
}
*/
int[] ops = new int[N-1];
int[] operations = new int[4];
for (int i = 0; i < operations.length; i++) {
operations[i] = i;
}
// 0 = + ; 1 = - ; 2 = * ; 3 = /
int[] usedOp = new int[N-1]; // the operations to plug into the equation
for (int i = 0; i < usedOp.length; i++) {
usedOp[i] = operations[i];
}
// shuffle nums in all possible ways
// shuffle usedoperations in all possible ways
ArrayList<Integer> equation = new ArrayList<Integer>();
for (int i = 0; i < N; i++) {
equation.add(nums[i]);
if (i != N-1) { // don't put an operation after the last number
equation.add((Integer)(-1));
}
}
// even indices are numbers, odd indices are operations
// plug in the operations
for (int i = 1; i < equation.size(); i = i+2) {
equation.remove(i);
equation.add(i, usedOp[(int)((i-1)/2)]);
}
for (int i = 0; i < equation.size(); i++) {
System.out.println(equation.get(i));
}
br.close();
PrintWriter pw = new PrintWriter((new File("testData/" + k + ".out")));
pw.println();
pw.close();
}
private static void comb1(String prefix, String s) {
if (s.length() > 0) {
System.out.println(prefix + s.charAt(0));
comb1(prefix + s.charAt(0), s.substring(1));
comb1(prefix, s.substring(1));
}
}
}
|
[
"sarahlc888@gmail.com"
] |
sarahlc888@gmail.com
|
29dfa57be92fea6a633b1dc37549432910eb7bf7
|
302d9c68213031b0fc3b139abf58cb430eb9f837
|
/app/src/main/java/org/chromium/blink_public/web/WebContextMenuMediaType.java
|
6c2b164d12f77be80197cb9fbe8fa8838f7a40ef
|
[
"LicenseRef-scancode-unknown-license-reference",
"Apache-2.0"
] |
permissive
|
bruce-ann/Chromium-Android
|
2ee9265d98dcb76907351ffc520d23f19e0fe0dc
|
4b392c0fdf1f52929483e1a02bc88d6c1a1dc583
|
refs/heads/master
| 2021-05-12T13:42:05.601943
| 2017-12-15T06:38:27
| 2017-12-15T06:38:27
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 1,441
|
java
|
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// This file is autogenerated by
// java_cpp_enum.py
// From
// ../../third_party/WebKit/public/web/WebContextMenuData.h
package org.chromium.blink_public.web;
import android.support.annotation.IntDef;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
@IntDef({
WebContextMenuMediaType.MEDIA_TYPE_NONE, WebContextMenuMediaType.MEDIA_TYPE_IMAGE,
WebContextMenuMediaType.MEDIA_TYPE_VIDEO, WebContextMenuMediaType.MEDIA_TYPE_AUDIO,
WebContextMenuMediaType.MEDIA_TYPE_CANVAS, WebContextMenuMediaType.MEDIA_TYPE_FILE,
WebContextMenuMediaType.MEDIA_TYPE_PLUGIN, WebContextMenuMediaType.MEDIA_TYPE_LAST
})
@Retention(RetentionPolicy.SOURCE)
public @interface WebContextMenuMediaType {
/**
* No special node is in context.
*/
int MEDIA_TYPE_NONE = 0;
/**
* An image node is selected.
*/
int MEDIA_TYPE_IMAGE = 1;
/**
* A video node is selected.
*/
int MEDIA_TYPE_VIDEO = 2;
/**
* An audio node is selected.
*/
int MEDIA_TYPE_AUDIO = 3;
/**
* A canvas node is selected.
*/
int MEDIA_TYPE_CANVAS = 4;
/**
* A file node is selected.
*/
int MEDIA_TYPE_FILE = 5;
/**
* A plugin node is selected.
*/
int MEDIA_TYPE_PLUGIN = 6;
int MEDIA_TYPE_LAST = 6;
}
|
[
"kuoruan@gmail.com"
] |
kuoruan@gmail.com
|
b74ac77082fe4148753c22af23985fcdd96919e9
|
6e57bdc0a6cd18f9f546559875256c4570256c45
|
/packages/providers/TvProvider/src/com/android/providers/tv/BootCompletedReceiver.java
|
0fdcaa7e164cddbede939d42334ad3c1a5ab3604
|
[] |
no_license
|
dongdong331/test
|
969d6e945f7f21a5819cd1d5f536d12c552e825c
|
2ba7bcea4f9d9715cbb1c4e69271f7b185a0786e
|
refs/heads/master
| 2023-03-07T06:56:55.210503
| 2020-12-07T04:15:33
| 2020-12-07T04:15:33
| 134,398,935
| 2
| 1
| null | 2022-11-21T07:53:41
| 2018-05-22T10:26:42
| null |
UTF-8
|
Java
| false
| false
| 1,107
|
java
|
/*
* Copyright (C) 2017 The Android Open Source Project
*
* 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.android.providers.tv;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
/**
* This will be launched when BOOT_COMPLETED intent is broadcast.
*/
public class BootCompletedReceiver extends BroadcastReceiver {
@Override
public void onReceive(Context context, Intent intent) {
// Delete the transient rows on boot.
TransientRowHelper.getInstance(context).ensureOldTransientRowsDeleted();
}
}
|
[
"dongdong331@163.com"
] |
dongdong331@163.com
|
f6b6b31f6ed4e22b4834fbdef47a166aebd99f8c
|
502ea93de54a1be3ef42edb0412a2bf4bc9ddbef
|
/sources/com/google/android/gms/internal/ads/atu.java
|
03286c3612271e13f212f412d828724ab24dbeaa
|
[] |
no_license
|
dovanduy/MegaBoicotApk
|
c0852af0773be1b272ec907113e8f088addb0f0c
|
56890cb9f7afac196bd1fec2d1326f2cddda37a3
|
refs/heads/master
| 2020-07-02T04:28:02.199907
| 2019-08-08T20:44:49
| 2019-08-08T20:44:49
| null | 0
| 0
| null | null | null | null |
UTF-8
|
Java
| false
| false
| 717
|
java
|
package com.google.android.gms.internal.ads;
import com.google.android.gms.ads.internal.gmsg.C3067ae;
import java.util.Map;
final class atu implements C3067ae<Object> {
/* renamed from: a */
private final /* synthetic */ C3695bq f12222a;
/* renamed from: b */
private final /* synthetic */ atr f12223b;
atu(atr atr, C3695bq bqVar) {
this.f12223b = atr;
this.f12222a = bqVar;
}
public final void zza(Object obj, Map<String, String> map) {
C4089qe qeVar = (C4089qe) this.f12223b.f12215a.get();
if (qeVar == null) {
this.f12222a.mo15209b("/showOverlay", this);
} else {
qeVar.getView().setVisibility(0);
}
}
}
|
[
"pablo.valle.b@gmail.com"
] |
pablo.valle.b@gmail.com
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.